/* Le plateau : coquille de l'appli, écrans, pupitres, buzzer, tableau de points, fiches. */

.studio {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(90% 46% at 50% -8%, rgb(var(--projecteur) / 0.12), transparent 72%),
    linear-gradient(180deg, var(--studio-900) 0%, var(--studio-900) 60%, #121035 100%);
}

/* Deux projecteurs accrochés en haut : des cônes de lumière aux bords fondus, qui s'éteignent en descendant. */
.studio::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    conic-gradient(from 154deg at -4% -8%, transparent 0deg, rgb(var(--projecteur) / 0.14) 8deg, rgb(var(--projecteur) / 0.14) 14deg, transparent 22deg),
    conic-gradient(from 184deg at 104% -8%, transparent 0deg, rgb(var(--projecteur) / 0.14) 8deg, rgb(var(--projecteur) / 0.14) 14deg, transparent 22deg);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.55) 50%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / 0.55) 50%, transparent 92%);
  transition: opacity var(--d-moyen) ease;
}

/* Sur grand écran, les faisceaux tombent de plus loin et convergent vers la colonne. */
@media (min-width: 700px) {
  .studio::before {
    background:
      conic-gradient(from 146deg at 6% -10%, transparent 0deg, rgb(var(--projecteur) / 0.13) 8deg, rgb(var(--projecteur) / 0.13) 16deg, transparent 24deg),
      conic-gradient(from 190deg at 94% -10%, transparent 0deg, rgb(var(--projecteur) / 0.13) 8deg, rgb(var(--projecteur) / 0.13) 16deg, transparent 24deg);
  }
}

/* Pendant une partie, les projecteurs baissent : le jeu passe devant. */
body:has(.ecran-partie) .studio::before {
  opacity: 0.3;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  overflow-x: clip;
  margin-inline: auto;
  padding: calc(env(safe-area-inset-top) + var(--e-4)) var(--e-4) calc(env(safe-area-inset-bottom) + var(--e-5));
  display: flex;
  flex-direction: column;
}

.app:focus {
  outline: none;
}

.ecran {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--e-5);
  animation: ecran-entree var(--d-moyen) var(--ease-out) both;
}

/* L'écran arrive déjà visible : un léger glissement, jamais depuis le vide. */
@keyframes ecran-entree {
  from {
    opacity: 0.5;
    transform: translateY(10px);
  }
}

h1:focus {
  outline: none;
}

/* Étiquettes */
.etiquette {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-size: var(--t-etiquette);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texte-2);
}

.etiquette svg {
  width: 16px;
  height: 16px;
}

.etiquette.fam {
  color: var(--fam);
}

/* Un seul style de chiffres, du gros score au petit niveau : Anybody étendue. Les mots autour restent en Atkinson. */
.chiffre,
.tableau-chiffres,
.gain,
.meche-temps,
.serie-grande-chiffre,
.stat-valeur {
  font-family: var(--police-titre);
  font-stretch: var(--chiffres-largeur);
  font-weight: var(--chiffres-graisse);
  font-variant-numeric: tabular-nums;
}

/* En-tête */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
}

.marque {
  font-family: var(--police-titre);
  font-stretch: 140%;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entete-espace {
  width: 44px;
  height: 44px;
}

.entete-actions {
  display: flex;
  align-items: center;
  gap: var(--e-1);
}

.bouton-icone {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pilule);
  color: var(--texte-2);
  transition: transform var(--d-appui) var(--ease-out), color var(--d-court) ease, background-color var(--d-court) ease;
}

.bouton-icone svg {
  width: 22px;
  height: 22px;
}

.bouton-icone:active {
  transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .bouton-icone:hover {
    color: var(--texte);
    background: var(--surface);
  }
}

.serie {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--e-3) 0 var(--e-2);
  border-radius: var(--r-pilule);
  background: var(--surface);
  color: var(--texte);
  font-weight: 700;
  font-size: var(--t-petit);
  white-space: nowrap;
}

.serie svg {
  width: 18px;
  height: 18px;
  color: var(--ambre);
}

.serie[data-active="false"] svg {
  color: var(--texte-3);
}

/* L'émission du jour */
.emission {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  padding-top: var(--e-2);
}

.emission-titre,
.ecran-titre {
  font-family: var(--police-titre);
  font-stretch: 125%;
  font-weight: 800;
  font-size: var(--t-ecran);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.emission-date {
  color: var(--texte);
  font-weight: 700;
}

.emission-sous {
  color: var(--texte-2);
}

.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: var(--e-2);
}

