/* ==========================================================================
   components.css : panneau d'Etat, hemicycle, fil d'articles, flashs
   ========================================================================== */

/* ------------------------------------------------------ panneau d'Etat -- */

.panneau {
  background: var(--surface);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  padding: var(--e3);
  position: sticky;
  /* La hauteur de l'en-tête est publiée par menu.js : elle varie selon que
     le bandeau du direct est là ou non. Le repli couvre le cas où le
     JavaScript n'a pas encore tourné. */
  top: calc(var(--hauteur-entete, 96px) + 14px);
  max-height: calc(100vh - var(--hauteur-entete, 96px) - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 320px;
}

.panneau__vide {
  color: var(--encre-douce);
  font-size: var(--t-petit);
}

.panneau__vide p {
  max-width: none;
}

.panneau__entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--e2);
  margin-bottom: var(--e2);
}

.panneau__etat {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.1;
}

.panneau__meta {
  font-size: var(--t-micro);
  color: var(--encre-faible);
  margin-top: 4px;
}

.jeton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--t-micro);
  font-weight: 600;
  background: var(--surface-2);
  color: var(--encre-douce);
  white-space: nowrap;
}

.jeton--gagne {
  background: color-mix(in srgb, var(--llb-magenta) 14%, transparent);
  color: var(--llb-magenta);
}

.jeton--bascule {
  background: color-mix(in srgb, var(--ind-gagne) 20%, transparent);
  color: var(--ind-gagne);
}

.depouille {
  margin: var(--e2) 0 var(--e3);
}

.depouille__ligne {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-micro);
  color: var(--encre-douce);
  margin-bottom: 6px;
}

.depouille__rail {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
}

.depouille__jauge {
  height: 100%;
  background: var(--encre-douce);
  width: 0;
  transition: width var(--duree) var(--ressort);
}

.candidats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.candidat {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px var(--e2);
  align-items: baseline;
}

.candidat__nom {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

.candidat__parti {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}

.candidat__parti[data-parti="D"] {
  background: var(--dem-gagne);
}

.candidat__parti[data-parti="R"] {
  background: var(--rep-gagne);
}

.candidat__parti[data-parti="I"] {
  background: var(--ind-gagne);
}

.candidat__pct {
  font-weight: 700;
  font-size: 1.0625rem;
}

.candidat__rail {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
}

.candidat__jauge {
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width var(--duree) var(--ressort);
}

.candidat__jauge[data-parti="D"] {
  background: var(--dem-gagne);
}

.candidat__jauge[data-parti="R"] {
  background: var(--rep-gagne);
}

.candidat__jauge[data-parti="I"] {
  background: var(--ind-gagne);
}

.candidat__voix {
  grid-column: 1 / -1;
  font-size: var(--t-micro);
  color: var(--encre-faible);
}

/* -------------------------------------------------------- les favoris -- */

.favoris {
  display: grid;
  gap: 10px;
}

.favori {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: var(--e2);
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-petit);
  background: var(--papier);
  text-align: left;
  transition: border-color var(--duree-courte) var(--doux),
    transform var(--duree-courte) var(--ressort);
}

.favori:hover {
  border-color: var(--encre-douce);
  transform: translateY(-1px);
}

.favori__code {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.05rem;
}

.favori__intitule {
  font-size: var(--t-petit);
  color: var(--encre-douce);
  min-width: 0;
}

.favori__intitule b {
  display: block;
  color: var(--encre);
  font-weight: 600;
}

