/* ==========================================================================
   Section « Présidentielle 2027 » : tableau de bord de la course (hero, plateau des candidats,
   courbe des sondages, carte des thèmes, comparateur, frise), bloc d'accueil et fiche candidat.
   Couleur de section scopée par --pres ; couleur d'un candidat par --cand ; d'un thème par --theme.
   Les variables à repli (--r/--radius, --display…) rendent ce bloc commun aux templates.
   ========================================================================== */

.pres-body,
.pres-hero,
.pres-home {
  --pres: #1b4f9c;
  --pres-soft: color-mix(in srgb, var(--pres) 9%, transparent);
  --pres-line: color-mix(in srgb, var(--pres) 28%, transparent);
  --pres-up: #1f8a4c;
  --pres-down: #d23a3a;
  --pres-r: var(--r, var(--radius, 12px));
  --pres-r-lg: var(--r-lg, var(--radius-lg, 18px));
}
.pres-body .is-up, .pres-hero .is-up, .pres-home .is-up { color: var(--pres-up); font-style: normal; }
.pres-body .is-down, .pres-hero .is-down, .pres-home .is-down { color: var(--pres-down); font-style: normal; }

.pres-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cand, var(--pres));
  flex: none;
}
.pres-sub {
  max-width: 68ch;
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.pres-src a {
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pres-empty {
  padding: 28px 24px;
  border: 1px dashed var(--line-2, var(--line));
  border-radius: var(--pres-r-lg);
  color: var(--muted);
  text-align: center;
}
.pres-empty p { margin: 4px 0; }

/* ---------- Hero « état de la course » ---------- */
.pres-hero { position: relative; }
.pres-spectrum {
  height: 5px;
  border-radius: 999px;
  margin-bottom: 20px;
  opacity: 0.9;
}
.pres-hero__intro {
  max-width: 72ch;
  color: var(--text-2, var(--muted));
  margin-top: 10px;
}
.pres-hero__board {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 26px;
}
.pres-count {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 22px 24px;
  border-radius: var(--pres-r-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--pres) 90%, #000), var(--pres));
  color: #fff;
  box-shadow: var(--shadow);
}
.pres-count__num {
  font-family: var(--display, inherit);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pres-count__label { font-weight: 600; opacity: 0.95; }
.pres-count__date { font-size: 0.82rem; opacity: 0.75; }
.pres-count__clock { font-size: 0.82rem; opacity: 0.85; font-variant-numeric: tabular-nums; }
.pres-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.pres-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--pres-r-lg);
  background: var(--surface);
}
.pres-tile__num {
  font-family: var(--display, inherit);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.pres-tile__num small { font-size: 0.6em; font-weight: 700; }
.pres-tile__num--text { font-size: 1.15rem; }
.pres-tile__label { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.pres-tile__label a { text-decoration: underline; text-underline-offset: 2px; }
.pres-tile__label .pres-dot { width: 8px; height: 8px; }

/* ---------- Plateau des candidats ---------- */
.pres-plateau__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.pres-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'avatar id poll' 'avatar statut poll' 'spark spark spark' 'note note note';
  align-items: center;
  column-gap: 12px;
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--cand, var(--pres));
  border-radius: var(--pres-r-lg);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease, ease), box-shadow 0.25s var(--ease, ease);
}
.pres-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pres-card__rank {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--display, inherit);
  font-size: 0.78rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--cand, var(--pres)) 70%, var(--muted));
}
.pres-card__avatar {
  grid-area: avatar;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--cand, var(--pres)) 16%, var(--surface));
  color: var(--cand, var(--pres));
  font-weight: 800;
  font-size: 0.95rem;
}
.pres-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pres-card__id { grid-area: id; min-width: 0; }
.pres-card__name { display: block; font-family: var(--display, inherit); font-weight: 750; line-height: 1.2; }
.pres-card__party {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}
.pres-card__party .pres-dot { width: 8px; height: 8px; }
.pres-statut {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  width: fit-content;
}
.pres-card__statut { grid-area: statut; margin-top: 4px; }
.pres-statut--success { background: color-mix(in srgb, #1f8a4c 14%, transparent); color: #1f8a4c; }
.pres-statut--accent { background: var(--pres-soft); color: var(--pres); }
.pres-statut--warning { background: color-mix(in srgb, #c77700 16%, transparent); color: #c77700; }
.pres-statut--muted { background: var(--surface-2, var(--line)); color: var(--muted); }
.pres-card__poll { grid-area: poll; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pres-card__avg {
  font-family: var(--display, inherit);
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--cand, var(--pres));
}
.pres-card__avg small { font-size: 0.6em; }
.pres-card__avg--none { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.pres-card__delta { font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pres-card__momentum { font-size: 0.85rem; }
.pres-card__spark { grid-area: spark; width: 100%; height: 36px; margin-top: 10px; opacity: 0.9; }
.pres-card__note { grid-area: note; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.pres-card.is-retired { opacity: 0.55; filter: grayscale(0.6); border-top-color: var(--line-2, var(--line)); }
.pres-card.is-retired:hover { opacity: 0.8; }
.pres-card.is-fragile { border-color: color-mix(in srgb, #c77700 45%, var(--line)); }

/* ---------- Courbe des sondages ---------- */
.pres-chart {
  margin: 0;
  padding: 18px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pres-r-lg);
  background: var(--surface);
}
.pres-chart.is-busy { opacity: 0.6; }
.pres-chart__switch { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.pres-chart__select {
  padding: 7px 12px;
  border: 1px solid var(--line-2, var(--line));
  border-radius: 999px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
}
.pres-chart__frame { position: relative; }
.pres-chart__svg { width: 100%; height: auto; display: block; }
.pres-chart__grid line { stroke: var(--line); stroke-width: 1; }
.pres-chart__grid text { fill: var(--muted); font-size: 12px; font-family: var(--sans, inherit); }
.pres-chart__serie { transition: opacity 0.25s ease; }
.pres-chart__serie.is-off { opacity: 0; pointer-events: none; }
.pres-chart__dots circle { fill: var(--cand); opacity: 0.22; }
.pres-chart__line { fill: none; stroke: var(--cand); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.pres-chart__end { fill: var(--cand); stroke: var(--bg); stroke-width: 2; }
.pres-chart__tip[hidden] {
  display: none;
}
.pres-chart__tip {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 94%, transparent);
  color: var(--bg);
  font-size: 0.78rem;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.pres-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pres-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line-2, var(--line));
  border-radius: 999px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.pres-legend__item:hover { border-color: var(--cand); }
.pres-legend__item strong { font-variant-numeric: tabular-nums; color: var(--cand); }
.pres-legend__item.is-off { opacity: 0.4; text-decoration: line-through; }
.pres-last { margin-top: 20px; }
.pres-last__title { font-family: var(--display, inherit); font-size: 1.05rem; margin: 0 0 10px; }
.pres-last__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pres-last__item details {
  border: 1px solid var(--line);
  border-radius: var(--pres-r);
  background: var(--surface);
}
.pres-last__item summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}
.pres-last__item summary::-webkit-details-marker { display: none; }
.pres-last__item summary::after { content: '+'; margin-left: auto; color: var(--muted); font-weight: 700; }
.pres-last__item details[open] summary::after { content: '–'; }
.pres-last__sponsor, .pres-last__meta { font-size: 0.8rem; color: var(--muted); }
.pres-last__scores { list-style: none; margin: 0; padding: 4px 14px 10px; display: grid; gap: 5px; }
.pres-last__scores li { display: grid; grid-template-columns: minmax(120px, 180px) 1fr auto; gap: 10px; align-items: center; font-size: 0.85rem; }
.pres-last__scores strong { font-variant-numeric: tabular-nums; }
.pres-last__bar { height: 8px; border-radius: 999px; background: var(--surface-2, var(--line)); overflow: hidden; }
.pres-last__bar i { display: block; height: 100%; border-radius: 999px; background: var(--cand, var(--pres)); }
.pres-last__src { padding: 0 14px 12px; margin: 0; font-size: 0.78rem; color: var(--muted); }
.pres-last__src a { text-decoration: underline; text-underline-offset: 2px; }
.pres-note { margin-top: 12px; font-size: 0.75rem; color: var(--muted); max-width: 80ch; }

/* ---------- Carte des thèmes ---------- */
.pres-themes__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.pres-theme {
  border: 1px solid var(--line);
  border-left: 4px solid var(--theme, var(--pres));
  border-radius: var(--pres-r-lg);
  background: var(--surface);
  overflow: hidden;
}
.pres-theme__head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  grid-template-areas: 'emoji name heat chev' 'emoji who who chev' 'owner owner owner owner';
  align-items: center;
  column-gap: 10px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}
.pres-theme__head::-webkit-details-marker { display: none; }
.pres-theme__emoji { grid-area: emoji; font-size: 1.4rem; }
.pres-theme__name { grid-area: name; font-family: var(--display, inherit); font-weight: 700; }
.pres-theme__heat { grid-area: heat; display: inline-flex; gap: 3px; align-items: flex-end; }
.pres-theme__heat i { width: 5px; border-radius: 2px; background: var(--surface-2, var(--line)); }
.pres-theme__heat i:nth-child(1) { height: 8px; }
.pres-theme__heat i:nth-child(2) { height: 12px; }
.pres-theme__heat i:nth-child(3) { height: 16px; }
.pres-theme__heat i.is-on { background: var(--theme, var(--pres)); }
.pres-theme__who { grid-area: who; display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; }
.pres-theme__who .pres-dot { width: 9px; height: 9px; border: 1.5px solid var(--bg); margin-right: -6px; }
.pres-theme__none { font-size: 0.75rem; color: var(--muted); }
.pres-theme__more { font-size: 0.72rem; color: var(--muted); margin-left: 10px; }
.pres-theme__owner {
  grid-area: owner;
  margin-top: 9px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cand, var(--theme)) 12%, transparent);
  color: var(--cand, var(--theme));
  font-size: 0.75rem;
  width: fit-content;
}
.pres-theme__chev { grid-area: chev; width: 16px; height: 16px; color: var(--muted); transition: transform 0.25s ease; }
.pres-theme[open] .pres-theme__chev { transform: rotate(90deg); }
.pres-theme__body { padding: 2px 14px 14px; border-top: 1px dashed var(--line); }
.pres-theme__empty { font-size: 0.85rem; color: var(--muted); }
.pres-theme__positions { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pres-theme__positions li { padding-top: 12px; font-size: 0.9rem; }
.pres-theme__positions li + li { border-top: 1px solid var(--line); }
.pres-theme__positions p { margin: 6px 0 4px; }
.pres-theme__cand { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--cand, inherit); }
.pres-theme__positions blockquote,
.pres-vs__cell blockquote,
.pres-pos__body blockquote {
  margin: 6px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--cand, var(--theme, var(--pres)));
  background: var(--surface-2, transparent);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-2, inherit);
}
.pres-theme__positions blockquote span, .pres-vs__cell blockquote span { font-style: normal; color: var(--muted); font-size: 0.78rem; }

/* ---------- Comparateur ---------- */
.pres-compare__picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pres-pick {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1.5px solid var(--line-2, var(--line));
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.pres-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pres-pick:has(input:checked) {
  border-color: var(--cand);
  background: color-mix(in srgb, var(--cand) 10%, var(--surface));
  font-weight: 650;
}
.pres-pick:has(input:disabled:not(:checked)) { opacity: 0.45; cursor: not-allowed; }
.pres-compare__go {
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: var(--pres);
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.pres-compare__go:disabled { opacity: 0.45; cursor: not-allowed; }
.pres-compare__hint { color: var(--muted); margin: 8px 0 0; font-size: 0.8rem; }
.pres-compare__result { margin-top: 16px; }
.pres-compare.is-busy .pres-compare__result { opacity: 0.5; }
.pres-compare__error { color: var(--pres-down); }
.pres-vs { display: grid; gap: 10px; }
.pres-vs__head, .pres-vs__row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) repeat(var(--cols, 2), 1fr);
  gap: 10px;
}
.pres-vs__cand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px;
  border-radius: var(--pres-r-lg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--cand);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  text-align: center;
}
.pres-vs__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--cand) 16%, var(--surface));
  color: var(--cand);
  font-weight: 800;
  font-size: 0.85rem;
}
.pres-vs__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pres-vs__cand .small { color: var(--muted); font-size: 0.75rem; }
.pres-vs__theme { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; flex-wrap: wrap; align-content: center; }
.pres-vs__badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme) 14%, transparent);
  color: var(--theme);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pres-vs__cell {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--pres-r);
  background: var(--surface);
  font-size: 0.88rem;
}
.pres-vs__cell p { margin: 0 0 6px; }
.pres-vs__none { color: var(--muted); font-style: italic; }