.rail-segment {
  height: 6px;
  border-radius: var(--r-pilule);
  background: color-mix(in oklab, var(--fam) 22%, var(--studio-800));
  transition: background-color var(--d-moyen) ease;
}

.rail-segment[data-statut="reussie"],
.rail-segment[data-statut="jouee"] {
  background: var(--fam);
}

/* Pupitres : un podium laqué par épreuve, à la couleur franche de sa famille */
.pupitres {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-3);
}

/* La flaque de lumière où se tiennent les pupitres */
.pupitres::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22% 0 -26%;
  background: radial-gradient(closest-side, rgb(var(--projecteur) / 0.11), transparent);
  pointer-events: none;
}

.pupitre {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--e-2);
  min-height: 156px;
  padding: var(--e-4) var(--e-4) 20px;
  border-radius: var(--r-grand);
  background: linear-gradient(180deg, color-mix(in oklab, var(--fam), white 14%) 0%, var(--fam) 44%, color-mix(in oklab, var(--fam), var(--studio-950) 12%) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.55),
    inset 0 -6px 0 color-mix(in oklab, var(--fam), var(--studio-950) 40%),
    0 18px 26px -18px rgb(0 0 0 / 0.9);
  color: var(--encre);
  text-align: left;
  transition: transform var(--d-appui) var(--ease-out), box-shadow var(--d-court) ease;
}

/* Le reflet du laque : une seule bande claire, inclinée comme la lumière du plafond */
.pupitre::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -20%;
  right: -20%;
  top: 8%;
  height: 26%;
  background: linear-gradient(180deg, rgb(255 255 255 / 0), rgb(255 255 255 / 0.26) 50%, rgb(255 255 255 / 0));
  transform: rotate(-8deg);
  pointer-events: none;
}

.pupitre:active {
  transform: scale(0.97);
}

/* La prochaine épreuve est sous son propre projecteur */
.pupitre[data-prochaine="true"] {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.75),
    inset 0 -6px 0 color-mix(in oklab, var(--fam), var(--studio-950) 40%),
    0 26px 34px -18px rgb(0 0 0 / 0.95);
}

.pupitre[data-prochaine="true"]::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(75% 65% at 50% 0%, rgb(255 255 255 / 0.55), transparent 78%);
  pointer-events: none;
}

.pupitre[data-prochaine="true"]:active {
  transform: translateY(-3px) scale(0.97);
}

.pupitre-nom {
  font-family: var(--police-titre);
  font-stretch: var(--nom-jeu-largeur);
  font-weight: 800;
  font-size: var(--t-sous);
  line-height: 1.1;
  hyphens: auto;
  overflow-wrap: break-word;
}

.pupitre-famille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-etiquette);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pupitre-famille svg {
  width: 15px;
  height: 15px;
}

.pupitre-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-2);
  margin-top: auto;
}

.pupitre-niveau {
  font-weight: 700;
  font-size: var(--t-petit);
  white-space: nowrap;
}

.pupitre-etat svg {
  display: block;
  width: 22px;
  height: 22px;
}

.pupitre .echelle {
  align-self: flex-start;
  --cran-eteint: rgb(20 20 35 / 0.2);
  --cran-atteint: rgb(20 20 35 / 0.62);
  --cran-courant: var(--encre);
}

/* Échelle de maîtrise : 15 crans, partout la même */
.echelle {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  --cran-l: 4px;
  --cran-h-min: 5px;
  --cran-h-pas: 0.75px;
  --cran-eteint: var(--studio-700);
  --cran-atteint: color-mix(in oklab, var(--fam) 70%, var(--studio-700));
  --cran-courant: var(--fam);
}

.echelle i {
  display: block;
  width: var(--cran-l);
  height: calc(var(--cran-h-min) + var(--rang) * var(--cran-h-pas));
  border-radius: 1.5px;
  background: var(--cran-eteint);
  transform-origin: bottom;
  transition: background-color var(--d-moyen) ease, transform var(--d-moyen) var(--ease-out);
}

.echelle i.atteint {
  background: var(--cran-atteint);
}

.echelle i.courant {
  background: var(--cran-courant);
}

.echelle-grand {
  gap: 5px;
  --cran-l: 12px;
  --cran-h-min: 12px;
  --cran-h-pas: 2px;
}

.echelle-grand i {
  border-radius: 3px;
}

.echelle i.allume {
  animation: cran-allume 520ms var(--ease-out) both;
}