.favori__etat {
  font-size: var(--t-micro);
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.favori__etat[data-force="indecis"] {
  background: var(--indecis);
  color: var(--encre);
}

.favori__etat[data-force="probable"][data-parti="D"] {
  background: var(--dem-penche);
  color: var(--dem-gagne);
}

.favori__etat[data-force="probable"][data-parti="R"] {
  background: var(--rep-penche);
  color: var(--rep-gagne);
}

.favori__etat[data-force="sur"][data-parti="D"] {
  background: var(--dem-sur);
  color: #fff;
}

.favori__etat[data-force="sur"][data-parti="R"] {
  background: var(--rep-sur);
  color: #fff;
}

.favori__etat[data-force="gagne"][data-parti="D"],
.favori__etat[data-force="projete"][data-parti="D"] {
  background: var(--dem-gagne);
  color: #fff;
}

.favori__etat[data-force="gagne"][data-parti="R"],
.favori__etat[data-force="projete"][data-parti="R"] {
  background: var(--rep-gagne);
  color: #fff;
}

/* ---------------------------------------------------------- hemicycle -- */

.hemicycle {
  width: 100%;
  height: auto;
  max-width: 660px;
  margin-inline: auto;
}

.siege {
  transition: fill 700ms var(--ressort);
}

.siege[data-parti="D"] {
  fill: var(--dem-gagne);
}

.siege[data-parti="R"] {
  fill: var(--rep-gagne);
}

.siege[data-parti="I"] {
  fill: var(--ind-gagne);
}

.siege[data-parti="vide"] {
  fill: var(--vide);
}

.hemicycle__seuil {
  stroke: var(--encre);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.hemicycle__chiffre {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 34px;
  text-anchor: middle;
  fill: var(--encre);
}

.hemicycle__mention {
  font-family: var(--texte);
  font-size: 12px;
  text-anchor: middle;
  fill: var(--encre-faible);
}

/* ------------------------------------------------------ tableau Etats -- */

.tableau-enveloppe {
  overflow-x: auto;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
}

table.donnees {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-petit);
  min-width: 560px;
}

table.donnees th,
table.donnees td {
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid var(--ligne);
  white-space: nowrap;
}

table.donnees th:first-child,
table.donnees td:first-child {
  text-align: left;
}

table.donnees thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--encre-douce);
  z-index: 1;
}

table.donnees tbody tr:last-child td {
  border-bottom: none;
}

table.donnees tbody tr:hover {
  background: var(--surface);
}

.pastille-parti {
  display: inline-block;
  min-width: 34px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  color: #fff;
}

.pastille-parti[data-parti="D"] {
  background: var(--dem-gagne);
}

.pastille-parti[data-parti="R"] {
  background: var(--rep-gagne);
}

.pastille-parti[data-parti="I"] {
  background: var(--ind-gagne);
}

.pastille-parti[data-parti="egalite"] {
  background: var(--indecis);
  color: var(--encre);
}

/* --------------------------------------------------------- flashs live */

.flashs {
  display: grid;
  gap: 0;
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  overflow: hidden;
}

.flash {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: var(--e2);
  padding: 14px var(--e2);
  border-bottom: 1px solid var(--ligne);
  animation: flash-entree 460ms var(--ressort) backwards;
}

.flash:last-child {
  border-bottom: none;
}

@keyframes flash-entree {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.flash__heure {
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--llb-magenta);
  padding-top: 3px;
}

.flash__texte {
  font-size: var(--t-petit);
  margin: 0;
  max-width: none;
}

/* ------------------------------------------------- cartes d'article ----- */

.fil {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--gouttiere);
}

.carte-article {
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--papier);
  animation: article-entree 520ms var(--ressort) backwards;
  animation-delay: calc(var(--rang, 0) * 70ms);
  transition: transform var(--duree) var(--ressort),
    border-color var(--duree-courte) var(--doux),
    box-shadow var(--duree) var(--doux);
}

.carte-article:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--ombre-2);
}

@keyframes article-entree {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.carte-article__lien {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.carte-article__image {
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  overflow: hidden;
}

.carte-article__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ressort);
}

.carte-article:hover .carte-article__image img {
  transform: scale(1.045);
}

.carte-article__corps {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: var(--e2) var(--e2) var(--e3);
}

.carte-article__rubrique {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--llb-magenta);
}

