/* Thème monochrome « data science » (inspiré de fantasy_projections_2627).
   La couleur est réservée aux partis, dans les marques de données. */
:root {
  color-scheme: light;
  --bg: #e8eaed; --surface: #f7f8f9; --surface-2: #eceef1; --surface-3: #dfe2e6;
  --line: #e4e6e9; --border: #d3d7dc; --border-strong: #59616b;
  --ink: #1f2328; --ink-2: #5b636d; --muted: #939aa3;
  --accent: #2b3036; --accent-contrast: #f7f8f9;
  --good: #3a6445; --bad: #9e2a2e; --gold: #8a6510; --gold-wash: rgba(214,162,30,.17);
  --shadow: 0 1px 2px rgba(31,35,40,.06), 0 1px 3px rgba(31,35,40,.04);
  --radius: 3px;
  --PQ: #1f3fbf; --PLQ: #d62828; --PCQ: #6b4c9a; --CAQ: #4fb3e0; --QS: #f28c28; --AUT: #9e9e9e;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151719; --surface: #1d2023; --surface-2: #25292d; --surface-3: #30353a;
    --line: #292d32; --border: #363b41; --border-strong: #98a0a9;
    --ink: #d9dde2; --ink-2: #9aa2ab; --muted: #666e77;
    --accent: #d9dde2; --accent-contrast: #1d2023;
    --good: #8fbf98; --bad: #de7a7c; --gold: #d9b24f; --gold-wash: rgba(217,178,79,.13);
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.2);
    --PQ: #4a6cff; --PLQ: #e83f3f; --PCQ: #a35fd6; --CAQ: #1fa3cf; --QS: #d2700f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151719; --surface: #1d2023; --surface-2: #25292d; --surface-3: #30353a;
  --line: #292d32; --border: #363b41; --border-strong: #98a0a9;
  --ink: #d9dde2; --ink-2: #9aa2ab; --muted: #666e77;
  --accent: #d9dde2; --accent-contrast: #1d2023;
  --good: #8fbf98; --bad: #de7a7c; --gold: #d9b24f; --gold-wash: rgba(217,178,79,.13);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.2);
  --PQ: #4a6cff; --PLQ: #e83f3f; --PCQ: #a35fd6; --CAQ: #1fa3cf; --QS: #d2700f;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.num { font-family: var(--mono); letter-spacing: -.01em; }

/* Barre du haut */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.top-in { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 14px; align-items: center; }
.brand { font-weight: 600; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 400; margin-left: 2px; }
.search { flex: 1; position: relative; }
.search input { width: 100%; padding: 7px 40px 7px 28px; border: none; border-bottom: 1px solid var(--border); border-radius: 0;
  background: transparent; color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.search input:hover { border-bottom-color: var(--muted); }
.search input:focus { border-bottom-color: var(--border-strong); }
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.search kbd { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 11px var(--mono);
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1px 6px; }
.iconbtn { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 4px 9px; line-height: 1.4; font-size: 13px; color: var(--ink-2); }
.iconbtn:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--ink); }

