/* ==========================================================================
   Beffroi — feuille de style unique.

   Ardoise et bronze. Sobre, institutionnel, dense en information utile.
   Aucune fonte externe: les polices du système, elles sont déjà chargées et
   elles s'affichent même quand le réseau est à terre.

   Le thème sombre ne redéfinit QUE des variables. Si vous ajoutez une couleur
   en dur quelque part, elle sera fausse la nuit — et la nuit, c'est justement
   le moment où ce produit sert.
   ========================================================================== */

:root {
  --bg: #E9EDF1;
  --surface: #FFFFFF;
  --surface-2: #F3F6F9;
  --ink: #141E27;
  --ink-2: #4A5B69;
  --line: #D5DEE5;
  --accent: #A8621A;
  --ok: #1F6E4E;
  --warn: #9A6A00;
  --crit: #A8231C;

  /* Voiles: fonds teintés des mêmes couleurs, calculés une seule fois ici. */
  --voile-accent: rgba(168, 98, 26, .12);
  --voile-ok: rgba(31, 110, 78, .10);
  --voile-warn: rgba(154, 106, 0, .12);
  --voile-crit: rgba(168, 35, 28, .10);
  --voile-ink: rgba(20, 30, 39, .06);
  --ombre: 0 1px 2px rgba(20, 30, 39, .07), 0 1px 10px rgba(20, 30, 39, .04);
  --ombre-forte: 0 2px 6px rgba(20, 30, 39, .12);

  --rayon: 4px;
  --rayon-2: 7px;
  --pas: 14px;
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E151C;
    --surface: #16202A;
    --surface-2: #1C2833;
    --ink: #E6EDF3;
    --ink-2: #9BAEBE;
    --line: #27353F;
    --accent: #D28A44;
    --ok: #4CA982;
    --warn: #D3A438;
    --crit: #E2645C;

    --voile-accent: rgba(210, 138, 68, .16);
    --voile-ok: rgba(76, 169, 130, .14);
    --voile-warn: rgba(211, 164, 56, .15);
    --voile-crit: rgba(226, 100, 92, .15);
    --voile-ink: rgba(230, 237, 243, .06);
    --ombre: 0 1px 2px rgba(0, 0, 0, .35);
    --ombre-forte: 0 2px 8px rgba(0, 0, 0, .45);
  }
}

/* --------------------------------------------------------------- socle --- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--police);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
small { font-size: .82em; }
b, strong { font-weight: 650; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.chiffres, .chiffres * { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.saut {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border: 1px solid var(--line);
}
.saut:focus { left: 8px; top: 8px; }

/* -------------------------------------------------------------- entête --- */
.tete {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}

.tete-rangee {
  max-width: 1400px; margin: 0 auto;
  padding: 9px var(--pas);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}

.marque { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; }
.marque-icone { width: 26px; height: 26px; fill: var(--accent); flex: none; }
.marque-icone .marque-socle { fill: var(--ink); }
.marque-icone--grande { width: 46px; height: 46px; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.15; }
.marque-texte b { font-size: 16px; letter-spacing: -.01em; }
.marque-texte small { color: var(--ink-2); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }

.menu { display: flex; gap: 2px; margin-left: auto; }
.menu-lien {
  padding: 7px 12px; border-radius: var(--rayon);
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.menu-lien:hover { background: var(--surface-2); color: var(--ink); }
.menu-lien.est-actif { background: var(--voile-accent); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

.pastille {
  min-width: 20px; padding: 1px 6px; border-radius: 10px;
  background: var(--voile-ink); color: var(--ink);
  font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
}
.pastille--crit { background: var(--crit); color: #fff; }

.compte { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.compte-nom { font-weight: 600; }
.compte-role { color: var(--ink-2); }
.compte-sortie { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); }
.compte-sortie:hover { color: var(--crit); border-color: currentColor; }

/* ---------------------------------------------------------------- page --- */
.page { max-width: 1400px; width: 100%; margin: 0 auto; padding: var(--pas); flex: 1; }
.corps--nu .page { max-width: 640px; }

.pied {
  max-width: 1400px; width: 100%; margin: 0 auto;
  padding: 14px var(--pas) 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--ink-2); font-size: 12.5px; border-top: 1px solid var(--line);
}

.fil { color: var(--ink-2); font-size: 13px; margin-bottom: 10px; }
.fil a { color: var(--ink-2); }

/* --------------------------------------------------------- composants --- */
.carte, .bloc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--rayon-2);
  box-shadow: var(--ombre);
}