/* ---------- Frise de la course ---------- */
.pres-frise__list { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.pres-frise__list::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--line-2, var(--line)), var(--line));
}
.pres-frise__month { margin: 18px 0 10px; }
.pres-frise__month span {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--pres-soft);
  color: var(--pres);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}
.pres-frise__item { position: relative; margin: 0 0 12px; }
.pres-frise__dot {
  position: absolute;
  left: -19px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ev, var(--pres));
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-2, var(--line));
}
.pres-frise__card {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--pres-r);
  background: var(--surface);
}
.pres-frise__item.is-strong .pres-frise__card { border-left: 3px solid var(--ev); }
.pres-frise__item.is-major .pres-frise__card { border: 1.5px solid color-mix(in srgb, var(--ev) 45%, var(--line)); border-left: 4px solid var(--ev); box-shadow: var(--shadow-sm, none); }
.pres-frise__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 0.78rem; color: var(--muted); }
.pres-frise__kind {
  padding: 1px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ev) 13%, transparent);
  color: var(--ev);
  font-weight: 700;
}
.pres-frise__cand { display: inline-flex; align-items: center; gap: 5px; color: var(--cand); text-decoration: none; font-weight: 650; }
.pres-frise__cand .pres-dot { width: 8px; height: 8px; }
.pres-frise__title { margin: 0; font-family: var(--display, inherit); font-size: 1rem; line-height: 1.35; }
.pres-frise__sum { margin: 4px 0 0; font-size: 0.86rem; color: var(--text-2, var(--muted)); }
.pres-frise__card .pres-src { margin: 6px 0 0; }

