/* Translead Export : charte AGL (jetons clair par défaut + sombre « tour de contrôle ») et composants. */

/* ------------------------------------------------------------ jetons (agl-tokens.css) */
:root,
:root[data-theme="light"] {
  --agl-marine: #0a2240;
  --agl-bleu: #14467c;
  --agl-bleu-vif: #1f5fa8;
  --agl-or: #d4af37;
  --agl-or-fonce: #c9a227;
  --bg: #f2f5f9;
  --panel: #ffffff;
  --panel2: #f7fafd;
  --line: #dde5ef;
  --chip: #e7edf4;
  --hl: #e2ecf7;
  --ink: #000000;
  --mut: #1a1a1a;
  --acc: var(--agl-bleu);
  --acc-ink: #ffffff;
  --btn: var(--agl-marine);
  --btn-ink: #ffffff;
  --th: var(--agl-marine);
  --th-ink: #ffffff;
  --ok: #146314;
  --warn: #8a5f00;
  --bad: #a3121f;
  --info: #14467c;
  --ok-bg: #e6f3e6;
  --warn-bg: #fff4d6;
  --bad-bg: #fde8ea;
  --info-bg: #e2ecf7;
  --marque: var(--agl-bleu);
  --entete-bg: rgba(255, 255, 255, .72);
  --menu-bg: var(--agl-marine);
  --menu-ink: #ffffff;
  --menu-mut: #c9d6e6;
  --menu-actif: rgba(255, 255, 255, .14);
  --shadow: 0 1px 2px #0a22400f, 0 4px 14px #0a22400a;
  --radius: 10px;
  --font: Arial, Helvetica, sans-serif;
  color-scheme: light;
}

/* 16/10/2026 : en sombre, les jetons bleus de la charte valent l'or : une couleur venue de la base
   (tl.phase.couleur_jeton = --agl-bleu-vif, puce « Empotage ») ou un écran qui les cite reste dans l'or. Bloc à part
   (html[data-theme="dark"], plus spécifique que :root) : les jetons sombres ci-dessous ne citent aucun bleu. */
html[data-theme="dark"] {
  --agl-bleu: var(--agl-or-fonce);
  --agl-bleu-vif: var(--agl-or);
}

:root[data-theme="dark"] {
  --bg: #091521;
  --panel: #102030;
  --panel2: #0c1a28;
  --line: #233344;
  --chip: #18333d;
  --hl: #132c3b;
  --ink: #e3ecf3;
  --mut: #8da1b4;
  /* 13/10/2026 : en sombre, marque, accent et info en or (demande utilisateur) : ni bleu ni turquoise. */
  --acc: var(--agl-or);
  --acc-ink: #091521;
  --btn: var(--agl-or);
  --btn-ink: #091521;
  --th: #0c1a28;
  --th-ink: #95adbf;
  --ok: #3fbf6b;
  --warn: #fab219;
  --bad: #ff5a6e;
  --info: var(--agl-or);
  --ok-bg: #12301f;
  --warn-bg: #33280c;
  --bad-bg: #3a1620;
  --info-bg: #2e2610;
  --marque: var(--agl-or);
  --entete-bg: rgba(12, 26, 40, .92);
  --menu-bg: #0c1a28;
  --menu-ink: #e3ecf3;
  --menu-mut: #8da1b4;
  --menu-actif: #18333d;
  --shadow: none;
  color-scheme: dark;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.5 var(--font); }
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--acc); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.cache { display: none !important; }
/* 15/10/2026 : texte réservé aux lecteurs d'écran (masqué à l'écran) : titres de colonnes d'actions, titre de page pendant
   le chargement. */