.bloc { padding: 14px 16px 16px; margin-bottom: 14px; }
.bloc--panneau { padding: 12px 14px 14px; }

.bloc-titre {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-2); font-weight: 700;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-bottom: 9px; margin-bottom: 11px; border-bottom: 1px solid var(--line);
}
.bloc-lien, .bloc-compte { margin-left: auto; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.bloc-compte { color: var(--ink-2); }

.chip {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent; white-space: nowrap;
}
.chip--crit { background: var(--crit); color: #fff; }
.chip--warn { background: var(--warn); color: #fff; }
.chip--info { background: var(--voile-accent); color: var(--accent); border-color: var(--accent); }
.chip--ok { background: var(--ok); color: #fff; }
.chip--etat { background: transparent; color: var(--ink-2); border-color: var(--line); }
.chip--ouvert { color: var(--crit); border-color: var(--crit); }
.chip--accuse { color: var(--ok); border-color: var(--ok); }
.chip--resolu, .chip--ferme { color: var(--ink-2); border-color: var(--line); }

.etiquette {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 9px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); white-space: nowrap;
}
.etiquette b { color: var(--ink); }
.etiquette--ok { background: var(--voile-ok); border-color: transparent; color: var(--ok); }
.etiquette--crit { background: var(--voile-crit); border-color: transparent; color: var(--crit); }
.etiquette--warn { background: var(--voile-warn); border-color: transparent; color: var(--warn); }
.etiquette--info { background: var(--voile-accent); border-color: transparent; color: var(--accent); }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; min-height: 42px;
  border: 1px solid var(--line); border-radius: var(--rayon);
  background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--surface-2); color: var(--ink); }
.bouton--plein { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton--plein:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.bouton--discret { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.bouton--accuse {
  background: var(--ok); border-color: var(--ok); color: #fff;
  width: 100%; min-height: 48px; font-size: 15.5px;
}
.bouton--accuse:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.bouton--geant {
  width: 100%; min-height: 88px; font-size: 21px; border-radius: var(--rayon-2);
  letter-spacing: .01em; box-shadow: var(--ombre-forte);
}
.bouton[disabled], .bouton.est-occupe { opacity: .6; cursor: progress; }

.champ { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.champ-titre { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.champ input, .champ select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--rayon);
  padding: 10px 11px; min-height: 42px; width: 100%;
}
.champ input:focus, .champ select:focus { border-color: var(--accent); outline-offset: 0; }
.champ--compact { margin-bottom: 0; min-width: 150px; flex: 1 1 160px; }

.avis { padding: 10px 12px; border-radius: var(--rayon); font-size: 14px; margin-bottom: 12px; }
.avis--crit { background: var(--voile-crit); color: var(--crit); border-left: 3px solid var(--crit); }

.vide { color: var(--ink-2); font-size: 14px; padding: 6px 0; }
.vide--large { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--rayon-2); padding: 34px 18px; text-align: center; }

.table-cadre { overflow-x: auto; margin: 0 -16px -16px; padding: 0 16px 16px; }
.table-cadre--court { max-height: 340px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-2); font-weight: 700; padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface);
}
.table td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .a-droite { text-align: right; padding-right: 0; }
.table .cellule-texte { max-width: 42ch; }
.table .est-inactif { opacity: .5; }

.fiches-donnees { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 13.5px; }
.fiches-donnees dt { color: var(--ink-2); }
.fiches-donnees dd { margin: 0; text-align: right; }
.fiches-donnees .est-bas { color: var(--crit); font-weight: 650; }

.panneau-note { color: var(--ink-2); font-size: 12.5px; margin-top: 10px; }

/* ------------------------------------------------------------ colonnes --- */
.colonnes { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 1040px) {
  .colonnes { grid-template-columns: minmax(0, 1fr) 320px; }
}