/* ---------- Bloc d'accueil ---------- */
.pres-home {
  border: 1px solid var(--pres-line);
  border-radius: var(--pres-r-lg);
  background: linear-gradient(170deg, var(--pres-soft), transparent 55%), var(--surface);
  padding: 22px 24px;
}
.pres-home__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pres-home__kicker { margin: 0; font-size: 0.75rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pres); }
.pres-home__title { margin: 2px 0 0; font-family: var(--display, inherit); font-size: 1.5rem; }
.pres-home__title a { text-decoration: none; color: inherit; }
.pres-home__tagline { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; max-width: 56ch; }
.pres-home__count { margin: 0; padding: 10px 16px; border-radius: var(--pres-r); background: var(--pres); color: #fff; font-size: 0.85rem; }
.pres-home__count strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.pres-home__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.pres-home__podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pres-home__podium li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cand);
  border-radius: var(--pres-r);
  background: var(--bg);
}
.pres-home__rank { font-family: var(--display, inherit); font-weight: 800; color: var(--muted); }
.pres-home__cand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.pres-home__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--cand) 16%, var(--surface));
  color: var(--cand);
  font-weight: 800;
  font-size: 0.75rem;
  flex: none;
}
.pres-home__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pres-home__name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pres-home__name small { color: var(--muted); }
.pres-home__score { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--cand); white-space: nowrap; }
.pres-home__side { display: flex; flex-direction: column; gap: 10px; }
.pres-home__mover { margin: 0; font-size: 0.95rem; }
.pres-home__mover span { font-weight: 800; }
.pres-home__poll { margin: 0; color: var(--muted); }
.pres-home__all { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--pres); font-weight: 650; text-decoration: none; }
.pres-home__all .i { width: 15px; height: 15px; }