.kn-lecteur { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
              clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.mut { color: var(--mut); }
.droite { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: Menlo, Consolas, monospace; font-size: 12px; }

/* ------------------------------------------------------------ coquille */
.entete {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; min-height: 54px; background: var(--entete-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.entete .logo { height: 38px; width: auto; display: block; }
.entete .appli { font-weight: 700; letter-spacing: .4px; text-transform: uppercase; font-size: 12px; color: var(--ink); }
.entete .espace { flex: 1; }
.entete .qui { font-size: 12px; text-align: right; line-height: 1.2; }
.entete .qui small { display: block; color: var(--mut); }
.bouton-menu { display: none; }

.coquille { display: grid; grid-template-columns: 236px 1fr; min-height: calc(100vh - 54px); }
.menu {
  background: var(--menu-bg); color: var(--menu-ink); padding: 12px 8px 24px;
  position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto;
}
.menu .famille { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--menu-mut); margin: 14px 10px 4px; }
.menu a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--menu-ink);
  text-decoration: none; font-size: 13px;
}
.menu a:hover { background: var(--menu-actif); }
.menu a.actif { background: var(--menu-actif); box-shadow: inset 3px 0 0 var(--marque); font-weight: 700; }
.menu svg { width: 18px; height: 18px; flex: none; }
:root[data-theme="light"] .menu a.actif { box-shadow: inset 3px 0 0 #ffffff; }
.zone { padding: 18px 20px 40px; min-width: 0; }

@media (max-width: 900px) {
  .coquille { grid-template-columns: 1fr; }
  .menu { position: fixed; left: 0; top: 54px; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%);
          transition: transform .2s; height: auto; }
  body.menu-ouvert .menu { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .bouton-menu { display: inline-flex; }
  .entete .qui { display: none; }
  .zone { padding: 14px 12px 32px; }
}

/* ------------------------------------------------------------ titres */
.tete { margin: 0 0 16px; }
.tete .surtitre { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--mut); font-weight: 700; }
.tete h1 em { font-style: normal; color: var(--acc); }
.tete .sous { margin-top: 4px; color: var(--mut); }
.tete .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.liser { display: block; width: 44px; height: 5px; background: var(--acc); transform: skew(-25deg); margin: 10px 0 0; }

/* ------------------------------------------------------------ boutons, champs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 14px;
  border-radius: 8px; border: 1px solid var(--btn); background: var(--btn); color: var(--btn-ink); cursor: pointer;
  font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sec { background: transparent; color: var(--acc); border-color: var(--acc); }
.btn.lien { background: transparent; border-color: transparent; color: var(--acc); padding: 4px 6px; min-height: 0; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.petit { min-height: 26px; padding: 2px 10px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }

.champ { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.champ label { font-size: 12px; font-weight: 700; }
.champ .aide { font-size: 11px; color: var(--mut); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); outline: none; box-shadow: 0 0 0 2px var(--hl); }
.grille-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }

/* ------------------------------------------------------------ cartes, grilles */
.carte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
         padding: 14px 16px; margin-bottom: 16px; min-width: 0; }
.carte > h2, .carte > h3 { display: flex; align-items: center; gap: 8px; }
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
/* 15/10/2026 : un élément de grille peut rétrécir sous la largeur de son contenu : un tableau large défile dans sa zone
   (.defile) au lieu d'élargir la page sur téléphone (page Finance dézoomée, 496 px pour 390). */
