/* Mise en page : bandeau d'état en haut, grille de cartes candidats, colonnes sobres ; couleurs vives réservées aux partis */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #161b26;
  --muted: #5a6376;
  --line: #dde2ea;
  --accent: #1f3a8a;
  --accent-soft: #e3e9f8;
  --up: #1a7f4b;
  --down: #b4232f;
  --warn-bg: #fff6dc;
  --warn-ink: #6b5200;
  --shadow: 0 1px 2px rgba(22, 27, 38, .06), 0 4px 14px rgba(22, 27, 38, .05);
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1218; --surface: #171b24; --surface-2: #1e2330; --ink: #e7eaf1; --muted: #98a1b4;
    --line: #2a3141; --accent: #8fa8ff; --accent-soft: #1d2647; --up: #4cc58a; --down: #ff6b76;
    --warn-bg: #2d2610; --warn-ink: #f0d37a; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1218; --surface: #171b24; --surface-2: #1e2330; --ink: #e7eaf1; --muted: #98a1b4;
  --line: #2a3141; --accent: #8fa8ff; --accent-soft: #1d2647; --up: #4cc58a; --down: #ff6b76;
  --warn-bg: #2d2610; --warn-ink: #f0d37a; --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--f-body);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.15; }
.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Bandeau : règles dans assets/entete.css (commun à toutes les pages) */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }

main { padding-block: 28px 56px; display: grid; gap: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }

/* Cartes principales */
.grid-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); text-decoration: none; color: inherit; position: relative; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--party); }
.card .stripe { height: 5px; background: var(--party); }
.card .photo { aspect-ratio: 4 / 4.2; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; }
.initials { font-family: var(--f-display); font-weight: 800; color: var(--party); letter-spacing: .02em; }
.card .photo .initials { font-size: 54px; opacity: .85; }
.card .body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.card .name { font-family: var(--f-display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.card .party { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.card .party span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-row { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.score { font-family: var(--f-display); font-weight: 800; font-size: 34px; letter-spacing: -.02em; line-height: 1; }
.score small { font-size: 16px; font-weight: 700; margin-left: 2px; }
.delta { font-size: 13px; font-weight: 700; }
.delta.up { color: var(--up); } .delta.down { color: var(--down); } .delta.flat { color: var(--muted); }
.last { font-size: 12px; color: var(--muted); }
.rank { position: absolute; top: 12px; left: 10px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 12px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); }

.logo { width: 20px; height: 20px; border-radius: 4px; flex: none; object-fit: contain; }
.pastille { width: 20px; height: 20px; border-radius: 5px; flex: none; display: inline-grid; place-items: center; font-size: 8px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }

/* Cartes compactes */
.grid-compact { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.mini {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--party); border-radius: 8px; text-decoration: none; color: inherit; min-width: 0;
}
.mini:hover { border-color: var(--party); }
.mini .avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.mini .avatar img { width: 100%; height: 100%; object-fit: cover; }
.mini .avatar .initials { font-size: 15px; }
.mini .txt { min-width: 0; flex: 1; }
.mini .n { font-weight: 700; font-size: 14.5px; }
.mini .p { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .s { font-family: var(--f-display); font-weight: 800; font-size: 18px; text-align: right; }
.mini .s small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); font-family: var(--f-body); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.pressenti { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--muted); }

/* Panneaux */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.two-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 860px) { .two-cols { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 340px; }
.chart-box.small { height: 260px; }

/* Duels */
.duels { display: grid; gap: 14px; }
.duel .names { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; gap: 8px; }
.duel .bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; margin-top: 5px; font-size: 12.5px; font-weight: 800; }
.duel .bar div { display: flex; align-items: center; padding-inline: 8px; white-space: nowrap; }
.duel .bar div + div { justify-content: flex-end; }
.duel .meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* Fiche */
.back { font-size: 14px; text-decoration: none; font-weight: 600; }
.hero { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 24px; align-items: start; }
@media (max-width: 860px) { .hero { grid-template-columns: 120px minmax(0, 1fr); } .hero .hero-score { grid-column: 1 / -1; } }
.hero .portrait { aspect-ratio: 4 / 4.6; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; border-bottom: 6px solid var(--party); }
.hero .portrait img { width: 100%; height: 100%; object-fit: cover; }
.hero .portrait .initials { font-size: 64px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); font-weight: 800; letter-spacing: -.02em; }
.hero .party { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; flex-wrap: wrap; }
.hero .party .logo, .hero .party .pastille { width: 28px; height: 28px; }
.hero .resume { max-width: 65ch; margin: 12px 0 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; }
.hero-score { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; min-width: 190px; }
.hero-score .score { font-size: 48px; }
.verify { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 9px 14px; font-size: 13px; }

