/* Charte graphique Ville de Clichy-sous-Bois : jetons copiés de ldilain/charte-ville (web/tokens.css). */
:root {
  --csb-rouge: #C90138;
  --csb-anis: #D4D800;    /* jamais en texte sur fond clair */
  --csb-encre: #221019;
  --csb-papier: #FFFFFF;
  --csb-teinte: #FBE7EC;
  --csb-filet: #E7D3D8;
  --csb-rouge-texte: #C90138;
  --csb-police: Verdana, Geneva, Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --csb-encre: #F5EDEF; --csb-papier: #1B1013; --csb-teinte: #2B141B; --csb-filet: #4A2530; --csb-rouge-texte: #F0587C;
  }
}
:root[data-theme="dark"] {
  --csb-encre: #F5EDEF; --csb-papier: #1B1013; --csb-teinte: #2B141B; --csb-filet: #4A2530; --csb-rouge-texte: #F0587C;
}

/* Rôles de l'application (graphiques : paire validée clair/sombre, forme « mise en avant ») */
:root {
  color-scheme: light;
  --page: #FAF6F7;
  --surface: var(--csb-papier);
  --encre: var(--csb-encre);
  --encre-2: #5B4A50;
  --muted: #7A6A70;
  --grid: #EFE6E8;
  --axis: #CDBFC3;
  --serie-accent: #C90138;      /* branche Clichy-Montfermeil, suppressions */
  --serie-contexte: #B4AFAA;    /* reste de la ligne : contraste < 3:1 assumé, étiquettes + tableau */
  --marque-neutre: #5C5753;     /* trams passés (frise) */
  --trou: rgba(201, 1, 56, 0.10);
  --alerte-fond: #FBE7EC;
  /* « OK » (à l'heure, réalisé, passage assuré) : vert bleuté, distinct du rouge pour les daltoniens
     (deutéranopie : écart 7 en clair, 8 en sombre), toujours accompagné d'un symbole ou d'un libellé */
  --ok: #00805F; --ok-texte: #FFFFFF; --ok-encre: #00805F;
  /* Trams en direct : état de retard (couleur + forme + chiffre) */
  --tram-normal: var(--ok);  --tram-normal-texte: var(--ok-texte);  --tram-inconnu: #5C5753;
  --tram-attention: #D08A00; --tram-attention-texte: #221019;
  --tram-grave: #C90138;   --tram-grave-texte: #FFFFFF;
  --rail: #CDBFC3;
  --trace-carte: #6E5E64;
  --ligne-principale: #6E5E64;    /* ligne Bondy – Aulnay ; le débranchement prend --serie-accent */
  --rail-principale: #CDBFC3; --rail-debranchement: #EFB3C3;   /* voies claires : les trams restent lisibles */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #140B0E; --encre-2: #D9C9CE; --muted: #A8959B; --grid: #2E1A20; --axis: #4A2530;
    --serie-accent: #F0587C; --serie-contexte: #4F4A47; --marque-neutre: #C9C1BD;
    --trou: rgba(240, 88, 124, 0.14); --alerte-fond: #3A1A22;
    --ok: #2EC4B0; --ok-texte: #1B1013; --ok-encre: #2EC4B0; --tram-inconnu: #C9C1BD;
    --tram-normal: var(--ok); --tram-normal-texte: var(--ok-texte); --tram-attention: #E0A43A; --tram-attention-texte: #1B1013;
    --tram-grave: #F0587C; --tram-grave-texte: #1B1013; --rail: #5A3540; --trace-carte: #D9C9CE;
    --ligne-principale: #B8A8AE; --rail-principale: #5A3540; --rail-debranchement: #8A2F4A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #140B0E; --encre-2: #D9C9CE; --muted: #A8959B; --grid: #2E1A20; --axis: #4A2530;
  --serie-accent: #F0587C; --serie-contexte: #4F4A47; --marque-neutre: #C9C1BD;
  --trou: rgba(240, 88, 124, 0.14); --alerte-fond: #3A1A22;
  --ok: #2EC4B0; --ok-texte: #1B1013; --ok-encre: #2EC4B0; --tram-inconnu: #C9C1BD;
  --tram-normal: var(--ok); --tram-normal-texte: var(--ok-texte); --tram-attention: #E0A43A; --tram-attention-texte: #1B1013;
  --tram-grave: #F0587C; --tram-grave-texte: #1B1013; --rail: #5A3540; --trace-carte: #D9C9CE;
  --ligne-principale: #B8A8AE; --rail-principale: #5A3540; --rail-debranchement: #8A2F4A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--encre); font: 14px/1.55 var(--csb-police); }
a { color: var(--csb-rouge-texte); }
h1 { font-size: 1.5rem; margin: 0.6rem 0 0.3rem; }
h2 { font-size: 1rem; margin: 0 0 0.6rem; }
.lead { color: var(--encre-2); margin: 0 0 1.2rem; max-width: 75ch; }
.muted { color: var(--muted); font-size: 0.9em; }
.note { color: var(--muted); font-size: 0.85rem; margin: 0.6rem 0 0; }
code { font-size: 0.9em; color: var(--encre-2); }

/* En-tête : filet anis décoratif (jamais de texte anis) */
.top { display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: var(--surface);
       border-bottom: 4px solid var(--csb-anis); }
.logo img { display: block; height: 48px; width: auto; }
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand a { color: var(--encre); font-weight: bold; font-size: 1.1rem; text-decoration: none; }
.brand .sub { color: var(--muted); font-size: 0.8rem; }
.outils { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.badge { padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: bold;
         background: var(--csb-teinte); color: var(--csb-rouge-texte); }
.bouton-theme { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--csb-filet); background: var(--surface); color: var(--encre); cursor: pointer; }
.bouton-theme[hidden] { display: none; }      /* sans JavaScript, le bouton ne servirait à rien */
.bouton-theme:hover { background: var(--csb-teinte); }
.bouton-theme:focus-visible { outline: 2px solid var(--csb-rouge-texte); outline-offset: 2px; }
.bouton-theme svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bouton-theme .icone-lune { fill: currentColor; stroke: none; }
/* icône = thème vers lequel on bascule : lune en clair, soleil en sombre */
.bouton-theme .icone-soleil, .logo .logo-sombre { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bouton-theme .icone-soleil,
  :root:not([data-theme="light"]) .logo .logo-sombre { display: block; }
  :root:not([data-theme="light"]) .bouton-theme .icone-lune,
  :root:not([data-theme="light"]) .logo .logo-clair { display: none; }
}
:root[data-theme="dark"] .bouton-theme .icone-soleil, :root[data-theme="dark"] .logo .logo-sombre { display: block; }
:root[data-theme="dark"] .bouton-theme .icone-lune, :root[data-theme="dark"] .logo .logo-clair { display: none; }
.tabs { display: flex; gap: 4px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--csb-filet);
        overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--encre-2); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--encre); }
