/* Les 2 Tours : feuille de style. Palette catégorielle des candidats : méthode dataviz (palette de référence
   validée, ordre fixe des teintes) ; mode sombre choisi, pas inversé automatiquement. Polices servies localement
   (vendor/fonts, licence OFL), sans appel à un service tiers. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(vendor/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(vendor/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(vendor/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(vendor/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url(vendor/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url(vendor/fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --plan: #f8f6f2;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --encre: #111a2e;
  --encre-2: #47526a;
  --encre-3: #6a7386;
  --grille: #e4e7ee;
  --axe: #c5cad6;
  --bord: rgba(17, 26, 46, 0.09);
  --ombre: 0 1px 2px rgba(17, 26, 46, 0.04), 0 6px 24px rgba(17, 26, 46, 0.05);
  --accent: #1f5fd1;
  --marine: #14213d;
  --titre: #14213d;
  --lien-fort: #14213d;
  --marine-2: #22345d;
  --sur-marine: #f3f6fc;
  --ciel-1: #e9f0fb;
  --ciel-2: #f7f5f1;
  --alerte-fond: #fff4dc;
  --alerte-bord: #eda100;
  --point-neutre: #a9afbc;
  --logo-bleu: #2563eb; --logo-blanc: #ffffff; --logo-trait: #c8d1e3; --logo-rouge: #e3383b;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --autre: #898781;
  --hausse: #16894a; --baisse: #d03535;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --plan: #0c111c; --surface: #141b2a; --surface-2: #1b2435;
    --encre: #eef1f7; --encre-2: #c0c7d6; --encre-3: #9aa3b5;
    --grille: #263042; --axe: #3a4558; --bord: rgba(255, 255, 255, 0.09);
    --ombre: 0 1px 2px rgba(0, 0, 0, 0.3);
    --accent: #5b93f0; --titre: #eef1f7; --lien-fort: #5b93f0; --marine: #1a2848; --marine-2: #24365e; --sur-marine: #f3f6fc;
    --ciel-1: #13203a; --ciel-2: #0c111c;
    --alerte-fond: #2e2410; --alerte-bord: #c98500; --point-neutre: #5d6678;
    --logo-blanc: #e9eef8; --logo-trait: #e9eef8; --hausse: #3fbf73; --baisse: #f06464;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --plan: #0c111c; --surface: #141b2a; --surface-2: #1b2435;
  --encre: #eef1f7; --encre-2: #c0c7d6; --encre-3: #9aa3b5;
  --grille: #263042; --axe: #3a4558; --bord: rgba(255, 255, 255, 0.09);
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.3);
  --accent: #5b93f0; --titre: #eef1f7; --lien-fort: #5b93f0; --marine: #1a2848; --marine-2: #24365e; --sur-marine: #f3f6fc;
  --ciel-1: #13203a; --ciel-2: #0c111c;
  --alerte-fond: #2e2410; --alerte-bord: #c98500; --point-neutre: #5d6678;
  --logo-blanc: #e9eef8; --logo-trait: #e9eef8; --hausse: #3fbf73; --baisse: #f06464;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--plan); color: var(--encre); line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
code { font-size: 0.9em; }
h1, h2, h3 { margin: 0; }
.cadre { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.evitement { position: absolute; left: -999px; }
.evitement:focus { left: 16px; top: 8px; background: var(--surface); padding: 4px 8px; z-index: 20; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ barre de navigation */
.barre { background: color-mix(in srgb, var(--plan) 88%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--bord); }
.barre-int { display: flex; align-items: center; gap: 6px 18px; min-height: 72px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.barre-int > * { flex-shrink: 0; }
.barre .cadre { max-width: 1320px; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); }
.logo { width: 42px; height: 34px; flex: none; }
.marque-texte { display: flex; flex-direction: column; line-height: 1.1; }
.marque-nom { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; text-transform: uppercase; letter-spacing: 0.01em; }
.marque-devise { font-size: 0.76rem; color: var(--encre-2); margin-top: 2px; white-space: nowrap; }
.menu { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.menu button { font: inherit; font-family: var(--serif); font-weight: 600; font-size: 0.95rem; color: var(--encre); background: none; border: 0;
  border-bottom: 2.5px solid transparent; padding: 8px 7px; white-space: nowrap; cursor: pointer; }
.menu button:hover { color: var(--accent); }
.menu button[aria-current="page"] { border-bottom-color: var(--accent); }
.barre-droite { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.maj { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; color: var(--encre-2); white-space: nowrap; }
.voyant { width: 8px; height: 8px; border-radius: 50%; background: #1fa95f; box-shadow: 0 0 0 3px rgba(31, 169, 95, 0.18); }
.pilule { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.85rem; font-weight: 500; color: var(--encre);
  background: var(--surface); border: 1px solid var(--bord); border-radius: 999px; padding: 7px 14px; cursor: pointer; box-shadow: var(--ombre); white-space: nowrap; }
.pilule svg { width: 17px; height: 17px; }

.bandeaux { display: flex; flex-wrap: wrap; gap: 8px; }
.bandeaux:not(:empty) { padding-top: 10px; }
.bandeau { font-size: 0.84rem; padding: 5px 12px; border-radius: 10px; border: 1px solid var(--bord); background: var(--surface-2); color: var(--encre-2); }
.bandeau.fort { background: var(--alerte-fond); border-color: var(--alerte-bord); color: var(--encre); }

/* ------------------------------------------------------------------ accueil : en-tête */
.heros { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--ciel-2) 0%, var(--ciel-1) 55%, var(--plan) 100%); }
.heros-int { position: relative; padding-top: 34px; padding-bottom: 54px; }
.heros-decor { position: absolute; inset: 0; pointer-events: none; }
.disque { position: absolute; border-radius: 50%; background: color-mix(in srgb, var(--surface) 70%, var(--ciel-1)); }
.d1 { width: 540px; height: 540px; right: -90px; top: 40px; opacity: 0.85; }
.d2 { width: 360px; height: 360px; right: 300px; top: 140px; opacity: 0.55; }
.heros-image { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; background-size: cover; background-position: center 35%;
  clip-path: ellipse(92% 120% at 100% 45%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%); mask-image: linear-gradient(90deg, transparent 0%, #000 22%); }
.etiquette { display: inline-block; margin: 0 0 18px; padding: 4px 12px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--titre); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.grand-titre { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -0.015em;
  color: var(--titre); max-width: 12em; }
.heros-texte { font-size: 1.1rem; color: var(--encre-2); max-width: 33em; margin: 18px 0 24px; }
.bouton-principal { display: inline-flex; align-items: center; gap: 10px; background: var(--marine); color: #fff; text-decoration: none; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; box-shadow: 0 6px 18px rgba(20, 33, 61, 0.22); }
.bouton-principal svg { width: 20px; height: 20px; }
.bouton-principal:hover { background: var(--marine-2); }

/* ------------------------------------------------------------------ panneaux */
.panneau { background: var(--surface); border: 1px solid var(--bord); border-radius: 16px; box-shadow: var(--ombre); padding: 20px 22px; min-width: 0; }
.titre-panneau { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.32rem; color: var(--titre); }
.titre-panneau .icone { width: 26px; height: 26px; }
.puce { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.sous-panneau { margin: 4px 0 0; color: var(--encre-2); font-size: 0.92rem; }
/* haut de l'accueil : chances d'être élu et accès au second tour sur deux tiers, l'avis signé sur le tiers restant */
.une { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; margin-top: -26px; position: relative; }
.une:has(> .avis[hidden]) { grid-template-columns: minmax(0, 1fr); }
.une-principale { display: grid; gap: 18px; min-width: 0; }
.une .election, .une .acces, .une .election:not([hidden]) + .acces { margin-top: 0; }
.une:not(:has(> .avis[hidden])) .acces-corps { grid-template-columns: 1fr; }      /* « À retenir » sous le podium */
/* avis signé : présentation de messagerie (en-tête de conversation, séparateur de jour, bulle) */
.avis-tete { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--grille); }
.avis-tete .titre-panneau { font-size: 1.15rem; }
.avis-photo { flex: none; width: 58px; height: 58px; font-size: 1.15rem; border-width: 2px; --c: var(--accent); --c-texte: var(--titre); }
.avis-jour { text-align: center; margin: 14px 0 22px; }
.avis-jour span { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--encre-2); background: var(--surface-2); border-radius: 999px; padding: 3px 12px; }
.bulle { position: relative; margin: 0; padding: 18px 18px 10px; border-radius: 18px 18px 18px 4px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.bulle::before { content: "\201C"; position: absolute; top: 4px; right: 14px; font-family: var(--serif); font-weight: 700;
  font-size: 3.6rem; line-height: 1; color: color-mix(in srgb, var(--accent) 45%, var(--surface)); pointer-events: none; }
.bulle-titre { margin: 0 0 8px; padding-right: 40px; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--titre); }
.bulle-texte { line-height: 1.6; color: var(--encre); }
.bulle-texte p { margin: 0 0 0.75em; }
.bulle-texte a { color: var(--accent); }
.bulle-heure { text-align: right; font-size: 0.76rem; color: var(--encre-2); margin-top: -2px; }
.acces { margin-top: -26px; position: relative; }
/* chances d'être élu : première tuile de l'accueil quand elles sont publiées */
.election { margin-top: -26px; position: relative; }
.election:not([hidden]) + .acces { margin-top: 18px; }
.election-corps { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 28px; margin-top: 16px; align-items: center; }
.tirage { background: var(--surface-2); border-radius: 14px; padding: 18px 20px; }
.tirage-titre { margin: 0 0 12px; font-family: var(--serif); font-weight: 700; font-size: 1.12rem; color: var(--titre); }
.jetons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; justify-items: center; }
.election-corps { align-items: stretch; }
.tirage { display: flex; flex-direction: column; justify-content: center; }
.tirage .jeton { width: 100%; max-width: 64px; }
.jeton { aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14);
  display: grid; place-items: center; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 0.78rem;
  animation: jeton 0.42s cubic-bezier(.3, 1.5, .5, 1) backwards; transition: transform 0.15s; animation-delay: calc(var(--i) * 28ms); }
.jeton.vide { background: none; border: 2px dashed var(--axe); box-shadow: none; }
@keyframes jeton { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .jeton { animation: none; } }
.tirage-legende { margin: 12px 0 0; font-size: 0.98rem; line-height: 1.45; }
.tirage-legende strong { color: var(--titre); }
.favoris { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.favori { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--grille); }
.favori:first-child { border-top: 0; }
.favori .avatar { width: 52px; height: 52px; font-size: 1.05rem; border-width: 2px; }
.favori .qui { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.favori .chiffre { font-family: var(--serif); font-weight: 700; font-size: 2rem; line-height: 1; color: var(--c-texte); text-align: right; white-space: nowrap; }
.favori:first-child .chiffre { font-size: 2.6rem; }
.favori .chiffre.long, .favori:first-child .chiffre.long { font-size: 1.35rem; }
.tendance { display: flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--encre-2); margin-top: 2px; cursor: help; }
.tendance .etiq { font-weight: 600; }
.forte_hausse .etiq, .hausse .etiq { color: var(--hausse); }
.forte_baisse .etiq, .baisse .etiq { color: var(--baisse); }
.etincelle { width: 84px; height: 26px; flex: none; overflow: visible; }
.favori-droite { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.acces-corps { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; margin-top: 14px; align-items: stretch; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.marche { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 6px 16px; align-items: center; padding: 6px 20px; border-left: 1px solid var(--grille); }
.marche:first-child { border-left: 0; padding-left: 0; }
.avatar { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.6rem;
  color: var(--c-texte); background: color-mix(in srgb, var(--c) 20%, var(--surface)); border: 3px solid color-mix(in srgb, var(--c) 45%, var(--surface));
  background-size: cover; background-position: center; }
.marche .chiffre { font-family: var(--serif); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--c-texte); }
.marche .qui { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; margin-top: 6px; }
.marche .part { font-size: 0.86rem; color: var(--encre-2); }
.dynamique-c { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--encre-2); margin-top: 3px; cursor: help; }
.fleches { display: inline-flex; gap: 0; }
.fleches svg { width: 17px; height: 17px; }
.forte_hausse .fleches, .hausse .fleches { color: var(--hausse); }
.forte_baisse .fleches, .baisse .fleches { color: var(--baisse); }
.stable .fleches { color: var(--encre-3); }
.forte_hausse .fleches svg + svg, .forte_baisse .fleches svg + svg { margin-left: -6px; }
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jauge { grid-column: 1 / -1; align-self: end; height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.jauge > span { display: block; height: 100%; border-radius: 999px; background: var(--c); }
.retenir { background: var(--surface-2); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.retenir h3 { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.15rem; color: var(--titre); }
.retenir h3 svg { width: 22px; height: 22px; color: var(--accent); }
.retenir p { margin: 0; font-size: 0.96rem; line-height: 1.45; flex: 1; }
.lien-fleche { color: var(--lien-fort); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
a.lien-fleche:hover, .piste:hover .lien-fleche { text-decoration: underline; }
.offre-choix { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--grille); }
.offre-choix label { font-weight: 600; font-size: 0.9rem; }
.offre-choix select { width: auto; max-width: 100%; min-width: 0; }
.offre-note { margin: 8px 0 0; font-size: 0.86rem; color: var(--encre-2); }
.offre-note a { font-weight: 600; }

.grille-dyn { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; margin-top: 18px; }
.panneau-tete { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.segments { display: flex; gap: 6px; flex-wrap: wrap; }
.segments button { font: inherit; font-size: 0.82rem; font-weight: 500; border: 0; border-radius: 999px; padding: 7px 13px; cursor: pointer;
  background: var(--surface-2); color: var(--encre); }
.segments button[aria-selected="true"] { background: var(--titre); color: var(--surface); }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 0.84rem; color: var(--encre-2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.graphe-large { min-height: 260px; }
.graphe-large svg { max-width: 100%; height: auto; overflow: visible; }
.sombre { background: linear-gradient(160deg, var(--marine) 0%, var(--marine-2) 100%); color: var(--sur-marine); border-color: transparent; position: relative; overflow: hidden; }
.modele h2 { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.32rem; color: #fff; }
.modele h2 svg { width: 30px; height: 30px; flex: none; }
.modele p { font-size: 0.95rem; line-height: 1.55; color: rgba(243, 246, 252, 0.88); position: relative; z-index: 1; }
.bouton-clair { position: relative; z-index: 1; font: inherit; font-weight: 600; font-size: 0.92rem; background: #fff; color: var(--marine); border: 0;
  border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.urne { position: absolute; right: 8px; bottom: 6px; width: 130px; opacity: 0.9; }

.pistes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.piste { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--bord); border-radius: 16px;
  box-shadow: var(--ombre); padding: 20px 22px; text-decoration: none; color: var(--encre); min-height: 170px; overflow: hidden; }
.piste:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--bord)); }
.piste h3 { display: flex; gap: 8px; align-items: flex-start; font-family: var(--serif); font-size: 1.12rem; color: var(--titre); max-width: 15em; position: relative; z-index: 1; }
.piste h3 svg { width: 24px; height: 24px; flex: none; }
.piste p { margin: 0; font-size: 0.88rem; color: var(--encre-2); max-width: calc(100% - 120px); position: relative; z-index: 1; }
.piste .lien-fleche { margin-top: auto; position: relative; z-index: 1; }
.piste-illus { position: absolute; right: 12px; bottom: 12px; width: 120px; opacity: 0.9; }

/* ------------------------------------------------------------------ détail et pages */
.detail { margin-top: 34px; }
.titre-section { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; color: var(--titre); margin: 30px 0 12px; }
.detail .titre-section { margin-top: 0; }
.page { padding-top: 30px; padding-bottom: 20px; }
.titre-page { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--titre); margin-bottom: 8px; }
.chapeau { font-size: 1.04rem; max-width: 75ch; margin: 0 0 18px; color: var(--encre-2); }
.avertissement { background: var(--alerte-fond); border-left: 4px solid var(--alerte-bord); padding: 10px 14px; border-radius: 6px; max-width: 90ch; }
.page h3, #regles h2 { font-family: var(--serif); font-size: 1.12rem; margin: 14px 0 6px; }
.encadre { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 6px 18px; }
.encadre h2 { font-family: var(--serif); font-size: 1.2rem; margin-top: 10px; color: var(--encre); }

.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 8px; }
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; box-shadow: var(--ombre); }
.carte .nom { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.95rem; }
.pastille { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.carte .proba { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; margin: 2px 0 0; line-height: 1.2; }
.carte .detail-c { font-size: 0.8rem; color: var(--encre-2); margin: 0; }
.carte .detail-c.faible { color: var(--encre-3); font-size: 0.75rem; margin-top: 4px; }

.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 8px 18px; }
.graphe { margin: 0; background: var(--surface); border: 1px solid var(--bord); border-radius: 14px; box-shadow: var(--ombre); padding: 6px 18px 14px;
  margin-top: 16px; min-width: 0; }