.carte-article__titre {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

.carte-article:hover .carte-article__titre {
  color: var(--llb-magenta);
}

.carte-article__chapo {
  font-size: var(--t-petit);
  line-height: 1.5;
  color: var(--encre-douce);
  margin: 0;
  max-width: none;
}

.carte-article__date {
  font-size: var(--t-micro);
  color: var(--encre-faible);
}

.fil__erreur {
  grid-column: 1 / -1;
  font-size: var(--t-petit);
  color: var(--encre-douce);
  padding: var(--e2);
  border: 1px dashed var(--ligne);
  border-radius: var(--rayon-petit);
}

.squelette {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface) 50%,
    var(--surface-2) 75%
  );
  background-size: 200% 100%;
  animation: chargement 1.4s linear infinite;
  border-radius: var(--rayon-petit);
}

.carte-article__image.squelette {
  border-radius: 0;
}

@keyframes chargement {
  to {
    background-position: -200% 0;
  }
}

.fil-pied {
  display: flex;
  justify-content: center;
  margin-top: var(--e4);
}

/* ------------------------------------------------------------- boutons */

.bouton {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: var(--t-petit);
  font-weight: 600;
  background: var(--llb-magenta);
  color: #fff;
  text-decoration: none;
  transition: transform var(--duree-courte) var(--ressort),
    filter var(--duree-courte) var(--doux);
}

.bouton:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.bouton--fantome {
  background: transparent;
  color: var(--encre);
  border: 1px solid var(--ligne);
}

.bouton--fantome:hover {
  border-color: var(--encre-douce);
  filter: none;
}

/* ------------------------------------------------------- page coulisses */

.coulisses-nuance {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: var(--e3) 0;
}

.nuance {
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-petit);
  overflow: hidden;
  font-size: var(--t-micro);
}

.nuance__aplat {
  height: 68px;
}

.nuance__legende {
  padding: 9px 11px;
}

.nuance__legende b {
  display: block;
}

.nuance__legende code {
  color: var(--encre-faible);
}

/* ----------------------------------------------------- bulle flottante */

.bulle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  width: min(340px, calc(100vw - 32px));
  background: var(--papier);
  border: 1px solid var(--ligne);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-2);
  padding: var(--e3) var(--e3) var(--e2);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 320ms var(--doux), transform 420ms var(--ressort);
}

.bulle[data-visible="oui"] {
  opacity: 1;
  transform: none;
}

.bulle strong {
  display: block;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.0625rem;
  margin-bottom: 6px;
  padding-right: 20px;
}

.bulle p {
  font-size: var(--t-petit);
  color: var(--encre-douce);
  margin-bottom: var(--e2);
  max-width: none;
}

.bulle .bouton {
  margin-bottom: var(--e1);
}

.bulle__fermer {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--encre-faible);
}

.bulle__fermer:hover {
  background: var(--surface-2);
  color: var(--encre);
}

/* ------------------------------------------------------------ bandeau -- */

.bandeau {
  background: var(--llb-marine);
  color: #fff;
  font-size: var(--t-petit);
  padding: 10px 0;
}

:root[data-theme="sombre"] .bandeau {
  background: var(--surface-2);
}

.bandeau p {
  margin: 0;
  max-width: none;
}

.barre-etat {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e2);
  align-items: baseline;
  justify-content: space-between;
  font-size: var(--t-micro);
  color: var(--encre-faible);
  margin: var(--e1) 0 var(--e4);
}

.barre-etat .hero__conduite {
  margin: 0;
}

#rafraichir {
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--llb-magenta);
}

#rafraichir:disabled {
  opacity: 0.4;
}

table.donnees th button {
  font: inherit;
  font-weight: 600;
  color: inherit;
}

table.donnees th[aria-sort="ascending"] button::after {
  content: " \2191";
}

table.donnees th[aria-sort="descending"] button::after {
  content: " \2193";
}

/* ------------------------------------------------------ titres de rang 3 */

.sous-titre {
  margin: var(--e5) 0 var(--e2);
}

.sous-titre--serre {
  margin: 0 0 var(--e3);
}

.apres-fil {
  margin-top: var(--e3);
}

.squelette--ligne {
  height: 14px;
  margin-bottom: 8px;
}

.squelette--courte {
  width: 70%;
  margin-bottom: 0;
}

/* ------------------------------------------------- page coulisses (suite) */

