/* Feuille du portail AIguilleur, assemblé à partir de : jetons-tco.css, composition-tco.css, table-filters.css, portail-adaptations.css. */

/* ---- jetons-tco.css ---- */
/* tokens-tco.css — maquette complète du portail, direction B « TCO » retenue (D-19 d, 10/11/2026).
   Copie de directions-20261110/tokens-b.css : aucune valeur de couleur, de police ni d'espacement
   n'a changé. Deux ajouts : les déclarations de paires (--paires-contraste, --paires-interface),
   étendues aux paires que la maquette pose en plus des deux écrans de B, et --focus-anneau-plaque,
   l'anneau de focus clair des contrôles posés sur une plaque sombre (bandeau de maquette).
   Monde : le tableau de contrôle optique à mosaïque d'un poste d'aiguillage. Pavés gris-vert,
   voies tracées, voyants de signal, étiquettes gravées en stratifié sombre. Teinte d'accent : 195. */
:root {
  color-scheme: light;

  --fond: oklch(0.905 0.012 190);
  --surface: oklch(0.955 0.008 190);
  --surface-schema: oklch(0.935 0.010 190);
  --surface-plaque: oklch(0.290 0.022 200);
  --surface-creuse: oklch(0.880 0.012 190);
  --texte: oklch(0.215 0.020 200);
  --texte-faible: oklch(0.395 0.020 200);
  --texte-plaque: oklch(0.950 0.006 190);
  --texte-alerte: oklch(0.450 0.170 27);
  --trait: oklch(0.790 0.012 190);
  --trait-mosaique: oklch(0.875 0.012 190);
  --trait-fort: oklch(0.215 0.020 200);
  --voie: oklch(0.300 0.020 200);
  --voie-coupee: oklch(0.600 0.016 200);
  --accent: oklch(0.420 0.080 200);
  --accent-contraste: oklch(0.975 0.004 190);
  --selection-fond: oklch(0.860 0.070 95);
  --selection-texte: oklch(0.215 0.020 200);
  --surligne-fond: oklch(0.860 0.070 95);
  --surligne-texte: oklch(0.215 0.020 200);

  /* Voyants : un feu par état, cerclé d'une lunette. */
  --voyant-vert: oklch(0.560 0.150 150);
  --voyant-rouge: oklch(0.540 0.190 27);
  --voyant-ambre: oklch(0.760 0.150 75);
  --voyant-eteint: oklch(0.845 0.010 190);
  --voyant-blanc: oklch(0.975 0.004 190);
  --voyant-lunette: oklch(0.215 0.020 200);
  --texte-repond: oklch(0.400 0.120 150);
  --texte-refus: oklch(0.450 0.170 27);
  --texte-panne: oklch(0.440 0.100 65);
  --texte-attente: oklch(0.395 0.020 200);
  --texte-nonverif: oklch(0.380 0.050 230);

  --focus-anneau: oklch(0.420 0.080 200);
  --focus-anneau-plaque: oklch(0.950 0.006 190);
  --focus-decalage: 2px;
  --surfaces-hors-focus: --surface-plaque, --surligne-fond, --selection-fond;
  --paires-contraste: --texte-plaque sur --surface-plaque, --accent-contraste sur --accent, --texte-repond sur --surface, --texte-refus sur --surface, --texte-panne sur --surface, --texte-nonverif sur --surface, --texte-faible sur --surface-schema, --texte sur --fond, --texte sur --surface, --texte-faible sur --fond, --texte-faible sur --surface, --texte-alerte sur --surface, --accent sur --surface, --accent sur --fond, --selection-texte sur --selection-fond;
  --paires-interface: --voyant-lunette sur --surface-schema, --trait-fort sur --surface, --trait-fort sur --fond, --voie sur --surface-schema, --voie-coupee sur --surface-schema, --focus-anneau-plaque sur --surface-plaque;

  --police-titre: "Michroma", ui-sans-serif, system-ui, sans-serif;
  --police-corps: "Barlow", ui-sans-serif, system-ui, sans-serif;
  --police-mono: "JetBrains Mono", ui-monospace, monospace;
  --police-id: "JetBrains Mono", ui-monospace, monospace;

  --texte-xs: 0.8125rem;
  --texte-sm: 1rem;
  --texte-md: 1.125rem;
  --texte-lg: 1.375rem;
  --texte-xl: 1.875rem;
  --texte-2xl: 2.625rem;
  --texte-3xl: 3.25rem;

  --espace-2xs: 4px;
  --espace-xs: 8px;
  --espace-sm: 12px;
  --espace-md: 16px;
  --espace-lg: 24px;
  --espace-xl: 40px;
  --espace-2xl: 56px;
  --espace-3xl: 80px;

  --rayon-sm: 3px;
  --rayon-md: 6px;
  --rayon-lg: 14px;

  --dur-etat: 120ms;
  --dur-local: 160ms;
  --dur-ancre: 200ms;
  --dur-surface: 280ms;
  --dur-plafond: 300ms;
  --ease-apparition: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-disparition: cubic-bezier(0.4, 0, 1, 1);
  --ease-deplacement: cubic-bezier(0.4, 0, 0.2, 1);
  --echelle-entree: 0.96;
  --echelle-appui: 0.97;

  --blue: var(--accent);
  --line: var(--trait);
  --ink: var(--texte);
  --muted: var(--texte-faible);
  --red: var(--texte-alerte);
  --bg: var(--fond);
  --r-sm: var(--rayon-sm);
  --sans: var(--police-corps);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --fond: oklch(0.225 0.014 200);
  --surface: oklch(0.265 0.016 200);
  --surface-schema: oklch(0.245 0.015 200);
  --surface-plaque: oklch(0.150 0.010 200);
  --surface-creuse: oklch(0.300 0.016 200);
  --texte: oklch(0.935 0.008 190);
  --texte-faible: oklch(0.770 0.012 190);
  --texte-plaque: oklch(0.935 0.008 190);
  --texte-alerte: oklch(0.770 0.110 27);
  --trait: oklch(0.400 0.014 200);
  --trait-mosaique: oklch(0.300 0.014 200);
  --trait-fort: oklch(0.935 0.008 190);
  --voie: oklch(0.880 0.010 190);
  --voie-coupee: oklch(0.560 0.012 200);
  --accent: oklch(0.790 0.085 195);
  --accent-contraste: oklch(0.200 0.014 200);
  --selection-fond: oklch(0.780 0.090 95);
  --selection-texte: oklch(0.200 0.014 200);
  --surligne-fond: oklch(0.780 0.090 95);
  --surligne-texte: oklch(0.200 0.014 200);

  --voyant-vert: oklch(0.720 0.150 150);
  --voyant-rouge: oklch(0.660 0.160 27);
  --voyant-ambre: oklch(0.800 0.130 75);
  --voyant-eteint: oklch(0.360 0.010 200);
  --voyant-blanc: oklch(0.930 0.006 190);
  --voyant-lunette: oklch(0.700 0.012 190);
  --texte-repond: oklch(0.800 0.130 150);
  --texte-refus: oklch(0.770 0.110 27);
  --texte-panne: oklch(0.820 0.110 75);
  --texte-attente: oklch(0.770 0.012 190);
  --texte-nonverif: oklch(0.800 0.060 230);

  --focus-anneau: oklch(0.790 0.085 195);
  --focus-anneau-plaque: oklch(0.935 0.008 190);
}

/* ---- composition-tco.css ---- */
/* maquette.css — maquette complète du portail AIguilleur, direction B « TCO ».
   Mécanique et composition ; aucune couleur ni police littérale : jetons de tokens-tco.css seulement.
   Reprend base.css et ecran-b.css de la direction B (10/11/2026), étendus aux dix écrans.
   Ajustement à la marge déclaré : densité de l'écran des clés (tête d'écran, ligne de table, outils). */

/* ── Socle ─────────────────────────────────────────────────────────────────────────── */
:root { --gouttiere: clamp(16px, 3vw, 96px); --hauteur-voie: 56px; --largeur-lecture: 72ch; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police-corps); font-size: var(--texte-sm); line-height: 1.5; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.evitement { position: absolute; left: -9999px; top: var(--espace-xs); z-index: 90; padding: var(--espace-xs) var(--espace-md); background: var(--surface); color: var(--texte); border: 2px solid var(--trait-fort); border-radius: var(--rayon-sm); }
.evitement:focus { left: var(--espace-md); }
:focus-visible { outline: 3px solid var(--focus-anneau); outline-offset: var(--focus-decalage); }
::selection { background: var(--selection-fond); color: var(--selection-texte); }
input, select, textarea, button { font: inherit; color: inherit; }
caption { text-align: left; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
code, pre { font-family: var(--police-mono); }
.n, th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; }
.id-modele { font-family: var(--police-id); font-size: 0.92em; overflow-wrap: anywhere; }
.id-org { color: var(--texte-faible); }
mark.find-hit { background: var(--surligne-fond); color: var(--surligne-texte); border-radius: var(--rayon-sm); display: inline; padding: 0; margin: 0; }

/* Données selon le rôle et le scénario de la maquette (réglages du bandeau). */
html[data-role="membre"] [data-pour-role="admin"], html[data-role="admin"] [data-pour-role="membre"],
html[data-scenario="vide"] [data-pour-scenario="recette"], html[data-scenario="recette"] [data-pour-scenario="vide"] { display: none !important; }
html[data-entete="public"] [data-pour-entete]:not([data-pour-entete~="public"]),
html[data-entete="session"] [data-pour-entete]:not([data-pour-entete~="session"]),
html[data-entete="impose"] [data-pour-entete]:not([data-pour-entete~="impose"]) { display: none !important; }

/* ── Plaques gravées, voyants, voies : le vocabulaire du TCO ───────────────────────── */
.plaque { display: inline-block; margin: 0; padding: var(--espace-xs) var(--espace-md); border-radius: var(--rayon-sm);
  background: var(--surface-plaque); color: var(--texte-plaque); font-family: var(--police-titre); font-weight: 400;
  font-size: var(--texte-xs); line-height: 1.3; letter-spacing: 0.12em; text-transform: uppercase; justify-self: start; }
.plaque-titre { font-size: var(--texte-xs); }
.plaque-petite { padding: var(--espace-2xs) var(--espace-sm); }
.voyant { display: inline-block; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--voyant-lunette); background: var(--voyant-eteint); vertical-align: middle; }
.voyant-repond { background: var(--voyant-vert); }
.voyant-refusee { background: var(--voyant-rouge); }
.voyant-injoignable { background: var(--voyant-ambre); }
.voyant-a-saisir { background: var(--voyant-eteint); }
.voyant-non-verifiable { background: var(--voyant-blanc); border-style: dashed; }
.voyant-moyen { width: 18px; height: 18px; border-width: 2px; }
.voyant-petit { width: 14px; height: 14px; border-width: 2px; margin-right: var(--espace-xs); }
.voie-trait { display: block; height: 4px; background: var(--voie); border-radius: var(--rayon-sm); }
.voie-coupee .voie-trait { height: 0; background: transparent; border-top: 3px dashed var(--voie-coupee); }
.mosaique { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: linear-gradient(var(--trait-mosaique) 1px, transparent 1px), linear-gradient(90deg, var(--trait-mosaique) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px; }
.etiquette-maquette { display: inline-flex; align-items: center; padding: var(--espace-2xs) var(--espace-sm); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-sm);
  color: var(--texte-faible); font-size: var(--texte-xs); font-weight: 500; line-height: 1.3; }

/* ── Bandeau de maquette (hors produit) ───────────────────────────────────────────── */
.maquette { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-xs) var(--espace-sm);
  padding: var(--espace-xs) var(--gouttiere); background: var(--surface-plaque); color: var(--texte-plaque); }
/* Sur la plaque sombre du bandeau, l'anneau de focus prend sa variante claire, prescrite aux jetons. */
.maquette { --focus-anneau: var(--focus-anneau-plaque); }
.bandeau-demo { display: flex; align-items: center; gap: var(--espace-sm); margin: 0; font-size: var(--texte-xs); font-weight: 500; letter-spacing: 0.04em; }
.plaque-maquette { border: 2px solid var(--texte-plaque); padding: var(--espace-2xs) var(--espace-sm); }
.maquette-nav { display: flex; flex-wrap: nowrap; gap: var(--espace-2xs); flex: 1 1 auto; justify-content: center; min-width: 0; }
.onglet { display: inline-flex; align-items: center; gap: var(--espace-2xs); min-height: 32px; padding: var(--espace-2xs) var(--espace-xs); border-radius: 999px;
  color: var(--texte-plaque); text-decoration: none; font-weight: 500; font-size: var(--texte-xs); white-space: nowrap; border: 2px solid transparent;
  transition-property: background-color, color, border-color; transition-duration: var(--dur-etat); transition-timing-function: var(--ease-apparition); }
.onglet[aria-selected="true"] { background: var(--surface); color: var(--texte); border-color: var(--surface); }
.onglet-maquette { border-style: dashed; border-color: var(--texte-plaque); }
@media (hover: hover) { .onglet:hover { border-color: var(--texte-plaque); } }
.maquette-reglages { position: relative; }
.maquette-reglages > summary { display: inline-flex; align-items: center; min-height: 32px; padding: var(--espace-2xs) var(--espace-md); border: 2px solid var(--texte-plaque); border-radius: 999px;
  cursor: pointer; font-weight: 700; font-size: var(--texte-xs); list-style: none; white-space: nowrap; }