.mandats { list-style: none; margin: 0; padding: 0; display: grid; }
.mandats li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mandats li:last-child { border-bottom: 0; }
.mandats .y { color: var(--muted); font-size: 13px; }
.mandats .en-cours .y { color: var(--accent); font-weight: 700; }
.faits { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.faits li { position: relative; font-size: 14px; }
.faits li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--party); }
.faits .y { font-weight: 800; font-family: var(--f-display); margin-right: 8px; }

/* Frise */
.frise-scroll { overflow-x: auto; }
.frise { position: relative; min-width: 560px; padding-top: 6px; }
.frise .track { position: relative; height: 46px; background: var(--surface-2); border-radius: 6px; }
.frise .seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-inline: 8px; font-size: 12px; font-weight: 700; overflow: hidden; white-space: nowrap; border-right: 2px solid var(--surface); }
.frise .seg.approx { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.frise .axis { position: relative; height: 22px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.frise .axis span { position: absolute; transform: translateX(-50%); }
.frise .axis span::before { content: ""; position: absolute; left: 50%; top: -4px; height: 4px; border-left: 1px solid var(--muted); }
.frise-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.frise-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Galaxie */
.galaxy-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: start; }
@media (max-width: 760px) { .galaxy-wrap { grid-template-columns: 1fr; } }
.galaxy svg { width: 100%; height: auto; display: block; }
.galaxy .node { cursor: default; }
.galaxy .node.link { cursor: pointer; }
.galaxy .node:hover circle.ring, .galaxy .node:focus circle.ring { stroke-width: 5; }
.galaxy text { fill: var(--ink); font-family: var(--f-body); }
.galaxy .orbit { fill: none; stroke: var(--line); stroke-dasharray: 2 5; }
.legend { font-size: 13px; display: grid; gap: 8px; }
.legend svg { vertical-align: middle; margin-right: 8px; }
.empty { color: var(--muted); font-size: 14px; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
footer .wrap { padding-block: 18px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.err { background: var(--warn-bg); color: var(--warn-ink); padding: 14px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
@media (max-width: 520px) {
  .grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .score { font-size: 28px; }
  .card .photo .initials { font-size: 40px; }
  .mandats li { grid-template-columns: 88px minmax(0, 1fr); }
}

/* Treemap programmes */
.treemap { position: relative; width: 100%; border-radius: 8px; overflow: hidden; }
.tm-cell { position: absolute; box-sizing: border-box; border: 2px solid var(--surface); border-radius: 6px; padding: 8px 10px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.tm-name { font-size: 13px; font-weight: 700; line-height: 1.2; }
.tm-pct { font-family: var(--f-display); font-size: 20px; font-weight: 800; }
.carousel { outline-offset: 4px; }
.car-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; align-items: center; }
.car-stage { min-width: 0; display: grid; gap: 10px; }
.car-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.car-name { font-family: var(--f-display); font-weight: 800; font-size: 20px; text-decoration: none; color: var(--ink); }
.car-name:hover { color: var(--accent); }
.car-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.car-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.car-btn:hover { border-color: var(--accent); color: var(--accent); }
.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.car-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--party); background: transparent; padding: 0; cursor: pointer; }
.car-dot[aria-current="true"] { background: var(--party); }
@media (max-width: 520px) { .car-row { grid-template-columns: minmax(0, 1fr); } .car-btn { display: none; } .tm-pct { font-size: 16px; } }

/* Nouveautés */
:root { --new: #e8590c; }
.new-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.3; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px 2px 7px; white-space: nowrap; vertical-align: middle; font-family: var(--f-body); letter-spacing: 0; }
.new-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--new); flex: none; }
.new-badge.compact { font-size: 11px; padding: 1px 8px 1px 6px; }
.card .new-badge { position: absolute; top: 12px; right: 10px; max-width: calc(100% - 56px); overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow); }
.mini .n .new-badge { margin-left: 2px; }
.section-head h2 .new-badge { margin-left: 10px; }
.news { display: flex; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.news-title { font-family: var(--f-display); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.news-title::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--new); }
.news ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.news li.more { color: var(--muted); }
.credit { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.credit a { color: var(--muted); }
.eyebrow .new-badge { text-transform: none; letter-spacing: 0; }

/* Liens de la fiche */
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.btn-link:hover { border-color: var(--accent); color: var(--accent); }
.btn-link.primary:hover { filter: brightness(1.08); }

/* Navigation entre fiches */
.fiche-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fiche-nav-btns { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 600; }
.nav-btn span[aria-hidden] { font-size: 20px; line-height: 1; color: var(--accent); }
.nav-btn:hover { border-color: var(--accent); }
.nav-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-rang { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .fiche-nav-btns { width: 100%; justify-content: space-between; } .nav-nom { display: none; } .nav-btn { padding: 6px 16px; } }


/* Axes des programmes : bascule candidat / thème */
.carousel > p { margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface-2); gap: 2px; }
.seg-btn { border: 0; background: transparent; color: var(--muted); font: 600 13px/1 var(--f-body); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.theme-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: 1px; flex: none; }
.axe-bars { display: grid; gap: 10px; padding-block: 6px; min-height: 280px; align-content: start; }
.axe-row { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 76px; gap: 12px; align-items: center; }
.axe-nom { display: flex; align-items: center; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.axe-nom:hover { color: var(--accent); }
.axe-track { height: 26px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.axe-bar { height: 100%; border-radius: 6px; min-width: 2px; }
.axe-val { font-family: var(--f-display); font-weight: 800; font-size: 18px; text-align: right; line-height: 1.1; }
.axe-val small { display: block; font: 600 11px var(--f-body); color: var(--muted); }
@media (max-width: 520px) { .axe-row { grid-template-columns: minmax(0, 1fr) 64px; } .axe-track { grid-column: 1 / -1; grid-row: 2; height: 18px; } .axe-nom { font-size: 13px; } }


/* Tableau des sondages */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.poll-head { margin-top: 10px; align-items: center; }
.poll-head h2 { margin-right: auto; }
a.seg-btn { text-decoration: none; display: inline-block; }
.sel { font: 600 13px/1 var(--f-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; }
.poll-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.poll-scroll { overflow: auto; max-height: calc(100vh - 150px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.poll-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.poll-table th, .poll-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.poll-table td { min-width: 52px; }
.poll-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); vertical-align: bottom; border-bottom: 2px solid var(--line); }
.poll-table .col-cand { border-top: 4px solid var(--party, var(--line)); line-height: 1.2; }
.poll-table .col-cand a { color: var(--ink); text-decoration: none; display: block; }
.poll-table .col-cand a:hover { color: var(--accent); }
.pc-prenom { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.pc-nom { display: block; font-family: var(--f-display); font-weight: 700; font-size: 13.5px; }
.pc-parti { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.poll-table .col-poll { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; border-right: 1px solid var(--line); }
.poll-table thead .col-poll { z-index: 3; }
.pl-inst { display: block; font-weight: 700; }
.pl-date { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.poll-table td.top { font-weight: 800; }
.poll-table td.na { color: var(--muted); opacity: .5; }
.poll-table .col-autres { color: var(--muted); }
.poll-table .col-src { text-align: left; font-size: 12px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.poll-table .row-moy td, .poll-table .row-moy th { background: var(--surface-2); font-weight: 700; border-bottom: 2px solid var(--line); }
.poll-table .row-moy .col-poll { background: var(--surface-2); }
.poll-table tbody tr:hover th, .poll-table tbody tr:hover td { box-shadow: inset 0 0 0 999px rgba(127,127,127,.07); }
.poll-table.dense { font-size: 13px; }
.poll-table.dense th, .poll-table.dense td { padding: 6px 7px; }
.poll-table.dense td { min-width: 44px; }
@media (max-width: 520px) { .poll-table .col-src { display: none; } .poll-table { font-size: 13px; } }
@media print { .topbar, footer, .seg, .sel, .back { display: none; } .poll-scroll { max-height: none; overflow: visible; box-shadow: none; } .poll-table thead th, .poll-table .col-poll { position: static; } }
.poll-page { min-width: 0; }

/* Page dépenses publiques (#depenses) : une réglette par domaine COFOG, drapeaux des 6 pays */
.dep-page { min-width: 0; display: grid; gap: 14px; padding-block: 18px 32px; }
.dep-page .section-head { margin-bottom: 0; }
.dep-intro { margin: 0; color: var(--muted); max-width: 75ch; }
.dep-warn { margin: 0; justify-self: start; background: var(--warn-bg); color: var(--warn-ink); padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.dep-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; }
.dep-leg { display: inline-flex; gap: 7px; align-items: center; }
.dep-leg.ze { color: var(--accent); }
.dep-ze-ico { width: 0; height: 18px; border-left: 2px dashed var(--accent); }
.dep-flag { display: flex; width: 30px; height: 20px; border: 1px solid rgba(22,27,38,.28); border-radius: 2px; overflow: hidden; flex: none; }
.dep-flag.petit { width: 24px; height: 16px; }
.dep-list { padding-block: 0; }
.dep-row { display: flex; flex-wrap: wrap; gap: 10px 32px; align-items: center; padding: 18px 0 12px; border-top: 1px solid var(--line); }
.dep-row:first-child { border-top: 0; }
.dep-row.sous { padding-left: 28px; border-top-style: dashed; }
.dep-lbl { flex: 1 1 250px; min-width: 0; display: grid; gap: 3px; }
.dep-title { display: flex; gap: 10px; align-items: baseline; }
.dep-code { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.dep-title h3 { font-size: 18px; font-weight: 700; }
.dep-row.sous .dep-title h3 { font-size: 15.5px; }
.dep-def { margin: 0; font-size: 13px; color: var(--muted); }
.dep-unit { margin: 4px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.dep-fr { margin: 0; font-size: 13px; }
.dep-track { flex: 999 1 520px; min-width: 0; position: relative; margin-inline: 18px; }
.dep-axis { position: absolute; left: 0; right: 0; height: 2px; background: var(--line); }
.dep-tick { position: absolute; width: 1px; height: 10px; background: var(--line); }
.dep-tick-lbl { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.dep-ze { position: absolute; border-left: 2px dashed var(--accent); margin-left: -1px; }
.dep-ze-lbl { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--accent); white-space: nowrap; }
.dep-dot { position: absolute; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); box-sizing: border-box; }
.dep-mark { position: absolute; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dep-ze-lbl.gauche { transform: translateX(-100%); }
.dep-val { background: var(--surface); padding: 0 3px; border-radius: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.dep-mark.fr .dep-val { color: var(--ink); font-weight: 700; }
.dep-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dep-notes h3 { font-size: 18px; margin-bottom: 8px; }
.dep-notes p, .dep-notes li { font-size: 14px; }
.dep-notes p { margin: 0 0 8px; }
.dep-notes ul { margin: 0 0 8px; padding-left: 18px; }
.dep-src { color: var(--muted); font-size: 13px !important; }
@media (max-width: 760px) { .dep-notes { grid-template-columns: 1fr; } .dep-row.sous { padding-left: 12px; } }
.dep-flag.croix { position: relative; display: block; }
.dep-flag.croix .v { position: absolute; top: 0; bottom: 0; left: 28%; width: 18%; }
.dep-flag.croix .hz { position: absolute; left: 0; right: 0; top: 40%; height: 22%; }
.dep-track.cliquable { cursor: pointer; border-radius: 8px; }
.dep-track.cliquable:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.dep-more { justify-self: start; margin-top: 6px; font: 600 12.5px/1 var(--f-body); color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; padding: 8px 12px; min-height: 32px; cursor: pointer; }
.dep-more::after { content: " ▾"; }
.dep-more[aria-expanded="true"]::after { content: " ▴"; }
.dep-rank-box { flex: 1 1 100%; background: var(--surface-2); border-radius: 8px; padding: 12px 16px; }
.dep-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 760px; }
.dep-rank li { display: grid; grid-template-columns: 22px 26px minmax(90px, 150px) minmax(0, 1fr) 72px; gap: 10px; align-items: center; font-size: 14px; }
.dep-rank-n { font-weight: 700; color: var(--muted); text-align: right; }
.dep-rank-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.dep-rank-bar span { display: block; height: 100%; background: var(--muted); border-radius: 5px; }
.dep-rank-v { text-align: right; font-variant-numeric: tabular-nums; }
.dep-rank li.fr { font-weight: 700; }
.dep-rank li.fr .dep-rank-bar span { background: var(--accent); }
.dep-rank li.hors .dep-rank-nom { color: var(--muted); }
.dep-rank li.ze { color: var(--accent); font-style: italic; }
.dep-rank li.ze .dep-ze-ico { justify-self: center; }
.dep-rank li.ze .dep-rank-bar span { background: transparent; border-right: 2px dashed var(--accent); border-radius: 0; }
.dep-rank-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .dep-rank li { grid-template-columns: 18px 24px minmax(0, 1fr) 64px; } .dep-rank-bar { display: none; } }
