/* ============================================================
   Observatoire 2027 — esprit institutionnel / éditorial
   Police Inter (licence SIL — Marianne est réservée à l'État)
   Bleu France #000091 · Rouge #e1000f · Blanc, angles droits.
   ============================================================ */

@font-face { font-family: "Inter"; src: url("/fonts/Inter-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --bleu: #000091;        /* Bleu France */
  --bleu-2: #1212ff;      /* hover */
  --rouge: #e1000f;       /* Rouge Marianne */
  --ink: #161616;         /* texte */
  --muted: #3a3a48;
  --faint: #666;
  --paper: #ffffff;
  --alt: #f6f6f6;         /* fond de section */
  --alt-2: #eeeeec;
  --line: #dddddd;
  --line-strong: #161616;
  --maxw: 1200px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.5; -webkit-font-smoothing: antialiased; font-size: 16px;
  overflow-x: hidden; /* absolute-positioned charts (échiquier…) must never cause page-wide H-scroll */
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
b { font-weight: 700; }

/* ---------- header : bloc-marque RF ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px); min-height: 76px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 16px; }
.site-id { display: flex; align-items: center; gap: 10px; line-height: 1.1; }
.logo-mark { width: 36px; height: 36px; flex: none; display: block; }
.site-id-text { display: flex; flex-direction: column; }
.site-id-kicker { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.site-id-title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.site-id-title b { color: var(--bleu); }

.site-nav { display: flex; gap: 4px; align-self: stretch; }
.site-nav a {
  display: flex; align-items: center; font-size: 14px; font-weight: 500; padding: 0 16px;
  color: var(--ink); border-bottom: 2px solid transparent; transition: color .12s, border-color .12s, box-shadow .12s;
}
.site-nav a:hover { color: var(--bleu); box-shadow: inset 0 -2px 0 var(--line); }
.site-nav a.active { color: var(--bleu); border-bottom-color: var(--bleu); font-weight: 700; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.section { padding: clamp(32px, 5vw, 56px) 0; }
.loading { max-width: var(--maxw); margin: 90px auto; text-align: center; color: var(--faint); }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--rouge); margin: 0; }
.kicker.bleu { color: var(--bleu); }
.tri-rule { height: 4px; width: 56px; display: inline-block; background: linear-gradient(90deg, var(--bleu) 0 50%, var(--rouge) 50% 100%); }

/* ---------- hero ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 4vw, 52px) clamp(16px,4vw,40px) clamp(24px,3vw,36px); }
/* two-column hero: text + stats on the left, vertical polls aside on the right */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 348px); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero-main { min-width: 0; }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 700; letter-spacing: -.025em; margin-top: 12px; }
.hero h1 .yr { color: var(--bleu); }
.hero .lede { max-width: 600px; margin-top: 14px; font-size: clamp(15px, 1.7vw, 17px); color: var(--muted); font-weight: 400; }
.hero .tri-rule { margin-top: 20px; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-left: 4px solid var(--bleu); margin-top: 26px; background: var(--paper); }
.stat { padding: 13px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { font-size: clamp(21px, 2.6vw, 28px); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.stat .l { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.stat:nth-child(1) .n { color: var(--bleu); }
.stat:nth-child(4) .n { color: var(--rouge); }

/* ---------- panels & cards (squared, bordered, flat) ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.panel-head h2 { font-size: 22px; }
.panel-note { font-size: 12.5px; color: var(--faint); }

/* ---------- spectrum ---------- */
.spectrum { position: relative; margin: 18px 24px 26px; height: 240px; }
.spectrum-axis { position: absolute; left: 0; right: 0; top: 50%; height: 4px; background: linear-gradient(90deg, var(--rouge), #cfcfd6 50%, var(--bleu)); }
.spectrum-ticklabels { position: absolute; left: 0; right: 0; top: calc(50% + 14px); display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.spectrum-mid { position: absolute; left: 50%; top: 6px; bottom: 30px; width: 1px; background: repeating-linear-gradient(var(--line) 0 4px, transparent 4px 8px); }
.cand-dot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.cand-dot .tag { font-size: 10.5px; font-weight: 700; color: var(--ink); white-space: nowrap; background: rgba(255,255,255,.92); padding: 1px 5px; opacity: 0; transition: opacity .12s; }
.cand-dot:hover .tag, .cand-dot.has-data .tag { opacity: 1; }
.cand-dot:hover { z-index: 5; }
.cand-dot .ava { transition: transform .12s; }
.cand-dot:hover .ava { transform: scale(1.12); }

/* ---------- monogram (squared, état-style) ---------- */
.mono { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; font-weight: 700; letter-spacing: .02em; flex: none; transition: transform .12s; }

/* ---------- avatar : portrait officiel, anneau = position politique ---------- */
.ava { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; color: #fff; font-weight: 700; letter-spacing: .02em; vertical-align: middle; background: #e9e9ee; }
.ava img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

/* ---------- candidate cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0; border: 1px solid var(--line); }
.grid .card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: -.5px; }
.card { background: var(--paper); padding: 22px; display: flex; flex-direction: column; gap: 13px; transition: background .12s, box-shadow .12s; position: relative; }
a.card:hover { background: var(--alt); box-shadow: inset 4px 0 0 var(--bleu); }
.card-top { display: flex; align-items: center; gap: 13px; }
.card .mono { width: 46px; height: 46px; font-size: 16px; }
.card-name { font-size: 19px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.card-party { font-size: 12.5px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.card-foot .count { font-size: 12.5px; color: var(--muted); }
.card-foot .count b { color: var(--ink); font-size: 15px; }
.card.empty { opacity: .6; }

/* ---------- badges & tags ---------- */
.badge { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; display: inline-block; }
.badge.declared { background: var(--bleu); color: #fff; }
.badge.likely { background: #fff; color: var(--bleu); box-shadow: inset 0 0 0 1.5px var(--bleu); }
.badge.rumored { background: var(--alt-2); color: var(--muted); }
.tag-bloc { font-size: 11px; font-weight: 700; padding: 2px 9px; color: #fff; }
.src { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; }
.src.press { background: #e3e3fd; color: var(--bleu); }
.src.own { background: #feecc2; color: #695240; }
.src.independent { background: var(--alt-2); color: var(--muted); }

/* ---------- left-right gauge ---------- */
.gauge { position: relative; height: 8px; background: linear-gradient(90deg, var(--rouge), #d8d8de 50%, var(--bleu)); }
.gauge .pin { position: absolute; top: 50%; width: 14px; height: 14px; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--ink); }
.gauge-labels { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 7px; font-weight: 700; }

/* ---------- matrix ---------- */
.matrix-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--paper); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13px; }
table.matrix thead th { position: sticky; top: 0; background: var(--paper); z-index: 2; border-bottom: 3px solid var(--bleu); }
.mx-cand { padding: 14px 10px; text-align: center; vertical-align: bottom; }
.mx-cand .mono { width: 30px; height: 30px; font-size: 12px; margin: 0 auto 6px; }
.mx-cand .nm { font-size: 12px; font-weight: 700; line-height: 1.15; }
.mx-cluster td { background: var(--bleu); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; }
.mx-topic { border-bottom: 1px solid var(--line); }
.mx-rowlabel { padding: 10px 14px; min-width: 230px; border-right: 1px solid var(--line); }
.mx-rowlabel .nm { font-weight: 700; font-size: 13px; }
.mx-rowlabel .poles { font-size: 10.5px; color: var(--faint); margin-top: 2px; display: flex; justify-content: space-between; gap: 10px; }
.mx-cell { text-align: center; font-weight: 700; font-size: 14px; border-left: 1px solid var(--line); cursor: pointer; transition: filter .1s; }
.mx-cell:hover { filter: brightness(.92); }
.mx-cell .v { display: block; padding: 12px 6px 2px; }
.mx-cell .n { display: block; font-weight: 500; font-size: 9.5px; opacity: .6; padding-bottom: 7px; }
.mx-cell.empty { color: var(--line); cursor: default; }
.legend { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 16px; flex-wrap: wrap; }
.legend .bar { height: 10px; width: 180px; background: linear-gradient(90deg, var(--bleu), #eee 50%, var(--rouge)); }

/* ---------- comparateur : dot-plot par thème ---------- */
.dp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 0 12px; border-top: 1px solid var(--line); }
.filt-group { display: flex; align-items: center; gap: 6px; }
.filt-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.filt-btn { font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.filt-btn:hover { background: var(--alt); box-shadow: inset 0 -2px 0 var(--bleu); }
.filt-select { font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.filt-count { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dp-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 0 14px; margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dp-leg { display: flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 700; background: none; border: 0; padding: 2px; cursor: pointer; color: var(--ink); transition: opacity .12s, filter .12s; }
.dp-leg .ava { width: 24px; height: 24px; font-size: 10px; }
.dp-leg:hover { color: var(--bleu); }
.dp-leg.off { opacity: .36; filter: grayscale(.85); }
.dp-leg.off:hover { opacity: .7; }
.dp { border: 1px solid var(--line); }
.dp-cluster { background: var(--bleu); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 8px 16px; }
.dp-row { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; padding: 8px 18px 8px 16px; border-bottom: 1px solid var(--line); }
.dp-row:last-child { border-bottom: 0; }
.dp-name { font-weight: 700; font-size: 14px; letter-spacing: -.01em; color: var(--ink); }
a.dp-name:hover { color: var(--bleu); text-decoration: underline; }

/* ---------- topic deep-dive ---------- */
.topic-hero { border: 1px solid var(--line); margin-bottom: 10px; }
.topic-hero .dp-name { display: none; }
.topic-hero .dp-row { grid-template-columns: 1fr; padding: 12px 24px; }
.topic-cand { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.topic-cand-head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.topic-cand-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.topic-cand-name:hover { color: var(--bleu); }
.topic-cand-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.topic-cand-meta .axis-chip { font-size: 12px; padding: 1px 8px; }
.thin-flag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #7a5200; background: #fdeec2; padding: 1px 6px; }

/* ---------- prose (méthodologie) ---------- */
.prose h2 { font-size: 18px; font-weight: 700; margin: 26px 0 6px; letter-spacing: -.01em; }
.prose p { color: var(--muted); margin: 0 0 8px; font-size: 14.5px; line-height: 1.6; }
.prose ul { color: var(--muted); font-size: 14.5px; line-height: 1.6; padding-left: 20px; margin: 4px 0; }
.prose b { color: var(--ink); }
.dp-plot { position: relative; }
.dp-base { position: absolute; left: 0; right: 0; bottom: 20px; height: 2px; background: linear-gradient(90deg, rgba(0,0,145,.22), rgba(22,22,22,.08) 50%, rgba(225,0,15,.22)); }
.dp-zero { position: absolute; left: 50%; top: 4px; bottom: 20px; width: 1px; background: repeating-linear-gradient(var(--line) 0 4px, transparent 4px 7px); }
.dp-stem { position: absolute; bottom: 20px; width: 2px; transform: translateX(-50%); opacity: .4; }
.dp-dot { position: absolute; transform: translateX(-50%); line-height: 0; cursor: pointer; z-index: 1; }
.dp-dot .ava { transition: transform .12s; }
.dp-dot:hover { z-index: 4; }
.dp-dot:hover .ava { transform: scale(1.18); }
.dp-pole { position: absolute; bottom: 1px; font-size: 10px; color: var(--faint); max-width: 44%; line-height: 1.15; }
.dp-pole.l { left: 0; }
.dp-pole.r { right: 0; text-align: right; }
@media (max-width: 760px) { .dp-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- comparateur : infobulle « pourquoi » ---------- */
.cmp-tip { position: absolute; z-index: 200; max-width: 380px; max-height: 72vh; overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--bleu); box-shadow: 0 14px 40px -12px rgba(20,21,46,.45); padding: 13px 15px; font-size: 12.5px; display: none; pointer-events: auto; }
.cmp-tip-h a { color: var(--ink); font-weight: 700; }
.cmp-tip-h a:hover { color: var(--bleu); }
.cmp-srclink { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 700; color: var(--bleu); }
.cmp-srclink:hover { color: var(--rouge); text-decoration: underline; }
.cmp-tip-foot a { color: var(--bleu); font-weight: 700; }
.cmp-tip-foot a:hover { text-decoration: underline; }
.cmp-tip-h { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.cmp-poles { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; color: var(--faint); margin: 4px 0 0; }
.cmp-tip-sub { color: var(--muted); font-size: 11.5px; margin: 6px 0 9px; }
.cmp-tip ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.cmp-tip li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.cmp-ax { font-weight: 700; font-size: 11px; padding: 1px 6px; flex: none; margin-top: 1px; }
.cmp-tip li i { color: var(--muted); }
.cmp-src { display: block; color: var(--faint); font-size: 10.5px; font-style: normal; margin-top: 2px; }
.cmp-tip-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }

/* ---------- candidate detail ---------- */
.detail-hero { border-bottom: 1px solid var(--line); background: var(--alt); }
.detail-hero-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(28px,4vw,48px) clamp(16px,4vw,40px); display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.detail-hero .mono { width: 92px; height: 92px; font-size: 32px; }
.detail-name { font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -.02em; }
.detail-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 14px; }
/* profile metric strip: uniform cells (label / value / graphic pinned bottom), equal heights */
.pmetrics { display: grid; grid-template-columns: var(--pm-cols, auto auto 1fr 1fr); border: 1px solid var(--line); background: var(--paper); margin-top: 22px; max-width: 920px; }
.pm { display: flex; flex-direction: column; gap: 3px; padding: 13px 20px 12px; border-right: 1px solid var(--line); min-width: 0; color: var(--ink); }
.pm:last-child { border-right: 0; }
.pm-l { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-v { font-size: 27px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; white-space: nowrap; }
.pm-v small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.pm-delta { display: inline-block; font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 7px; vertical-align: 3px; letter-spacing: 0; }
.pm-graph { margin-top: auto; padding-top: 8px; }
a.pm-link:hover { background: var(--alt); }
a.pm-link:hover .pm-l { color: var(--bleu); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.back:hover { color: var(--bleu); }

.cluster-block { margin-top: 36px; }
.cluster-title { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--bleu); }
.cluster-title::before { content: ""; width: 14px; height: 14px; background: linear-gradient(90deg, var(--bleu) 0 50%, var(--rouge) 50%); flex: none; }
.cluster-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.subtopic { margin-top: 20px; }
.subtopic-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.subtopic-head .nm { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.stance { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.stance .track { position: relative; flex: 1; height: 6px; background: var(--alt-2); }
.stance .track .zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.stance .track .fill { position: absolute; top: 0; bottom: 0; }
.stance .pole { font-size: 10px; color: var(--faint); width: 80px; }
.stance .pole.r { text-align: right; }

.quotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 16px; }
.quote { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--bleu); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.quote-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.axis-chip { font-weight: 700; font-size: 13px; padding: 2px 9px; color: #fff; }
.quote .label { font-weight: 700; font-size: 14px; }
.quote blockquote { margin: 0; font-size: 16px; line-height: 1.4; color: var(--ink); position: relative; padding-left: 16px; }
.quote blockquote::before { content: "«"; position: absolute; left: -2px; top: -2px; color: var(--rouge); font-size: 22px; line-height: 1; font-weight: 700; }
.quote .nuance { font-size: 12.5px; color: var(--muted); font-style: italic; }
.quote.enriched { border-left-style: dashed; }
.quote-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.quote-tags .conf { font-size: 11px; color: var(--faint); }
.vbadge { font-size: 10px; font-weight: 700; padding: 2px 7px; letter-spacing: .02em; }
.vbadge.ok { background: #d8f0dd; color: #0a7a2f; }
.vbadge.corr { background: #fde9c0; color: #7a5200; }
.vbadge.bad { background: #fbdada; color: #a31515; }
.vbadge.enr { background: #e3e3fd; color: var(--bleu); }
.quote-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; color: var(--muted); }
.quote-foot .ts { display: inline-flex; align-items: center; gap: 5px; color: var(--bleu); font-weight: 700; }
.quote-foot .ts:hover { color: var(--rouge); text-decoration: underline; }

/* ---------- episodes ---------- */
.eps { margin-top: 16px; border: 1px solid var(--line); }
.ep { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.ep:last-child { border-bottom: 0; }
.ep:hover { background: var(--alt); }
.ep .d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ep .t { font-size: 13.5px; font-weight: 500; }
.ep .t small { color: var(--faint); font-weight: 400; }
.ep .meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }

/* ---------- sondages ---------- */
.filt-btn.on { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.filt-btn.on:hover { background: var(--bleu-2); box-shadow: none; }
.sd-leg:not(.off) span { box-shadow: inset 0 -3px 0 var(--sc); padding-bottom: 1px; }
.sd-plot { position: relative; }
.sd-plot svg { display: block; width: 100%; height: auto; }
.sd-plot:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.sd-grid { stroke: #ececec; stroke-width: 1; }
.sd-ytick { font: 500 11px var(--font); fill: var(--faint); text-anchor: end; font-variant-numeric: tabular-nums; }
.sd-xtick { font: 500 11px var(--font); fill: var(--faint); text-anchor: middle; }
.sd-dot { fill-opacity: .3; transition: fill-opacity .1s; }
.sd-dot.on { fill-opacity: 1; stroke: #fff; stroke-width: 1.5; }
.sd-crossline { stroke: #b9b9c4; stroke-width: 1; }
.sd-endlabel { font: 600 11.5px var(--font); fill: #262626; }
.sd-endval { font-weight: 700; fill: var(--ink); }
.sd-m .sd-endlabel { font-size: 10px; }
.sd-m .sd-ytick, .sd-m .sd-xtick { font-size: 10px; }
.sd-tip { position: absolute; z-index: 210; min-width: 190px; max-width: 300px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--bleu); box-shadow: 0 14px 40px -12px rgba(20,21,46,.45); padding: 11px 13px; font-size: 12.5px; display: none; pointer-events: none; }
.sd-tip-h { font-weight: 700; font-size: 12.5px; margin-bottom: 8px; }
.sd-tip ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sd-tip li { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.sd-tip li i { width: 12px; height: 3px; flex: none; border-radius: 1px; }
.sd-tip li b { min-width: 52px; text-align: right; }
.sd-tip li span { color: var(--muted); }
.sd-tip-sub { color: var(--faint); font-size: 11px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.sd-snap { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sd-card { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-left: 3px solid var(--sc); padding: 12px 14px; background: var(--paper); }
.sd-card:hover { background: var(--alt); }
.sd-card-body { min-width: 0; flex: 1; }
.sd-card-name { font-weight: 700; font-size: 13.5px; line-height: 1.15; }
.sd-card-party { font-size: 11px; color: var(--faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-card-val { text-align: right; }
.sd-card-val b { display: block; font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.sd-card-val b small { font-size: 13px; font-weight: 600; color: var(--muted); }
.sd-card-val span { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.sd-card-val .sd-delta { font-variant-numeric: tabular-nums; }
.sd-card-val .sd-delta.up { color: #1a7f4b; }
.sd-card-val .sd-delta.down { color: #b02a37; }
/* home hero: vertical "sondages · 1er tour" aside */
.hero-polls { border: 1px solid var(--line); background: var(--paper); align-self: stretch; }
.hero-polls-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.hero-polls-head .kicker { margin: 0; }
.hero-polls-note { font-size: 11px; color: var(--faint); }
.hero-polls-list { display: flex; flex-direction: column; }
.hero-polls .sd-card { border: 0; border-left: 3px solid var(--sc); border-bottom: 1px solid var(--line); padding: 9px 14px; gap: 10px; }
.hero-polls .sd-card:last-child { border-bottom: 0; }
.hero-polls .sd-card-name { font-size: 13px; }
.hero-polls .sd-card-val b { font-size: 18px; }
.hero-polls .sd-card-val b small { font-size: 11px; }
.hero-polls-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.hero-polls-foot a { color: var(--bleu); font-weight: 600; white-space: nowrap; }
.sd-duels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sd-duel { border: 1px solid var(--line); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 9px; background: var(--paper); }
.sd-duel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 13.5px; }
.sd-duel-nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sd-duel-nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-duel-vs { color: var(--faint); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; flex: none; }
.sd-duel-row { display: flex; align-items: center; gap: 9px; font-variant-numeric: tabular-nums; }
.sd-duel-row b { font-size: 15px; flex: none; }
.sd-duel-bar { display: flex; height: 18px; flex: 1; position: relative; }
.sd-duel-bar > span:first-child { margin-right: 2px; }
.sd-duel-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink); opacity: .4; }
.sd-duel-spark { width: 100%; height: 36px; display: block; }
.sd-duel-meta { font-size: 11.5px; color: var(--faint); }
.sd-table-wrap { overflow-x: auto; border: 1px solid var(--line); }
.sd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sd-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 10px 12px; border-bottom: 2px solid var(--line-strong); white-space: nowrap; }
.sd-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sd-table tr:last-child td { border-bottom: 0; }
.sd-table .nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-hyp { color: var(--muted); font-style: italic; max-width: 150px; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sd-chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sd-chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sd-chip.untracked { color: var(--faint); }
.sd-note { font-size: 12px; color: var(--faint); margin-top: 22px; max-width: 760px; line-height: 1.55; }
.sd-note a { color: var(--bleu); font-weight: 600; }
.sd-note a:hover { text-decoration: underline; }

/* ---------- fiche candidat : mini-courbe sondages + duel ---------- */
.cand-spark { display: block; width: 100%; height: 34px; }
.detail-compare { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.detail-compare label { font-weight: 600; }

/* ---------- mode duel ---------- */
/* vs-composition: candidate cards on the sides, both charts stacked in the center */
.duel-head { display: grid; grid-template-columns: minmax(170px, 225px) minmax(0, 1fr) minmax(170px, 225px); align-items: center; gap: clamp(14px, 2.5vw, 38px); margin: 12px 0 10px; }
.duel-cand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; min-width: 0; color: var(--ink); }
.duel-cand-id { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.duel-mid { display: grid; gap: 12px; min-width: 0; justify-items: center; }
.duel-mid > * { width: 100%; max-width: 640px; }
.duel-cand-nm { font-size: clamp(18px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; }
.duel-cand:hover .duel-cand-nm { color: var(--bleu); }
.duel-cand-pty { font-size: 12.5px; color: var(--muted); }
.duel-cand-id .tag-bloc { margin-top: 2px; }
.duel-trend { font-size: 12px; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.duel-vs { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 0 2px; text-align: center; }
.duel-secondround { margin: 0; }
.duel-body { margin-top: 20px; border-top: 1px solid var(--line); }
.duel-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 15px 0; font-size: 13px; font-weight: 700; }
.duel-legend span { display: inline-flex; align-items: center; gap: 7px; }
.duel-legend i, .duel-labels i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff; }
.duel-legend-note { font-weight: 500; color: var(--faint); font-size: 11.5px; }
.duel-section-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin: 24px 0 8px; display: flex; align-items: baseline; gap: 10px; }
.duel-section-title span { font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); }
.duel-chart { border: 1px solid var(--line); padding: 14px 16px 10px; background: var(--paper); }
.duel-chart svg { display: block; width: 100%; height: auto; }
.duel-chart-lbl { font: 600 11px var(--font); fill: #262626; }
.duel-chart-note { font-size: 11px; color: var(--faint); margin-top: 7px; }
.duel-chart-note a { color: var(--bleu); font-weight: 600; }
.duel-rows { border: 1px solid var(--line); }
.duel-row { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.duel-row:last-child { border-bottom: 0; }
.duel-row > summary { list-style: none; cursor: pointer; display: block; }
.duel-row > summary::-webkit-details-marker { display: none; }
.duel-row > summary:hover { background: var(--alt); box-shadow: inset 3px 0 0 var(--bleu); margin: -14px -16px; padding: 14px 16px; }
.duel-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.duel-topic { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.duel-row > summary:hover .duel-topic { color: var(--bleu); }
.duel-toggle { display: inline-block; font-size: 10px; color: var(--faint); transition: transform .15s; }
.duel-row[open] .duel-toggle { transform: rotate(180deg); }
.duel-quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; padding: 16px 0 4px; }
.duel-qcol { min-width: 0; }
.duel-qcol-t { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.duel-qcol-t i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff; }
.duel-q { border-left: 3px solid var(--line); padding: 7px 11px; margin-bottom: 8px; font-size: 12.5px; line-height: 1.45; }
.duel-q i.q { display: block; color: var(--muted); margin: 3px 0 2px; }
.duel-q-src { display: inline-block; font-size: 11px; color: var(--bleu); font-weight: 600; margin-top: 2px; }
.duel-q-src.muted { color: var(--faint); font-weight: 400; }
.duel-q-src:not(.muted):hover { text-decoration: underline; }
.duel-qnone { font-size: 12px; color: var(--faint); font-style: italic; }
.duel-row-foot { padding: 6px 0 4px; font-size: 12px; }
.duel-row-foot a { color: var(--bleu); font-weight: 600; }
.duel-row-foot a:hover { text-decoration: underline; }
.duel-cluster { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; white-space: nowrap; }
.duel-axis { display: grid; grid-template-columns: minmax(0, 34%) 1fr minmax(0, 34%); align-items: center; gap: 12px; }
.duel-pole { font-size: 10px; color: var(--faint); line-height: 1.15; }
.duel-pole.r { text-align: right; }
.duel-track { position: relative; height: 6px; background: var(--alt-2); }
.duel-zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.duel-mark { position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; margin-top: -4px; box-shadow: 0 0 0 2px #fff; }
.duel-labels { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.duel-labels > div { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.duel-labels i { align-self: center; }
.duel-labels b { color: var(--ink); font-weight: 700; }
.duel-solo { margin-top: 22px; border: 1px solid var(--line); background: var(--alt); }
.duel-solo summary { cursor: pointer; padding: 12px 16px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.duel-solo summary:hover { color: var(--bleu); }
.duel-solo-list { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 2px 16px 14px; }
.duel-solo-list span { font-size: 12px; color: var(--faint); }
.duel-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; }
.duel-picker .filt-select { font-size: 14px; padding: 8px 10px; min-width: 200px; }
.duel-picker-vs { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.duel-err { background: #fdeec2; color: #7a5200; font-size: 13px; padding: 10px 14px; margin-bottom: 16px; font-weight: 500; }

/* ---------- accueil : quoi de neuf ---------- */
.actu-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.actu-col { padding: 18px 24px 22px; border-right: 1px solid var(--line); border-top: 1px solid transparent; min-width: 0; }
.actu-col:last-child { border-right: 0; }
.actu-col-t { margin-bottom: 8px; font-size: 11px; }
.actu-list { display: flex; flex-direction: column; }
.actu-item { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); }
.actu-item:first-child { border-top: 0; }
.actu-item:hover { color: var(--bleu); }
.actu-item .ava { flex: none; }
.actu-item-b { min-width: 0; flex: 1; }
.actu-item-nm { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.actu-item-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; line-height: 1.3; }
.actu-move { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.actu-move b { display: block; font-size: 15px; line-height: 1.05; }
.actu-move b small { font-size: 10px; font-weight: 600; color: var(--muted); }
.actu-move span { font-size: 10.5px; color: var(--muted); }
.actu-poll { padding: 10px 0; }
.actu-poll-txt { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.actu-poll-txt b { color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { margin-top: 48px; border-top: 2px solid var(--bleu); padding: 30px clamp(16px,4vw,40px) 54px; display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 10px; align-items: center; flex: none; }
.footer-brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.footer-brand-name b { color: var(--bleu); }
.footer-text { color: var(--muted); font-size: 12.5px; max-width: 720px; }
.footer-meta { color: var(--faint); margin-top: 8px; }
.footer-links { margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--faint); transition: color .12s; }
.footer-links a:hover { color: var(--bleu); text-decoration: underline; }
.footer-links .sep { color: var(--line); margin: 0 9px; font-size: 12px; }

/* ---------- pages légales : signaler une erreur ---------- */
.quote-foot .flag { margin-left: auto; font-size: 11px; color: var(--faint); transition: color .12s; }
.quote-foot .flag:hover { color: var(--rouge); text-decoration: underline; }

/* ---------- crédits & attributions ---------- */
.credit-list { list-style: none; padding: 0; margin: 16px 0 6px; border: 1px solid var(--line); }
.credit-row { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.credit-row:last-child { border-bottom: 0; }
.credit-row .ava { width: 40px; height: 40px; }
.credit-name { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.credit-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.credit-meta a { color: var(--bleu); font-weight: 600; }
.credit-meta a:hover { text-decoration: underline; }

/* collapse the two-column hero before the left column gets cramped */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-polls { max-width: 520px; }
}

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .detail-hero-inner { grid-template-columns: 1fr; }
  .site-id-kicker { display: none; }

  /* header: brand on top, nav on its own horizontally-scrollable row */
  .site-header { flex-wrap: wrap; gap: 0; min-height: 0; padding: 10px 14px 0; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 4px -14px 0; padding: 0 8px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 10px 9px; font-size: 13.5px; white-space: nowrap; }

  /* comparateur: dots baseline raised so wrapped pole labels fit below */
  .dp-base, .dp-stem, .dp-zero { bottom: 30px; }

  /* échiquier: compact, no name tags (identity = photo, tap opens the profile) */
  .spectrum { margin: 10px 10px 28px; height: 185px; }
  .cand-dot { transform: translate(-50%, -50%) scale(.7); }
  .cand-dot .tag, .cand-dot.has-data .tag { display: none; }
  .spectrum-ticklabels { top: auto; bottom: -20px; }

  /* candidate page: stance bar drops under the subtopic name */
  .subtopic-head { flex-direction: column; align-items: stretch; gap: 6px; }
  .stance { min-width: 0; }
  .pmetrics { grid-template-columns: 1fr 1fr !important; max-width: none; }
  .pm { border-right: 0; border-bottom: 1px solid var(--line); padding: 11px 14px 10px; }
  .pm:first-child { border-right: 1px solid var(--line); }
  .pm-wide { grid-column: 1 / -1; }
  .pmetrics .pm:last-child { border-bottom: 0; }

  /* duel: symmetric header stays but tightens; axis poles stack over the track */
  .duel-head { grid-template-columns: 1fr 1fr; gap: 10px; }
  .duel-mid, .duel-vs { grid-column: 1 / -1; order: 3; }
  .duel-cand { gap: 8px; }
  .duel-cand-nm { font-size: 16px; }
  .duel-axis { grid-template-columns: 1fr; gap: 5px; }
  .duel-labels { grid-template-columns: 1fr; }
  .duel-quotes { grid-template-columns: 1fr; }
  .duel-secondround .sd-duel { max-width: none; }
  .duel-picker .filt-select { min-width: 0; flex: 1; }

  /* quoi de neuf: one column, dividers become horizontal */
  .actu-col { border-right: 0; border-top: 1px solid var(--line); }
  .actu-col:first-child { border-top: 0; }

  /* sondages: tighter cards & filters */
  .sd-snap { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 8px; }
  .sd-card { min-width: 0; padding: 10px 11px; gap: 8px; }
  .sd-card .ava { display: none; }
  .sd-card-val b { font-size: 19px; }
  .hero-polls .sd-card .ava { display: flex; }  /* keep identity in the hero list */
  .sd-duels { grid-template-columns: 1fr; }
  .dp-filters { gap: 8px 12px; }
  .filt-count { display: none; }
}
