/* =========================================================================
   Au crible — feuille de style
   Jetons de couleur en tête ; le mode sombre redéfinit les mêmes rôles.
   ========================================================================= */

:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --surface: #fcfcfb;
  --surface-2: #f0efea;
  --surface-3: #e7e5de;
  --ink: #111110;
  --ink-2: #4a4945;
  --muted: #6d6b65;
  --line: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.12);
  --brand: #173a63;
  --brand-ink: #ffffff;
  --link: #1d5aa6;
  --accent: #2a78d6;
  --accent-soft: #e3eefb;
  --focus: #2a78d6;
  --you: #eb6834;

  /* Échelle des verdicts : bleu (exact) ↔ gris (trompeur) ↔ rouge (inexact). Validée daltonisme. */
  --v-vrai: #256abf;
  --v-plutot-vrai: #86b6ef;
  --v-trompeur: #a3a199;
  --v-plutot-faux: #f09a96;
  --v-faux: #c93434;
  --v-inverifiable: #d9d7cf;

  /* Statuts (réservés : jamais utilisés comme couleur de série) */
  --st-good: #0ca30c;
  --st-warning: #fab219;
  --st-serious: #ec835a;
  --st-critical: #d03b3b;
  --st-neutral: #898781;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f0e;
    --surface: #1a1a19;
    --surface-2: #232321;
    --surface-3: #2e2e2b;
    --ink: #f5f5f2;
    --ink-2: #c3c2b7;
    --muted: #9d9b92;
    --line: #2c2c2a;
    --axis: #45443f;
    --border: rgba(255, 255, 255, 0.12);
    --brand: #9cc2f0;
    --brand-ink: #0f0f0e;
    --link: #86b6ef;
    --accent: #3987e5;
    --accent-soft: #16263a;
    --focus: #6da7ec;
    --you: #d95926;
    --v-vrai: #6da7ec;
    --v-plutot-vrai: #1c5cab;
    --v-trompeur: #6b6a65;
    --v-plutot-faux: #9b3030;
    --v-faux: #ec7a78;
    --v-inverifiable: #383835;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0e;
  --surface: #1a1a19;
  --surface-2: #232321;
  --surface-3: #2e2e2b;
  --ink: #f5f5f2;
  --ink-2: #c3c2b7;
  --muted: #9d9b92;
  --line: #2c2c2a;
  --axis: #45443f;
  --border: rgba(255, 255, 255, 0.12);
  --brand: #9cc2f0;
  --brand-ink: #0f0f0e;
  --link: #86b6ef;
  --accent: #3987e5;
  --accent-soft: #16263a;
  --focus: #6da7ec;
  --you: #d95926;
  --v-vrai: #6da7ec;
  --v-plutot-vrai: #1c5cab;
  --v-trompeur: #6b6a65;
  --v-plutot-faux: #9b3030;
  --v-faux: #ec7a78;
  --v-inverifiable: #383835;
  --shadow: none;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.7rem); margin: 1.6em 0 0.6em; }
h3 { font-size: 1.12rem; margin: 1.2em 0 0.4em; }
p { margin: 0 0 0.9em; }
small, .small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
main { min-height: 70vh; padding-top: 24px; padding-bottom: 48px; }
main:focus { outline: none; }
.loading { color: var(--muted); padding: 48px 0; }

