/* 

   NIMRY InfraXact — Couche UI/UX « Pro »
   Activée par page via <body class="pro-login|pro-dash"> après
   components.css. Zéro impact sur les autres pages tant que la
   classe n'est pas posée ; généralisable en posant la classe.
   Principes : surfaces calmes, une couleur d'action par écran,
   hiérarchie typographique forte, tout élément est actionnable,
   responsive continu, mouvement discret (prefers-reduced-motion).
    */

/* ─────────── Primitives partagées ─────────── */
body.pro-login, body.pro-dash{ background:var(--bg); }

.kick{
  display:inline-flex; align-items:center; gap:7px;
  font-size:11px; font-weight:700; letter-spacing:.10em; text-transform:uppercase;
  color:var(--brand-700);
}
.kick::before{ content:""; width:16px; height:2px; border-radius:2px; background:var(--accent); }
.kick--light{ color:#9db4d8; } .kick--light::before{ background:var(--accent); }

.card--hover{ transition:box-shadow .18s, transform .18s, border-color .18s; }
.card--hover:hover{ box-shadow:var(--sh-3); transform:translateY(-1px); border-color:var(--line-survol); }

.btn{ border-radius:11px; }
.btn--primary{ box-shadow:0 6px 14px -6px rgba(37,99,235,.45); }
.btn--primary:hover{ transform:translateY(-1px); box-shadow:0 8px 18px -6px rgba(37,99,235,.5); }
.btn--xl{ height:50px; padding:0 22px; font-size:15.5px; border-radius:13px; }

@keyframes riseIn{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
.rise{ animation:riseIn .38s cubic-bezier(.2,.8,.25,1) both; }
.rise-1{ animation-delay:.04s } .rise-2{ animation-delay:.09s }
.rise-3{ animation-delay:.15s } .rise-4{ animation-delay:.21s }
@media (prefers-reduced-motion: reduce){
  .rise{ animation:none } .btn--primary:hover{ transform:none }
}

/* ================================================================
   LOGIN - body.pro-login : minimaliste, sans cartes ni ombres
   ================================================================ */
body.pro-login{
  min-height:100dvh; display:grid; place-items:center; padding:28px 20px;
  background-image:radial-gradient(var(--line) 1px, transparent 1px);
  background-size:26px 26px;
}
.lp-wrap{ width:100%; max-width:460px }
.lp-head{ display:flex; flex-direction:column; align-items:center; text-align:center; margin-bottom:24px }
.lp-logo{ height:42px; width:auto }
.lp-title{ font-size:21px; font-weight:750; letter-spacing:-.02em; margin-top:16px }
.lp-sub{ font-size:12px; color:var(--ink-4); margin-top:3px }

.lp-lab{
  font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:var(--ink-4); margin:22px 0 10px;
}
.lp-countries{ display:flex; flex-wrap:wrap; gap:6px 20px }
.lp-cty{
  border:0; background:none; padding:2px 1px; cursor:pointer;
  font-size:13px; font-weight:600; color:var(--ink-4);
  border-bottom:2px solid transparent; transition:.15s;
}
.lp-cty:hover{ color:var(--ink-2) }
.lp-cty.is-on{ color:var(--ink); border-bottom-color:var(--accent) }

.lp-field{ margin-top:20px }
.lp-field > label{ display:block; font-size:11px; font-weight:650; letter-spacing:.02em; color:var(--ink-3); margin-bottom:3px }
.lp-input{ position:relative }
.lp-input input{
  width:100%; border:0; border-bottom:1px solid var(--line); background:transparent;
  padding:9px 30px 9px 2px; font-size:14.5px; border-radius:0;
}
.lp-input input:focus{ border-bottom-color:var(--brand); box-shadow:none; outline:none }
.lp-eye{
  position:absolute; right:0; top:50%; transform:translateY(-50%);
  width:30px; height:30px; border:0; background:none; color:var(--ink-4);
  cursor:pointer; display:grid; place-items:center;
}
.lp-eye:hover{ color:var(--ink-2) }
.lp-eye svg{ width:16px; height:16px }

.lp-roles{ display:grid; grid-template-columns:1fr 1fr; gap:11px 18px }
.lp-role{
  position:relative; display:flex; align-items:center; gap:9px;
  border:0; background:none; padding:2px 0; cursor:pointer; text-align:left;
}
.lp-role .dot{
  width:15px; height:15px; flex:none; border-radius:50%;
  border:1.5px solid var(--ink-4); display:grid; place-items:center; transition:.15s;
}
.lp-role .dot::after{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--brand); transform:scale(0); transition:.15s;
}
.lp-role.is-on .dot{ border-color:var(--brand) }
.lp-role.is-on .dot::after{ transform:scale(1) }
.lp-role .rt{ font-size:12.5px; font-weight:600; color:var(--ink-2) }
.lp-role.is-on .rt{ color:var(--ink) }
.lp-role .ck{ display:none }

.lp-cta{ margin-top:32px; height:46px; border-radius:11px }
.lp-note{ margin-top:14px; text-align:center; font-size:10.5px; color:var(--ink-4) }

.lp-foot{
  margin-top:34px; padding-top:14px; border-top:1px solid var(--line-2);
  display:flex; justify-content:center; align-items:center; gap:10px;
  font-size:11px; color:var(--ink-4);
}
.lp-foot a{
  display:inline-flex; align-items:center; gap:5px; color:var(--ink-2);
  font-weight:600; text-decoration:none; transition:.15s;
}
.lp-foot a:hover{ color:var(--brand); text-decoration:none }
.lp-foot a svg{ width:12px; height:12px }
/* La version de la console (16/11/2026), discrète, en chiffres alignés. */
.lp-version{ color:var(--ink-4); font-variant-numeric:tabular-nums }

/* La connexion sans mot de passe (A2) : un lien en bas à droite de
   l'identifiant, qui ne paraît qu'une adresse saisie. Un bouton, pas une
   ancre : il envoie le formulaire, il ne mène pas à une page. */
.lp-sans-mdp{ display:flex; justify-content:flex-end; margin-top:7px }
.lp-sans-mdp[hidden]{ display:none }
.lp-lien{
  background:none; border:0; padding:2px 0; cursor:pointer;
  font:inherit; font-size:12px; font-weight:650; color:var(--brand);
  text-decoration:underline; text-underline-offset:3px;
}
.lp-lien:hover{ color:var(--brand-700) }
.lp-lien:focus-visible{ outline:2px solid var(--brand); outline-offset:3px; border-radius:3px }
.lp-lien:disabled{ color:var(--ink-4); cursor:default; text-decoration:none }
.code-courriel{
  width:100%; text-align:center; letter-spacing:.42em; font-size:28px;
  font-weight:650; font-variant-numeric:tabular-nums; padding:14px 10px;
}

@media (max-width:430px){
  body.pro-login{ padding:22px 16px }
  .lp-countries{ gap:6px 14px }
  .lp-roles{ grid-template-columns:1fr }
}

/* Hero */
.db-hero{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:18px; flex-wrap:wrap; margin-bottom:22px;
}
.db-hi h1{ font-size:27px; letter-spacing:-.025em; margin:6px 0 5px }
.db-hi .sub{ color:var(--ink-3); font-size:13.5px; max-width:70ch }
.db-hi .sub b{ color:var(--ink-2) }
.db-meta{ display:flex; align-items:center; gap:8px; flex-wrap:wrap }
.db-pill{
  display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 12px;
  background:var(--surface); border:1px solid var(--line); border-radius:99px;
  font-size:12px; font-weight:600; color:var(--ink-2);
}
.db-actions{ display:flex; gap:9px; flex-wrap:wrap }

/* Bandeau situation */
.db-strip{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:22px }
.db-tile{
  position:relative; display:flex; align-items:center; gap:14px; text-align:left;
  background:var(--surface); border:1px solid var(--line); border-radius:16px;
  padding:16px 18px; cursor:pointer; transition:.16s; overflow:hidden;
}
.db-tile:hover{ box-shadow:var(--sh-3); transform:translateY(-1px); border-color:var(--line-survol) }
.db-tile .ic{
  width:42px; height:42px; flex:none; border-radius:12px; display:grid; place-items:center;
}
.db-tile .ic svg{ width:20px; height:20px }
.ic--red{ background:var(--red-50); color:var(--red) }
.ic--amber{ background:var(--accent-50); color:var(--amber-700) }
.ic--blue{ background:var(--brand-50); color:var(--brand) }
.ic--green{ background:var(--green-50); color:var(--green) }
.ic--slate{ background:var(--slate-50); color:var(--ink-2) }
.db-tile .v{ display:block; font-size:25px; font-weight:720; letter-spacing:-.02em; line-height:1.05; margin-bottom:5px }
.db-tile .l{ display:block; font-size:11.5px; color:var(--ink-3); font-weight:550; line-height:1.35 }
.db-tile .flag{
  position:absolute; top:12px; right:12px; font-size:10.5px; font-weight:700;
  padding:2px 8px; border-radius:99px;
}
.flag--red{ background:var(--red-50); color:var(--red-700) }
.flag--amber{ background:var(--accent-50); color:var(--amber-700) }
.flag--slate{ background:var(--slate-50); color:var(--ink-3) }

/* Grille principale asymétrique */
.db-main{ display:grid; grid-template-columns:minmax(0,7fr) minmax(0,5fr); gap:20px; align-items:start }
.db-col{ display:grid; gap:20px; min-width:0 }

/* File d'attente actionnable */
.q-item{
  display:flex; align-items:center; gap:14px; padding:13px 20px;
  border-bottom:1px solid var(--line-2); transition:.13s; cursor:pointer;
}
.q-item:last-child{ border-bottom:0 }
.q-item:hover{ background:var(--surface-2) }
.q-rail{ width:4px; align-self:stretch; border-radius:4px; flex:none; background:var(--line) }
.q-rail--p1{ background:var(--red) } .q-rail--p2{ background:var(--accent) }
.q-rail--p3{ background:var(--brand) } .q-rail--p4{ background:var(--crit-p4) }
.q-id{ font-family:var(--mono); font-size:12px; font-weight:650; color:var(--brand) }
.q-t{ font-size:13.5px; font-weight:600; color:var(--ink); line-height:1.35;
      overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.q-s{ font-size:11.5px; color:var(--ink-3); margin-top:2px;
      overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.q-x{ margin-left:auto; display:flex; align-items:center; gap:8px; flex:none }

/* ── File d'attente sur petit écran ────────────────────────────────
   La carte est une ligne : filet de criticité, texte, puis badge et
   bouton poussés à droite. Sur un téléphone, la colonne de droite garde
   sa largeur et le texte se réduit à trois points de suspension — la
   ligne devient illisible sans qu'aucune règle ne soit fausse.

   Sous 700 px, elle passe donc sur deux niveaux : le texte occupe toute
   la largeur, l'état et l'action descendent en dessous. Les libellés
   cessent d'être tronqués et s'étalent sur deux lignes : ce qu'on perd
   en compacité, on le gagne en lisibilité, et c'est le bon échange sur
   un écran qu'on tient dans la main. */
@media (max-width:700px){
  .q-item{ flex-wrap:wrap; gap:10px; padding:12px 14px }
  .q-item > div:first-of-type{ flex:1 1 100% }
  .q-rail{ width:100%; height:3px; align-self:auto; flex:0 0 auto }
  .q-t{ white-space:normal; display:-webkit-box; -webkit-line-clamp:2;
        -webkit-box-orient:vertical; line-clamp:2 }
  .q-s{ white-space:normal }
  .q-x{ margin-left:0; flex:1 1 100%; flex-wrap:wrap }
  .q-x .btn{ margin-left:auto }
}

/* Onglets internes compacts (journal / flux) */
.seg{ display:inline-flex; background:var(--surface-2); border:1px solid var(--line);
      border-radius:10px; padding:3px; gap:2px }
.seg button{
  border:0; background:transparent; border-radius:8px; padding:5px 12px;
  font-size:12px; font-weight:600; color:var(--ink-3); cursor:pointer; transition:.14s;
}
.seg button.is-on{ background:var(--surface); color:var(--ink); box-shadow:var(--sh-1) }

/* Ligne d'activité (audit) */
.act-row{ display:flex; gap:12px; padding:11px 20px; border-bottom:1px solid var(--line-2); align-items:flex-start }
.act-row:last-child{ border-bottom:0 }
.act-row:hover{ background:var(--surface-2) }
.act-av{
  width:28px; height:28px; flex:none; border-radius:50%; display:grid; place-items:center;
  background:var(--brand-100); color:var(--brand-700); font-size:10px; font-weight:750;
}
.act-row .t{ font-size:12.5px; line-height:1.45; color:var(--ink-2) }
.act-row .t b{ color:var(--ink); font-weight:650 }
.act-row .m{ font-size:11px; color:var(--ink-4); margin-top:2px; display:flex; gap:8px; flex-wrap:wrap }
.act-row .x{ margin-left:auto; flex:none }

/* Performance compacte (KPI empilés) */
.perf-row{ display:flex; align-items:center; gap:14px; padding:13px 20px; border-bottom:1px solid var(--line-2) }
.perf-row:last-child{ border-bottom:0 }
.perf-row .lab{ width:150px; flex:none }
.perf-row .lab .n{ font-size:12.5px; font-weight:650 }
.perf-row .lab .c{ font-size:10.5px; color:var(--ink-4); margin-top:1px }
.perf-row .spark{ opacity:.85; flex:none }
.perf-row .val{ margin-left:auto; text-align:right; flex:none }
.perf-row .val .n{ font-size:19px; font-weight:720; letter-spacing:-.02em; line-height:1 }
.perf-row .val .d{ font-size:11px; font-weight:650; margin-top:3px }
.d-up{ color:var(--green) } .d-dn{ color:var(--red) }

/* Mini-carte */
.mapbox--mini svg{ min-height:230px; object-fit:cover }
.map-cta{
  position:absolute; right:14px; top:14px; z-index:3;
}

/* Analyse : carte à lecture */
.read-note{
  margin:14px 20px 18px; padding:12px 15px; border-radius:12px; font-size:12.5px; line-height:1.6;
  background:var(--surface-2); border:1px solid var(--line); color:var(--ink-2);
  display:flex; gap:10px;
}
.read-note svg{ width:15px; height:15px; flex:none; margin-top:2px; color:var(--brand) }
.read-note b{ color:var(--ink) }

/* Pied de tableau de bord */
.db-more{
  display:flex; justify-content:center; margin-top:22px;
}

/* Responsive dashboard */
@media (max-width:1180px){
  .db-main{ grid-template-columns:1fr }
  .db-strip{ grid-template-columns:repeat(2,minmax(0,1fr)) }
}
@media (max-width:640px){
  .db-strip{ grid-template-columns:1fr }
  .db-hero{ align-items:flex-start; flex-direction:column }
  .db-actions{ width:100% }
  .db-actions .btn{ flex:1 }
  .q-t{ white-space:normal }
  .perf-row .lab{ width:116px }
  .perf-row .lab .c{ display:none }
}

/* 
   APPLICATION GÉNÉRALE — activée par <body class="pro">
   Politure transversale : topbar, sidebar, cartes, tableaux,
   onglets, filtres, modales, tiroir. Zéro impact fonctionnel.
    */

body.pro{
  /* Fond légèrement texturé pour asseoir les surfaces claires */
  background-image:radial-gradient(rgba(15,23,42,.028) 1px, transparent 1px);
  background-size:24px 24px;
}

/* ── Topbar ── */
body.pro .topbar{
  backdrop-filter:blur(10px);
  background:var(--verre-2);
  box-shadow:0 1px 0 var(--line), 0 6px 18px -14px rgba(15,23,42,.28);
}
body.pro .topbar__product{ font-weight:700; letter-spacing:-.02em }
body.pro .topbar__search input{
  background:var(--surface); border:1px solid var(--line);
  transition:border-color .15s, box-shadow .15s;
}
body.pro .topbar__search input:focus{
  border-color:var(--brand); box-shadow:0 0 0 3px var(--focus-anneau);
}

/* ── Sidebar ── */
body.pro .sidebar{ padding-top:12px }
body.pro .navgroup__t{ padding-left:14px; padding-bottom:12px; display:flex; align-items:center; gap:8px }
body.pro .navgroup__t::after{ content:""; flex:1; height:1px; background:var(--line-2) }
body.pro .navitem{
  border-radius:11px; margin:2px 4px 2px 4px; position:relative;
}
body.pro .navrow .navitem{ margin:0 0 0 4px }
body.pro .navrow__t{ margin-right:2px }
body.pro .navsous__l .navitem--sous{ margin:1px 2px 1px 0 }
body.pro .navsous__l .navitem--sous::before{ left:-11px }
body.pro .navitem::before{
  content:""; position:absolute; left:-4px; top:50%; transform:translateY(-50%);
  width:3px; height:0; border-radius:3px; background:var(--brand); transition:height .16s;
}
body.pro .navitem.is-on::before{ height:60% }
body.pro .navitem.is-on{ font-weight:650 }
body.pro .sidebar__foot{ margin-bottom:-6px }
body.pro .health{ padding:6px 4px; border-radius:8px }
body.pro .health:hover{ background:var(--surface-2) }

/* ── Rythme de page ── */
body.pro .main{ padding-top:26px }
body.pro .pagehead h1{ font-size:24px; letter-spacing:-.025em }
body.pro .pagehead p{ line-height:1.6 }
body.pro .crumb a:hover{ color:var(--brand) }

/* ── Cartes ── */
body.pro .card{ border-radius:16px; box-shadow:var(--sh-1) }
body.pro .card__h{ padding:15px 20px }
body.pro .card__h h3{ letter-spacing:-.01em }
body.pro .card__b{ padding:19px 20px }
body.pro .card__f{ border-radius:0 0 16px 16px }

/* ── Tableaux ── */
body.pro table.tbl th{ letter-spacing:.06em }
body.pro table.tbl tbody tr{ position:relative }
body.pro table.tbl tbody tr.is-click:hover{ background:var(--brand-50) }
body.pro table.tbl tbody tr.is-click{ transition:background .12s }

/* ── Filtres / onglets ── */
body.pro .chip{ border-radius:10px; height:33px }
body.pro .chip.is-on{ background:var(--brand); border-color:var(--brand);
  box-shadow:0 4px 10px -5px rgba(37,99,235,.55) }
body.pro .tabs{ gap:4px; margin-bottom:20px }
body.pro .tab{ border-radius:9px 9px 0 0; padding:10px 16px }
body.pro .tab.is-on{ background:var(--brand-50) }

/* ── Badges ── */
body.pro .badge{ font-size:11px; height:21px }

/* ── KPI ── */
body.pro .kpi{ border-radius:16px }

/* ── Modales & tiroir ── */
body.pro .modal__box{ border-radius:18px; max-width:640px }
body.pro .modal__h h3{ font-size:17px }
body.pro .drawer{ border-radius:22px 0 0 22px; width:min(460px,94vw) }
body.pro .drawer__head h3{ font-size:16px }

/* ── Toasts ── */
body.pro .toast{ border-radius:14px; font-size:13px; backdrop-filter:blur(6px) }

/* ── Formulaires dans les modales ── */
body.pro .formgrid .field>label{ font-size:12px; font-weight:650 }
body.pro .formgrid input,.formgrid select,.formgrid textarea{ border-radius:11px }

/* ── Timeline ── */
body.pro .tlitem__d{ background:var(--surface-2); border-color:var(--line-2) }

/* 

   MOBILE TERRAIN — activé par <body class="pro-app">
    */
body.pro-app{ background:var(--bg) }
body.pro-app .phead{ box-shadow:0 6px 16px -10px rgba(15,23,42,.35) }
body.pro-app .pcard{ border-radius:14px }
body.pro-app .ptabs{
  backdrop-filter:blur(10px); background:var(--verre-2);
  box-shadow:0 -6px 18px -12px rgba(15,23,42,.30);
}
body.pro-app .ptab.is-on{ position:relative }
body.pro-app .ptab.is-on::before{
  content:""; position:absolute; top:0; left:50%; transform:translateX(-50%);
  width:26px; height:3px; border-radius:0 0 4px 4px; background:var(--brand);
}
body.pro-app .btn--primary{ box-shadow:0 6px 14px -6px rgba(37,99,235,.45) }



/* ═══════════════════════════════════════════════════════════════
   TABLEAU DE BORD RÉORGANISÉ (16/11/2026)
   Sections repliables, tuiles à tendance, graphiques dessinés par
   le serveur (App\Shared\Graphe).
   ═══════════════════════════════════════════════════════════════ */
/* Une colonne qui ne s'élargit jamais au contenu : le tableau du préventif
   (une colonne par jour) défile dans son cadre au lieu d'élargir la page. */
.tdb{ display:grid; grid-template-columns:minmax(0,1fr); gap:14px }
.tdb-sec{ border-radius:16px; min-width:0 }
.tdb-sec__h{
  display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; cursor:pointer; list-style:none;
  padding:6px 2px 10px; user-select:none;
}
.tdb-sec__h::-webkit-details-marker{ display:none }
.tdb-sec__h h2{ font-size:16px; font-weight:720; letter-spacing:-.01em; margin:0; color:var(--ink) }
.tdb-sec__aide{ font-size:12px; color:var(--ink-3) }
.tdb-sec__chev{
  width:9px; height:9px; flex:none; align-self:center; border-right:2px solid var(--ink-4);
  border-bottom:2px solid var(--ink-4); transform:rotate(-45deg); transition:transform .15s;
}
.tdb-sec[open] > .tdb-sec__h .tdb-sec__chev{ transform:rotate(45deg) }
.tdb-sec__h:hover h2{ color:var(--brand-700) }
.tdb-sec:not([open]){ border-bottom:1px solid var(--line) }
/* L'intérieur d'une section : une pile à écart fixe (16/11/2026). Les blocs ne portent plus
   leurs propres marges — une classe de marge absente les laissait collés. */
.tdb-sec__b{ display:flex; flex-direction:column; gap:16px; padding-bottom:8px }
.tdb-sec__b > *{ margin-top:0; margin-bottom:0 }

/* Deux cartes côte à côte ont la même hauteur ; leur corps s'étire, leur pied reste en bas. */
.tdb-grille{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:stretch }
.tdb-grille > .card{ display:flex; flex-direction:column; min-width:0 }
.tdb-grille > .card > .card__b{ flex:1 1 auto }
.tdb-grille > .tdb-large{ grid-column:1 / -1 }
.tdb-defile{ max-height:360px; overflow-y:auto }

/* Tuiles à tendance */
.db-strip--tdb{ grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); margin-bottom:0 }
.db-tile--tdb{
  display:grid; grid-template-columns:42px minmax(0,1fr) auto;
  grid-template-areas:"ic corps anneau" "crit crit crit" "tend tend tend";
  align-items:center; column-gap:12px; row-gap:8px; color:inherit;
}
.db-tile--tdb .ic{ grid-area:ic; align-self:start }
.db-tile__corps{ grid-area:corps; min-width:0 }
.db-tile--tdb .flag{ position:static; display:inline-block; margin-top:6px }
.db-tile__anneau{ grid-area:anneau; display:block; line-height:0 }
.db-tile__crit{ grid-area:crit; display:flex; gap:10px; flex-wrap:wrap; font-size:11px; color:var(--ink-3) }
.db-tile__crit > span{ display:inline-flex; align-items:center; gap:4px }
.db-tile__crit b{ color:var(--ink-2); font-variant-numeric:tabular-nums }
.db-tile__tend{
  grid-area:tend; display:flex; align-items:flex-end; justify-content:space-between; gap:8px;
  border-top:1px dashed var(--line); padding-top:8px; min-height:38px;
}
.db-tile__tend .t{ font-size:10.5px; color:var(--ink-4); text-align:right; line-height:1.3 }

/* Chiffres de la section Sécurité */
.tdb-chiffres{ display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px }
.tdb-chiffre{
  display:flex; flex-direction:column; gap:4px; padding:14px 16px; color:inherit;
  background:var(--surface); border:1px solid var(--line); border-radius:14px;
}
a.tdb-chiffre:hover{ box-shadow:var(--sh-3); border-color:var(--line-survol) }
.tdb-chiffre .v{ font-size:26px; font-weight:720; letter-spacing:-.02em; line-height:1.05; font-variant-numeric:tabular-nums }
.tdb-chiffre .l{ font-size:12px; color:var(--ink-2); font-weight:600 }
.tdb-chiffre .s{ font-size:11px; color:var(--ink-4) }
.tdb-chiffre--rapport{ grid-column:span 2; justify-content:center }
.tdb-chiffre--rapport .badge{ align-self:flex-start }
.tdb-jauge{ display:flex; align-items:center; gap:8px; min-width:140px }
.tdb-jauge .bar{ flex:1 }
.tdb-niveau{ min-width:64px; justify-content:center }
.act-av--ic{ background:var(--surface-2); color:var(--ink-3) }
.act-av--ic svg{ width:14px; height:14px }
a.act-row--lien{ color:inherit }

/* Graphiques */
.tdb-graphe .card__b{ padding-top:6px }
/* Le style général fait de tout <svg> une icône de 18 px à trait noir : pas ici. */
svg.g, svg.g-etincelle, svg.g-anneau{ fill:none; stroke:none; stroke-width:0 }
svg.g{ display:block; width:100%; height:auto; overflow:visible }
.g-grille{ stroke:var(--line-2); stroke-width:1 }
.g-base{ stroke:var(--line); stroke-width:1 }
.g-axe{ fill:var(--ink-4); font-size:10.5px; font-variant-numeric:tabular-nums }
.g-axe--l{ fill:var(--ink-3); font-size:11.5px }
.g-valeur{ fill:var(--ink-2); font-size:11px; font-weight:650; font-variant-numeric:tabular-nums }
.g-ligne{ fill:none; stroke:var(--g); stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
.g-aire{ fill:var(--g); opacity:.12; stroke:none }
.g-point{ fill:var(--g); stroke:var(--surface); stroke-width:2 }
.g-barre{ fill:var(--g) }
.g-zone{ fill:transparent; cursor:crosshair }
.g-repere{ stroke:var(--ink-4); stroke-width:1; stroke-dasharray:3 3; pointer-events:none }
.g-cible{ stroke:var(--ink-3); stroke-width:1.2; stroke-dasharray:5 4 }
.g-cible-t{ fill:var(--ink-3); font-size:10.5px; font-weight:650 }
.g-anneau-fond{ fill:none; stroke:var(--line-2); stroke-width:9 }
.g-arc{ fill:none; stroke:var(--g); stroke-width:9 }
.g-anneau-t{ fill:var(--ink); font-size:14px; font-weight:720 }
.g-etincelle{ display:block; overflow:visible }
.g-legende{ display:flex; gap:12px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-3) }
.g-legende > span{ display:inline-flex; align-items:center; gap:6px }
.g-pastille{ display:inline-block; width:9px; height:9px; border-radius:3px; background:var(--g); flex:none }
.g-s0{ --g:var(--serie-0) } .g-s1{ --g:var(--serie-1) } .g-s2{ --g:var(--serie-2) }
.g-s3{ --g:var(--serie-3) } .g-s4{ --g:var(--serie-4) }
.g-p1{ --g:var(--crit-p1) } .g-p2{ --g:var(--crit-p2) } .g-p3{ --g:var(--crit-p3) } .g-p4{ --g:var(--crit-p4) }
.g-chiffres{ margin-top:8px; font-size:12px }
.g-chiffres > summary{ cursor:pointer; color:var(--ink-3); font-size:11.5px; width:max-content }
.g-chiffres > summary:hover{ color:var(--brand-700) }
.g-chiffres .tablewrap{ max-height:240px; overflow:auto; margin-top:6px }
.meterrow[data-tip]{ cursor:default }
.g-bulle{
  position:fixed; z-index:400; pointer-events:none; max-width:260px;
  background:var(--bulle-fond); color:var(--bulle-texte); border-radius:8px; padding:7px 10px;
  font-size:11.5px; line-height:1.45; box-shadow:var(--sh-3); font-variant-numeric:tabular-nums;
}
.g-bulle b{ display:block; font-weight:700; margin-bottom:2px }

@media (max-width:1180px){
  .tdb-grille{ grid-template-columns:1fr }
}
@media (max-width:640px){
  .db-strip--tdb{ grid-template-columns:1fr }
  .tdb-chiffre--rapport{ grid-column:auto }
  .tdb-sec__aide{ display:none }
}
@media (prefers-reduced-motion:reduce){
  .tdb-sec__chev{ transition:none }
}

/* ── Le bouton clair / sombre (16/11/2026) ── */
.topbar__theme{ display:contents }
.theme-lune{ display:var(--aff-lune) }
.theme-soleil{ display:var(--aff-soleil) }
.theme-lune svg, .theme-soleil svg{ width:18px; height:18px }
/* La carte réelle en mode sombre : les tuiles du fond sont inversées, les
   tracés et marqueurs (posés au-dessus) gardent leurs couleurs. */
:root[data-theme="sombre"] .leaflet-tile-pane{ filter:invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) }
@media (prefers-color-scheme: dark){
  :root[data-theme="appareil"] .leaflet-tile-pane{ filter:invert(1) hue-rotate(180deg) brightness(.92) contrast(.9) }
}
/* Les contrôles et bulles de Leaflet suivent les jetons (blancs en clair,
   comme avant ; de la surface de nuit en sombre). La feuille de Leaflet se
   charge après celle-ci : le préfixe `html` donne à ces règles le poids
   qu'il faut, sans toucher à la feuille de la bibliothèque. */
html .leaflet-container{ background:var(--carte-fond) }
html .leaflet-bar a, html .leaflet-bar a:hover{ background:var(--surface); color:var(--ink); border-bottom-color:var(--line) }
html .leaflet-popup-content-wrapper, html .leaflet-popup-tip{ background:var(--surface); color:var(--ink) }
html .leaflet-control-layers{ background:var(--surface); color:var(--ink) }
html .leaflet-container .leaflet-control-attribution{ background:var(--verre-2); color:var(--ink-3) }
html .leaflet-container .leaflet-control-attribution a{ color:var(--lien) }

/* ═══════════════════════════════════════════════════════════════
   TABLEAU DE BORD VIVANT (16/11/2026) : le réseau aujourd'hui, les
   délais qui courent, la frise des incidents, le préventif en grille.
   ═══════════════════════════════════════════════════════════════ */
.tdb-apercu{ display:grid; grid-template-columns:minmax(0,5fr) minmax(0,7fr); gap:16px }
.tdb-heros{
  position:relative; display:flex; flex-direction:column; gap:8px; padding:24px 26px; border-radius:18px;
  background:linear-gradient(135deg, var(--brand-600) 0%, var(--brand) 100%); color:var(--texte-sur-marque);
  overflow:hidden; box-shadow:var(--sh-3); min-height:210px;
}
.tdb-heros::after{
  content:""; position:absolute; right:-60px; top:-60px; width:220px; height:220px; border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); pointer-events:none;
}
.tdb-heros:hover{ color:var(--texte-sur-marque); text-decoration:none; box-shadow:var(--sh-4) }
.tdb-heros__l{ font-size:12.5px; font-weight:650; letter-spacing:.02em; opacity:.92 }
.tdb-heros__v{ font-size:44px; font-weight:760; letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums }
.tdb-heros__v small{ font-size:22px; font-weight:650; opacity:.85 }
.tdb-heros__s{ font-size:12px; opacity:.85; max-width:42ch }
.tdb-heros__etat{
  display:inline-flex; align-items:center; gap:6px; align-self:flex-start; font-size:11.5px; font-weight:700;
  background:rgba(255,255,255,.18); padding:3px 10px; border-radius:99px;
}
.tdb-heros__etat svg{ width:13px; height:13px; stroke:currentColor }
.tdb-heros__faits{ display:flex; gap:16px; flex-wrap:wrap; margin-top:auto; font-size:12px; opacity:.92 }
.tdb-heros__faits b{ font-size:15px; font-variant-numeric:tabular-nums }
.tdb-compar{ background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:18px 20px; display:flex; flex-direction:column; gap:12px }
.tdb-compar__t{ font-size:12.5px; font-weight:650; color:var(--ink-3) }
.tdb-compar__g{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; flex:1 }
.tdb-delta{ display:flex; flex-direction:column; gap:3px; padding:12px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface) }
.tdb-delta__v{ font-size:20px; font-weight:720; letter-spacing:-.01em; font-variant-numeric:tabular-nums; color:var(--ink) }
.tdb-delta__fl{ margin-right:3px }
.tdb-delta__n{ font-size:12.5px; color:var(--ink-2) }
.tdb-delta__p{ font-size:10.5px; color:var(--ink-4) }
.tdb-delta--mieux{ border-color:var(--green-200) } .tdb-delta--mieux .tdb-delta__v, .tdb-delta--mieux .tdb-delta__lu{ color:var(--green-700) }
.tdb-delta--pire{ border-color:var(--red-200) }   .tdb-delta--pire .tdb-delta__v, .tdb-delta--pire .tdb-delta__lu{ color:var(--red-700) }