/* ------------------------------------------------------------- verdict --- */
.verdict {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--ink-2);
  border-radius: var(--rayon-2); box-shadow: var(--ombre);
  padding: 15px 18px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.verdict h1 { font-size: 25px; letter-spacing: -.02em; }
.verdict p { color: var(--ink-2); font-size: 13.5px; margin: 5px 0 0; }
.verdict--ok { border-left-color: var(--ok); }
.verdict--ok h1 { color: var(--ok); }
.verdict--info { border-left-color: var(--accent); }
.verdict--warn { border-left-color: var(--warn); background: var(--voile-warn); }
.verdict--warn h1 { color: var(--warn); }
.verdict--crit { border-left-color: var(--crit); background: var(--voile-crit); }
.verdict--crit h1 { color: var(--crit); }

.verdict-chiffres { display: flex; gap: 22px; }
.chiffre { text-align: right; }
.chiffre b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.chiffre span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }

/* ------------------------------------------------------------- alertes --- */
.alertes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.alerte {
  border: 1px solid var(--line); border-left: 4px solid var(--ink-2);
  border-radius: var(--rayon); background: var(--surface-2); padding: 12px 14px;
}
.alerte--crit { border-left-color: var(--crit); background: var(--voile-crit); }
.alerte--warn { border-left-color: var(--warn); background: var(--voile-warn); }
.alerte--info { border-left-color: var(--accent); background: var(--voile-accent); }
.alerte.est-accusee { background: var(--surface-2); opacity: .92; }

.alerte-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.alerte-quand { margin-left: auto; color: var(--ink-2); font-size: 12.5px; }
.alerte-titre { font-size: 17px; margin-bottom: 5px; }
.alerte-titre a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.alerte-titre a:hover { border-color: currentColor; }
.alerte-detail { font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px; }
.alerte-pied { display: flex; gap: 8px; flex-wrap: wrap; }
.alerte-action { margin-top: 11px; }
@media (min-width: 700px) { .bouton--accuse { width: auto; min-width: 240px; } }