/* ---------- Fiche candidat ---------- */
.pres-cand-head { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin-top: 10px; }
.pres-cand-head__avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: color-mix(in srgb, var(--cand) 16%, var(--surface));
  color: var(--cand);
  font-weight: 800;
  font-size: 1.6rem;
  border: 3px solid var(--cand);
}
.pres-cand-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pres-cand-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.pres-cand-head__note { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.pres-cand-head__score { text-align: right; }
.pres-cand-head__avg { font-family: var(--display, inherit); font-size: 2.3rem; font-weight: 800; color: var(--cand); font-variant-numeric: tabular-nums; }
.pres-cand-head__label { display: block; font-size: 0.8rem; color: var(--muted); }
.pres-cand-head__bio { max-width: 75ch; margin-top: 16px; color: var(--text-2, inherit); }

/* ---------- Écrans étroits ---------- */
/* ── Fiche d'un candidat : colonne fixe + contenu ── */
.pres-cand-head__slogan { margin: 8px 0 0; font-family: var(--display, inherit); font-size: 1.05rem; font-weight: 600; color: var(--cand); }
.pres-cand-head__updated { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
.pres-fiche { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 40px; align-items: start; }
.pres-fiche__side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.pres-fiche__main { display: grid; gap: 34px; min-width: 0; }
.pres-fiche__main > section { min-width: 0; }
.pres-fiche__main .section-head { margin-bottom: 14px; }
.pres-fiche__bio { margin: 0; max-width: 72ch; font-size: 1.05rem; line-height: 1.6; color: var(--text-2, inherit); }

.pres-poster { margin: 0; display: grid; gap: 8px; }
.pres-poster__real { display: block; width: 100%; height: auto; border-radius: var(--pres-r-lg); }
.pres-poster__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--pres-r-lg);
  background: color-mix(in srgb, var(--cand) 26%, var(--surface, #fff));
}
.pres-poster__photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.pres-poster__initials {
  position: absolute;
  inset: 0 0 26%;
  display: grid;
  place-items: center;
  font-family: var(--display, inherit);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--cand);
}
.pres-poster__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}
.pres-poster__band {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 3px;
  padding: 56px 16px 14px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--cand) 82%, #000) 58%);
  color: #fff;
}
.pres-poster__party { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.pres-poster__name { font-family: var(--display, inherit); font-size: 1.6rem; font-weight: 800; line-height: 1.08; }
.pres-poster__slogan { font-size: 0.85rem; line-height: 1.3; }
.pres-credit { font-size: 0.72rem; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.pres-credit a { color: inherit; text-decoration: underline; }

.pres-side { display: grid; gap: 7px; padding-top: 14px; border-top: 1px solid var(--line); }
.pres-side__title { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.pres-side__links, .pres-side__chips { list-style: none; margin: 0; padding: 0; }
.pres-side__links { display: grid; gap: 5px; }
.pres-side__links a { color: var(--cand); font-weight: 600; }
.pres-side__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pres-side__chips a { display: block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.82rem; }
.pres-side__count { margin: 0; font-size: 0.9rem; }
.pres-side__count strong { font-family: var(--display, inherit); font-size: 1.35rem; color: var(--cand); }
.pres-side__bar { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: var(--line); }
.pres-side__bar i { display: block; height: 100%; background: var(--cand); }
.pres-side__actions { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.pres-side__btn {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pres-r);
  background: var(--surface, transparent);
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.pres-side__btn:hover { border-color: var(--cand); color: var(--cand); }
.pres-side__link { justify-self: center; font-size: 0.82rem; color: var(--muted); text-decoration: underline; }

.pres-mesure {
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--cand) 30%, transparent);
  border-left: 4px solid var(--cand);
  border-radius: var(--pres-r-lg);
  background: color-mix(in srgb, var(--cand) 6%, transparent);
}
.pres-mesure p { margin: 0 0 6px; }
.pres-mesure__kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--cand); }
.pres-mesure__title { margin: 0 0 8px; font-family: var(--display, inherit); font-size: 1.35rem; line-height: 1.2; }
.pres-mesure .pres-src { margin: 0; }