.grille > * { min-width: 0; }
.grille.etroite { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.verre { background: rgba(255,255,255,.62); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
         border: 1px solid rgba(20,70,124,.18); border-radius: 12px; box-shadow: 0 14px 40px rgba(10,34,64,.12); }
:root[data-theme="dark"] .verre { background: rgba(15,31,48,.9); border-color: var(--line); box-shadow: none; }

/* ------------------------------------------------------------ KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
       box-shadow: var(--shadow); position: relative; text-align: left; color: var(--ink); min-width: 0; }
.kpi.clic { cursor: pointer; }
.kpi.clic:hover { border-color: var(--acc); background: var(--hl); }
.kpi .libelle { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; color: var(--mut); }
.kpi .valeur { font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sous { font-size: 12px; color: var(--mut); }
.kpi .tendance { font-size: 12px; font-weight: 700; }
.kpi .tendance.hausse { color: var(--ok); }
.kpi .tendance.baisse { color: var(--bad); }
.kpi.ok { box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.kpi.attention { box-shadow: inset 4px 0 0 var(--warn), var(--shadow); }
.kpi.critique { box-shadow: inset 4px 0 0 var(--bad), var(--shadow); }
.kpi.info { box-shadow: inset 4px 0 0 var(--acc), var(--shadow); }

/* ------------------------------------------------------------ tables */
.tbl { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
       margin-bottom: 16px; min-width: 0; }
.tbl .barre { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl .barre .recherche { flex: 1 1 220px; max-width: 360px; }
.tbl .barre .filtre { flex: 0 1 170px; }
.tbl .barre .compte { margin-left: auto; font-size: 12px; color: var(--mut); }
.tbl .defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.kn { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kn th { background: var(--th); color: var(--th-ink); font-weight: 700; font-size: 11px; text-transform: uppercase;
              letter-spacing: .5px; text-align: left; padding: 8px 10px; white-space: nowrap; position: sticky; top: 0; }
table.kn th.triable { cursor: pointer; user-select: none; }
table.kn th.triable::after { content: " ↕"; opacity: .45; }
table.kn th.asc::after { content: " ↑"; opacity: 1; }
table.kn th.desc::after { content: " ↓"; opacity: 1; }
table.kn tr.filtres th, table.kn tr.filtres td { background: var(--panel2); padding: 4px 6px; position: static; border-bottom: 0; }
table.kn tr.filtres input, table.kn tr.filtres select { min-height: 26px; padding: 2px 6px; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; }
table.kn td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kn td.num, table.kn th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.kn tr.clic { cursor: pointer; }
table.kn tbody tr:hover td { background: var(--hl); }
table.kn tr.sel td { background: var(--hl); }
.tbl .vide, .vide { padding: 24px; text-align: center; color: var(--mut); }
.pagination { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 8px 12px; flex-wrap: wrap; font-size: 12px; }

/* ------------------------------------------------------------ puces, badges, bandeaux */
.puce { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; border: 1.5px solid var(--acc);
        color: var(--acc); font-weight: 700; font-size: 12px; white-space: nowrap; line-height: 1.6; background: transparent; }
.puce.ok { border-color: var(--ok); color: var(--ok); }
.puce.attention, .puce.warn { border-color: var(--warn); color: var(--warn); }
.puce.critique, .puce.bad { border-color: var(--bad); color: var(--bad); }
.puce.neutre { border-color: var(--line); color: var(--mut); }
.puce.plein { background: var(--chip); }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }

.alerte { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px;
          border: 1px solid; border-left-width: 5px; }
.alerte.ok, .b-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ink); }
.alerte.attention, .b-warn { background: var(--warn-bg); border-color: var(--warn); color: var(--ink); }
.alerte.critique, .b-bad { background: var(--bad-bg); border-color: var(--bad); color: var(--ink); }
.alerte.info { background: var(--info-bg); border-color: var(--info); color: var(--ink); }
.alerte .titre { font-weight: 700; }
.alerte .actions { margin-left: auto; }

/* ------------------------------------------------------------ pli (synthèse repliable) */
details.pli { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
details.pli > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
                        padding: 10px 14px; font-weight: 700; }
details.pli > summary::-webkit-details-marker { display: none; }
details.pli > summary::before { content: "▸"; color: var(--acc); transition: transform .2s; }
details.pli[open] > summary::before { transform: rotate(90deg); }
details.pli > .contenu { padding: 0 14px 14px; }

/* ------------------------------------------------------------ onglets */
.onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.onglets button { border: 0; background: none; padding: 8px 12px; cursor: pointer; border-bottom: 3px solid transparent;
                  font-weight: 700; color: var(--mut); white-space: nowrap; }
.onglets button.actif { color: var(--ink); border-bottom-color: var(--acc); }

/* ------------------------------------------------------------ frise chronologique */
.frise { display: flex; overflow-x: auto; padding: 6px 2px 12px; gap: 0; }
.frise .etape { flex: 0 0 132px; position: relative; text-align: center; padding: 0 6px; }
.frise .etape::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.frise .etape:first-child::before { display: none; }
.frise .etape.fait::before, .frise .etape.retard::before, .frise .etape.critique::before { background: var(--acc); }
.frise .rond { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px;
               display: flex; align-items: center; justify-content: center; border: 3px solid var(--line);
               background: var(--panel); color: var(--mut); font-weight: 700; font-size: 12px; }