.tabs a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--csb-rouge); font-weight: bold; }
main { max-width: 1180px; margin: 0 auto; padding: 16px 24px 32px; }
footer { max-width: 1180px; margin: 0 auto; padding: 12px 24px 32px; color: var(--muted); font-size: 0.8rem; }
.alerte { background: var(--alerte-fond); border-left: 4px solid var(--csb-rouge); padding: 8px 12px; border-radius: 4px; }

.filtres { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 4px 0 8px; }
.filtres label { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; color: var(--encre-2); }
select, button { font: inherit; padding: 5px 8px; border: 1px solid var(--csb-filet); border-radius: 6px;
                 background: var(--surface); color: var(--encre); }

/* Indicateurs clés */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--csb-filet); border-radius: 10px; padding: 14px 16px;
       display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 0.85rem; color: var(--encre-2); }
.kpi-value { font-size: 2rem; font-weight: bold; line-height: 1.15; }
.kpi-sub { font-size: 0.8rem; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--csb-filet); border-radius: 10px; padding: 16px;
        margin-bottom: 16px; }
.constat { margin: 0 0 8px; }

/* Tableaux */
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th, table.data td { padding: 6px 8px; border-bottom: 1px solid var(--grid); text-align: left; vertical-align: middle;
  white-space: nowrap; }