.graphe figcaption h3 { margin-top: 12px; font-family: var(--serif); font-size: 1.12rem; }
.graphe figcaption p { margin: 2px 0 8px; color: var(--encre-2); font-size: 0.86rem; }
.graphe svg { max-width: 100%; height: auto; overflow: visible; }
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 6px 18px; }
.multiples h4 { font-size: 0.92rem; margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }

.choix { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 16px 18px; }
.choix label, .filtre, .reglages label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--encre-2); gap: 3px; min-width: 0; }
.choix label { flex: 0 1 230px; }
.choix label.large { flex: 1 1 300px; }
.large-tout { flex-basis: 100%; margin: 0; }
select, input[type=range], .reglages button, .boutons button {
  font: inherit; font-size: 0.9rem; color: var(--encre); background: var(--surface);
  border: 1px solid var(--axe); border-radius: 8px; padding: 6px 9px; min-height: 36px;
}
select { max-width: 100%; min-width: 0; width: 100%; }
.boutons button { cursor: pointer; }
.boutons button:hover { background: var(--surface-2); }
.filtre select { width: auto; max-width: 100%; }
.reglages { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px 24px; align-items: start; }
.reglages h2 { grid-column: 1 / -1; font-family: var(--serif); font-size: 1.2rem; }
.reglages > p, .reglages .boutons { grid-column: 1 / -1; }
.reglages > p { margin: 0; color: var(--encre-2); font-size: 0.88rem; }
.reglages label { font-size: 0.86rem; color: var(--encre); }
.reglages small { color: var(--encre-2); }
.reglages output { font-weight: 600; }
.boutons { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.etat { font-size: 0.85rem; color: var(--encre-2); }
.desactive { opacity: 0.5; pointer-events: none; }
.empile > .graphe { max-width: 680px; }
.empile .defile { margin-top: 16px; }

.tableau { border-collapse: collapse; width: 100%; font-size: 0.86rem; background: var(--surface); }
.tableau th, .tableau td { text-align: left; padding: 6px 9px; border-bottom: 1px solid var(--grille); vertical-align: top; }
.tableau th { color: var(--encre-2); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.tableau td.n, .tableau th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau td.duel { min-width: 15em; }
.defile { overflow-x: auto; max-width: 100%; border: 1px solid var(--bord); border-radius: 10px; }
.defile.haut { max-height: 540px; overflow-y: auto; }
.note, .mention { font-size: 0.84rem; color: var(--encre-2); }

/* ------------------------------------------------------------------ pied */
.pied { padding: 36px 0 28px; }
.bande { display: flex; align-items: center; gap: 18px 22px; flex-wrap: wrap; background: linear-gradient(110deg, var(--marine) 0%, var(--marine-2) 100%);
  color: var(--sur-marine); border-radius: 18px; padding: 22px 26px; }
.bande .logo { width: 52px; height: 42px; }
.bande-texte { flex: 1 1 320px; }
.bande-texte p { margin: 0; font-size: 0.9rem; color: rgba(243, 246, 252, 0.82); }
.bande-texte .bande-titre { font-family: var(--serif); font-size: 1.2rem; color: #fff; margin-bottom: 2px; }
.bouton-contour { font: inherit; font-weight: 600; font-size: 0.92rem; color: #fff; background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px; padding: 10px 18px; cursor: pointer; }
.bouton-contour:hover { background: rgba(255, 255, 255, 0.08); }
.pied > .cadre > .note { margin-top: 12px; }

/* ------------------------------------------------------------------ petits écrans */
@media (max-width: 1359px) {
  .menu { order: 3; flex-basis: 100%; margin-top: -6px; }
}
@media (max-width: 1080px) {
  .acces-corps { grid-template-columns: 1fr; }
  .election-corps { grid-template-columns: 1fr; }
  .choix .reglages { grid-template-columns: 1fr; }
  .une { grid-template-columns: minmax(0, 1fr); }
  .grille-dyn { grid-template-columns: 1fr; }
  .panneau.modele { padding-right: 150px; }
}
@media (max-width: 820px) {
  .barre { position: static; }
  .barre-int { gap: 6px 14px; }
  .menu { order: 3; flex-basis: 100%; }
  .podium { grid-template-columns: 1fr; }
  .marche { border-left: 0; border-top: 1px solid var(--grille); padding: 14px 0; }
  .marche:first-child { border-top: 0; padding-top: 0; }
  .pistes { grid-template-columns: 1fr; }
  .d1 { width: 360px; height: 360px; right: -160px; }
  .d2 { display: none; }
  .heros-image { width: 100%; opacity: 0.25; }
}
@media (max-width: 520px) {
  .maj { display: none; }
  .marque-nom { font-size: 1.2rem; }
  .avatar { width: 62px; height: 62px; font-size: 1.3rem; }
  .marche .chiffre { font-size: 2.2rem; }
  .panneau.modele { padding: 16px 16px 130px; }
  .piste-illus { width: 110px; opacity: 0.5; }
  .panneau { padding: 16px; }
}
@media (forced-colors: active) {
  .pastille, .legende i, .jauge > span { forced-color-adjust: none; }
}

.mentions-legales { max-width: 80ch; }
.mentions-legales h2 { font-family: var(--serif); font-size: 1.45rem; color: var(--titre); margin: 30px 0 12px; }
.mentions-legales h3 { font-family: var(--serif); font-size: 1.15rem; margin: 22px 0 6px; }
.mentions-legales p, .mentions-legales li { font-size: 0.95rem; color: var(--encre-2); }
.mentions-legales ul { padding-left: 1.2em; }

/* partage : une action près du résultat principal, aperçu avant partage */
.bouton-partage { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--titre);
  background: var(--surface); border: 1px solid var(--bord); border-radius: 999px; padding: 6px 14px; cursor: pointer; white-space: nowrap; }
.bouton-partage:hover, .bouton-partage:focus-visible { border-color: var(--accent); color: var(--accent); }
.fenetre-partage { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--bord); border-radius: 16px;
  padding: 20px 22px; background: var(--surface); color: var(--encre); box-shadow: var(--ombre); }
.fenetre-partage::backdrop { background: rgba(17, 26, 46, 0.45); }
.fenetre-partage h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 1.25rem; color: var(--titre); }
.fenetre-partage img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--bord); display: block; }
.fp-fermer { position: absolute; top: 10px; right: 12px; margin: 0; }
.fp-fermer button { font-size: 1.5rem; line-height: 1; background: none; border: 0; color: var(--encre-2); cursor: pointer; padding: 4px 8px; }
.fp-contexte { margin: 14px 0 6px; display: grid; gap: 4px; font-size: 0.92rem; }
.fp-contexte div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.fp-contexte dt { color: var(--encre-2); }
.fp-contexte dd { margin: 0; overflow-wrap: anywhere; }
.fp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fp-actions button { font: inherit; font-weight: 600; color: var(--titre); background: var(--surface); border: 1px solid var(--bord); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.fp-actions button:hover, .fp-actions button:focus-visible { border-color: var(--accent); color: var(--accent); }
.fp-etat { min-height: 1.2em; margin: 8px 0 0; }

/* données : un groupe par enquête */
.donnees tr.enquete th { text-align: left; font-weight: 600; background: var(--surface-2); color: var(--titre); padding-top: 10px; }
.donnees td.vide { color: var(--encre-2); font-size: 0.85em; }
.donnees td:first-child { min-width: 230px; }
.favori .chiffre-libelle { font-size: 0.78rem; color: var(--encre-2); text-align: right; white-space: nowrap; }
/* dépliant « Tous les candidats » : une barre entière cliquable, action écrite et chevron */
.depli { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.depli::-webkit-details-marker { display: none; }
.depli::marker { content: ""; }
.depli:hover, .depli:focus-visible { border-color: var(--accent); }
.depli-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.depli-titre { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.32rem; color: var(--titre); }
.depli-sous { color: var(--encre-2); font-size: 0.92rem; }
.depli-action { flex: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.92rem; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--surface)); border-radius: 999px; padding: 7px 14px; }
.depli-action svg { width: 18px; height: 18px; transition: transform 0.2s; }
.tous[open] .depli-action svg { transform: rotate(180deg); }
.depli-fermer, .tous[open] .depli-ouvrir { display: none; }
.tous[open] .depli-fermer { display: inline; }
.tous[open] > .depli { margin-bottom: 18px; }
/* scénarios : la participation sous la liste, des sections aérées */
.choix .reglages { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--grille); display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 8px 24px; align-items: center; }
.choix .reglages .boutons { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.choix .reglages .note { margin: 0; }
#vue-scenarios .titre-section { margin-top: 42px; }
.cartes-duels { display: grid; gap: 16px; margin: 18px 0 26px; }
.carte-duel h3 { margin-top: 0; }
.auteur { margin-bottom: 20px; }
#tous, #election, #duels { scroll-margin-top: 110px; }
/* infobulle immédiate des jetons : « Victoire de … » */
.jeton { position: relative; cursor: default; }
.jeton:hover { transform: scale(1.08); }
.jeton[data-infobulle]:hover::after { content: attr(data-infobulle); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  z-index: 5; white-space: nowrap; font-family: "Inter", system-ui, sans-serif; font-weight: 600; font-size: 0.8rem; color: #fff;
  background: var(--marine); border-radius: 8px; padding: 5px 9px; box-shadow: var(--ombre); pointer-events: none; }
.jeton[data-infobulle]:hover::before { content: ""; position: absolute; bottom: calc(100% - 4px); left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--marine); z-index: 5; pointer-events: none; }
.jetons .jeton:nth-child(5n+1):hover::after { left: 0; transform: none; }
.jetons .jeton:nth-child(5n):hover::after { left: auto; right: 0; transform: none; }
