/* Autonomia — espace test. Charte AUTONOMIA (kit de marque : tokens, logos SVG, Helvetica Neue).
   Aucune police ni ressource tierce : tout est servi par l'outil (politique de sécurité « self »). */

:root {
  /* charte */
  --navy: #07111F; --navy-2: #0E1D2F; --cyan: #3DE2D0; --white: #FFFFFF; --mist: #F3F7FA; --line: #DCE5EB;
  --muted: #66717D; --academy: #18756D; --territory: #237E91; --build: #F6F1E5;
  --r-xs: 10px; --r-sm: 14px; --r-md: 22px; --r-lg: 34px; --r-pill: 999px;
  --ombre: 0 10px 24px rgba(7, 17, 31, .08); --ombre-forte: 0 18px 46px rgba(7, 17, 31, .10);
  --vite: 180ms ease;
  /* rôles (noms historiques de l'outil, conservés) */
  --ink: var(--navy); --ink-2: #3D4955; --ink-3: var(--muted);
  --paper: var(--mist); --surface: var(--white); --tint: var(--mist); --line-2: #E9EEF2;
  --mark: var(--territory); --hi: var(--cyan);
  --ok: var(--academy); --ok-bg: #E3F4F1; --ko: #B23A2B; --ko-bg: #FCEBE7; --ap: var(--territory); --ap-bg: #E4F2F5;
  --warn: #6B5300; --warn-bg: #FBF3DC; --focus: var(--navy);
  --display: "Helvetica Neue", Helvetica, Arial, sans-serif; --text: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15.5px/1.55 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
h1, h2, h3, h4, .display, nav, button, .btn, label.titre, th, .badge, .eyebrow, .kpi b { font-family: var(--display); }
h1, h2, h3 { margin: 0; line-height: 1.08; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -.04em; }
h2 { font-size: 21px; letter-spacing: -.025em; }
h3 { font-size: 16px; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--mark); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(61, 226, 208, .45); }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 28px; }
@media (max-width: 759px) { .wrap { padding-inline: 16px; } }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--territory); }
.eyebrow a { color: inherit; }
.small { font-size: 14px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 13px; }
.pile { display: grid; gap: 16px; align-content: start; }
.pile-s { display: grid; gap: 8px; align-content: start; }
.rang { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rang-s { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.entre { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: baseline; }

/* en-tête : navy, logo blanc */
.entete { background: rgba(7, 17, 31, .97); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 8px 28px rgba(7, 17, 31, .14); position: sticky; top: 0; z-index: 10; }
.entete .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
  min-height: 72px; padding-block: 10px; }
.marque { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.marque img { display: block; height: 38px; width: auto; }
.marque small { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px solid rgba(61, 226, 208, .55); color: var(--cyan); font: 800 10px var(--display); letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap; }
nav.principale { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
nav.principale a, nav.principale button { color: rgba(255, 255, 255, .82); text-decoration: none; font: 600 14px var(--display);
  padding: 8px 12px; border-radius: var(--r-pill); background: none; border: 0; cursor: pointer;
  transition: background var(--vite), color var(--vite); }
nav.principale a:hover, nav.principale button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
nav.principale a[aria-current="page"] { color: var(--navy); background: var(--cyan); }
nav.principale form button { margin-left: 6px; border: 1px solid rgba(255, 255, 255, .22); }
nav.principale a:focus-visible, nav.principale button:focus-visible { outline-color: var(--cyan); box-shadow: none; }
.bandeau-test { background: var(--navy-2); color: #DDE7EE; font: 500 12.5px var(--display); text-align: center;
  padding: 7px 16px; border-bottom: 1px solid rgba(61, 226, 208, .35); }
.bandeau-test::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 2px;
  background: var(--cyan); transform: rotate(45deg) translateY(-1px); }

main { padding-block: 36px 72px; }
.titre-page { display: grid; gap: 8px; margin-bottom: 28px; }
.titre-page .small { max-width: 820px; }
.pied { border-top: 1px solid var(--line); background: var(--surface); padding-block: 22px 30px; font: 400 13px var(--display);
  color: var(--ink-3); }
.pied .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; }
.pied .wrap > span:first-child { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; color: var(--navy); }
.pied a { color: var(--ink-2); }

/* cartes et panneaux */
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; box-shadow: var(--ombre); }
.carte.etroite { max-width: 480px; margin-inline: auto; }
.carte > h2:first-child, .carte > .pile-s > h2:first-child { margin-bottom: 2px; }
.panneau { background: var(--build); border: 1px solid #EBE2CC; border-radius: var(--r-sm); padding: 18px 20px; }
.note { border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: var(--r-sm); background: var(--surface);
  padding: 12px 16px; }
.note.ko { border-color: #F1C9C0; border-left-color: var(--ko); background: var(--ko-bg); }
.note.ok { border-color: #BFE3DC; border-left-color: var(--academy); background: var(--ok-bg); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grille-2, .grille-3 { grid-template-columns: 1fr; } }
.grille-2 > *, .grille-3 > *, .pile > *, .pile-s > * { min-width: 0; }
@media (min-width: 760px) { .pile > .btn, .pile-s > .btn, .pile > button.btn, .pile-s > button.btn { justify-self: start; min-width: 180px; } }

/* modules (accueil) */
.module { display: grid; gap: 12px; align-content: start; text-decoration: none; color: inherit;
  transition: transform var(--vite), box-shadow var(--vite), border-color var(--vite); }
.module:hover { color: inherit; border-color: rgba(61, 226, 208, .7); transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.module .btn { justify-self: start; }
.module .etat { font: 800 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }

/* formulaires */
form { margin: 0; }
label.titre { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 4px; color: var(--navy); }
.champ { display: grid; gap: 5px; align-content: start; }
.champ .aide { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.champ .erreur { font: 600 13px var(--display); color: var(--ko); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=file],
input[type=url], input[type=tel], input[type=search], input:not([type]), select, textarea {
  font: 400 15px var(--display); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px 14px; width: 100%; min-height: 46px;
  transition: border-color var(--vite), box-shadow var(--vite); }
input[type=file] { padding: 8px 10px; }
input::file-selector-button { font: 700 13px var(--display); color: var(--navy); background: var(--mist); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 6px 14px; margin-right: 12px; cursor: pointer; }
input:hover, select:hover, textarea:hover { border-color: #C5D2DB; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 226, 208, .22); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; }
input:disabled, select:disabled, textarea:disabled { background: var(--mist); color: var(--muted); cursor: not-allowed; }
textarea { min-height: 96px; line-height: 1.5; }
input[aria-invalid=true] { border-color: var(--ko); background: var(--ko-bg); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--academy); }
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; }
.champ-large { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; }
.choix { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.choix label { display: inline-flex; gap: 8px; align-items: center; font: 400 15px var(--display); cursor: pointer; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; }
.cases label { display: grid; grid-template-columns: auto 1fr; gap: 8px; font-size: 14px; align-items: start; }
.cases label b { font-family: var(--display); font-weight: 700; }

/* boutons : principal cyan / texte navy ; secondaire blanc / texte navy */
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 800 14.5px var(--display);
  letter-spacing: -.005em; border-radius: var(--r-pill); padding: 0 20px; min-height: 46px; border: 1px solid var(--cyan);
  background: var(--cyan); color: var(--navy); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--vite), box-shadow var(--vite), background var(--vite), border-color var(--vite); }
.btn:hover { color: var(--navy); background: #5BE8D9; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(7, 17, 31, .12); }
.btn:active { transform: none; box-shadow: none; }
.btn.second { background: var(--surface); color: var(--navy); border-color: rgba(7, 17, 31, .18); }
.btn.second:hover { background: var(--surface); border-color: var(--navy); }
.btn.danger { background: var(--surface); color: var(--ko); border-color: rgba(178, 58, 43, .45); }
.btn.danger:hover { background: var(--ko-bg); color: var(--ko); border-color: var(--ko); }
.btn.petit { font-size: 13px; padding: 4px 14px; min-height: 34px; white-space: normal; text-align: left; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .55; cursor: progress; transform: none; box-shadow: none; }

/* tableaux */
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.tableau th { text-align: left; font-weight: 800; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tableau td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tableau tbody tr { transition: background var(--vite); }
.tableau tbody tr:hover { background: #F8FAFC; }
.tableau td.nb { text-align: right; font-variant-numeric: tabular-nums; }
.defile { overflow-x: auto; }

/* badges (petits stickers) */
.badge { display: inline-flex; align-items: center; min-height: 24px; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  border-radius: var(--r-xs); padding: 0 9px; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); border-color: #BFE3DC; color: var(--academy); }
.badge.ko { background: var(--ko-bg); border-color: #F1C9C0; color: var(--ko); }
.badge.ap { background: var(--ap-bg); border-color: #C3E1E8; color: var(--territory); }
.badge.attente { background: var(--warn-bg); border-color: #EBDDB0; color: var(--warn); }

/* dossier urbanisme */
.etapes { display: grid; gap: 20px; }
.etape > h2 { display: flex; gap: 10px; align-items: baseline; margin-bottom: 14px; }
.etape > h2 .n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: var(--navy);
  color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: 0; transform: translateY(-2px); }
.statut { font: 700 18px var(--display); letter-spacing: -.02em; padding: 16px 20px; border-radius: var(--r-sm);
  background: var(--warn-bg); color: var(--warn); }
.statut.ok { background: var(--ok-bg); color: var(--academy); }
.statut.ko { background: var(--ko-bg); color: var(--ko); }
.constat { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 14px 16px; display: grid; gap: 8px; }
.constat.nc { border-left: 4px solid var(--ko); }
.constat.ap { border-left: 4px solid var(--territory); }
.constat.ok { border-left: 4px solid var(--academy); }
.constat.pm { border-left: 4px solid var(--cyan); }
.constat .ref { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.ref { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
a.renvoi { color: var(--mark); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
a.renvoi::after { content: "\2197"; font-size: .85em; margin-left: 1px; text-decoration: none; display: inline-block; }
a.renvoi:hover { color: var(--navy); text-decoration-style: solid; }
.documents-ref a.renvoi { margin-right: 2px; }
.constat blockquote { margin: 0; padding: 10px 14px; background: var(--mist); border-left: 3px solid var(--line); border-radius: var(--r-xs);
  font-size: 14px; color: var(--ink-2); }
.avis { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px dashed var(--line); padding-top: 10px; }
.avis .libelle { font: 700 12.5px var(--display); color: var(--ink-2); margin-right: 4px; }
.avis input[type=text] { min-height: 34px; font-size: 13px; padding: 4px 12px; flex: 1 1 220px; width: auto; border-radius: var(--r-pill); }
.avis button { font: 700 12.5px var(--display); padding: 0 12px; border-radius: var(--r-pill); border: 1px solid rgba(7, 17, 31, .18);
  background: var(--surface); color: var(--ink); cursor: pointer; min-height: 32px; transition: background var(--vite), border-color var(--vite); }
.avis button:hover { border-color: var(--navy); }
.avis button[aria-pressed=true].accord { background: var(--academy); border-color: var(--academy); color: #fff; }
.avis button[aria-pressed=true].desaccord { background: var(--ko); border-color: var(--ko); color: #fff; }
.avis button[aria-pressed=true].sans_avis { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.question { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.question:last-child { border-bottom: 0; }
.question .pourquoi { font-size: 13px; color: var(--ink-3); }
details > summary { cursor: pointer; font: 700 14.5px var(--display); padding: 6px 0; color: var(--navy); }
details > summary:hover { color: var(--territory); }
.courrier { white-space: pre-wrap; font: 400 15px/1.6 var(--text); background: var(--surface); border: 1px solid var(--line); padding: 18px 20px;
  border-radius: var(--r-sm); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; display: grid; gap: 2px;
  box-shadow: var(--ombre); }
.kpi b { font-size: 30px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.kpi b small { font-size: 15px; color: var(--ink-2); font-weight: 500; letter-spacing: 0; }
.kpi span { font-size: 12.5px; color: var(--ink-2); }
.qr { width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; font: 500 16px var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* page de connexion : panneau navy de marque au-dessus du formulaire */
.connexion-marque { max-width: 480px; margin: 0 auto 18px; border-radius: var(--r-lg); padding: 26px 28px;
  background: linear-gradient(180deg, #101D42, var(--navy)); color: #fff; box-shadow: var(--ombre-forte); display: grid; gap: 10px; }
.connexion-marque img { height: 44px; width: auto; justify-self: start; }
.connexion-marque p { color: rgba(255, 255, 255, .78); font-size: 14px; }

@media print {
  .entete, .bandeau-test, .pied, .no-print, .avis, form.no-print { display: none !important; }
  body, html { background: #fff; }
  main { padding: 0; }
  .carte { border: 0; padding: 0; box-shadow: none; }
  .constat { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .module:hover, .btn:hover { transform: none; } }
@media (max-width: 759px) {
  .entete { position: static; }
  .marque img { height: 32px; }
  nav.principale a, nav.principale button { padding: 7px 10px; font-size: 13.5px; }
  .carte { padding: 18px; border-radius: 18px; }
  h1 { font-size: 28px; }
  .btn, button.btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 8px; }
}

/* utilitaires (la politique de sécurité interdit les styles en ligne) */
.large { flex: 1 1 260px; }
.bas { align-self: end; }
.lecture { max-width: 820px; }
.espace { margin-top: 20px; }
.n-petit { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.etape form h2 { margin: 30px 0 14px; }
h2 .n.n-petit { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-right: 8px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--mist); color: var(--navy); font: 800 11.5px var(--display); letter-spacing: 0;
  vertical-align: 3px; }
.grand { font-size: 18px; }
input.court { width: 110px; }
input.moyen { width: 170px; }
legend.titre { font: 700 13.5px var(--display); margin-bottom: 6px; padding: 0; color: var(--navy); }
.choix.liste { flex-direction: column; align-items: flex-start; }
.choix.liste label { align-items: baseline; }
.attente-texte { color: var(--warn); }
td details { margin-top: 4px; }
td details form { min-width: 320px; padding: 8px 0; }

/* module Exécution des marchés */
.oblig { color: var(--ko); font-weight: 600; }
.titre-section { font: 600 14px var(--display); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; padding: 0; }
.statut.attente { background: var(--warn-bg); color: #6b5300; }
.statut.ap { background: var(--ap-bg); color: var(--ap); }
.kpis-statuts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.constat.info { border-left: 4px solid var(--line); }
.constat .valeurs, .constat .calcul { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.constat .calcul .mono { background: var(--tint); border-radius: 4px; padding: 1px 6px; }
.constat details { border-top: 1px dashed var(--line); padding-top: 4px; }
.liste-alertes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste-alertes li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 15px; }
tr.retire td { color: var(--ink-3); text-decoration: line-through; }
tr.retire td .badge { text-decoration: none; }
tr.derogation td { background: #fffaf0; }
.avert { font-weight: 600; color: #6b5300; }
.echeancier tr.ech-depassee td:first-child { border-left: 4px solid var(--ko); }
.echeancier tr.ech-proche td:first-child { border-left: 4px solid var(--hi); }
.echeancier tr.ech-a-completer td:first-child { border-left: 4px solid var(--hi); }
.echeancier tr.ech-close td, .echeancier tr.ech-expiree td, .echeancier tr.ech-passee td, .echeancier tr.ech-sans-objet td { color: var(--ink-2); }
button.lien { background: none; border: 0; padding: 0; color: var(--mark); text-decoration: underline; cursor: pointer; font: inherit; }
.groupe-params { border-top: 1px solid var(--line-2); padding-top: 6px; }
.tableau.params textarea { min-height: 44px; font-size: 14px; }
.tableau.params select { min-width: 170px; }
.tableau.params td:nth-child(2) { max-width: 260px; }
.champ-choix legend { margin-bottom: 2px; }
[hidden] { display: none !important; }
@media print { details { display: block; } details > summary { list-style: none; } .constat details[open] summary ~ * { display: block; } }
fieldset { min-width: 0; }
.grille-2 > *, .pile > *, .constat { min-width: 0; }
.constat .mono, .constat .ref, .constat blockquote, .tableau .mono { overflow-wrap: anywhere; }
.rang select.large { width: 1px; min-width: 0; flex: 1 1 180px; }

/* module marchés, lot 2 : situations, état liquidatif, état financier */

.tableau tr.total td { font-weight: 600; border-top: 2px solid var(--line); font-family: var(--display); }
.tableau th.nb { text-align: right; }
.tableau.situation td.saisie { white-space: nowrap; }
.tableau.situation input.court { width: 110px; min-height: 34px; padding: 4px 8px; text-align: right; }
.tableau.situation tr.ligne-erreur td { background: var(--ko-bg); }
.tableau.liquidatif { max-width: 720px; }
.tableau.liquidatif td.mono { width: 2em; color: var(--ink-3); }
.tableau.acomptes td { white-space: nowrap; }
.tableau.acomptes th { white-space: normal; vertical-align: bottom; }
.tableau.acomptes td:last-child { white-space: normal; min-width: 140px; }
.tableau.acomptes td:first-child { white-space: normal; min-width: 150px; }
ul.faits { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.kpis-montants { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpis-montants .kpi b { font-size: 20px; }
.synthese-fin { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
@media print { .tableau.acomptes { font-size: 11px; } }
.choix-evt { flex: 1 1 420px; max-width: 640px; justify-content: flex-end; }
@media (max-width: 640px) {
  .situation-saisie .defile { overflow: visible; }
  .situation-saisie .tableau.situation thead { display: none; }
  .situation-saisie .tableau.situation tr { display: grid; grid-template-columns: 3.2em 1fr; gap: 2px 8px; padding: 10px 0;
    border-bottom: 1px solid var(--line-2); }
  .situation-saisie .tableau.situation td { border: 0; padding: 0; }
  .situation-saisie .tableau.situation td:nth-child(n+3) { grid-column: 2; }
  .situation-saisie .tableau.situation td.nb { text-align: left; }
  .situation-saisie .tableau.situation td.nb::before { content: "précédent : "; color: var(--ink-3); font-size: 13px; }
}
.tableau.compact th, .tableau.compact td { padding: 4px 8px; font-size: 14px; }
.tableau caption { text-align: left; padding: 0 0 6px; color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.tableau.solde td:first-child { width: 2.5em; }
.tableau.recap td.nb { width: 11em; white-space: nowrap; }
.tableau.recap td.sens { width: 4.5em; color: var(--muted, #6b7280); }
/* lot 6 (marchés) : définitions en grille (compte prorata, sous-traitance, accord-cadre) */
.grille-def { display: grid; grid-template-columns: minmax(160px, max-content) 1fr; gap: 4px 16px; margin: 0; }
.grille-def dt { color: var(--ink-2); }
.grille-def dd { margin: 0; }
@media (max-width: 600px) { .grille-def { grid-template-columns: 1fr; } .grille-def dd { margin-bottom: 6px; } }

/* pièces du marché : passages repérés (0.8.5) */
details.passages { margin-top: 6px; }
details.passages > summary { font: 600 13px var(--display); padding: 2px 0; color: var(--territory); }
details.passages ul { margin: 4px 0 0; padding-left: 18px; }
details.passages li { margin: 0 0 8px; }
details.passages q { display: block; quotes: none; margin-top: 2px; color: var(--muted); }
details.passages mark { background: #FFF1B8; color: var(--navy); padding: 0 1px; }

/* 0.9.0 : onglets du module marchés et de la fiche d'un marché */
.onglets { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: end; justify-content: space-between;
  border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.onglets-liste { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; max-width: 100%; }
.onglets-liste a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px 9px; white-space: nowrap;
  font: 600 14.5px var(--display); color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent;
  margin-bottom: -1px; }
.onglets-liste a:hover { color: var(--navy); border-bottom-color: var(--line); }
.onglets-liste a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--cyan); }
.onglets-annexes { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-bottom: 10px; font-size: 13.5px; }
.onglets-annexes a, .onglets-annexes .lien { color: var(--ink-3); }
.onglets-annexes a[aria-current="page"] { color: var(--navy); font-weight: 600; }
.onglets-module { margin-bottom: 20px; }
.onglets-module .onglets-liste a { font-size: 15.5px; }
.onglets-lot { margin-top: -8px; }
.onglets .compte { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--ko-bg); color: var(--ko); font-size: 11.5px; font-weight: 800; }
button.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--mark); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; }
.fil { color: var(--ink-3); }
.fil a { color: var(--ink-2); }
.titre-lot { margin-bottom: 16px; }
.badge-statut { font-size: 12px; min-height: 28px; padding-inline: 12px; }
.filtre { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 12px; }
.filtre input[type="search"] { flex: 1 1 260px; max-width: 420px; }
.filtre label.small { display: inline-flex; gap: 6px; align-items: center; }
.imprime-seulement { display: none; }
@media print { .imprime-seulement { display: block; margin-bottom: 12px; } .onglets { display: none; } }

/* tableau de bord par marché */
.marches-jour { width: 100%; }
.marches-jour td { vertical-align: top; }
.marches-jour .cellule-lien { display: grid; gap: 2px; color: inherit; text-decoration: none; }
.marches-jour .cellule-lien:hover b, .marches-jour .cellule-lien:hover .muted { color: var(--mark); }
.marches-jour .chiffre { font: 600 22px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.marches-jour .chiffre.ko { color: var(--ko); }
.marches-jour .chiffre.zero { color: var(--ink-3); }
progress.jauge { appearance: none; -webkit-appearance: none; display: block; width: 100%; max-width: 160px; height: 6px;
  border: 0; border-radius: var(--r-pill); background: var(--line-2); overflow: hidden; color: var(--territory); }
progress.jauge::-webkit-progress-bar { background: var(--line-2); border-radius: var(--r-pill); }
progress.jauge::-webkit-progress-value { background: var(--territory); border-radius: var(--r-pill); }
progress.jauge::-moz-progress-bar { background: var(--territory); border-radius: var(--r-pill); }
progress.jauge.depassee::-webkit-progress-value { background: var(--ko); }
progress.jauge.depassee::-moz-progress-bar { background: var(--ko); }
.par-onglet { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.par-onglet a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.par-onglet a:hover { border-color: var(--territory); }
.par-onglet a .compte-0 { color: var(--ink-3); font-weight: 400; }
.par-onglet a .compte-n { color: var(--ko); }
.liste-sujets { list-style: none; margin: 0; padding: 0; display: grid; }
.liste-sujets li { display: grid; grid-template-columns: 140px 1fr auto; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line-2); align-items: baseline; }
.liste-sujets li:first-child { border-top: 0; }
@media (max-width: 640px) {
  .liste-sujets li { grid-template-columns: 1fr; }
  .marches-jour thead { display: none; }
  .marches-jour tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .marches-jour td { border: 0; padding: 0; }
  .marches-jour td:first-child { grid-column: 1 / -1; }
}
.bloc-avert { margin-bottom: 20px; }
.bloc-avert:empty { display: none; }
.liste-sujets .date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.somme { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau td.mono, .tableau td .mono, .echeancier td:first-child { white-space: nowrap; }

/* ======================================================================================================================
   0.9.1 : mise en page des documents imprimés ou enregistrés en PDF (bouton « Imprimer », Ctrl+P)
   En-tête avec le logo sur la première page, bandeau et numéro de page sur toutes les pages (cases de marge de la
   page, Chrome et Edge 131+ : elles remplacent l'en-tête et le pied de page du navigateur, adresse et date).
   ==================================================================================================================== */
.impression-entete { display: none; }
@page {
  size: A4; margin: 17mm 15mm 18mm;
  @top-left { content: "AUTONOMIA"; font: 700 7.5pt "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: .22em; color: #237E91; vertical-align: bottom; padding-bottom: 3mm; }
  @top-right { content: "Document de travail · aide à la décision"; font: 400 7.5pt "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #66717D; vertical-align: bottom; padding-bottom: 3mm; }
  @bottom-left { content: "Chaque constat est à vérifier sur les pièces du marché avant tout acte."; font: 400 7.5pt "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #66717D; vertical-align: top; padding-top: 3mm; }
  @bottom-right { content: "Page " counter(page) " sur " counter(pages); font: 600 7.5pt "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #07111F; vertical-align: top; padding-top: 3mm; }
}
@page :first { @top-left { content: none; } @top-right { content: none; } }

@media print {
  html, body { background: #fff !important; }
  body { font-size: 9.5pt; line-height: 1.45; color: #07111F; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main, main .wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; width: auto !important; }

  /* ce qui ne sert qu'à l'écran */
  .entete, .bandeau-test, .pied, .no-print, .avis, .onglets, .filtre, .choix-evt, button, .btn,
  .imprime-seulement, input[type="hidden"], input[type="file"], input[type="search"] { display: none !important; }
  input:not([type="radio"]):not([type="checkbox"]), select, textarea { border: 0 !important; border-bottom: .5pt solid #DCE5EB !important; border-radius: 0 !important;
    background: none !important; padding: 0 !important; min-height: 0 !important; font-size: 9pt !important; box-shadow: none !important;
    appearance: none !important; -webkit-appearance: none !important; }

  /* en-tête de la première page */
  .impression-entete { display: flex; align-items: center; justify-content: space-between; gap: 8mm;
    padding: 0 0 4mm; margin: 0 0 6mm; border-bottom: 1.2pt solid #3DE2D0; }
  .impression-entete img { height: 9mm; width: auto; }
  .impression-meta { display: grid; justify-items: end; gap: 1mm; font-size: 8pt; color: #66717D; text-align: right; }
  .impression-module { font: 700 8.5pt "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .14em;
    text-transform: uppercase; color: #237E91; }

  /* titres */
  .titre-page { display: block !important; margin: 0 0 5mm !important; }
  .fil, .eyebrow { font-size: 8pt !important; color: #66717D !important; }
  .fil a, .eyebrow a { color: #66717D !important; text-decoration: none !important; }
  h1 { font-size: 19pt !important; line-height: 1.15; margin: 1mm 0 2mm !important; letter-spacing: -.01em; }
  h2 { font-size: 12pt !important; margin: 0 0 2.5mm !important; padding-bottom: 1.2mm; border-bottom: .6pt solid #DCE5EB; }
  h3 { font-size: 10.5pt !important; margin: 0 0 1.5mm !important; }
  h2, h3, h4 { break-after: avoid; page-break-after: avoid; color: #07111F; }
  .small { font-size: 8.5pt !important; }
  p { orphans: 3; widows: 3; }

  /* liens : lisibles sur papier */
  a { color: #07111F !important; text-decoration: none !important; }
  .liste-sujets a, .tableau td a { color: #0E1D2F !important; font-weight: 500; }

  /* blocs */
  .carte { background: #fff !important; border: .6pt solid #DCE5EB !important; border-radius: 2.5mm !important;
    padding: 4mm 4.5mm !important; box-shadow: none !important; margin: 0 0 4mm !important; }
  .carte, .kpi, .constat, .par-onglet a, .liste-sujets li, .grille-def > *, tr { break-inside: avoid; page-break-inside: avoid; }
  section.carte { break-inside: auto; }
  .espace { margin-top: 4mm !important; }
  .pile, .pile-s { gap: 2.5mm !important; }
  .grille-2 { display: block !important; }
  .grille-2 > * { margin-bottom: 4mm !important; }
  .liste-alertes { font-size: 9pt !important; gap: 1.5mm !important; }
  .liste-alertes li { break-inside: avoid; padding: 1.2mm 0 !important; border-bottom: .4pt solid #E9EEF2; font-size: 9pt !important; }
  .liste-alertes li > * { font-size: inherit; }
  .note { background: #F3F7FA !important; border: 0 !important; border-left: 1.2pt solid #3DE2D0 !important;
    border-radius: 0 !important; padding: 2mm 3.5mm !important; font-size: 8.5pt !important; }
  .bloc-avert { margin-bottom: 4mm !important; }

  /* chiffres clés */
  .kpis { gap: 3mm !important; grid-template-columns: repeat(4, 1fr) !important; }
  .kpi { border: .6pt solid #DCE5EB !important; box-shadow: none !important; padding: 2.5mm 3mm !important; }
  .kpi b { font-size: 15pt !important; }
  .par-onglet { grid-template-columns: repeat(4, 1fr) !important; gap: 2mm !important; }
  .par-onglet a { padding: 2mm 3mm !important; font-size: 8.5pt !important; border: .6pt solid #DCE5EB !important; }

  /* listes de sujets et d'échéances */
  .liste-sujets li { grid-template-columns: 30mm 1fr 42mm !important; padding: 1.4mm 0 !important; gap: 1mm 4mm !important; }
  .liste-sujets li > :last-child { text-align: right; }

  /* tableaux */
  .defile { overflow: visible !important; }
  .tableau { width: 100% !important; font-size: 8.5pt !important; border-collapse: collapse; }
  .tableau thead { display: table-header-group; }
  .tableau th { font-size: 7pt !important; padding: 1.5mm 2mm !important; color: #66717D !important;
    border-bottom: .8pt solid #07111F !important; background: none !important; }
  .tableau td { padding: 1.6mm 2mm !important; border-bottom: .4pt solid #E9EEF2 !important; vertical-align: top; }
  .tableau tr.total td { border-top: .8pt solid #07111F !important; }
  .marches-jour .chiffre { font-size: 13pt !important; }

  /* pastilles : couleurs conservées */
  .badge { font-size: 7pt !important; padding: .4mm 1.8mm !important; min-height: 0 !important; border-width: .5pt !important; }
  progress.jauge { height: 1.6mm !important; max-width: 30mm !important; }

  /* constats : le texte de la règle est imprimé */
  .constat { border: .6pt solid #DCE5EB !important; border-radius: 2mm !important; padding: 3mm 3.5mm !important; }
  details { display: block !important; }
  details > summary { display: block !important; list-style: none !important; font-weight: 600; font-size: 8.5pt;
    color: #237E91; margin: 1.5mm 0 1mm; }
  details > summary::-webkit-details-marker { display: none; }
  blockquote { border-left: 1pt solid #DCE5EB !important; margin: 1mm 0 !important; padding: 0 0 0 3mm !important; font-size: 8.5pt !important; }
  .mono { font-size: 8pt !important; }
}
@media print {
  /* liens de navigation sans objet sur papier ; statut du marché conservé */
  .entre > a.small { display: none !important; }
  .titre-lot > .rang.no-print { display: flex !important; }
  .titre-lot > .rang.no-print > :not(.badge) { display: none !important; }
}
@media print {
  input[type="radio"], input[type="checkbox"] { width: 3mm; height: 3mm; margin: 0 1.5mm 0 0; accent-color: #07111F; }
  input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
}

/* 0.9.2 : « ? » et bulles d'explication */
.aide-q { display: inline-grid; place-items: center; width: 18px; height: 18px; margin: 0 0 0 6px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--territory);
  font: 700 11px/1 var(--body); vertical-align: 1px; cursor: pointer; flex: none; }
.aide-q:hover, .aide-q:focus-visible { border-color: var(--territory); background: var(--territory); color: #fff; }
.aide-bulle { width: min(460px, 92vw); max-height: 80vh; overflow: auto; margin: auto; padding: 16px 18px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  box-shadow: 0 18px 50px rgba(7, 17, 31, .22); font: 400 14px/1.5 var(--body); text-align: left; white-space: normal;
  letter-spacing: normal; text-transform: none; }
.aide-bulle::backdrop { background: rgba(7, 17, 31, .18); }
.aide-bulle p { margin: 0 0 8px; }
.aide-bulle ul { margin: 0 0 8px; padding-left: 18px; }
.aide-bulle a { color: var(--mark); }
.aide-tete { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 8px;
  font-family: var(--display); font-size: 15px; color: var(--navy); }
.aide-fermer { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0 2px; }
.aide-titre { margin-top: 10px !important; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.aide-note { font-size: 12px; color: var(--ink-3); }
.aide-bulle.ouvert-repli { display: block; position: fixed; inset: 0; z-index: 1000; }
@supports not selector(:popover-open) { .aide-bulle:not(.ouvert-repli) { display: none; } }
@media print { .aide-q, .aide-bulle { display: none !important; } }
/* 0.9.2 : sur téléphone, les en-têtes du tableau par marché sont masqués : leurs « ? » passent dans une légende */
.legende-mobile { display: none; }
@media (max-width: 640px) {
  .legende-mobile { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--ink-3); margin: 0 0 4px; }
  .legende-mobile span { display: inline-flex; align-items: center; color: var(--ink-2); font-weight: 600; }
}
@media print { .legende-mobile { display: none !important; } }

/* 0.9.3 : guidage (mise en place du marché, « Et maintenant ? ») */
.mise-en-place, .et-maintenant { border-left: 3px solid var(--cyan) !important; }
.mise-en-place progress.jauge { max-width: 260px; }
.etapes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.etapes li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.etapes .coche { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font: 700 12px/1 var(--body); border: 1px solid var(--line); color: var(--ink-3); background: var(--surface); }
.etapes li.fait { color: var(--ink-3); }
.etapes li.fait .coche { background: var(--ok-bg, #E6F6EF); border-color: transparent; color: var(--ok, #1E7F55); }
.etapes li.a-faire .coche { border-color: var(--territory); color: var(--territory); }

/* 0.9.5 : rubriques à la demande */
form.en-ligne { display: inline; }
.rubriques-masquees { margin: -12px 0 14px; }

/* 0.9.6 — audit d'ergonomie : une ancre ne se cache plus sous l'en-tête fixe ; l'élément visé est repéré */
html { scroll-padding-top: 96px; }
.constat:target, tr:target, li:target, section:target, article:target { animation: repere 2.6s ease-out 1; }
@keyframes repere { 0%, 35% { box-shadow: 0 0 0 4px var(--cyan); background-color: #F1FCFA; } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .constat:target, tr:target, li:target, section:target, article:target { animation: none; outline: 3px solid var(--cyan); } }
details.avert > summary { cursor: pointer; list-style-position: inside; }
details.avert[open] > summary { margin-bottom: 6px; }
.cherche-evt { min-width: 220px; }
details.pourquoi { margin-top: 4px; }
details.pourquoi summary { cursor: pointer; color: var(--mark); }
details.pourquoi ul { margin: 4px 0 0; padding-left: 18px; }
.saisir-ech { margin: 6px 0 2px; }

/* 0.9.6 — Ma file : cinq gestes, une ligne par sujet, rien ne sort sans trace */
.segments { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 12px; }
.segment { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface);
  border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; min-height: 44px; }
.segment:hover { border-color: var(--mark); color: var(--ink); }
.segment[aria-current="page"] { border-color: var(--ink); background: #F4FBFA; }
.segment b { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; }
.seg-nom { display: flex; align-items: center; gap: 7px; font: 700 13px var(--display); }
.seg-aide { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.segments i, .file-section h2 i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--line); }
.seg-faire i { background: var(--navy); } .seg-relancer i { background: var(--ko); } .seg-regulariser i { background: #D9A21B; }
.seg-verifier i { background: var(--territory); } .seg-surveiller i { background: #9FB3C2; }
.filtres-file { margin-bottom: 4px; }
.filtres-file .case { display: inline-flex; gap: 6px; align-items: center; }
.file-section h2 { display: flex; align-items: center; gap: 9px; }
.file-liste { list-style: none; margin: 8px 0 0; padding: 0; }
.file-liste > li { border-top: 1px solid var(--line-2); }
.sujet > summary { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 300px); gap: 14px; align-items: center;
  padding: 11px 4px; cursor: pointer; list-style: none; min-height: 44px; }
.sujet > summary::-webkit-details-marker { display: none; }
.sujet > summary:hover { background: #F8FAFB; }
.sujet[open] > summary { background: #F4FBFA; }
.s-date { display: flex; flex-direction: column; gap: 2px; }
.s-date b { font: 700 14px var(--display); } .s-date b.ko { color: var(--ko); } .s-date b.attente { color: var(--warn); } .s-date b.ap { color: var(--ap); }
.s-titre { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s-titre b { font: 600 15.5px/1.3 var(--display); }
.s-cons { color: var(--ink-2); line-height: 1.4; }
.s-corps { padding: 4px 0 16px 110px; display: grid; gap: 12px; }
.trois { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.trois > div { background: var(--mist); border-radius: var(--r-xs); padding: 10px 12px; }
.trois .eyebrow { display: block; margin-bottom: 4px; }
.gestes form, .gestes-2 form { margin: 0; }
.gestes-2 input[type=text] { min-width: 200px; }
li.reporte { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 4px; }
@media (max-width: 759px) {
  .sujet > summary { grid-template-columns: 1fr; gap: 4px; }
  .s-corps { padding-left: 0; }
  .trois { grid-template-columns: 1fr; }
  li.reporte { grid-template-columns: 1fr; }
}

/* 0.9.6 — prise en main et lexique */
.bienvenue-hero { background: var(--navy); color: #fff; border-radius: var(--r-md); padding: 30px 32px; margin-top: 18px; display: grid; gap: 14px; }
.bienvenue-hero h1 { color: #fff; max-width: 860px; }
.bienvenue-hero .eyebrow { color: var(--cyan); }
.bienvenue-hero .grand { color: #C9D3DC; max-width: 860px; }
.principe { list-style: none; counter-reset: p; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.principe li { counter-increment: p; display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; padding: 14px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .06); }
.principe li::before { content: counter(p); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--cyan); color: var(--navy); font: 800 15px var(--display); display: flex; align-items: center; justify-content: center; }
.principe li span { font-size: 14px; color: #C9D3DC; line-height: 1.45; }
.chemins { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.chemin { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.chemin .small { flex: 1; }
.parcours { list-style: none; margin: 4px 0 0; padding: 0; }
.parcours li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line-2); }
.parcours .coche { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font: 800 13px var(--display); color: var(--ink-3); }
.parcours li.fait .coche { background: var(--territory); border-color: var(--territory); color: #fff; }
.parcours li.fait b { color: var(--ink-3); text-decoration: line-through; }
.legende-gestes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.legende-gestes li { display: flex; gap: 10px; align-items: flex-start; }
.legende-gestes i { flex: 0 0 12px; height: 12px; margin-top: 4px; border-radius: 3px; background: var(--line); }
.legende-gestes .seg-faire i { background: var(--navy); } .legende-gestes .seg-relancer i { background: var(--ko); }
.legende-gestes .seg-regulariser i { background: #D9A21B; } .legende-gestes .seg-verifier i { background: var(--territory); }
.legende-gestes .seg-surveiller i { background: #9FB3C2; }
.lexique { list-style: none; margin: 0; padding: 0; }
.lexique li { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.lexique li b { font: 600 16px var(--display); }
.filtres-file select { width: auto; max-width: min(440px, 100%); min-width: 0; }
.file-section.seg-faire h2 i, .segment.seg-faire i { background: var(--navy); }
.file-section.seg-relancer h2 i, .segment.seg-relancer i { background: var(--ko); }
.file-section.seg-regulariser h2 i, .segment.seg-regulariser i { background: #D9A21B; }
.file-section.seg-verifier h2 i, .segment.seg-verifier i { background: var(--territory); }
.file-section.seg-surveiller h2 i, .segment.seg-surveiller i { background: #9FB3C2; }

/* 0.9.7 — fiche de paramétrage en étapes */
.etapes-param { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 14px 0 6px; }
.etapes-param ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.etape-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--surface); font: 600 14px var(--display); color: var(--ink); cursor: pointer; }
.etape-btn .num { width: 24px; height: 24px; border-radius: 50%; background: var(--mist); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.etape-btn[aria-current="step"] { border-color: var(--ink); background: #F4FBFA; }
.etape-btn[aria-current="step"] .num { background: var(--navy); color: var(--cyan); }
.parcours.moment li.prochain .coche { border-color: var(--ink); color: var(--ink); }
.parcours.moment li.prochain b { color: var(--ink); }

/* 0.9.8 : recherche, retour de page, notes, dossier, synthèse */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.onglets-module { flex-wrap: wrap; }
.recherche-module input { max-width: min(220px, 100%); padding: .3rem .5rem; font-size: .9rem; }
.retour-page { margin: .5rem 0 0; text-align: right; }
.retour-page form { text-align: left; max-width: 520px; margin-left: auto; }
.notes-marche { list-style: none; padding: 0; display: grid; gap: .4rem; }
.notes-marche li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; border-left: 3px solid var(--bordure, #ccc); padding-left: .6rem; }
.recit { display: grid; gap: .5rem; padding-left: 0; list-style: none; }
.recit li { display: grid; grid-template-columns: 8.5rem 1fr; gap: .8rem; }
.recit li.note-recit { opacity: .9; }
@media (max-width: 560px) { .recit li { grid-template-columns: 1fr; gap: 0; } }
@media print { .retour-page, .onglets-module { display: none !important; } .synthese-op { break-inside: avoid; } }
.ko:not(.note):not(.badge) { color: var(--ko); }

/* ---------------------------------------------------------------- 0.9.9 : arborescence v2 */
.voyants { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.voyant { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; background: #fff; }
.voyant .pastille, .pastille-mini { display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--line); }
.voyant .pastille { width: 1rem; height: 1rem; margin-top: .2rem; }
.pastille-mini { width: .8rem; height: .8rem; margin-right: .2rem; vertical-align: middle; }
.v-vert .pastille, .pastille-mini.v-vert { background: var(--academy); }
.v-orange .pastille, .pastille-mini.v-orange { background: #D9A400; }
.v-rouge .pastille, .pastille-mini.v-rouge { background: var(--ko); }
.voyant.v-rouge { border-color: #F1C9C0; background: var(--ko-bg); }
.voyant.v-orange { border-color: #EBDDB0; background: var(--warn-bg); }
.menu-lot { display: flex; flex-wrap: wrap; gap: .3rem .4rem; align-items: center; margin: .2rem 0 1rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--mist); }
.menu-lot a { text-decoration: none; padding: .25rem .5rem; border-radius: 6px; font-size: .88rem; color: inherit; border: 1px solid transparent; }
.menu-lot a:hover { border-color: var(--line); background: #fff; }
.menu-lot a[aria-current] { background: #fff; border-color: var(--territory); font-weight: 600; }
.menu-lot .num, .rubrique-carte .num, .etapes-assistant .num { font-family: ui-monospace, monospace; font-size: .78rem; color: var(--territory); }
.menu-groupe { width: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: .3rem; }
.grille-rubriques { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.rubrique-carte { display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem; text-decoration: none; color: inherit; background: #fff; }
.rubrique-carte:hover { border-color: var(--territory); }
.gantt { max-width: 100%; height: auto; font-family: inherit; }
.gantt .g-lib { font-size: 11px; fill: #07111F; }
.gantt .g-mois { font-size: 10px; fill: #66717D; }
.gantt .g-grille { stroke: #DCE5EB; stroke-width: 1; }
.gantt .g-barre { fill: #237E91; }
.gantt .g-barre.g-retard { fill: #B3261E; }
.gantt .g-fin { stroke: #07111F; stroke-width: 2; }
.gantt .g-auj { stroke: #3DE2D0; stroke-width: 2; stroke-dasharray: 4 3; }
.gantt .g-vide { font-size: 10px; fill: #66717D; font-style: italic; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.kanban-col { background: var(--mist); border: 1px solid var(--line); border-radius: 10px; padding: .5rem; display: flex; flex-direction: column; gap: .4rem; min-height: 4rem; }
.kanban-col h4 { margin: 0 0 .2rem; font-size: .9rem; }
.kanban-carte { display: flex; flex-direction: column; gap: .1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; text-decoration: none; color: inherit; }
.kanban-carte.retard { border-color: var(--ko); }
.etapes-assistant { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.etapes-assistant li { border: 1px solid var(--line); border-radius: 999px; padding: .2rem .65rem; font-size: .85rem; background: #fff; }
.etapes-assistant li a { text-decoration: none; color: inherit; }
.etapes-assistant li[aria-current] { border-color: var(--territory); font-weight: 600; }
.etapes-assistant li.faite { background: var(--ok-bg); }
dialog.popup-derog { position: static; display: block; margin: .5rem 0; border: 2px solid #D9A400; border-radius: 10px; background: var(--warn-bg); padding: .6rem .75rem; max-width: 40rem; color: inherit; }
.champ.nouvelle { outline: 2px solid #D9A400; outline-offset: 4px; border-radius: 6px; }
.quatre .sens { margin: .2rem 0 0; padding-left: 1.1rem; }
.question { font-size: 1.05rem; margin: .2rem 0 .4rem; }
.regles-applicables { margin: 0 0 .4rem; padding-left: 1.1rem; }
tr.total td { border-top: 2px solid var(--line); }
progress { width: 7rem; height: .7rem; vertical-align: middle; accent-color: #237E91; }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }
@media print { .menu-lot, .etapes-assistant { display: none; } }
.pile-s > .defile, .pile > .defile, .carte > .defile { min-width: 0; max-width: 100%; }
.defile { position: relative; }   /* 0.9.9 : les textes pour lecteur d écran (.sr) restent dans la zone qui défile */
.onglets-module .onglets-annexes a.btn { color: var(--navy); }

/* ---------------------------------------------------------------- 0.10.0 : écrans de gestion compacts */
.lot-tete { margin: .2rem 0 .6rem; }
.lot-tete h1 { font-size: 1.45rem; line-height: 1.2; margin: .1rem 0; }
.lot-tete .fil { margin: 0; }
.lot-tete p { margin: .1rem 0; }
.lot-grille { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 1rem; align-items: start; }
.lot-grille.horizontal { display: block; }
.lot-grille .menu-lot { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .05rem; position: sticky; top: .5rem; margin: 0; padding: .4rem; }
.lot-grille.horizontal .menu-lot { flex-direction: row; flex-wrap: wrap; position: static; }
.lot-grille .menu-lot a { padding: .18rem .45rem; font-size: .84rem; line-height: 1.3; }
.lot-grille .menu-groupe { margin-top: .4rem; }
.lot-contenu { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.bloc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.bloc h2, .bloc h3, .rub-tete h2 { font-size: 1.02rem; margin: 0 0 .4rem; }
.bloc > summary { cursor: pointer; }
.bloc details, details.bloc > * + * { margin-top: .4rem; }
.rub-tete { align-items: baseline; }
.voyants { gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.voyant { padding: .35rem .55rem; gap: .45rem; font-size: .86rem; line-height: 1.35; }
.voyant .pastille { width: .75rem; height: .75rem; margin-top: .25rem; }
.voyant-texte { display: flex; flex-direction: column; }
.voyant .fait { color: var(--ink); }
.voyant .raison { color: var(--ink-2); font-size: .82rem; }
.taches { list-style: none; margin: 0; padding: 0; }
.tache { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .3rem .2rem; border-bottom: 1px solid var(--line-2); font-size: .88rem; }
.tache:last-child { border-bottom: 0; }
.tache.t-ko { box-shadow: inset 3px 0 0 var(--ko); }
.tache.t-attente { box-shadow: inset 3px 0 0 #D9A400; }
.t-date { font-family: var(--mono); font-size: .78rem; padding-left: .3rem; }
.t-action { text-align: right; }
.registre { list-style: none; margin: 0; padding: 0; columns: 2 22rem; font-size: .88rem; }
.registre li { break-inside: avoid; padding: .12rem 0; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .4rem; margin: 0 0 .5rem; }
.chiffres div { background: var(--mist); border-radius: 8px; padding: .3rem .5rem; }
.chiffres dt { font-size: .75rem; color: var(--muted); }
.chiffres dd { margin: 0; }
.modale { display: none; position: fixed; inset: 0; background: rgba(7, 17, 31, .45); z-index: 50; align-items: flex-start; justify-content: center; padding: 8vh 1rem 1rem; }
.modale:target { display: flex; }
.modale-boite { background: #fff; border-radius: 12px; padding: 1rem 1.1rem; width: min(34rem, 100%); max-height: 84vh; overflow: auto; box-shadow: var(--ombre-forte); }
.modale-boite h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.champ.importe { outline: 2px solid var(--territory); outline-offset: 3px; border-radius: 6px; }
.importe-bandeau { border-left: 3px solid var(--territory); }
table.lots td { vertical-align: top; }
.lien.small { font-size: .82rem; }
@media (max-width: 760px) {
  .lot-grille { grid-template-columns: 1fr; }
  .lot-grille .menu-lot { position: static; flex-direction: row; flex-wrap: wrap; }
  .tache { grid-template-columns: 1fr; }
  .t-action { text-align: left; }
}
.bloc select { max-width: 24rem; }
.onglets-module .retour-page { position: relative; margin: 0; }
.onglets-module .retour-page summary { font-size: .78rem; color: var(--muted); }
.onglets-module .retour-page form { position: absolute; right: 0; top: 1.6rem; z-index: 20; background: #fff; width: 22rem; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--ombre); }
.onglets-module { margin-bottom: .4rem; }
.bloc { margin-top: .6rem; } .lot-contenu > .bloc, .lot-contenu > details.bloc { margin-top: 0; }

/* ---------------------------------------------------------------- 0.11.0 : onglets, tableaux, statuts */
.onglets-lot2 { display: flex; flex-wrap: wrap; gap: .2rem; border-bottom: 2px solid var(--line); margin: .3rem 0 0; }
.onglets-lot2 a { text-decoration: none; color: var(--ink-2); padding: .4rem .7rem; border-radius: 8px 8px 0 0; font-size: .92rem; border: 1px solid transparent; border-bottom: 0; }
.onglets-lot2 a:hover { background: #fff; }
.onglets-lot2 a[aria-current] { background: #fff; border-color: var(--line); color: var(--ink); font-weight: 600; margin-bottom: -2px; border-bottom: 2px solid #fff; }
.onglets-lot2 a.param { margin-left: auto; }
.onglets-lot2 .compte { background: var(--ko); color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .72rem; }
.menu-m { display: flex; flex-wrap: wrap; gap: .1rem .8rem; margin: .35rem 0 .6rem; }
.menu-m a { color: var(--muted); text-decoration: none; }
.menu-m a:hover, .menu-m a[aria-current] { color: var(--ink); text-decoration: underline; }
.actions { margin-bottom: .5rem; align-items: center; }
.actions input[type=file] { max-width: 15rem; font-size: .8rem; }
table.elements td, table.elements th { padding: .3rem .45rem; font-size: .88rem; }
table.elements tr.groupe th { text-align: left; background: var(--mist); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
table.elements tr.g-traiter td:first-child { box-shadow: inset 3px 0 0 var(--ko); }
table.elements tr.g-fini { color: var(--ink-2); }
.statut-form { display: inline-flex; align-items: center; gap: .2rem; margin: 0; }
select.st, a.st { font-size: .8rem; padding: .1rem .35rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: inherit; }
.st.st-traiter { background: var(--ko-bg); border-color: #F1C9C0; color: var(--ko); font-weight: 600; }
.st.st-cours { background: var(--warn-bg); border-color: #EBDDB0; color: var(--warn); }
.st.st-fini { background: var(--ok-bg); border-color: #BFE3DC; color: var(--academy); }
.fiche-tete { margin: .2rem 0 .4rem; align-items: flex-end; }
.fiche-tete h2 { margin: 0; font-size: 1.15rem; }
.fiche-tete p { margin: 0; }
.actions select { max-width: 19rem; } .actions .rang-s { flex-wrap: nowrap; }

/* ---------------------------------------------------------------- 0.12.0 : coque du lot */
.bandeau-lot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 3fr) auto; gap: .8rem 1.2rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .9rem; margin: .4rem 0 .7rem;
  position: sticky; top: 0; z-index: 5; box-shadow: var(--ombre); }
.bandeau-lot h1 { font-size: 1.25rem; letter-spacing: -.02em; }
.bandeau-lot .fil, .bandeau-lot .bl-titre p { margin: 0; }
.bl-chiffres { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.bl-chiffres div { border-left: 1px solid var(--line-2); padding-left: .55rem; min-width: 0; }
.bl-chiffres dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bl-chiffres dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: .95rem; line-height: 1.25; }
.bl-chiffres small { font-weight: 400; color: var(--muted); }
.bl-chiffres .ecart { font-size: .75rem; color: var(--warn); background: var(--warn-bg); border-radius: var(--r-pill); padding: 0 .35rem; }
.bl-recherche input { width: 11rem; padding: .3rem .55rem; }
.coque { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 1rem; align-items: start; }
.coque-menu { position: sticky; top: 6.4rem; display: flex; flex-direction: column; gap: 1px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem; font-size: .88rem; max-height: calc(100vh - 7rem); overflow: auto; }
.coque-menu a { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .3rem .5rem;
  border-radius: var(--r-xs); color: var(--ink); text-decoration: none; }
.coque-menu a:hover { background: var(--mist); }
.coque-menu a[aria-current] { background: var(--navy); color: var(--white); }
.coque-menu a.cm-m { font-size: .82rem; color: var(--ink-2); }
.coque-menu a[aria-current].cm-m { color: var(--white); }
.cm-groupe { display: block; margin: .6rem .5rem .15rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; cursor: default; }
.cm-livrables summary { cursor: pointer; list-style: none; }
.cm-livrables summary::-webkit-details-marker { display: none; }
.coque-menu .compte { background: var(--ko); color: var(--white); border-radius: var(--r-pill); font-size: .72rem; padding: 0 .45rem; font-weight: 600; }
.coque-menu .coche { color: var(--academy); font-weight: 700; }
.coque-menu a[aria-current] .coche { color: var(--cyan); }
.coque-contenu { min-width: 0; }
.coque-contenu > .bloc:first-child, .coque-contenu > h2:first-child { margin-top: 0; }
.titre-onglet { font-size: 1.2rem; margin: 0 0 .5rem; }
/* frise du cycle */
.frise { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 0; margin: 0 0 .8rem; padding: 0; counter-reset: fr; }
.frise li { position: relative; padding: .45rem .5rem .4rem 1.6rem; font-size: .8rem; border-top: 3px solid var(--line); counter-increment: fr; }
.frise li::before { content: counter(fr); position: absolute; left: .2rem; top: .4rem; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--line); color: var(--ink-2); font-size: .68rem; display: grid; place-items: center; font-weight: 700; }
.frise li b { display: block; font-weight: 600; line-height: 1.2; }
.frise li span { color: var(--muted); }
.frise .fr-fait { border-top-color: var(--academy); }
.frise .fr-fait::before { content: "✓"; background: var(--academy); color: var(--white); }
.frise .fr-courante { border-top-color: var(--cyan); background: var(--surface); }
.frise .fr-courante::before { background: var(--navy); color: var(--cyan); }
/* accueil du lot */
.accueil-grille { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(16rem, 1fr); gap: .9rem; align-items: start; }
.accueil-grille > .bloc { margin: 0; }
.t-groupe { font-size: .9rem; margin: .7rem 0 .25rem; }
.t-groupe:first-of-type { margin-top: .2rem; }
.livrables { list-style: none; margin: 0 0 .6rem; padding: 0; }
.livrables li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 .5rem; padding: .35rem 0; border-bottom: 1px solid var(--line-2); font-size: .88rem; }
.livrables li .small { grid-column: 1; }
.livrables li .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
h2.espace { margin-top: .8rem; font-size: 1rem; }
/* qui agit */
.qui { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .03em; border-radius: var(--r-pill); padding: .02rem .45rem; vertical-align: 1px; white-space: nowrap; }
.qui-moi { background: var(--navy); color: var(--cyan); }
.qui-moe { background: var(--ap-bg); color: var(--territory); border: 1px solid #C3E1E8; }
.qui-tit { background: var(--build); color: #6B5300; border: 1px solid #E8DDBF; }
/* circuit de signature */
.circuit { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: .2rem 0 .5rem; padding: 0; font-size: .82rem; }
.circuit li { padding: .15rem .6rem; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); }
.circuit li.fait { background: var(--ok-bg); border-color: #BFE3DC; color: var(--academy); }
/* lien d'omission : le champ visé est mis en évidence */
[id^="ch-"] { scroll-margin-top: 7.5rem; }
[id^="ch-"]:target { outline: 3px solid var(--cyan); outline-offset: 4px; border-radius: var(--r-xs); background: #EFFFFC; }
p.vide { padding: .8rem; margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 980px) {
  .bandeau-lot { grid-template-columns: 1fr; position: static; }
  .bl-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coque { grid-template-columns: 1fr; }
  .coque-menu { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .cm-groupe { width: 100%; }
  .accueil-grille { grid-template-columns: 1fr; }
}
@media print { .coque { display: block; } .bandeau-lot { position: static; box-shadow: none; } }
.accueil-grille > *, .coque > * { min-width: 0; }
.tache .t-quoi { overflow-wrap: anywhere; }
.lecture table.tableau { display: block; overflow-x: auto; }
table.elements th { white-space: normal; font-size: .72rem; vertical-align: bottom; }
.coque-contenu .actions select { max-width: 16rem; }
.coque-contenu .actions input[type=file] { max-width: 15rem; font-size: .82rem; }
.accueil-grille .tache { grid-template-columns: auto minmax(0, 1fr) auto; }
.accueil-grille .t-date:empty { display: none; }
.accueil-grille .tache:has(.t-date:empty) { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------------------------------------------------------------- 0.13.0 : page plus large, couleurs claires, séparateurs */
.wrap:has(.onglets-module) { max-width: 1480px; }
.bloc > h2:first-child, .bloc > h3:first-child, .bloc > .entre:first-child {
  background: #F2F7FA; margin: -.6rem -.8rem .55rem; padding: .5rem .8rem; border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0; }
.bloc > .entre:first-child h2, .bloc > .entre:first-child h3 { margin: 0; }
table.tableau tbody tr:nth-child(even) > td { background: #FAFCFD; }
table.tableau td { border-bottom: 1px solid var(--line-2); }
/* signaux : rouge = non-conformité, jaune = vigilance */
.sig-tag { display: inline-block; font: 700 .7rem/1.5 var(--display); letter-spacing: .02em; border-radius: var(--r-pill); padding: 0 .5rem; white-space: nowrap; border: 1px solid transparent; }
.sig-tag.sig-rouge, .sig-rouge > .sig-tag { background: #FDECEA; color: #A3271B; border-color: #F3C3BC; }
.sig-tag.sig-jaune, .sig-jaune > .sig-tag { background: #FFF6D6; color: #7A5B00; border-color: #F0DE9A; }
.sig-tag.sig-vert { background: var(--ok-bg); color: var(--academy); border-color: #BFE3DC; }
.sig-gris > .sig-tag { background: var(--mist); color: var(--muted); border-color: var(--line); }
.signaux-resume { display: flex; gap: .4rem; margin: .4rem 0; }
.signaux-resume .sig-tag { font-size: .85rem; padding: .15rem .7rem; }
ul.signaux { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.signal { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr) auto; gap: .2rem .6rem; align-items: start; padding: .45rem .6rem; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.signal:last-child { border-bottom: 0; }
.signal.sig-rouge { box-shadow: inset 3px 0 0 #D2463A; }
.signal.sig-jaune { box-shadow: inset 3px 0 0 #E2B400; }
.sig-texte { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sig-fait { color: var(--ink-2); }
.sig-valeurs { font-size: .8rem; color: var(--muted); }
.sig-plus summary { cursor: pointer; color: var(--territory); }
.sig-plus[open] { grid-column: 1 / -1; background: var(--mist); border-radius: 8px; padding: .4rem .6rem; }
/* opération : à traiter, lot par lot */
.a-faire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: .6rem 0; }
.af-col { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.af-col h2 { font-size: 1rem; margin: 0; padding: .5rem .8rem; background: #F2F7FA; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.af-delais h2 { background: #EEF6FB; } .af-montants h2 { background: #F0F8F4; } .af-formalisme h2 { background: #F6F3FB; }
.af-total { background: #FFF6D6; color: #7A5B00; border: 1px solid #F0DE9A; border-radius: var(--r-pill); font-size: .8rem; padding: 0 .55rem; }
.af-ok { color: var(--academy); }
.af-fait { margin: 0; padding: .45rem .8rem; font-size: .88rem; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.af-col ul { list-style: none; margin: 0; padding: 0; }
.af-col li a { display: flex; gap: .6rem; align-items: center; padding: .4rem .8rem; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-size: .88rem; line-height: 1.3; }
.af-col li:last-child a { border-bottom: 0; }
.af-col li a:hover { background: var(--mist); }
.af-n { flex: 0 0 auto; min-width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--cyan); font-weight: 700; }
.af-col > .small { padding: .45rem .8rem; margin: 0; }
/* voyants : plus de fond rouge ni orange, une pastille seulement */
.voyant.v-rouge, .voyant.v-orange { background: #fff; border-color: var(--line); }
.v-rouge .pastille, .pastille-mini.v-rouge { background: #E2B400; }
@media (max-width: 860px) { .a-faire { grid-template-columns: 1fr; } .signal { grid-template-columns: 1fr; } }
/* frise : action de l'agent ; parcours de la réception */
.frise-zone { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .2rem .5rem .4rem; margin-bottom: .8rem; }
.frise-zone .frise { margin: 0; }
.frise-action { display: flex; gap: .6rem; align-items: center; margin: .35rem .3rem 0; padding-top: .35rem; border-top: 1px dashed var(--line); }
.frise .fr-courante + .fr-courante { border-left: 1px solid var(--line); }
.parcours { background: #FBFDFE; }
.etapes-rec { list-style: none; margin: 0; padding: 0; }
.etapes-rec li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line-2); }
.etapes-rec li:last-child { border-bottom: 0; }
.er-n { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-weight: 700; font-size: .85rem; }
.etapes-rec li.fait .er-n { background: var(--academy); color: #fff; }
.etapes-rec li.sans-objet { opacity: .55; }
.er-action { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.er-action input[type=file] { max-width: 13rem; font-size: .8rem; }
.hypothese { margin: .5rem 0 0; padding: .5rem .7rem; background: #EEF6FB; border-left: 3px solid var(--territory); border-radius: 6px; font-size: .9rem; }
.mini-rec { margin-top: .25rem; }
.mini-rec summary { cursor: pointer; color: var(--territory); }
.mini-rec input[type=file] { max-width: 11rem; font-size: .78rem; }
@media (max-width: 860px) { .etapes-rec li { grid-template-columns: 2rem 1fr; } .er-action { grid-column: 2; } }
.sig-tag small.sig-nature { display: block; font-weight: 400; font-size: .68rem; letter-spacing: 0; }
.signal > .sig-tag { border-radius: 8px; text-align: center; white-space: normal; }
.bandeau-lot { position: static; }
.coque-menu { top: 5.2rem; max-height: calc(100vh - 6rem); }
.coque-contenu .titre-page h1 { font-size: 1.5rem; }
/* paramétrage : groupes séparés, en-têtes clairs */
.coque-contenu fieldset[data-etape] { border: 1px solid var(--line); border-radius: 10px; padding: 0 .9rem .8rem; background: #fff; margin: 0 0 .7rem; }
.coque-contenu fieldset[data-etape] > legend.titre-section, .coque-contenu fieldset[data-etape] > legend {
  float: left; width: calc(100% + 1.8rem); margin: 0 -.9rem .6rem; padding: .45rem .9rem; background: #F2F7FA;
  border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.coque-contenu fieldset[data-etape] > legend + * { clear: both; }
.coque-contenu .champs > .champ { padding-bottom: .55rem; border-bottom: 1px dashed var(--line-2); }
.coque-contenu details.groupe-params { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: .5rem; }
.coque-contenu details.groupe-params > summary { background: #F7FAFC; padding: .45rem .8rem; border-radius: 10px; }
.coque-contenu details.groupe-params[open] > summary { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.coque-contenu .carte { padding: 18px 20px; border-radius: 12px; box-shadow: none; }

/* ---------------------------------------------------------------- 0.14.0 : synoptique de l'ordre de service */
svg.syn { width: 100%; height: auto; max-width: 980px; display: block; margin: 0 auto; font-family: var(--text); }
.syn-acteur { font: 600 11px var(--display); fill: #3D4955; text-decoration: underline; }
.syn-couloir { fill: #F7FAFC; }
.syn-article { fill: #E6E9EC; }
.syn-t { font-size: 11px; fill: #07111F; }
.syn-tb { font-weight: 700; }
.syn-n rect { stroke: #3D4955; stroke-width: 1.2; }
.syn-blanc rect { fill: #FFFFFF; }
.syn-vert rect { fill: #5DFFA6; stroke: #1F9D5A; }
.syn-rouge rect { fill: #FFB9B9; stroke: #C0392B; }
.syn-jaune rect { fill: #FFFF99; stroke: #B59A00; }
.syn-info rect { fill: #FFFFFF; stroke: #8A96A3; stroke-dasharray: 3 2; }
.syn-lien { fill: none; stroke: #8A96A3; stroke-width: 1.4; }
.syn-lien.syn-pris { stroke: #07111F; stroke-width: 2.6; }
.syn-lien.syn-mort { stroke: #D5DCE2; }
.syn-etiq { font: 700 10px var(--display); fill: #3D4955; }
/* états (sur une fiche d'OS) */
.syn-e-sans_objet { opacity: .28; }
.syn-e-a_venir rect { fill-opacity: .35; stroke-dasharray: 4 3; }
.syn-e-attente rect { stroke: #B59A00; stroke-width: 2.4; stroke-dasharray: 5 3; }
.syn-e-alerte rect { stroke: #C0392B; stroke-width: 3; }
.syn-e-fait rect { stroke-width: 2; }
.syn-e-ici rect { stroke: #07111F; stroke-width: 3.5; filter: drop-shadow(0 0 6px rgba(61, 226, 208, .9)); }
.syn-ici { font: 700 11px var(--display); fill: #237E91; }
.syn-coche { fill: #18756D; }
.syn-coche-t { fill: none; stroke: #fff; stroke-width: 2; }
.syn-n a:hover rect { stroke: #237E91; stroke-width: 3; }
.syn-legende { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; margin: .4rem 0 .6rem; }
.syn-legende span::before { content: ""; display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; vertical-align: -2px; margin-right: .35rem; border: 1px solid #3D4955; }
.syn-legende .l-vert::before { background: #5DFFA6; } .syn-legende .l-rouge::before { background: #FFB9B9; }
.syn-legende .l-jaune::before { background: #FFFF99; } .syn-legende .l-ici::before { background: #fff; border: 3px solid #07111F; box-shadow: 0 0 5px #3DE2D0; }
.syn-legende .l-fait::before { background: #18756D; border-radius: 50%; }
.syn-grille { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 1fr); gap: .8rem; align-items: start; }
.preco { list-style: none; margin: 0 0 .6rem; padding: 0; }
.preco li { padding: .45rem .6rem; border-radius: 8px; margin-bottom: .35rem; font-size: .9rem; }
.preco li.rouge { background: #FDECEA; border-left: 4px solid #D2463A; }
.preco li.jaune { background: #FFF8D6; border-left: 4px solid #E2B400; }
.conseq { list-style: none; margin: 0; padding: 0; }
.conseq li { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .65rem; margin-bottom: .45rem; background: #fff; }
.conseq li.c-fait { background: #F1FBF7; border-color: #BFE3DC; }
.conseq li.n-jaune { border-left: 4px solid #E2B400; } .conseq li.n-rouge { border-left: 4px solid #D2463A; }
.conseq .c-tete { display: flex; justify-content: space-between; gap: .5rem; align-items: center; font-weight: 700; font-size: .92rem; }
.conseq .c-texte { font-size: .85rem; color: var(--ink-2); margin: .2rem 0 .35rem; }
.etape-os { display: inline-block; font: 700 .68rem/1.5 var(--display); border-radius: var(--r-pill); padding: 0 .45rem; margin-top: .15rem; border: 1px solid; }
.etape-os.e-vert { background: #E3FBEF; color: #146C3E; border-color: #9EE6BE; }
.etape-os.e-rouge { background: #FDECEA; color: #A3271B; border-color: #F3C3BC; }
.etape-os.e-jaune { background: #FFF8D6; color: #7A5B00; border-color: #F0DE9A; }
.syn-aide { columns: 2 22rem; font-size: .85rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.syn-aide li { break-inside: avoid; margin-bottom: .4rem; }
@media (max-width: 980px) { .syn-grille { grid-template-columns: 1fr; } }
.syn-pas { margin: 0; padding-left: 1.3rem; font-size: .88rem; }
.syn-pas li { margin-bottom: .45rem; padding-left: .3rem; border-left: 4px solid var(--line); }
.syn-pas li.c-vert { border-left-color: #5DFFA6; } .syn-pas li.c-rouge { border-left-color: #FFB9B9; } .syn-pas li.c-jaune { border-left-color: #E8E066; }
#parcours-os h4 { margin: .2rem 0 .4rem; font-size: .95rem; }
a.etape-os { text-decoration: none; }
.syn-fiche svg.syn { max-width: 1060px; }
.syn-cote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.syn-cote .conseq { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.syn-cote .conseq li { margin: 0; }
@media (max-width: 980px) { .syn-cote { grid-template-columns: 1fr; } }
/* 0.14.1 : étiquettes du synoptique lisibles par-dessus les traits (halo blanc) */
.syn-etiq, .syn-ici, .syn-acteur { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.syn-couloir + .syn-acteur { stroke: #F7FAFC; }
/* état d'acompte 12.2.1 */
.etat-1221 h2 { font-size: 1.15rem; }
table.e1221 { width: 100%; font-size: .95rem; }
table.e1221 th.lettre, table.e1221 td.lettre { width: 3.2rem; text-align: center; font: 700 1rem var(--display); color: var(--territory); }
table.e1221 td.plus { color: #146C3E; font-weight: 600; white-space: nowrap; }
table.e1221 td.moins { color: #A3271B; font-weight: 600; white-space: nowrap; }
table.e1221 th.plus { color: #146C3E; } table.e1221 th.moins { color: #A3271B; }
table.e1221 td.cumul { color: var(--ink-2); white-space: nowrap; }
table.e1221 tr.nul td { color: #A3ADB8; }
table.e1221 tr.nul td.lettre { color: #A3ADB8; }
table.e1221 tr.base td { background: #F2F7FA; }
table.e1221 tr.sous-total td { border-top: 2px solid var(--line); font-weight: 700; background: #FAFCFD; }
table.e1221 tfoot tr.total-1221 td { background: var(--navy); color: #fff; font: 700 1.1rem var(--display); padding: .6rem .5rem; }
table.e1221 tfoot tr.total-1221 td .small { color: #9FB0C2; font-weight: 400; }
table.e1221 tfoot tr.total-1221 td.nb { color: var(--cyan); font-size: 1.3rem; }
.reponse-mo { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .3rem 0 .6rem; padding: .5rem .6rem; background: #FFF8D6; border-radius: 8px; }
.pastille-demo { align-self: center; font: 600 .72rem var(--display); color: #7A5B00; background: #FFF8D6; border: 1px solid #F0DE9A; border-radius: var(--r-pill); padding: .1rem .6rem; text-decoration: none; white-space: nowrap; }
/* 0.15.1 : séparateurs verticaux dans les tableaux ; récapitulatif des états d'acompte, lignes cliquables */
table.tableau th + th, table.tableau td + td { border-left: 1px solid var(--line); }
table.tableau thead th { border-bottom: 2px solid var(--line); }
table.tableau td { border-bottom: 1px solid var(--line); }
table.recap-acomptes { width: 100%; font-size: .9rem; }
table.recap-acomptes th small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
table.recap-acomptes td.plus { color: #146C3E; } table.recap-acomptes td.moins { color: #A3271B; }
table.recap-acomptes td.total-l { font-weight: 700; background: #F2F7FA; }
table.recap-acomptes tfoot td { font-weight: 700; background: #F2F7FA; border-top: 2px solid var(--line); }
tr.cliquable { position: relative; cursor: pointer; }
tr.cliquable a::after { content: ""; position: absolute; inset: 0; }
tr.cliquable:hover td { background: #EEF6FB; }
tr.cliquable.courant td { background: #E3FBEF; font-weight: 700; }
tr.cliquable.courant td:first-child { box-shadow: inset 4px 0 0 var(--academy); }
table.recap-acomptes th { text-transform: none; }
table.recap-simple { width: 100%; max-width: 760px; font-size: .95rem; }
table.recap-simple tr.sous-total td { font-weight: 700; background: #F2F7FA; border-top: 2px solid var(--line); }
tr.ligne-solde td { background: #FFF8D6; font-weight: 700; }
table.points { width: 100%; font-size: .9rem; }
table.points td { vertical-align: top; }
/* 0.15.3 : tri des tableaux */
th.triable { cursor: pointer; user-select: none; white-space: nowrap; }
th.triable::after { content: " ↕"; color: #A3ADB8; font-size: .8em; }
th.triable[aria-sort="ascending"]::after { content: " ↑"; color: var(--territory); }
th.triable[aria-sort="descending"]::after { content: " ↓"; color: var(--territory); }
table.taches-lot { width: 100%; font-size: .92rem; }
.sig-tag.sig-gris { background: var(--mist); color: var(--ink-2); border-color: var(--line); }
table.a-traiter, table.operations { width: 100%; font-size: .92rem; }
a.compte-lien { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: var(--cyan); font-weight: 700; text-decoration: none; }
a.compte-lien:hover { background: var(--territory); color: #fff; }
table.voyants-t { width: 100%; font-size: .86rem; }
table.voyants-t th { text-align: left; white-space: nowrap; vertical-align: top; width: 7.5rem; }

/* 0.16.0 · arborescence en trois niveaux : menus déroulants, filtre opération / lot, tableau de bord, panoramas */
.onglets-module { flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.menu-deroulant { position: relative; }
.menu-deroulant > summary { list-style: none; cursor: pointer; padding: .45rem .8rem; border-radius: 8px; font-weight: 600; }
.menu-deroulant > summary::-webkit-details-marker { display: none; }
.menu-deroulant > summary::after { content: " ▾"; color: #66717D; }
.menu-deroulant > summary[aria-current="page"] { background: #E6FBF8; box-shadow: inset 0 -3px 0 #3DE2D0; }
.menu-deroulant[open] > summary { background: #F2F7FA; }
.md-liste { position: absolute; z-index: 30; top: 100%; left: 0; min-width: 15rem; background: #fff; border: 1px solid #DCE5EB;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(7, 17, 31, .12); padding: .35rem; display: flex; flex-direction: column; }
.md-liste a { padding: .4rem .7rem; border-radius: 6px; text-decoration: none; color: #07111F; }
.md-liste a:hover, .md-liste a[aria-current="page"] { background: #E6FBF8; }
.filtre-ol { display: flex; align-items: center; gap: .35rem; margin-left: auto; font-size: .85rem; flex-wrap: wrap; }
.filtre-ol label { color: #3D4955; font-weight: 600; }
.filtre-ol select { max-width: 15rem; padding: .25rem .4rem; }
table.tableau-bord td:first-child a { font-size: 1rem; }
table.tableau-bord tr.ligne-rouge td:first-child { box-shadow: inset 4px 0 0 #C0392B; }
table.tableau-bord tr.ligne-jaune td:first-child { box-shadow: inset 4px 0 0 #E0A800; }
tr.cliquable a.lien-sec { position: relative; z-index: 1; color: #3D4955; }
tr.cliquable a.lien-sec::after { content: none; }
.onglets-module .onglets-liste { overflow: visible; align-items: center; }
.onglets-module .menu-deroulant > summary { font-size: 15.5px; padding: 10px 12px 9px; font-weight: 400; color: var(--navy); }
.filtre-ol select { font-size: .85rem; padding: 4px 8px; min-height: 0; height: auto; width: auto; max-width: 14rem; border-radius: 8px; }
.filtre-ol .lien { padding: 0; }
