/* Le tableau de bord d'un parc (web/parc.html), sa page des comptes et ses
   pages d'entrée. Chargée par elles seules : le site public ne la lit jamais,
   son rendu ne dépend donc pas de ce qui est écrit ici.

   Mode clair seul depuis le 12 novembre 2026 : barre latérale foncée au
   dessin de l'administration (admin.css), intérieur blanc, cartes nettes. Les
   cartes, tableaux et chiffres gardent pour le reste le dessin de style.css ;
   les jetons ci-dessous le remettent au clair.

   Contrastes mesurés (WCAG 2.1, sur blanc) : texte 18,8:1 · texte second
   8,2:1 · discret 6,0:1 (5,6 sur le fond) · ambre de texte 6,9:1 · barres
   des graphiques 3,7:1 (ambre) et 4,3:1 (vert) · bord des champs 3,1:1.
   Phrase d'état : 8,7:1 sur vert pâle, 8,9:1 sur orangé pâle. Barre latérale
   (sur encre) : texte 15,6:1 · discret 8,3:1 · titres de groupe 6,1:1. */

/* ── Jetons ──────────────────────────────────────────────────────────────── */
:root[data-theme="clair"] body.tableau,
:root[data-theme="clair"] body.page-connexion {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel2: #f0f2f5;
  --line: #d5dae0;
  --text: #0f1216;
  --texte-2: #46505c;
  --muted: #46505c;
  --faint: #5a6470;
  --amber-ink: #8a4a00;
  --ok-ink: #2f6a24;
  --texte-carte: #2b323b;
  --bord-champ: #8a94a0;
  /* Les barres des graphiques : l'ambre de marque tombe à 1,8:1 sur blanc,
     une barre doit tenir 3:1 pour se lire. */
  --courbe-ambre: #c46f00;
  --courbe-vert: #3d8a2f;
  --ombre: 0 1px 2px rgba(15, 18, 22, 0.06), 0 1px 3px rgba(15, 18, 22, 0.05);
  --duree: 0.16s;
  background: var(--bg);
}

body.tableau { margin: 0; }

/* ── Barre latérale ──────────────────────────────────────────────────────── */
/* Dessin et comportement communs avec l'administration : barre.css (chargée
   avant cette feuille) et barre.js. Ici, le pied propre au parc : la langue. */
.barre-langues { display: flex; align-items: center; gap: 12px; padding: 6px 12px; color: var(--barre-discret); }
.barre-langs { display: flex; border: 1px solid var(--barre-ligne); border-radius: 7px; overflow: hidden; }
.barre-langs a {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--barre-discret); text-decoration: none; padding: 5px 10px;
}
.barre-langs a + a { border-left: 1px solid var(--barre-ligne); }
.barre-langs a:hover { color: var(--barre-texte); }
.barre-langs a[aria-current="true"] { color: var(--barre-fond); background: #ffb454; }

.reduite .barre-langues { flex-direction: column; gap: 8px; padding: 6px 0; }
.reduite .barre-langues > .icone { display: none; }
/* Repliée, la barre n'a la place que d'un bouton : l'autre langue. */
.reduite .barre-langs a[aria-current="true"] { display: none; }
.reduite .barre-langs a + a { border-left: 0; }


/* ── Contenu ─────────────────────────────────────────────────────────────── */
/* Toute la largeur de l'écran ; seule la prose garde une mesure lisible. */
.tb-corps { padding: 28px 36px 40px; box-sizing: border-box; width: 100%; min-width: 0; }
.vue > .disclaimer, .vue .card > p, .vue .card > .hint, .ens-calcul > p { max-width: 115ch; }
.tb-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.tb-tete h1 { margin: 0; font-size: 24px; font-weight: 680; letter-spacing: -.015em; line-height: 1.2; color: var(--text); }
.tb-tete .periode { margin: 0; }

/* Les cartes du tableau : blanches, un bord net, une ombre légère. Leurs
   titres se lisent en phrase, pas en petites capitales grises. */
body.tableau .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--ombre); padding: 20px 22px;
}
body.tableau .card h3 {
  margin: 0 0 6px; font-size: 15px; font-weight: 650; letter-spacing: 0; text-transform: none;
  color: var(--text);
}
body.tableau .hint { font-size: 13px; color: var(--faint); line-height: 1.5; }
body.tableau .disclaimer { font-size: 13.5px; color: var(--texte-2); line-height: 1.55; }
.tb-lien { color: var(--amber-ink); font-weight: 550; }
.tb-lien:hover { color: var(--text); }