/* ---------- En-tête ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--brand); display: inline-flex; }
.brand-text { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; line-height: 1.05; }
.brand-text small { display: block; font-family: var(--sans); font-weight: 500; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; }
.main-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  text-decoration: none; color: var(--ink-2); padding: 7px 11px; border-radius: 999px;
  font-size: 0.95rem; white-space: nowrap;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.theme-toggle {
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
  width: 36px; height: 36px; border-radius: 999px; display: inline-grid; place-items: center; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 720px) {
  .main-nav { order: 3; width: 100%; margin-left: 0; }
  .theme-toggle { margin-left: auto; }
}

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0 32px; font-size: 0.9rem; color: var(--ink-2); }
.footer-inner p { max-width: 760px; }

/* ---------- Blocs génériques ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 760px; }
.kicker { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin: 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.94rem; color: var(--ink-2); margin: 12px 0;
}
.notice strong { color: var(--ink); }
.notice.legal { border-left-color: var(--st-neutral); }
.notice.warn { border-left-color: var(--st-warning); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  padding: 9px 16px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover { opacity: 0.9; }
.btn.small { padding: 5px 12px; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px;
  font-size: 0.8rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface-2); color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.chip.st-good .dot { background: var(--st-good); }
.chip.st-warning .dot { background: var(--st-warning); }
.chip.st-serious .dot { background: var(--st-serious); }
.chip.st-critical .dot { background: var(--st-critical); }
.chip.st-neutral .dot { background: var(--st-neutral); }
.tandem { border-left: 3px solid var(--accent); padding-left: 8px; color: var(--ink-2); }
.chip.chip-ia { border-style: dashed; background: var(--accent-soft); color: var(--ink); cursor: help; }
.chart .lbl-strong .note { font-weight: 400; }

/* ---------- Filtres ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 14px 0 18px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.84rem; color: var(--muted); min-width: 0; }
.field select, .field input {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; min-width: 0; max-width: 100%;
}
.field input[type="search"] { min-width: 220px; }
@media (max-width: 520px) { .field, .field input[type="search"] { width: 100%; min-width: 0; } }

/* ---------- Accueil ---------- */
.hero { padding: 24px 0 8px; }
.hero h1 { max-width: 820px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pillars { margin-top: 28px; }
.pillar { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.pillar:hover { border-color: var(--axis); }
.pillar h3 { margin-top: 4px; }
.pillar p { color: var(--ink-2); margin: 0; font-size: 0.95rem; }
.facts-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 24px; }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-tile .label { font-size: 0.84rem; color: var(--muted); }
.stat-tile .value { font-size: 1.7rem; font-weight: 650; line-height: 1.2; }

/* ---------- Candidats ---------- */
.avatar {
  --size: 52px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; letter-spacing: 0.02em;
  background: var(--surface-3); color: var(--ink-2); font-size: calc(var(--size) * 0.36);
  border: 1px solid var(--border);
}
.avatar.lg { --size: 84px; }
.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-title h2 { margin-bottom: 0.3em; }

/* ---------- Fiche ---------- */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.profile-head h1 { margin: 0; }
.profile-head .party { color: var(--ink-2); font-size: 1.05rem; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 20px; overflow-x: auto; scrollbar-width: thin; }
.tabs a {
  text-decoration: none; color: var(--ink-2); padding: 10px 14px; border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 500; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.tabs .count { font-size: 0.78rem; color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--axis);
}
.timeline li.current::before { background: var(--accent); border-color: var(--accent); }
.timeline .when { font-size: 0.84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .what { font-weight: 600; }

.affaire { border-left: 4px solid var(--st-neutral); }
.affaire.st-good { border-left-color: var(--st-good); }
.affaire.st-warning { border-left-color: var(--st-warning); }
.affaire.st-serious { border-left-color: var(--st-serious); }
.affaire.st-critical { border-left-color: var(--st-critical); }
.affaire h3 { margin: 6px 0 4px; }
.affaire .qualif { color: var(--ink-2); font-size: 0.95rem; }
.chrono { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.93rem; }
.chrono li { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 6px 0; border-top: 1px dashed var(--line); }
.chrono li:first-child { border-top: 0; }
.chrono .d { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .chrono li { grid-template-columns: 1fr; gap: 0; } }

.sources { font-size: 0.84rem; color: var(--muted); margin-top: 10px; }
.sources ol, .sources ul { margin: 4px 0 0; padding-left: 20px; }
.sources li { margin: 2px 0; overflow-wrap: anywhere; }
.src-inline { font-size: 0.82rem; white-space: nowrap; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.vote { white-space: nowrap; font-weight: 650; }
.vote-pour { color: var(--ink); }
.vote-contre { color: var(--ink); }
.vote-mark { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.vote-mark.pour { background: var(--v-vrai); }
.vote-mark.contre { background: var(--v-faux); }
.vote-mark.abstention { background: var(--v-trompeur); }
.vote-mark.absent, .vote-mark.non_votant, .vote-mark.non_censure { background: transparent; border: 1.5px solid var(--axis); }

/* ---------- Verdicts ---------- */
.verdict {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em;
  text-transform: uppercase; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  white-space: nowrap;
}
.verdict .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.sw-vrai { background: var(--v-vrai); }
.sw-plutot_vrai { background: var(--v-plutot-vrai); }
.sw-trompeur { background: var(--v-trompeur); }
.sw-plutot_faux { background: var(--v-plutot-faux); }
.sw-faux { background: var(--v-faux); }
.sw-inverifiable { background: repeating-linear-gradient(45deg, var(--v-inverifiable) 0 3px, transparent 3px 6px); border: 1px solid var(--axis); }

.claim { display: grid; gap: 8px; }
.claim blockquote {
  margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; color: var(--ink);
  border-left: 3px solid var(--line); padding-left: 14px;
}
.claim .who { font-size: 0.88rem; color: var(--muted); }
.claim .who a { color: inherit; }
.claim .explain { color: var(--ink-2); font-size: 0.97rem; }
.claim .refdata { font-size: 0.9rem; background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.claim .foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--muted); align-items: center; }

/* Barres empilées de distribution des verdicts */
.dist { display: grid; gap: 10px; }
.dist-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 70px; gap: 12px; align-items: center; }
.dist-row .lbl { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-row .lbl a { color: var(--ink); text-decoration: none; }
.dist-row .lbl a:hover { text-decoration: underline; }
.dist-row .n { font-size: 0.82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.stackbar { display: flex; height: 16px; gap: 2px; border-radius: 4px; overflow: hidden; background: transparent; }
.stackbar span { display: block; height: 100%; min-width: 3px; cursor: default; }
.stackbar span:first-child { border-radius: 4px 0 0 4px; }
.stackbar span:last-child { border-radius: 0 4px 4px 0; }
.stackbar span:only-child { border-radius: 4px; }
@media (max-width: 560px) { .dist-row { grid-template-columns: 1fr 56px; } .dist-row .lbl { grid-column: 1 / -1; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.84rem; color: var(--ink-2); margin: 8px 0 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Graphiques SVG */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-2); font: 12px var(--sans); }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .ci { stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.chart .pt { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.chart .pt-you { fill: var(--you); stroke: var(--surface); stroke-width: 2; }
.chart .pt-cand { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .lbl-strong { fill: var(--ink); font-weight: 600; }
.chart .note { fill: var(--muted); font-size: 11.5px; }
.chart .axis-title { fill: var(--muted); font-size: 11.5px; }
.chart .hit { fill: transparent; cursor: pointer; }
.tooltip {
  position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--surface);
  font-size: 0.82rem; padding: 6px 9px; border-radius: 6px; max-width: 280px; box-shadow: 0 4px 14px rgba(0,0,0,.2);
  opacity: 0; transition: opacity .1s;
}
.tooltip.on { opacity: 1; }

/* ---------- Comparateur ---------- */
.quiz { max-width: 760px; }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 8px 0 18px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.q-theme { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.q-text { font-family: var(--serif); font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem); line-height: 1.3; margin: 6px 0 12px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.scale button {
  font: inherit; font-size: 0.9rem; padding: 12px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer; line-height: 1.25; min-height: 64px;
}
.scale button:hover { background: var(--surface-2); }
.scale button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
@media (max-width: 560px) { .scale { grid-template-columns: 1fr; } .scale button { min-height: 0; } }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.importance { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--ink-2); cursor: pointer; }
.importance input { width: 18px; height: 18px; accent-color: var(--accent); }
details.more { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--link); font-size: 0.93rem; }
details.more .args { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 10px; font-size: 0.93rem; color: var(--ink-2); }

.result-list { display: grid; gap: 8px; }
.result {
  display: grid; grid-template-columns: 34px minmax(140px, 220px) 1fr 64px; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px;
  cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%;
}
.result:hover { border-color: var(--axis); }
.result[aria-expanded="true"] { border-color: var(--ink-2); }
.result .rank { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.result .nm { font-weight: 650; }
.result .nm small { display: block; font-weight: 400; color: var(--muted); }
.result .pct { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.meter { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
@media (max-width: 600px) {
  .result { grid-template-columns: 28px 1fr 56px; }
  .result .meter { grid-column: 2 / -1; }
}
.detail-cmp { font-size: 0.92rem; }
.detail-cmp td:first-child { width: 45%; }
.pos { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pos-scale { display: inline-flex; gap: 2px; }
.pos-scale i { width: 9px; height: 9px; border-radius: 2px; background: var(--surface-3); display: inline-block; }
.pos-scale i.on { background: var(--ink); }
.pos-scale i.you { background: var(--you); }
.pos-scale i.on.you { background: linear-gradient(135deg, var(--ink) 50%, var(--you) 50%); }

/* ---------- Pour / contre ---------- */
.pc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pc-col h3 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.pc-col ul { margin: 0; padding-left: 0; list-style: none; }
.pc-col li { padding: 10px 0; border-top: 1px solid var(--line); }
.pc-col li:first-child { border-top: 0; padding-top: 0; }
.pc-col .attrib { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* ---------- Débats (verbatim) ---------- */
.avatar.small { --size: 34px; }
.talk-times { display: grid; gap: 6px; }
.talk-row {
  display: grid; grid-template-columns: minmax(130px, 1fr) minmax(90px, 3fr) auto; gap: 12px; align-items: center;
  padding: 7px 8px; border-radius: 8px; text-decoration: none; color: inherit;
}
.talk-row:hover, .talk-row:focus-visible { background: var(--surface-2); }
.talk-row .nm { font-weight: 600; }
.talk-row .val { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.9rem; }
.turn {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.turn.r-animation, .turn.r-presentation { background: var(--surface-2); border-style: dashed; }
.turn.r-question { border-left: 4px solid var(--accent); }
.turn-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.turn-head .who { font-weight: 600; line-height: 1.2; }
.turn-head .who small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--muted); }
.turn-head .ts {
  font-variant-numeric: tabular-nums; font-size: 0.85rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--ink-2); white-space: nowrap;
}
.turn-head .ts:hover { border-color: var(--accent); color: var(--accent); }
.turn-body p { margin: 0 0 8px; }
.turn-body p:last-child { margin-bottom: 0; }
.turn-checks { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; display: grid; gap: 6px; }
.turn-checks .check { display: flex; gap: 10px; align-items: baseline; text-decoration: none; color: var(--ink-2); font-size: 0.88rem; }
.turn-checks .check:hover { color: var(--ink); }
.checks-list { list-style: none; margin: 0; padding: 0; }
.checks-list li { border-top: 1px solid var(--line); padding: 8px 0; }
.checks-list li:first-child { border-top: 0; padding-top: 0; }
.checks-list a { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; text-decoration: none; color: inherit; }
.checks-list a:hover strong { text-decoration: underline; }
.turn-body mark { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
@media (max-width: 640px) {
  .talk-row { grid-template-columns: 1fr auto; }
  .talk-row .meter { grid-column: 1 / -1; order: 3; }
}

/* ---------- Notes et duel ---------- */
.note-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.note-cell.vide { color: var(--muted); }
.note-bar { width: 54px; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; flex: none; }
.note-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.note-val { font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.note-val abbr { text-decoration: none; color: var(--muted); }
.notes-table th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.notes-table td { padding: 4px 8px; }
.notes-table thead th { font-size: 0.82rem; vertical-align: bottom; }
.cellule { background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; cursor: pointer; width: 100%; text-align: left; }
.cellule:hover, .cellule:focus-visible { border-color: var(--line); background: var(--surface-2); }
.note-detail .crit { border-top: 1px solid var(--line); padding: 10px 0; }
.note-detail .elements { margin: 6px 0 0; padding-left: 18px; }
.note-detail .elements li { margin: 8px 0; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row {
  display: grid; grid-template-columns: 1.6em minmax(140px, 1.4fr) minmax(70px, 2fr) auto; gap: 12px; align-items: center;
  padding: 8px; border-radius: 8px; text-decoration: none; color: inherit; border-top: 1px solid var(--line);
}
.rank-list li:first-child .rank-row { border-top: 0; }
.rank-row:hover, .rank-row:focus-visible { background: var(--surface-2); }
.rank-row .nm { font-weight: 600; }
.rank-row .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.rank-row .val { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.rank-row .val small { font-weight: 400; }
@media (max-width: 560px) {
  .rank-row { grid-template-columns: 1.6em 1fr auto; }
  .rank-row .meter { grid-column: 2 / -1; }
}
.rank-row .rang { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.duel-grille { border-top: 1px solid var(--line); padding: 12px 0; }
.duel-grille:first-child { border-top: 0; padding-top: 0; }
.duel-line { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 8px; align-items: center; margin: 6px 0 4px; }
.duel-bar { height: 12px; background: var(--surface-3); border-radius: 999px; overflow: hidden; display: block; }
.duel-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.duel-bar.a { transform: scaleX(-1); }
.duel-num { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 2.4em; }
.duel-num.a { text-align: right; }
.duel-empty { font-size: 0.8rem; color: var(--muted); text-align: center; }
table.mini { width: 100%; font-size: 0.9rem; }
table.mini th { text-align: center; font-weight: 500; }
table.mini td.num { font-variant-numeric: tabular-nums; width: 3.5em; text-align: center; }
dl.faits { margin: 0; }
dl.faits dt { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
dl.faits dd { margin: 2px 0 0; }

/* ---------- Méthode ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.8em; }
.prose li { margin: 4px 0; }
.scale-table td:first-child { white-space: nowrap; }

.empty {
  border: 1px dashed var(--axis); border-radius: var(--radius); padding: 22px; color: var(--ink-2); background: var(--surface);
}
.empty strong { color: var(--ink); }

@media print {
  .site-header, .site-footer, .filters, .theme-toggle { display: none; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Scrutins rattachés à une question du comparateur, et écarts entre paroles et votes */
.liste-votes { margin: 6px 0 0; padding-left: 18px; }
.liste-votes li { margin-bottom: 8px; }
.ecart { color: var(--ink-2); border-left: 3px solid var(--st-warning); padding-left: 10px; }

/* Classement de référence : sous-notes par pilier */
.rank-ref { display: flex; align-items: center; gap: 10px; }
.piliers { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px 38px; }
.piliers .pilier { font-size: .78rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; cursor: help; }
.piliers .pilier strong { color: var(--ink); }

/* Portraits (photos libres de droits ; initiales en repli) */
.avatar.avec-photo { background: var(--surface-3); overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.credit-photo { font-size: .78rem; color: var(--ink-2); margin: 6px 0 0; }

/* Poids des affaires judiciaires */
.grosse-note { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1; }
.grosse-note small { font-size: .9rem; color: var(--ink-2); font-weight: 400; }
.note-justice .meter { height: 8px; }

/* Classement de fiabilité factuelle */
.fiab-list { list-style: none; margin: 4px 0 10px; padding: 0; }
.fiab-list li { display: grid; grid-template-columns: 26px 34px minmax(190px, 1.6fr) minmax(110px, 1.1fr) 72px;
  gap: 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.fiab-list li:last-child { border-bottom: 0; }
.fiab-list .rang { color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.fiab-list .nm a { text-decoration: none; font-weight: 600; }
.fiab-list .nm small { display: block; color: var(--ink-2); font-size: .78rem; }
.fiab-list .val { text-align: right; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.fiab-list .val small { font-size: .72rem; color: var(--ink-2); font-weight: 400; }
.verdict-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.verdict-bar .seg { height: 100%; }
.seg.exact, .sw.exact { background: #3f9d6d; }
.seg.trompeur, .sw.trompeur { background: #d8a13a; }
.seg.inexact, .sw.inexact { background: #c2563f; }
.fiab-legend { gap: 14px; flex-wrap: wrap; font-size: .8rem; }
.fiab-legend .sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; }
@media (max-width: 620px) {
  .fiab-list li { grid-template-columns: 22px 30px 1fr 60px; }
  .fiab-list .verdict-bar { grid-column: 3 / span 2; }
}

/* ---------- Liste des candidats : un répertoire, pas une grille de vignettes ---------- */
.cand-liste { list-style: none; margin: 4px 0 26px; padding: 0; border-top: 1px solid var(--line); }
.cand-liste > li { border-bottom: 1px solid var(--line); }
.cand-ligne {
  display: grid; grid-template-columns: 38px minmax(190px, 1.5fr) auto minmax(260px, 1fr);
  gap: 14px; align-items: center; padding: 11px 6px; text-decoration: none; color: inherit;
}
.cand-ligne:hover, .cand-ligne:focus-visible { background: var(--surface-2); outline: none; }
.cand-ligne .ident { min-width: 0; }
.cand-ligne .nom { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.06rem; line-height: 1.25; }
.cand-ligne .parti { display: block; color: var(--ink-2); font-size: 0.86rem; }
.cand-ligne .statut { justify-self: start; }
.cand-ligne .mesures { display: flex; justify-content: flex-end; gap: 18px; }
.cand-ligne .m { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; cursor: help; }
.cand-ligne .m b { font-variant-numeric: tabular-nums; font-size: 0.98rem; }
.cand-ligne .m small { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.03em; text-transform: uppercase; }
@media (max-width: 860px) {
  .cand-ligne { grid-template-columns: 38px 1fr auto; row-gap: 8px; }
  .cand-ligne .mesures { grid-column: 1 / -1; justify-content: flex-start; gap: 16px; flex-wrap: wrap; }
  .cand-ligne .m { align-items: flex-start; }
}