/* -------------------------------------------------------------- grille --- */
.grille {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.tuile { border: 1px solid var(--line); border-radius: var(--rayon); background: var(--surface); overflow: hidden; }
.tuile-lien { display: block; padding: 10px 12px 8px; text-decoration: none; color: inherit; }
.tuile:hover { border-color: var(--ink-2); }
.tuile--alarme { border-color: var(--crit); box-shadow: inset 3px 0 0 var(--crit); }
.tuile--muet { box-shadow: inset 3px 0 0 var(--warn); }

.tuile-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tuile-code { font-family: var(--police-mono); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.tuile-etat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.tuile-etat--alarme { color: var(--crit); font-weight: 700; }
.tuile-etat--muet { color: var(--warn); font-weight: 700; }
.tuile-nom {
  font-size: 12.5px; color: var(--ink-2); margin: 2px 0 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tuile-valeur { display: flex; align-items: baseline; gap: 4px; }
.tuile-valeur b { font-size: 27px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.tuile-vide { color: var(--ink-2); }
.unite { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tuile-pied {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11.5px; color: var(--ink-2); margin-top: 2px;
}
.tuile-pile.est-basse { color: var(--crit); font-weight: 700; }

.apercu { display: block; width: 100%; height: 30px; margin: 5px 0 3px; }
.apercu--vide { height: 30px; margin: 5px 0 3px; }
.apercu-ligne { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-linejoin: round; }
.apercu-aire { fill: var(--voile-ink); stroke: none; }
.apercu-point { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.apercu--alarme .apercu-ligne { stroke: var(--crit); }
.apercu--alarme .apercu-point { stroke: var(--crit); }
.apercu--alarme .apercu-aire { fill: var(--voile-crit); }

/* -------------------------------------------------------------- garde --- */
.garde { list-style: none; margin: 0; padding: 0; counter-reset: rang; }
.garde-rang {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.garde-rang:last-child { border-bottom: 0; }
.garde-ordre {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--voile-accent); color: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.garde-qui { display: flex; flex-direction: column; min-width: 0; }
.garde-qui b { font-size: 13.5px; }
.garde-qui small { color: var(--ink-2); }
.garde-tel { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.liste-plate { list-style: none; margin: 0; padding: 0; }
.ligne-reseau {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 9px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.ligne-reseau:last-child { border-bottom: 0; }
.ligne-nom { display: flex; flex-direction: column; min-width: 0; }
.ligne-nom small { color: var(--ink-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-valeur { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.ligne-reseau.est-hs .ligne-valeur { color: var(--crit); }
.point-etat { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-2); }
.point-etat--ok { background: var(--ok); }
.point-etat--warn { background: var(--warn); }
.point-etat--crit { background: var(--crit); }
.point-etat--info { background: var(--accent); }

/* --------------------------------------------------------------- fiche --- */
.fiche {
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--ink-2);
  border-radius: var(--rayon-2); box-shadow: var(--ombre);
  padding: 15px 18px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap;
}
.fiche--alarme { border-left-color: var(--crit); }
.fiche--muet { border-left-color: var(--warn); }
.fiche--ok { border-left-color: var(--ok); }
.fiche-code { font-family: var(--police-mono); font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0; letter-spacing: .04em; }
.fiche-nom { font-size: 24px; letter-spacing: -.02em; }
.fiche-lieu { color: var(--ink-2); font-size: 13.5px; margin: 3px 0 0; }
.fiche-mesure { text-align: right; }
.fiche-valeur { font-size: 42px; font-weight: 650; letter-spacing: -.03em; line-height: 1; margin: 0; }
.fiche-valeur .unite { font-size: 16px; margin-left: 5px; }
.fiche-quand { color: var(--ink-2); font-size: 12.5px; margin: 5px 0 0; }
.fiche-etat { margin: 7px 0 0; }

/* -------------------------------------------------------------- graphe --- */
.onglets { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.onglet {
  padding: 4px 9px; border-radius: 3px; font-size: 12px; font-weight: 650;
  color: var(--ink-2); text-decoration: none; text-transform: none; letter-spacing: 0;
  border: 1px solid transparent;
}
.onglet:hover { background: var(--surface-2); color: var(--ink); }
.onglet.est-actif { background: var(--voile-accent); color: var(--accent); border-color: var(--accent); }

.graphe { margin: 0; }
.graphe-cadre { display: flex; align-items: stretch; }
.graphe-axe-y { position: relative; width: 52px; flex: none; }
.graphe-graduation {
  position: absolute; right: 8px; transform: translateY(-50%);
  font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.graphe-zone { position: relative; flex: 1; min-width: 0; }
.graphe-svg {
  display: block; width: 100%; height: 190px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--rayon);
}
@media (min-width: 900px) { .graphe-svg { height: 270px; } }

.graphe-grille { stroke: var(--line); stroke-width: 1; }
.graphe-aire { fill: var(--voile-accent); stroke: none; }
.graphe-ligne { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graphe-seuil { stroke-width: 1.5; stroke-dasharray: 7 5; }
.graphe-seuil--crit { stroke: var(--crit); }
.graphe-seuil--warn { stroke: var(--warn); }
.graphe-seuil--info { stroke: var(--accent); opacity: .7; }
/* Trait de longueur nulle + bout rond = un point parfaitement circulaire,
   même quand le SVG est étiré horizontalement. */
.graphe-dernier { stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.graphe-curseur { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }

.graphe-bulle {
  position: absolute; top: 8px; left: 0; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 4px 9px; border-radius: var(--rayon); font-size: 12px; white-space: nowrap;
  pointer-events: none; font-variant-numeric: tabular-nums; box-shadow: var(--ombre-forte);
}

.graphe-axe-x { position: relative; height: 17px; margin: 4px 0 0 52px; }
.graphe-repere {
  position: absolute; transform: translateX(-50%); top: 0;
  font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.graphe-repere:first-child { transform: none; }
.graphe-repere:last-child { transform: translateX(-100%); }

.graphe-legende {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 9px 0 0 52px; font-size: 12.5px; color: var(--ink-2);
}
.legende-item { display: inline-flex; align-items: center; gap: 6px; }
.legende-item b { color: var(--ink); }
.legende-item em { font-style: normal; opacity: .7; }
.trait { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--ink-2); }
.trait--courbe { border-color: var(--accent); }
.trait--seuil { border-top-style: dashed; }
.trait--crit { border-color: var(--crit); }
.trait--warn { border-color: var(--warn); }
.trait--info { border-color: var(--accent); }

/* ---------------------------------------------------------- événements --- */
.filtres { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.filtres .bouton { min-height: 42px; }

.fil-astreinte { list-style: none; margin: 0 0 14px; padding: 0; }

.entree {
  display: grid; grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--ink-2); border-radius: var(--rayon);
  margin-bottom: 8px;
}
.entree--crit { border-left-color: var(--crit); }
.entree--warn { border-left-color: var(--warn); }
.entree--info { border-left-color: var(--accent); }
.entree--resolu, .entree--ferme { opacity: .78; }

.entree-marge { display: flex; flex-direction: column; }
.entree-heure { font-size: 16px; font-weight: 650; line-height: 1.1; }
.entree-jour { font-size: 11.5px; color: var(--ink-2); }

.entree-tete { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.entree-ref { margin-left: auto; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.entree-titre { font-size: 16px; margin: 5px 0 4px; }
.entree-titre a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.entree-titre a:hover { border-color: currentColor; }
.entree-detail { font-size: 13.5px; color: var(--ink-2); margin-bottom: 7px; }
.entree-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 0; }
.entree-note { font-size: 13px; margin-top: 8px; padding: 7px 10px; background: var(--surface-2); border-radius: var(--rayon); }
.entree-resume { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.entree-resume--alerte { color: var(--crit); font-weight: 600; }
.entree-action { margin-top: 11px; }

.envois { list-style: none; margin: 9px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.envoi {
  display: grid; gap: 3px 10px; align-items: baseline;
  grid-template-columns: 28px 92px minmax(0, 1fr) auto;
  padding: 4px 0; font-size: 12.5px; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.envoi:last-child { border-bottom: 0; }
.envoi-palier {
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  background: var(--surface-2); border-radius: 3px; text-align: center; padding: 1px 0;
}
.envoi-canal { font-weight: 650; color: var(--ink); }
.envoi-qui { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envoi-dest { grid-column: 3; font-size: 11.5px; }
.envoi-statut { grid-column: 4; grid-row: 1; text-align: right; font-weight: 650; }
.envoi-heure { grid-column: 4; grid-row: 2; text-align: right; }
.envoi-erreur { grid-column: 1 / -1; color: var(--crit); font-size: 11.5px; }
.envoi--envoye .envoi-statut { color: var(--ok); }
.envoi--accuse .envoi-statut { color: var(--ok); }
.envoi--echec .envoi-statut { color: var(--crit); }
.envoi--attente .envoi-statut { color: var(--warn); }

.pagination { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 6px 0 18px; }
.pagination-etat { color: var(--ink-2); font-size: 13px; }

/* ----------------------------------------------------------- connexion --- */
.corps--connexion .page { max-width: 400px; display: flex; flex-direction: column; justify-content: center; }
.connexion { padding: 24px 0; }
.connexion-marque { text-align: center; margin-bottom: 20px; }
.connexion-marque h1 { font-size: 26px; margin-top: 8px; letter-spacing: -.02em; }
.connexion-sous { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }
.connexion-carte { padding: 20px; }
.connexion-carte .bouton { width: 100%; margin-top: 4px; }
.connexion-aide { color: var(--ink-2); font-size: 12.5px; margin-top: 14px; text-align: center; }
.connexion-note { color: var(--ink-2); font-size: 12.5px; margin-top: 16px; text-align: center; }

/* ------------------------------------------------------------- accusé --- */
/* La page ouverte dehors, la nuit, avec des gants. Gros, contrasté, un geste. */
.corps--accuse { background: var(--bg); }
.corps--accuse .page { display: flex; align-items: center; padding: 16px 14px 28px; }

.accuse {
  background: var(--surface); border: 1px solid var(--line);
  border-top: 6px solid var(--ink-2);
  border-radius: var(--rayon-2); box-shadow: var(--ombre-forte);
  padding: 20px 20px 22px; width: 100%;
}
.accuse--crit { border-top-color: var(--crit); }
.accuse--warn { border-top-color: var(--warn); }
.accuse--info { border-top-color: var(--accent); }
.accuse--inconnu { border-top-color: var(--ink-2); text-align: center; }

.accuse-oeil { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.accuse-ville { font-size: 12.5px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.accuse-titre { font-size: 27px; letter-spacing: -.025em; margin-bottom: 16px; }

.accuse-faits { margin: 0 0 16px; display: grid; gap: 12px; }
.fait { display: grid; grid-template-columns: 78px 1fr; gap: 12px; align-items: baseline; }
.fait dt {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-2); font-weight: 700;
}
.fait dd { margin: 0; font-size: 16.5px; }
.fait-second { color: var(--ink-2); font-size: 13.5px; }
.fait-chiffre { font-size: 32px; font-weight: 650; letter-spacing: -.02em; line-height: 1.05; }
.fait-chiffre .unite { font-size: 15px; margin-left: 4px; }

.accuse-detail {
  font-size: 14.5px; color: var(--ink-2);
  background: var(--surface-2); border-radius: var(--rayon);
  padding: 11px 13px; margin-bottom: 18px;
}

.accuse-form { margin-bottom: 16px; }
.accuse-sous-bouton { text-align: center; color: var(--ink-2); font-size: 12.5px; margin-top: 10px; }

.accuse-confirme {
  background: var(--voile-ok); border: 1px solid var(--ok); border-radius: var(--rayon-2);
  padding: 20px 18px; text-align: center; margin-bottom: 16px;
}
.accuse-coche { margin: 0 0 8px; }
.accuse-coche svg { width: 46px; height: 46px; color: var(--ok); }
.accuse-confirme-titre { font-size: 21px; font-weight: 700; color: var(--ok); margin-bottom: 6px; }
.accuse-confirme-texte { font-size: 15px; }
.accuse-suite { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.accuse-explique { font-size: 15.5px; margin-bottom: 14px; }

.accuse-pied { border-top: 1px solid var(--line); padding-top: 12px; color: var(--ink-2); font-size: 12.5px; }
.accuse-pied-ligne { margin: 0 0 3px; }

/* -------------------------------------------------------------- erreur --- */
.carte--erreur { padding: 30px 24px; text-align: center; max-width: 560px; margin: 40px auto; }
.erreur-code { font-size: 12px; letter-spacing: .12em; color: var(--ink-2); font-weight: 700; }
.carte--erreur h1 { font-size: 23px; margin: 6px 0 10px; }
.erreur-message { color: var(--ink-2); margin-bottom: 18px; }

/* -------------------------------------------------- écrans étroits ----- */
@media (max-width: 640px) {
  :root { --pas: 10px; }
  .tete-rangee { gap: 8px; padding: 8px 10px; }
  .menu { order: 3; width: 100%; margin-left: 0; border-top: 1px solid var(--line); padding-top: 6px; }
  .menu-lien { flex: 1; justify-content: center; }
  .compte { margin-left: auto; }
  .compte-role { display: none; }
  .verdict { padding: 13px 14px; }
  .verdict h1 { font-size: 21px; }
  .verdict-chiffres { gap: 16px; }
  .fiche-mesure { text-align: left; }
  .fiche-valeur { font-size: 36px; }
  .entree { grid-template-columns: 1fr; gap: 4px; padding: 12px 13px; }
  .entree-marge { flex-direction: row; align-items: baseline; gap: 8px; }
  .envoi { grid-template-columns: 26px 1fr auto; }
  .envoi-dest { grid-column: 1 / -1; }
  .envoi-statut { grid-column: 3; grid-row: 1; }
  .envoi-heure { grid-column: 3; grid-row: 2; }
  .graphe-axe-y { width: 40px; }
  .graphe-axe-x, .graphe-legende { margin-left: 40px; }
  .accuse-titre { font-size: 23px; }
  .fait { grid-template-columns: 1fr; gap: 1px; }
}

/* -------------------------------------------------------- impression --- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --line: #999; --ink: #000; --ink-2: #333; }
  .tete, .pied, .filtres, .onglets, .alerte-action, .entree-action, .accuse-form, .saut { display: none !important; }
  body { background: #fff; }
  .bloc, .carte, .verdict, .fiche, .entree { box-shadow: none; break-inside: avoid; }
  .table-cadre { overflow: visible; max-height: none; }
  a { color: #000; text-decoration: none; }
}

/* -------------------------------------------- animations réduites ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