.frise .etape.fait .rond { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.frise .etape.retard .rond { background: var(--warn); border-color: var(--warn); color: #fff; }
.frise .etape.critique .rond { background: var(--bad); border-color: var(--bad); color: #fff; }
.frise .etape.encours .rond { border-color: var(--acc); color: var(--acc); }
.frise .etape.na .rond { border-style: dashed; }
/* §12 : étape franchie (déduite d'une étape plus avancée datée) : franchie, mais distincte d'une saisie réelle */
.frise .etape.deduit::before { background: var(--acc); opacity: .45; }
.frise .etape.deduit .rond { border-style: dashed; border-color: var(--acc); color: var(--acc); }
.frise .etape.deduit .date { font-weight: 400; font-style: italic; color: var(--mut); }
.frise .etape.na { opacity: .6; }
.frise .libelle { font-size: 12px; line-height: 1.25; }
.frise .date { font-weight: 700; font-size: 12px; margin-top: 2px; }
.frise .source { font-size: 11px; color: var(--mut); }
.frise .ecart { font-size: 11px; font-weight: 700; }
.frise .ecart.ok { color: var(--ok); }
.frise .ecart.retard { color: var(--warn); }
.frise .ecart.critique { color: var(--bad); }
.frise.verticale { flex-direction: column; overflow: visible; }
.frise.verticale .etape { flex: none; display: grid; grid-template-columns: 40px 1fr; text-align: left; gap: 0 10px; padding: 0 0 12px; }
.frise.verticale .etape::before { top: -50%; left: 18px; width: 3px; height: 100%; }
.frise.verticale .rond { margin: 0; grid-row: span 4; }

/* ------------------------------------------------------------ jauge */
.jauge { display: inline-block; width: 70px; height: 8px; background: var(--chip); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.jauge > span { display: block; height: 100%; background: var(--ok); transition: width .6s; }
.jauge.attention > span { background: var(--warn); }
.jauge.critique > span { background: var(--bad); }

/* ------------------------------------------------------------ modale, notification */
.voile { position: fixed; inset: 0; background: rgba(4, 12, 22, .55); z-index: 60; display: flex; align-items: flex-start;
         justify-content: center; padding: 6vh 12px 12px; overflow-y: auto; }
.modale { background: var(--panel); color: var(--ink); border-radius: 12px; width: min(560px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35);
          border: 1px solid var(--line); }
.modale.large { width: min(920px, 100%); }
.modale header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modale header h2 { margin: 0; flex: 1; font-size: 16px; }
.modale .corps { padding: 16px; }
.modale footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.toasts { position: fixed; right: 12px; bottom: 12px; z-index: 70; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 24px); }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--acc); border-radius: 8px; padding: 10px 14px;
         box-shadow: 0 8px 24px rgba(0,0,0,.18); min-width: 220px; animation: arrivee .2s ease-out; }
.toast.ok { border-left-color: var(--ok); }
.toast.attention { border-left-color: var(--warn); }
.toast.critique { border-left-color: var(--bad); }
@keyframes arrivee { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ chargement */
.chargement { display: flex; align-items: center; gap: 10px; padding: 24px; color: var(--mut); }
.chargement::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--acc);
                      animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ connexion */
.ecran-connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
                   background: radial-gradient(circle at 20% 10%, var(--hl), transparent 60%), var(--bg); }
.ecran-connexion .boite { width: min(400px, 100%); padding: 28px 24px; }
.ecran-connexion .logo { height: 46px; display: block; margin-bottom: 18px; }
.ecran-connexion h1 { font-size: 20px; }
.ecran-connexion .btn { width: 100%; margin-top: 6px; }
.ecran-connexion .pied { margin-top: 16px; font-size: 11px; color: var(--mut); text-align: center; }

/* ------------------------------------------------------------ impression */
@media print {
  .entete, .menu, .toasts, .tbl .barre, .pagination, .btn { display: none !important; }
  .coquille { display: block; }
  .zone { padding: 0; }
  .carte, .tbl, .kpi { box-shadow: none; }
}