.echelle-ligne {
  font-size: var(--taille, 1rem);
  margin: 0 0 0.4rem;
  max-width: none;
}

.echelle-ligne[data-fonte="titre"] {
  font-family: var(--titre);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.echelle-ligne[data-fonte="texte"] {
  font-family: var(--texte);
}

.grille-cellule {
  background: color-mix(in srgb, var(--llb-magenta) 12%, transparent);
  color: var(--llb-magenta);
  text-align: center;
  padding: 1.5rem 0;
  border-radius: 6px;
  font-size: var(--t-micro);
  font-weight: 600;
  transition: transform 700ms var(--ressort), background 700ms var(--doux),
    grid-column 700ms var(--ressort);
}

#demo-grille[data-tordu="oui"] .grille-cellule {
  grid-column: span var(--portee, 1);
  transform: rotate(var(--pivot, 0deg)) translateY(var(--chute, 0));
}

#demo-grille[data-tordu="oui"] .grille-cellule[data-camp="D"] {
  background: color-mix(in srgb, var(--dem-gagne) 22%, transparent);
  color: var(--dem-gagne);
}

#demo-grille[data-tordu="oui"] .grille-cellule[data-camp="R"] {
  background: color-mix(in srgb, var(--rep-gagne) 22%, transparent);
  color: var(--rep-gagne);
}

/* ---------------------------------------------- bannières « Nos séries » */

.section--series {
  padding-top: var(--e5);
  padding-bottom: var(--e5);
}

.series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gouttiere);
}

.serie {
  position: relative;
  display: grid;
  gap: 8px;
  padding: var(--e3) calc(var(--e4) + 14px) var(--e3) var(--e3);
  border-radius: var(--rayon);
  background: var(--llb-marine);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  transition: transform var(--duree) var(--ressort);
}

.serie--reportage {
  background: var(--llb-magenta);
}

/* Filet diagonal discret, repris du bandeau « Nos séries » de la home. */
.serie::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.05) 0 2px,
    transparent 2px 13px
  );
  pointer-events: none;
}

.serie:hover {
  transform: translateY(-2px);
}

.serie__kicker {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.serie__titre {
  font-family: var(--titre);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.serie__texte {
  font-size: var(--t-petit);
  opacity: 0.82;
  max-width: 34ch;
}

.serie__fleche {
  position: absolute;
  right: var(--e3);
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  transition: transform var(--duree) var(--ressort),
    background var(--duree-courte) var(--doux);
}

.serie__fleche svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}

.serie:hover .serie__fleche {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-50%) translateX(4px);
}

@media (max-width: 560px) {
  .serie {
    padding-right: var(--e3);
  }
  .serie__fleche {
    position: static;
    transform: none;
    margin-top: var(--e1);
  }
  .serie:hover .serie__fleche {
    transform: translateX(4px);
  }
}

.bouton__fleche {
  width: 15px;
  height: 15px;
  fill: currentColor;
  transition: transform var(--duree-courte) var(--ressort);
}

.bouton:hover .bouton__fleche {
  transform: translateX(3px);
}

.flash__lien {
  text-decoration-color: color-mix(in srgb, var(--llb-magenta) 45%, transparent);
}

.flash__lien:hover {
  color: var(--llb-magenta);
}

/* ------------------------------------------- compteur dans la bulle ----- */

.bulle__compte {
  display: block;
  margin-top: var(--e1);
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--llb-magenta);
}

/* --------------------------------------- tableau de chasse (coulisses) -- */

.chasse__compte {
  font-weight: 600;
  margin-bottom: var(--e1);
}

.chasse__rail {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: var(--e3);
  max-width: 420px;
}

.chasse__jauge {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--llb-marine), var(--llb-magenta));
  transition: width 900ms var(--ressort);
}

.chasse__liste {
  list-style: none;
  counter-reset: surprise;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-width: 62ch;
}

.chasse__liste li {
  counter-increment: surprise;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--ligne);
}

.chasse__liste li::before {
  content: counter(surprise, decimal-leading-zero);
  grid-row: 1 / 3;
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--encre-faible);
  padding-top: 3px;
}