@keyframes cran-allume {
  0% {
    transform: scaleY(0.35);
    background: var(--studio-50);
  }
  60% {
    transform: scaleY(1.12);
  }
  100% {
    transform: scaleY(1);
  }
}

/* Boutons */
.buzzer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  width: 100%;
  min-height: 64px;
  padding: 0 var(--e-5);
  border-radius: var(--r-pilule);
  background: radial-gradient(120% 150% at 50% 0%, var(--rouge-buzzer-haut) 0%, var(--rouge-buzzer) 52%, var(--rouge-buzzer-fonce) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.28),
    inset 0 -3px 6px rgb(0 0 0 / 0.18),
    0 16px 28px -14px rgb(0 0 0 / 0.7);
  color: var(--studio-50);
  font-family: var(--police-titre);
  font-stretch: 118%;
  font-weight: 800;
  font-size: var(--t-sous);
  letter-spacing: 0.01em;
  transition: transform var(--d-appui) var(--ease-out), box-shadow var(--d-appui) var(--ease-out), opacity var(--d-court) ease;
}

.buzzer:active:not(:disabled) {
  transform: scale(0.97) translateY(1px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.22),
    inset 0 -2px 4px rgb(0 0 0 / 0.2),
    0 8px 16px -12px rgb(0 0 0 / 0.7);
}

.buzzer:disabled {
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
  color: var(--texte-2);
}

.buzzer svg {
  width: 22px;
  height: 22px;
}

.bouton-secondaire {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  width: 100%;
  min-height: 52px;
  padding: 0 var(--e-5);
  border-radius: var(--r-pilule);
  border: 1.5px solid var(--trait);
  color: var(--texte);
  font-weight: 700;
  transition: transform var(--d-appui) var(--ease-out), border-color var(--d-court) ease, background-color var(--d-court) ease;
}

.bouton-secondaire:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .bouton-secondaire:hover {
    border-color: var(--studio-500);
    background: var(--surface);
  }
}

.bouton-secondaire svg {
  width: 20px;
  height: 20px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
  margin-top: auto;
  padding-top: var(--e-2);
}

.note {
  color: var(--texte-2);
  font-size: var(--t-petit);
  text-align: center;
}

/* Sections du plateau */
.section {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
  padding-top: var(--e-5);
}

.section-titre {
  font-family: var(--police-titre);
  font-stretch: 115%;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.1;
}

.section-sous {
  color: var(--texte-2);
  font-size: var(--t-petit);
}

.famille-bloc {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
}

.famille-bloc + .famille-bloc {
  margin-top: var(--e-5);
}

/* Le titre de chaque famille : un vrai titre, pas une étiquette */
.famille-titre {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  font-family: var(--police-titre);
  font-stretch: 115%;
  font-weight: 800;
  font-size: 1.3125rem;
  line-height: 1.15;
}

.famille-titre svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--fam);
}

.jeu-ligne {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--e-1) var(--e-3);
  width: 100%;
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-moyen);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--trait); /* un bord qui tient même sous la lumière des projecteurs */
  text-align: left;
  transition: transform var(--d-appui) var(--ease-out), background-color var(--d-court) ease;
}

.jeu-ligne:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .jeu-ligne:hover {
    background: var(--surface-haute);
  }
}

.jeu-ligne-nom {
  font-family: var(--police-titre);
  font-stretch: var(--nom-jeu-largeur);
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.2;
}

.jeu-ligne-resume {
  grid-column: 1;
  color: var(--texte-2);
  font-size: var(--t-petit);
  line-height: 1.4;
}

.jeu-ligne-niveau {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-weight: 700;
  font-size: var(--t-petit);
  color: var(--texte-2);
}

/* Fiche cartonnée */
.fiche {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--e-4);
  padding: var(--e-5);
  border-radius: var(--r-grand);
  background-color: var(--fiche);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  box-shadow: var(--ombre-fiche);
  color: var(--encre);
}

.fiche .etiquette {
  color: var(--fam-encre);
}

