/* Agent commandes — feuille de style.
   Principe : l'encre sur le papier pour tout ce qui est normal ; le surligneur jaune pour ce
   qu'il faut regarder ; le rouge tampon pour ce qui bloque. */

@font-face { font-family: "Plex"; font-weight: 400; font-display: swap;
  src: url("polices/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap;
  src: url("polices/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap;
  src: url("polices/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap;
  src: url("polices/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap;
  src: url("polices/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap;
  src: url("polices/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Signal"; font-weight: 500; font-display: swap;
  src: url("polices/barlow-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Signal"; font-weight: 600; font-display: swap;
  src: url("polices/barlow-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Signal"; font-weight: 600; font-display: swap;
  src: url("polices/barlow-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Signal"; font-weight: 700; font-display: swap;
  src: url("polices/barlow-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --encre: #1B2840;          /* bleu-noir d'encre : texte et actions principales */
  --encre-2: #45536A;
  --encre-3: #78859A;
  --calque: #E9EDF0;         /* fond de l'application : papier calque */
  --feuille: #FFFFFF;        /* documents et zones de travail */
  --feuille-2: #F5F7F9;
  --trait: #D3D9E0;
  --trait-fort: #AEB8C4;
  --surligneur: #FFE45C;     /* à regarder */
  --surligneur-doux: #FFF4B8;
  --surligneur-trait: #C9A400;
  --controle: #1E7247;       /* conforme */
  --controle-doux: #E3F2E9;
  --tampon: #B1271F;         /* bloquant */
  --tampon-doux: #F9E5E3;
  --agent: #2A55C0;          /* liens, focus, travail en cours */
  --agent-doux: #E5ECFA;
  --marque: #7A5230;         /* couleur de l'entreprise cliente (remplacée par la config) */
  --ombre: 0 1px 2px rgba(27, 40, 64, .06), 0 6px 18px -8px rgba(27, 40, 64, .18);
  --rayon: 6px;
  --texte: "Plex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titre: "Signal", "Arial Narrow", "Roboto Condensed", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --encre: #E3E9F2; --encre-2: #B3BECD; --encre-3: #8693A6;
    --calque: #0F151E; --feuille: #17202D; --feuille-2: #1C2635;
    --trait: #2A3646; --trait-fort: #3B4A5E;
    --surligneur: #F2D74A; --surligneur-doux: #3B3518; --surligneur-trait: #E7C94A;
    --controle: #5CC38C; --controle-doux: #173126;
    --tampon: #F07A70; --tampon-doux: #3A1D1C;
    --agent: #8AA8F5; --agent-doux: #1C2A47;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -10px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--calque); color: var(--encre); font: 400 15px/1.5 var(--texte);
  font-feature-settings: "tnum" 1; }
a { color: var(--agent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--agent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: .005em; }
h1 { font-size: 34px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
p { margin: 0 0 .7em; }
small, .discret { color: var(--encre-3); }
.nombre { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- barre du haut ---------- */
.barre { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 0 24px; height: 60px; background: var(--feuille); border-bottom: 1px solid var(--trait); }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.marque-carre { width: 26px; height: 26px; border-radius: 4px; background: var(--marque);
  display: grid; place-items: center; color: #fff; font: 700 15px var(--titre); }
.marque-nom { font: 600 21px var(--titre); }
.marque-role { font-size: 12.5px; color: var(--encre-3); margin-left: 2px; }
.nav { display: flex; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--encre-2); text-decoration: none;
  font-weight: 500; font-size: 14.5px; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--encre); }
.nav a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--encre); }
.pastille { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surligneur);
  color: #1B2840; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.barre-droite { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.barre-droite form { margin: 0; }
.utilisateur { color: var(--encre-2); text-decoration: none; }
.bandeau-demo { background: var(--surligneur-doux); color: var(--encre); border-bottom: 1px solid var(--trait);
  padding: 6px 24px; font-size: 13.5px; }

/* ---------- mise en page ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 26px 24px 64px; }
.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 18px; }
.entete-page p { margin: 6px 0 0; color: var(--encre-2); max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pile > * + * { margin-top: 16px; }
.carte { background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 20px; }

/* ---------- boutons et formulaires ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px;
  padding: 0 16px; border-radius: var(--rayon); border: 1px solid var(--encre); background: var(--encre);
  color: var(--feuille); font: 500 14.5px var(--texte); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.btn-secondaire { background: var(--feuille); color: var(--encre); border-color: var(--trait-fort); }
.btn-secondaire:hover { border-color: var(--encre-2); filter: none; background: var(--feuille-2); }
.btn-discret { background: transparent; border-color: transparent; color: var(--encre-2); padding: 0 8px; }
.btn-discret:hover { color: var(--encre); background: var(--feuille-2); filter: none; }
.btn-danger { background: var(--feuille); color: var(--tampon); border-color: currentColor; }
.btn-petit { min-height: 30px; padding: 0 10px; font-size: 13.5px; }
.btn-grand { min-height: 46px; padding: 0 22px; font-size: 16px; }
.btn-valider { background: var(--controle); border-color: var(--controle); color: #fff; }
.raccourci { font-size: 11.5px; opacity: .75; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; }
label { font-size: 13.5px; font-weight: 500; color: var(--encre-2); }
input, select, textarea { font: 400 14.5px var(--texte); color: var(--encre); background: var(--feuille);
  border: 1px solid var(--trait-fort); border-radius: 5px; padding: 7px 10px; min-height: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--agent); outline: 2px solid var(--agent-doux); }
textarea { width: 100%; line-height: 1.5; }
.champ { display: flex; flex-direction: column; gap: 5px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
form.en-ligne { display: inline; margin: 0; }

.alerte { padding: 11px 14px; border-radius: var(--rayon); border: 1px solid; margin: 0 0 14px; font-size: 14.5px; }
.alerte-ok { background: var(--controle-doux); border-color: var(--controle); color: var(--encre); }
.alerte-erreur { background: var(--tampon-doux); border-color: var(--tampon); color: var(--encre); }
.alerte-info { background: var(--agent-doux); border-color: var(--agent); color: var(--encre); }

/* ---------- statuts ---------- */
.statut { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.statut-prete, .statut-transmise { color: var(--controle); }
.statut-a_valider { color: #8A6D00; }
@media (prefers-color-scheme: dark) { .statut-a_valider { color: var(--surligneur); } }
.statut-bloquee, .statut-rejetee, .statut-erreur { color: var(--tampon); }
.statut-en_cours, .statut-nouveau, .statut-transmission, .statut-attente, .statut-reponse { color: var(--agent); }
.statut-en_cours::before, .statut-nouveau::before { animation: pulse 1.2s infinite ease-in-out; }
.statut-ignore { color: var(--encre-3); }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- boîte de réception ---------- */
.filtres { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filtres a { padding: 6px 12px; border-radius: 20px; color: var(--encre-2); text-decoration: none; font-size: 14px;
  font-weight: 500; border: 1px solid transparent; }
.filtres a[aria-current="true"] { background: var(--feuille); border-color: var(--trait-fort); color: var(--encre); }
.filtres form { margin-left: auto; }
.filtres input[type=search] { width: 260px; }
.bordereaux { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.bordereaux th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--encre-3); padding: 0 14px 2px; }
.bordereaux th.nombre { text-align: right; }
.bordereaux td { background: var(--feuille); padding: 13px 14px; border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait); vertical-align: middle; }
.bordereaux td:first-child { border-left: 5px solid var(--trait-fort); border-radius: var(--rayon) 0 0 var(--rayon); }
.bordereaux td:last-child { border-right: 1px solid var(--trait); border-radius: 0 var(--rayon) var(--rayon) 0; }
.bordereaux tr.ligne-prete td:first-child, .bordereaux tr.ligne-transmise td:first-child { border-left-color: var(--controle); }
.bordereaux tr.ligne-a_valider td:first-child { border-left-color: var(--surligneur-trait); }
.bordereaux tr.ligne-bloquee td:first-child, .bordereaux tr.ligne-rejetee td:first-child { border-left-color: var(--tampon); }
.bordereaux tr.ligne-en_cours td:first-child, .bordereaux tr.ligne-attente td:first-child { border-left-color: var(--agent); }
.bordereaux tbody tr { cursor: pointer; }
.bordereaux tbody tr:hover td { background: var(--feuille-2); }
.bordereaux a.titre-ligne { color: var(--encre); text-decoration: none; font-weight: 600; }
.bordereaux .sous { font-size: 13px; color: var(--encre-3); margin-top: 2px; }
.points { display: flex; gap: 6px; flex-wrap: wrap; }
.point { font-size: 12.5px; padding: 2px 8px; border-radius: 3px; background: var(--surligneur-doux);
  border: 1px solid var(--surligneur-trait); color: var(--encre); white-space: nowrap; }
.point-bloquant { background: var(--tampon-doux); border-color: var(--tampon); }
.point-ok { background: transparent; border-color: transparent; color: var(--controle); padding-left: 0; }
.point-reponse { background: var(--agent-doux); border-color: var(--agent); }
.vide { text-align: center; padding: 64px 20px; background: var(--feuille); border: 1px dashed var(--trait-fort);
  border-radius: var(--rayon); color: var(--encre-2); }
.vide h2 { margin-bottom: 8px; }

/* ---------- dossier d'une commande ---------- */
.dossier { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 22px; align-items: start; }
.document { position: sticky; top: 76px; }
.feuille { background: var(--feuille); border: 1px solid var(--trait); border-radius: 3px; box-shadow: var(--ombre); }
.feuille iframe { display: block; width: 100%; height: calc(100vh - 170px); min-height: 520px; border: 0; border-radius: 3px; }
.pages { max-height: calc(100vh - 170px); overflow: auto; border-radius: 3px; }
.pages img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--trait); }
@media (prefers-color-scheme: dark) { .pages img { filter: brightness(.92); } }
.onglets-doc { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.onglets-doc a, .onglets-doc button { font-size: 13px; padding: 5px 10px; border-radius: 4px; border: 1px solid var(--trait);
  background: var(--feuille); color: var(--encre-2); text-decoration: none; cursor: pointer; font-family: inherit; }
.onglets-doc [aria-selected="true"] { border-color: var(--encre); color: var(--encre); }
.mail { padding: 20px 24px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; max-height: calc(100vh - 170px); overflow: auto; }
.mail-entete { border-bottom: 1px solid var(--trait); padding-bottom: 12px; margin-bottom: 14px; white-space: normal; color: var(--encre-2); font-size: 13.5px; }
.tableur { overflow: auto; max-height: calc(100vh - 170px); }
.tableur table { border-collapse: collapse; font-size: 13px; }
.tableur td { border: 1px solid var(--trait); padding: 4px 8px; vertical-align: top; max-width: 240px; }

.saisie-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.tampon { font: 700 21px/1 var(--titre); padding: 7px 12px 6px; border: 2.5px solid currentColor; border-radius: 4px;
  transform: rotate(-2.5deg); display: inline-block; white-space: nowrap; letter-spacing: .01em;
  mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .tampon { mix-blend-mode: normal; } }
.tampon-prete, .tampon-transmise { color: var(--controle); }
.tampon-a_valider { color: #8A6D00; }
@media (prefers-color-scheme: dark) { .tampon-a_valider { color: var(--surligneur); } }
.tampon-bloquee, .tampon-rejetee { color: var(--tampon); }
.tampon-transmission, .tampon-attente { color: var(--agent); }
.tampon.apparait { animation: tamponner .38s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes tamponner { from { transform: rotate(-2.5deg) scale(1.6); opacity: 0; } to { transform: rotate(-2.5deg) scale(1); opacity: 1; } }

.fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px;
  padding: 16px 18px; background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon); }
.fiche dt { font-size: 12.5px; color: var(--encre-3); margin-bottom: 2px; }
.fiche dd { margin: 0; font-weight: 500; }
.fiche dd .sous { font-weight: 400; font-size: 13px; color: var(--encre-3); display: block; }
.badge { font-size: 12px; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--trait-fort); color: var(--encre-2);
  white-space: nowrap; font-weight: 500; }
.badge-ia { border-color: var(--agent); color: var(--agent); }
.badge-appris { border-color: var(--controle); color: var(--controle); }

.lignes { width: 100%; border-collapse: collapse; background: var(--feuille); border: 1px solid var(--trait);
  border-radius: var(--rayon); font-size: 14px; }
.lignes th { font-size: 12.5px; font-weight: 500; color: var(--encre-3); text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--trait); background: var(--feuille-2); }
.lignes th.nombre { text-align: right; }
.lignes td { padding: 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.lignes tr:last-child td { border-bottom: 0; }
.lignes .lu { font-size: 12.5px; color: var(--encre-3); margin-top: 3px; }
.lignes input { width: 92px; min-height: 30px; padding: 3px 7px; text-align: right; font-size: 13.5px; }
.lignes select { min-height: 30px; padding: 3px 6px; font-size: 13px; max-width: 220px; }
/* Le surligneur : une bande jaune un peu plus basse que le texte, comme au feutre. */
.surligne { background: linear-gradient(transparent 12%, var(--surligneur) 12%, var(--surligneur) 88%, transparent 88%);
  padding: 0 3px; margin: 0 -3px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; color: #1B2840; }
.barre-rouge { text-decoration: line-through; text-decoration-color: var(--tampon); text-decoration-thickness: 2px; color: var(--encre-3); }
.totaux { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; justify-content: end; margin: 12px 4px 0 auto;
  max-width: 340px; font-size: 14px; }
.totaux .total { font-weight: 600; font-size: 16px; border-top: 1px solid var(--trait-fort); padding-top: 6px; }

.controles h2 { margin: 24px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.note { background: var(--feuille); border: 1px solid var(--trait); border-left: 4px solid var(--surligneur-trait);
  border-radius: var(--rayon); padding: 13px 16px; margin-bottom: 10px; }
.note-bloquant { border-left-color: var(--tampon); }
.note-info { border-left-color: var(--trait-fort); padding: 9px 14px; }
.note-info .note-titre { font-weight: 500; }
.note-info p { margin: 2px 0 6px; font-size: 13.5px; }
.note-info .actions:empty { display: none; }
.note-traitee { opacity: .62; border-left-color: var(--controle); }
.note-titre { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-weight: 600; }
.note-titre .impact { font-weight: 600; white-space: nowrap; }
.note p { margin: 4px 0 10px; color: var(--encre-2); font-size: 14px; }
.note .actions { gap: 6px; }
.note .resolution { font-size: 13px; color: var(--controle); margin: 4px 0 0; }
.note-interne { font-size: 12px; color: var(--encre-3); font-weight: 400; margin-left: 6px; }

.barre-decision { position: sticky; bottom: 0; margin-top: 22px; padding: 14px 16px; background: var(--feuille);
  border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); display: flex; gap: 10px;
  align-items: center; flex-wrap: wrap; z-index: 5; }
.barre-decision .resume { font-size: 13.5px; color: var(--encre-2); margin-right: auto; }
.reussite { background: var(--controle-doux); border: 1px solid var(--controle); border-radius: var(--rayon); padding: 16px 18px; }
.reussite h2 { color: var(--controle); margin-bottom: 6px; }

details.repli { margin-top: 18px; }
details.repli summary { cursor: pointer; font-weight: 500; color: var(--encre-2); }
.chrono { list-style: none; padding: 0; margin: 10px 0 0; font-size: 13.5px; border-left: 2px solid var(--trait); }
.chrono li { padding: 3px 0 3px 14px; position: relative; color: var(--encre-2); }
.chrono li::before { content: ""; position: absolute; left: -5px; top: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--feuille); border: 2px solid var(--trait-fort); }
.chrono time { color: var(--encre-3); margin-right: 8px; }

.envoi { background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px; margin-top: 12px; }
/* échange avec le client : attente, réponses reçues */
.suivi { margin-top: 18px; }
.suivi h2 { margin-bottom: 10px; }
.reponse { background: var(--feuille); border: 1px solid var(--agent); border-left-width: 5px; border-radius: var(--rayon);
  padding: 14px 18px; margin-top: 10px; }
.reponse-lue { border-color: var(--trait); }
.reponse .lecture { margin: 8px 0 0; }
.reponse .citation { padding: 10px 0 0; max-height: 220px; font-family: inherit; margin: 0; }
.envoi textarea { min-height: 230px; font-size: 14px; }

/* ---------- tableau de bord ---------- */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--trait);
  border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
.indicateur { background: var(--feuille); padding: 18px 20px 16px; }
.indicateur .valeur { font: 600 44px/1 var(--titre); letter-spacing: -.01em; }
.indicateur .libelle { font-weight: 500; margin-top: 8px; }
.indicateur .precision { font-size: 13px; color: var(--encre-3); margin-top: 3px; }
.indicateur-fort .valeur { color: var(--controle); }
.graphiques { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; margin-top: 18px; }
.graphique { background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 20px; }
.graphique h2 { font-size: 20px; margin-bottom: 4px; }
.legende { display: flex; gap: 16px; font-size: 13px; color: var(--encre-2); margin: 6px 0 10px; flex-wrap: wrap; }
.legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px;
  vertical-align: -1px; background: var(--c); }
.barres-h { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; font-size: 13.5px; }
.barres-h .piste { height: 12px; background: var(--feuille-2); border-radius: 2px; overflow: hidden; }
.barres-h .rempli { height: 100%; background: var(--encre-2); }
svg text { font-family: var(--texte); }

/* ---------- divers ---------- */
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.table-simple { width: 100%; border-collapse: collapse; background: var(--feuille); font-size: 14px;
  border: 1px solid var(--trait); border-radius: var(--rayon); }
.table-simple th { text-align: left; font-size: 12.5px; color: var(--encre-3); font-weight: 500; padding: 9px 12px;
  border-bottom: 1px solid var(--trait); background: var(--feuille-2); }
.table-simple td { padding: 9px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--trait); margin-bottom: 18px; flex-wrap: wrap; }
.onglets a { padding: 9px 14px; color: var(--encre-2); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--encre); }
.scenarios { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.scenario { background: var(--feuille); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px; }
.scenario h3 { font-size: 20px; }
.scenario .de { font-size: 13px; color: var(--encre-3); }
.scenario .a-voir { font-size: 13.5px; background: var(--feuille-2); border-radius: 4px; padding: 8px 10px; color: var(--encre-2); }
.scenario footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.connexion .carte { width: 100%; max-width: 400px; padding: 28px; }
.connexion h1 { font-size: 30px; margin: 14px 0 4px; }
.pied { text-align: center; font-size: 12.5px; color: var(--encre-3); margin-top: 32px; }
.code-secret { font-family: ui-monospace, monospace; font-size: 15px; background: var(--feuille-2); padding: 8px 10px;
  border-radius: 4px; word-break: break-all; }
.qr svg { width: 180px; height: 180px; background: #fff; padding: 6px; border-radius: 4px; }

@media (max-width: 1080px) {
  .dossier { grid-template-columns: 1fr; }
  .document { position: static; }
  .feuille iframe { height: 70vh; }
  .graphiques { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .barre { gap: 12px; padding: 0 14px; }
  .marque-role, .utilisateur { display: none; }
  .page { padding: 18px 14px 48px; }
  h1 { font-size: 28px; }
  .bordereaux thead { display: none; }
  .bordereaux td.optionnel { display: none; }
  .filtres form { margin-left: 0; width: 100%; }
  .filtres input[type=search] { width: 100%; }
  .lignes { font-size: 13px; }
  .lignes .optionnel { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
@media print {
  .barre, .bandeau-demo, .ne-pas-imprimer { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page { padding: 0; max-width: none; }
  .carte, .indicateurs, .graphique { break-inside: avoid; }
}