.maquette-reglages > summary::-webkit-details-marker { display: none; }
.maquette-reglages > summary .ico { width: 16px; height: 16px; margin-left: var(--espace-2xs); }
.maquette-reglages[open] > summary .ico { transform: rotate(180deg); }
/* Le contenu d'un <details> fermé est hors rendu : la règle le dit au lieu de s'en remettre au navigateur. */
.maquette-reglages:not([open]) > .reglages-corps { display: none; }
.reglages-corps { position: absolute; right: 0; top: calc(100% + 8px); width: min(440px, 92vw); max-height: min(72vh, 640px); overflow: auto; overscroll-behavior: contain;
  display: grid; gap: var(--espace-md); padding: var(--espace-lg); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface); color: var(--texte); }
.reglage { margin: 0; padding: 0; border: 0; display: grid; gap: var(--espace-2xs); }
.reglage legend, .reglage-titre { padding: 0; margin-bottom: var(--espace-2xs); font-family: var(--police-titre); font-size: var(--texte-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.choix { display: flex; align-items: center; gap: var(--espace-sm); min-height: 32px; cursor: pointer; }
.choix input { width: 18px; height: 18px; accent-color: var(--accent); }
.liste-etats { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--espace-xs); }
.lien-etat { display: inline-flex; align-items: center; min-height: 32px; padding: var(--espace-2xs) var(--espace-sm); border: 2px solid var(--trait-fort); border-radius: 999px; color: var(--texte); text-decoration: none; font-size: var(--texte-xs); font-weight: 500; }
.lien-etat[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contraste); }
.reglage-note { color: var(--texte-faible); font-size: var(--texte-xs); }

/* ── En-tête du portail ───────────────────────────────────────────────────────────── */
.entete { display: flex; align-items: center; gap: var(--espace-md) var(--espace-xl); padding: var(--espace-sm) var(--gouttiere); border-bottom: 2px solid var(--trait-fort); }
.marque { margin: 0; display: flex; align-items: center; gap: var(--espace-sm); font-size: inherit; font-weight: 400; }
.marque-nom { padding: var(--espace-xs) var(--espace-md); border-radius: var(--rayon-sm); background: var(--surface-plaque); color: var(--texte-plaque);
  font-family: var(--police-titre); font-size: var(--texte-md); letter-spacing: 0.1em; }
.marque-org { font-family: var(--police-titre); font-size: var(--texte-xs); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.nav-produit { flex: 1 1 auto; }
.nav-liste { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-xs); margin: 0; padding: 0; list-style: none; }
.lien-nav { display: inline-flex; align-items: center; min-height: 40px; padding: var(--espace-xs) var(--espace-md); border: 2px solid var(--trait-fort); border-radius: 999px;
  color: var(--texte); background: var(--surface); text-decoration: none; font-weight: 700;
  transition-property: background-color, color; transition-duration: var(--dur-etat); transition-timing-function: var(--ease-apparition); }
.lien-nav[aria-current="page"] { background: var(--accent); color: var(--accent-contraste); border-color: var(--accent); }
@media (hover: hover) { .lien-nav:not([aria-current="page"]):hover { background: var(--surface-creuse); } }
.badge-mise-en-service { display: inline-flex; align-items: center; gap: var(--espace-2xs); padding: var(--espace-2xs) var(--espace-sm); border-radius: 999px; background: var(--selection-fond); color: var(--selection-texte); font-size: var(--texte-xs); font-weight: 700; }
.entete-outils { display: flex; align-items: center; gap: var(--espace-md); margin-left: auto; }
.session { display: flex; align-items: center; gap: var(--espace-sm); }
.session form { margin: 0; }
.session-qui { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.session-login { font-weight: 700; }
.session-role { font-size: var(--texte-xs); color: var(--texte-faible); }
.entete .bouton-menu { display: none; }

/* ── Boutons ─────────────────────────────────────────────────────────────────────── */
.bouton, .theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: var(--espace-xs); min-height: 40px; padding: var(--espace-xs) var(--espace-md);
  border: 2px solid var(--trait-fort); border-radius: 999px; background: var(--surface); color: var(--texte); font-weight: 700; text-decoration: none; cursor: pointer;
  transition-property: background-color, color, border-color, transform; transition-duration: var(--dur-etat); transition-timing-function: var(--ease-apparition); }
.theme-toggle[aria-pressed="true"] { background: var(--accent); color: var(--accent-contraste); border-color: var(--accent); }
.bouton-principal { background: var(--accent); color: var(--accent-contraste); border-color: var(--accent); }
.bouton-grand { min-height: 52px; padding: var(--espace-sm) var(--espace-xl); font-size: var(--texte-md); }
.bouton-discret { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.bouton-ligne { min-height: 32px; padding: var(--espace-2xs) var(--espace-sm); font-size: var(--texte-xs); }
.bouton-danger { color: var(--texte-alerte); border-color: var(--texte-alerte); }
.bouton-danger-plein { background: var(--texte-alerte); border-color: var(--texte-alerte); color: var(--accent-contraste); }
.bouton:disabled { cursor: not-allowed; border-style: dashed; color: var(--texte-faible); background: var(--fond); }
.bouton[aria-busy="true"] { cursor: progress; }
@media (hover: hover) {
  .bouton:not(.bouton-principal):not(.bouton-danger-plein):not(:disabled):hover, .theme-toggle:hover, .bouton.est-survol:not(.bouton-principal) { background: var(--surface-creuse); }
  .bouton-principal:not(:disabled):hover { background: var(--trait-fort); border-color: var(--trait-fort); color: var(--surface); }
}
.bouton-principal.est-survol { background: var(--trait-fort); border-color: var(--trait-fort); color: var(--surface); }
.est-focus { outline: 3px solid var(--focus-anneau); outline-offset: var(--focus-decalage); }
.est-actif { transform: scale(var(--echelle-appui)); }
button:active:not(:disabled), .bouton:active, .lien-nav:active, .onglet:active, summary:active { transform: scale(var(--echelle-appui)); }
.charge { width: 16px; height: 16px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: tourner calc(var(--dur-plafond) * 3) linear infinite; }
@keyframes tourner { to { transform: rotate(360deg); } }
.bouton-segment { min-height: 44px; padding: var(--espace-2xs) var(--espace-md); border: 2px solid var(--trait-fort); background: var(--surface); color: var(--texte); font-weight: 700; font-size: var(--texte-xs); cursor: pointer;
  transition-property: background-color, color; transition-duration: var(--dur-etat); transition-timing-function: var(--ease-apparition); }
.bouton-segment + .bouton-segment { border-left-width: 0; }
.bouton-segment:first-child { border-radius: 999px 0 0 999px; }
.bouton-segment:last-child { border-radius: 0 999px 999px 0; }
.bouton-segment[aria-pressed="true"] { background: var(--surface-plaque); color: var(--texte-plaque); border-color: var(--surface-plaque); }
.lien-fort { font-weight: 700; color: var(--accent); }

/* ── Mise en page des écrans ─────────────────────────────────────────────────────── */
main { padding: 0 var(--gouttiere) var(--espace-2xl); }
.ecran { display: grid; gap: var(--espace-lg); }
.tete-ecran { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--espace-2xs) var(--espace-xl); padding: var(--espace-md) 0 0; }
.tete-ecran > .aide-page { grid-column: 1 / -1; }
.tete-texte { display: grid; gap: var(--espace-2xs); }
.titre-ecran { margin: 0; font-family: var(--police-titre); font-weight: 400; font-size: var(--texte-xl); line-height: 1.15; letter-spacing: 0.06em; text-transform: uppercase; }
.titre-suite { margin-left: var(--espace-md); font-family: var(--police-corps); font-size: var(--texte-lg); letter-spacing: 0; text-transform: none; color: var(--texte-faible); }
.chapeau { color: var(--texte-faible); font-size: var(--texte-md); }
.tete-droite { display: flex; align-items: center; gap: var(--espace-md); }
.compteurs-ligne { display: flex; flex-wrap: wrap; gap: var(--espace-xs); margin: 0; }
.compteurs-ligne > div { display: flex; flex-direction: row-reverse; align-items: baseline; gap: var(--espace-xs); padding: var(--espace-2xs) var(--espace-md); border: 2px solid var(--trait-fort); border-radius: 999px; background: var(--surface); }
.compteurs-ligne dt { color: var(--texte-faible); font-size: var(--texte-xs); }
.compteurs-ligne dd { margin: 0; font-family: var(--police-mono); font-weight: 400; }
.compteur-alerte { border-color: var(--texte-alerte) !important; }
.compteur-alerte dd { color: var(--texte-alerte); }
.module { position: relative; padding: var(--espace-lg); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface); min-width: 0; }
.module-tete { display: grid; justify-items: start; gap: var(--espace-xs); margin-bottom: var(--espace-md); }
.module-tete-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--espace-sm); }
.module-tete-outils { justify-items: stretch; margin-bottom: var(--espace-sm); }
.module-tete-outils > .plaque { justify-self: start; }
.module-note { color: var(--texte-faible); font-size: var(--texte-xs); }
.module-chiffre { color: var(--texte-faible); }
.module-chiffre .valeur { font-family: var(--police-mono); font-size: var(--texte-lg); color: var(--texte); margin-right: var(--espace-2xs); }
.module-lien { margin-top: var(--espace-md); font-weight: 700; }
.barre-outils { display: flex; flex-wrap: wrap; align-items: end; gap: var(--espace-sm) var(--espace-md); }
/* Le compte d'occurrences ne compte pas dans la hauteur du bloc : sinon, la barre alignée par le bas
   descend ses boutons de 24 px sous le champ dès qu'une recherche est saisie (render_page, états
   ouverts, controles_desalignes). Sa place est réservée sous la barre, pour que rien ne bouge à la saisie. */
.barre-outils:has(> .recherche) { padding-bottom: calc(var(--texte-xs) * 1.5 + var(--espace-2xs)); row-gap: calc(var(--texte-xs) * 1.5 + var(--espace-2xs) + var(--espace-sm)); }
.barre-outils > .bouton-principal { margin-left: auto; }
.recherche { position: relative; display: flex; flex-direction: column; gap: var(--espace-2xs); flex: 0 1 380px; min-width: 220px; }
.recherche label { font-weight: 700; font-size: var(--texte-xs); }
.recherche input { min-height: 44px; padding: 0 var(--espace-md); border: 2px solid var(--trait-fort); border-radius: 999px; background: var(--surface); color: var(--texte); }
.recherche-compte { position: absolute; top: calc(100% + var(--espace-2xs)); left: 0; min-height: 0; line-height: 1.5; white-space: nowrap; color: var(--texte-faible); font-size: var(--texte-xs); }
.recherche-compte:empty { display: none; }
.densite { display: inline-flex; }

/* Aide : aide de la page, encarts de section, aide par champ. */
.aide-page > summary, .encart-aide > summary { display: inline-flex; align-items: center; gap: var(--espace-xs); min-height: 32px; cursor: pointer; font-weight: 700; color: var(--accent); list-style: none; }
.aide-page > summary::-webkit-details-marker, .encart-aide > summary::-webkit-details-marker { display: none; }
.aide-page > summary::before, .encart-aide > summary::before { content: "?"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; font-size: var(--texte-xs); }
.aide-page-corps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-lg); margin-top: var(--espace-sm); padding: var(--espace-lg); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-md); background: var(--surface); }
.aide-titre { margin: 0 0 var(--espace-2xs); font-family: var(--police-titre); font-size: var(--texte-xs); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; }
.aide-page-corps p, .aide-page-corps li { color: var(--texte-faible); }
.aide-page-corps ul { margin: 0; padding-left: var(--espace-lg); display: grid; gap: var(--espace-2xs); }
.encart-corps { margin-top: var(--espace-xs); padding: var(--espace-md); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-md); color: var(--texte-faible); }
.aide { color: var(--texte-faible); font-size: var(--texte-xs); }
.format { font-weight: 400; color: var(--texte-faible); font-size: var(--texte-xs); margin-left: var(--espace-2xs); }
.format::before { content: "· "; }

/* Messages : confirmation (status) et erreur (alert), cadre entier, jamais un bandeau latéral. */
.zone-messages { display: grid; gap: var(--espace-xs); }
.zone-messages:not(:has(.message:not([hidden]))) { display: none; }
.message { display: flex; align-items: center; gap: var(--espace-sm); padding: var(--espace-sm) var(--espace-md); border: 2px solid var(--voie); border-radius: var(--rayon-md); background: var(--surface); font-weight: 500; }
.message .voyant-petit { margin-right: 0; }
.message-alerte { border-color: var(--texte-alerte); }
.vide { padding: var(--espace-md); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-md); color: var(--texte-faible); }
.vide-grand { display: flex; gap: var(--espace-md); align-items: flex-start; }
.etat-titre { color: var(--texte); font-weight: 700; margin-bottom: var(--espace-2xs); }
.toast { position: fixed; left: var(--gouttiere); bottom: var(--espace-lg); z-index: 80; display: flex; align-items: center; gap: var(--espace-sm); max-width: min(560px, 90vw);
  padding: var(--espace-sm) var(--espace-md); border-radius: var(--rayon-md); background: var(--surface-plaque); color: var(--texte-plaque); font-weight: 500;
  transition-property: opacity, transform; transition-duration: var(--dur-surface); transition-timing-function: var(--ease-apparition); }
.toast.toast-entree { opacity: 0; transform: translateY(8px); }

/* ── Formulaires ─────────────────────────────────────────────────────────────────── */
.formulaire { display: grid; gap: var(--espace-lg); }
.champ { display: flex; flex-direction: column; gap: var(--espace-2xs); }
.champ label, .modeles > legend { font-weight: 700; }
.formulaire input[type="text"], .formulaire input[type="password"], .formulaire input[type="number"], .formulaire select {
  min-height: 48px; padding: 0 var(--espace-md); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md); background: var(--surface); color: var(--texte); width: 100%; max-width: 560px; }