.pres-props { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: prop; }
.pres-prop { position: relative; padding: 12px 14px 10px 50px; border: 1px solid var(--line); border-radius: var(--pres-r); background: var(--surface, transparent); counter-increment: prop; }
.pres-prop::before { content: counter(prop); position: absolute; top: 11px; left: 15px; font-family: var(--display, inherit); font-size: 1.35rem; font-weight: 800; color: var(--cand); }
.pres-prop p { margin: 0 0 4px; }
.pres-prop__theme { font-size: 0.74rem; font-weight: 700; color: var(--theme); }
.pres-prop__title { margin: 1px 0 4px; font-size: 1rem; line-height: 1.3; }
.pres-program { margin: 12px 0 0; font-size: 0.92rem; }
.pres-program a { color: var(--cand); font-weight: 700; }
.pres-program--none { color: var(--muted); font-style: italic; }

.pres-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pres-facts li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pres-facts li:last-child { border-bottom: 0; }
.pres-facts--grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); column-gap: 20px; }
.pres-facts__sub { display: block; font-size: 0.86rem; color: var(--muted); }
.pres-facts__text { margin: 4px 0; font-size: 0.93rem; }
.pres-facts__now { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--cand) 12%, transparent); color: var(--cand); font-size: 0.72rem; font-weight: 700; }
.pres-facts .pres-src { margin: 3px 0 0; }

