/* G-CORE Mining Operations : feuille du cadre, direction « Studio » confirmée par le PDG le 14/10/2026.
   Un seul système de jetons, deux thèmes (sombre graphite par défaut, clair), aucune ressource extérieure.
   Cadre fixe : la page ne défile jamais, seuls les panneaux internes défilent.
   Contrat avec les écrans (jetons, classes, API cadre) : docs/INTERFACE.md.
   Aucun attribut style dans le HTML (CSP style-src 'self') : les valeurs calculées passent par le CSSOM. */

/* =================================================================== 1. Jetons */
:root, :root[data-theme="dark"] {
  /* Marque : remplaçable par compagnie (appliquerTheme pose --brand, --brand-ink, --accent, --accent-ink) */
  --brand: #0B1B2B; --brand-ink: #FFFFFF; --accent: #C9A227; --accent-ink: #14212E;

  /* Typographie */
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Consolas, "Cascadia Mono", monospace;
  --fs-xxs: 9px; --fs-xs: 10px; --fs-s: 11px; --fs-m: 12px; --fs-l: 13px; --fs-xl: 16px;

  /* Espacements et rayons faibles */
  --e1: 2px; --e2: 4px; --e3: 6px; --e4: 8px; --e5: 12px;
  --r1: 2px; --r2: 3px; --r3: 4px;

  /* Hauteurs du cadre et de la grille */
  --h-titre: 30px; --h-ruban: 60px; --h-onglets: 26px; --h-entete: 32px; --h-ligne: 24px;
  --h-saisie: 28px; --h-feuilles: 24px; --h-etat: 24px; --h-cmd: 22px; --h-tete: 24px;

  /* Panneaux ancrés */
  --w-explorateur: 220px; --w-rail: 24px; --w-dock: 260px; /* --w-dock : largeur du dock, réglée par l'utilisateur (CSSOM sur .cadre) */
  --duree: 120ms;

  /* Thème sombre graphite (défaut) */
  color-scheme: dark;
  --bg-0: #16181B; --bg-1: #25282D; --bg-2: #2D3137; --bg-3: #3A3F47;
  --grid-bg: #1F2226; --grid-calc: #262C38; --grid-line: #30343A;
  --line: #3A3F47; --line-fort: #4D535D; --champ-bord: #7A828E;
  --ink: #E6E8EB; --ink-2: #B3BAC4;
  --focus: #6CB6F5;
  --ok: #7FD1A6; --warn: #E9C46A; --bad: #FF9E97; --info: #8EC5F2;
  --ok-bg: #1D3A2D; --warn-bg: #3B331F; --bad-bg: #452828; --info-bg: #1E3346;
  --serie-1: #3987E5; --serie-2: #199E70;
  --ombre: 0 8px 24px rgb(0 0 0 / .5);
  --voile: rgb(0 0 0 / .5);
  /* Accent lisible comme texte : calculé par app.js pour la compagnie (4,5:1), sinon mélange par défaut */
  --accent-texte: var(--accent-texte-sombre, color-mix(in srgb, var(--accent) 72%, #FFFFFF));
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg-0: #CFD4DA; --bg-1: #F3F4F6; --bg-2: #E6E9ED; --bg-3: #D8DDE3;
  --grid-bg: #FFFFFF; --grid-calc: #EAF0F7; --grid-line: #DDE1E6;
  --line: #C5CAD1; --line-fort: #A9B0B9; --champ-bord: #7C8590;
  --ink: #17212B; --ink-2: #4B5663;
  --focus: #1F6FB2;
  --ok: #1E6B48; --warn: #7A5200; --bad: #B3261E; --info: #1F5C8A;
  --ok-bg: #E3F1E9; --warn-bg: #FBF0D9; --bad-bg: #FBE5E3; --info-bg: #E4EEF7;
  --serie-1: #2A78D6; --serie-2: #148F63;
  --ombre: 0 8px 24px rgb(15 25 35 / .22);
  --voile: rgb(15 25 35 / .35);
  --accent-texte: var(--accent-texte-clair, color-mix(in srgb, var(--accent) 42%, #000000));
}
:root {
  /* Jetons dérivés, communs aux deux thèmes */
  --survol: color-mix(in srgb, var(--ink) 7%, var(--grid-bg));
  --choisi: color-mix(in srgb, var(--accent) 16%, var(--grid-bg));
  --choisi-panneau: color-mix(in srgb, var(--accent) 16%, var(--bg-1));
  --saisie-bg: color-mix(in srgb, var(--accent) 10%, var(--bg-1));
  --entete-calc: color-mix(in srgb, var(--info) 12%, var(--bg-2));
  /* Statuts du circuit de validation (toujours accompagnés d'une lettre, d'une forme et d'un texte) */
  --st-brouillon: var(--ink-2); --st-soumis: var(--info); --st-verifie: var(--info); --st-valide: var(--ok); --st-retourne: var(--warn);
}

/* =================================================================== 2. Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg-0); color: var(--ink); font: var(--fs-m)/1.35 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
#racine { height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; padding: 0; }
h1, h2, h3 { font-size: inherit; font-weight: 600; }
a { color: var(--info); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: color-mix(in srgb, var(--focus) 35%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 13px; height: 13px; flex: none; margin: 0; accent-color: var(--accent); }
mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 1px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.espace, .pousse { flex: 1; }
.chargement { padding: var(--e4); color: var(--ink-2); font-size: var(--fs-m); }
.nd { color: var(--ink-2); }
.aide { color: var(--ink-2); font-size: var(--fs-s); line-height: 1.45; }
.num, .n { font-variant-numeric: tabular-nums; }

/* Pictogrammes : jeu unique de symboles 24 x 24 tracés au trait */
.ic { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; }
.ic.p { width: 12px; height: 12px; }
.ic.g { width: 20px; height: 20px; stroke-width: 1.5; }
kbd { display: inline-block; min-width: 14px; padding: 0 3px; border: 1px solid var(--line-fort); border-bottom-width: 2px; border-radius: var(--r1); background: var(--bg-2); color: var(--ink); font: 600 var(--fs-xs)/13px var(--font); text-align: center; white-space: nowrap; }
.puce { display: inline-block; padding: 0 4px; border: 1px solid var(--line-fort); border-radius: var(--r1); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; line-height: 13px; white-space: nowrap; vertical-align: 1px; }

/* Lien d'évitement : visible au focus seulement */
.evitement { position: fixed; left: var(--e4); top: -40px; z-index: 90; padding: var(--e2) var(--e4); background: var(--bg-1); color: var(--ink); border: 1px solid var(--focus); border-radius: var(--r2); }
.evitement:focus { top: var(--e2); }

/* =================================================================== 3. Composants communs */

/* Boutons : .btn, variantes .principal .discret .petit .icone .danger */
.btn { height: var(--h-cmd); display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 var(--e4); border: 1px solid var(--line-fort); border-radius: var(--r2); background: var(--bg-2); color: var(--ink); font-size: var(--fs-m); font-weight: 400; line-height: 1; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--bg-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; background: var(--bg-2); }
.btn[aria-pressed="true"] { background: var(--bg-3); box-shadow: inset 0 -2px 0 var(--accent); }
.btn.principal { background: var(--accent-plein, var(--accent)); border-color: var(--accent-plein, var(--accent)); color: var(--accent-ink); font-weight: 600; }
.btn.principal:hover { filter: brightness(1.08); }
.btn.principal:focus-visible { outline-offset: 1px; }
.btn.discret { background: transparent; border-color: transparent; }
.btn.discret:hover { background: var(--bg-3); border-color: var(--line-fort); }
.btn.petit { height: 18px; padding: 0 var(--e3); font-size: var(--fs-s); }
.btn.icone { width: var(--h-cmd); padding: 0; }
.btn.petit.icone { width: 18px; }
.btn.danger { color: var(--bad); }
.btn[aria-busy="true"] { cursor: progress; }

/* Champs compacts : .champ (input, select, textarea), .champ-bloc (libellé au-dessus), .form-grille (libellé à gauche) */
.champ { height: var(--h-cmd); min-width: 0; max-width: 100%; padding: 0 5px; border: 1px solid var(--champ-bord); border-radius: var(--r1); background: var(--grid-bg); color: var(--ink); font-size: var(--fs-m); font-variant-numeric: tabular-nums; }
select.champ { padding-right: 2px; }
textarea.champ { height: auto; min-height: 60px; padding: var(--e2) 5px; line-height: 1.4; resize: vertical; font-family: var(--mono); }
input[type="color"].champ { width: 30px; padding: 1px; }
.champ::placeholder { color: var(--ink-2); opacity: 1; }
.champ:disabled { opacity: .6; cursor: not-allowed; }
.champ[aria-invalid="true"] { border-color: var(--bad); box-shadow: inset 0 -2px 0 var(--bad); }
.champ.large { width: 100%; }
.champ.court { width: 84px; }
.champ-bloc { display: grid; gap: 2px; min-width: 0; color: var(--ink-2); font-size: var(--fs-s); }
.champ-bloc > .champ, .champ-bloc > span > .champ { width: 100%; color: var(--ink); font-size: var(--fs-m); }
/* 2.36.0 (lot 0d, L0d.2) : zone de dépôt commune (public/depot_fichier.js). */
.depot-cible { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3); padding: var(--e4); border: 1px dashed var(--line-fort); border-radius: var(--r2); color: var(--ink-2); }
.depot-cible p { margin: 0; }
.depot-zone[data-survol] .depot-cible { border-color: var(--accent); background: var(--choisi); }
/* 2.36.0 (lot 0d, L0d.7) : composant commun de scan (public/scan_qr.js, monterScan). */
.scan-composant { display: grid; gap: var(--e3); }
.scan-lecteur { padding: var(--e3); border: 1px dashed var(--line-fort); border-radius: var(--r2); cursor: text; }
.scan-camera { display: grid; gap: var(--e3); justify-items: start; }
.scan-camera[hidden], .scan-video[hidden] { display: none; }
.scan-video { width: 100%; max-height: 260px; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--r2); }
.scan-saisie { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3); }
.scan-compteur { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.form-grille { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: var(--e2) var(--e4); }
.form-grille > label, .form-grille > .lib { color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; }
.form-grille > .plein { grid-column: 1 / -1; }
.duo { display: inline-flex; align-items: center; gap: var(--e2); }
.facultatif { color: var(--ink-2); font-weight: 400; }
.cases { display: grid; gap: 1px; }
.cases > legend { margin-bottom: var(--e2); color: var(--ink-2); font-size: var(--fs-s); }
.cases label { display: flex; align-items: center; gap: var(--e3); min-height: 20px; font-size: var(--fs-m); }
.cases.colonnes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); column-gap: var(--e5); }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--e3); flex-wrap: wrap; }
.m:empty { display: none; }