.formulaire input:disabled { border-style: dashed; color: var(--texte-faible); background: var(--fond); }
.champ-en-erreur input, input[aria-invalid="true"] { border-color: var(--texte-alerte); }
.erreur-champ { color: var(--texte-alerte); font-weight: 700; font-size: var(--texte-xs); }
.champ-mdp { display: flex; gap: var(--espace-xs); max-width: 560px; }
.champ-mdp input { flex: 1 1 auto; }
.formulaire-pied { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-lg); }
.champs-ligne { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-lg); }
.modeles { margin: 0; padding: 0; border: 0; display: grid; gap: var(--espace-md); }
.modeles > legend { padding: 0; margin-bottom: var(--espace-sm); }
.groupes-modeles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-md); }
.groupe-modeles { margin: 0; padding: var(--espace-sm) var(--espace-md); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md); background: var(--surface); }
.groupe-modeles legend { display: flex; align-items: center; padding: 0 var(--espace-xs); font-weight: 700; }
.groupe-etat { margin-left: var(--espace-xs); font-weight: 500; color: var(--texte-repond); }
.case { display: flex; align-items: center; gap: var(--espace-sm); min-height: 44px; cursor: pointer; }
.case input { width: 22px; height: 22px; accent-color: var(--accent); }
.modeles-note { padding: var(--espace-md); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-md); font-size: var(--texte-xs); display: grid; gap: var(--espace-xs); }
.fournisseurs-absents { display: flex; flex-wrap: wrap; gap: var(--espace-2xs) var(--espace-md); margin: 0; padding: 0; list-style: none; }
.fournisseurs-absents li { display: flex; align-items: center; }
.absent-nom { font-weight: 700; }
.absent-etat { margin-left: var(--espace-2xs); color: var(--texte-faible); }
.resume-erreurs { padding: var(--espace-md); border: 2px solid var(--texte-alerte); border-radius: var(--rayon-md); display: grid; gap: var(--espace-xs); }
.resume-titre { font-weight: 700; color: var(--texte-alerte); }
.resume-erreurs ul { margin: 0; padding-left: var(--espace-lg); }
.criteres { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-2xs); color: var(--texte-faible); }
.critere { display: flex; align-items: center; }
.critere-tenu { color: var(--texte-repond); font-weight: 700; }

/* ── Écran 1 : accueil ───────────────────────────────────────────────────────────── */
.accueil-hero { display: grid; grid-template-columns: minmax(0, 820px) minmax(0, 1fr); gap: var(--espace-xl); align-items: center; padding: var(--espace-2xl) 0 var(--espace-xl); }
.accueil-texte { display: grid; gap: var(--espace-lg); justify-items: start; }
.titre-accueil { margin: 0; font-family: var(--police-titre); font-weight: 400; font-size: var(--texte-2xl); line-height: 1.15; letter-spacing: 0.04em; text-transform: uppercase; }
.accueil-chapeau { font-size: var(--texte-lg); color: var(--texte-faible); }
.accueil-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-lg); }
.accueil-schema { position: relative; margin: 0; padding: var(--espace-xl); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface-schema); display: grid; gap: var(--espace-lg); }
.accueil-schema > *:not(.mosaique) { position: relative; }
.accueil-schema-corps { display: grid; grid-template-columns: minmax(180px, 0.8fr) 160px minmax(0, 1fr); align-items: center; }
.accueil-entree { position: relative; display: grid; gap: var(--espace-sm); justify-items: start; padding-right: var(--espace-lg); }
.accueil-adresse { font-size: var(--texte-xs); }
.accueil-entree .tronc { position: absolute; right: 0; top: 50%; width: var(--espace-lg); height: 4px; background: var(--voie); }
.accueil-aiguilles { display: block; width: 160px; height: calc(52px * 7); overflow: visible; }
.accueil-aiguilles .rail, .heurtoir .rail { fill: none; stroke: var(--voie); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.accueil-aiguilles .aiguille { fill: var(--surface); stroke: var(--voie); stroke-width: 4; }
.accueil-voies { list-style: none; margin: 0; padding: 0; }
.accueil-voies li { display: grid; grid-template-columns: 40px minmax(0, 220px); align-items: center; gap: var(--espace-sm); height: 52px; }
.accueil-schema figcaption { color: var(--texte-faible); font-size: var(--texte-sm); }
.accueil-preuves { display: grid; gap: var(--espace-md); }
.preuves { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--espace-md); }
.preuve { display: grid; gap: var(--espace-xs); align-content: start; padding: var(--espace-lg); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface); }
.preuve-titre, .porte-titre { font-family: var(--police-titre); font-size: var(--texte-xs); letter-spacing: 0.1em; text-transform: uppercase; }
.preuve a { font-weight: 700; }
.accueil-portes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--espace-md); padding-bottom: var(--espace-lg); }
.porte { display: grid; gap: var(--espace-sm); align-content: start; padding: var(--espace-lg); border-top: 4px solid var(--voie); }
.porte p { color: var(--texte-faible); }
.porte .porte-titre { color: var(--texte); }

/* ── Écran 2 : connexion ─────────────────────────────────────────────────────────── */
.connexion { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: var(--espace-xl); align-items: start; padding: var(--espace-lg) 0; }
.connexion-formulaire { display: grid; gap: var(--espace-lg); align-content: start; }
.connexion-formulaire .tete-ecran { padding-top: 0; }
.connexion-formulaire .titre-ecran, .ecran-erreur .titre-ecran { font-size: var(--texte-2xl); }
.connexion-poste, .mdp-voie { position: relative; display: grid; gap: var(--espace-lg); align-content: start; padding: var(--espace-xl); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface-schema); }
.connexion-poste > *:not(.mosaique) { position: relative; }
.stations { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-lg); }
.station { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--espace-md); align-items: start; }
.station p { color: var(--texte-faible); }
.station strong { display: block; color: var(--texte); }
.stations-ligne { position: relative; }
.stations-ligne::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 3px; background: var(--voie); }
.stations-ligne .voyant { position: relative; }
.station-courante strong { color: var(--accent); }

/* ── Écran 3 : mot de passe ──────────────────────────────────────────────────────── */
.mdp-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: var(--espace-xl); align-items: start; padding-bottom: var(--espace-lg); }

/* ── Le poste d'aiguillage (écran 4) ─────────────────────────────────────────────── */
.schema { position: relative; margin: 0; padding: var(--espace-lg) var(--espace-xl) var(--espace-xl); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface-schema); }
.schema > *:not(.mosaique) { position: relative; }
.schema-tete { display: grid; gap: var(--espace-xs); margin-bottom: var(--espace-lg); }
.schema-tete .plaque { justify-self: start; }
.schema-phrase { font-size: var(--texte-lg); font-weight: 700; }
.schema-note { color: var(--texte-faible); }
.schema-corps { display: grid; grid-template-columns: minmax(260px, 0.8fr) 200px minmax(0, 2.6fr); align-items: center; }
.schema-entree-hote { position: relative; align-self: end; display: flex; align-items: center; min-height: calc(var(--hauteur-voie) * var(--voies)); padding-right: var(--espace-lg); }
.schema-entree { display: flex; flex-direction: column; gap: var(--espace-sm); }
.tronc { position: absolute; right: 0; top: 50%; width: var(--espace-lg); height: 4px; transform: translateY(-50%); background: var(--voie); }
.plaque-entree, .plaque-sortie { align-self: flex-start; }
.compteurs { display: grid; gap: var(--espace-sm); margin: 0; }
.compteurs .chiffre { padding: var(--espace-sm) var(--espace-md); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md); background: var(--surface); }
.compteurs dt { font-family: var(--police-titre); font-size: var(--texte-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--texte-faible); }
.compteurs dd { margin: 0; display: flex; flex-direction: column; }
.compteurs .valeur { font-family: var(--police-mono); font-size: var(--texte-xl); line-height: 1.15; font-variant-numeric: tabular-nums; }
.compteurs .valeur-cout { font-family: var(--police-titre); font-size: var(--texte-sm); letter-spacing: 0.06em; line-height: 1.4; }
.compteurs .unite { font-size: var(--texte-xs); color: var(--texte-faible); }
.schema-aiguilles { display: block; width: 200px; height: calc(var(--hauteur-voie) * var(--voies)); overflow: visible; align-self: end; }
.schema-aiguilles .rail { fill: none; stroke: var(--voie); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.schema-aiguilles .rail-coupe, .heurtoir .rail-coupe { stroke: var(--voie-coupee); stroke-dasharray: 10 8; stroke-width: 3; }
.schema-aiguilles .aiguille { fill: var(--surface); stroke: var(--voie); stroke-width: 4; }
.schema-sortie { display: flex; flex-direction: column; gap: var(--espace-sm); align-self: end; }
.schema-voies { list-style: none; margin: 0; padding: 0; }
.voie { display: grid; grid-template-columns: 48px 28px 200px minmax(30ch, 38ch) minmax(18ch, 24ch) minmax(11ch, 1fr); align-items: center; gap: var(--espace-md); height: var(--hauteur-voie); }
.plaque-fournisseur { justify-self: stretch; text-align: center; }
.voie-etat { display: flex; flex-direction: column; line-height: 1.25; }
.voie-libelle { font-weight: 700; font-size: var(--texte-md); }
.voie-detail { color: var(--texte-faible); font-size: var(--texte-xs); }
.voie-modeles { display: flex; flex-direction: column; font-weight: 700; line-height: 1.25; }
.voie-ouverture { font-weight: 500; font-size: var(--texte-xs); color: var(--texte-faible); text-transform: uppercase; letter-spacing: 0.08em; }
.voie-essai { color: var(--texte-faible); font-size: var(--texte-xs); font-variant-numeric: tabular-nums; }
.etat-repond .voie-libelle { color: var(--texte-repond); }
.etat-refusee .voie-libelle { color: var(--texte-refus); }
.etat-injoignable .voie-libelle { color: var(--texte-panne); }
.etat-a-saisir .voie-libelle { color: var(--texte-attente); }
.etat-non-verifiable .voie-libelle { color: var(--texte-nonverif); }
.schema-texte { margin-top: var(--espace-lg); color: var(--texte-faible); }
.schema-vide { padding: var(--espace-md); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-md); background: var(--surface); }
.legende-etats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--espace-md) var(--espace-lg); margin: var(--espace-lg) 0 0; padding-top: var(--espace-lg); border-top: 2px solid var(--trait-mosaique); }
.legende-ligne dt { display: flex; align-items: center; gap: var(--espace-sm); font-weight: 700; }
.legende-ligne dd { margin: var(--espace-2xs) 0 0; color: var(--texte-faible); font-size: var(--texte-xs); }

.grille-tableau-de-bord { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--espace-lg); align-items: start; margin-top: var(--espace-lg); }
.colonne-modules { display: grid; gap: var(--espace-lg); }
.cantons { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-2xs); }
.canton { display: grid; grid-template-columns: minmax(15ch, 19ch) minmax(100px, 1fr) 10ch 9ch; align-items: center; gap: var(--espace-md); min-height: 44px; }
.canton-nom { font-weight: 700; }
.canton-voie { position: relative; display: block; height: 16px; }
.canton-voie::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--voie-coupee); }
.canton-voie > span { position: absolute; left: 0; top: 4px; height: 8px; width: var(--part); border-radius: 4px; background: var(--voie); }
.canton-chiffre { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-family: var(--police-mono); font-size: var(--texte-xs); }
.canton-chiffre small { display: block; font-family: var(--police-corps); font-size: var(--texte-xs); font-weight: 400; color: var(--texte-faible); }
.definition { margin-bottom: var(--espace-md); color: var(--texte-faible); }
.definition dfn { font-style: normal; font-weight: 700; color: var(--texte); }
.enveloppe-compte { margin: 0 0 var(--espace-md); font-size: var(--texte-md); }
.enveloppe-compte .valeur { font-family: var(--police-mono); font-size: var(--texte-2xl); line-height: 1; margin-right: var(--espace-xs); }
.enveloppe-groupe { margin-bottom: var(--espace-md); }
.enveloppe-fournisseur { display: flex; align-items: center; margin: 0 0 var(--espace-2xs); font-weight: 700; }
.liste-modeles { list-style: none; margin: 0; display: grid; gap: var(--espace-2xs); padding-left: var(--espace-lg); }
.enveloppe-note { margin: 0 0 var(--espace-sm); padding: var(--espace-md); border: 2px dashed var(--voie-coupee); border-radius: var(--rayon-md); font-size: var(--texte-xs); }
.surveiller { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-sm); }
.surveiller-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--espace-2xs) var(--espace-md); align-items: center; padding-bottom: var(--espace-sm); border-bottom: 1px solid var(--trait); }
.surveiller-nom { font-weight: 700; }
.surveiller-ligne .jauge { grid-column: 1 / -1; }
.surveiller-chiffre { font-variant-numeric: tabular-nums; font-size: var(--texte-xs); }
.surveiller-etat { font-size: var(--texte-xs); font-weight: 700; color: var(--texte-panne); text-align: right; }
.surveiller-suspendue .surveiller-etat { color: var(--texte-attente); }
.dernieres { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-xs); }
.dernieres li { display: grid; grid-template-columns: 17ch minmax(0, 1fr) minmax(0, 1fr); gap: var(--espace-sm); font-size: var(--texte-xs); padding-bottom: var(--espace-xs); border-bottom: 1px solid var(--trait); }
.dernieres time { font-variant-numeric: tabular-nums; color: var(--texte-faible); }
.dernieres-qui { font-weight: 700; }
.mise-en-service { position: relative; display: grid; gap: var(--espace-md); padding: var(--espace-lg) var(--espace-xl); border: 3px solid var(--accent); border-radius: var(--rayon-lg); background: var(--surface); }
.mise-en-service-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-md); }
.mise-en-service-compte { font-weight: 700; }
.mise-en-service-chapeau { font-size: var(--texte-md); }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-lg); }
.etape { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--espace-sm); align-items: start; }
.etape > div { display: grid; gap: var(--espace-xs); }
.etape p { color: var(--texte-faible); }
.etape .etape-titre { color: var(--texte); font-weight: 700; }
.etape-faite .etape-titre { color: var(--texte-repond); }
.mise-en-service-pied { display: flex; justify-content: flex-end; }