.fiche-titre {
  font-family: var(--police-titre);
  font-stretch: var(--nom-jeu-largeur);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

/* Le niveau s'imprime à l'encre sur la fiche, comme le reste */
.fiche-niveau {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
  padding-top: var(--e-3);
  border-top: 1px dashed var(--fiche-ombre);
  color: var(--encre);
  font-weight: 700;
}

.fiche .echelle {
  --cran-eteint: rgb(20 20 35 / 0.14);
  --cran-atteint: color-mix(in oklab, var(--fam-encre) 55%, var(--fiche));
  --cran-courant: var(--fam-encre);
}

.fiche-consigne {
  font-size: var(--t-sous);
  line-height: 1.45;
}

.fiche-objectif {
  color: var(--encre);
}

.fiche-record {
  color: var(--encre-2);
  font-size: var(--t-petit);
}

.apercu {
  display: flex;
  justify-content: center;
  padding: var(--e-4);
  border-radius: var(--r-moyen);
  background: var(--studio-900);
  color: var(--texte);
}

/* HUD de partie */
.ecran-partie {
  gap: var(--e-3);
}

.hud {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
}

.hud-ligne {
  display: flex;
  align-items: center;
  gap: var(--e-2);
}

.hud-titre {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hud-nom {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  min-width: 0;
  font-family: var(--police-titre);
  font-stretch: var(--nom-jeu-largeur);
  font-weight: 800;
  font-size: var(--t-sous);
  line-height: 1.15;
}

.hud-nom svg {
  width: 18px;
  height: 18px;
  color: var(--fam);
}

.hud-nom span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.hud-famille {
  color: var(--texte-2);
  font-size: var(--t-petit);
}

.tableau-zone {
  position: relative;
}

.tableau {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 112px;
  padding: 6px var(--e-3) 5px;
  border-radius: var(--r-moyen);
  background: var(--studio-950);
  box-shadow: inset 0 0 0 1px var(--studio-800), inset 0 8px 16px -10px rgb(0 0 0 / 0.8);
}

.tableau-chiffres {
  display: inline-block;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--points);
  text-shadow: 0 0 10px rgb(255 200 69 / 0.28);
}

.tableau-chiffres.pulse {
  animation: chiffres-pulse 180ms var(--ease-out);
}

@keyframes chiffres-pulse {
  from {
    transform: scale(1.08);
  }
}

.tableau-legende {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texte-3);
}

.gains {
  position: absolute;
  right: var(--e-3);
  top: 100%;
  pointer-events: none;
}

.gain {
  position: absolute;
  right: 0;
  top: 4px;
  font-size: var(--t-sous);
  white-space: nowrap;
}

.gain.plus {
  color: var(--fam);
}

.gain.moins {
  color: #ff6b66;
}

.meche {
  display: flex;
  align-items: center;
  gap: var(--e-3);
}

.meche-piste {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: var(--r-pilule);
  background: var(--studio-800);
}

.meche-feu {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--fam);
  transform-origin: left;
  will-change: transform;
}

.meche.urgent .meche-feu {
  background: var(--erreur);
}

.meche-temps {
  min-width: 3ch;
  font-size: var(--t-sous);
  text-align: right;
}

.meche.urgent .meche-temps {
  color: #ff6b66;
}

.pastilles {
  display: flex;
  gap: 6px;
}

.pastille {
  display: grid;
  place-items: center;
  flex: 1;
  height: 22px;
  border-radius: var(--r-pilule);
  background: var(--studio-800);
  color: var(--studio-950);
  transition: background-color var(--d-court) ease;
}

.pastille svg {
  width: 14px;
  height: 14px;
}

.pastille.courante {
  box-shadow: inset 0 0 0 2px var(--fam);
}

.pastille.reussie {
  background: var(--fam);
}

.pastille.ratee {
  background: var(--erreur);
  color: var(--studio-50);
}

.compteur {
  color: var(--texte-2);
  font-weight: 700;
  font-size: var(--t-petit);
}

.indice {
  min-height: 3em;
  color: var(--texte);
  font-size: var(--t-sous);
  line-height: 1.4;
}

.zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--e-4);
  padding-bottom: var(--e-4);
}

/* Résultat : un seul tableau de points, où le score défile et le cran s'allume */
.ecran-resultat {
  align-items: stretch;
}

.tableau-resultat {
  align-items: stretch;
  padding: 0;
  border-radius: var(--r-grand);
  overflow: hidden;
}

.tableau-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--e-5) var(--e-4) var(--e-4);
}

.tableau-resultat .tableau-chiffres {
  font-size: clamp(3.5rem, 2rem + 7vw, 4.5rem);
  text-shadow: 0 0 16px rgb(255 200 69 / 0.3);
}

.tableau-resultat .tableau-legende {
  font-size: var(--t-etiquette);
}

.tableau-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid var(--studio-800);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2px;
  padding: var(--e-3) var(--e-4);
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--studio-800);
}

.stat-valeur {
  font-size: var(--t-titre);
  line-height: 1.1;
}

.stat-libelle {
  color: var(--texte-2);
  font-size: var(--t-petit);
}

