/* Programme GDP — charte reprise de l'application VDR / Chartres (bleu marine, fond clair, cartes). */
:root{--navy:#122b4a;--navy-2:#225b88;--ink:#182b45;--muted:#52667c;--bg:#f3f7fb;--line:#e4ebf2;--line-2:#c9d6e3;--accent:#1d5f8f;--sky:#a8d9e9;--mint:#bcece8;
--ok-bg:#e8f4ef;--ok:#2f6f5a;--warn-bg:#fdf0e6;--warn:#94440b;--ko-bg:#fbe9eb;--ko:#9f2d36;--focus:#268ea7;
font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg);color-scheme:light}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);line-height:1.5}
a{color:var(--accent)}a:hover{color:var(--navy)}
:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
h1,h2,h3{line-height:1.3;margin:0}
h2{font-size:17px;font-weight:650}h3{font-size:16px;font-weight:650}
code{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace}
.muted{color:var(--muted)}.small{font-size:13px}.nowrap{white-space:nowrap}

/* Structure */
.layout{display:flex;flex-wrap:wrap;min-height:100vh}
.side{flex:1 1 250px;max-width:100%;background:var(--navy);color:#fff;padding:24px 16px;display:flex;flex-direction:column;gap:14px}
.main{flex:999 1 560px;min-width:0;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;padding:0 8px 8px}
.brand-mark{width:40px;height:40px;border-radius:10px;background:var(--navy-2);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;letter-spacing:.04em;flex:none}
.brand-text{display:flex;flex-direction:column}.brand-text b{font-size:14px}.brand-text small{font-size:12px;color:var(--sky)}
.nav{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:2px}
.nav li{flex:1 1 210px}
.nav a,.nav-soon{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:0 12px;border-radius:10px;font-size:14px;color:#dbe7f3;text-decoration:none}
.nav a:hover{background:#1d3f66;color:#fff}
.nav a[aria-current=page]{background:#fff;color:var(--navy);font-weight:650}
.nav-soon{color:#93a9c2;cursor:default}.nav-soon small{font-size:11px;color:#7f97b2}
.nav-title{margin:10px 8px 0;font-size:11px;font-weight:700;letter-spacing:.12em;color:var(--sky)}
.nav-user{margin-top:auto;padding:14px 8px 0;border-top:1px solid #2a4c74;display:flex;flex-direction:column;gap:4px}
.nav-user a{color:#fff;font-weight:600;text-decoration:none;min-height:36px;display:flex;align-items:center}
.link-btn{background:none;border:0;padding:0;color:#dbe7f3;font:inherit;font-size:13px;cursor:pointer;text-decoration:underline;min-height:36px}
.hero{background:linear-gradient(115deg,var(--navy),var(--navy-2));color:#fff;padding:32px 32px 36px}
.hero-inner,.content{max-width:1180px;margin:0 auto;width:100%}
.eyebrow{margin:0 0 8px;font-size:11px;font-weight:700;letter-spacing:.16em;color:var(--sky)}
.hero h1{font-size:clamp(23px,2.5vw,28px);font-weight:650;margin-bottom:8px}.hero h1 span{color:var(--mint)}
.subtitle{margin:0;font-size:14px;color:#d1dfed}
.content{padding:24px 32px 48px;display:flex;flex-direction:column;gap:20px}

/* Composants */
.card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:22px;box-shadow:0 4px 18px #102d4a09}
.card.flush{padding:0;overflow:hidden}.card.narrow{max-width:560px}
.card.notice{border-color:#e9c58f;background:#fffaf2}
.stack{display:flex;flex-direction:column;gap:14px}.stack-sm{display:flex;flex-direction:column;gap:6px}
.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px;align-items:start}
.section-title{margin-top:8px}
.modules{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.module{display:flex;flex-direction:column;gap:10px}.module p{margin:0;font-size:14px}
.module-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.project{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}.project p{margin:0}
.tag{margin:0;font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--accent)}
.soon{font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;background:#eef2f7;color:#33465c;white-space:nowrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:10px;border:0;background:var(--navy-2);color:#fff;font:inherit;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer}
.btn:hover{background:var(--navy);color:#fff}
.btn.secondary{background:#fff;color:var(--ink);border:1px solid var(--line-2)}.btn.secondary:hover{background:#f3f7fb}
.btn.danger{background:#fff;color:var(--ko);border:1px solid #e6b9be}.btn.danger:hover{background:var(--ko-bg)}
.actions,.toolbar{display:flex;flex-wrap:wrap;gap:8px}
.field{display:flex;flex-direction:column;gap:6px}
.field label,legend{font-size:13px;font-weight:600;color:#33465c}
input[type=text],input[type=password],input[type=email],input:not([type]),select{min-height:44px;border:1px solid var(--line-2);border-radius:10px;padding:0 12px;font:inherit;font-size:15px;color:var(--ink);background:#fff;width:100%}
input:disabled{background:#f3f6f9;color:var(--muted)}
.help{color:var(--muted);font-size:12px}.error{color:var(--ko);font-size:13px;font-weight:600}
fieldset.roles{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0}
fieldset.roles div{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:4px}
fieldset.roles label{display:flex;align-items:center;gap:8px;min-height:36px;font-size:14px;font-weight:500}
fieldset.roles input{width:18px;height:18px}
.msg{margin:0;padding:10px 14px;border-radius:10px;font-size:14px;background:#eaf3fb;color:#1f3550}
.msg p{margin:0}.messages{display:flex;flex-direction:column;gap:8px}
.msg-error{background:var(--ko-bg);color:#7d2129}.msg-success{background:var(--ok-bg);color:#23584a}.msg-warning{background:var(--warn-bg);color:#6b3408}
.env-banner{margin:0;padding:8px 14px;border-radius:10px;background:#fcf4e6;color:#6b4a12;font-size:13px}
.chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-block;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;background:#eaf3fb;color:var(--navy);margin:1px 0}
.badge{display:inline-block;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;white-space:nowrap}
.badge.ok{background:var(--ok-bg);color:var(--ok)}.badge.warn{background:var(--warn-bg);color:var(--warn)}.badge.ko{background:var(--ko-bg);color:var(--ko)}.badge.off{background:#eef2f7;color:#33465c}
.dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0;font-size:14px}.dl dt{color:var(--muted)}.dl dd{margin:0}
.table-wrap{overflow-x:auto}
table{width:100%;min-width:720px;border-collapse:collapse;font-size:14px}
th{background:#f6f9fc;text-align:left;color:var(--muted);font-size:12px;font-weight:600;padding:12px 14px}
td{padding:12px 14px;border-top:1px solid #eef2f7;vertical-align:top}
.filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}.filters .field{flex:1 1 220px}
.pager{display:flex;gap:16px;justify-content:center;align-items:center;font-size:14px}
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.timeline li{display:flex;flex-direction:column;font-size:14px}.timeline small{color:var(--muted)}
.codes{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;padding-left:22px;font-size:17px}
.secret{background:#f3f7fb;border:1px solid var(--line);border-radius:6px;padding:2px 6px;word-break:break-all}.secret.big{font-size:20px;padding:6px 10px}
.qr{display:flex;justify-content:center}.qr img{border:1px solid var(--line);border-radius:12px;background:#fff}

/* Pages d'authentification */
.auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:linear-gradient(115deg,var(--navy),var(--navy-2))}
.auth-card{width:100%;max-width:440px;background:#fff;border-radius:18px;padding:28px;display:flex;flex-direction:column;gap:16px;box-shadow:0 20px 60px #0b1d3340}
.auth-head{display:flex;gap:14px;align-items:center}.auth-head h1{font-size:22px;font-weight:650}.auth-head .eyebrow{color:var(--accent);margin:0 0 4px}
.auth-card p{margin:0}

@media (max-width:640px){.hero{padding:24px 16px 28px}.content{padding:20px 16px 40px}.card{padding:18px}}

/* ===== Lots 2 à 6 : composants métier ===== */
.crit{display:inline-block;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;white-space:nowrap}
.crit-critique{background:var(--ko-bg);color:var(--ko)}.crit-elevee{background:var(--warn-bg);color:var(--warn)}
.crit-moderee{background:#fbf5e1;color:#6f5410}.crit-faible{background:var(--ok-bg);color:var(--ok)}
.res-conforme{background:var(--ok-bg);color:var(--ok)}.res-non_conforme{background:var(--ko-bg);color:var(--ko)}
.res-partiel{background:var(--warn-bg);color:var(--warn)}.res-a_evaluer,.res-non_applicable{background:#eef2f7;color:#33465c}
.st{display:inline-block;font-size:12px;font-weight:600;padding:3px 10px;border-radius:999px;background:#eef2f7;color:#33465c;white-space:nowrap}
.st-publie,.st-restitue,.st-clos,.st-terminee,.st-approuve,.st-go,.st-verifie,.st-sous_controle{background:var(--ok-bg);color:var(--ok)}
.st-en_revue,.st-en_traitement,.st-en_cours,.st-vigilance,.st-a_valider{background:var(--warn-bg);color:var(--warn)}
.st-accepte{background:#f0edf9;color:#4f4787}.st-alerte,.st-nogo,.st-refuse,.st-rejete{background:var(--ko-bg);color:var(--ko)}
progress{appearance:none;-webkit-appearance:none;width:100%;height:8px;border:0;border-radius:6px;background:#e8eef5;overflow:hidden}
progress::-webkit-progress-bar{background:#e8eef5;border-radius:6px}progress::-webkit-progress-value{background:var(--navy-2);border-radius:6px}
progress::-moz-progress-bar{background:var(--navy-2);border-radius:6px}
progress.teal::-webkit-progress-value{background:#217e83}progress.teal::-moz-progress-bar{background:#217e83}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}
.lot-card{display:flex;flex-direction:column;gap:12px;color:inherit;text-decoration:none}.lot-card:hover{border-color:var(--navy-2)}
.lot-card .row,.row{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.code{font-size:12px;font-weight:700;padding:4px 10px;border-radius:8px;background:#eaf3fb;color:var(--accent)}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px}
.kpi{display:flex;flex-direction:column;gap:4px}.kpi small{font-size:13px;color:var(--muted)}
.kpi b{font-size:32px;font-weight:700;color:#163b60;font-variant-numeric:tabular-nums;line-height:1.15}.kpi b.ko{color:var(--ko)}.kpi b.warn{color:var(--warn)}
.kpi span{font-size:12px;color:var(--muted)}
.matrix{display:grid;grid-template-columns:28px repeat(5,minmax(0,1fr));gap:4px;align-items:stretch}
.matrix .axis{font-size:12px;color:var(--muted);display:flex;align-items:center;justify-content:center}
.matrix .cell{aspect-ratio:1.4;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px}
.cell.crit-critique{background:#f6d5d9}.cell.crit-elevee{background:#fbe2cc}.cell.crit-moderee{background:#f7edc9}.cell.crit-faible{background:#d6ece2}
.chips-filter{display:flex;flex-wrap:wrap;gap:8px}.chips-filter a{min-height:40px;display:inline-flex;align-items:center;padding:0 14px;border-radius:999px;border:1px solid var(--line-2);color:#33465c;text-decoration:none;font-size:14px;font-weight:600;background:#fff}
.chips-filter a[aria-current=true]{border:2px solid var(--navy-2);background:#eaf3fb;color:var(--navy)}
textarea{border:1px solid var(--line-2);border-radius:10px;padding:10px 12px;font:inherit;font-size:15px;color:var(--ink);width:100%;resize:vertical}
input[type=date],input[type=number],input[type=search],input[type=file]{min-height:44px;border:1px solid var(--line-2);border-radius:10px;padding:0 12px;font:inherit;font-size:15px;color:var(--ink);background:#fff;width:100%}
input[type=file]{padding:8px 12px}
.prose{white-space:pre-line;margin:0}
.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.inline-form select{width:auto;min-height:36px}
.board{display:grid;grid-template-columns:repeat(6,minmax(180px,1fr));gap:12px;min-width:1100px}
.board-col{background:#e9eff6;border-radius:14px;padding:12px;display:flex;flex-direction:column;gap:10px}
.board-col h3{font-size:13px}.board-col .tag{font-size:11px}
.board-card{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid #dbe4ee;border-radius:10px;padding:12px;color:inherit;text-decoration:none}
.board-card:hover{border-color:var(--navy-2)}
.gantt{min-width:980px;display:flex;flex-direction:column}
.gantt-row{display:grid;grid-template-columns:240px minmax(0,1fr);border-bottom:1px solid #f0f3f7;min-height:44px;align-items:center}
.gantt-track{display:grid;height:100%;align-items:center}
.gantt-head span{font-size:12px;font-weight:600;color:var(--muted);text-align:center;padding:8px 2px}
.gantt-head span.now{background:#eaf3fb;color:var(--navy)}
.bar{height:14px;border-radius:7px;background:var(--navy-2)}.bar.teal{background:#217e83}
.diamond{justify-self:center;width:13px;height:13px;transform:rotate(45deg);background:var(--warn)}.diamond.ok{background:var(--ok)}.diamond.ko{background:var(--ko)}
.heat td{text-align:center;font-weight:650;border-radius:8px}
.heat .h0{background:var(--ko-bg);color:var(--ko)}.heat .h1{background:var(--warn-bg);color:var(--warn)}.heat .h2{background:#eef2f7;color:#33465c}
.heat .h3{background:#cfe7dc;color:#1f4c3e}.heat .h4{background:var(--ok);color:#fff}
@media print{.side,.no-print,.env-banner{display:none!important}.hero{background:#122b4a!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.card{box-shadow:none;break-inside:avoid}.content{padding:12px}}

/* Positionnement Gantt sans style en ligne (CSP) : 24 colonnes mensuelles */
.gantt-track{grid-template-columns:repeat(24,minmax(0,1fr))}
.gs-1{grid-column-start:1}.ge-1{grid-column-end:1}
.gs-2{grid-column-start:2}.ge-2{grid-column-end:2}
.gs-3{grid-column-start:3}.ge-3{grid-column-end:3}
.gs-4{grid-column-start:4}.ge-4{grid-column-end:4}
.gs-5{grid-column-start:5}.ge-5{grid-column-end:5}
.gs-6{grid-column-start:6}.ge-6{grid-column-end:6}
.gs-7{grid-column-start:7}.ge-7{grid-column-end:7}
.gs-8{grid-column-start:8}.ge-8{grid-column-end:8}
.gs-9{grid-column-start:9}.ge-9{grid-column-end:9}
.gs-10{grid-column-start:10}.ge-10{grid-column-end:10}
.gs-11{grid-column-start:11}.ge-11{grid-column-end:11}
.gs-12{grid-column-start:12}.ge-12{grid-column-end:12}
.gs-13{grid-column-start:13}.ge-13{grid-column-end:13}
.gs-14{grid-column-start:14}.ge-14{grid-column-end:14}
.gs-15{grid-column-start:15}.ge-15{grid-column-end:15}
.gs-16{grid-column-start:16}.ge-16{grid-column-end:16}
.gs-17{grid-column-start:17}.ge-17{grid-column-end:17}
.gs-18{grid-column-start:18}.ge-18{grid-column-end:18}
.gs-19{grid-column-start:19}.ge-19{grid-column-end:19}
.gs-20{grid-column-start:20}.ge-20{grid-column-end:20}
.gs-21{grid-column-start:21}.ge-21{grid-column-end:21}
.gs-22{grid-column-start:22}.ge-22{grid-column-end:22}
.gs-23{grid-column-start:23}.ge-23{grid-column-end:23}
.gs-24{grid-column-start:24}.ge-24{grid-column-end:24}
.gs-25{grid-column-start:25}.ge-25{grid-column-end:25}
.card-head{padding:18px 22px}.link-btn.dark{color:var(--accent);font-size:12px;min-height:28px}
.gantt-project{background:#f8fafc}.gantt-label{padding:6px 12px 6px 0;min-width:0}.gantt-label small{font-size:11px}
.gantt-track .bar,.gantt-track .diamond{grid-row:1}
.legend{display:inline-block;vertical-align:middle;margin-right:4px}.legend.bar{width:22px;height:10px}.legend.diamond{width:10px;height:10px}
.check{display:flex;gap:8px;align-items:center;font-size:14px}.check input{width:18px;height:18px}
.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.steps li{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid var(--line);font-size:13px;font-weight:600;color:var(--muted)}
.steps li span{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#eef2f7;font-size:12px;flex:none}
.steps li.done{color:var(--ok)}.steps li.done span{background:var(--ok-bg)}
.steps li.current{border:2px solid var(--navy-2);color:var(--navy)}.steps li.current span{background:var(--navy-2);color:#fff}
.dl.block{grid-template-columns:1fr}.dl.block dt{font-weight:600;color:#33465c}.dl.block dd{margin-bottom:8px}
.diff{border:1px solid var(--line);border-radius:10px;padding:10px;font-family:ui-monospace,Consolas,monospace;font-size:13px;display:flex;flex-direction:column;gap:2px}
.diff-add{background:#e8f4ef;color:#1f4c3e}.diff-del{background:#fbe9eb;color:#7d2129;text-decoration:line-through}.diff-same{color:var(--muted)}
.domain{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;align-items:start}
.doc-col{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border-radius:12px;border:1px solid var(--line)}
.doc-col.as{background:#f6f9fc}.doc-col.to{background:#eef7f6;border-color:#d3e9e6}.doc-col.to .tag{color:#23605f}
.heat th[scope=row]{font-size:13px;font-weight:600;white-space:nowrap}.heat td{padding:10px 8px}
.kpi b .unit{font-size:18px;color:#66798d;font-weight:500}
.mat-row{display:grid;grid-template-columns:64px minmax(0,1fr) 36px;gap:12px;align-items:center}.mat-row b{text-align:right}
progress.small-bar{width:80px;height:6px;vertical-align:middle}
.fmt{font-size:11px;font-weight:700;padding:4px 10px;border-radius:6px;background:#eef2f7;color:#33465c}.fmt-pdf{background:var(--ko-bg);color:var(--ko)}.fmt-xlsx{background:var(--ok-bg);color:var(--ok)}