/* ── Tables de données (composant table-filters du socle) ────────────────────────── */
.table-hote { overflow-x: visible; }
table { width: 100%; border-collapse: collapse; }
.table-donnees { font-size: var(--texte-sm); }
.table-donnees caption { padding: 0 0 var(--espace-xs); color: var(--texte-faible); font-size: var(--texte-xs); }
.table-donnees th { padding: var(--espace-sm) var(--espace-md); border-bottom: 3px solid var(--voie); text-align: left; vertical-align: bottom;
  font-family: var(--police-titre); font-weight: 400; font-size: var(--texte-xs); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.table-donnees th.n { text-align: right; }
.table-donnees td { padding: var(--espace-sm) var(--espace-md); border-bottom: 1px solid var(--trait); vertical-align: middle; }
.table-donnees tbody tr { transition-property: background-color, opacity; transition-duration: var(--dur-local); transition-timing-function: var(--ease-apparition); }
@media (hover: hover) { .table-donnees tbody tr:hover { background: var(--surface-schema); } }
.table-donnees .cellule-equipe { font-weight: 700; }
.table-donnees .cout { font-family: var(--police-titre); font-size: var(--texte-xs); letter-spacing: 0.06em; color: var(--texte-faible); white-space: nowrap; }
.table-hote[data-densite="compacte"] .table-donnees td { padding: var(--espace-2xs) var(--espace-sm); }
.table-hote[data-densite="compacte"] .table-donnees th { padding: var(--espace-xs) var(--espace-sm); }
.table-hote[data-densite="compacte"] .bouton-ligne { min-height: 28px; }
.tf-count { margin: var(--espace-xs) 0 0; color: var(--texte-faible); font-size: var(--texte-xs); }
/* Le composant table-filters lit --focus-anneau comme un raccourci « 3px solid … » ; les jetons de B en font une couleur :
   la page hôte pose donc l'anneau complet sur les contrôles du composant, sans toucher à sa copie scellée. */
.table-donnees .tf-btn:focus-visible, .table-donnees .tf-search:focus-visible, .table-donnees .tf-actions button:focus-visible, .table-donnees .tf-reset:focus-visible,
.table-donnees .tf-opt:focus-visible, .table-donnees tr[data-tf-empty] button:focus-visible { outline: 3px solid var(--focus-anneau); outline-offset: var(--focus-decalage); }
.tf-count:empty { display: none; }
.note-cles { margin-top: var(--espace-sm); color: var(--texte-faible); font-size: var(--texte-xs); }
.puces-modeles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--espace-2xs); }
.puces-modeles li { padding: 0 var(--espace-xs); border: 1px solid var(--trait-fort); border-radius: var(--rayon-sm); background: var(--surface); line-height: 1.6; }
.table-cles .puces-modeles .id-modele { font-size: var(--texte-xs); }
/* Ajustement de densité : dans la table des clés, le préfixe d'organisation reste dans le texte (copie, lecteur d'écran) mais ne se voit pas. */
.table-cles .id-org { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.table-cles .cellule-equipe { white-space: nowrap; }
.etat-cle { display: inline-flex; align-items: center; gap: var(--espace-xs); font-weight: 700; white-space: nowrap; }
.etat-cle::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--voyant-lunette); background: var(--voyant-eteint); }
.etat-cle-active::before { background: var(--voyant-vert); }
.etat-cle-suspendue::before { background: var(--voyant-ambre); }
.etat-cle-geree::before { background: var(--voyant-blanc); border-style: dashed; }
.cellule-budget { white-space: nowrap; }
.cellule-budget .jauge { display: inline-block; width: 120px; vertical-align: middle; margin-right: var(--espace-sm); }
.jauge { position: relative; display: block; height: 12px; min-width: 80px; }
.jauge::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--voie-coupee); }
.jauge > span { position: absolute; left: 0; top: 2px; height: 8px; width: var(--part); border-radius: 4px; background: var(--voie); }
.jauge-haute > span { background: var(--voyant-ambre); }
.jauge-pleine > span { background: var(--voyant-rouge); }
.budget-texte { font-variant-numeric: tabular-nums; }
.budget-part { display: inline-block; min-width: 5ch; margin-left: var(--espace-sm); font-variant-numeric: tabular-nums; color: var(--texte-faible); font-size: var(--texte-xs); text-align: right; }
.budget-epuise { font-weight: 700; color: var(--texte-refus); }
.sans-action, .sans-budget { color: var(--texte-faible); font-size: var(--texte-xs); }
.cellule-actions { white-space: nowrap; }
.cellule-actions .bouton-ligne + .bouton-ligne { margin-left: var(--espace-2xs); }
.cellule-choix { width: 48px; }
.cellule-choix input, .case-toutes { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
tr.ligne-choisie { background: var(--surface-schema); }
tr.ligne-signalee td { background: var(--selection-fond); color: var(--selection-texte); }
tr.ligne-signalee .id-org { color: var(--selection-texte); }
tr.ligne-sortante { opacity: 0; }
.barre-selection { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-sm); margin: 0 0 var(--espace-sm); padding: var(--espace-xs) var(--espace-md); border: 2px solid var(--accent); border-radius: var(--rayon-md); background: var(--surface-schema); }
.selection-compte { font-weight: 700; margin-right: var(--espace-sm); }
.etat-compte { display: inline-flex; align-items: center; gap: var(--espace-xs); font-weight: 700; }
.etat-compte::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--voyant-lunette); background: var(--voyant-vert); }
.etat-compte-provisoire::before { background: var(--voyant-ambre); }
.etat-compte-desactive::before { background: var(--voyant-eteint); }
.soi { margin-left: var(--espace-2xs); padding: 0 var(--espace-xs); border-radius: var(--rayon-sm); background: var(--surface-plaque); color: var(--texte-plaque); font-size: var(--texte-xs); font-weight: 500; }
.n-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.action-journal { font-weight: 700; }
.action-refus { color: var(--texte-refus); }
.action-cle { color: var(--accent); }
.detail-journal { color: var(--texte-faible); }
.ajout > summary { list-style: none; }
.ajout > summary::-webkit-details-marker { display: none; }
.ajout[open] > summary { margin-bottom: var(--espace-lg); }
.formulaire-ligne { grid-template-columns: repeat(2, minmax(0, 420px)) auto; align-items: start; }
.formulaire-ligne .formulaire-pied { align-self: start; padding-top: 28px; }
.formulaire-ligne .formulaire-pied .bouton { min-height: 48px; }

/* Clé ou mot de passe affiché une seule fois. */
.cle-affichee { display: grid; gap: var(--espace-sm); padding: var(--espace-lg); border: 3px solid var(--accent); border-radius: var(--rayon-lg); background: var(--surface); }
.cle-affichee-consigne { font-weight: 700; }
.cle-valeur { font-size: var(--texte-md); padding: var(--espace-sm) var(--espace-md); border: 2px dashed var(--accent); border-radius: var(--rayon-md); background: var(--surface-schema); }
.cle-valeur code { overflow-wrap: anywhere; }
.cle-affichee-actions { display: flex; flex-wrap: wrap; gap: var(--espace-sm); }

/* Panneau de création adressable. */
.panneau { display: grid; gap: var(--espace-md); }
.fil { padding-top: var(--espace-md); font-weight: 700; }
.panneau .tete-ecran { padding-top: 0; }
.panneau-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--espace-lg); align-items: start; padding-bottom: var(--espace-lg); }
.panneau-grille > [data-pour-scenario="vide"] { grid-column: 1; }
.liste-aide { margin: var(--espace-md) 0 0; padding-left: var(--espace-lg); display: grid; gap: var(--espace-sm); color: var(--texte-faible); }
.liste-aide strong { color: var(--texte); }
.legende-jauge { margin-top: var(--espace-sm); color: var(--texte-faible); font-size: var(--texte-xs); }
.aide-oubli { margin-top: calc(-1 * var(--espace-sm)); }

/* Dialogues de confirmation et fiches de modèle. */
.dialogue { width: min(640px, 92vw); max-height: 86vh; padding: 0; border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface); color: var(--texte); overscroll-behavior: contain; }
.dialogue::backdrop { background: color-mix(in oklch, var(--surface-plaque) 64%, transparent); }
.dialogue[open] { animation: entree-dialogue var(--dur-surface) var(--ease-apparition); }
@keyframes entree-dialogue { from { opacity: 0; transform: scale(var(--echelle-entree)); } to { opacity: 1; transform: none; } }
.dialogue-corps { display: grid; gap: var(--espace-md); padding: var(--espace-lg); }
.dialogue-titre { margin: 0; font-size: var(--texte-lg); }
.dialogue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--espace-sm); }
.dialogue .bouton { background: var(--surface); color: var(--texte); }
.dialogue .bouton-principal { background: var(--accent); color: var(--accent-contraste); }
.dialogue .bouton-danger-plein { background: var(--texte-alerte); color: var(--accent-contraste); }
.dialogue-fiche { width: min(760px, 92vw); }
.fiche-faits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-sm) var(--espace-lg); margin: 0; }
.fiche-faits dt { color: var(--texte-faible); font-size: var(--texte-xs); }
.fiche-faits dd { margin: 0; font-weight: 500; }

/* ── Écrans 8 et 10 : transparence ───────────────────────────────────────────────── */
.trajet { background: var(--surface-schema); overflow: hidden; }
.trajet > *:not(.mosaique) { position: relative; }
.trajet-etapes { list-style: none; margin: var(--espace-md) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--espace-xl); }
.trajet-etape { position: relative; display: grid; gap: var(--espace-sm); justify-items: start; }
.trajet-etapes { position: relative; }
.trajet-etapes::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 4px; background: var(--voie); }
.trajet-etape .plaque { position: relative; }
.trajet-etape p { color: var(--texte-faible); }
.trajet-filtre .plaque { outline: 3px solid var(--voie); outline-offset: 3px; }
.grille-transparence { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--espace-lg); align-items: start; padding-bottom: var(--espace-lg); }
.table-transparence td:not(:last-child) { white-space: nowrap; }
.table-cle-valeur { font-size: var(--texte-sm); }
.table-cle-valeur th { width: 34%; padding: var(--espace-sm) var(--espace-md) var(--espace-sm) 0; text-align: left; vertical-align: top; font-weight: 700; border-bottom: 1px solid var(--trait); }
.table-cle-valeur td { padding: var(--espace-sm) 0; border-bottom: 1px solid var(--trait); color: var(--texte-faible); }

/* ── Écran 9 : documentation ─────────────────────────────────────────────────────── */
.doc-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--espace-lg); align-items: stretch; padding-bottom: var(--espace-lg); }
.module-large { grid-column: 1 / -1; }
.doc-grille > .module { scroll-margin-top: 72px; }
.doc-grille .module > p + p, .doc-grille .module > p + table { margin-top: var(--espace-sm); }
.adresse-api { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-md); margin-bottom: var(--espace-sm); font-size: var(--texte-md); }
.code { margin: var(--espace-xs) 0 var(--espace-md); padding: var(--espace-md); border-radius: var(--rayon-md); background: var(--surface-plaque); color: var(--texte-plaque); font-size: var(--texte-xs); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.exemple-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--espace-sm); margin-top: var(--espace-md); }
.code-http { font-family: var(--police-mono); font-weight: 400; padding: 0 var(--espace-xs); border: 2px solid var(--trait-fort); border-radius: var(--rayon-sm); }
.code-5xx { border-color: var(--texte-alerte); color: var(--texte-alerte); }
.table-erreurs td { vertical-align: top; }
.lexique { display: grid; gap: var(--espace-sm); margin: 0; }
.lexique dt { font-weight: 700; }
.lexique dd { margin: 0; color: var(--texte-faible); }
.catalogue { display: grid; gap: var(--espace-md); }
.catalogue-outils { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-md); }
.segments { display: inline-flex; flex-wrap: nowrap; }
.catalogue-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--espace-md); }
.carte-modele { display: grid; gap: var(--espace-sm); align-content: start; padding: var(--espace-md) var(--espace-lg); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md); background: var(--surface-schema); }
.carte-fournisseur { display: flex; align-items: center; font-weight: 700; font-size: var(--texte-xs); }
.carte-id { font-size: var(--texte-md); }
.carte-faits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-sm); margin: 0; }
.carte-faits dt { color: var(--texte-faible); font-size: var(--texte-xs); }
.carte-faits dd { margin: 0; font-size: var(--texte-xs); font-weight: 500; }
.plan-voies { list-style: none; margin: 0; padding: var(--espace-md); display: grid; gap: var(--espace-md); border-radius: var(--rayon-md); background: var(--surface-schema); }
.plan-voie { display: grid; grid-template-columns: 64px 24px 200px minmax(0, 1fr); align-items: center; gap: var(--espace-md); }

/* ── États système ───────────────────────────────────────────────────────────────── */
.erreur { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--espace-xl); align-items: center; padding: var(--espace-2xl) 0; }
.erreur-variante { display: grid; gap: var(--espace-md); justify-items: start; }
.erreur-variante > .chapeau { justify-self: stretch; }
.erreur-code .plaque { font-size: var(--texte-xl); padding: var(--espace-sm) var(--espace-lg); }
.heurtoir { margin: 0; padding: var(--espace-lg); border: 2px solid var(--trait-fort); border-radius: var(--rayon-lg); background: var(--surface-schema); }
.heurtoir svg { display: block; width: 100%; height: auto; }
.heurtoir .traverse { stroke: var(--trait-fort); stroke-width: 3; }
.heurtoir-butee { fill: var(--surface-plaque); }
.heurtoir-feu { fill: var(--voyant-rouge); stroke: var(--voyant-lunette); stroke-width: 4; }

