/* Control Tower Afrique — charte AGL (clair par défaut, sombre « tour de contrôle »). Toute couleur lit var(--…). */
:root, :root[data-theme="light"] {
  --agl-marine: #0a2240; --agl-bleu: #14467c; --agl-bleu-vif: #1f5fa8; --agl-or: #d4af37;
  --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: #e5f3e5; --warn-bg: #fbf1dc; --bad-bg: #fbe5e7;
  --client: #e8641e;
  --shadow: 0 1px 2px #0a22400f, 0 4px 14px #0a22400a; --radius: 10px;
  --font: Arial, Helvetica, sans-serif; color-scheme: light;
  --side: 232px;
}
:root[data-theme="dark"] {
  --bg: #091521; --panel: #102030; --panel2: #0c1a28; --line: #233344; --chip: #18333d; --hl: #132c3b;
  --ink: #e3ecf3; --mut: #8da1b4; --acc: #65d9c5; --acc-ink: #092820; --btn: #65d9c5; --btn-ink: #092820;
  --th: #0c1a28; --th-ink: #95adbf; --ok: #3fbf6b; --warn: #fab219; --bad: #ff5a6e; --info: #3987e5;
  --ok-bg: #12301f; --warn-bg: #33290c; --bad-bg: #3a1620; --marque: var(--agl-or);
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.5 var(--font); }
a { color: var(--acc); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

svg.ico { width: 17px; height: 17px; flex: none; vertical-align: -3px; }
.icone-btn svg.ico { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- en-tête : AGL petit, client en grand */
.entete { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 14px; height: 74px; padding: 0 18px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
:root[data-theme="dark"] .entete { background: rgba(9,21,33,.88); }
.entete .burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; padding: 4px 6px; }
.entete .logo-client { height: 52px; width: auto; }
.entete .sep { width: 1px; height: 40px; background: var(--line); }
.entete .titre-app { display: flex; flex-direction: column; line-height: 1.15; }
.entete .titre-app b { font-size: 15px; letter-spacing: .5px; text-transform: uppercase; color: var(--ink); }
.entete .titre-app span { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mut); }
.entete .droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.entete .par-agl { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--mut); }
.entete .logo-agl { height: 24px; width: auto; }
.entete .moi { display: flex; flex-direction: column; text-align: right; font-size: 11px; line-height: 1.2; }
.entete .moi b { font-size: 12px; }
.icone-btn { background: var(--chip); border: 1px solid var(--line); border-radius: 8px; height: 32px; min-width: 32px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }

/* ---------------------------------------------------------------- disposition */
.coque { display: grid; grid-template-columns: var(--side) 1fr; min-height: calc(100vh - 74px); }
.menu { background: var(--agl-marine); color: #fff; padding: 14px 10px; position: sticky; top: 74px; height: calc(100vh - 74px); overflow: auto; }
.menu .groupe { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; opacity: .75; margin: 14px 10px 6px; }
.menu a { display: flex; gap: 10px; align-items: center; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.menu a:hover { background: #ffffff14; text-decoration: none; }
.menu a.actif { background: #ffffff22; box-shadow: inset 3px 0 0 #fff; font-weight: 700; }
:root[data-theme="dark"] .menu { background: #0b1b2a; border-right: 1px solid var(--line); }
:root[data-theme="dark"] .menu a.actif { box-shadow: inset 3px 0 0 var(--agl-or); }
.menu .pastille { margin-left: auto; background: #ff5a6e; color: #fff; border-radius: 10px; font-size: 10px; padding: 0 6px; font-weight: 700; }
.menu svg { width: 17px; height: 17px; flex: none; }
main { padding: 18px 22px 40px; min-width: 0; }

/* ---------------------------------------------------------------- titres */
.surtitre { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--mut); }
.tete { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.tete h1 { font-size: 22px; }
.tete h1 em { font-style: normal; color: var(--acc); }
.tete .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.liser { display: block; width: 44px; height: 5px; background: var(--acc); transform: skew(-25deg); margin: 8px 0 0; }
.fil { font-size: 12px; margin-bottom: 6px; } .fil a { color: var(--ink); }

/* ---------------------------------------------------------------- cartes, KPI */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 14px; min-width: 0; }
.card > h2 { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card > h2 .droite { margin-left: auto; font-weight: 400; font-size: 12px; display: flex; gap: 8px; }
.grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grille-2 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer; position: relative; overflow: hidden; transition: transform .15s; }
.kpi:hover { transform: translateY(-2px); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acc); }
.kpi.bad::before { background: var(--bad); } .kpi.warn::before { background: var(--warn); } .kpi.ok::before { background: var(--ok); }
.kpi .lib { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--mut); font-weight: 700; }
.kpi .val { font-size: 26px; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi .sous { font-size: 11px; color: var(--mut); }
.kpi.bad .val { color: var(--bad); } .kpi.warn .val { color: var(--warn); } .kpi.ok .val { color: var(--ok); }

/* ---------------------------------------------------------------- tableaux */
.tableau-env { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t 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 9px; white-space: nowrap; position: sticky; top: 0; }
table.t th.num, table.t td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t td { padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr.clic { cursor: pointer; } table.t tr.clic:hover td { background: var(--hl); }
table.t th.tri { cursor: pointer; } table.t th.tri:after { content: " ↕"; opacity: .5; }
.vide { padding: 22px; text-align: center; color: var(--mut); }

/* ---------------------------------------------------------------- filtres, formulaires */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filtres input[type=search] { min-width: 220px; flex: 1; }
input, select, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; max-width: 100%; }
textarea { min-height: 70px; width: 100%; }
label.ch { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
label.ch input, label.ch select, label.ch textarea { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; }
.form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form .large { grid-column: 1 / -1; }
.btn { background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); border-radius: 8px; padding: 7px 14px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.btn.sec { background: transparent; color: var(--acc); border-color: var(--acc); }
.btn.mini { padding: 3px 9px; font-size: 12px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { background: var(--chip); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.puce.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 700; }

/* ---------------------------------------------------------------- badges, bandeaux */
.badge { display: inline-block; border: 1.5px solid currentColor; border-radius: 12px; padding: 0 8px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-critical { color: var(--bad); background: var(--bad-bg); } .b-alert { color: var(--warn); background: var(--warn-bg); }
.b-watch { color: var(--info); } .b-ok { color: var(--ok); background: var(--ok-bg); }
.bandeau { border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bandeau.b-ok { border-color: var(--ok); } .bandeau.b-warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn); } .bandeau.b-bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad); }
.statut { font-weight: 700; } .s-livree, .s-cloturee { color: var(--ok); }
details.pli { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
details.pli > summary { cursor: pointer; padding: 11px 16px; font-weight: 700; list-style: none; display: flex; gap: 8px; align-items: center; }
details.pli > summary::after { content: "▸"; margin-left: auto; transition: transform .2s; } details.pli[open] > summary::after { transform: rotate(90deg); }
details.pli > div { padding: 0 16px 14px; }

/* ---------------------------------------------------------------- frise d'étapes */
.frise { display: flex; gap: 0; overflow-x: auto; padding: 6px 2px 4px; }
.etape { flex: 1 0 98px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; padding: 0 4px; opacity: 0; animation: monte .35s forwards; }
.etape::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.etape:first-child::before { display: none; }
.etape.fait::before { background: var(--acc); }
.etape .pt { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); display: flex; align-items: center; justify-content: center; z-index: 1; color: var(--mut); }
.etape.fait .pt { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.etape.prevu .pt { border-style: dashed; border-color: var(--acc); color: var(--acc); }
.etape.div .pt { box-shadow: 0 0 0 3px var(--warn); }
.etape .pt svg { width: 17px; height: 17px; }
.etape .l { font-size: 11px; margin-top: 4px; line-height: 1.2; }
.etape .d { font-weight: 700; font-size: 12px; }
.etape .s { font-size: 10px; color: var(--mut); }
@keyframes monte { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- jauges, barres */
.jauge { width: 70px; height: 7px; background: var(--chip); border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; }
.jauge i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .9s; }
.jauge i.m { background: var(--warn); } .jauge i.f { background: var(--bad); }
.barres .b { display: grid; grid-template-columns: 130px 1fr 80px; gap: 8px; align-items: center; margin: 5px 0; font-size: 12px; }
.barres .b .r { background: var(--chip); height: 14px; border-radius: 4px; overflow: hidden; }
.barres .b .r i { display: block; height: 100%; background: var(--acc); width: 0; transition: width .9s; }

/* ---------------------------------------------------------------- cartes géographiques */
.carte { height: 460px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); z-index: 1; }
.carte.haute { height: 560px; }
.leaflet-container { font: 12px var(--font); background: var(--panel2); }
.mk { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px #0006; }
.mk-usine { width: 30px; height: 30px; border-radius: 8px; background: var(--client); color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px #0007; }
.mk-usine svg { width: 17px; height: 17px; }
.mk-port { width: 24px; height: 24px; border-radius: 50%; background: var(--agl-marine); color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 6px #0007; }
.mk-port svg { width: 13px; height: 13px; }
.mk-pays { background: var(--agl-marine); color: #fff; border-radius: 14px; padding: 3px 9px; font-weight: 700; font-size: 12px; white-space: nowrap; border: 2px solid #fff; box-shadow: 0 2px 6px #0006; }
.mk-pays.crit { background: #a3121f; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; margin-top: 8px; }
.legende span { display: inline-flex; gap: 5px; align-items: center; }
.legende i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ---------------------------------------------------------------- fenêtres, notifications */
.voile { position: fixed; inset: 0; background: #0a224066; z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow: auto; }
.fenetre { background: var(--panel); border-radius: 12px; width: min(760px, 100%); box-shadow: 0 20px 60px #0005; border: 1px solid var(--line); }
.fenetre .ft { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.fenetre .ft h3 { font-size: 16px; } .fenetre .ft button { margin-left: auto; }
.fenetre .fc { padding: 16px 18px; } .fenetre .fp { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 3000; background: var(--agl-marine); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px #0005; max-width: 380px; animation: monte .2s; }
.toast.err { background: #a3121f; }

/* ---------------------------------------------------------------- pages publiques */
.public { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.public .visuel { background: linear-gradient(160deg, #0a2240f0, #14467ccc), url(img/fond.jpg) center/cover; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.public .visuel .logo-client { height: 90px; width: auto; background: #fff; border-radius: 12px; padding: 10px 16px; align-self: flex-start; }
.public .visuel h1 { color: #fff; font-size: 38px; line-height: 1.1; margin: 22px 0 10px; text-transform: uppercase; }
.public .visuel h1 em { font-style: normal; color: #ff8a3d; }
.public .visuel p { max-width: 460px; font-size: 15px; opacity: .95; }
.public .visuel .piliers { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.public .visuel .par { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }
.public .visuel .par img { height: 30px; }
.public .formulaire { display: flex; align-items: center; justify-content: center; padding: 30px 18px; }
.public .boite { width: min(430px, 100%); }
.public .boite h2 { font-size: 22px; margin-bottom: 4px; }
.public .boite .form { grid-template-columns: 1fr; }
.public .boite .btn { width: 100%; justify-content: center; padding: 10px; }
.public .liens { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12.5px; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- divers */
.muet { color: var(--mut); } .petit { font-size: 11.5px; } .gras { font-weight: 700; }
.ligne { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.colonnes { columns: 2 320px; }
.raci td.c { text-align: center; font-weight: 700; }
.raci td.A { color: var(--acc); } .raci td.R { color: var(--ok); }
.pile > * + * { margin-top: 8px; }
.fil-suivi { border-left: 3px solid var(--line); padding-left: 12px; }
.fil-suivi > div { margin-bottom: 10px; }
.flux-article { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.flux-article h4 { margin: 0 0 3px; font-size: 13.5px; }
.depart-tableau { background: #0a2240; color: #ffd76a; font-family: "Courier New", monospace; border-radius: 10px; padding: 12px; }
.chargement { padding: 30px; text-align: center; color: var(--mut); }
.cacher { display: none !important; }

@media (max-width: 980px) {
  .grille-2 { grid-template-columns: 1fr; }
  .public { grid-template-columns: 1fr; } .public .visuel { padding: 26px 18px; } .public .visuel h1 { font-size: 26px; }
}
@media (max-width: 820px) {
  .coque { grid-template-columns: 1fr; }
  .menu { position: fixed; left: 0; top: 74px; z-index: 950; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .menu.ouvert { transform: none; }
  .entete .burger { display: block; }
  .entete .titre-app, .entete .par-agl span, .entete .moi, .entete .sep { display: none; }
  .entete .logo-client { height: 40px; }
  main { padding: 14px 16px 30px; }
  .btn { white-space: normal; max-width: 100%; text-align: left; }
  .carte, .carte.haute { height: 360px; }
  .barres .b { grid-template-columns: 90px 1fr 60px; }
}

/* ================================================================ analytique sobre (v2) */
.card > h2 > svg.ico, .tete h1 svg.ico { display: none; }
.kpi::before { width: 3px; background: var(--line); }
.kpi.bad::before { background: var(--bad); } .kpi.warn::before { background: var(--warn); } .kpi.ok::before { background: var(--line); }
.tete-sobre { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.tete-sobre h1 { font-size: 20px; font-weight: 700; margin-top: 2px; }
.fb { flex: 1 1 520px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.barre-filtres { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.barre-filtres select, .barre-filtres input { padding: 6px 8px; font-size: 12.5px; }
.barre-filtres input[type=search] { width: 190px; }
.barre-filtres .periode { font-weight: 700; }
.puces.actifs { justify-content: flex-end; } .puces.actifs .puce { font-size: 11.5px; }
.panneau { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0 16px 14px; margin-bottom: 14px; min-width: 0; }
.bandeau-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-bottom: 1px solid var(--line); margin: 0 -16px; }
.tuile { background: none; border: 0; border-right: 1px solid var(--line); text-align: left; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.tuile:last-child { border-right: 0; }
.tuile .lib { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
.tuile .val { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tuile.on { background: var(--hl); box-shadow: inset 0 -3px 0 var(--acc); }
.tuile:hover { background: var(--panel2); }
.delta { font-size: 11.5px; font-weight: 700; color: var(--mut); } .delta.mieux { color: var(--ok); } .delta.moins { color: var(--bad); }
.graphe { position: relative; padding-top: 12px; min-height: 260px; }
.courbe { width: 100%; height: 260px; display: block; }
.courbe .grille { stroke: var(--line); stroke-width: 1; }
.courbe .axe { font-size: 10.5px; fill: var(--mut); }
.courbe .aire { fill: var(--acc); opacity: .08; }
.courbe .trait { fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 1s ease-out forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
.courbe .curseur { stroke: var(--mut); stroke-dasharray: 3 3; } .courbe .point { fill: var(--acc); stroke: var(--panel); stroke-width: 2; }
.bulle { position: absolute; background: var(--agl-marine); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; z-index: 5; }
.onglets { display: flex; gap: 2px; align-items: center; border-bottom: 1px solid var(--line); margin: 0 -16px 10px; padding: 0 16px; flex-wrap: wrap; }
.onglets button { background: none; border: 0; padding: 12px 8px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets button.on { color: var(--ink); border-bottom-color: var(--acc); }
.onglets .droite { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.onglets .droite button { padding: 6px 8px; }
.lien { background: none; border: 0; color: var(--acc); cursor: pointer; font-size: 12px; font-weight: 700; padding: 0; }
.grille-2b { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.entete-venti { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--mut); padding: 0 0 6px; }
.venti { display: flex; flex-direction: column; gap: 3px; }
.vrow { position: relative; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; padding: 7px 8px; cursor: pointer; text-align: left; font-size: 13px; border-radius: 4px; overflow: hidden; }
.vrow:disabled { cursor: default; } .vrow:not(:disabled):hover .vlib { text-decoration: underline; }
.vbar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hl); border-radius: 4px; transition: width .7s ease-out; z-index: 0; }
.vlib, .vval { position: relative; z-index: 1; } .vval { font-weight: 700; font-variant-numeric: tabular-nums; }
.onglets-pays { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.onglets-pays button { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 6px 12px; cursor: pointer; white-space: nowrap; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.onglets-pays button.on { background: var(--agl-marine); color: #fff; border-color: var(--agl-marine); }
:root[data-theme="dark"] .onglets-pays button.on { background: var(--acc); color: var(--acc-ink); }
.compte { font-weight: 700; opacity: .8; font-size: 11px; }
.pastille-exc { background: var(--bad); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10.5px; font-weight: 700; }
.rouge { color: var(--bad); }
table.t.sobre td { border-bottom: 1px solid var(--line); }
#t table.t td { white-space: nowrap; padding: 6px 8px; }
#t table.t td .petit.muet { display: inline; margin-left: 6px; }
@media (max-width: 820px) { .fb { align-items: stretch; } .barre-filtres { justify-content: flex-start; } .barre-filtres input[type=search] { width: 100%; } .grille-2b { grid-template-columns: 1fr; } .tuile .val { font-size: 18px; } }


/* ================================================================ visualisations (v3) */
.grille-3 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.drapeau { vertical-align: -2px; border-radius: 2px; flex: none; }
.constats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.constats li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); opacity: 0; animation: monte .4s forwards; font-size: 13px; }
.constats li a { margin-left: auto; font-weight: 700; font-size: 12px; white-space: nowrap; }
.c-pt { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--info); }
.c-ok .c-pt { background: var(--ok); } .c-alert .c-pt { background: var(--warn); } .c-critical .c-pt { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.entonnoir { display: flex; flex-direction: column; gap: 5px; }
.etage { display: grid; grid-template-columns: 112px 1fr 92px; gap: 8px; align-items: center; background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: left; font-size: 12.5px; opacity: 0; animation: monte .35s forwards; }
.etage:hover .et-lib { text-decoration: underline; }
.et-barre { height: 16px; background: var(--chip); border-radius: 3px; overflow: hidden; display: flex; justify-content: center; }
.et-barre i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.et-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; } .et-n small { font-weight: 400; color: var(--mut); }
.anneau { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.anneau svg { width: 150px; height: 150px; flex: none; }
.anneau .part { transition: stroke-width .2s; cursor: pointer; } .anneau .part:hover { stroke-width: 23; }
.anneau-v { font-size: 22px; font-weight: 700; fill: var(--ink); } .anneau-l { font-size: 10px; fill: var(--mut); text-transform: uppercase; letter-spacing: 1px; }
.anneau-leg { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 120px; }
.anneau-leg button { display: flex; gap: 8px; align-items: center; background: none; border: 0; cursor: pointer; font-size: 12.5px; padding: 0; }
.anneau-leg i { width: 10px; height: 10px; border-radius: 3px; } .anneau-leg b { margin-left: auto; }
.histo-tete { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.histo-tete b { color: var(--ink); }
.histo { display: flex; gap: 8px; align-items: flex-end; height: 200px; }
.colonne { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; background: none; border: 0; cursor: pointer; padding: 0; }
.col-b { width: 100%; max-width: 54px; display: flex; transition: height .9s cubic-bezier(.2,.8,.2,1); }
.col-b i { flex: 1; border-radius: 4px 4px 0 0; opacity: .85; } .colonne:hover .col-b i { opacity: 1; }
.col-n { font-weight: 700; font-size: 12px; margin-bottom: 3px; } .col-l { font-size: 11px; color: var(--mut); margin-top: 4px; white-space: nowrap; }
.chaleur { display: grid; grid-template-columns: 48px repeat(12, minmax(28px, 1fr)); gap: 3px; font-size: 11px; overflow-x: auto; }
.ch-m { text-align: center; color: var(--mut); font-weight: 700; } .ch-a { font-weight: 700; display: flex; align-items: center; }
.ch-c { height: 30px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700;
  background: color-mix(in srgb, var(--acc) calc(var(--k) * 100%), var(--chip)); color: var(--ink); }
.ch-c.fort { color: var(--acc-ink); }
.mk3d-pays { display: flex; gap: 6px; align-items: center; background: rgba(10,34,64,.88); color: #fff; padding: 4px 9px; border-radius: 14px; font-size: 12px; cursor: pointer; border: 1.5px solid #fff8; box-shadow: 0 4px 14px #0008; white-space: nowrap; }
.mk3d-pays span { background: #65d9c5; color: #092820; border-radius: 9px; padding: 0 6px; font-weight: 700; }
.mk3d-pays.crit { border-color: #ff5a6e; } .mk3d-pays.crit span { background: #ff5a6e; color: #fff; }
.pulse { animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #e8641e88; } 70% { box-shadow: 0 0 0 14px #e8641e00; } 100% { box-shadow: 0 0 0 0 #e8641e00; } }
.route-anim { stroke-dasharray: 10 8; animation: flux 1.6s linear infinite; }
@keyframes flux { to { stroke-dashoffset: -36; } }
.maplibregl-popup-content { color: #000; font: 12px var(--font); }
.carte .maplibregl-canvas { border-radius: 8px; }


/* ================================================================ illustrations SVG */
.chaine { width: 100%; height: auto; display: block; max-height: 260px; }
.chaine .maillon { cursor: pointer; } .chaine .maillon:hover rect:first-child, .chaine .maillon:focus { filter: brightness(1.1); }
.chaine .maillon text { font-family: var(--font); }
.il-navire { animation: tangue 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tangue { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(4px) rotate(1deg); } }
.il-camion { animation: roule 6s ease-in-out infinite alternate; }
@keyframes roule { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
.il-charge { animation: charge 3.5s ease-in-out infinite; }
@keyframes charge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(38px); } }
.il-fumee { animation: fumee 3s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fumee { from { opacity: .9; transform: translateY(0) scale(.6); } to { opacity: 0; transform: translateY(-26px) scale(1.6); } }
.il-flux, .il-route { animation: flux 1.4s linear infinite; }
.il-vague { animation: vague 3s linear infinite; } @keyframes vague { to { transform: translateX(-60px); } }
.il-tampon { animation: tampon 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tampon { 0%,70%,100% { transform: translateY(0); } 80% { transform: translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .etape { opacity: 1; }
  .courbe .trait { stroke-dashoffset: 0; }
}
@media print { .entete, .menu, .actions, .filtres { display: none !important; } .coque { display: block; } }
