/* AUTOPUS · pilotage — système de design.
   Convention de dessin technique : ce qui existe est tracé plein, ce qui est simulé ou prévu est tracé en
   pointillés ou hachuré. Encre « bleu de Prusse » (le bleu des plans) pour l'action et la sélection, neutres froids
   pour le reste. Une seule famille de caractères (celle du système), chiffres tabulaires pour les données. */

:root {
  color-scheme: light;
  --fond: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-laterale: #eceff3;
  --survol: rgba(16, 32, 54, .055);
  --survol-ligne: #f8fafc;
  --bordure: #dce1e7;
  --bordure-legere: #e9edf1;
  --bordure-forte: #c3cbd5;
  --texte: #121a24;
  --texte-2: #3b4757;
  --discret: #5a6676;
  --accent: #1f4f8a;
  --accent-fort: #173d6c;
  --accent-doux: #e7eef8;
  --accent-texte: #1b4679;
  --hachure: rgba(31, 79, 138, .16);
  --ok: #17734a;
  --ok-doux: #e5f3ec;
  --attention: #8f5a00;
  --attention-doux: #fbf1df;
  --critique: #b42318;
  --critique-doux: #fcebe9;
  --ombre-1: 0 1px 2px rgba(18, 26, 36, .05);
  --ombre-2: 0 6px 20px -4px rgba(18, 26, 36, .14), 0 2px 6px rgba(18, 26, 36, .06);
  --rayon: 6px;
  --rayon-panneau: 10px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-code: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --largeur-laterale: 252px;
  --hauteur-barre: 54px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --fond: #0d1116;
    --surface: #141a21;
    --surface-2: #10151b;
    --surface-laterale: #0f1419;
    --survol: rgba(220, 232, 248, .06);
    --survol-ligne: #171e26;
    --bordure: #252e39;
    --bordure-legere: #1d252e;
    --bordure-forte: #36424f;
    --texte: #e7ebf0;
    --texte-2: #c0c8d2;
    --discret: #94a0ae;
    --accent: #6f9fe0;
    --accent-fort: #8db3ea;
    --accent-doux: #172437;
    --accent-texte: #9cbff0;
    --hachure: rgba(111, 159, 224, .22);
    --ok: #4cc18c;
    --ok-doux: #102a1f;
    --attention: #e0a548;
    --attention-doux: #2c2110;
    --critique: #f0786c;
    --critique-doux: #321514;
    --ombre-1: 0 1px 2px rgba(0, 0, 0, .3);
    --ombre-2: 0 8px 24px -6px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
  }
}

/* --- Base ---------------------------------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--bordure-forte) transparent; }
body {
  margin: 0; font: 14px/1.5 var(--police); color: var(--texte); background: var(--fond);
  caret-color: var(--accent); -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-doux); color: var(--accent-texte); }
a { color: var(--accent-texte); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; color: var(--texte); letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.375rem; font-weight: 650; line-height: 1.25; }
h2 { font-size: 1rem; font-weight: 620; line-height: 1.35; }
h3 { font-size: .9rem; font-weight: 620; margin: 18px 0 6px; }
h2 small, h1 small { font-weight: 450; color: var(--discret); font-size: .85em; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
small, .petit { font-size: 12.5px; color: var(--discret); }
code, .code { font-family: var(--police-code); font-size: 12.5px; }
pre {
  margin: 6px 0 10px; padding: 10px 12px; font: 12.5px/1.55 var(--police-code); white-space: pre-wrap;
  word-break: break-word; background: var(--surface-2); border: 1px solid var(--bordure-legere);
  border-radius: var(--rayon); color: var(--texte-2);
}
strong { font-weight: 620; }
.icone { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.icone.pleine { fill: currentColor; stroke: none; }
.masque { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* --- Gabarit : navigation latérale, barre haute, page -------------------------------------------------------- */