/* ── Bibliothèque de composants ──────────────────────────────────────────────────── */
.biblio { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(560px, 100%), 1fr)); gap: var(--espace-lg); align-items: stretch; padding-bottom: var(--espace-lg); }
.biblio > .module-large { grid-column: 1 / -1; }
.nuancier { list-style: none; margin: var(--espace-md) 0 0; padding: 0; display: grid; gap: var(--espace-xs); }
.nuancier li { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr); gap: var(--espace-sm); align-items: center; font-size: var(--texte-xs); }
.pastille { width: 32px; height: 24px; border-radius: var(--rayon-sm); border: 2px solid var(--trait-fort); background: var(--nuance); }
.specimen { margin-top: var(--espace-md); font-size: var(--texte-md); }
.specimen-titre { font-family: var(--police-titre); text-transform: uppercase; letter-spacing: 0.08em; }
.specimen-mono { font-family: var(--police-mono); }
.biblio .legende-etats { grid-template-columns: minmax(0, 1fr); border-top: 0; padding-top: 0; }
.voies-demo { list-style: none; margin: var(--espace-md) 0 0; padding: 0; display: grid; gap: var(--espace-sm); }
.voies-demo li { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: var(--espace-md); font-size: var(--texte-xs); }
.etats-demo { display: grid; gap: var(--espace-sm); margin-top: var(--espace-md); }
.etats-demo p { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-sm); }
.etats-demo p > span { color: var(--texte-faible); font-size: var(--texte-xs); }
.jauges-demo { list-style: none; margin: var(--espace-md) 0; padding: 0; display: grid; gap: var(--espace-sm); }
.jauges-demo li { display: grid; grid-template-columns: 160px minmax(0, 1fr); align-items: center; gap: var(--espace-md); font-size: var(--texte-xs); }
.etats-cle-demo { display: flex; flex-wrap: wrap; gap: var(--espace-lg); }

/* ── Pied ────────────────────────────────────────────────────────────────────────── */
.pied { margin-top: var(--espace-lg); padding: var(--espace-lg) var(--gouttiere); border-top: 2px solid var(--trait-fort); color: var(--texte-faible); font-size: var(--texte-xs); display: grid; gap: var(--espace-2xs); }