.pres-critics { display: grid; gap: 10px; }
.pres-critic { margin: 0; padding: 4px 0 4px 14px; border-left: 3px solid var(--line-2, var(--line)); }
.pres-critic p { margin: 0 0 4px; }
.pres-critic footer { font-size: 0.88rem; }
.pres-critic .pres-src { margin: 2px 0 0; }

.pres-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pres-video, .pres-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--pres-r); }
.pres-video {
  position: relative;
  padding: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--cand) 84%, #000);
  color: #fff;
}
.pres-video--link { aspect-ratio: auto; background: var(--surface-2, var(--line)); color: inherit; }
.pres-video__title { position: relative; display: block; font-weight: 700; line-height: 1.25; }
.pres-video__date { position: relative; display: block; margin-top: 3px; font-size: 0.78rem; opacity: 0.85; }
.pres-video__play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.95);
}
.pres-video__play::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 16px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent color-mix(in srgb, var(--cand) 84%, #000);
}

.pres-transparence__title { margin: 16px 0 4px; font-size: 1rem; }
.pres-stage { display: inline-block; margin-right: 6px; padding: 1px 8px; border: 1px solid var(--line-2, var(--line)); border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.pres-note { margin: 8px 0 0; font-size: 0.84rem; color: var(--muted); }

.pres-report { border-top: 1px solid var(--line); padding-top: 12px; scroll-margin-top: 90px; }
.pres-report summary { cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.pres-report form { display: grid; gap: 10px; max-width: 560px; margin-top: 12px; }
.pres-report__field { display: grid; gap: 4px; font-size: 0.88rem; font-weight: 600; }
.pres-report__field em { font-style: normal; font-weight: 400; color: var(--muted); }
.pres-report__field textarea, .pres-report__field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--pres-r);
  background: var(--surface, transparent);
  color: inherit;
  font: inherit;
}
.pres-report__trap { position: absolute; left: -9999px; }
.pres-report .pres-side__btn { justify-self: start; }
.pres-report__status { margin: 0; font-size: 0.9rem; }
.pres-report__status:empty { display: none; }
.pres-report__legal { margin: 0; font-size: 0.78rem; color: var(--muted); }

/* La colonne fixe tient dans l'écran : l'affiche s'adapte à sa hauteur */
@media (min-width: 861px) {
  .pres-poster__frame { aspect-ratio: auto; height: clamp(280px, 44vh, 400px); }
  .pres-poster__real { width: auto; max-width: 100%; max-height: 56vh; margin-inline: auto; }
}

.pres-credits { padding-top: 8px; padding-bottom: 24px; font-size: 0.8rem; color: var(--muted); }
.pres-credits summary { cursor: pointer; }
.pres-credits ul { margin: 8px 0 0; padding-left: 18px; columns: 2; column-gap: 28px; }
.pres-credits a { color: inherit; text-decoration: underline; }

@media (max-width: 860px) {
  .pres-hero__board { grid-template-columns: 1fr; }
  .pres-home__grid { grid-template-columns: 1fr; }
  .pres-vs__head, .pres-vs__row { grid-template-columns: 1fr; }
  .pres-vs__corner { display: none; }
  .pres-vs__head { grid-template-columns: repeat(var(--cols, 2), 1fr); }
  .pres-vs__row { border-top: 1px solid var(--line); padding-top: 10px; }
  .pres-cand-head { grid-template-columns: 1fr; }
  .pres-fiche { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pres-fiche__side { position: static; max-height: none; overflow: visible; }
  .pres-poster { width: min(100%, 300px); margin-inline: auto; }
  .pres-credits ul { columns: 1; }
  .pres-cand-head__score { grid-column: 1 / -1; text-align: left; }
  .pres-last__scores li { grid-template-columns: minmax(90px, 130px) 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  .pres-card, .pres-chart__serie, .pres-theme__chev, .pres-legend__item { transition: none; }
  .pres-card:hover { transform: none; }
}