.chasse__liste b {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.chasse__liste span {
  font-size: var(--t-petit);
  color: var(--encre-douce);
}

.chasse__liste li[data-trouvee="non"] b {
  color: var(--encre-faible);
  font-family: var(--texte);
  font-weight: 600;
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chasse__liste li[data-trouvee="oui"] b::after {
  content: " \2713";
  color: var(--llb-magenta);
}

.chasse__fin {
  margin-top: var(--e3);
  font-weight: 600;
  color: var(--llb-magenta);
}

/* ------------------------------ Chambre suivie au total, pas par État ---- */

body[data-chambre="totaux"] #tableau-chambre,
body[data-chambre="totaux"] .sous-titre--detail {
  display: none;
}

.mention-mode {
  display: block;
  margin-top: var(--e3);
  padding: 12px 16px;
  border-left: 3px solid var(--encre-faible);
  background: var(--surface);
  border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0;
  font-size: var(--t-petit);
  color: var(--encre-douce);
  max-width: 62ch;
}

.mention-mode[hidden] {
  display: none;
}

/* ==========================================================================
   Section Sénat : arithmétique, damier, chronologie
   ========================================================================== */

.senat-arith {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gouttiere);
  margin: var(--e4) 0;
}

.arith {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "parti parti"
    "chiffre mention"
    "rail rail";
  align-items: baseline;
  gap: 4px 12px;
  padding: var(--e3);
  border-radius: var(--rayon);
  border: 1px solid var(--ligne);
  background: var(--surface);
  text-decoration: none;
  transition: transform var(--duree) var(--ressort),
    border-color var(--duree-courte) var(--doux);
}

.arith:hover {
  transform: translateY(-2px);
  border-color: var(--encre-douce);
}

.arith__parti {
  grid-area: parti;
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--encre-faible);
  margin-bottom: 4px;
}

.arith__chiffre {
  grid-area: chiffre;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 3.1rem;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.arith[data-parti="D"] .arith__chiffre {
  color: var(--dem-gagne);
}

.arith[data-parti="R"] .arith__chiffre {
  color: var(--rep-gagne);
}

.arith__mention {
  grid-area: mention;
  font-size: var(--t-petit);
  color: var(--encre-douce);
}

.arith__rail {
  grid-area: rail;
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: var(--e2);
}

.arith__jauge {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width 900ms var(--ressort);
}

.arith[data-parti="D"] .arith__jauge {
  background: var(--dem-gagne);
}

.arith[data-parti="R"] .arith__jauge {
  background: var(--rep-gagne);
}

.arith[data-atteint="oui"] {
  border-color: currentColor;
}

.arith[data-atteint="oui"][data-parti="D"] {
  border-color: var(--dem-gagne);
}

.arith[data-atteint="oui"][data-parti="R"] {
  border-color: var(--rep-gagne);
}

/* ------------------------------------------------- damier des 35 sièges -- */

.legende-bloc {
  font-size: var(--t-petit);
  color: var(--encre-douce);
  max-width: 62ch;
  margin-bottom: var(--e3);
}

.damier {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: var(--e3);
}

/* Le contour porte le sortant, le fond porte le résultat. Deux
   informations sur un seul carré, sans superposer deux cartes. */
.siege-tuile {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  aspect-ratio: 1 / 1;
  border-radius: var(--rayon-petit);
  border: 3px solid var(--dem-gagne);
  background: var(--vide);
  color: var(--encre);
  text-decoration: none;
  transition: transform var(--duree) var(--ressort),
    background var(--duree) var(--ressort);
}

.siege-tuile[data-sortant="R"] {
  border-color: var(--rep-gagne);
}

.siege-tuile:hover {
  transform: translateY(-3px) scale(1.04);
  z-index: 1;
}

.siege-tuile__code {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.siege-tuile__heure {
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  color: var(--encre-faible);
}

.siege-tuile[data-parti="D"] {
  background: var(--dem-gagne);
}

.siege-tuile[data-parti="R"] {
  background: var(--rep-gagne);
}

.siege-tuile[data-parti="I"] {
  background: var(--ind-gagne);
}

.siege-tuile[data-parti="D"][data-force="projete"] {
  background: var(--dem-projete);
}

.siege-tuile[data-parti="R"][data-force="projete"] {
  background: var(--rep-projete);
}

.siege-tuile[data-parti="D"][data-force="sur"] {
  background: var(--dem-sur);
}

.siege-tuile[data-parti="R"][data-force="sur"] {
  background: var(--rep-sur);
}

.siege-tuile[data-parti="D"][data-force="probable"] {
  background: var(--dem-penche);
}

.siege-tuile[data-parti="R"][data-force="probable"] {
  background: var(--rep-penche);
}

.siege-tuile[data-parti="indecis"] {
  background: var(--indecis);
}

/* Fond plein : le code passe en blanc pour rester lisible. */
.siege-tuile[data-force="gagne"] .siege-tuile__code,
.siege-tuile[data-force="projete"] .siege-tuile__code,
.siege-tuile[data-force="gagne"] .siege-tuile__heure,
.siege-tuile[data-force="projete"] .siege-tuile__heure {
  color: #fff;
}

/* Un siège décisif porte un liseré intérieur, un siège qui bascule porte
   un point. Deux marques discrètes, lisibles sans légende une fois comprises. */
.siege-tuile[data-decisif="oui"] {
  box-shadow: inset 0 0 0 2px var(--papier);
}

.siege-tuile[data-bascule="oui"]::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--papier);
  box-shadow: 0 0 0 2px var(--encre);
}