/* ── Grands écrans : la grille gagne des colonnes, la lecture garde sa mesure ────── */
@media screen and (min-width: 2400px) {
  .grille-tableau-de-bord { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .grille-tableau-de-bord .colonne-modules { display: contents; }
  .schema-corps { grid-template-columns: minmax(280px, 0.6fr) 220px minmax(0, 2.4fr); }
  .table-cles .cellule-choix, .table-cles .cellule-equipe, .table-cles td:nth-child(3), .table-cles th:nth-child(3), .table-cles td:nth-child(4), .table-cles th:nth-child(4), .table-cles td:nth-child(6), .table-cles th:nth-child(6), .table-cles .cellule-actions { width: 1%; white-space: nowrap; }
  .table-cles .puces-modeles { flex-wrap: nowrap; }
}

/* ── Écrans moyens et petits ─────────────────────────────────────────────────────── */
@media screen and (max-width: 1600px) {
  .table-cles .cellule-budget, .table-cles .cellule-actions { white-space: normal; }
  .table-cles .cellule-budget .jauge { display: block; width: 100%; margin: var(--espace-2xs) 0; }
  .table-cles .cellule-actions .bouton-ligne { margin: 0 var(--espace-2xs) var(--espace-2xs) 0; }
  .table-cles .cellule-actions .bouton-ligne + .bouton-ligne { margin-left: 0; }
  .table-donnees th { white-space: normal; }
  .accueil-hero { grid-template-columns: minmax(0, 1fr); }
  .accueil-texte { max-width: 920px; }
  .maquette-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; padding-bottom: var(--espace-2xs); }
  .maquette-reglages { margin-left: auto; }
}
@media screen and (max-width: 1440px) {
  .voie { grid-template-columns: 32px 24px 180px minmax(16ch, 1fr) minmax(14ch, 0.8fr); }
  .voie-essai { display: none; }
  .schema-corps { grid-template-columns: minmax(300px, 1fr) 160px minmax(0, 2.2fr); }
  .schema-aiguilles { width: 160px; }
  .grille-tableau-de-bord { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grille-tableau-de-bord .colonne-modules { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-membre .colonne-modules { grid-template-columns: minmax(0, 1fr); }
  .legende-etats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preuves, .accueil-portes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cellule-budget .jauge { width: 80px; }
}
@media screen and (max-width: 1200px) {
  .entete { flex-wrap: wrap; }
  .schema-corps { grid-template-columns: minmax(0, 1fr); gap: var(--espace-lg); }
  .schema-aiguilles, .tronc, .accueil-aiguilles, .accueil-entree .tronc { display: none; }
  .schema-entree-hote { min-height: 0; padding-right: 0; }
  .compteurs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .voie { grid-template-columns: 24px 180px minmax(12ch, 1fr) minmax(12ch, 0.8fr); height: auto; min-height: 52px; padding: var(--espace-2xs) 0; }
  .voie-trait { display: none; }
  .accueil-hero, .connexion, .mdp-grille, .erreur, .grille-transparence, .panneau-grille { grid-template-columns: minmax(0, 1fr); }
  .accueil-schema-corps { grid-template-columns: minmax(0, 1fr); gap: var(--espace-md); }
  .accueil-voies { display: flex; flex-wrap: wrap; gap: var(--espace-xs); }
  .accueil-voies li { display: block; height: auto; }
  .accueil-voies .voie-trait { display: none; }
  .aide-page-corps { grid-template-columns: minmax(0, 1fr); }
  .doc-grille { grid-template-columns: minmax(0, 1fr); }
  .cellule-actions { white-space: normal; }
  .cellule-actions .bouton-ligne { margin: 0 var(--espace-2xs) var(--espace-2xs) 0; }
  .cellule-actions .bouton-ligne + .bouton-ligne { margin-left: 0; }
  .formulaire-ligne { grid-template-columns: minmax(0, 1fr); }
  .table-donnees th, .table-donnees td { padding-left: var(--espace-xs); padding-right: var(--espace-xs); }
  .table-cles .cellule-equipe, .etat-cle, .table-donnees .cout, .n-date { white-space: normal; }
}
@media screen and (max-width: 1024px) {
  .entete .bouton-menu { display: inline-flex; }
  .nav-produit { display: none; flex-basis: 100%; order: 5; }
  .entete.menu-ouvert .nav-produit { display: block; }
  .entete-outils { margin-left: auto; }
  .tete-ecran { grid-template-columns: minmax(0, 1fr); }
  .grille-tableau-de-bord, .grille-tableau-de-bord .colonne-modules { grid-template-columns: minmax(0, 1fr); }
  .trajet-etapes, .etapes { grid-template-columns: minmax(0, 1fr); gap: var(--espace-lg); }
  .trajet-etapes::before { display: none; }
  .legende-etats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 900px) {
  .table-hote { overflow-x: auto; }
  table.repli-cartes caption { display: block; }
  table.repli-cartes thead { display: none; }
  table.repli-cartes, table.repli-cartes tbody { display: block; }
  table.repli-cartes tr { display: block; margin: 0 0 var(--espace-sm); padding: var(--espace-xs) var(--espace-sm); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md); background: var(--surface); break-inside: avoid; }
  table.repli-cartes td { display: grid; grid-template-columns: minmax(9ch, 38%) minmax(0, 1fr); gap: var(--espace-xs); padding: var(--espace-2xs) 0; text-align: left; border-bottom: 0; white-space: normal; }
  table.repli-cartes td::before { content: attr(data-label); font-weight: 700; color: var(--texte-faible); }
  table.repli-cartes td:not([data-label])::before { content: none; }
  .cellule-budget .jauge { width: 100%; margin: var(--espace-2xs) 0; }
  .compteurs { grid-template-columns: minmax(0, 1fr); }
  .voie { grid-template-columns: 24px minmax(0, 1fr); grid-template-areas: "voyant nom" "voyant etat" "voyant modeles"; row-gap: var(--espace-2xs); padding: var(--espace-sm) 0; border-bottom: 1px solid var(--trait); }
  .voie .voyant { grid-area: voyant; align-self: start; }
  .voie .plaque { grid-area: nom; justify-self: start; }
  .voie .voie-etat { grid-area: etat; }
  .voie .voie-modeles { grid-area: modeles; flex-direction: row; gap: var(--espace-sm); }
  .canton { grid-template-columns: minmax(0, 1fr) 10ch; grid-template-areas: "nom tokens" "voie voie" "req req"; row-gap: var(--espace-2xs); }
  .canton-nom { grid-area: nom; } .canton-voie { grid-area: voie; }
  .canton > .canton-chiffre:nth-of-type(3) { grid-area: tokens; } .canton > .canton-chiffre:nth-of-type(4) { grid-area: req; text-align: left; }
  .champs-ligne, .groupes-modeles, .fiche-faits, .preuves, .accueil-portes, .biblio { grid-template-columns: minmax(0, 1fr); }
  .titre-accueil { font-size: var(--texte-2xl); }
  .plan-voie { grid-template-columns: 24px minmax(0, 1fr); }
  .plan-voie .voie-trait { display: none; }
  .plan-voie .puces-modeles { grid-column: 1 / -1; }
}
@media screen and (max-width: 640px) {
  .entete { gap: var(--espace-sm); }
  .marque-org { display: none; }
  .session-qui { display: none; }
  .titre-ecran { font-size: var(--texte-lg); }
  .connexion-formulaire .titre-ecran { font-size: var(--texte-xl); }
  .ecran-erreur .titre-ecran { font-size: var(--texte-lg); }
  .titre-suite { display: block; margin: var(--espace-2xs) 0 0; font-size: var(--texte-md); }
  .titre-accueil { font-size: var(--texte-xl); }
  .module, .schema, .accueil-schema, .connexion-poste, .mdp-voie { padding: var(--espace-md); }
  .legende-etats { grid-template-columns: minmax(0, 1fr); }
  .dernieres li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .barre-outils > .bouton-principal { margin-left: 0; }
  .recherche { flex-basis: 100%; }
  /* la recherche tient seule sa rangée : le compte reprend sa place dans le flux, sans chevaucher la rangée suivante */
  .recherche-compte { position: static; }
  .barre-outils:has(> .recherche) { padding-bottom: 0; row-gap: var(--espace-sm); }
  .segments { flex-wrap: wrap; }
  .bouton-grand { padding: var(--espace-sm) var(--espace-lg); }
  .bandeau-demo { flex-wrap: wrap; }
  /* Sur téléphone, le panneau de réglages s'ouvre dans le flux du bandeau : il pousse la page au lieu de la recouvrir. */
  .maquette-reglages[open] { flex-basis: 100%; }
  .maquette:has(.maquette-reglages[open]) { position: relative; }
  .reglages-corps { position: static; width: auto; max-height: 60vh; margin-top: var(--espace-xs); }
}

/* ── Mouvement réduit : neutralisation réelle ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ── Impression ──────────────────────────────────────────────────────────────────── */
@media print {
  .maquette .maquette-nav, .maquette-reglages, .theme-toggle, .recherche, .cellule-actions, .cellule-choix, .barre-outils, .barre-selection, .evitement, .bouton-menu, .toast, .aide-page, .encart-aide, dialog { display: none !important; }
  .maquette { position: static; }
  tr[data-tf-hidden] { display: table-row !important; }
  body { background: var(--surface); }
  .module, .schema { break-inside: avoid; }
}

/* ---- table-filters.css ---- */
/* table-filters.css — habillage charté du composant de filtres de colonne (D-12).
   TF-0176 (13/08) : un composant se livre AVEC son CSS — livré nu, il sort en rendu brut
   navigateur chez tous ses hôtes (constaté sur le dashboard forge-tests du 13/08, refusé
   par son destinataire). À inliner dans le bloc de style de la page, à côté du script du
   composant — JAMAIS de balise écrite en toutes lettres dans ce commentaire (même famille
   de piège que RA-1 : un « script » ouvrant en commentaire fausse toute lecture paresseuse
   du document). Ne consomme que les tokens :root du socle (--surface, --ink, --muted,
   --line, --blue, --r-sm) : aucune couleur en dur, les deux thèmes sont servis. TF-1059
   (11/09) : deux couleurs en dur restaient (texte du bouton actif, repli du survol), treize
   espacements sortaient de l'échelle 4pt et quatre anneaux de focus n'étaient pas prescrits —
   corrigés ici, à la source, plutôt que dans chaque produit.
   TF-1964 (RT-13, 19/10/2026) : chaque jeton porte un REPLI. Une page hôte écrite à la main, qui ne
   déclarait ni --surface, ni --muted, ni --r-sm, ni --sans, rendait cinq panneaux de filtre au fond
   `rgba(0,0,0,0)` : le texte du tableau passait à travers la liste de valeurs, et ni `--constat` ni
   check_html ne le disaient. Le repli est un MOT-CLÉ DE COULEUR SYSTÈME (Canvas, CanvasText, GrayText,
   LinkText), jamais une couleur en dur : il suit le thème du navigateur, reste opaque, et ne sert que si
   l'hôte ne déclare pas le jeton. `embarquer-composants.mjs --constat` signale en plus tout jeton
   consommé SANS repli et absent de la page.
   TF-1965 (RT-14, 19/10/2026) : le repli en cartes du socle masque le thead ; les déclencheurs de filtre
   y vivent. Sous 900 px, ils sortent du thead masqué et se posent en barre au-dessus des cartes. */

.tf-btn {
  font: inherit; font-size: .72rem; line-height: 1;
  color: var(--blue, LinkText); background: var(--surface, Canvas);
  border: 1px solid var(--line, GrayText); border-radius: var(--r-sm, 8px);
  padding: 4px 8px; margin-left: 8px; cursor: pointer; vertical-align: middle;
}
.tf-btn:hover { border-color: var(--blue, LinkText); }
.tf-btn:focus-visible { outline: var(--focus-anneau, 2px solid var(--blue, LinkText)); outline-offset: var(--focus-decalage, 1px); }
/* filtre ACTIF : l'état se voit sans ouvrir le panneau */
.tf-btn.tf-on { background: var(--blue, LinkText); color: var(--surface, Canvas); border-color: var(--blue, LinkText); }
/* TF-1623 (RA-4) : colonne alignée à droite (valeurs numériques) — l'en-tête suit sa colonne,
   et le déclencheur passe À GAUCHE du libellé : les bords droits du libellé et des valeurs
   coïncident. La classe est posée par le composant d'après l'alignement calculé des cellules. */
th.tf-num { text-align: right; }
th.tf-num .tf-btn { float: left; margin-left: 0; margin-right: 8px; }

.tf-panel {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0;
  min-width: 230px; max-width: 320px; max-height: 320px; overflow: auto;
  background: var(--surface, Canvas); color: var(--ink, CanvasText);
  border: 1px solid var(--line, GrayText); border-radius: var(--r-sm, 8px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
  padding: 12px; text-align: left; text-transform: none;
  font-family: var(--sans, system-ui, sans-serif); font-size: .85rem; font-weight: 400;
  letter-spacing: normal; cursor: default;
}
.tf-search {
  width: 100%; font: inherit; color: var(--ink, CanvasText); background: var(--surface, Canvas);
  border: 1px solid var(--line, GrayText); border-radius: var(--r-sm, 8px);
  padding: 8px 12px; margin: 0 0 8px;
}
.tf-search:focus-visible { outline: var(--focus-anneau, 2px solid var(--blue, LinkText)); outline-offset: var(--focus-decalage, 1px); }
.tf-actions {
  display: flex; gap: 16px; border-bottom: 1px solid var(--line, GrayText);
  padding-bottom: 8px; margin-bottom: 8px;
}
.tf-actions button {
  font: inherit; font-weight: 600; color: var(--blue, LinkText);
  background: none; border: none; cursor: pointer; padding: 0 4px;
}
.tf-actions button:focus-visible { outline: var(--focus-anneau, 2px solid var(--blue, LinkText)); outline-offset: var(--focus-decalage, 1px); }
.tf-opts { display: flex; flex-direction: column; gap: 4px; }
.tf-opts label {
  display: flex; align-items: center; gap: 8px;
  padding: 4px; border-radius: 4px; cursor: pointer;
}
.tf-opts label:hover { background: var(--bg, Canvas); }
.tf-opts input[type="checkbox"] { accent-color: var(--blue, LinkText); }
/* TF-2195 (Produit-86, 05/11/2026) : `.tf-opts label { display: flex }` annulait l'attribut `hidden`
   que la saisie du panneau pose sur les cases, et la recherche ne masquait rien. La feuille
   RESPECTE `hidden` pour tout ce qu'elle habille : le panneau, ses cases et ses boutons. */
.tf-panel[hidden], .tf-panel [hidden], .tf-btn[hidden], .tf-reset[hidden], .tf-unique[hidden] { display: none; }
/* TF-0782 (02/09) : la cardinalite decide de la FORME du panneau, pas de son existence — et
   une forme qui change sans le dire est une affordance muette. Le panneau ouvert sur sa
   recherche (plus de 15 valeurs) ou reduit a une valeur unique porte sa note. */
.tf-forme-note { margin: 0 0 8px; color: var(--muted, GrayText); font-size: .78rem; font-style: italic; }
/* TF-1051 (08/09) : une colonne a valeur UNIQUE le dit dans son en-tete, la ou on la lit —
   repliee dans le panneau, la note n'etait vue par personne et le lecteur concluait a une panne. */
.tf-unique {
  display: block; margin-top: 4px; color: var(--muted, GrayText);
  font-size: .72rem; font-weight: 400; font-style: italic; text-transform: none;
}

/* TF-0431 : panneau aligne a droite quand la place manque (choisi par le composant) ;
   le conteneur defilant porteur d'un panneau ouvert ne rogne plus (data-tf-ouvert). */
.tf-panel.tf-droite { left: auto; right: 0; }
[data-tf-ouvert] { overflow: visible !important; }

/* TF-0430 : etat vide — un filtre qui ne laisse rien le DIT dans le tableau, et offre la
   seule action utile a ce moment. */
tr[data-tf-empty] td {
  padding: 16px 12px; text-align: center; color: var(--muted, GrayText);
  font-style: italic; border-bottom: 1px solid var(--line, GrayText);
}
.tf-reset {
  font: inherit; font-style: normal; font-weight: 600; color: var(--blue, LinkText);
  background: none; border: 1px solid var(--line, GrayText); border-radius: var(--r-sm, 8px);
  padding: 4px 12px; margin-left: 12px; cursor: pointer;
}
.tf-reset:hover { border-color: var(--blue, LinkText); }
.tf-reset:focus-visible { outline: var(--focus-anneau, 2px solid var(--blue, LinkText)); outline-offset: var(--focus-decalage, 1px); }

/* TF-1965 : le repli en cartes (`table.repli-cartes thead { display: none }` sous 900 px) masquait les
   en-têtes et, avec eux, les déclencheurs de filtre : cinq boutons en 0 x 0 à 390 px, seule la recherche
   restait. Un tableau replié ET filtrable garde son thead, rendu en BARRE : une puce « libellé + filtre »
   par colonne filtrable, les autres en-têtes restent masqués (la carte les porte déjà par data-label).
   Le panneau s'ouvre sous sa puce (le composant pose position: relative sur le th). */
@media screen and (max-width: 900px) {
  table.repli-cartes:has(.tf-btn) thead { display: block; margin: 0 0 12px; }
  table.repli-cartes:has(.tf-btn) thead tr {
    display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0;
  }
  table.repli-cartes:has(.tf-btn) thead th { display: none; }
  table.repli-cartes:has(.tf-btn) thead th:has(.tf-btn) {
    display: block; border: 1px solid var(--line, GrayText); border-radius: var(--r-sm, 8px);
    padding: 4px 4px 4px 12px; background: var(--surface, Canvas); color: var(--ink, CanvasText);
  }
  table.repli-cartes:has(.tf-btn) thead th .tf-btn { margin-left: 4px; }
}

@media print { .tf-btn, .tf-panel, tr[data-tf-empty] { display: none; } }

/* ---- portail-adaptations.css ---- */
/* portail-adaptations.css — ce que le portail servi ajoute aux feuilles de la maquette TCO.
   jetons-tco.css et composition-tco.css sont des copies à l'octet près de la maquette validée
   (D-20 (a)) ; cette feuille vient après elles et ne porte que les écarts qu'impose le portail réel :
   1. les polices, servies en fichiers par /actifs/ au lieu du base64 de la maquette ;
   2. les parts de jauge et le nombre de voies, posés par des classes : la politique de sécurité du
      contenu refuse l'attribut style que la maquette écrivait ;
   3. des cellules sans classe, imposées par les tests existants (cellule d'équipe `<td>équipe</td>`,
      code d'erreur `<code>401</code>`), stylées par leur position ;
   4. les formulaires qui portent chaque geste de ligne, là où la maquette n'avait que des boutons ;
   5. le portail sans script : la navigation reste visible sous 1024 px, les commandes qui exigent le
      script se masquent. Aucune couleur ni police littérale : jetons de jetons-tco.css seulement. */

/* 1. Polices libres OFL-1.1 (fontsource 5.3.0), empreintes de directions-20261110/polices.json. */
@font-face { font-family: "Michroma"; font-style: normal; font-weight: 400; font-display: swap; src: url("/actifs/polices/michroma-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/actifs/polices/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("/actifs/polices/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("/actifs/polices/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/actifs/polices/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

/* 2. Parts de jauge (0 à 100 %) et nombre de voies du poste (1 à 16). */
.part-0 { --part: 0%; } .part-1 { --part: 1%; } .part-2 { --part: 2%; } .part-3 { --part: 3%; } .part-4 { --part: 4%; }
.part-5 { --part: 5%; } .part-6 { --part: 6%; } .part-7 { --part: 7%; } .part-8 { --part: 8%; } .part-9 { --part: 9%; }
.part-10 { --part: 10%; } .part-11 { --part: 11%; } .part-12 { --part: 12%; } .part-13 { --part: 13%; } .part-14 { --part: 14%; }
.part-15 { --part: 15%; } .part-16 { --part: 16%; } .part-17 { --part: 17%; } .part-18 { --part: 18%; } .part-19 { --part: 19%; }
.part-20 { --part: 20%; } .part-21 { --part: 21%; } .part-22 { --part: 22%; } .part-23 { --part: 23%; } .part-24 { --part: 24%; }
.part-25 { --part: 25%; } .part-26 { --part: 26%; } .part-27 { --part: 27%; } .part-28 { --part: 28%; } .part-29 { --part: 29%; }
.part-30 { --part: 30%; } .part-31 { --part: 31%; } .part-32 { --part: 32%; } .part-33 { --part: 33%; } .part-34 { --part: 34%; }
.part-35 { --part: 35%; } .part-36 { --part: 36%; } .part-37 { --part: 37%; } .part-38 { --part: 38%; } .part-39 { --part: 39%; }
.part-40 { --part: 40%; } .part-41 { --part: 41%; } .part-42 { --part: 42%; } .part-43 { --part: 43%; } .part-44 { --part: 44%; }
.part-45 { --part: 45%; } .part-46 { --part: 46%; } .part-47 { --part: 47%; } .part-48 { --part: 48%; } .part-49 { --part: 49%; }
.part-50 { --part: 50%; } .part-51 { --part: 51%; } .part-52 { --part: 52%; } .part-53 { --part: 53%; } .part-54 { --part: 54%; }
.part-55 { --part: 55%; } .part-56 { --part: 56%; } .part-57 { --part: 57%; } .part-58 { --part: 58%; } .part-59 { --part: 59%; }
.part-60 { --part: 60%; } .part-61 { --part: 61%; } .part-62 { --part: 62%; } .part-63 { --part: 63%; } .part-64 { --part: 64%; }
.part-65 { --part: 65%; } .part-66 { --part: 66%; } .part-67 { --part: 67%; } .part-68 { --part: 68%; } .part-69 { --part: 69%; }
.part-70 { --part: 70%; } .part-71 { --part: 71%; } .part-72 { --part: 72%; } .part-73 { --part: 73%; } .part-74 { --part: 74%; }
.part-75 { --part: 75%; } .part-76 { --part: 76%; } .part-77 { --part: 77%; } .part-78 { --part: 78%; } .part-79 { --part: 79%; }
.part-80 { --part: 80%; } .part-81 { --part: 81%; } .part-82 { --part: 82%; } .part-83 { --part: 83%; } .part-84 { --part: 84%; }
.part-85 { --part: 85%; } .part-86 { --part: 86%; } .part-87 { --part: 87%; } .part-88 { --part: 88%; } .part-89 { --part: 89%; }
.part-90 { --part: 90%; } .part-91 { --part: 91%; } .part-92 { --part: 92%; } .part-93 { --part: 93%; } .part-94 { --part: 94%; }
.part-95 { --part: 95%; } .part-96 { --part: 96%; } .part-97 { --part: 97%; } .part-98 { --part: 98%; } .part-99 { --part: 99%; }
.part-100 { --part: 100%; }
.voies-1 { --voies: 1; } .voies-2 { --voies: 2; } .voies-3 { --voies: 3; } .voies-4 { --voies: 4; } .voies-5 { --voies: 5; } .voies-6 { --voies: 6; }
.voies-7 { --voies: 7; } .voies-8 { --voies: 8; } .voies-9 { --voies: 9; } .voies-10 { --voies: 10; } .voies-11 { --voies: 11; } .voies-12 { --voies: 12; }
.voies-13 { --voies: 13; } .voies-14 { --voies: 14; } .voies-15 { --voies: 15; } .voies-16 { --voies: 16; }
.accueil-aiguilles { height: calc(52px * var(--voies, 7)); }

/* 3. Cellules sans classe : l'équipe ou l'identifiant en tête de ligne, les codes d'erreur. */
#table-conso tbody td:first-child, #table-comptes tbody td:first-child,
#table-cles tbody td.cellule-choix + td, #table-cles tbody tr > td:first-child:not(.cellule-choix) { font-weight: 700; }
#table-cles tbody td.cellule-choix + td, #table-cles tbody tr > td:first-child:not(.cellule-choix) { white-space: nowrap; }
#table-journal tbody td:nth-child(2) { font-weight: 700; }
.table-erreurs td.cellule-code code { font-family: var(--police-mono); font-weight: 400; padding: 0 var(--espace-xs); border: 2px solid var(--trait-fort); border-radius: var(--rayon-sm); }
.table-erreurs td.cellule-code[data-famille="5xx"] code { border-color: var(--texte-alerte); color: var(--texte-alerte); }
.table-cle-valeur caption { padding: 0 0 var(--espace-xs); color: var(--texte-faible); font-size: var(--texte-xs); }
.marque-nom { text-decoration: none; }
/* Terme du lexique dans la prose de la documentation : sa définition en infobulle (title), signalée par un
   soulignement pointillé (règle X9 d'oracle-exploitabilite, TF-2158). */
.terme { text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 0.18em; cursor: help; }

/* 4. Un formulaire par geste de ligne, un formulaire d'export dans la barre d'outils. */
form.geste, .form-export, .session form, .mise-en-service-pied { margin: 0; }
form.geste { display: inline; }
.cellule-actions form.geste + form.geste { margin-left: var(--espace-2xs); }
.barre-outils > .form-export { display: flex; }
@media screen and (max-width: 1600px) {
  .table-cles .cellule-actions form.geste + form.geste { margin-left: 0; }
}
@media screen and (max-width: 1200px) {
  .cellule-actions form.geste + form.geste { margin-left: 0; }
}

/* Ajustement à la marge (latitude de D-19 (d)) : au-delà de 2400 px, la composition garde les puces de modèles
   d'une clé sur une ligne. Une clé réelle en porte jusqu'à 14 (la clé gérée « client-a » de la pile locale) :
   la table passait à 2885 px dans une fenêtre de 2560 px (render_page, V1). La colonne reprend sa largeur
   et ses puces passent à la ligne au besoin ; une clé de 1 à 3 modèles garde sa ligne unique. */
@media screen and (min-width: 2400px) {
  .table-cles td[data-label="Modèles autorisés"], .table-cles thead th:nth-child(4) { width: auto; white-space: normal; }
  .table-cles .puces-modeles { flex-wrap: wrap; }
}

/* Ajustement à la marge (latitude de D-19 (d)) : au-delà de 3 modèles, une clé montre ses 3 premiers en puces et
   replie les suivants sous « +N modèles » (puces_cle de vues.py). La maquette validée n'en montre jamais plus de 3 ;
   la clé gérée à 14 modèles ramenait l'écran des clés de 10 à 9 lignes visibles à 1920 × 1080. */
.puces-modeles li.puces-suite { padding: 0; border: 0; background: none; }
.puces-suite summary { padding: 0 var(--espace-xs); border: 1px dashed var(--trait-fort); border-radius: var(--rayon-sm); cursor: pointer; line-height: 1.6; font-size: var(--texte-xs); white-space: nowrap; }
.puces-suite details[open] > summary { margin-bottom: var(--espace-2xs); }
.puces-suite details[open] > .puces-modeles { flex-wrap: wrap; }

/* Ajustement à la marge (latitude de D-19 (d)) : un nom d'organisation plus long que « client-a » ne coupe
   ni « Se déconnecter » ni « Thème sombre » en deux lignes ; c'est la navigation qui passe à la ligne. */
.entete-outils .bouton, .entete-outils .theme-toggle { white-space: nowrap; }
/* « Visite guidée » (bouton-ligne, 32 px) et « Thème sombre » (44 px) partagent une rangée : la critique du 01/12/2026 les a
   mesurés sur 2 hauteurs, à 6 px d'écart. Dans l'en-tête, le bouton de ligne prend la hauteur de cible de son voisin. */
.entete-outils .bouton-ligne { min-height: 44px; }
.marque-org, .session-login, .session-role { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 5. Sans script : navigation visible sous 1024 px, commandes de script masquées. */
html:not([data-js]) .js-requis { display: none !important; }
@media screen and (max-width: 1024px) {
  html:not([data-js]) .entete .bouton-menu { display: none; }
  html:not([data-js]) .nav-produit { display: block; }
}

/* 7. Boutons de geste : leur fond est déclaré après table-filters.css. Cette feuille du socle pose `background: none` sur
   `.tf-actions button` ; un lecteur de feuille qui ne remonte pas les ancêtres d'un sélecteur (oracle-declencheurs de forge-design,
   règle DE3) l'applique à tous les boutons de la page et lit chaque bouton de geste comme un fantôme. Le fond posé ici est celui
   de `.bouton` : le rendu ne change pas. `bouton-secondaire` est la classe des boutons de geste qui n'ont pas `bouton-ligne`. */
.bouton-ligne, .bouton-secondaire { background: var(--surface); }
/* L'état vide d'une page se centre dans son cadre : sa colonne de lecture n'est plus calée à gauche d'un cadre vide à droite. */
.vide-grand { justify-content: center; }

/* 6. Identités et rôles (brief version-20261112) : le sélecteur « Organisation active » de l'en-tête (D-23 (a),
   EF-48), le changement de rôle d'une personne dans sa ligne (EF-50), les invitations reçues (EF-51). */
.selecteur-organisation { display: flex; align-items: center; gap: var(--espace-xs); margin: 0; }
.selecteur-organisation label { font-size: var(--texte-xs); color: var(--texte-faible); white-space: nowrap; }
.selecteur-organisation select, form.geste-role select {
  min-height: 32px; max-width: 24ch; padding: 0 var(--espace-sm); border: 2px solid var(--trait-fort); border-radius: var(--rayon-sm);
  background: var(--surface); color: var(--texte); font-size: var(--texte-xs); }
form.geste-role { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2xs); max-width: 100%;
  margin: 0 var(--espace-2xs) var(--espace-2xs) 0; }
form.geste-role input { min-width: 0; max-width: 100%; }
.invitations { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-md); }
.invitation-titre { margin: 0 0 var(--espace-2xs); }
.invitation-actions { display: flex; flex-wrap: wrap; gap: var(--espace-sm); margin: var(--espace-sm) 0 0; }
/* Sous 1200 px, l'étiquette du sélecteur se masque à l'œil seulement, comme .sr : la liste garde son nom accessible. */
@media screen and (max-width: 1200px) {
  .selecteur-organisation label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}

/* 8. Page Conversation (EF-57 à EF-66, EF-70, ENF-37) : vos conversations à gauche, puis le besoin et le modèle, puis le fil et
   la saisie ; l'ordre visuel suit celui du document et du clavier. De 1025 à 1439 px, les conversations et les réglages
   s'empilent à gauche du fil ; une colonne sous 1024 px. Jetons de jetons-tco.css seulement. */
.ecran-conversation { --largeur-reglages: 340px; --largeur-historique: 300px; }
.bandeau-donnees { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--espace-sm) var(--espace-lg);
  padding: var(--espace-md) var(--espace-lg); border: 2px solid var(--voyant-ambre); border-radius: var(--rayon-md); background: var(--surface); }
.bandeau-texte { display: grid; gap: var(--espace-2xs); flex: 1 1 480px; min-width: 0; }
.bandeau-titre { font-weight: 700; }
.conversation-grille { display: grid; grid-template-columns: minmax(0, var(--largeur-historique)) minmax(0, var(--largeur-reglages)) minmax(0, 1fr);
  grid-template-areas: "historique reglages fil"; gap: var(--espace-lg); align-items: start; }
.conversation-historique { grid-area: historique; display: grid; gap: var(--espace-md); min-width: 0; }
.conversation-reglages { grid-area: reglages; }
.conversation-fil { grid-area: fil; }
.historique-tete { display: grid; gap: var(--espace-sm); }
.historique-titre { margin: 0; font-size: var(--texte-md); }
.historique-tete .bouton { justify-self: start; }
.historique-liste { display: grid; gap: var(--espace-md); max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; min-width: 0; }
.historique-liste:empty { display: none; }
.historique-groupe { display: grid; gap: var(--espace-2xs); }
.historique-periode { margin: 0; color: var(--texte-faible); font-size: var(--texte-xs); font-weight: 700; }
.historique-groupe ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--espace-2xs); }
.historique-entree { display: flex; align-items: stretch; gap: var(--espace-2xs); min-width: 0; border: 2px solid transparent; border-radius: var(--rayon-sm); }
.historique-entree:hover { border-color: var(--trait); }
.historique-entree[data-active] { background: var(--selection-fond); border-color: var(--selection-fond); }
.historique-ouvrir { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: var(--espace-2xs) var(--espace-sm); border: 0; border-radius: var(--rayon-sm);
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; display: grid; align-content: center; }
.historique-entree[data-active] .historique-ouvrir { color: var(--selection-texte); font-weight: 700; }
/* Le titre tient sur 2 lignes au plus : la colonne de 300 px n'en montrait que 15 caractères sur une seule. */
.historique-ouvrir span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.historique-ouvrir:focus-visible, .historique-supprimer:focus-visible { outline: 3px solid var(--focus-anneau); outline-offset: var(--focus-decalage); }
.historique-supprimer { flex: none; min-height: 44px; padding: 0 var(--espace-sm); border: 0; border-radius: var(--rayon-sm); background: transparent;
  color: var(--texte-faible); font: inherit; font-size: var(--texte-xs); text-decoration: underline; cursor: pointer; }
.historique-entree[data-active] .historique-supprimer { color: var(--selection-texte); }
.historique-supprimer[data-confirmer-suppression] { color: var(--texte-alerte); font-weight: 700; }
.historique-entree[data-active] .historique-supprimer[data-confirmer-suppression] { color: var(--selection-texte); }
.conversation-reglages { display: grid; gap: var(--espace-lg); }
.besoins { margin: 0; padding: 0; border: 0; display: grid; gap: var(--espace-xs); min-width: 0; }
.besoins legend { padding: 0; margin-bottom: var(--espace-sm); font-weight: 700; }
.besoin { display: flex; align-items: center; gap: var(--espace-sm); min-height: 44px; padding: var(--espace-2xs) var(--espace-md);
  border: 2px solid var(--trait-fort); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 500; }
.besoin input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.besoin:has(input:checked) { background: var(--selection-fond); color: var(--selection-texte); border-color: var(--selection-fond); }
.besoin:has(input:focus-visible) { outline: 3px solid var(--focus-anneau); outline-offset: var(--focus-decalage); }
.conversation-reglages select { width: 100%; min-height: 44px; padding: 0 var(--espace-sm); border: 2px solid var(--trait-fort); border-radius: var(--rayon-sm);
  background: var(--surface); color: var(--texte); }
.part-conversation { display: grid; gap: var(--espace-xs); }
.part-titre { display: flex; justify-content: space-between; gap: var(--espace-sm); font-weight: 700; }
.part-valeur { font-family: var(--police-mono); font-weight: 400; }
.conversation-fil { display: grid; gap: var(--espace-md); }
.fil-conversation { list-style: none; margin: 0; padding: 0 var(--espace-2xs) 0 0; display: grid; gap: var(--espace-md); align-content: start;
  max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; }
.fil-conversation:empty { display: none; }
.fil-message { max-width: min(80ch, 100%); padding: var(--espace-sm) var(--espace-md); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md);
  background: var(--surface); }