/* Bandeau quand tout va bien : il se lit d'un coup d'œil, comme une alerte. */
.tdb-calme{
  display:flex; gap:10px; align-items:flex-start; padding:13px 16px; border-radius:12px; font-size:13px;
  background:var(--green-50); border:1px solid var(--green-200); color:var(--green-700);
}
.tdb-calme b{ color:inherit }
.tdb-calme svg{ width:18px; height:18px; flex:none; stroke:currentColor }
.tdb-calme--neutre{ background:var(--surface-2); border-color:var(--line); color:var(--ink-3) }

.tdb-pastilles{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px }
.tdb-pastilles .badge svg{ width:12px; height:12px; stroke:currentColor; margin-right:3px }
.tdb-chronos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px }
.tdb-chrono{
  display:flex; flex-direction:column; gap:6px; padding:13px 14px; color:inherit;
  background:var(--surface); border:1px solid var(--line); border-radius:14px; min-width:0;
}
.tdb-chrono:hover{ box-shadow:var(--sh-3); border-color:var(--line-survol); text-decoration:none; color:inherit }
.tdb-chrono__h{ display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; color:var(--brand-700) }
.tdb-chrono__t{ font-size:13px; font-weight:620; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.tdb-chrono__p{ font-size:11px; color:var(--ink-3) }
.tdb-chrono__barre{ height:6px; border-radius:99px; background:var(--line-2); overflow:hidden }
.tdb-chrono__barre i{ display:block; height:100%; border-radius:99px; transition:width .6s ease }
.tdb-chrono--vert .tdb-chrono__barre i{ background:var(--green) }
.tdb-chrono--ambre .tdb-chrono__barre i{ background:var(--amber) }
.tdb-chrono--rouge .tdb-chrono__barre i{ background:var(--red) }
.tdb-chrono--rouge{ border-color:var(--red-200) }
.tdb-chrono__b{ display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap }
.tdb-chrono__reste{ font-size:11.5px; font-weight:650; color:var(--ink-2); font-variant-numeric:tabular-nums }
.tdb-cache{ display:none }
.tdb-plus{ margin:12px auto 0; display:flex }

/* La frise : 90 cases par ligne. */
.tdb-frise{ display:grid; grid-template-columns:minmax(120px,190px) minmax(0,1fr); gap:5px 12px; align-items:center }
.tdb-frise__l{ font-size:12px; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.tdb-frise__l b{ color:var(--ink-4); font-weight:650; margin-left:4px; font-variant-numeric:tabular-nums }
.tdb-frise__mois, .tdb-frise__cases{ display:grid; grid-template-columns:repeat(90,minmax(0,1fr)); gap:2px }
.tdb-frise__mois span{ font-size:10px; color:var(--ink-4); white-space:nowrap; overflow:visible }
.tdb-frise__cases i{ display:block; height:16px; border-radius:2px; background:var(--line-2) }
.tdb-frise__cases i[class]{ background:var(--g) }
.tdb-frise__cases i[data-tip]{ cursor:default }

/* Le préventif du mois en grille. */
.tdb-grillep__l{ display:flex; gap:14px; flex-wrap:wrap; padding:12px 20px 0; font-size:11.5px; color:var(--ink-3) }
.tdb-grillep__l > span{ display:inline-flex; align-items:center; gap:5px }
.tdb-grillep{ overflow-x:auto; padding:10px 20px 18px }
.tdb-grillep table{ border-collapse:separate; border-spacing:0; width:100%; font-size:11px }
.tdb-grillep th, .tdb-grillep td{ padding:4px 2px; text-align:center; border-bottom:1px solid var(--line-2); min-width:24px }
.tdb-grillep thead th{ color:var(--ink-4); font-weight:650; font-variant-numeric:tabular-nums }
.tdb-grillep .tdb-grillep__plan{
  position:sticky; left:0; z-index:1; background:var(--surface); text-align:left; min-width:190px; max-width:240px;
  padding-right:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:500;
}
.tdb-grillep__plan a{ color:var(--ink-2) } .tdb-grillep__plan a span{ color:var(--ink-3) }
.tdb-grillep .is-auj{ background:var(--brand-50) }
.tdb-grillep thead .is-auj{ color:var(--brand-700) }
.tdb-v{
  display:inline-grid; place-items:center; width:20px; height:20px; border-radius:50%; font-size:11px;
  font-weight:700; border:1px solid transparent;
}

@media (max-width:1180px){
  .tdb-apercu{ grid-template-columns:1fr }
}
@media (max-width:640px){
  .tdb-compar__g{ grid-template-columns:1fr }
  .tdb-heros__v{ font-size:36px }
  .tdb-frise{ grid-template-columns:1fr }
}

/* Le graphique principal : courbe ou barres, mois par mois. */
.tdb-outils{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; justify-content:flex-end }
.tdb-outils .seg button{ display:inline-flex; align-items:center; padding:5px 9px; border:0; background:none; cursor:pointer; color:var(--ink-3); border-radius:7px }
.tdb-outils .seg button.is-on{ background:var(--surface); color:var(--ink); box-shadow:var(--sh-1) }
.tdb-outils .seg svg{ width:15px; height:15px }
.tdb-mois{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--ink) }
.tdb-mois b{ min-width:120px; text-align:center; font-weight:650 }
.tdb-mois .iconbtn{ font-size:18px; line-height:1; width:30px; height:30px; display:inline-grid; place-items:center; color:var(--ink-2) }
.tdb-mois .is-off{ opacity:.3; cursor:default }
.tdb-vue{ display:none }
[data-vue="courbe"] .tdb-vue--courbe, [data-vue="barres"] .tdb-vue--barres{ display:block }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }

/* Meilleur, et à aider. */
.tdb-podium{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; margin-bottom:16px }
.tdb-podium__c{
  display:flex; flex-direction:column; gap:4px; padding:16px 18px; border-radius:16px; color:inherit;
  background:var(--surface); border:1px solid var(--line);
}
.tdb-podium__c:hover{ box-shadow:var(--sh-3); text-decoration:none; color:inherit }
.tdb-podium__k{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:750; letter-spacing:.06em; text-transform:uppercase }
.tdb-podium__k svg{ width:14px; height:14px; stroke:currentColor }
.tdb-podium__c--haut .tdb-podium__k{ color:var(--green-700) }
.tdb-podium__c--bas .tdb-podium__k{ color:var(--red-700) }
.tdb-podium__c b{ font-size:16px; color:var(--ink) }
.tdb-podium__v{ font-size:13px; color:var(--ink-2); font-weight:600 }
.tdb-podium__s{ font-size:11.5px; color:var(--ink-4) }
.tdb-metier{ font-size:10px; padding:1px 7px; vertical-align:1px }

/* Un canal d'émission : son nom et son état sur une ligne (16/11/2026). */
.canal-l{ display:flex; flex-wrap:wrap; align-items:center; gap:6px }
