:root {
  /* Thème clair unique : fond crème, surfaces blanches, accents pastel */
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #1f2a44;
  --muted: #5b6478;
  --border: #e6e2da;
  --accent: #2f5aa8;
  --accent-soft: #e5edfa;

  /* Pastels de décor */
  --pastel-blue: #dfe9f8;
  --pastel-lavender: #ebe5f7;
  --pastel-peach: #fbe6d9;
  --pastel-sage: #e1efe4;
  --pastel-butter: #fbf2d2;
  --pastel-rose: #f8e1e4;

  /* Familles politiques : teintes adoucies mais lisibles */
  --bloc-gauche: #e07a6f;
  --bloc-ecolo: #6dbb8a;
  --bloc-centre: #e9b949;
  --bloc-droite: #6f97d6;
  --bloc-extdroite: #5a6a93;
  --bloc-autre: #a9a39a;

  --st-declare-bg: #dcf0e2;  --st-declare-fg: #22663c;
  --st-pressenti-bg: #fcefd3; --st-pressenti-fg: #7d5400;
  --st-primaire-bg: #e8e3f8;  --st-primaire-fg: #4c3d99;
  --st-renonce-bg: #efede8;   --st-renonce-fg: #5b6478;
  --st-empeche-bg: #fadfdc;   --st-empeche-fg: #9a2f24;

  --shadow: 0 1px 2px rgba(31, 42, 68, .04), 0 4px 16px rgba(31, 42, 68, .05);
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Source Serif 4", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* En-tête */
.site-header { padding: 48px 0 24px; }
.kicker {
  margin: 0 0 4px; font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; }
.lede { margin: 0; max-width: 60ch; color: var(--muted); font-size: 17px; }
.meta { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* Filtres */
.controls { margin: 8px 0 16px; }
.search input {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 14px; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips legend {
  float: left; margin-right: 8px; font-size: 13px; color: var(--muted); padding: 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.count { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* Tableau */
.table-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; }
thead th {
  font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
thead button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
}
thead button::after { content: " ↕"; opacity: .4; }
thead button[data-dir="asc"]::after { content: " ↑"; opacity: 1; }
thead button[data-dir="desc"]::after { content: " ↓"; opacity: 1; }
tbody tr + tr td { border-top: 1px solid var(--border); }
tbody tr.retire { opacity: .7; }

.name { font-weight: 600; font-size: 16px; }
.party { font-size: 14px; color: var(--muted); }
.bloc { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--bloc-autre); }
.dot.gauche { background: var(--bloc-gauche); }
.dot.ecolo { background: var(--bloc-ecolo); }
.dot.centre { background: var(--bloc-centre); }
.dot.droite { background: var(--bloc-droite); }
.dot.extdroite { background: var(--bloc-extdroite); }

.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.badge.declare { background: var(--st-declare-bg); color: var(--st-declare-fg); }
.badge.pressenti { background: var(--st-pressenti-bg); color: var(--st-pressenti-fg); }
.badge.primaire { background: var(--st-primaire-bg); color: var(--st-primaire-fg); }
.badge.renonce { background: var(--st-renonce-bg); color: var(--st-renonce-fg); }
.badge.empeche { background: var(--st-empeche-bg); color: var(--st-empeche-fg); }
.status-note { margin-top: 6px; font-size: 13px; color: var(--muted); max-width: 32ch; }
.source { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.source a { color: inherit; }

.props { margin: 0; padding-left: 18px; font-size: 14px; max-width: 46ch; }
.props li + li { margin-top: 3px; }
.props-empty { font-size: 14px; color: var(--muted); font-style: italic; }

.links { display: flex; flex-wrap: wrap; gap: 6px; max-width: 220px; }
.links a {
  font-size: 13px; padding: 3px 9px; text-decoration: none;
  border: 1px solid var(--border); border-radius: 6px; white-space: nowrap;
}
.links a:hover { border-color: var(--accent); background: var(--accent-soft); }

.empty { text-align: center; color: var(--muted); padding: 32px 0; }

.notes { margin: 40px 0; max-width: 70ch; font-size: 15px; color: var(--muted); }
.notes h2 { font-size: 18px; color: var(--text); margin: 0 0 8px; }
code { font-size: 13px; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0 32px; font-size: 13px; color: var(--muted); }

/* Mobile : chaque ligne devient une carte */
@media (max-width: 760px) {
  .site-header { padding-top: 32px; }
  .table-wrap { background: none; border: 0; }
  #table, #table tbody, #table tr, #table td { display: block; }
  #table thead { display: none; }
  #table tbody tr {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 12px; padding: 4px 0;
  }
  #table tbody tr + tr td { border-top: 0; }
  #table td { padding: 8px 14px; }
  td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px;
  }
  .links, .props, .status-note { max-width: none; }
}

/* Navigation */
.site-nav { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-nav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; min-height: 52px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 0; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .brand { color: var(--text); font-weight: 700; margin-right: auto; }

a.name { color: var(--text); text-decoration: none; }
a.name:hover { color: var(--accent); text-decoration: underline; }

/* Sondages dans le tableau */
.poll { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.poll:hover { color: var(--accent); text-decoration: underline; }
.poll-n { display: block; font-size: 12px; color: var(--muted); }

/* Sections et cartes génériques */
.section { margin: 32px 0; }
.section > h2 { font-size: 20px; margin: 0 0 12px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px;
}
.back { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }

/* Page candidat */
.cand-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0 12px; }
.cand-head .links { max-width: none; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 1px 7px; border-radius: 4px; border: 1px solid var(--border); color: var(--muted);
  vertical-align: 1px; white-space: nowrap;
}
.tag.programme { color: var(--st-declare-fg); border-color: currentColor; }
.tag.declaration { color: var(--st-primaire-fg); border-color: currentColor; }
.tag.presse { color: var(--st-pressenti-fg); border-color: currentColor; }
.measures { list-style: none; margin: 0; padding: 0; }
.measures li { padding: 10px 0; }
.measures li + li { border-top: 1px solid var(--border); }
.measures .source { margin-top: 3px; }
.theme-block + .theme-block { margin-top: 12px; }
.theme-block h3 { font-size: 16px; margin: 0 0 4px; }
.plain { margin: 0; padding-left: 18px; }
.plain li + li { margin-top: 8px; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.toc a { font-size: 13px; text-decoration: none; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; }
.cta {
  display: inline-block; padding: 9px 16px; border-radius: var(--radius); font-weight: 600;
  background: var(--accent); color: var(--bg); text-decoration: none;
}
.notice { font-size: 14px; color: var(--muted); }

/* Comparateur */
.picker { display: flex; flex-direction: column; gap: 10px; }
.picker .chips legend { min-width: 150px; }
.compare-grid { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.compare-col h4 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.compare-col h4 a { color: var(--text); text-decoration: none; }
.compare-col h4 a:hover { color: var(--accent); }
.compare-col .measures li { padding: 8px 0; font-size: 14px; }
.compare-theme { margin: 28px 0; }
.compare-theme > h3 { font-size: 18px; margin: 0 0 10px; }
.hint { font-size: 14px; color: var(--muted); }

/* Page sondages */
.poll-table { width: 100%; border-collapse: collapse; }
.poll-table th, .poll-table td { padding: 8px 12px; text-align: left; }
.poll-table td.num, .poll-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.poll-table tbody tr + tr td { border-top: 1px solid var(--border); }
.poll-table tr:target td { background: var(--accent-soft); }
.bar { height: 8px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.bar-cell { width: 35%; }
.poll-card + .poll-card { margin-top: 12px; }
.poll-card h3 { font-size: 16px; margin: 0 0 4px; }
.hyp { margin-top: 10px; font-size: 14px; }
.hyp strong { display: block; margin-bottom: 4px; }
.warn { color: var(--st-empeche-fg); font-size: 13px; }

@media (max-width: 760px) {
  .compare-grid { grid-template-columns: 1fr; }
  .bar-cell { display: none; }
}

/* Page candidat : portrait et biographie */
.cand-header { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.cand-header:not(:has(.portrait)) { grid-template-columns: 1fr; }
.portrait { margin: 0; width: 180px; }
.portrait img {
  width: 180px; height: 220px; object-fit: cover; object-position: center 20%;
  border-radius: var(--radius); background: var(--border); display: block;
}
.portrait figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.portrait figcaption a { color: inherit; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; }
.timeline li + li { border-top: 1px solid var(--border); }
.timeline .period { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.affaire + .affaire { margin-top: 12px; }
.affaire h3 { font-size: 16px; margin: 0 0 6px; }
.affaire p { margin: 8px 0 0; }

@media (max-width: 760px) {
  .cand-header { grid-template-columns: 1fr; }
  .portrait, .portrait img { width: 140px; }
  .portrait img { height: 170px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

/* ===== Habillage clair et pastel ===== */
h1, h2, h3, .site-nav .brand { font-family: var(--font-title); letter-spacing: -.01em; }
h1 { font-weight: 700; color: var(--text); }
h2 { font-weight: 650; }

.site-nav { background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.site-nav .brand { font-size: 19px; }
.site-nav .brand::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px;
  background: linear-gradient(135deg, var(--bloc-droite), var(--bloc-gauche)); vertical-align: 1px;
}

/* Bandeau d'en-tête : dégradé pastel très doux */
.site-header {
  background:
    radial-gradient(60% 120% at 0% 0%, var(--pastel-blue) 0%, transparent 60%),
    radial-gradient(50% 120% at 100% 0%, var(--pastel-peach) 0%, transparent 60%),
    radial-gradient(60% 100% at 55% 100%, var(--pastel-lavender) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
main > .site-header, .cand-header.site-header {
  background: none; border-bottom: 0; margin-bottom: 0;
}
.kicker { color: var(--accent); }

.card, .table-wrap { border-color: var(--border); box-shadow: var(--shadow); }
.table-wrap { border-radius: var(--radius); }
thead th { background: #fbfaf7; }
tbody tr:hover td { background: #fcfbf8; }
#table tbody tr.retire:hover td { background: none; }

.search input { border-radius: 999px; padding-left: 18px; box-shadow: var(--shadow); }
.chip { transition: background .15s, border-color .15s; }
.chip:hover { border-color: #c9c3b8; }
.chip[aria-pressed="true"] { background: var(--pastel-blue); border-color: #a9c1e8; }

.links a { background: #fbfaf7; }
.links a:hover { background: var(--pastel-blue); border-color: #a9c1e8; }

.cta { background: var(--accent); color: #fff; border-radius: 999px; box-shadow: var(--shadow); }
.cta:hover { background: #244a8e; }

.poll { color: var(--accent); }
.bar { background: linear-gradient(90deg, #a9c1e8, #c7b8ec); height: 10px; border-radius: 999px; }

/* Blocs thématiques : une teinte pastel par thème pour se repérer */
.theme-block, .compare-theme > h3 { --tint: var(--pastel-blue); }
[id="t-economie"], .th-economie { --tint: var(--pastel-butter); }
[id="t-travail"], .th-travail { --tint: var(--pastel-peach); }
[id="t-retraites"], .th-retraites { --tint: var(--pastel-lavender); }
[id="t-sante"], .th-sante { --tint: var(--pastel-rose); }
[id="t-education"], .th-education { --tint: var(--pastel-blue); }
[id="t-ecologie"], .th-ecologie { --tint: var(--pastel-sage); }
[id="t-immigration"], .th-immigration { --tint: var(--pastel-peach); }
[id="t-securite"], .th-securite { --tint: var(--pastel-lavender); }
[id="t-international"], .th-international { --tint: var(--pastel-blue); }
[id="t-institutions"], .th-institutions { --tint: var(--pastel-butter); }
[id="t-logement"], .th-logement { --tint: var(--pastel-rose); }
[id="t-territoires"], .th-territoires { --tint: var(--pastel-sage); }
.theme-block { border-top: 4px solid var(--tint); }
.theme-block h3 { display: inline-block; background: var(--tint); padding: 2px 10px; border-radius: 6px; font-size: 15px; }
.compare-theme > h3 { display: inline-block; background: var(--tint); padding: 4px 14px; border-radius: 8px; }
.toc a { background: var(--surface); }
.toc a:hover { background: var(--pastel-blue); }

.portrait img { border-radius: 16px; box-shadow: var(--shadow); background: var(--pastel-lavender); }
.affaire { border-left: 4px solid var(--pastel-rose); }

.notes { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.site-footer { background: #f3f0ea; margin-top: 40px; }

/* Blocs repliables (fiche candidat) */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.fold { margin: 20px 0; }
.fold > summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.fold > summary h2 { margin: 0; font-size: 21px; }
.fold > summary::after, .theme-block > summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.fold[open] > summary::after, .theme-block[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.fold > summary:hover h2 { color: var(--accent); }
.fold-body { padding-top: 14px; }
.fold-count {
  font-size: 12px; font-weight: 600; color: var(--muted); background: #f1eee8;
  border-radius: 999px; padding: 1px 9px; font-family: var(--font);
}
.fold-tools { display: flex; gap: 6px; justify-content: flex-end; margin-bottom: 10px; }
.fold-tools .chip { font-size: 13px; padding: 3px 10px; }
.theme-block > summary { display: flex; align-items: center; gap: 10px; }
.theme-block > summary h3 { margin: 0; }
.theme-block[open] > summary { margin-bottom: 6px; }
.theme-block:not([open]) { padding-top: 12px; padding-bottom: 12px; }

/* Présentation sous le nom */
.presentation { margin: 4px 0 12px; }
.presentation .lede { max-width: 72ch; color: var(--text); font-size: 16.5px; }
.presentation .source { margin-top: 2px; }
.status-line { margin: 10px 0 0; max-width: 72ch; font-size: 15px; color: var(--muted); }
.status-line strong { color: var(--text); font-weight: 600; }

/* Page données */
.scroll-x { overflow-x: auto; }
.data-table { min-width: 1100px; }
.data-table td { font-size: 14px; }
.data-table .bloc { margin-top: 4px; margin-right: 4px; }
.tdots { display: grid; grid-template-columns: repeat(6, 10px); gap: 4px; margin-bottom: 4px; }
.tdot { width: 10px; height: 10px; border-radius: 3px; background: #ece8e1; }
.tdot.on { background: #8fb0e3; }
.method > summary h2 { display: inline; margin: 0; }
.method ul { margin: 10px 0 0; padding-left: 18px; }
.method li + li { margin-top: 6px; }
.inst + .inst { margin-top: 12px; }
.inst h3 { margin: 0 0 6px; font-size: 17px; }
.inst p { margin: 6px 0; }

/* FAQ */
.faq-group { margin: 28px 0; }
.faq-group > h2 { font-size: 22px; margin: 0 0 10px; }
.faq {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0 18px;
}
.faq + .faq { margin-top: 8px; }
.faq > summary { display: flex; align-items: center; gap: 10px; padding: 14px 0; font-weight: 600; }
.faq > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq .answer { padding: 0 0 16px; max-width: 75ch; }
.faq .answer p { margin: 0 0 8px; }

@media (max-width: 760px) {
  .data-table { min-width: 0; }
  .scroll-x { overflow-x: visible; }
}
[id] { scroll-margin-top: 72px; }

/* Bloc « Vérifiable, de bout en bout » (accueil) */
.trust { margin: 40px 0; }
.trust > h2 { font-size: 24px; margin: 0 0 14px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trust-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; border-top: 4px solid var(--pastel-blue);
}
.trust-item:nth-child(2) { border-top-color: var(--pastel-sage); }
.trust-item:nth-child(3) { border-top-color: var(--pastel-peach); }
.trust-item h3 { margin: 0 0 6px; font-size: 17px; }
.trust-item p { margin: 0; font-size: 15px; color: var(--muted); }
.trust > .notice { margin-top: 14px; max-width: 80ch; }

/* Pied de page */
.footer-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px 32px; align-items: start; }
.footer-brand { font-family: var(--font-title); font-size: 17px; color: var(--text); }
.footer-grid p { margin: 4px 0 0; }
.footer-points { list-style: none; margin: 0; padding: 0; }
.footer-points li + li { margin-top: 4px; }
.footer-points strong { color: var(--text); font-weight: 600; }
.site-footer a { color: var(--accent); }

@media (max-width: 760px) {
  .trust-grid, .footer-grid { grid-template-columns: 1fr; }
}

/* Encart « Méthode et limites » (Données) en pleine largeur */
.notes.method { max-width: none; }
@media (min-width: 900px) {
  .method ul { columns: 2; column-gap: 40px; }
  .method li { break-inside: avoid; }
}

/* Infobulles d'en-tête de colonne (positionnées par JS, en position fixe) */
.info {
  display: inline-flex; align-items: center; justify-content: center; margin-left: 5px;
  width: 16px; height: 16px; border-radius: 50%; font-size: 11px; font-weight: 700;
  background: var(--pastel-blue); color: var(--accent); cursor: help; vertical-align: 1px;
}
.info:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tip {
  display: none; position: fixed; z-index: 50; width: 300px; max-width: calc(100vw - 24px);
  padding: 10px 12px; border-radius: 10px; text-align: left;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(31, 42, 68, .14);
  font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--text); white-space: normal;
}
.tip.open { display: block; }
.tip-row { display: block; }
.tip-row + .tip-row { margin-top: 6px; }
.tip-row strong { color: var(--accent); font-weight: 600; }

/* Mes priorités */
.quiz h2 { margin-top: 0; }
.quiz .chips { margin: 12px 0 18px; }
.quiz .chip .poll-n { display: inline; margin-left: 4px; }
.cta[disabled] { opacity: .45; cursor: not-allowed; }
button.cta { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.quiz-theme { display: inline-block; background: var(--tint); padding: 4px 14px; border-radius: 8px; }
.quiz-item + .quiz-item { margin-top: 10px; }
.quiz-item p { margin: 0 0 10px; font-size: 16px; }
.quiz-letter { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.quiz-answers { display: flex; flex-wrap: wrap; gap: 6px; }
.quiz-answers .chip[data-answer="oui"][aria-pressed="true"] { background: var(--st-declare-bg); border-color: var(--st-declare-fg); }
.quiz-answers .chip[data-answer="non"][aria-pressed="true"] { background: var(--st-empeche-bg); border-color: var(--st-empeche-fg); }
.quiz-answers .chip[data-answer="neutre"][aria-pressed="true"] { background: #efede8; border-color: #bdb7ac; }
.quiz-nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 20px 0; }
.bar-split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #efede8; }
.bar-oui { background: #9fd1b0; }
.bar-non { background: #eeb3ab; }
.answer-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; margin-right: 6px; background: #efede8; color: var(--muted); }
.answer-tag.oui { background: var(--st-declare-bg); color: var(--st-declare-fg); }
.answer-tag.non { background: var(--st-empeche-bg); color: var(--st-empeche-fg); }

/* Mes priorités v2 */
.imp-list { display: grid; gap: 6px; margin-top: 10px; }
.imp-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 10px 12px; border-radius: 10px; background: #fcfbf8; border-left: 4px solid var(--tint);
}
.imp-label { font-weight: 600; }
.imp-label .poll-n { font-weight: 400; }
.imp-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.imp-choices .chip { font-size: 13px; padding: 4px 10px; }
.imp-choices .chip[data-imp="2"][aria-pressed="true"] { background: var(--tint); border-color: #b9b1a3; font-weight: 600; }
.progress { height: 6px; border-radius: 999px; background: #ece8e1; overflow: hidden; margin-bottom: 14px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #a9c1e8, #c7b8ec); transition: width .2s; }
.quiz-answers .chip[data-answer="2"][aria-pressed="true"], .quiz-answers .chip[data-answer="1"][aria-pressed="true"] { background: var(--st-declare-bg); border-color: var(--st-declare-fg); }
.quiz-answers .chip[data-answer="-1"][aria-pressed="true"], .quiz-answers .chip[data-answer="-2"][aria-pressed="true"] { background: var(--st-empeche-bg); border-color: var(--st-empeche-fg); }
.quiz-answers .chip[data-answer="0"][aria-pressed="true"] { background: #efede8; border-color: #bdb7ac; }
.results th { white-space: normal; vertical-align: bottom; }
.th-pill { display: inline-block; background: var(--tint); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--text); }
.acc {
  display: inline-block; min-width: 54px; padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: 13px;
  background: linear-gradient(90deg, #cfe8d7 var(--p), #f3efe9 var(--p));
}
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.share input {
  flex: 1 1 300px; font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: #fbfaf7; color: var(--muted);
}
.maj { font-size: 13px; }

/* ===== Navigation : menu mobile ===== */
.menu-links { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.menu-btn {
  display: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 14px; cursor: pointer;
}
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .menu-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 10px; }
  .site-nav .wrap.open .menu-links { display: flex; }
  .menu-links a { padding: 10px 2px; border-top: 1px solid var(--border); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
}

/* ===== Accessibilité ===== */
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip:focus-visible, .cta:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Accueil ===== */
.hero { padding: 56px 0 40px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 52px); max-width: 18ch; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.cta-soft { background: var(--surface); color: var(--accent); border: 1px solid #c4d3ee; box-shadow: none; }
.cta-soft:hover { background: var(--pastel-blue); }
.countdown { text-align: center; padding: 22px 28px; min-width: 200px; }
.countdown-n { display: block; font-family: var(--font-title); font-size: 64px; font-weight: 700; line-height: 1; color: var(--accent); }
.countdown-l { display: block; font-weight: 600; margin: 6px 0 8px; }
.entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.entry { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--muted); font-size: 15px; transition: transform .15s, box-shadow .15s; border-top: 4px solid var(--pastel-blue); }
.entry:nth-child(2) { border-top-color: var(--pastel-peach); }
.entry:nth-child(3) { border-top-color: var(--pastel-sage); }
.entry:nth-child(4) { border-top-color: var(--pastel-lavender); }
.entry:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(31, 42, 68, .10); }
.entry-t { font-family: var(--font-title); font-size: 19px; font-weight: 700; color: var(--text); }
.entry-t::after { content: " →"; color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; flex-direction: column; gap: 6px; }
.step-date { font-family: var(--font-title); font-size: 18px; font-weight: 700; color: var(--accent); }
.step-t { font-weight: 600; }
.step .badge { align-self: flex-start; }
.cand-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cand-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.cand-group h3 { font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.cand-links { list-style: none; margin: 0; padding: 0; }
.cand-links li { padding: 4px 0; }
.cand-links li + li { border-top: 1px solid #f1eee8; }
.cand-links a { font-weight: 600; color: var(--text); text-decoration: none; }
.cand-links a:hover { color: var(--accent); text-decoration: underline; }
.cand-links .party { font-size: 13px; }
.prose p { max-width: 75ch; }

@media (max-width: 900px) {
  .entry-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cand-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .countdown { justify-self: start; }
  .entry-grid, .steps, .cand-groups { grid-template-columns: 1fr; }
}

/* Liste des candidats : cartes mobiles compactes */
.list-note { margin: 24px 0 40px; max-width: 80ch; }
@media (max-width: 760px) {
  #table td[data-label="Candidat"]::before, #table td[data-label="Famille"]::before, #table td[data-label="Statut"]::before,
  #table td[data-label="Sondages (moyenne)"]::before { display: none; }
  #table tbody tr { display: grid; grid-template-columns: 1fr auto; padding: 6px 0; }
  #table td { grid-column: 1 / -1; }
  #table td[data-label="Candidat"] { grid-column: 1; padding-bottom: 0; }
  #table td[data-label="Sondages (moyenne)"] { grid-column: 2; grid-row: 1; text-align: right; padding-bottom: 0; }
  #table td[data-label="Famille"] { padding-top: 2px; padding-bottom: 0; }
  #table td[data-label="Statut"] { padding-top: 6px; }
  .data-table td[data-label]::before { display: block; }
}

/* Comparateur : recherche */
.picker .search { max-width: 420px; }
.chip[hidden] { display: none; }

/* Fiche candidat : présentation repliable */
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more { font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 2px 0; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { order: 2; }
  .menu-links { order: 3; }
  .site-nav a.brand[aria-current="page"] { box-shadow: none; padding-left: 0; }
}

/* Mes priorités : onglets et questions clés */
.mode-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.mode-tabs .chip { padding: 8px 16px; }
.imp-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-left: 8px; cursor: pointer; }
.qpos { margin-top: 8px; }
.qpos > strong { font-size: 13px; color: var(--muted); }
.quiz-answers .chip[data-answer="2"][aria-pressed="true"] { font-weight: 600; }

/* Accueil : chiffres clés et répartition par parti */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.kpi-n { display: block; font-family: var(--font-title); font-size: 32px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.kpi-l { font-size: 13px; color: var(--muted); }
.cand-group .fold-count { margin-left: auto; }
.partis { margin-top: 12px; }
.partis > summary { display: flex; align-items: center; gap: 10px; }
.partis > summary h3 { margin: 0; font-size: 16px; }
.partis > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
.partis[open] > summary::after { transform: rotate(-135deg); }
.partis-list { list-style: none; padding: 0; margin: 12px 0 0; columns: 3; column-gap: 24px; }
.partis-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #f1eee8; break-inside: avoid; font-size: 14px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .partis-list { columns: 2; } }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .partis-list { columns: 1; } }

/* Mes priorités : parcours rapide et étapes */
.rq + .rq { margin-top: 10px; }
.rq { border-left: 4px solid var(--tint); }
.rq-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rq-head .quiz-theme { margin: 0; font-size: 16px; }
.rq p { margin: 6px 0 10px; font-size: 16px; }
.etapes-parcours { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; }
.etapes-parcours li { padding: 6px 14px; border-radius: 999px; background: #f1eee8; color: var(--muted); font-size: 14px; cursor: pointer; }
.etapes-parcours li.actif { background: var(--pastel-blue); color: var(--text); font-weight: 600; }
.qpos .dot { display: inline-block; vertical-align: 1px; }
[id="t-societe"], .th-societe { --tint: var(--pastel-lavender); }