.fil-personne { justify-self: end; background: var(--surface-creuse); }
.fil-modele { justify-self: start; }
.fil-echec { justify-self: start; border-color: var(--texte-alerte); }
.fil-non-envoye { border-style: dashed; }
.fil-auteur { margin-bottom: var(--espace-2xs); color: var(--texte-faible); font-size: var(--texte-xs); font-weight: 700; }
.fil-echec .fil-auteur { color: var(--texte-alerte); }
.fil-texte { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 400; }
.fil-geste { margin-top: var(--espace-sm); }
.composeur { display: grid; gap: var(--espace-xs); }
.composeur > label { font-weight: 700; }
.composeur textarea { min-height: 120px; padding: var(--espace-sm) var(--espace-md); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md);
  background: var(--surface); color: var(--texte); resize: vertical; }
.composeur textarea[aria-invalid="true"] { border-color: var(--texte-alerte); }
.composeur-pied { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-sm) var(--espace-md); }
.composeur-pied > .bouton-principal { margin-left: auto; }
.piece-jointe { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--espace-xs); min-width: 0; overflow-wrap: anywhere; }
/* EF-91 : sous une réponse, le bouton « Télécharger » de chaque bloc étiqueté. */
.fil-telechargements { display: flex; flex-wrap: wrap; gap: var(--espace-xs); margin-top: var(--espace-sm); }
.bouton-telecharger { max-width: 100%; overflow-wrap: anywhere; white-space: normal; text-align: left; }
@media screen and (max-width: 1439px) {
  .conversation-grille { grid-template-columns: minmax(0, var(--largeur-reglages)) minmax(0, 1fr); grid-template-areas: "historique fil" "reglages fil"; }
  .historique-liste { max-height: 40vh; }
}
@media screen and (max-width: 1024px) {
  .conversation-grille { grid-template-columns: minmax(0, 1fr); grid-template-areas: "historique" "reglages" "fil"; }
  .historique-liste { max-height: 30vh; }
  .fil-conversation { max-height: none; }
}
/* EF-77 : le budget de la clé personnelle, dans sa fiche. Sous 900 px, composition-tco.css étend la jauge à toute la ligne, et la
   cellule de budget interdit le retour à la ligne : le texte partait au-delà du bord, document de 645 px à 390 (27/11/2026). */
@media screen and (max-width: 900px) {
  .fiche-faits .cellule-budget { white-space: normal; }
}
/* EF-62 : la part de conversation d'une personne dans la page Comptes, et son formulaire de ligne, qui se replie avec la colonne. */
form.geste-part { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2xs); max-width: 100%; margin: 0; }
form.geste-part .erreur-champ { flex-basis: 100%; margin: 0; }
form.geste-part input { width: 9ch; min-width: 0; min-height: 32px; padding: 0 var(--espace-xs); border: 2px solid var(--trait-fort); border-radius: var(--rayon-sm);
  background: var(--surface); color: var(--texte); font-size: var(--texte-xs); }
.part-detail { display: block; color: var(--texte-faible); font-size: var(--texte-xs); }
/* La colonne de part rétrécit celle des actions : sous 1600 px, les gestes d'une ligne de compte passent à la ligne, comme ceux
   d'une ligne de clé (composition-tco.css, même seuil). Mesuré à 1440 px sans cette règle : 5 débordements, document de 1471 px. */
@media screen and (max-width: 1600px) {
  #table-comptes .cellule-actions { white-space: normal; }
  #table-comptes .cellule-actions form.geste + form.geste { margin-left: 0; }
  #table-comptes .cellule-actions .bouton-ligne { margin: 0 var(--espace-2xs) var(--espace-2xs) 0; }
}