.damier-legende {
  list-style: none;
  margin: 0 0 var(--e4);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: var(--t-micro);
  color: var(--encre-douce);
}

.damier-legende li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.damier-puce {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 3px solid var(--ligne);
  background: var(--vide);
  flex: none;
}

.damier-puce[data-sortant="D"] {
  border-color: var(--dem-gagne);
}

.damier-puce[data-sortant="R"] {
  border-color: var(--rep-gagne);
}

.damier-puce[data-decisif="oui"] {
  border-color: var(--encre-douce);
  box-shadow: inset 0 0 0 2px var(--papier);
}

.damier-puce[data-bascule="oui"] {
  border-color: var(--encre-douce);
  background: radial-gradient(circle at 70% 30%, var(--encre) 0 3px, var(--vide) 3px);
}

/* ------------------------------------------------ chronologie de la nuit */

.senat-bas {
  margin-top: var(--e5);
}

.chrono {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: heure;
}

.chrono__ligne {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: var(--e2);
  padding: 14px 0;
  border-top: 1px solid var(--ligne);
  position: relative;
}

.chrono__ligne:last-child {
  border-bottom: 1px solid var(--ligne);
}

.chrono__heure {
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--encre);
  padding-top: 1px;
}

.chrono__ligne[data-decisif="oui"] .chrono__heure {
  color: var(--llb-magenta);
}