/* ------------------------------------------------------------ petits écrans (360 px) */
@media (max-width: 480px) {
  h1 { font-size: 19px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .kpi .valeur { font-size: 22px; }
  .grille { grid-template-columns: 1fr; }
  .tbl .barre .recherche, .tbl .barre .filtre { flex: 1 1 100%; max-width: none; }
  .entete .appli { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
                           transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Formulaire en page piloté par le paramétrage (Kn.formulaireEnLigne) */
.formulaire { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.groupe-form { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 0; margin: 0 0 12px; }
.groupe-form legend { padding: 0 6px; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--acc); }
.actions-form { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.champ input:disabled, .champ select:disabled, .champ textarea:disabled { background: var(--chip); color: var(--ink); opacity: 1; cursor: not-allowed; }
@media (max-width: 480px) { .formulaire { padding: 10px; } .groupe-form { padding: 6px 8px 0; } .actions-form .btn { width: 100%; } }

/* ------------------------------------------------------------ Mon compte et présentation guidée (13/10/2026) */
dl.kv { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 4px 12px; margin: 0 0 12px; }
dl.kv dt { font-size: 12px; font-weight: 700; color: var(--mut); }
dl.kv dd { margin: 0; word-break: break-word; }
.guide { border-left: 4px solid var(--acc); margin-bottom: 16px; }
.guide > summary { font-weight: 700; }
.guide-pas { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0; margin: 4px 0 12px;
             border-bottom: 1px solid var(--line); }
.guide-pas li { padding-bottom: 6px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.guide-pas li.actif { border-bottom-color: var(--acc); }
.guide-pas .btn { color: var(--ink); font-weight: 400; }
.guide-pas li.actif .btn { font-weight: 700; }
.guide-pas .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 6px;
                  border: 1.5px solid var(--acc); color: var(--acc); font-size: 12px; font-weight: 700; }
.guide-pas li.actif .num, .guide-pas li.fait .num { background: var(--acc); color: var(--acc-ink); }
.guide-contenu { min-height: 120px; }
.guide-contenu .ligne { margin: 6px 0; }

/* ------------------------------------------------------------ Mon poste : files de travail (13/10/2026) */
.ft-carte { grid-column: 1 / -1; }
.ft { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.ft-groupe h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 11px; letter-spacing: 1.2px;
                text-transform: uppercase; color: var(--mut); }
.ft-groupe h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ft-groupe h4 span { order: 2; font-size: 11px; font-weight: 700; color: var(--acc); background: var(--chip); border-radius: 99px; padding: 1px 8px; letter-spacing: 0; }
.ft-tuiles { display: grid; gap: 8px; }
.ft-tuile { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; width: 100%;
            padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
            background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px;
            transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ft-tuile:hover, .ft-tuile:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--acc); outline: none; }
.ft-tuile.calme { border-left-color: var(--line); opacity: .75; }
.ft-pict { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--chip); color: var(--acc); }
.ft-pict i { width: 22px; height: 22px; background: currentColor;
             -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.ft-corps { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ft-lib { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-nb { font-size: 20px; font-weight: 700; color: var(--acc); font-variant-numeric: tabular-nums; line-height: 1; }
.ft-nb small { font-size: 11px; font-weight: 400; color: var(--mut); }
.ft-jauge { grid-column: 1 / -1; height: 4px; margin-top: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.ft-jauge i { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.ft-valider { position: absolute; top: -8px; right: 10px; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px;
              background: var(--warn-bg); color: var(--warn); border: 1px solid currentColor; }

/* ------------------------------------------------------------ lien vers la page de présentation (13/10/2026) */
.lien-presentation { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.lien-presentation svg { width: 16px; height: 16px; }
.retour-presentation { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center;
                       font-size: 13px; font-weight: 600; color: var(--acc); text-decoration: none; }
.retour-presentation:hover { text-decoration: underline; }
@media (max-width: 680px) { .lien-presentation span { display: none; } }

/* ------------------------------------------------------------ verrou de saisie (15/10/2026, sql/288)
   body.saisie-grise : contrôles de saisie visibles mais inactifs ; body.saisie-masquee : cachés.
   data-hors-verrou / .hors-verrou : attribution conteneurs et plombs, OCR, phyto restent actifs. */
body.saisie-grise [data-saisie]:not([data-hors-verrou]):not(.hors-verrou) {
  opacity: .45; filter: grayscale(1); cursor: not-allowed; pointer-events: none; user-select: none;
}
body.saisie-masquee [data-saisie]:not([data-hors-verrou]):not(.hors-verrou) { display: none !important; }
body.saisie-grise [data-hors-verrou], body.saisie-grise .hors-verrou { pointer-events: auto; cursor: auto; }
.verrou-saisie { white-space: nowrap; }
.verrou-saisie[hidden] { display: none; }
@media (max-width: 680px) { .verrou-saisie { display: none; } }

/* 15/10/2026 : zone de dépôt de documents commune (imports, archives, attribution, OCR) : icône dans une pastille,
   bordure fine pointillée, états survol / glisser / focus / occupé ; couleurs par jetons (thèmes clair et sombre). */
.depot-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 132px; padding: 20px 16px; text-align: center; cursor: pointer; border: 1.5px dashed var(--line);
  border-radius: var(--radius); background: var(--panel2); color: var(--ink);
  transition: border-color .15s, background-color .15s, box-shadow .15s; }
.depot-zone > svg { width: 22px; height: 22px; padding: 11px; box-sizing: content-box; border-radius: 50%;
  color: var(--acc); background: var(--hl); flex: none; margin-bottom: 4px; transition: transform .15s; }
.depot-zone strong { font-size: 15px; font-weight: 600; }
.depot-zone .sous, .depot-zone .aide { font-size: 12.5px; color: var(--mut); max-width: 56ch; }
.depot-zone:hover, .depot-zone:focus-visible, .depot-zone.survol { border-color: var(--acc); background: var(--hl); outline: none; }
.depot-zone:focus-visible { box-shadow: 0 0 0 3px var(--hl); }
.depot-zone.survol > svg { transform: translateY(2px); }
.depot-zone.occupe { opacity: .7; cursor: progress; }
.depot-zone [aria-live]:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .depot-zone, .depot-zone > svg { transition: none; } }
@media (max-width: 600px) { .depot-zone { min-height: 112px; padding: 16px 12px; } }

/* 19/10/2026 : n° de conteneur à clé ISO 6346 fausse (Kn.controleTc), signalé avant envoi */
input.tc-invalide, textarea.tc-invalide { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
/* ligne en écart (aperçu et proposition d'attribution, 53-attribution.js) : repère à gauche et fond d'attention */
tr.alerte-ligne > td { background: var(--warn-bg); }
tr.alerte-ligne > td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

/* ------------------------------------------------------------ v16 (19/10/2026) : menu pliable, « i » des éléments déduits */
.menu .menu-plier { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; margin-bottom: 4px;
  color: var(--menu-mut); font-size: 12px; justify-content: flex-start; }
.menu .menu-plier:hover { color: var(--menu-ink); background: var(--menu-actif); }
@media (min-width: 901px) {
  body.menu-plie .coquille { grid-template-columns: 60px 1fr; }
  body.menu-plie .menu { padding: 12px 6px 24px; }
  body.menu-plie .menu a, body.menu-plie .menu .menu-plier { justify-content: center; padding: 9px 0; }
  body.menu-plie .menu a > span, body.menu-plie .menu .menu-plier > span { display: none; }
  body.menu-plie .menu .famille { font-size: 0; height: 1px; margin: 10px 8px; background: var(--menu-mut); opacity: .35; }
  body.menu-plie .menu svg { width: 20px; height: 20px; }
}
@media (max-width: 900px) { .menu .menu-plier { display: none; } }

/* icône « i » : élément déduit ; la raison (serveur) s'affiche au survol ou au focus clavier */
.kn-i { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 50%; border: 1px solid var(--acc); color: var(--acc); font: italic 700 10px/1 Georgia, serif;
  cursor: help; vertical-align: middle; flex: none; }
.kn-i:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
/* bulle : élément unique en position fixe dans <body> (Kn.infoDeduit), jamais rognée par un conteneur à défilement */
.kn-i-bulle { display: none; position: fixed; z-index: 1000; width: max-content; max-width: 260px; white-space: normal;
  text-align: left; padding: 6px 9px; border-radius: 6px; background: var(--acc); color: var(--acc-ink);
  font-size: 12px; font-style: normal; font-weight: 400; line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; }

/* bloc « Mon poste » allégé (bas de l'accueil) */
.mon-poste .mp h4 { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 13px; }
.mon-poste .mp-qui { margin: 0 0 8px; }
.mon-poste .mp-ligne { gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mon-poste .mp-lib { flex: 1; min-width: 0; }