/* Barre d'outils compacte (28 px) */
.barre-outils { flex: none; min-height: 28px; display: flex; align-items: center; gap: var(--e2); padding: 0 var(--e4); background: var(--bg-1); border-bottom: 1px solid var(--line); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.barre-outils .sep { width: 1px; height: 16px; flex: none; margin: 0 var(--e2); background: var(--line); }
.barre-outils .note { color: var(--ink-2); font-size: var(--fs-s); }

/* Panneau : cadre fin, en-tête de 24 px, corps qui défile */
.panneau { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--grid-bg); border: 1px solid var(--line); border-radius: var(--r1); }
.panneau-tete { flex: none; height: var(--h-tete); display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e1) 0 var(--e4); background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: var(--fs-s); white-space: nowrap; }
.panneau-tete h2, .panneau-tete h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-s); font-weight: 600; }
.panneau-tete .note { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.panneau-tete .btn { font-size: var(--fs-s); }
.panneau-tete .btn:not(.petit) { height: 20px; }
.panneau-corps { flex: 1; min-height: 0; overflow: auto; padding: var(--e3) var(--e4); scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.panneau-corps.plein { padding: 0; }
.panneau.remplir { flex: 1; }

/* Indicateurs : libellé, puis valeur et unité sur une ligne */
.indicateurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r1); }
.indicateur { min-width: 0; padding: 3px var(--e3) var(--e2) var(--e4); border-right: 1px solid var(--line); }
.indicateur:last-child { border-right: 0; }
.indicateur dt, .indicateur .lib { height: 14px; color: var(--ink-2); font-size: var(--fs-s); line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indicateur dd, .indicateur .v { height: 20px; font-size: var(--fs-xl); font-weight: 600; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.indicateur small { font-size: var(--fs-s); font-weight: 400; color: var(--ink-2); }
.indicateur .note { height: 13px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 400; line-height: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.indicateur dd.texte { font-size: var(--fs-l); }
.indicateur.actif { box-shadow: inset 0 2px 0 var(--accent); }

/* Tableau en lecture : dense, en-têtes collants, nombres à droite */
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: var(--fs-m); font-variant-numeric: tabular-nums; }
.tableau th, .tableau td { height: var(--h-ligne); padding: 0 var(--e3); border-bottom: 1px solid var(--grid-line); background: var(--grid-bg); font-weight: 400; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tableau thead th { position: sticky; top: 0; z-index: 2; height: var(--h-tete); background: var(--bg-2); border-bottom-color: var(--line-fort); color: var(--ink); font-size: var(--fs-s); font-weight: 600; }
.tableau thead th small { margin-left: 3px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 400; }
.tableau thead tr.filtres th { top: var(--h-tete); padding: 1px 2px; background: var(--bg-1); border-bottom-color: var(--line); }
.tableau thead tr.filtres .champ { width: 100%; height: 20px; font-weight: 400; }
.tableau .n { text-align: right; }
.tableau .num { width: 36px; background: var(--bg-2); color: var(--ink-2); font-size: var(--fs-s); text-align: right; }
.tableau tbody th { font-weight: 400; }
.tableau tbody tr:hover > * { background: var(--survol); }
.tableau tbody tr:hover > .num { background: var(--bg-3); }
.tableau tbody tr[aria-selected="true"] > *, .tableau tbody tr.choisi > * { background: var(--choisi); }
.tableau tbody tr[aria-selected="true"] > .num { box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); font-weight: 600; }
.tableau tbody tr.cliquable { cursor: pointer; }
.tableau tbody tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.tableau td.vide { color: var(--ink-2); white-space: normal; height: auto; padding: var(--e4); }
.tableau td.k { background: var(--grid-calc); }
.tableau tfoot th, .tableau tfoot td { position: sticky; bottom: 0; z-index: 2; }
.tableau tfoot .total > * { background: var(--bg-2); border-top: 1px solid var(--line-fort); border-bottom: 0; font-weight: 600; }
.tableau tfoot .saisie > * { height: var(--h-saisie); padding: 0; background: var(--saisie-bg); border-top: 2px solid var(--accent); border-bottom: 0; }
.tableau tfoot .saisie > .num { padding: 0 var(--e3); color: var(--accent-texte); font-size: var(--fs-l); font-weight: 700; text-align: center; }
.tableau .saisie-form { display: flex; align-items: stretch; height: 100%; }
.tableau .saisie-form input { flex: 1; min-width: 0; height: 100%; padding: 0 var(--e3); border: 0; background: transparent; color: var(--ink); font-size: var(--fs-m); }
.tableau .saisie-form input::placeholder { color: var(--ink-2); opacity: 1; }
.tableau .saisie-form input:focus-visible { background: var(--grid-bg); }
.tableau .saisie-form input[aria-invalid="true"] { box-shadow: inset 0 -3px 0 var(--bad); }
.tableau .saisie-form .btn { height: auto; border-radius: 0; border: 0; }
.tableau .saisie-form .btn:only-child { flex: 1; }
.tableau tfoot .saisie > td.nd { padding: 0 var(--e3); font-size: var(--fs-s); }
.tableau .saisie-form select { flex: 1; min-width: 0; height: 100%; padding: 0 var(--e2); border: 0; border-left: 1px solid var(--grid-line); background: transparent; color: var(--ink); font-size: var(--fs-m); }
.tableau .saisie-form select:first-child { border-left: 0; }
.tableau .saisie-form input + select { flex: 0 1 40%; }
.tableau .saisie-form select:focus-visible { background: var(--grid-bg); }
/* Largeurs de colonnes : sur <col> ou sur la cellule d'en-tête de la première rangée (table-layout fixe) */
.tableau .w-num { width: 36px; } .tableau .w-s { width: 84px; }
.tableau .w-m { width: 128px; } .tableau .w-l { width: 180px; } .tableau .w-xl { width: 260px; } .tableau .w-act { width: 64px; }

/* Statut : lettre et forme, puis texte ; jamais la couleur seule */
.statut { display: inline-flex; align-items: center; gap: var(--e2); white-space: nowrap; font-size: var(--fs-m); }
.statut::before { content: "?"; width: 14px; height: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: var(--r1); font: 700 var(--fs-xxs)/1 var(--font); }
.statut-brouillon { color: var(--st-brouillon); } .statut-brouillon::before { content: "B"; border-style: dashed; }
.statut-soumis { color: var(--st-soumis); } .statut-soumis::before { content: "S"; }
.statut-verifie { color: var(--st-verifie); } .statut-verifie::before { content: "V"; border-width: 2px; }
.statut-valide { color: var(--st-valide); } .statut-valide::before { content: "✓"; border-radius: 50%; background: var(--st-valide); color: var(--grid-bg); }
.statut-retourne { color: var(--st-retourne); } .statut-retourne::before { content: "R"; border-width: 2px; border-radius: 0; }
.statut-actif { color: var(--ok); } .statut-actif::before { content: "✓"; border-radius: 50%; }
.statut-suspendu { color: var(--warn); } .statut-suspendu::before { content: "‖"; border-radius: 0; }
.statut-revoque { color: var(--bad); } .statut-revoque::before { content: "×"; border-width: 2px; }

/* Messages : .ok .erreur .attention .info (symbole + texte, filet coloré) */
.message { display: flex; align-items: flex-start; gap: var(--e3); padding: var(--e2) var(--e4); border-left: 3px solid currentColor; border-radius: var(--r1); background: var(--info-bg); color: var(--info); font-size: var(--fs-m); line-height: 1.45; overflow-wrap: anywhere; }
.message::before { content: "i"; width: 14px; height: 14px; flex: none; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font: 700 var(--fs-xxs)/1 var(--font); }
.message.ok { background: var(--ok-bg); color: var(--ok); } .message.ok::before { content: "✓"; }
.message.erreur { background: var(--bad-bg); color: var(--bad); } .message.erreur::before { content: "!"; border-radius: var(--r1); border-width: 2px; }
.message.attention { background: var(--warn-bg); color: var(--warn); } .message.attention::before { content: "!"; border-radius: 0; }

/* Onglets de feuilles, en bas comme dans un classeur */
.onglets-feuilles { flex: none; height: var(--h-feuilles); display: flex; align-items: stretch; background: var(--bg-1); border-top: 1px solid var(--line); overflow: hidden; }
.onglets-feuilles [role="tablist"] { flex: none; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.onglets-feuilles [role="tab"] { padding: 0 var(--e5); border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: var(--fs-m); white-space: nowrap; }
.onglets-feuilles [role="tab"]:hover { background: var(--bg-3); color: var(--ink); }
.onglets-feuilles [role="tab"][aria-selected="true"] { background: var(--grid-bg); color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.onglets-feuilles .legende { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: var(--e5); padding: 0 var(--e4); color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; }
.onglets-feuilles .legende > span { display: inline-flex; align-items: center; gap: var(--e2); }

/* Boîtes de dialogue */
.dlg { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line-fort); border-radius: var(--r3); background: var(--bg-1); color: var(--ink); box-shadow: var(--ombre); }
.dlg.large { width: min(900px, calc(100vw - 32px)); }
.dlg::backdrop { background: var(--voile); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg > form { display: flex; flex-direction: column; min-height: 0; }
.dlg-tete { flex: none; height: 28px; display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e1) 0 var(--e5); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.dlg-tete h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-m); }
.dlg-corps { flex: 1; min-height: 0; overflow: auto; padding: var(--e4) var(--e5); display: grid; align-content: start; gap: var(--e4); }
.dlg-pied { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: var(--e3); padding: var(--e3) var(--e5); border-top: 1px solid var(--line); background: var(--bg-1); }

/* Menu contextuel (position posée par le CSSOM : --x, --y) */
.menu-ctx { position: fixed; left: var(--x, 0); top: var(--y, 0); z-index: 80; min-width: 170px; max-width: 320px; padding: var(--e1) 0; list-style: none; background: var(--bg-1); border: 1px solid var(--line-fort); border-radius: var(--r2); box-shadow: var(--ombre); }
.menu-ctx [role="menuitem"] { width: 100%; height: 24px; display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e5) 0 var(--e4); border: 0; background: transparent; color: var(--ink); font-size: var(--fs-m); text-align: left; white-space: nowrap; }
.menu-ctx [role="menuitem"]:hover, .menu-ctx [role="menuitem"]:focus { background: var(--choisi-panneau); outline: none; }
.menu-ctx [role="menuitem"]:focus-visible { box-shadow: inset 2px 0 0 var(--focus); }
.menu-ctx [role="menuitem"][aria-disabled="true"] { color: var(--ink-2); cursor: default; }
.menu-ctx [role="menuitem"] kbd { margin-left: auto; }
.menu-ctx [role="separator"] { height: 1px; margin: var(--e1) 0; background: var(--line); }

/* Élément de graphique qui porte une info-bulle (data-info, affichée par le cadre) */
svg [data-info]:hover { opacity: .78; }

/* État vide compact */
.vide { padding: var(--e4); color: var(--ink-2); font-size: var(--fs-m); line-height: 1.45; }

/* Propriétés et blocs du panneau Détail (utilisables partout) */
.d-titre { height: 22px; display: flex; align-items: center; gap: var(--e3); padding: 0 var(--e4); background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; overflow: hidden; }
.d-titre:first-child { border-top: 0; }
/* Barre de titre qui porte une bulle : le titre est un h3 dans la barre, la bulle juste après (jamais dans le h3,
   docs/INTERFACE.md, 26.3). */
.d-titre > .d-titre-h { margin: 0; font: inherit; overflow: hidden; text-overflow: ellipsis; }
.d-titre .statut { margin-left: auto; font-size: var(--fs-s); }
.d-note { padding: var(--e2) var(--e4); color: var(--ink-2); font-size: var(--fs-s); line-height: 1.45; }
.d-note.alerte { color: var(--warn); }
.d-corps { padding: var(--e3) var(--e4); display: grid; gap: var(--e3); }
.props > div { min-height: 20px; display: flex; align-items: center; justify-content: space-between; gap: var(--e4); padding: 0 var(--e4); border-bottom: 1px solid var(--grid-line); }
.props dt { min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.props dd { min-width: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.d-liste { list-style: none; padding: var(--e2) var(--e4); font-size: var(--fs-s); line-height: 1.5; }
.d-liste li { display: flex; align-items: center; gap: var(--e3); min-height: 18px; }
.d-liste time { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Liste de liens denses (accès rapides) */
.liens { list-style: none; }
.liens a { height: 24px; display: flex; align-items: center; gap: var(--e3); padding: 0 var(--e4); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--grid-line); white-space: nowrap; }
.liens a:hover { background: var(--survol); }
.liens a .note { margin-left: auto; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: var(--fs-s); }
.liens .ic { color: var(--ink-2); }

/* Info-bulle des graphiques (éléments portant data-info), position posée par le CSSOM */
.bulle { position: fixed; left: 0; top: 0; z-index: 85; max-width: 320px; padding: 3px var(--e3); border: 1px solid var(--line-fort); border-radius: var(--r2); background: var(--bg-1); color: var(--ink); box-shadow: var(--ombre); font-size: var(--fs-s); pointer-events: none; white-space: pre-line; }

/* =================================================================== 4. Cadre */
.cadre { position: relative; height: 100%; min-width: 0; display: flex; flex-direction: column; --col-g: var(--w-explo, var(--w-explorateur)); --col-d: var(--w-dock); }
/* 2.35.0 (lot 7) : --w-explo, largeur de l'explorateur choisie par la poignée (assistant/poignee_explorateur.js, CSSOM),
   propre au compte ; absente : largeur d'origine. Seule la colonne de l'explorateur change (la marque garde la sienne). */
.cadre[data-explorateur="replie"] { --col-g: var(--w-rail); }
.cadre[data-detail="replie"] { --col-d: var(--w-rail); }
.cadre[data-detail="vide"] { --col-d: 0px; }
.cadre[data-densite="compacte"] { --h-ligne: 22px; --h-saisie: 26px; --h-entete: 30px; }
.cadre[data-concentration="oui"] { --col-g: 0px; --col-d: 0px; }
.cadre[data-concentration="oui"] .ruban, .cadre[data-concentration="oui"] .dock { display: none; }

/* Barre de titre : marque, onglets du ruban, fil d'Ariane, compte */
.barre-titre { flex: none; height: var(--h-titre); display: flex; align-items: stretch; background: var(--brand); color: var(--brand-ink); }
.barre-titre :focus-visible { outline-color: var(--brand-ink); }
.marque { flex: none; width: var(--w-explorateur); display: flex; align-items: baseline; gap: var(--e3); padding: 0 10px; color: inherit; line-height: var(--h-titre); text-decoration: none; white-space: nowrap; overflow: hidden; }
.marque strong { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; }
.marque i { font-style: normal; color: var(--accent); }
.marque small { font-size: var(--fs-xxs); letter-spacing: .12em; color: color-mix(in srgb, var(--brand-ink) 82%, var(--brand)); }
.barre-titre .b-menu { display: none; }
.ruban-onglets { flex: 0 1 auto; min-width: 0; display: flex; align-items: flex-end; gap: 1px; overflow-x: auto; scrollbar-width: none; }
.ruban-onglets [role="tab"] { flex: none; height: 25px; padding: 0 12px; border: 0; border-top: 2px solid transparent; border-radius: var(--r2) var(--r2) 0 0; background: transparent; color: color-mix(in srgb, var(--brand-ink) 78%, var(--brand)); font-size: var(--fs-m); white-space: nowrap; }
.ruban-onglets [role="tab"]:hover { background: color-mix(in srgb, var(--brand-ink) 12%, transparent); color: var(--brand-ink); }
.ruban-onglets [role="tab"][aria-selected="true"] { background: var(--bg-1); color: var(--ink); border-top-color: var(--accent); font-weight: 600; }
.ruban-onglets [role="tab"][aria-selected="true"]:focus-visible { outline-color: var(--focus); }
.cadre[data-ruban="replie"] .ruban-onglets [role="tab"][aria-selected="true"],
.cadre[data-concentration="oui"] .ruban-onglets [role="tab"][aria-selected="true"] { background: transparent; color: var(--brand-ink); }
.cadre[data-ruban="replie"] .ruban-onglets [role="tab"][aria-selected="true"]:focus-visible { outline-color: var(--brand-ink); }
.contexte { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: var(--e3); padding: 0 var(--e5); font-size: var(--fs-m); white-space: nowrap; overflow: hidden; }
.contexte > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.contexte .sep { flex: none; color: color-mix(in srgb, var(--brand-ink) 60%, var(--brand)); }
.contexte a { color: inherit; text-decoration: none; }
.contexte a:hover { text-decoration: underline; }
.contexte strong { font-weight: 600; }
.b-contexte { flex: none; height: 22px; display: inline-flex; align-items: center; gap: var(--e2); padding: 0 var(--e3); border: 0; border-radius: var(--r2); background: transparent; color: inherit; font-size: var(--fs-m); }
.b-contexte:hover, .b-titre:hover { background: color-mix(in srgb, var(--brand-ink) 14%, transparent); }
.titre-actions { flex: none; display: flex; align-items: center; gap: var(--e1); padding: 0 var(--e3); }
.b-titre { width: 26px; height: 24px; padding: 0; border: 0; border-radius: var(--r2); background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
.b-titre[aria-pressed="true"] { background: color-mix(in srgb, var(--brand-ink) 18%, transparent); }
.etiquette { margin-right: var(--e3); padding: 1px 5px; border: 1px solid color-mix(in srgb, var(--brand-ink) 55%, var(--brand)); border-radius: var(--r1); font-size: var(--fs-xxs); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.utilisateur { display: flex; align-items: center; gap: var(--e3); padding: 0 var(--e3); white-space: nowrap; }
a.utilisateur { color: inherit; text-decoration: none; border-radius: var(--r1); }
a.utilisateur:hover { background: var(--bg-3); }
a.utilisateur:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Mon compte (lot P1, 2.13.0) : mot de passe, double authentification, dernières connexions */
.compte { display: grid; gap: var(--e5); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; padding: var(--e4); }
.compte .panneau-corps { padding: var(--e4); display: grid; gap: var(--e3); }
.compte-form { display: grid; gap: var(--e3); }
.compte-actions { display: flex; flex-wrap: wrap; gap: var(--e3); }
.compte-etapes { display: grid; gap: var(--e3); padding-left: 1.2em; }
.compte-qr { display: inline-block; padding: var(--e4); background: #fff; border-radius: var(--r3); }
.compte-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e3); list-style: none; padding: 0; font-size: var(--fs-m); }
.compte table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.compte th, .compte td { text-align: left; padding: var(--e2) var(--e3); border-bottom: 1px solid var(--line); }
/* Accès API : tableau des routes sans défilement horizontal (remarque du PDG du 10/11/2026, capture 8) : largeur fixe,
   adresses lisibles coupées à la ligne ; l'expression technique du serveur est dans la bulle (i). */
.tableau-routes { table-layout: fixed; }
.tableau-routes th:nth-child(1), .tableau-routes th:nth-child(2) { width: 6.5em; }
.tableau-routes td { vertical-align: top; overflow-wrap: anywhere; }
.tableau-routes code { white-space: normal; overflow-wrap: anywhere; }
/* Analyse des écarts (lot P4, 2.15.0) */
.ae { display: grid; gap: var(--e4); padding: var(--e4); }
.ae-periode { display: flex; flex-wrap: wrap; align-items: end; gap: var(--e3); }
.ae-cartes { display: grid; gap: var(--e3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ae-carte { display: grid; gap: var(--e1); padding: var(--e3) var(--e4); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r3); }
.ae-carte strong { font-size: 1.3em; font-variant-numeric: tabular-nums; }
.ae-carte-titre { color: var(--ink-2); font-size: var(--fs-s); }
.ae-titre { font-size: var(--fs-m); margin-top: var(--e3); }
.ae-cause { display: grid; gap: var(--e3); padding: var(--e3) var(--e4); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r3); background: var(--bg-1); }
.ae-cause header { display: flex; align-items: center; gap: var(--e4); }
.ae-cause h3 { font-size: var(--fs-m); }
.ae-part { display: flex; align-items: center; gap: var(--e4); font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.ae-barre { flex: none; width: 160px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ok) var(--part, 0%), color-mix(in srgb, var(--ink) 12%, transparent) var(--part, 0%)); }
.ae-barre.ae-aggrave { background: linear-gradient(90deg, var(--bad) var(--part, 0%), color-mix(in srgb, var(--ink) 12%, transparent) var(--part, 0%)); }
.ae-chiffree { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.ae-indice { background: color-mix(in srgb, var(--warn) 20%, transparent); }
.ae-avis { font-size: var(--fs-s); }
.ae-avis-confirmee { color: var(--ok); }
.ae-avis-ecartee { color: var(--ink-2); text-decoration: line-through; }
.ae-commentaire { flex: 1 1 200px; }
.ae-cause table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.ae-cause th, .ae-cause td { text-align: left; padding: 3px var(--e3); border-bottom: 1px solid var(--line); }
.ae-signaux { display: grid; gap: var(--e2); padding-left: 1.2em; font-size: var(--fs-s); }
/* Grade Variance (19/10/2026) */
.gv { display: grid; gap: var(--e4); padding: var(--e4); }
.gv-vues { display: flex; flex-wrap: wrap; gap: var(--e3); }
.gv-vues [aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.gv-choix { display: flex; flex-wrap: wrap; gap: var(--e2) 14px; border: 1px solid var(--line); border-radius: var(--r3); padding: var(--e3) 10px; font-size: var(--fs-s); }
.gv-graphe { min-height: 440px; }
.gv-table table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.gv-table th, .gv-table td { text-align: right; padding: 3px 8px; border-bottom: 1px solid var(--line); }
.gv-table th:first-child, .gv-table td:first-child { text-align: left; }
.gv-humidite { width: 5em; margin-left: var(--e2); }
.gv-par { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3); }
.gv-par [aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.gv-cles { width: 100%; border-collapse: collapse; font-size: var(--fs-s); font-variant-numeric: tabular-nums; margin-top: var(--e3); }
.gv-cles caption { text-align: left; font-weight: 600; padding: 4px 0; }
/* Titre du tableau des clés et sa bulle, au-dessus du tableau : la légende (caption) reste un texte seul, lu par les
   lecteurs d'écran (docs/INTERFACE.md, 26.3). */
.gv-cles-tete { display: flex; align-items: center; margin-top: var(--e3); padding: var(--e2) 0; font-size: var(--fs-s); font-weight: 600; }
.gv-cles-tete + .gv-cles { margin-top: 0; }
.gv-cles th, .gv-cles td { text-align: right; padding: 3px 8px; border-bottom: 1px solid var(--line); }
.gv-cles th:first-child, .gv-cles td:first-child { text-align: left; }
@media (max-width: 640px) { .gv { padding: 8px; } .gv-graphe { min-height: 320px; } .gv-cles { font-size: 12px; } .gv-cles th, .gv-cles td { padding: 3px 4px; } }
/* Logo de la compagnie cliente, à côté de son nom (fond blanc : logo lisible dans les deux thèmes) */
.logo-cie { height: 26px; width: auto; max-width: 140px; object-fit: contain; background: #fff; border-radius: 3px; padding: 2px 4px; margin-right: 6px; }
.compte-exemple { overflow-x: auto; padding: 8px; background: var(--bg-2); border-radius: 4px; font-size: var(--fs-s); }
.mdp-provisoire code { font-size: 1.25em; letter-spacing: .04em; user-select: all; }
.initiales { width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r1); background: var(--accent-plein, var(--accent)); color: var(--accent-ink); font-size: var(--fs-xxs); font-weight: 700; }
.u-texte { display: grid; line-height: 12px; }
.u-nom { font-size: var(--fs-s); font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.u-profil { font-size: var(--fs-xs); color: color-mix(in srgb, var(--brand-ink) 78%, var(--brand)); }

/* Ruban : 60 px, repliable (Ctrl+F1). Groupe = deux rangées de 22 px et son titre en bas. */
.ruban { position: relative; flex: none; height: var(--h-ruban); background: var(--bg-1); border-bottom: 1px solid var(--line); overflow: hidden; }
/* Débordement du ruban : boutons aux bords, affichés seulement s'il reste des groupes cachés de ce côté (app.js). */
.ruban-defile { position: absolute; top: 0; bottom: 0; z-index: 2; width: 18px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: var(--bg-2); color: var(--ink); cursor: pointer; }
.ruban-defile.g { left: 0; border-right: 1px solid var(--line-fort); }
.ruban-defile.d { right: 0; border-left: 1px solid var(--line-fort); }
.ruban-defile:hover { background: var(--bg-3); }
.cadre[data-ruban="replie"] .ruban { display: none; }
.ruban-page { height: 100%; display: flex; align-items: stretch; padding: 0 var(--e2); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.rb-groupe { position: relative; flex: none; display: grid; grid-template-rows: repeat(2, 22px); grid-auto-flow: column; grid-auto-columns: max-content; align-items: center; justify-items: start; column-gap: var(--e2); row-gap: 1px; padding: 2px var(--e4) 12px; border-right: 1px solid var(--line); }
.rb-titre { position: absolute; left: 0; right: 0; bottom: 1px; height: 11px; padding: 0 var(--e2); color: var(--ink-2); font-size: var(--fs-xs); line-height: 10px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-ligne { display: inline-flex; align-items: center; gap: var(--e1); }
.rb-bouton { height: var(--h-cmd); display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border: 1px solid transparent; border-radius: var(--r2); background: transparent; color: var(--ink); font-size: var(--fs-m); text-decoration: none; white-space: nowrap; }
.rb-bouton:hover, .rb-grand:hover { background: var(--bg-3); border-color: var(--line-fort); }
.rb-bouton[aria-pressed="true"], .rb-grand[aria-pressed="true"] { background: var(--bg-3); border-color: var(--line-fort); box-shadow: inset 0 -2px 0 var(--accent); }
.rb-bouton:disabled, .rb-grand:disabled { opacity: .45; cursor: default; background: transparent; border-color: transparent; }
.rb-bouton[aria-disabled="true"] { opacity: .45; cursor: progress; }
.rb-bouton kbd, .rb-grand kbd { border: 0; background: transparent; color: var(--ink-2); font-weight: 400; padding: 0; }
.rb-grand { position: relative; grid-row: span 2; align-self: stretch; min-width: 54px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 var(--e3); border: 1px solid transparent; border-radius: var(--r2); background: transparent; color: var(--ink); font-size: var(--fs-s); line-height: 12px; text-align: center; text-decoration: none; white-space: nowrap; }
.rb-grand .ic { width: 20px; height: 20px; stroke-width: 1.5; }
.rb-champ { height: var(--h-cmd); display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-m); white-space: nowrap; }
.rb-champ > span { color: var(--ink-2); }
.rb-champ .champ { height: 20px; }
.rb-champ.coche { gap: var(--e3); padding: 0 var(--e2); color: var(--ink); }
.rb-info { padding: 0 var(--e2); color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rb-info strong { color: var(--ink); font-weight: 600; }

/* Zone de travail : explorateur, centre, panneau Détail */
.travail { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--col-g) minmax(0, 1fr) var(--col-d); }
.dock { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg-1); }
.dock-gauche { position: relative; border-right: 1px solid var(--line); }
.dock-droit { position: relative; flex-direction: row; border-left: 1px solid var(--line); }
.cadre[data-detail="vide"] .dock-droit { display: none; }
.dock-tete { flex: none; height: var(--h-tete); display: flex; align-items: center; gap: var(--e2); padding: 0 var(--e1) 0 var(--e4); background: var(--bg-2); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.dock-tete > .titre { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-tete > .titre span { letter-spacing: 0; text-transform: none; color: var(--ink); }
.dock-corps { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.b-mini { width: 20px; height: 20px; flex: none; padding: 0; border: 0; border-radius: var(--r1); background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.b-mini:hover { background: var(--bg-3); color: var(--ink); }
.rail { display: none; flex: 1; width: 100%; padding: var(--e4) 0; border: 0; background: var(--bg-1); color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; writing-mode: vertical-rl; align-items: center; justify-content: flex-start; gap: var(--e3); }
.rail:hover { background: var(--bg-3); color: var(--ink); }
.rail .nb { writing-mode: horizontal-tb; }
.cadre[data-explorateur="replie"] .dock-gauche > :not(.rail) { display: none; }
.cadre[data-explorateur="replie"] .dock-gauche > .rail { display: flex; }

/* Explorateur : filtre en tête, arbre dessous */
.arbre-filtre { flex: none; display: flex; align-items: center; gap: var(--e2); height: 28px; padding: 0 var(--e2) 0 var(--e3); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.arbre-filtre .champ { flex: 1; height: 20px; }
.arbre-filtre .champ::-webkit-search-cancel-button { cursor: pointer; }
.arbre, .arbre ul { list-style: none; margin: 0; padding: 0; }
.arbre { padding: var(--e1) 0 var(--e4); }
.arbre [role="treeitem"] { outline: none; }
.arbre [role="treeitem"]:focus-visible > .noeud { outline: 2px solid var(--focus); outline-offset: -2px; }
.noeud { height: 22px; display: flex; align-items: center; gap: 5px; padding-right: var(--e3); border-left: 2px solid transparent; white-space: nowrap; cursor: default; user-select: none; }
[aria-level="1"] > .noeud { padding-left: 4px; font-weight: 600; }
[aria-level="2"] > .noeud { padding-left: 16px; }
[aria-level="3"] > .noeud { padding-left: 30px; }
[aria-level="4"] > .noeud { padding-left: 44px; }
[aria-level="5"] > .noeud { padding-left: 58px; }
/* Groupes d'un département (Géologie : Tableau de bord, Database, Rapport, Rompad Balance) : titre en demi-gras. */
.arbre [data-groupe] > .noeud > .nom { font-weight: 600; }
.arbre .info > .noeud { color: var(--ink-2); font-style: italic; cursor: default; }
.arbre .info.n3 > .noeud { padding-left: 46px; }
.arbre .info.n2 > .noeud { padding-left: 32px; }
.noeud:hover { background: var(--bg-3); }
.arbre .info > .noeud:hover { background: transparent; }
[aria-current] > .noeud { background: var(--choisi-panneau); border-left-color: var(--accent); }
[aria-current="page"] > .noeud { font-weight: 600; }
.sur-chemin > .noeud .nom { color: var(--ink); font-weight: 600; }
.noeud > .ic { color: var(--ink-2); }
.noeud .pli { width: 12px; height: 12px; transition: transform var(--duree); }
[aria-expanded="true"] > .noeud > .pli { transform: rotate(90deg); }
.noeud .pli-vide { width: 12px; flex: none; }
.noeud .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 2.34.0 : marque « ⚠ » de l'entrée Licence (administrateur), avec son texte accessible (aucune couleur seule). */
.noeud-alerte { flex: none; margin-left: var(--e2); color: var(--warn); }
.nb { flex: none; min-width: 18px; height: 15px; padding: 0 4px; border-radius: var(--r1); background: var(--bg-3); color: var(--ink); font-size: var(--fs-xs); font-weight: 600; line-height: 15px; text-align: center; font-variant-numeric: tabular-nums; }
.arbre [aria-expanded="false"] > ul { display: none; }
.arbre.filtrant ul { display: block; }
.arbre.filtrant .info { display: none; }
.arbre-vide { padding: var(--e4); color: var(--ink-2); font-size: var(--fs-s); }

/* Centre : onglets des fenêtres ouvertes, puis zone de travail */
.centre { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--grid-bg); }
.fenetres { flex: none; height: var(--h-onglets); display: flex; align-items: flex-end; padding-left: var(--e1); background: var(--bg-0); border-bottom: 1px solid var(--line); overflow: hidden; }
.fenetres [role="tablist"] { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 1px; overflow-x: auto; scrollbar-width: none; }
.fen { flex: none; max-width: 230px; height: 23px; display: inline-flex; align-items: stretch; border: 1px solid transparent; border-bottom: 0; border-radius: var(--r2) var(--r2) 0 0; color: var(--ink-2); }
.fen:hover { background: var(--bg-2); color: var(--ink); }
.fen.actif { height: 25px; margin-bottom: -1px; background: var(--grid-bg); border-color: var(--line); color: var(--ink); box-shadow: inset 0 2px 0 var(--accent); }
.fen [role="tab"] { min-width: 0; display: inline-flex; align-items: center; gap: var(--e3); padding: 0 var(--e1) 0 10px; border: 0; background: transparent; color: inherit; font-size: var(--fs-m); white-space: nowrap; }
.fen.actif [role="tab"] { font-weight: 600; }
.fen [role="tab"] .lib { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fen [role="tab"] small { flex: none; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 400; }
.fen-fermer { width: 18px; flex: none; align-self: center; height: 18px; margin-right: 3px; padding: 0; border: 0; border-radius: var(--r1); background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.fen-fermer:hover { background: var(--bg-3); color: var(--ink); }
/* Fenêtre à actualiser à son ouverture (retour du serveur après une coupure) : pastille d'information après le titre. */
.fen.a-rafraichir [role="tab"]::after { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--info); }
.zone-travail { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--grid-bg); }
.zone-travail:focus { outline: none; }
.contenu { flex: 1; min-height: 0; min-width: 0; }
.contenu.simple { overflow: auto; padding: var(--e4); display: flex; flex-direction: column; gap: var(--e4); background: var(--bg-0); scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.contenu.simple.plein { overflow: hidden; }
.contenu.simple > * { flex: none; }
.contenu.simple > .remplir { flex: 1; }
.contenu.module { display: flex; flex-direction: column; overflow: hidden; }
.contenu.module.ancien { display: block; overflow: auto; padding: var(--e4); }
/* Écrans de département (metier.js) : colonne pleine, l'hôte garde un défilement interne de secours (un écran peut le fermer). */
.metier, .metier-hote { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.metier-hote { overflow: auto; }

/* Barre d'état : 24 px */
.barre-etat { flex: none; height: var(--h-etat); display: flex; align-items: stretch; background: var(--bg-2); border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; }
.barre-etat > * { flex: none; min-width: 0; display: flex; align-items: center; gap: 5px; padding: 0 var(--e4); border-right: 1px solid var(--line); }
.barre-etat > :last-child { border-right: 0; }
.barre-etat strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.be-connexion { font-weight: 600; color: var(--ok); }
.be-connexion[data-etat="hors"], .be-connexion[data-etat="serveur"] { color: var(--bad); }
.be-connexion .btn { height: 18px; font-size: var(--fs-s); font-weight: 400; }
.be-message { flex: 1 !important; color: var(--ink); overflow: hidden; }
.be-message > span { overflow: hidden; text-overflow: ellipsis; }
.be-enr { color: var(--info); font-weight: 600; }
.be-enr::before { content: ""; width: 9px; height: 9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tour .8s linear infinite; }
.be-fictif { color: var(--warn); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.be-concentration { padding: 0 var(--e2) !important; }
.be-concentration .btn { height: 18px; font-size: var(--fs-s); }
@keyframes tour { to { transform: rotate(360deg); } }

/* Voile des panneaux superposés (téléphone, panneau Détail en fenêtre étroite) */
.voile { display: none; }

/* =================================================================== 4 bis. Menus, dock de panneaux, coulisses (interface 2.1) */

/* Bouton Fichier (barre de titre) : ouvre les coulisses, à la manière d'Office */
.b-fichier { flex: none; align-self: flex-end; height: 25px; margin-right: var(--e1); padding: 0 12px; border: 0; border-radius: var(--r2) var(--r2) 0 0; background: var(--accent-plein, var(--accent)); color: var(--accent-ink); font-size: var(--fs-m); font-weight: 600; white-space: nowrap; }
.b-fichier:hover { box-shadow: inset 0 -2px 0 var(--accent-ink); }
.b-fichier[aria-expanded="true"] { box-shadow: inset 0 -2px 0 var(--accent-ink); }

/* Groupes de la vue dans un menu : ils prennent place parmi les groupes du cadre */
.rb-vue { display: contents; }
.rb-grand .nb { position: absolute; top: 1px; right: 1px; }

/* Dock de panneaux à droite : poignée de largeur, contenu, barre d'onglets verticale (barres de contrôle de Datamine) */
.dock-contenu { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.dock-onglets { flex: none; width: var(--w-rail); display: flex; flex-direction: column; gap: 1px; padding: var(--e1) 0; background: var(--bg-2); border-left: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.dock-onglets [role="tab"] { flex: none; width: 100%; display: inline-flex; align-items: center; gap: var(--e3); padding: var(--e4) 0; border: 0; background: transparent; color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; letter-spacing: .02em; white-space: nowrap; writing-mode: vertical-rl; }
.dock-onglets [role="tab"]:hover { background: var(--bg-3); color: var(--ink); }
.dock-onglets [role="tab"][aria-selected="true"] { background: var(--bg-1); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.cadre[data-detail="replie"] .dock-onglets [role="tab"][aria-selected="true"] { background: transparent; color: var(--ink-2); box-shadow: none; }
.dock-onglets .nb { writing-mode: horizontal-tb; }
.dock-poignee { position: absolute; left: -3px; top: 0; bottom: 0; z-index: 5; width: 6px; cursor: col-resize; touch-action: none; }
.dock-poignee:hover, .dock-poignee.actif { background: color-mix(in srgb, var(--focus) 50%, transparent); }
.cadre[data-detail="replie"] .dock-contenu, .cadre[data-detail="replie"] .dock-poignee { display: none; }
/* Poignée de largeur de l'explorateur (2.35.0, lot 7 ; exigence du PDG du 10/11/2026), sur le modèle de celle du dock :
   bord droit de l'explorateur, glisser ou flèches ; masquée avec l'explorateur replié (règle des enfants du rail). */
.explorateur-poignee { position: absolute; right: -3px; top: 0; bottom: 0; z-index: 5; width: 6px; cursor: col-resize; touch-action: none; }
.explorateur-poignee:hover, .explorateur-poignee.actif, .explorateur-poignee:focus-visible { background: color-mix(in srgb, var(--focus) 50%, transparent); }

/* Contenu des panneaux du cadre (Validation, Historique, Champs) */
.pn-outils { position: sticky; top: 0; z-index: 3; min-height: 28px; display: flex; align-items: center; gap: var(--e3); padding: 0 var(--e3) 0 var(--e4); background: var(--bg-1); border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; }
.pn-outils > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pn-outils > .bl { flex: none; overflow: visible; }
.pn-outils .champ { flex: 1; min-width: 0; height: 20px; }
.pn-validation th.n { width: 38px; }
.pn-validation thead th { top: 28px; }
.pn-validation tr.groupe th { height: 22px; background: var(--bg-2); color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; }
.pn-validation tr.groupe .note { margin-left: var(--e2); color: var(--ink); }
.pn-nb { width: 100%; height: 20px; padding: 0 var(--e2); border: 1px solid transparent; border-radius: var(--r1); background: transparent; color: var(--info); font-weight: 600; text-align: right; text-decoration: underline; font-variant-numeric: tabular-nums; }
.pn-nb:hover { background: var(--bg-3); border-color: var(--line-fort); }
.pn-legende { display: flex; flex-wrap: wrap; gap: var(--e2) var(--e4); padding: var(--e3) var(--e4); color: var(--ink-2); font-size: var(--fs-s); }
.pn-legende b { color: var(--ink); }
.pn-histo { list-style: none; }
.pn-histo li { display: grid; gap: 1px; padding: var(--e3) var(--e4); border-bottom: 1px solid var(--grid-line); font-size: var(--fs-s); line-height: 1.4; }
.h-tete { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e3); }
.h-tete time { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.h-qui { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.h-quoi, .h-val { overflow-wrap: anywhere; }
.h-val del { color: var(--ink-2); }
.h-val ins { text-decoration: none; font-weight: 600; }
.h-motif { color: var(--warn); overflow-wrap: anywhere; }
.pn-sous { padding: var(--e2) var(--e4) 0; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pn-champs { list-style: none; padding: 0 0 var(--e2); }
.pn-champs li { min-height: 20px; display: flex; align-items: center; gap: var(--e3); padding: 0 var(--e4); font-size: var(--fs-s); }
.pn-champs li:hover { background: var(--survol); }
.pn-marque { width: 12px; flex: none; color: var(--ink-2); font-weight: 700; text-align: center; }
.pn-champs .lib { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-champs .u { flex: none; color: var(--ink-2); font-size: var(--fs-xs); }

/* Coulisses Fichier : plein écran, rubriques à gauche (couleur de la compagnie), contenu à droite */
.coulisses { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg-0); color: var(--ink); }
.coulisses[open] { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.coulisses::backdrop { background: var(--voile); }
.cl-nav { min-height: 0; display: flex; flex-direction: column; padding: var(--e4) 0; background: var(--brand); color: var(--brand-ink); overflow-y: auto; }
.cl-nav :focus-visible { outline-color: var(--brand-ink); }
.cl-nav [role="tablist"] { display: flex; flex-direction: column; }
.cl-retour, .cl-nav [role="tab"], .cl-sortie { height: 30px; flex: none; display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e5); border: 0; background: transparent; color: inherit; font-size: var(--fs-l); text-align: left; text-decoration: none; white-space: nowrap; }
.cl-retour { margin-bottom: var(--e4); }
.cl-retour:hover, .cl-nav [role="tab"]:hover, .cl-sortie:hover { background: color-mix(in srgb, var(--brand-ink) 14%, transparent); }
.cl-nav [role="tab"][aria-selected="true"] { background: color-mix(in srgb, var(--brand-ink) 22%, transparent); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.cl-corps { min-width: 0; min-height: 0; overflow: auto; padding: var(--e5); display: flex; flex-direction: column; gap: var(--e5); scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.cl-corps:focus { outline: none; }
.cl-corps > * { flex: none; width: min(760px, 100%); }
.cl-tete { display: flex; align-items: center; gap: var(--e2); }
.cl-tete h2 { font-size: var(--fs-xl); font-weight: 600; }
.cl-section { display: grid; gap: var(--e3); }
.cl-sous { color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cl-liste { list-style: none; display: grid; gap: 1px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--line); overflow: hidden; }
.cl-element { width: 100%; min-height: 40px; display: flex; align-items: center; gap: var(--e4); padding: var(--e3) var(--e4); border: 0; background: var(--bg-1); color: var(--ink); text-align: left; }
.cl-element:hover:not(:disabled) { background: var(--bg-3); }
.cl-element:disabled { cursor: default; color: var(--ink-2); }
.cl-element .ic { color: var(--ink-2); }
.cl-texte { min-width: 0; display: grid; gap: 1px; }
.cl-texte strong { font-size: var(--fs-l); font-weight: 600; }
.cl-texte small { color: var(--ink-2); font-size: var(--fs-s); line-height: 1.4; }
.cl-ligne { display: flex; align-items: center; background: var(--bg-1); }
.cl-ligne:hover { background: var(--bg-3); }
.cl-ligne .b-mini { margin-right: var(--e2); }
.cl-ouvrir { flex: 1; min-width: 0; height: 26px; display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e4); border: 0; background: transparent; color: var(--ink); text-align: left; white-space: nowrap; }
.cl-ouvrir .ic { color: var(--ink-2); }
.cl-ouvrir .lib { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cl-ouvrir .chemin { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: var(--fs-s); }
.cl-ouvrir time { margin-left: auto; padding-left: var(--e4); color: var(--ink-2); font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.cl-actions { display: flex; flex-wrap: wrap; gap: var(--e3); }
.cl-form { display: grid; gap: var(--e4); }
.cl-props { border: 1px solid var(--line); border-radius: var(--r1); background: var(--bg-1); }
.cl-groupe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2) var(--e5); padding: var(--e3) var(--e4); border: 1px solid var(--line); border-radius: var(--r1); background: var(--bg-1); }
.cl-groupe legend { padding: 0 var(--e2); color: var(--ink-2); font-size: var(--fs-s); font-weight: 600; }

/* Aide : guide de l'écran, glossaire des indicateurs, nouveautés */
.guide { display: grid; gap: var(--e3); line-height: 1.5; }
.guide-liste { padding-left: 18px; line-height: 1.5; }
.glossaire th, .glossaire td { height: auto; padding-top: var(--e2); padding-bottom: var(--e2); white-space: normal; vertical-align: top; }
.mono { font-family: var(--mono); font-size: var(--fs-s); }

/* Zoom de l'interface (Affichage) */
.cadre[data-zoom="90"] { zoom: .9; }
.cadre[data-zoom="110"] { zoom: 1.1; }

/* Mode présentation : plein écran, sans le cadre ; bouton de sortie discret en haut à droite */
.cadre[data-presentation="oui"] { --col-g: 0px; --col-d: 0px; }
.cadre[data-presentation="oui"] .barre-titre, .cadre[data-presentation="oui"] .ruban, .cadre[data-presentation="oui"] .dock,
.cadre[data-presentation="oui"] .fenetres, .cadre[data-presentation="oui"] .barre-etat, .cadre[data-presentation="oui"] .onglets-feuilles { display: none; }
.pres-sortie { position: absolute; top: var(--e2); right: var(--e2); z-index: 60; height: var(--h-cmd); display: inline-flex; align-items: center; gap: 5px; padding: 0 var(--e4); border: 1px solid var(--line-fort); border-radius: var(--r2); background: var(--bg-1); color: var(--ink); font-size: var(--fs-s); box-shadow: var(--ombre); }
.pres-sortie:hover { background: var(--bg-3); }

/* =================================================================== 5. Palette, aide, notifications */
.dlg.palette { width: min(620px, calc(100vw - 32px)); margin-top: 10vh; margin-bottom: auto; }
.palette-champ { flex: none; display: flex; align-items: center; gap: var(--e4); height: 36px; padding: 0 var(--e5); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.palette-champ input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-size: var(--fs-l); }
.palette-champ input:focus-visible { outline: none; }
.palette-champ:focus-within { box-shadow: inset 0 -2px 0 var(--focus); }
.palette-liste { flex: 1; min-height: 0; max-height: min(52vh, 440px); overflow: auto; list-style: none; padding: var(--e1) 0; scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.palette-groupe { height: 20px; display: flex; align-items: center; padding: 0 var(--e5); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.palette-option { height: 26px; display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e5); cursor: pointer; white-space: nowrap; }
.palette-option .ic { color: var(--ink-2); }
.palette-option .lib { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.palette-option .chemin { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: var(--fs-s); }
.palette-option kbd { margin-left: auto; }
.palette-option:hover { background: var(--survol); }
.palette-option[aria-selected="true"] { background: var(--choisi-panneau); box-shadow: inset 3px 0 0 var(--accent); }
.palette-vide { padding: var(--e4) var(--e5); color: var(--ink-2); }
.palette-pied { flex: none; display: flex; gap: var(--e5); padding: var(--e2) var(--e5); border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; }
.raccourcis { width: 100%; border-collapse: collapse; font-size: var(--fs-m); }
.raccourcis th, .raccourcis td { height: 22px; padding: 0 var(--e4); border-bottom: 1px solid var(--grid-line); text-align: left; font-weight: 400; vertical-align: middle; }
.raccourcis th { width: 42%; white-space: nowrap; }
.raccourcis .groupe th { height: 22px; padding-top: var(--e3); background: var(--bg-2); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.aide-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--e4) var(--e5); align-items: start; }
.toasts { position: fixed; right: var(--e5); bottom: calc(var(--h-etat) + var(--e4)); z-index: 75; display: flex; flex-direction: column; align-items: flex-end; gap: var(--e3); pointer-events: none; }
.toast { pointer-events: auto; min-width: 220px; max-width: min(380px, calc(100vw - 24px)); display: flex; align-items: flex-start; gap: var(--e3); padding: var(--e3) var(--e2) var(--e3) var(--e4); background: var(--bg-1); border: 1px solid var(--line-fort); border-left: 3px solid currentColor; border-radius: var(--r2); box-shadow: var(--ombre); color: var(--info); font-size: var(--fs-m); animation: entree-toast 160ms ease-out; }
.toast::before { content: "i"; width: 14px; height: 14px; flex: none; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font: 700 var(--fs-xxs)/1 var(--font); }
.toast.ok { color: var(--ok); } .toast.ok::before { content: "✓"; }
.toast.attention { color: var(--warn); } .toast.attention::before { content: "!"; border-radius: 0; }
.toast.erreur { color: var(--bad); } .toast.erreur::before { content: "!"; border-radius: var(--r1); border-width: 2px; }
.toast .t { flex: 1; min-width: 0; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.toast .b-mini { margin-top: -2px; }
@keyframes entree-toast { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* =================================================================== 6. Écrans hors cadre : connexion, choix de compagnie, plateforme */
.porte { height: 100%; overflow: auto; display: grid; place-items: center; padding: var(--e5); background: var(--bg-0); }
.porte-panneau { width: min(372px, 100%); background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--ombre); overflow: hidden; }
.porte-panneau.large { width: min(560px, 100%); }
.porte-tete { height: var(--h-titre); display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e2) 0 10px; background: var(--brand); color: var(--brand-ink); }
.porte-tete :focus-visible { outline-color: var(--brand-ink); }
.porte-tete .marque { width: auto; padding: 0; }
.porte-tete .etiquette { margin: 0; }
.porte-corps { padding: var(--e5); display: grid; gap: 10px; }
.porte h1 { font-size: var(--fs-xl); font-weight: 600; line-height: 1.25; }
.porte .champ-bloc .champ { height: 28px; font-size: var(--fs-l); }
.porte .btn { height: 28px; }
.porte .btn.envoi { width: 100%; justify-content: space-between; padding: 0 var(--e5); font-size: var(--fs-l); }
.porte-pied { padding: var(--e3) var(--e5); border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: var(--fs-xs); }
.mdp { position: relative; display: flex; }
.mdp .champ { flex: 1; padding-right: 30px; }
.mdp .b-mini { position: absolute; right: 4px; top: 4px; }
.aide-connexion { color: var(--ink-2); font-size: var(--fs-s); }
.aide-connexion summary { cursor: pointer; padding: var(--e1) 0; }
.aide-connexion p { margin-top: var(--e2); line-height: 1.5; }
.choix-cie { list-style: none; border: 1px solid var(--line); border-radius: var(--r1); background: var(--grid-bg); }
.choix-cie li + li { border-top: 1px solid var(--grid-line); }
.choix-cie button { width: 100%; height: 32px; display: flex; align-items: center; gap: var(--e4); padding: 0 var(--e4); border: 0; background: transparent; color: var(--ink); font-size: var(--fs-m); text-align: left; }
.choix-cie button:hover { background: var(--survol); }
.choix-cie .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; white-space: nowrap; }
.choix-cie .note { color: var(--ink-2); font-size: var(--fs-s); white-space: nowrap; }

/* =================================================================== 7. Vues simples dans le cadre */

/* Vue d'ensemble */
/* Cadre fixe (classe plein sur le contenu) : bande d'indicateurs en tête, puis la grille des éléments (disposition
   personnelle, écran vue_ensemble : 12 colonnes ; le moteur de disposition.js pose grid-column et grid-row de chaque
   élément par le CSSOM, ces règles donnent la place d'origine). Chaque panneau fait défiler son seul corps. */
.vue-accueil { min-height: 0; display: flex; flex-direction: column; gap: var(--e4); }
.vue-accueil > .indicateurs { flex: none; }
.acc-grille { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: var(--e4); align-items: stretch; }
.acc-grille > .acc-el { min-width: 0; min-height: 0; }
.acc-grille > .p-deps { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.acc-grille > .p-liens { grid-column: 8 / span 5; grid-row: 1; }
.acc-grille > .p-perms { grid-column: 8 / span 5; grid-row: 2; }
/* Bandes de pilotage (monterVueDirection) côte à côte en tête ; --acc-l : colonnes de chaque bande (posé par app.js). */
.acc-grille.avec-direction { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
.acc-grille.avec-direction > .p-deps { grid-row: 2 / span 2; }
.acc-grille.avec-direction > .p-liens { grid-row: 2; }
.acc-grille.avec-direction > .p-perms { grid-row: 3; }
.acc-grille > .acc-bande { grid-row: 1; grid-column: span var(--acc-l, 12); overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.acc-lien-synthese { margin-left: auto; }
/* Grille gérée par le moteur de disposition (classe disp-grille : 12 x 48, rangées ajustées à la hauteur de la grille) :
   l'espacement passe des pistes aux éléments, pour que les 48 rangées tiennent dans la zone ; la grille seule défile. */
.acc-grille.disp-grille { gap: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-fort) transparent; }
.acc-grille.disp-grille > .acc-el { margin: calc(var(--e4) / 2); }
.vue-accueil .tableau a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: var(--e3); }
.vue-accueil .tableau a:hover { text-decoration: underline; }
.vue-accueil .tableau .ic { color: var(--ink-2); }
.perms { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 var(--e5); padding: var(--e2) var(--e4); }
.perms li { min-height: 20px; display: flex; align-items: center; gap: var(--e3); font-size: var(--fs-m); }
.perms .ic { color: var(--ok); }

/* Synthèse HoD de l'Espace de travail (#/synthese-hod) : l'écran (synthese_hod.css) occupe toute la zone, sans défilement
   de la page ; seul son tableau défile dans son panneau. */
.vue-synthese { min-height: 0; display: flex; flex-direction: column; }

/* Membres et accès : liste dense, filtres en tête, fiche dans le panneau Détail */
.tableau .ini { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: var(--r1); background: var(--bg-3); color: var(--ink); font-size: var(--fs-xxs); font-weight: 700; vertical-align: middle; }
.fiche { display: flex; flex-direction: column; min-height: 0; }
.fiche .d-corps .actions { justify-content: stretch; }
.fiche .d-corps .actions .btn { flex: 1; }

/* Personnalisation : panneau sur toute la zone (corps qui défile), champs de nom à largeur de lecture */
.vue-perso .champ.large { max-width: 480px; }
.apercus { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--e4); }
.apercu { min-height: 52px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: var(--e3) var(--e4); border-radius: var(--r2); font-size: var(--fs-s); }
.apercu strong { font-size: var(--fs-l); }
.apercu.principale { background: var(--apercu-fond, var(--brand)); color: var(--apercu-texte, var(--brand-ink)); }
.apercu.principale i { font-style: normal; color: var(--apercu-accent, var(--accent)); }
.apercu.accent { background: var(--apercu-accent-plein, var(--apercu-accent, var(--accent))); color: var(--apercu-accent-texte, var(--accent-ink)); }

/* =================================================================== 8. Fenêtres étroites */
@media (max-width: 1099px) {
  .marque { width: auto; }
  .u-texte, .etiquette { display: none; }
  .tableau .opt { display: none; }
  /* Vue d'ensemble : éléments empilés (bandes de pilotage à leur hauteur, panneaux qui se partagent le reste). */
  .acc-grille { display: flex; flex-direction: column; }
  .acc-grille > .acc-el { flex: 2 1 0; }
  .acc-grille > .p-liens, .acc-grille > .p-perms { flex: 1 1 0; }
  .acc-grille > .acc-bande { flex: none; max-height: 40%; }
  /* Panneau Détail : superposé à droite du centre, la colonne garde son rail (le centre ne bouge pas) */
  .cadre[data-detail="ouvert"] { --col-d: var(--w-rail); }
  .cadre[data-detail="ouvert"] .dock-droit { position: absolute; top: 0; right: 0; bottom: 0; z-index: 30; width: min(var(--w-dock), calc(100% - 48px)); box-shadow: var(--ombre); }
  .dock-poignee { display: none; }
  .cadre[data-concentration="oui"] { --col-d: 0px; }
  .be-facultatif { display: none !important; }
}
@media (max-width: 759px) {
  .barre-titre .b-menu { display: inline-flex; margin-left: var(--e1); align-self: center; }
  .marque { padding: 0 var(--e3); }
  .marque small, .contexte, .utilisateur, .b-titre.facultatif { display: none; }
  .ruban-onglets { flex: 1; }
  .titre-actions { margin-left: auto; }
  /* Explorateur : panneau superposé à gauche, avec voile */
  .cadre, .cadre[data-explorateur] { --col-g: 0px; }
  .dock-gauche { position: fixed; left: 0; top: var(--h-titre); bottom: var(--h-etat); z-index: 40; width: min(300px, 86vw); box-shadow: var(--ombre); visibility: hidden; transform: translateX(-100%); transition: transform var(--duree), visibility var(--duree); }
  .explorateur-poignee { display: none !important; } /* explorateur superposé : largeur fixe du téléphone */
  .cadre[data-explorateur="ouvert"] .dock-gauche { visibility: visible; transform: none; }
  .cadre[data-explorateur] .dock-gauche > :not(.rail) { display: flex; }
  .cadre[data-explorateur] .dock-gauche > .dock-corps { display: block; }
  .cadre[data-explorateur] .dock-gauche > .rail { display: none; }
  .cadre[data-explorateur="ouvert"]:not([data-concentration="oui"]) .voile { display: block; position: fixed; inset: var(--h-titre) 0 var(--h-etat) 0; z-index: 35; background: var(--voile); }
  /* Zone de travail (2.32.0, point 1 de l'audit d'ergonomie) : l'explorateur et le dock sortent de la grille (fixe,
     absolu ou masqué) ; sans place donnée, le centre tombait dans la colonne 1 de l'explorateur (0 px) et l'écran de
     travail restait vide sur téléphone et tablette en hauteur depuis la 2.0. Le dock superposé garde la largeur du
     cadre (aucune colonne : son bloc conteneur reste la grille entière). */
  .travail > .centre { grid-column: 2; grid-row: 1; }
  /* Panneau Détail : pleine largeur, aucun rail */
  .cadre[data-detail="replie"], .cadre[data-detail="ouvert"] { --col-d: 0px; }
  .cadre[data-detail="replie"] .dock-droit { display: none; }
  .cadre[data-detail="ouvert"] .dock-droit { width: 100%; }
  .coulisses[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .cl-nav { flex-direction: row; padding: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .cl-nav [role="tablist"] { flex-direction: row; }
  .cl-nav .pousse { display: none; }
  .cl-retour { margin-bottom: 0; }
  .barre-etat > .be-cie { display: none; }
  .contenu.simple { padding: var(--e3); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* =================================================================== 9. Impression : seul le contenu de la vue */
@page { size: landscape; margin: 10mm; }
@media print {
  html, body, #racine, .cadre, .travail, .centre, .zone-travail, .contenu { height: auto !important; overflow: visible !important; display: block !important; }
  .barre-titre, .ruban, .dock, .fenetres, .barre-etat, .toasts, .evitement, .voile, .onglets-feuilles, .coulisses, .pres-sortie, .bulle { display: none !important; }
  .cadre[data-zoom] { zoom: 1; }
  body { background: #FFFFFF; color: #000000; }
  .contenu.simple { background: transparent; padding: 0; }
  .tableau thead th, .tableau tfoot th, .tableau tfoot td { position: static; }
}

/* Bascule de langue FR / EN (langue.js, 2.12.11) : barre de titre, en-tête des écrans d'accès. */
.langues { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; border: 1px solid var(--line); }
.langues button { min-width: 30px; height: 22px; padding: 0 7px; border: 0; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; cursor: pointer; opacity: .7; }
.langues button:hover { opacity: 1; }
.langues button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); opacity: 1; }

/* =================================================================== 10. Tableaux de bord standard (02/11/2026)
   Classes communes des écrans de pilotage (Vue d'ensemble, Synthèse HoD, récapitulatifs), spécification des tableaux de
   bord avancés, sections 1.6, 1.8, 1.13 et 1.17. Ajouts seulement : aucun sélecteur existant n'est modifié. */
/* Libellé de carte d'indicateur en petites capitales (le texte n'est pas modifié). */
.lib-kpi { font-variant-caps: all-small-caps; letter-spacing: .02em; }
/* Écarts : couleur selon le sens favorable rendu par le serveur (jamais selon le seul signe) ; flèche et texte toujours
   écrits à côté de la couleur. */
.ecart-fav { color: var(--ok); font-weight: 600; }
.ecart-defav { color: var(--bad); font-weight: 600; }
.ecart-neutre { color: var(--ink-2); }
.ecart-fav, .ecart-defav, .ecart-neutre { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* n.d. : renvoi numéroté en exposant, raison complète en infobulle et une seule fois dans la note du tableau. */
.nd-renvoi { margin-left: 1px; font-size: var(--fs-xxs); line-height: 0; vertical-align: super; color: var(--ink-2); font-weight: 400; }
.notes-nd { margin: 0; padding: var(--e2) var(--e4); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; list-style: none; }
.notes-nd li { overflow-wrap: anywhere; }
.notes-nd li > b { margin-right: var(--e1); font-weight: 600; }
/* Visuel sans aucune valeur : message centré « n.d. : raison », jamais des axes vides. */
.vide-centre { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--e3); padding: var(--e4); color: var(--ink-2); font-size: var(--fs-s); line-height: 1.45; text-align: center; }
.vide-centre .btn { display: inline-flex; align-items: center; gap: var(--e1); }
/* Membres et accès (2.34.0, cahier des charges 4.7 et 4.8) : départements sans compte de saisie au-dessus de la liste,
   adresse et nom côte à côte dans la ligne de saisie, administrateur de la plateforme marqué, remise et code QR dans la
   fiche, bloc « Réinitialiser un compte par QR » de la page de l'administrateur de la plateforme. */
.membres-avert { display: flex; align-items: flex-start; gap: var(--e2); padding: var(--e2) var(--e3) 0; }
.membres-avert > .message { flex: 1; min-width: 0; }
.tableau .saisie-form input + input { border-left: 1px solid var(--grid-line); }
.puce-pf { border-color: var(--accent); color: var(--accent-texte); }
.zone-qr { padding: var(--e2) var(--e4); }
.zone-qr[hidden] { display: none; }
.fiche > .champ-bloc, .fiche > .case { margin: var(--e2) var(--e4) 0; }
.fiche > .actions { padding: var(--e2) var(--e4); }
#f-pf-reinit, #f-pf-rattacher { border-top: 1px solid var(--line); }
.pf-reinit-titre { display: flex; align-items: center; gap: var(--e2); }
.pf-reinit-titre > h2 { margin: 0; font-size: var(--fs-l); }
/* 2.36.0 (lot 0d, L0d.8, demande L0d_D05 appliquée au train T1a) : cibles de pointage. WCAG 2.2, critère 2.5.8
   (niveau AA) : 24 x 24 px au moins ; critère 2.5.5 : 44 px visés au doigt (pointer: coarse). */
.btn, .champ, .rb-bouton, .rb-champ, .langues button, .cases label, .pn-champs li { min-height: 24px; }
.btn.icone, .ruban-defile { min-width: 24px; }
@media (pointer: coarse) {
  .btn, .champ, .rb-bouton, .rb-champ .champ, .langues button, .palette-option, .cases label { min-height: 44px; }
  .btn.icone { min-width: 44px; }
  input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; }
}