.chrono__corps {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chrono__compte {
  font-size: var(--t-petit);
}

.chrono__etats {
  font-size: var(--t-petit);
  color: var(--encre-douce);
  line-height: 1.5;
}

.chrono__etat[data-decisif="oui"] {
  color: var(--encre);
  font-weight: 600;
}

.chrono__etat[data-fini="oui"] {
  text-decoration: line-through;
  text-decoration-color: var(--encre-faible);
  color: var(--encre-faible);
  font-weight: 400;
}

@media (max-width: 560px) {
  .damier {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 6px;
  }

  .siege-tuile__code {
    font-size: 0.9rem;
  }

  .arith__chiffre {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Compteur de lecteurs présents

   Il ne forme pas un bloc à lui : il se glisse dans la pastille du direct,
   derrière un séparateur. Une seule pastille, deux informations, et le
   magenta de la charte plutôt qu'une couleur de plus.
   ========================================================================== */

.pastille-direct__foule {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding-left: 9px;
  margin-left: 2px;
  border-left: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

.pastille-direct__foule[hidden] {
  display: none;
}

.foule__nombre {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Le point de la pastille bat déjà : un second point ferait clignoter la
   barre pour rien. */
.pastille-direct__foule .foule__point {
  display: none;
}

/* Version longue, dans le sommaire mobile. */
.foule {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: var(--t-micro);
  font-weight: 600;
  color: var(--encre-douce);
  white-space: nowrap;
}

.foule[hidden] {
  display: none;
}

.foule .foule__point {
  align-self: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--llb-magenta);
  flex: none;
  animation: pouls 2.4s var(--doux) infinite;
}

.foule .foule__nombre {
  color: var(--llb-magenta);
}

/* Répétition générale : la foule est simulée, le liseré le dit à qui
   regarde de près, sans alourdir l'affichage. */
.foule[data-simule="oui"],
.pastille-direct__foule[data-simule="oui"] {
  outline: 1px dashed color-mix(in srgb, currentColor 45%, transparent);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .pastille-direct__foule {
    display: none;
  }
}

/* ==========================================================================
   Frise historique
   ========================================================================== */

.sous-titre--premier {
  margin-top: 0;
}

.frise {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--e3);
  position: relative;
  counter-reset: etape;
}

/* Le filet vertical relie les dates : une frise, pas une liste. */
.frise::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--ligne);
}

.frise__etape {
  position: relative;
  padding-bottom: var(--e3);
}

.frise__etape::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--e3) + 1px);
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--encre-faible);
  box-shadow: 0 0 0 3px var(--papier);
}

.frise__etape--maintenant::before {
  background: var(--llb-magenta);
  width: 10px;
  height: 10px;
  left: calc(-1 * var(--e3));
  top: 6px;
}

.frise__date {
  display: block;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.frise__etape--maintenant .frise__date {
  color: var(--llb-magenta);
}

.frise__fait {
  display: block;
  font-size: var(--t-petit);
  color: var(--encre-douce);
  line-height: 1.5;
  margin-top: 3px;
}

/* ==========================================================================
   Questions fréquentes
   ========================================================================== */

.faq {
  display: grid;
  gap: 10px;
  max-width: 68ch;
}

.faq__item {
  border: 1px solid var(--ligne);
  border-radius: var(--rayon-petit);
  background: var(--surface);
  padding: 14px 18px;
  transition: border-color var(--duree-courte) var(--doux);
}

.faq__item[open] {
  border-color: color-mix(in srgb, var(--llb-magenta) 40%, var(--ligne));
}

.faq__question {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font-family: var(--titre);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "+";
  flex: none;
  font-family: var(--texte);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--llb-magenta);
  transition: transform var(--duree) var(--ressort);
}

.faq__item[open] .faq__question::after {
  content: "+";
  transform: rotate(45deg);
}

.faq__reponse {
  margin-top: 10px;
  animation: faq-ouvre 320ms var(--ressort);
}

.faq__reponse p {
  margin: 0;
  font-size: var(--t-petit);
  line-height: 1.6;
  color: var(--encre-douce);
  max-width: none;
}

@keyframes faq-ouvre {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

/* Répétition générale : la foule est simulée, le liseré le dit à qui
   regarde de près, sans alourdir l'affichage. */
.foule[data-simule="oui"] {
  outline: 1px dashed color-mix(in srgb, var(--ind-gagne) 55%, transparent);
  outline-offset: 1px;
}

/* ==========================================================================
   Résumé servi par le serveur

   Il existe avant tout JavaScript : c'est ce que lisent les robots, les
   assistants, et un lecteur dont le réseau a lâché. Il reste discret
   visuellement, parce qu'il double une information déjà portée par les
   jauges juste au-dessus.
   ========================================================================== */

.resume {
  margin: var(--e3) 0 0;
  padding-left: var(--e2);
  border-left: 2px solid var(--ligne);
  max-width: 68ch;
}

.resume__titre {
  font-family: var(--texte);
  font-weight: 600;
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--encre-faible);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.resume p {
  font-size: var(--t-petit);
  line-height: 1.55;
  color: var(--encre-douce);
  margin-bottom: 5px;
  max-width: none;
}

.resume p:last-child {
  margin-bottom: 0;
}