/* Tableau de bord live */
.live { max-width: 1280px; margin: 14px auto 0; padding: 0 16px; }
.live-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
.seats { display: flex; gap: 0; flex-wrap: wrap; align-items: baseline; }
.seat { display: inline-flex; align-items: baseline; gap: 6px; padding: 0 14px 0 0; margin-right: 14px; border-right: 1px solid var(--line); }
.seat:last-child { border-right: none; }
.seat b { font: 600 22px/1 var(--mono); letter-spacing: -.02em; }
.seat small { color: var(--muted); font-size: 12px; }
.stat { display: inline-flex; align-items: baseline; gap: 8px; }
.stat b { font: 600 22px/1 var(--mono); letter-spacing: -.02em; }
.stat small { color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.live-actions { margin-left: auto; display: flex; gap: 8px; }
.ghost { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 4px 10px; font-size: 12px; color: var(--ink-2); }
.ghost:hover { border-color: var(--bad); color: var(--bad); }
.live-hint { color: var(--muted); font-size: 12px; }

/* Mise en page */
.wrap { max-width: 1280px; margin: 0 auto; padding: 14px 16px 48px; display: grid; grid-template-columns: 340px 1fr; gap: 14px; }
.wrap > *, .grid2 > *, .d-head > div:first-child { min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.listpanel { position: sticky; top: calc(var(--chrome-h, 98px) + 14px); max-height: calc(100vh - var(--chrome-h, 98px) - 28px); display: flex; flex-direction: column; overflow: hidden; }
.filters { padding: 8px 10px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px; background: var(--surface-2); }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 2px 8px; font-size: 12px; color: var(--ink-2); }
.chip:hover { border-color: var(--border-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); font-weight: 600; }
.chip .n { opacity: .6; margin-left: 4px; font-family: var(--mono); font-size: 11px; }
select.chip { appearance: none; padding-right: 22px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%; background-size: 4px 4px; background-repeat: no-repeat; }
.list { overflow-y: auto; flex: 1; position: relative; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 7px 12px 7px 10px; border-bottom: 1px solid var(--line);
  cursor: pointer; border-left: 2px solid transparent; }
.row:nth-child(even) { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.row:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.row.sel { background: var(--surface-3); border-left-color: var(--ink); }
.row .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 11.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.row .right { grid-row: span 2; display: flex; gap: 8px; align-items: center; }
.empty { padding: 24px; color: var(--ink-2); text-align: center; font-style: italic; }

/* Parti : pastille de couleur + code en texte (la couleur n'est jamais seule) */
.pill { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font: 600 11.5px/1.5 var(--mono); letter-spacing: .02em;
  background: none !important; padding: 0; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--pc, var(--AUT)); }
.pill.lg { font-size: 22px; gap: 9px; letter-spacing: -.01em; }
.pill.lg::before { width: 18px; height: 18px; border-radius: 3px; }
.dots { display: inline-flex; gap: 2px; }
.dots i { width: 6px; height: 6px; border-radius: 1px; background: var(--border); }
.dots i.on { background: var(--ink-2); }
.flag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 0 5px; border-radius: var(--radius); line-height: 16px; }
.flag.change { background: var(--gold-wash); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.flag.flip { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }
.res { font: 600 12px var(--mono); }
.res.ok { color: var(--good); } .res.ko { color: var(--bad); }

/* Fiche */
.detail { padding: 16px 20px 24px; }
.back { display: none; }
.d-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
h1 { margin: 2px 0 4px; font-size: 1.6rem; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.meta b { color: var(--ink); font-weight: 600; }
.callout { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.callout .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-right: 6px; }
.pbtn { border: 1px solid var(--border); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 2px 10px; font: 600 12px/1.5 var(--mono);
  display: inline-flex; align-items: center; gap: 5px; }
.pbtn::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--pc); }
.pbtn:hover { border-color: var(--border-strong); }
.pbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.verdict { font: 600 12px var(--mono); margin-left: auto; }
h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 22px 0 8px; font-weight: 600; }
.ctx { font-size: 14px; line-height: 1.6; max-width: 76ch; margin: 0; }
.sources { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.sources a { font-size: 12px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border); }
.sources a:hover { color: var(--ink); text-decoration-color: var(--ink-2); }