.app { display: grid; grid-template-columns: var(--largeur-laterale) minmax(0, 1fr); min-height: 100vh; }
.barre-laterale {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px;
  padding: 14px 12px 16px; background: var(--surface-laterale); border-right: 1px solid var(--bordure);
}
.marque { display: flex; align-items: center; gap: 10px; padding: 4px 8px 6px; color: var(--texte); text-decoration: none; }
.marque:hover { color: var(--texte); }
.marque-signe { width: 28px; height: 28px; flex: none; }
.marque-nom { display: flex; flex-direction: column; line-height: 1.15; }
.marque-nom strong { font-size: 14.5px; letter-spacing: .02em; }
.marque-nom span { font-size: 12px; color: var(--discret); }
.nav { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.nav-groupe { display: flex; flex-direction: column; gap: 1px; }
.nav-titre { margin: 0 0 4px; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--discret); }
.nav-lien {
  display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 10px; border-radius: var(--rayon);
  color: var(--texte-2); text-decoration: none; font-size: 13.5px; transition: background-color .15s ease-out, color .15s ease-out;
}
.nav-lien .icone { color: var(--discret); }
.nav-lien:hover { background: var(--survol); color: var(--texte); }
.nav-lien[aria-current="page"] {
  background: var(--surface); color: var(--texte); font-weight: 600;
  box-shadow: 0 0 0 1px var(--bordure), var(--ombre-1);
}
.nav-lien[aria-current="page"] .icone { color: var(--accent); }
.nav-compteur {
  margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; font-size: 11.5px; font-weight: 600;
  text-align: center; line-height: 18px; background: var(--accent); color: #fff; font-variant-numeric: tabular-nums;
}
.nav-pied { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--bordure); }
.utilisateur { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; font-size: 13px; color: var(--texte-2); }
.utilisateur form { margin: 0; }

.zone-principale { min-width: 0; display: flex; flex-direction: column; }
.barre-haute {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: var(--hauteur-barre);
  padding: 0 28px; background: color-mix(in srgb, var(--fond) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.fil { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--discret); }
.fil a { color: var(--discret); text-decoration: none; }
.fil a:hover { color: var(--texte); }
.fil .icone { width: 14px; height: 14px; }
.fil [aria-current] { color: var(--texte); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-haute .droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bouton-menu { display: none; }

.environnement {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 13px;
  font-size: 12px; font-weight: 600; color: var(--texte-2); background: var(--surface); border: 1px dashed var(--bordure-forte);
}
.environnement .point { background: var(--attention); }
.environnement.production { border-style: solid; color: var(--texte); }
.environnement.production .point { background: var(--ok); }

.page { width: 100%; max-width: 1320px; padding: 26px 28px 72px; }
.page.pleine { max-width: none; padding: 0; }
.entete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.entete-page .titre { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 78ch; }
.entete-page .titre h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.entete-page .description { color: var(--texte-2); font-size: 13.5px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* --- Panneaux --------------------------------------------------------------------------------------------- */

.panneau { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-panneau); box-shadow: var(--ombre-1); min-width: 0; }
.panneau + .panneau, .panneau + .grille, .grille + .panneau, .grille + .grille { margin-top: 16px; }
.panneau-entete {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--bordure-legere);
}
.panneau-entete h2 { display: flex; align-items: center; gap: 8px; }
.panneau-entete .aide { flex: 1 0 100%; margin: 0; font-size: 12.5px; color: var(--discret); }
.panneau-corps { padding: 16px 18px; }
.panneau-corps.flush { padding: 0; }
.panneau-pied { padding: 10px 18px; border-top: 1px solid var(--bordure-legere); font-size: 12.5px; color: var(--discret); }
.panneau.imbrique { box-shadow: none; border-color: var(--bordure-legere); }
.element { padding: 16px 18px; border-top: 1px solid var(--bordure-legere); }
.element:first-child { border-top: 0; }
.element-entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px; }
.element-entete strong { font-size: 14px; }

.grille { display: grid; gap: 16px; }
.grille > .panneau, .grille > .grille { margin-top: 0; }
.grille-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille-principale { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }

/* --- Tableaux --------------------------------------------------------------------------------------------- */

.defile { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th {
  text-align: left; font-weight: 600; font-size: 12.5px; color: var(--discret); padding: 9px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--bordure); white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--bordure-legere); vertical-align: top; }