table.data thead th { color: var(--muted); font-weight: normal; font-size: 0.8rem; }
table.data th[scope="row"] { font-weight: normal; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.groupe th { padding-top: 14px; font-weight: bold; color: var(--encre); border-bottom: 1px solid var(--axis); }
table.data tr.ko td { color: var(--csb-rouge-texte); }
th.triable { cursor: pointer; }
th[aria-sort="ascending"]::after { content: " ▲"; }
th[aria-sort="descending"]::after { content: " ▼"; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--encre-2); font-size: 0.85rem; }
.table-scroll, .chart-wrap.scroll { overflow-x: auto; }

/* Jauges (liste) */
.meter-cell { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.meter { flex: 1; height: 8px; background: var(--grid); border-radius: 999px; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-fill.accent { background: var(--serie-accent); }
.meter-val { min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }

/* Légendes */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 8px; font-size: 0.85rem; color: var(--encre-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 16px; height: 2px; border-radius: 1px; }
.key.accent { background: var(--serie-accent); }
.key.contexte { background: var(--serie-contexte); }
.sym { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.sym.prevu::before { content: ""; width: 1px; height: 14px; background: var(--muted); }
.sym.passe::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.sym.passe.retard::before { background: var(--tram-attention); }
.sym.supprime { color: var(--serie-accent); font-weight: bold; }
.sym.trou { background: var(--trou); border-radius: 3px; }

/* Graphiques SVG */
.chart { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--csb-police); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.accent { stroke: var(--serie-accent); }
.chart .line.contexte { stroke: var(--serie-contexte); }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .dot.accent { fill: var(--serie-accent); }
.chart .dot.contexte { fill: var(--serie-contexte); }
.chart .mark.accent { fill: var(--serie-accent); }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:hover + .mark, .chart .hit:focus + .mark { opacity: 0.8; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; visibility: hidden; pointer-events: none; }
.chart .endlabel { fill: var(--encre); font-size: 12px; font-weight: bold; }
.chart .endname { fill: var(--encre-2); font-size: 11px; }
.chart .leader { stroke: var(--axis); stroke-width: 1; }
.frise { min-width: 760px; }
.chart-wrap { overflow-x: auto; }
.chart-wrap > .chart:not(.frise) { min-width: 600px; }
.frise .prevu { stroke: var(--muted); stroke-width: 1; }
.frise .passe { fill: var(--ok); stroke: var(--surface); stroke-width: 2; }
.frise .passe.retard { fill: var(--tram-attention); }
.frise .supprime { stroke: var(--serie-accent); stroke-width: 2; stroke-linecap: round; fill: none; }
.frise .trou { fill: var(--trou); }
.frise .trou-label { fill: var(--encre); font-size: 11px; font-weight: bold; }

#tip { position: fixed; z-index: 10; pointer-events: none; background: var(--surface); color: var(--encre);
       border: 1px solid var(--csb-filet); border-radius: 6px; padding: 6px 10px; font-size: 0.8rem;
       box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); display: flex; flex-direction: column; max-width: 320px; }
#tip strong { font-size: 0.9rem; }
#tip span { color: var(--encre-2); }

.statut { white-space: nowrap; }
.statut::before { display: inline-block; width: 1.2em; font-weight: bold; }
.statut.supprimee { color: var(--csb-rouge-texte); font-weight: bold; }
.statut.supprimee::before { content: "✕"; }
.statut.partielle { color: var(--encre); font-weight: bold; }
.statut.partielle::before { content: "◐"; color: var(--csb-rouge-texte); }
.statut.realisee { color: var(--ok-encre); }
.statut.realisee::before { content: "✓"; }

.prose { max-width: 80ch; }
.prose h2 { margin-top: 1.4rem; }
.prose dt { font-weight: bold; margin-top: 0.8rem; }
.prose dd { margin: 0.2rem 0 0 0; color: var(--encre-2); }

@media (max-width: 640px) {
  .top { padding: 10px 16px; gap: 10px; }
  .logo img { height: 36px; }
  .brand .sub { display: none; }
  .tabs { padding: 0 8px; }
  main { padding: 12px 16px 24px; }
  footer { padding: 12px 16px 24px; }
  .card { padding: 12px; }
  .kpi-value { font-size: 1.6rem; }
  .card:has(table.data) { overflow-x: auto; }
}

/* ---- En direct ---------------------------------------------------------------------------- */
.fraicheur { margin: 0 0 0.6rem; font-weight: bold; }
.fraicheur.alerte { font-weight: normal; }
.messages p { margin: 0 0 1rem; }
.grille-direct { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.grille-direct > .card { margin: 0; }
@media (min-width: 1080px) { .grille-direct { grid-template-columns: minmax(0, 600px) 1fr; align-items: start; } }
.chart-wrap > .chart.plan { min-width: 0; width: 100%; max-width: 560px; display: block; margin: 0 auto; }
.plan .rail { stroke: var(--rail); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.plan .quai-plan { fill: var(--surface); stroke: var(--axis); stroke-width: 1.5; }
.plan .nom { fill: var(--encre); font-size: 11px; }
.plan .nom.terminus { font-weight: bold; }
.plan .sens { fill: var(--muted); font-size: 11px; }
.marque { stroke: var(--surface); stroke-width: 2; }
.marque.normal { fill: var(--tram-normal); }
.marque.attention { fill: var(--tram-attention); }
.marque.grave { fill: var(--tram-grave); }
.marque.inconnu { fill: var(--surface); stroke: var(--tram-inconnu); stroke-width: 2; stroke-dasharray: 3 2; }
.tram { cursor: pointer; }
.tram:focus { outline: none; }
.tram:focus .marque { stroke: var(--encre); stroke-width: 2.5; }
.retard-marque { font-size: 11px; font-weight: bold; pointer-events: none; fill: var(--tram-normal-texte); }
.tram.attention .retard-marque { fill: var(--tram-attention-texte); }
.tram.grave .retard-marque { fill: var(--tram-grave-texte); }
.tram.inconnu .retard-marque { fill: var(--encre); }
.legend-trams svg { flex: none; }
.departs { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px 20px; overflow-x: auto; }
@media (max-width: 640px) { #table-trams .secondaire { display: none; } }
.depart h3 { font-size: 0.9rem; margin: 0 0 0.3rem; }
.depart ul { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.depart li { padding: 2px 0; white-space: nowrap; }
.depart .h { font-variant-numeric: tabular-nums; font-weight: bold; }
.retard-texte { color: var(--encre); font-weight: bold; }
.statut-retard.grave, .statut-retard.attention { font-weight: bold; }
.statut-retard.normal, .ok-texte { color: var(--ok-encre); }
.ok-texte::before { content: "✓ "; }
.passage-etat.realise { color: var(--ok-encre); }
.passage-etat.supprime, .passage-etat.absent { color: var(--csb-rouge-texte); font-weight: bold; }

/* ---- En direct : carte (Leaflet, fond OpenStreetMap) ------------------------------------------ */
.entete-vues { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.entete-vues h2 { margin: 0; }
.vues { display: flex; gap: 6px; }
.vues button { font: inherit; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--csb-filet); background: var(--surface); color: var(--encre); }
.vues button[aria-pressed="true"] { background: var(--encre); color: var(--surface); border-color: var(--encre); }
.vues button:focus-visible { outline: 2px solid var(--csb-rouge-texte); outline-offset: 2px; }
#carte { height: 560px; border-radius: 8px; border: 1px solid var(--csb-filet); }
@media (max-width: 640px) { #carte { height: 440px; } }
.leaflet-container { font: 12px/1.4 var(--csb-police); background: var(--page); }
.leaflet-container a { color: var(--csb-rouge-texte); }
.trace-carte { stroke: var(--trace-carte); stroke-width: 4; stroke-opacity: 0.75; fill: none; }
.station-carte { stroke: var(--encre); stroke-width: 1.5; fill: var(--surface); fill-opacity: 1; }
.leaflet-tooltip.etiquette-carte { background: var(--surface); color: var(--encre); border-color: var(--csb-filet);
  box-shadow: none; padding: 1px 5px; font-weight: bold; }
.leaflet-tooltip { background: var(--surface); color: var(--encre); border-color: var(--csb-filet); }
.tram-carte { display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 2px solid var(--surface); font: bold 11px/1 var(--csb-police); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.tram-carte.normal { background: var(--tram-normal); color: var(--tram-normal-texte); }
.tram-carte.attention { background: var(--tram-attention); color: var(--tram-attention-texte); }
.tram-carte.grave { background: var(--tram-grave); color: var(--tram-grave-texte); border-radius: 4px; }
.tram-carte.inconnu { background: var(--surface); color: var(--encre); border: 2px dashed var(--tram-inconnu); }
.tram-carte:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }
}
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }

/* Causes annoncées des suppressions */
.causes { margin: 0 0 16px; max-width: 90ch; }
.cause { font-size: 0.85rem; color: var(--encre-2); }
.cause-absente { font-size: 0.85rem; font-style: italic; }

/* Surlignage d'une station : nom survolé dans la page -> repère sur la carte et le plan (anis = surligneur) */
span.nom-station { border-bottom: 1px dotted var(--muted); cursor: default; border-radius: 2px; }
span.nom-station:hover { background: var(--csb-anis); color: #221019; }
.station-carte.surlignee { fill: var(--csb-anis); stroke: #221019; stroke-width: 3; }
.plan text.nom-station { cursor: default; }
.plan .station-plan.surlignee .quai-plan { fill: var(--csb-anis); stroke: #221019; stroke-width: 2; }
.plan .station-plan.surlignee .nom { font-weight: bold; text-decoration: underline; }

/* ---- Ligne principale Bondy – Aulnay et débranchement Gargan – Hôpital de Montfermeil ----------- */
.bandeau-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; max-width: 1180px;
  margin: 0 auto; padding: 10px 24px 0; }
.mini-plan { width: 470px; max-width: 100%; height: auto; flex: none; }
.mini-plan line, .mini-plan path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.mini-plan .mp-principale { stroke: var(--ligne-principale); }
.mini-plan .mp-debranchement { stroke: var(--serie-accent); }
.mini-plan circle { fill: var(--surface); stroke: var(--encre); stroke-width: 1.8; }
.mini-plan text { fill: var(--encre-2); font-size: 11px; }
.mini-plan .mp-terminus { fill: var(--encre); font-weight: bold; }
.parties { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.85rem; }
.parties li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cle-trait { display: inline-block; width: 22px; height: 5px; border-radius: 3px; align-self: center; }
.principale .cle-trait, .pastille-partie.principale { background: var(--ligne-principale); }
.debranchement .cle-trait, .pastille-partie.debranchement { background: var(--serie-accent); }
.pastille-partie { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; }
table.data tr.groupe.principale th { border-left: 5px solid var(--ligne-principale); padding-left: 10px; }
table.data tr.groupe.debranchement th { border-left: 5px solid var(--serie-accent); padding-left: 10px; }
@media (max-width: 640px) {
  .bandeau-ligne { padding: 8px 16px 0; gap: 6px; }
  .mini-plan { width: 100%; max-width: 470px; }
}
.plan .rail.principale { stroke: var(--rail-principale); }
.plan .rail.debranchement { stroke: var(--rail-debranchement); }
.trace-carte.trace-principale { stroke: var(--ligne-principale); }
.trace-carte.trace-debranchement { stroke: var(--serie-accent); }
/* Voie unique Arboretum – Hôpital : un seul trait, en pointillé sur la carte */
.plan .rail.voie-unique { stroke-width: 4; }
.trace-carte.trace-voie-unique { stroke-dasharray: 7 5; stroke-width: 3; }
.voie-unique .cle-trait { background: repeating-linear-gradient(90deg, var(--serie-accent) 0 6px, transparent 6px 10px); }
abbr[title] { text-decoration: underline dotted; cursor: help; }
details.cascade { border-top: 1px solid var(--grid); padding: 6px 0; }
details.cascade summary { cursor: pointer; white-space: nowrap; }

/* Versions */
a.badge { text-decoration: none; }
.version h3 { font-size: 0.95rem; margin: 12px 0 4px; }
.version ul { margin: 0; padding-left: 1.2rem; max-width: 80ch; }

/* Signalements */
.bouton-principal { display: inline-block; padding: 12px 20px; border: 0; border-radius: 8px; background: var(--csb-rouge);
  color: #FFFFFF; font: inherit; font-weight: bold; text-decoration: none; cursor: pointer; }
.bouton-principal:hover { filter: brightness(1.1); }
.verdict.confirme { font-weight: bold; }
.verdict.contredit { color: var(--csb-rouge-texte); font-weight: bold; }
.verdict.inverifiable { color: var(--muted); }

/* Contrôles des données */
details.controle { border-top: 1px solid var(--grid); padding: 8px 0; margin: 0; }
details.controle:first-child { border-top: 0; }
details.controle summary { cursor: pointer; }
.niveau { display: inline-block; min-width: 7.5em; font-size: 0.85em; font-weight: bold; }
.niveau.ok, .niveau-nombre.ok { color: var(--ok-encre); }
.niveau.a_verifier, .niveau-nombre.a_verifier { color: var(--csb-rouge-texte); font-weight: bold; }
.niveau.info, .niveau-nombre.info { color: var(--muted); }
ul.cas { margin: 0.4rem 0 0; padding-left: 1.2em; }
ul.cas li { margin: 2px 0; }
table.fiche td.annonces span { display: block; font-size: 0.85em; white-space: nowrap; }
table.fiche td.annonces details { margin: 0; }
table.fiche td.annonces summary { cursor: pointer; font-size: 0.85em; }

/* Périmètre : trams Bondy – Hôpital par défaut, toute la ligne sur demande */
form.perimetre { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.9rem; }
form.perimetre label { font-weight: bold; cursor: pointer; }
form.perimetre input { accent-color: var(--csb-rouge-texte); }

/* Panneau d'une station sur la carte en direct */
.panneau-carte .leaflet-popup-content-wrapper { background: var(--surface); color: var(--encre); border-radius: 8px; }
.panneau-carte .leaflet-popup-tip { background: var(--surface); }
.panneau-carte .leaflet-popup-content { margin: 8px 12px; min-width: 200px; font-size: 0.85rem; }
.panneau-carte .sens { display: block; margin-top: 6px; color: var(--muted); font-size: 0.8rem; }
.panneau-carte ul { list-style: none; margin: 2px 0 0; padding: 0; }
.panneau-carte li { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; }
.panneau-carte .attente { font-weight: bold; font-variant-numeric: tabular-nums; }
.panneau-carte .attente.supprime { color: var(--csb-rouge-texte); }

/* Motifs : textes longs (messages de l'exploitant) sur plusieurs lignes */
table.data td.texte { white-space: normal; min-width: 14em; }

/* Barres empilées : la barre entière = 100 % des trams (ou passages) */
.meter.empile { display: flex; }
.meter.empile .seg { display: block; height: 100%; }
.seg.supprime { background: var(--serie-accent); }
.seg.partiel { background: var(--tram-attention); }
.meter.empile .seg.realise { flex: 1; background: var(--ok); opacity: 0.55; }
.legende-empile { display: block; font-size: 0.75rem; white-space: nowrap; }
.legende-empile .seg { display: inline-block; width: 10px; height: 8px; border-radius: 2px; margin: 0 3px 0 6px; }
.legende-empile .seg.realise { background: var(--ok); opacity: 0.55; }

/* En direct : info trafic de l'exploitant, une par ligne */
.infos-titre { margin: 0.6rem 0 0.2rem; font-weight: bold; color: var(--csb-rouge-texte); }
ul.infos-trafic { list-style: none; margin: 0 0 0.6rem; padding: 0; }
ul.infos-trafic li { padding: 6px 10px; margin: 4px 0; border-left: 3px solid var(--csb-rouge-texte);
  background: var(--surface); }
ul.infos-trafic .infos-dates { display: block; font-size: 0.8rem; color: var(--muted); }