table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
thead th { background: var(--surface-2); }
th { font-size: 11px; color: var(--ink-2); font-weight: 500; text-align: right; padding: 5px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; font-family: var(--mono); }
td.l, td:first-child { font-family: inherit; }
tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
tbody tr:hover td { background: color-mix(in srgb, var(--ink) 7%, transparent); }
td .cand { font-weight: 500; }
td .inc { font-size: 10px; color: var(--ink-2); margin-left: 6px; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.tr-up { color: var(--good); font-size: 10px; } .tr-dn { color: var(--bad); font-size: 10px; }
.err { color: var(--muted); font-size: 11px; }
.strip { width: 220px; height: 22px; display: block; }
.scroll { overflow-x: auto; border: 1px solid var(--line); }

.wbar { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.wbar .who { font-size: 12px; color: var(--ink-2); }
.wbar .bar { display: flex; gap: 2px; height: 20px; background: var(--surface-2); }
.wbar .seg { display: flex; align-items: center; justify-content: center; color: #fff; font: 600 11px var(--mono); min-width: 0; overflow: hidden; white-space: nowrap; }
.wbar .seg:first-child { border-radius: 2px 0 0 2px; } .wbar .seg:last-child { border-radius: 0 2px 2px 0; }
.wbar .seg:only-child { border-radius: 2px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--ink-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hist svg { width: 100%; height: auto; }
.hist svg text { font-family: var(--mono); }
.tip { position: fixed; pointer-events: none; z-index: 50; background: var(--accent); color: var(--accent-contrast); font: 11px var(--mono); padding: 4px 7px; border-radius: var(--radius); opacity: 0; transition: opacity .1s; white-space: nowrap; box-shadow: var(--shadow); }
.foot { color: var(--muted); font-size: 11px; margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-2); }

@media (max-width: 600px) { .cmp { display: none; } td, th { padding: 5px 5px; } }
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; }
  .listpanel { position: static; max-height: none; }
  .wrap.has-detail .listpanel { display: none; }
  .wrap:not(.has-detail) .detailpanel { display: none; }
  .back { display: inline-block; margin-bottom: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  h1 { font-size: 1.35rem; }
  .search kbd { display: none; }
  .live-actions { margin-left: 0; }
  .detail { padding: 14px; }
  .live-card { padding: 8px 10px; gap: 6px 16px; }
  .seat { padding-right: 9px; margin-right: 9px; } .seat b, .stat b { font-size: 17px; } .seat small { display: none; }
  .live-hint { display: none; }
  .d-head { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
  .d-head > div:last-child { text-align: left !important; display: flex; gap: 8px; align-items: center; }
  .d-head > div:last-child .kicker { margin: 0 !important; }
  .verdict { margin-left: 0; width: 100%; }
}

/* Tableau de bord de projection */
.board { max-width: 1280px; margin: 14px auto 0; padding: 0 16px; }
.board-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.board-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 10px 14px 0; }
.board-head h2 { margin: 0; color: var(--ink); }
.board-head .sub { font-size: 12px; color: var(--muted); }
.board-head .right { margin-left: auto; display: flex; gap: 8px; align-items: baseline; }
.seatgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); padding: 8px 0 4px; }
.sp { padding: 6px 14px; border-right: 1px solid var(--line); }
.sp:last-child { border-right: none; }
.sp .top-l { display: flex; align-items: baseline; gap: 8px; }
.sp .big { font: 600 28px/1.1 var(--mono); letter-spacing: -.02em; }
.sp .rng { font: 12px var(--mono); color: var(--ink-2); }
.sp svg { display: block; width: 100%; height: 34px; margin-top: 4px; }
.outcomes { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.outcomes b { font-family: var(--mono); color: var(--ink); font-weight: 600; }
.watch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 14px 10px; border-top: 1px solid var(--line); background: var(--surface-2); }
.watch .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-right: 4px; }
.wchip { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 2px 8px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.wchip:hover { border-color: var(--border-strong); }
.wchip .pr { font-family: var(--mono); color: var(--ink-2); font-size: 11.5px; }
.method { padding: 0 14px 12px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.method p { margin: 6px 0; max-width: 95ch; }
.method a { color: var(--ink); }
.linkbtn { border: none; background: none; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; }
.linkbtn:hover { color: var(--ink); }
.ctxflag { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 0 6px; border-radius: var(--radius); line-height: 17px; display: inline-flex; gap: 5px; align-items: center; }
.ctxflag.diverge { background: var(--gold-wash); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.ctxflag.agree { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); }
.prob { font: 600 12px var(--mono); color: var(--ink-2); }
.lvflag { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; font: 11px var(--mono); color: var(--ink-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 5px; }
.lvflag .pill { font-size: 10.5px; }
.row .sub { flex-wrap: nowrap; min-width: 0; } .row .sub > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bigprob { font: 12px var(--mono); color: var(--ink-2); margin-top: 2px; }
.manual { margin-top: 12px; font-size: 12.5px; }
.manual summary { cursor: pointer; color: var(--ink-2); }
.manual[open] summary { margin-bottom: 6px; }
.wbar.ours .who { color: var(--ink); font-weight: 600; }
.wbar.ours .bar { height: 24px; }
.loading { padding: 18px 14px; color: var(--muted); font-style: italic; }
@media (max-width: 900px) {
  .seatgrid { grid-template-columns: repeat(2, 1fr); }
  .sp { border-right: none; border-bottom: 1px solid var(--line); }
  .sp .big { font-size: 22px; }
}

/* ---------- Coquille de l'app : onglets, état live, bandeau, vues ---------- */
.tabs { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 14px 8px; font-size: 13px; color: var(--ink-2); }
.tabs button:hover { color: var(--ink); background: var(--surface-2); }
.tabs button[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.live-summary { border-top: 1px solid var(--line); background: var(--surface-2); }
.live-summary-in { max-width: 1280px; min-height: 35px; margin: 0 auto; padding: 5px 16px; display: flex; flex-wrap: wrap; gap: 5px 22px; align-items: center; }
.live-summary .ls-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 11.5px; color: var(--ink-2); }
.live-summary .ls-item + .ls-item { padding-left: 22px; border-left: 1px solid var(--border); }
.live-summary b { color: var(--ink); font: 600 12px var(--mono); }
.live-summary .ls-majority { color: var(--ink); }
.live-summary .ls-trend { font: 600 11px var(--mono); }
.live-summary .ls-trend.up { color: var(--good); }
.live-summary .ls-trend.down { color: var(--bad); }
.live-summary .ls-state { margin-left: auto; color: var(--muted); }
.live-summary .ls-state.on::before { content: "●"; color: var(--bad); font-size: 9px; }

/* Fil jaune : uniquement les changements de projection à fort impact. */
.ticker { width: 100%; background: #f3cc45; color: #1c1b16; border-bottom: 1px solid #cfaa29; overflow: hidden; }
.ticker-in { max-width: 1280px; min-height: 36px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; font-size: 12.5px; }
.ticker-label { align-self: stretch; z-index: 1; display: inline-flex; align-items: center; flex: none; padding-right: 14px; font: 700 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; background: #f3cc45; }
.ticker-label::after { content: ""; height: 16px; margin-left: 14px; border-right: 1px solid rgba(28,27,22,.3); }
.ticker-viewport { min-width: 0; flex: 1; overflow: hidden; }
.ticker-track { display: flex; width: max-content; will-change: transform; }
.ticker-track.moving { animation: ticker-scroll var(--ticker-duration, 30s) linear infinite; }
.ticker-group { display: flex; flex: none; align-items: center; gap: 30px; }
.ticker .ev { display: inline-flex; gap: 6px; align-items: center; background: none; border: none; padding: 0; font: inherit; color: #3f3a28; white-space: nowrap; }
.ticker button.ev:hover { color: #111; text-decoration: underline; text-underline-offset: 2px; }
.ticker .ev time { font: 11px var(--mono); color: #6e623b; }
.ticker .ev strong { color: #171713; font-weight: 700; }
.ticker .pill { color: #171713; }
.ticker .tk-trend { font: 800 14px/1 var(--mono); }
.ticker .tk-trend.up { color: #236b35; }
.ticker .tk-trend.down { color: #a5222a; }
.ticker-empty { color: #5f552f; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ticker-viewport { overflow-x: auto; }
  .ticker-track.moving { animation: none; }
}
.view { max-width: 1280px; margin: 0 auto; padding: 14px 16px 48px; }
.view[hidden] { display: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sec-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; margin: 0 0 8px; }
.bottomnav { display: none; }
@media (max-width: 900px) {
  .tabs { display: none; }
  .bottomnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 8px rgba(0,0,0,.08); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav button { background: none; border: none; padding: 9px 4px 10px; font-size: 11.5px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .bottomnav button span { font-size: 17px; line-height: 1; }
  .bottomnav button[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .view { padding-bottom: 90px; }
  .live-summary-in { gap: 4px 12px; padding: 5px 10px; }
  .live-summary .ls-item + .ls-item { padding-left: 12px; }
  .live-summary .ls-state { margin-left: 0; }
  .ticker-in { padding: 0 10px; }
}
@media (max-width: 600px) {
  .brand span { display: none; }
  .top-in { gap: 10px; }
  .search { min-width: 0; }
  .live-summary-in { display: grid; grid-template-columns: 1fr 1fr; }
  .live-summary .ls-item + .ls-item { padding-left: 0; border-left: none; }
  .live-summary .ls-state { display: none; }
  .live-summary .ls-item { white-space: normal; line-height: 1.25; }
  .ticker-label { padding-right: 10px; }
  .ticker-label::after { margin-left: 10px; }
}

.site-foot { max-width: 1280px; margin: 0 auto; padding: 0 16px 28px; font-size: 11px; line-height: 1.55; color: var(--muted); }
.site-foot a { color: var(--ink-2); }
@media (max-width: 900px) { .site-foot { padding-bottom: 90px; } .view { padding-bottom: 24px; } }

/* Bouton de démo (temporaire) */
#democtl { position: fixed; left: 16px; bottom: 16px; z-index: 40; font-size: 12.5px; }
#democtl .dc-main { background: var(--accent); color: var(--accent-contrast); border: none; border-radius: 999px; padding: 8px 14px; font-weight: 600; box-shadow: var(--shadow), 0 4px 14px rgba(0,0,0,.18); }
#democtl .dc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow), 0 6px 20px rgba(0,0,0,.2); padding: 8px; display: grid; gap: 6px; }
#democtl .dc-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 0 2px; }
#democtl .dc-head span { font: 11px var(--mono); color: var(--ink-2); }
#democtl .dc-row { display: flex; gap: 4px; flex-wrap: wrap; }
#democtl .dc-btn { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 3px 8px; font-size: 12px; color: var(--ink); }
#democtl .dc-btn:hover { border-color: var(--border-strong); }
#democtl .dc-btn.on { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
@media (max-width: 900px) { #democtl { left: 10px; bottom: 74px; } }

/* ---------- Ligne de course commune (h.race) : chances de gagner + dépouillement ---------- */
.row.race { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; }
.race-n { min-width: 0; display: flex; flex-direction: column; }
.race-nom { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-nom-link { color: inherit; text-decoration: none; }
.race-nom-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.race-sub { font-size: 11.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race-r { display: flex; align-items: center; }
.race-d { grid-column: 1 / -1; min-width: 0; }
.chance { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.chance b { font: 600 16px var(--mono); min-width: 44px; text-align: right; color: var(--ink); }
.chance small, .race-won small { font-size: 10.5px; color: var(--muted); }
.race-won { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.race-won b { font-size: 12.5px; color: var(--good); font-weight: 600; }
.dep { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 11.5px; color: var(--ink-2); min-width: 0; }
.dep-bar { flex: 0 0 64px; height: 5px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.dep-bar i { display: block; height: 100%; background: var(--ink-2); }
.dep .num { color: var(--ink); }
.dep-lead { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.dep-lead .pill { font-size: 10.5px; }
.race-peek { padding: 9px 10px 10px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; }
.peek-title { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.peek-probs { display: flex; flex-wrap: wrap; gap: 5px 14px; }
.peek-probs > span { display: inline-flex; align-items: center; gap: 5px; }
.peek-probs b { color: var(--ink); }
.peek-live { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border); }
.peek-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--border); color: var(--ink-2); }
.peek-foot a { color: var(--ink); font-weight: 600; text-decoration: none; }
.peek-foot a:hover { text-decoration: underline; text-underline-offset: 2px; }
.sg-riding { min-width: 0; border-bottom: 1px solid var(--line); }
.sg-riding .sg-li.row { border-bottom: 0; }
.sg-riding.open { background: var(--surface-2); }
.sg-riding .race-peek { border-top-color: var(--line); }