/* Bascule de thème enfoncée puis survolée : le survol des boutons posait --surface-creuse sous le texte --accent-contraste,
   à 1,3:1 environ en sombre (mesuré le 25/11/2026). Enfoncée, elle garde son fond d'accent au survol. */
@media (hover: hover) { .theme-toggle[aria-pressed="true"]:hover { background: var(--accent); color: var(--accent-contraste); } }

/* 9. Page Fournisseurs (EF-86, R6 du 01/12/2026) : dans chaque ligne, le champ de la clé et le bouton « Poser la clé » partagent une
   grille de deux colonnes, le champ à gauche et le bouton à droite, sur le même rang : même bord haut et même hauteur à toutes les
   largeurs, sans retour du bouton à la ligne. Le second champ de Bedrock (secret AWS) et d'Azure OpenAI (ressource) prend le rang
   suivant, sous le premier. Les deux classes du sélecteur passent devant `.cellule-actions form` de la composition Tenon, qui
   empile champ et bouton à 650 px et moins. Le champ garde 12rem au moins, la largeur de son texte indicatif le plus long
   (« nom de ressource Azure », 145 px à 12,5 px) : réduit à 91 px, il le coupait à 390 et 1024 px (render_page du 01/12/2026). Sous
   1200 px, la table se replie en cartes dans les deux compositions, et la cellule de la clé donne au formulaire toute la largeur de
   la carte, son libellé au-dessus : à 7 colonnes, la table n'y laissait pas cette largeur au formulaire. */
.cellule-actions form.geste-cle-fournisseur { display: grid; grid-template-columns: minmax(12rem, 1fr) max-content; align-items: stretch;
  gap: var(--espace-2xs); width: 100%; margin: 0; }
.cellule-actions form.geste-cle-fournisseur > input:not([type="hidden"]) { grid-column: 1; width: 100%; min-width: 0; margin: 0; }
.cellule-actions form.geste-cle-fournisseur > button { grid-column: 2; grid-row: 1; margin: 0; }

/* 10. Table Identités (EF-87, R7 du 01/12/2026) : 8 colonnes, dont 2 au libellé long. Ses en-têtes passent à la ligne à toute
   largeur : en capitales et sans retour, « Crédit de conversation (30 jours) » prenait 417 px, et la page débordait à 1920 px
   (document de 2 164 px mesuré le 01/12/2026). Sous 1600 px, ses gestes passent à la ligne, comme ceux de la table des comptes. Sous
   1200 px, la direction TCO la replie en cartes, plus tôt que ses autres tables (900 px) : ses colonnes en capitales espacées et
   leurs boutons de filtre en font 1 160 px au moins, mesurés à 1024 px. */
#table-identites th { white-space: normal; }
@media screen and (max-width: 1600px) {
  #table-identites .cellule-actions { white-space: normal; }
  #table-identites .cellule-actions form.geste + form.geste { margin-left: 0; }
  #table-identites .cellule-actions .bouton-ligne { margin: 0 var(--espace-2xs) var(--espace-2xs) 0; }
}

/* 11. Cartes avant 900 px : les tables Fournisseurs et Organisations dans les deux compositions, la table Identités en TCO
   (sections 9 et 10 ; Organisations depuis la vague 2 du 01/12/2026, ses gestes et ses modèles en liste débordant à 1024 px). Mêmes
   cartes que `table.repli-cartes` sous 900 px (composition-tco.css), et même barre de filtres au-dessus d'elles que table-filters.css
   (TF-1965) : un en-tête masqué emporterait ses déclencheurs de filtre (règle V27 de render_page, mesurée le 01/12/2026). */
@media screen and (max-width: 1200px) {
  table#table-fournisseurs caption, table#table-organisations caption, :root:not([data-composition="tenon"]) table#table-identites caption { display: block; }
  table#table-fournisseurs:not(:has(.tf-btn)) thead, table#table-organisations:not(:has(.tf-btn)) thead, :root:not([data-composition="tenon"]) table#table-identites:not(:has(.tf-btn)) thead { display: none; }
  table#table-fournisseurs:has(.tf-btn) thead, table#table-organisations:has(.tf-btn) thead, :root:not([data-composition="tenon"]) table#table-identites:has(.tf-btn) thead { display: block; margin: 0 0 12px; }
  table#table-fournisseurs:has(.tf-btn) thead tr, table#table-organisations:has(.tf-btn) thead tr, :root:not([data-composition="tenon"]) table#table-identites:has(.tf-btn) thead tr {
    display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
  table#table-fournisseurs:has(.tf-btn) thead th, table#table-organisations:has(.tf-btn) thead th, :root:not([data-composition="tenon"]) table#table-identites:has(.tf-btn) thead th { display: none; }
  table#table-fournisseurs:has(.tf-btn) thead th:has(.tf-btn), table#table-organisations:has(.tf-btn) thead th:has(.tf-btn), :root:not([data-composition="tenon"]) table#table-identites:has(.tf-btn) thead th:has(.tf-btn) {
    display: block; border: 1px solid var(--line, GrayText); border-radius: var(--r-sm, 8px); padding: 4px 4px 4px 12px;
    background: var(--surface, Canvas); color: var(--ink, CanvasText); }
  table#table-fournisseurs thead th .tf-btn, table#table-organisations thead th .tf-btn, :root:not([data-composition="tenon"]) table#table-identites thead th .tf-btn { margin-left: 4px; }
  table#table-fournisseurs, table#table-organisations, table#table-fournisseurs tbody, table#table-organisations tbody, :root:not([data-composition="tenon"]) table#table-identites,
  :root:not([data-composition="tenon"]) table#table-identites tbody { display: block; }
  table#table-fournisseurs tbody tr, table#table-organisations tbody tr, :root:not([data-composition="tenon"]) table#table-identites tbody tr { display: block; margin: 0 0 var(--espace-sm);
    padding: var(--espace-xs) var(--espace-sm); border: 2px solid var(--trait-fort); border-radius: var(--rayon-md); background: var(--surface); break-inside: avoid; }
  table#table-fournisseurs td, table#table-organisations td, :root:not([data-composition="tenon"]) table#table-identites td { display: grid; grid-template-columns: minmax(9ch, 38%) minmax(0, 1fr);
    gap: var(--espace-xs); padding: var(--espace-2xs) 0; text-align: left; border-bottom: 0; white-space: normal; }
  table#table-fournisseurs td::before, table#table-organisations td::before, :root:not([data-composition="tenon"]) table#table-identites td::before { content: attr(data-label); font-weight: 700; color: var(--texte-faible); }
  table#table-fournisseurs td:not([data-label])::before, table#table-organisations td:not([data-label])::before, :root:not([data-composition="tenon"]) table#table-identites td:not([data-label])::before { content: none; }
  table#table-fournisseurs td.cellule-actions, table#table-organisations td.cellule-actions { grid-template-columns: minmax(0, 1fr); }
}

/* 12. Vague 2 de l'étape des écrans de l'Opérateur (01/12/2026). Les jetons communs aux deux compositions seulement (--surface,
   --texte, --texte-faible, --trait-fort, --accent), avec un repli système pour une direction qui n'en porterait pas un. */
/* La visite guidée (EF-98) : un panneau en tête du contenu, sans voile ; l'élément que l'étape montre est cerclé. */
.visite { margin: 0 0 var(--espace-md, 16px); padding: var(--espace-sm, 12px) var(--espace-md, 16px); border: 2px solid var(--accent, Highlight);
  border-radius: var(--rayon-md, 8px); background: var(--surface, Canvas); color: var(--texte, CanvasText); }
.visite p { margin: 0; }
.visite-compte { font-size: var(--texte-xs, 12px); color: var(--texte-faible, GrayText); }
.visite h2 { margin: var(--espace-2xs, 4px) 0; font-size: var(--texte-lg, 18px); line-height: 1.3; }
.visite .visite-actions { display: flex; flex-wrap: wrap; gap: var(--espace-xs, 8px); margin-top: var(--espace-sm, 12px); }
.visite-cible { outline: 3px solid var(--accent, Highlight); outline-offset: 3px; }
.aide-visite { margin: var(--espace-sm, 12px) 0 0; }
.bouton-visite[hidden], .aide-visite:has(> [hidden]) { display: none; }
/* L'infobulle d'un terme du lexique (EF-99) : la définition s'affiche au survol et au focus clavier, sous le terme. */
.terme { position: relative; }
.terme:hover::after, .terme:focus-visible::after { content: attr(data-definition); position: absolute; left: 0; top: calc(100% + 4px); z-index: 40;
  width: max-content; max-width: min(40ch, 80vw); padding: 4px 8px; border-radius: var(--rayon-sm, 4px); background: var(--texte, CanvasText);
  color: var(--surface, Canvas); font-size: var(--texte-xs, 12px); font-weight: 400; line-height: 1.4; letter-spacing: 0; text-transform: none;
  white-space: normal; pointer-events: none; }
th[data-definition] { cursor: help; }
/* « Tous » et « Aucun » d'un groupe de modèles (EF-100) ; un modèle d'un fournisseur sans clé, grisé, sa raison en infobulle. */
.tous-aucun { display: inline-flex; flex-wrap: wrap; gap: var(--espace-2xs, 4px); margin: 0 0 var(--espace-xs, 8px); }
.tous-aucun-ensemble { margin: 0 0 var(--espace-sm, 12px); }
.case-grisee { color: var(--texte-faible, GrayText); cursor: not-allowed; }
.case-grisee input { cursor: not-allowed; }
/* Renommer une organisation (EF-96) : le champ s'ouvre sous le bouton, dans la cellule des gestes. */
.renommer { display: inline-block; vertical-align: top; }
.renommer > summary { list-style: none; cursor: pointer; }
.renommer > summary::-webkit-details-marker { display: none; }
.renommer[open] > .geste-renommer { display: flex; flex-wrap: wrap; gap: var(--espace-2xs, 4px); margin: var(--espace-2xs, 4px) 0; }
.geste-renommer input { min-width: 16ch; }
/* La cellule des gestes de la table Organisations passe à la ligne : Modèles, Renommer et Renvoyer le lien s'y ajoutent aux 3 gestes
   d'avant, et la table débordait de 1440 px (render_page, 01/12/2026). */
#table-organisations .cellule-actions { white-space: normal; }
#table-organisations .cellule-actions > .bouton, #table-organisations .cellule-actions > form.geste,
#table-organisations .cellule-actions > .renommer { display: inline-block; margin: 0 var(--espace-2xs, 4px) var(--espace-2xs, 4px) 0; }
#table-organisations .cellule-actions form.geste + form.geste { margin-left: 0; }
#table-organisations .geste-renommer input { min-width: 0; width: 14ch; }
/* Fermé, le champ du nom ne compte pas dans la largeur de la cellule. */
.renommer:not([open]) > .geste-renommer { display: none; }

/* Logo « wisely by Digit-AI » (demande du porteur du 01/12/2026) : l'icône carrée et le logotype, en tracés SVG dans la page. Le
   logotype prend ses couleurs des variables --logo-* ; l'icône garde les siennes. Sous Tenon, le carré de la maquette cède la place
   à l'icône ; sous TCO et ses directions, la plaque du nom devient transparente pour laisser lire le logo. */
:root { --logo-texte: #0F172A; --logo-by: #475569; --logo-digit: #2563EB; --logo-point: #22C38E; }
:root[data-theme="dark"] { --logo-texte: #F8FAFC; --logo-by: #CBD5E1; --logo-digit: #8AB4FF; --logo-point: #22C38E; }
.logo-marque, .logo-mot { display: block; }
/* Les couleurs passent par les classes : la politique de sécurité du portail refuse les styles écrits dans la page. */
.logo-mot .logo-texte { fill: var(--logo-texte); }
.logo-mot .logo-by { fill: var(--logo-by); }
.logo-mot .logo-digit { fill: var(--logo-digit); }
.logo-mot .logo-point { fill: var(--logo-point); }
.brand.brand-logo { gap: 8px; }
.brand.brand-logo .brand-mark { width: 36px; height: 36px; background: none; clip-path: none; }
.brand.brand-logo .brand-mark::after { content: none; }
.brand.brand-logo .logo-marque { width: 100%; height: 100%; }
.brand.brand-logo .brand-name { display: block; line-height: 0; }
.brand.brand-logo .logo-mot { width: auto; height: 42px; }
:root .entete .marque-nom.marque-logo { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent;
  box-shadow: none; text-decoration: none; }
:root .entete .marque-nom.marque-logo::before, :root .entete .marque-nom.marque-logo::after { content: none; }
.marque-logo .logo-marque { width: 34px; height: 34px; }
.marque-logo .logo-mot { width: auto; height: 40px; }
@media (max-width: 640px) {
  .brand.brand-logo .brand-mark, .marque-logo .logo-marque { width: 28px; height: 28px; }
  .brand.brand-logo .logo-mot, .marque-logo .logo-mot { height: 34px; }
}

/* Retour du porteur du 02/12/2026 : le sélecteur de rôle d'une ligne de la table Identités prend la largeur du rôle choisi, pas
   celle du plus long, avec un retrait serré : la table tient à 1024 px sans tronquer le rôle ; « Changer » passe sous lui au besoin. */
form.geste.geste-role { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
form.geste.geste-role select { field-sizing: content; min-width: 0; padding: 2px 20px 2px 6px; }
/* Le sélecteur élargit la colonne Rôle : sous 1280 px, l'identifiant (une adresse longue) se coupe où il faut pour que la table tienne
   dans la page, au lieu de la faire déborder (V1 de render_page). */
@media (max-width: 1279px) { #table-identites td:first-child { overflow-wrap: anywhere; } }