tbody tr:last-child > td { border-bottom: 0; }
tbody tr:hover > td { background: var(--survol-ligne); }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 18px; }
td table th:first-child, td table td:first-child { padding-left: 10px; }
td table { margin-top: 6px; border: 1px solid var(--bordure-legere); border-radius: var(--rayon); font-size: 12.5px; }
td table th, td table td { padding: 6px 10px; }
.validation table td { min-width: 104px; }
.validation table td:first-child { min-width: 0; }
.nombre { text-align: right; white-space: nowrap; }
.cles { width: 100%; }
.cles th { width: 34%; background: transparent; color: var(--texte-2); font-size: 13px; white-space: normal; border-bottom: 1px solid var(--bordure-legere); }
.cles td { color: var(--texte); }
.cles tr:last-child > th { border-bottom: 0; }

/* --- Étiquettes et statuts -------------------------------------------------------------------------------- */

.etiquette {
  display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 1px 8px; border-radius: 5px;
  font-size: 12px; font-weight: 560; line-height: 1.3; white-space: nowrap; color: var(--texte-2);
  background: var(--surface-2); border: 1px solid var(--bordure);
}
.etiquette.reussie, .etiquette.actif, .etiquette.ok { color: var(--ok); background: var(--ok-doux); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.etiquette.echouee, .etiquette.erreur { color: var(--critique); background: var(--critique-doux); border-color: color-mix(in srgb, var(--critique) 28%, transparent); }
.etiquette.pause, .etiquette.en_pause, .etiquette.attention { color: var(--attention); background: var(--attention-doux); border-color: color-mix(in srgb, var(--attention) 30%, transparent); }
.etiquette.en_cours, .etiquette.en_attente { color: var(--accent-texte); background: var(--accent-doux); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.etiquette.reel { color: var(--surface); background: var(--texte); border-color: var(--texte); }
.etiquette.observe { color: var(--texte); background: var(--surface); border-color: var(--texte-2); font-weight: 650; }
.etiquette.simulation, .etiquette.simule, .etiquette.prevu {
  color: var(--accent-texte); border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  background: repeating-linear-gradient(135deg, var(--hachure) 0 1.5px, transparent 1.5px 6px), var(--surface);
}
.point { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--bordure-forte); }
.point.ok { background: var(--ok); } .point.erreur { background: var(--critique); } .point.attention { background: var(--attention); }
.point.en_cours { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.compteur {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 10px; font-size: 12px; font-weight: 650; color: var(--accent-texte); background: var(--accent-doux);
  font-variant-numeric: tabular-nums;
}

/* --- Contrôles -------------------------------------------------------------------------------------------- */

button, .bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 13px;
  border: 1px solid var(--accent); border-radius: var(--rayon); background: var(--accent); color: #fff;
  font: 550 13.5px/1 var(--police); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out;
}
button:hover, .bouton:hover { background: var(--accent-fort); border-color: var(--accent-fort); color: #fff; }
button:active, .bouton:active { transform: translateY(.5px); }
button:disabled, .bouton[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
button.secondaire, .bouton.secondaire { background: var(--surface); color: var(--texte); border-color: var(--bordure-forte); box-shadow: var(--ombre-1); }
button.secondaire:hover, .bouton.secondaire:hover { background: var(--surface-2); border-color: var(--discret); color: var(--texte); }
button.lien { height: auto; padding: 0; border: 0; background: none; color: var(--accent-texte); font-weight: 550; box-shadow: none; }
button.lien:hover { background: none; color: var(--accent); text-decoration: underline; }
button.discret { background: transparent; border-color: transparent; color: var(--texte-2); }
button.discret:hover { background: var(--survol); color: var(--texte); }
button.icone-seule { width: 32px; padding: 0; }
.bouton.compact { height: 22px; padding: 0 8px; font-size: 12px; box-shadow: none; }
@media (prefers-color-scheme: dark) {
  button, .bouton { color: #0d1116; }
  button:hover, .bouton:hover { color: #0d1116; }
  button.secondaire, .bouton.secondaire, button.discret { color: var(--texte); }
}
input, select, textarea {
  font: 13.5px/1.4 var(--police); color: var(--texte); background: var(--surface);
  border: 1px solid var(--bordure-forte); border-radius: var(--rayon); transition: border-color .15s, box-shadow .15s;
}
input, select { height: 32px; padding: 0 10px; }
textarea { display: block; width: 100%; padding: 8px 10px; resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: var(--discret); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
input[type="checkbox"], input[type="radio"] { height: auto; accent-color: var(--accent); }
label { display: block; margin: 10px 0; font-size: 13px; font-weight: 550; color: var(--texte-2); }
label input:not([type="checkbox"]):not([type="radio"]), label select { display: block; width: 100%; margin-top: 5px; font-weight: 400; }
label textarea { margin-top: 5px; font-weight: 400; }
label.en-ligne { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 450; color: var(--texte); }
fieldset.choix { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 14px; padding: 0; border: 0; }
fieldset.choix legend { width: 100%; padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 550; color: var(--texte-2); }
form.en-ligne { display: inline-flex; margin: 0; }
.liste-simple { margin: 0; padding: 4px 18px 12px; list-style: none; }
.liste-simple li { padding: 8px 0; border-top: 1px solid var(--bordure-legere); font-size: 13.5px; }
.liste-simple li:first-child { border-top: 0; }
.liste-simple small { display: block; }
form.rejet { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
form.rejet input { flex: 1 1 160px; min-width: 0; }
.decision { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.decision form { margin: 0; }
details { margin-top: 10px; }
summary { cursor: pointer; width: fit-content; color: var(--accent-texte); font-size: 13px; font-weight: 550; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform .15s ease-out; }
details[open] > summary::before { transform: rotate(45deg); }
details[open] > summary { margin-bottom: 8px; }

/* --- Messages, alertes, états vides ----------------------------------------------------------------------- */

.messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.message {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 8px;
  font-size: 13.5px; color: var(--accent-texte); background: var(--accent-doux); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.message.error { color: var(--critique); background: var(--critique-doux); border-color: color-mix(in srgb, var(--critique) 25%, transparent); }
.message.success { color: var(--ok); background: var(--ok-doux); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.message.warning { color: var(--attention); background: var(--attention-doux); border-color: color-mix(in srgb, var(--attention) 25%, transparent); }
.message .icone { margin-top: 2px; }
.alertes { display: flex; flex-direction: column; }
.alerte { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 18px; border-top: 1px solid var(--bordure-legere); }
.alerte:first-child { border-top: 0; }
.alerte .icone { margin-top: 2px; color: var(--attention); }
.alerte.critique .icone { color: var(--critique); }
.alerte.info .icone { color: var(--accent); }
.alerte-titre { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13px; }
.alerte-titre strong { color: var(--texte); }
.alerte-message { grid-column: 2; font-size: 13.5px; color: var(--texte-2); }
.vide { margin: 0; padding: 22px 18px; color: var(--discret); font-size: 13.5px; }
.vide strong { display: block; color: var(--texte-2); font-weight: 600; margin-bottom: 2px; }
td.vide { text-align: left; padding: 22px 18px; }

/* --- Synthèse de l'accueil et jauges ----------------------------------------------------------------------- */

.synthese { display: flex; flex-wrap: wrap; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-panneau); box-shadow: var(--ombre-1); }
.synthese > a, .synthese > div {
  flex: 1 1 170px; display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; color: inherit;
  text-decoration: none; border-left: 1px solid var(--bordure-legere);
}
.synthese > :first-child { border-left: 0; }
.synthese > a:hover { background: var(--survol-ligne); }
.synthese .libelle { font-size: 12.5px; color: var(--discret); display: flex; align-items: center; gap: 6px; }
.synthese .valeur { font-size: 15px; font-weight: 620; font-variant-numeric: tabular-nums; }
.synthese .valeur small { font-weight: 450; }
.jauge { position: relative; height: 6px; min-width: 80px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--bordure-legere); overflow: hidden; }
.jauge > span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--accent); }
.jauge.depasse > span { background: var(--critique); }
.jauge.alerte-seuil > span { background: var(--attention); }
.ligne-jauge { display: flex; align-items: center; gap: 10px; }
.ligne-jauge .jauge { flex: 1; }
.ligne-jauge .pct { width: 44px; text-align: right; font-size: 12.5px; color: var(--texte-2); font-variant-numeric: tabular-nums; }

/* --- Barres de coûts (suivi) -------------------------------------------------------------------------------- */

.histogramme { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 8px 0 0; border-bottom: 1px solid var(--bordure); }
.histogramme .barre { flex: 1; min-width: 4px; border-radius: 2px 2px 0 0; background: var(--accent); position: relative; }
.histogramme .barre.vide-jour { background: var(--bordure-legere); height: 2px !important; }
.histogramme .barre:hover { background: var(--accent-fort); }
.axe { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--discret); padding-top: 4px; }

/* --- File de validation, différences de prompts -------------------------------------------------------------- */

.statuts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.panneau-entete .statuts { flex-basis: 100%; }
form.rejet.sans-marge, .ligne-rejet { margin: 0; }
.ligne-rejet { flex: 1 1 260px; }
.actions.espace { margin-top: 14px; }
.validation { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; align-items: start; }
.validation-corps { min-width: 0; }
.validation-corps > small { display: block; }
.decision .bouton { width: 100%; }
/* Un élément qui porte un tableau prend toute la largeur ; la décision passe dessous. */
.validation:has(table) { grid-template-columns: minmax(0, 1fr); }
.validation:has(table) .decision { flex-direction: row; flex-wrap: wrap; align-items: center; }
.validation:has(table) .decision .rejet { margin-top: 0; flex: 0 1 380px; }
@media (max-width: 760px) { .validation { grid-template-columns: minmax(0, 1fr); } .decision { min-width: 0; } }
.diff { padding: 0; overflow-x: auto; }
.diff span { display: block; padding: 0 12px; white-space: pre-wrap; }
.diff span:first-child { padding-top: 8px; } .diff span:last-child { padding-bottom: 8px; }
.diff .plus { color: var(--ok); background: var(--ok-doux); }
.diff .moins { color: var(--critique); background: var(--critique-doux); }
.diff .entete { color: var(--accent-texte); background: var(--accent-doux); font-weight: 600; }
.texte-email { max-height: 360px; overflow-y: auto; font-family: var(--police); font-size: 13.5px; line-height: 1.55; color: var(--texte); background: var(--surface); }
.message-email + .message-email { margin-top: 12px; }
.message-email h3 { margin: 0 0 4px; font-size: 13px; }
.faits { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0 0 12px; font-size: 13px; }
.faits dt { color: var(--discret); }
.faits dd { margin: 0; color: var(--texte); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .faits { grid-template-columns: minmax(0, 1fr); } .faits dd { margin-bottom: 6px; } }

/* --- Onglets ------------------------------------------------------------------------------------------------ */

.onglets { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--bordure); border-radius: 8px; width: fit-content; }
.onglets a, .onglets button {
  height: 28px; padding: 0 12px; border-radius: 6px; border: 0; background: transparent; color: var(--texte-2);
  font: 550 13px/28px var(--police); text-decoration: none; box-shadow: none;
}
.onglets a:hover, .onglets button:hover { background: var(--survol); color: var(--texte); }
.onglets [aria-current="page"], .onglets [aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: 0 0 0 1px var(--bordure), var(--ombre-1); }

/* --- Connexion ---------------------------------------------------------------------------------------------- */

.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion .panneau { width: 100%; max-width: 380px; }
.connexion .marque { padding: 0 0 18px; }
.connexion button[type="submit"] { width: 100%; margin-top: 8px; height: 36px; }

/* --- Réactivité ---------------------------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .grille-principale, .grille-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 920px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .barre-laterale {
    position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--ombre-2);
  }
  .menu-ouvert .barre-laterale { transform: none; }
  .menu-ouvert .voile { display: block; }
  .voile { display: none; position: fixed; inset: 0; z-index: 30; background: rgba(10, 15, 22, .35); }
  .bouton-menu { display: inline-flex; }
  .barre-haute { padding: 0 16px; }
  .page { padding: 20px 16px 56px; }
  th:first-child, td:first-child { padding-left: 14px; }
  .panneau-entete, .panneau-corps, .element { padding-left: 14px; padding-right: 14px; }
}
@media (min-width: 921px) { .voile { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