.tableau-niveau {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-4) var(--e-4) var(--e-5);
  border-top: 1px solid var(--studio-800);
}

.tableau-niveau-texte {
  display: flex;
  align-items: baseline;
  gap: var(--e-2);
  font-size: var(--t-titre);
  line-height: 1.1;
}

.tableau-niveau-libelle {
  font-family: var(--police-texte);
  font-stretch: 100%;
  font-weight: 400;
  font-size: var(--t-petit);
  color: var(--texte-2);
}

.objectif-ligne {
  display: flex;
  align-items: flex-start;
  gap: var(--e-3);
  font-weight: 700;
}

.objectif-ligne svg {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: -1px;
  color: var(--texte-3);
}

.objectif-ligne[data-ok="true"] svg {
  color: var(--fam);
}

.record {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  color: var(--points);
  font-weight: 700;
}

.record svg {
  width: 20px;
  height: 20px;
}

/* Fin de l'émission */
.serie-grande {
  display: flex;
  align-items: center;
  gap: var(--e-4);
  padding: var(--e-5);
  border-radius: var(--r-grand);
  background: var(--studio-950);
  box-shadow: inset 0 0 0 1px var(--studio-800);
}

.serie-grande svg {
  width: 44px;
  height: 44px;
  color: var(--ambre);
}

.serie-grande-chiffre {
  font-size: 3rem;
  line-height: 1;
  color: var(--points);
}

.recap {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
}

.recap-ligne {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-moyen);
  background: var(--surface);
}

.recap-ligne svg {
  width: 22px;
  height: 22px;
  color: var(--fam);
}

.recap-ligne-nom {
  flex: 1;
  font-weight: 700;
}

.recap-ligne-detail {
  color: var(--texte-2);
  font-size: var(--t-petit);
  font-variant-numeric: tabular-nums;
}

/* Profil */
.jauge {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
  padding: var(--e-4);
  border-radius: var(--r-grand);
  background: var(--surface);
}

.jauge-tete {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--e-3);
}

.jauge-nom {
  font-family: var(--police-titre);
  font-stretch: 110%;
  font-weight: 750;
  font-size: var(--t-sous);
}

.jauge-niveau {
  margin-top: 2px;
  font-weight: 700;
  font-size: var(--t-petit);
  color: var(--fam);
}

.jauge-jeux {
  display: flex;
  flex-direction: column;
  gap: var(--e-1);
  color: var(--texte-2);
  font-size: var(--t-petit);
}

.jauge-jeux li {
  display: flex;
  justify-content: space-between;
  gap: var(--e-3);
}

.jauge-jeux-niveau {
  white-space: nowrap;
}

/* Réglages */
.reglages {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
}

.reglage {
  display: flex;
  align-items: center;
  gap: var(--e-4);
  width: 100%;
  padding: var(--e-4);
  border-radius: var(--r-moyen);
  background: var(--surface);
  text-align: left;
}

.reglage-texte {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reglage-nom {
  font-weight: 700;
}

.reglage-aide {
  color: var(--texte-2);
  font-size: var(--t-petit);
  line-height: 1.4;
}

.interrupteur {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: var(--r-pilule);
  background: var(--studio-700);
  transition: background-color var(--d-court) ease;
}

.interrupteur::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--studio-50);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.35);
  transition: transform var(--d-court) var(--ease-out), background-color var(--d-court) ease;
}

.reglage[aria-checked="true"] .interrupteur {
  background: var(--ambre);
}

.reglage[aria-checked="true"] .interrupteur::after {
  transform: translateX(20px);
  background: var(--studio-950);
}

.bouton-danger {
  border-color: color-mix(in oklab, var(--erreur) 60%, var(--trait));
  color: #ff8a86;
}

.dialogue {
  width: min(92vw, 400px);
  padding: var(--e-5);
  border: 0;
  border-radius: var(--r-grand);
  background: var(--studio-850);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.8);
}

.dialogue::backdrop {
  background: rgb(6 6 18 / 0.7);
}

.dialogue h2 {
  font-family: var(--police-titre);
  font-stretch: 115%;
  font-weight: 750;
  font-size: var(--t-titre);
  line-height: 1.15;
}

.dialogue p {
  margin-top: var(--e-3);
  color: var(--texte-2);
}

.dialogue .actions {
  margin-top: var(--e-5);
}

.a-propos {
  color: var(--texte-3);
  font-size: var(--t-petit);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .ecran,
  .echelle i.allume,
  .tableau-chiffres.pulse {
    animation: none;
  }
}