.tb-echec {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 10px;
  border: 1px solid #f4c7c3; background: #fef3f2; color: #b42318; font-weight: 550;
}
.tb-echec[hidden] { display: none; }
.tb-petit {
  margin: 0; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--line); border-left: 3px solid #ffb454;
  background: var(--panel); font-size: 14px; line-height: 1.5;
}

.vue { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.vue[hidden] { display: none !important; }
.vue-titre { margin: 0; font-size: 19px; font-weight: 650; color: var(--text); }
.vue-partie { margin: 12px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
/* Sans script, les vues s'enchaînent : leur titre sépare alors les parties. */
body:not(.tb-vues) .vue + .vue { border-top: 1px solid var(--line); padding-top: 22px; }
/* Les vues ordonnent leurs blocs dans l'ordre du HTML : les règles d'ordre de
   l'ancienne page de parc (style.css) n'ont rien à y faire. */
body.tableau .vue > * { order: 0; }

.vue .card { margin: 0; }
.vue .disclaimer { margin: 0; }
.vue .exports { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.vue .exports a {
  color: var(--amber-ink); border: 1px solid var(--bord-champ); border-radius: 8px;
  padding: 8px 14px; font-size: 0.9rem; font-weight: 550; text-decoration: none;
}
.vue .exports a:hover { border-color: var(--text); color: var(--text); }

/* Les barres des tableaux et de la courbe, au contraste d'un graphique. */
body.tableau .bar { background: var(--courbe-ambre); }
body.tableau .bar.local { background: var(--courbe-vert); }
body.tableau .sw.cloud { background: var(--courbe-ambre); }
body.tableau .sw.local { background: var(--courbe-vert); }
body.tableau svg rect[fill="var(--amber)"] { fill: var(--courbe-ambre); }
body.tableau svg rect[fill="var(--ok)"] { fill: var(--courbe-vert); }
body.tableau td.n, body.tableau .big strong { color: var(--amber-ink); }

/* ── Vue d'ensemble ──────────────────────────────────────────────────────── */
#vue-apercu { margin-top: 18px; }

/* La phrase d'état : la première chose lue, en couleur. */
.ens-etat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px 16px 52px; border-radius: 12px; position: relative;
  border: 1px solid var(--line); background: var(--panel);
}
.ens-etat::before {
  content: ""; position: absolute; left: 20px; top: 20px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--faint);
}
.ens-etat p { margin: 0; }
.ens-etat-titre { font-size: 17px; font-weight: 650; line-height: 1.4; color: var(--text); }
.ens-etat-aide { font-size: 14.5px; line-height: 1.5; color: var(--texte-2); }
.ens-etat-aide[hidden] { display: none; }
.ens-etat[data-etat="chargement"] { visibility: hidden; }
.ens-etat[data-etat="ok"], .ens-etat[data-etat="sansUsage"] { background: #eaf4e6; border-color: #b7d9ad; }
.ens-etat[data-etat="ok"]::before, .ens-etat[data-etat="sansUsage"]::before { background: #3d8a2f; }
.ens-etat[data-etat="ok"] .ens-etat-titre, .ens-etat[data-etat="sansUsage"] .ens-etat-titre { color: #1f4d17; }
.ens-etat[data-etat="attente"], .ens-etat[data-etat="silence"] { background: #fff3e0; border-color: #f5cf94; }
.ens-etat[data-etat="attente"]::before, .ens-etat[data-etat="silence"]::before { background: #b25e00; }
.ens-etat[data-etat="attente"] .ens-etat-titre, .ens-etat[data-etat="silence"] .ens-etat-titre { color: #6b3600; }
.ens-etat[data-etat="periodeVide"] { background: #eef0f3; border-color: #d5dae0; }

/* Parc vide : un seul bloc, les étapes et qui les fait. */
.ens-attente[hidden], .ens-rempli[hidden], .ens-calcul[hidden] { display: none; }
.ens-sens { font-size: 15.5px; line-height: 1.55; color: var(--text); margin: 0 0 16px; }
.ens-attente h3 { margin-top: 4px; }
.ens-etapes { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: etape; display: grid; gap: 12px; max-width: 90ch; }
.ens-etapes li {
  counter-increment: etape; position: relative;
  padding: 2px 0 0 44px; min-height: 30px;
  font-size: 15px; line-height: 1.55; color: var(--texte-carte);
}
.ens-etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #0f1216; color: #ffffff; font-weight: 700; font-size: 14px;
}
.ens-etapes strong { color: var(--text); }
.ens-contact { margin: 18px 0 0; font-size: 14.5px; color: var(--texte-2); }

.ens-rempli { display: flex; flex-direction: column; gap: 16px; }
.ens-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ens-chiffre { display: flex; flex-direction: column; gap: 6px; }
body.tableau .ens-chiffre h3 { font-size: 14px; font-weight: 600; color: var(--texte-2); margin: 0; }
.ens-valeur {
  margin: 0; font-size: 38px; line-height: 1.1; font-weight: 680; letter-spacing: -.02em;
  color: var(--text); font-family: var(--sans); font-variant-numeric: tabular-nums;
}
.ens-valeur[data-sens="hausse"] { color: #8a4600; }
.ens-valeur[data-sens="baisse"] { color: #2f6a24; }
.ens-ligne { margin: 0; font-size: 14px; line-height: 1.5; color: var(--texte-2); }

.ens-deux { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.ens-deux > .card { height: 100%; box-sizing: border-box; }

/* La courbe de la vue d'ensemble : le dessin de #chart (style.css). */
.courbe { margin-top: 14px; position: relative; padding-left: 50px; }
.courbe svg { width: 100%; height: 160px; display: block; }
.courbe .axe-y span {
  position: absolute; left: 0; width: 42px; text-align: right; transform: translateY(-50%);
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11px; line-height: 1.3; color: var(--faint);
}
.courbe .axe {
  position: relative; height: 16px; margin-top: 6px;
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--faint);
}
.courbe .axe span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.courbe .axe span.debut { transform: none; }
.courbe .axe span.fin { transform: translateX(-100%); }
body.tableau #chart .axe-y span, body.tableau #chart .axe { font-size: 11px; }

/* Les services, en barres horizontales : le nom, la valeur, la barre. */
.ens-barres { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.ens-barres li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.ens-barre-nom { font-size: 14.5px; font-weight: 550; color: var(--text); overflow-wrap: anywhere; }
.ens-barre-val { font-size: 14.5px; font-weight: 600; color: var(--text); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.ens-barre-fond { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.ens-barre-fond i { display: block; height: 100%; border-radius: 5px; background: var(--courbe-ambre); }
.ens-barre-fond i.local { background: var(--courbe-vert); }
.ens-barres li.ens-barres-vide { display: block; font-size: 14px; color: var(--texte-2); }
.ens-suite { margin: 14px 0 0; font-size: 14px; }

/* Trois équivalences, la valeur d'abord. */
.ens-equiv-liste { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ens-equiv-liste li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  padding: 12px 14px; border-radius: 10px; background: var(--panel2);
}
.ens-equiv-liste strong { font-size: 20px; font-weight: 680; color: var(--text); font-family: var(--sans); font-variant-numeric: tabular-nums; }
.ens-equiv-liste span { font-size: 14.5px; color: var(--text); }
.ens-equiv-liste em { flex-basis: 100%; font-style: normal; font-size: 12.5px; color: var(--faint); }

/* Les précautions, repliées derrière un lien. */
.ens-calcul > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--amber-ink);
}
.ens-calcul > summary::-webkit-details-marker { display: none; }
.ens-calcul > summary::before {
  content: "+"; flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--bord-champ);
  font-family: var(--mono); font-size: 14px; line-height: 1; color: var(--text);
}
.ens-calcul[open] > summary::before { content: "−"; }
.ens-calcul > summary:hover { color: var(--text); }
.ens-calcul > summary:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }
.ens-calcul[open] > summary { margin-bottom: 12px; }
#vue-apercu .ens-calcul > p, #vue-apercu .ens-calcul > ul { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--texte-2); }
#vue-apercu .ens-calcul > p.hint:first-of-type { margin-top: 0; }
.ens-calcul .cadence { font-size: 13px; }

/* ── Accessibilité ───────────────────────────────────────────────────────── */
.tb-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.tb-evitement {
  position: absolute; left: 12px; top: -60px; z-index: 70;
  padding: 9px 14px; border-radius: 8px;
  background: #ffb454; color: #0f1216; font-weight: 600; text-decoration: none;
}
.tb-evitement:focus { top: 12px; }
.tb-corps:focus { outline: none; }
.tb-corps a:focus-visible,
.tb-corps select:focus-visible,
.tb-corps button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 3px; }

body.tableau .eq em { color: var(--muted); }

/* ── La période ──────────────────────────────────────────────────────────── */
.tb-tete .periode { align-items: center; gap: 10px; }
body.tableau .periode-titre { color: var(--texte-2); font-weight: 600; }
body.tableau .periode-choix button { color: var(--texte-2); border-color: var(--bord-champ); background: var(--panel); padding: 6px 13px; font-size: 13px; }
body.tableau .periode-choix button:hover { color: var(--text); border-color: var(--text); }
body.tableau .periode-choix button[aria-pressed="true"] { color: #ffffff; background: #0f1216; border-color: #0f1216; }
.periode-civile select {
  font: inherit; font-size: 13px; color: var(--text);
  background: var(--panel); border: 1px solid var(--bord-champ); border-radius: 6px;
  padding: 6px 8px; max-width: 220px; cursor: pointer;
}
.periode-civile select:hover { border-color: var(--text); }
.tb-periode {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  margin: 10px 0 0; font-size: 14px; color: var(--texte-2);
}
.tb-periode:empty { display: none; }
.tb-periode strong { color: var(--text); font-weight: 600; }
.tb-reserves {
  list-style: none; margin: 10px 0 0; padding: 10px 14px;
  border: 1px solid var(--line); border-left: 3px solid #ffb454;
  border-radius: 8px; background: var(--panel);
  font-size: 14px; line-height: 1.5; color: var(--text);
  display: grid; gap: 6px;
}
.tb-reserves[hidden] { display: none; }

/* ── Tableaux ────────────────────────────────────────────────────────────── */
body.tableau th {
  padding: 0 0 6px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); text-align: left;
}
body.tableau th.k, body.tableau th.n { text-align: right; }
body.tableau td.k { padding-right: 18px; white-space: nowrap; }
body.tableau th.k { padding-right: 18px; }
.tb-etiquette {
  margin-left: 8px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--sans, inherit); font-size: 11px; color: var(--muted); white-space: nowrap;
}

/* Au-delà du détail par poste, ces blocs n'ont plus rien à dire : la vue
   porte une phrase qui l'explique (app.js), eux se retirent. */
body[data-detail="aucun"] .bloc-equipes,
body[data-detail="aucun"] #segments-aucun,
body[data-detail="aucun"] .bloc-zones,
body[data-detail="aucun"] #versions,
body[data-detail="aucun"] #versions-note { display: none !important; }

/* ── Postes et déploiement ───────────────────────────────────────────────── */
.tb-faits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 4px 0 12px; }
.tb-faits div { margin: 0; }
.tb-faits dt { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.tb-faits dd { margin: 5px 0 0; font-size: 20px; color: var(--amber-ink); }
.tb-faits dd:not(.mono) { font-size: 15px; color: var(--text); line-height: 1.75; }
.vue .card > p { line-height: 1.55; }
.vue .card > p.hint { margin-top: 8px; }
.bloc-couverture .jauge { max-width: 420px; }
.bloc-couverture .jauge[hidden] { display: none; }
body.tableau .jauge i { background: var(--courbe-ambre); }

/* ── Bilan annuel ────────────────────────────────────────────────────────── */
.tb-bilan { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 12px; }
.tb-bilan label { display: grid; gap: 5px; font-size: 13px; color: var(--texte-2); }
.tb-bilan select {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--bord-champ); border-radius: 6px; padding: 7px 10px;
}
.tb-bouton {
  display: inline-block; padding: 9px 16px; border-radius: 8px;
  background: #0f1216; color: #ffffff; font-weight: 600; font-size: 14px; text-decoration: none;
}
.tb-bouton:hover { background: #262e38; }
.tb-bouton[aria-disabled="true"] { background: var(--panel2); color: var(--faint); cursor: not-allowed; }

.tb-pied { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); }
.tb-methode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.tb-methode .method-col { display: block; }
body.tableau .method-col p { color: var(--texte-carte); }
body.tableau .big { background: var(--panel2); border-color: var(--line); }
body.tableau .big .label { color: var(--texte-2); }
body.tableau .big .hint { color: var(--faint); }

/* ── Les six autres vues ──────────────────────────────────────────────── */
/* Un parc qui n'a encore rien reçu : une phrase et un lien vers les étapes,
   à la place des tableaux vides. Postes et déploiement garde la version à
   installer et le contact ; Méthode, tout. */
.vue-vide, .vue-vide-postes { display: none; }
body[data-etat="attente"] .vue-vide,
body[data-etat="attente"] .vue-vide-postes { display: block; font-size: 15px; line-height: 1.55; color: var(--text); }
body[data-etat="attente"] .vue-vide { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
body[data-etat="attente"] :is(#vue-evolution, #vue-services, #vue-equipes, #vue-rapports) > :not(.vue-titre):not(.vue-vide),
body[data-etat="attente"] #vue-postes > :is(.bloc-couverture, .bloc-versions, .bloc-voies, .bloc-zones, .disclaimer),
body[data-etat="attente"] .tb-tete .periode,
body[data-etat="attente"] #periode-resume { display: none !important; }

.vue:not(#vue-apercu) .card > p:not(.hint):not(.ens-valeur):not(.ens-ligne):not(.bval):not(.bandeau-tete), .ra-document > p:not(.ra-action) { font-size: 14.5px; line-height: 1.6; color: var(--texte-carte); margin: 8px 0 0; }
.vue .card > h3 + p.hint { margin-top: 2px; }

/* Évolution. */
.ev-reperes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.ev-repere { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--panel2); }
.ev-repere-nom { font-size: 13.5px; font-weight: 600; color: var(--texte-2); }
.ev-repere strong { font-size: 26px; font-weight: 680; letter-spacing: -.01em; color: var(--text); font-variant-numeric: tabular-nums; }
.ev-repere-ligne { font-size: 13px; line-height: 1.5; color: var(--texte-2); }
.ev-ecart { display: flex; flex-direction: column; gap: 6px; }

/* Les tableaux des vues : nom et barre, puis les nombres en clair. */
body.tableau td.n { font-family: var(--sans); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
body.tableau td.k { color: var(--texte-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
body.tableau .vue table td { padding: 10px 0; font-size: 14.5px; }
body.tableau .vue table .bar { height: 6px; border-radius: 3px; margin-top: 6px; }
.bloc-locaux .chiffre { display: block; margin-top: 10px; font-size: 26px; font-weight: 680; color: var(--text); }
.bloc-locaux.sans-valeur .chiffre { font-size: 15px; font-weight: 500; color: var(--texte-2); }

/* Équipes. */
.tm-aucune[hidden] { display: none; }
.tm-aucune { border-left: 3px solid #ffb454; }

/* Postes et déploiement. */
.bloc-couverture .bval { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 10px; }
.bloc-couverture .bval strong { font-size: 32px; font-weight: 680; color: var(--text); }
.bloc-couverture .bunit { font-size: 15px; color: var(--texte-2); }
.bloc-couverture .ens-ligne { margin: 8px 0 0; }
.bloc-couverture .ens-ligne[hidden] { display: none; }
.tb-faits dd { font-family: var(--sans); font-weight: 650; color: var(--text); }
.vue-vide-postes { border-left: 3px solid #ffb454; }

/* Rapports. */
.ra-periode { margin: 0; }
.ra-documents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ra-document { display: flex; flex-direction: column; }
.ra-action { margin: auto 0 0; padding-top: 16px; }
.tb-bouton-second { background: var(--panel); color: var(--text); border: 1px solid var(--text); }
.tb-bouton-second:hover { background: var(--panel2); }

/* Méthode. */
.me-blocs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.me-trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.me-blocs > .card { margin: 0; }

/* Sur un écran large, les cartes se rangent côte à côte, vue par vue. */
@media (min-width: 1100px) {
  /* style.css place les blocs de l'ancienne page de parc par colonne : ici,
     chacun prend la case que sa vue lui donne. */
  body.tableau .vue > * { grid-column: auto; }
  #vue-evolution { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: stretch; }
  #vue-evolution > .vue-titre, #vue-evolution > .vue-vide, #vue-evolution > .bloc-journalier { grid-column: 1 / -1; }
  #vue-services { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  #vue-services > .vue-titre, #vue-services > .vue-vide, #vue-services > .bloc-services { grid-column: 1 / -1; }
  #vue-postes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  #vue-postes > :is(.vue-titre, .vue-vide-postes, .disclaimer, .bloc-voies, .bloc-zones) { grid-column: 1 / -1; }
  body[data-etat="attente"] #vue-postes { align-items: start; }
}

/* ── Pages d'entrée et des comptes ───────────────────────────────────────── */
/* Les pages sans session : un bandeau foncé avec le logo, puis la carte. */
.acces-bandeau {
  display: flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 0 16px; background: #0f1216;
}
.acces-bandeau img { width: 156px; height: auto; display: block; }
body.page-connexion:not(.page-acces) .shell { padding-top: 24px; }
body.page-connexion .card { box-shadow: var(--ombre); border-color: var(--line); }
body.page-connexion .connexion h2 { color: var(--text); }
body.page-connexion .hint { color: var(--faint); }
body.page-connexion .connexion input,
body.page-connexion .card input[type="text"],
body.page-connexion .card input[type="password"],
body.page-connexion .card select { border-color: var(--bord-champ); background: #ffffff; color: var(--text); }
body.page-connexion .connexion button,
body.page-connexion .card button { border-color: #0f1216; color: #0f1216; font-weight: 600; }
body.page-connexion .connexion button:hover,
body.page-connexion .card button:hover { background: #0f1216; color: #ffffff; border-color: #0f1216; }
body.page-connexion main a { color: var(--amber-ink); }
body.page-connexion main a:hover { color: var(--text); }
body.page-connexion .pied-connexion a { color: var(--texte-2); }
/* La page des comptes, ouverte avec une session : la barre du tableau de
   bord à gauche, les cartes sur toute la largeur. */
.acces-corps { display: flex; flex-direction: column; gap: 16px; }
.acces-corps > .card { margin: 0; }
.acces-corps > .card h2 { font-size: 16px; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--text); }
.acces-corps > .card h3 { font-size: 14.5px; }

/* ── Téléphone et tablette : la barre devient un menu ───────────────────── */
@media (max-width: 860px) {
  .reduite .barre-langues { flex-direction: row; padding: 6px 12px; }
  .reduite .barre-langues > .icone { display: block; }
  .reduite .barre-langs a[aria-current="true"] { display: inline; }
  .reduite .barre-langs a + a { border-left: 1px solid var(--barre-ligne); }

  .tb-corps { padding: 18px 16px 32px; }
  .tb-tete h1 { font-size: 21px; }
  .ens-chiffres { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ens-deux { grid-template-columns: minmax(0, 1fr); }
  .ens-valeur { font-size: 32px; }
  .ens-etat { padding: 14px 16px 14px 44px; }
  .ens-etat::before { left: 16px; top: 19px; }
  .ens-etat-titre { font-size: 16px; }
  body.tableau .card { padding: 16px; }
  .courbe { padding-left: 46px; }
  .courbe .axe span:nth-child(even) { display: none; }
  .tb-methode { grid-template-columns: minmax(0, 1fr); }
  .tb-faits { grid-template-columns: minmax(0, 1fr); }
  .tb-tete .periode { width: 100%; }
  .periode-choix { flex-wrap: wrap; }
  .ev-reperes, .ra-documents, .me-blocs, .me-trois { grid-template-columns: minmax(0, 1fr); }
  /* Les tableaux gardent toute la largeur ; les nombres ne se coupent pas. */
  body.tableau .vue th, body.tableau .vue td.n, body.tableau .vue td.k { white-space: nowrap; }
  body.tableau .vue th.k, body.tableau .vue td.k { padding-right: 10px; padding-left: 8px; }
  body.tableau .vue th.n { padding-left: 8px; }
  body.tableau .vue table td { font-size: 14px; }
}

/* À l'impression, les vues se suivent, chacune sous son titre. Ce qui ne sert
   qu'à l'écran se retire : barre latérale, choix de période, lien
   d'évitement. La période imprimée est celle de la ligne de résumé ; les
   précautions s'impriment dépliées. */
@media print {
  .tb { display: block; padding: 0; background: none; }
  .barre, .entete-mobile, .voile, .tb-evitement, .tb-tete .periode, .tb-bilan, .ens-suite { display: none !important; }
  .tb-corps { padding: 0; }
  .vue[hidden] { display: flex !important; }
  .vue { break-inside: auto; }
  .vue + .vue { border-top: 1px solid var(--line); padding-top: 18px; }
  .vue-titre { break-after: avoid; }
  #vue-apercu .vue-titre { position: static; width: auto; height: auto; margin: 0; clip-path: none; overflow: visible; }
  body.tableau .card { box-shadow: none; }
  .vue .card, .tb-periode, .tb-reserves, .hero .big, .ens-chiffre, .ens-etat { break-inside: avoid; }
  .card h3 { break-after: avoid; }
  tr { break-inside: avoid; }
  .ens-calcul > summary::before { content: none; }
  .ens-chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ens-deux { grid-template-columns: minmax(0, 1fr); }
  /* Les barres et les pastilles sont des fonds : sans cela, l'impression les
     efface et ne laisse que les chiffres. */
  .ens-barre-fond, .ens-barre-fond i, .ens-etat, .ens-etat::before, .ens-etapes li::before,
  body.tableau .bar, body.tableau .jauge, body.tableau .jauge i, .ens-equiv-liste li {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .tb-lien::after, #dep-contact::after { content: none; }
}
