/* melomigo.com - la console de poche.
 *
 * La page est la console de Melomigo : une coque jaune cernée d'encre, un
 * écran où tout défile, la croix qui passe d'un écran à l'autre, A qui
 * inscrit, B qui remonte, l'interrupteur qui allume l'écran en clair ou en
 * sombre. Mêmes jetons que lib/design/tokens.dart : papier, encre, cinq
 * aplats, des ombres décalées sans flou, aucun dégradé (le damier les
 * remplace), Pixelify pour la voix de jeu, Public Sans pour le texte.
 *
 * La coque n'est pas une image : c'est l'ombre géante de la fenêtre de
 * l'écran (.fenetre). Le contenu défile dessous, dans la fenêtre. */

@font-face { font-family: "Pixelify"; src: url("/fonts/pixelify.woff2") format("woff2");
  font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/publicsans.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; }

:root {
  /* L'écran. */
  --papier: #FDFCF8; --surface: #FFFFFF; --creux: #F0EDE4; --filet: #D9D4C8; --damier: #EFEBE1;
  --encre: #0A0A0A; --encre-2: #4A4742; --encre-3: #6B665E;
  --ombre: #0A0A0A;
  /* Les aplats, les mêmes dans les deux thèmes ; on y pose toujours de l'encre. */
  --jaune: #FFD11A; --violet: #9B7BFF; --rose: #FF3B77; --vert: #21C55D; --bleu: #5B8CFF;
  --noir: #0A0A0A; --blanc: #FDFCF8;
  /* La coque : le jaune de l'app. En sombre, elle passe à l'ocre, comme la
     même console dans une pièce où la lumière a baissé. */
  --coque: #FFD11A; --coque-ombre: #D9AE00; --cadran: #26242E;
  --pixel: "Pixelify", "Courier New", monospace;
  --texte: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r: 8px; --r-petit: 4px; --trait: 3px;
  /* Les mesures de la coque : le haut, les poignées, le bas, l'anneau sombre
     autour de l'écran. */
  --t: 76px; --c: clamp(124px, 9vw, 144px); --b: 26px; --anneau: 14px;
  --marge: clamp(16px, 4vw, 64px);
  --fenetre-haut: calc(var(--t) + var(--anneau));
  --barre: 44px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --papier: #17161C; --surface: #26242E; --creux: #0E0D12; --filet: #3D3A47; --damier: #1B1A21;
    --encre: #F7F5EE; --encre-2: #C3BFB4; --encre-3: #9A958A;
    --ombre: #000000;
    --coque: #A86E00; --coque-ombre: #6B4600;
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --papier: #17161C; --surface: #26242E; --creux: #0E0D12; --filet: #3D3A47; --damier: #1B1A21;
  --encre: #F7F5EE; --encre-2: #C3BFB4; --encre-3: #9A958A;
  --ombre: #000000;
  --coque: #A86E00; --coque-ombre: #6B4600;
  color-scheme: dark;
}
@media (max-width: 1099px) { :root { --t: 64px; --c: 104px; --b: 20px; --anneau: 10px; } }
@media (max-width: 759px) {
  :root { --t: 52px; --c: 8px; --b: calc(84px + env(safe-area-inset-bottom)); --anneau: 4px; --barre: 40px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  scroll-padding-top: calc(var(--fenetre-haut) + var(--barre) + 8px);
  scrollbar-color: var(--noir) var(--coque); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--papier); color: var(--encre); font: 400 17px/1.6 var(--texte);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding: var(--fenetre-haut) calc(var(--c) + var(--anneau)) calc(var(--b) + var(--anneau)); }
::selection { background: var(--jaune); color: var(--noir); }
img, svg { display: block; max-width: 100%; }
/* Ce que le script cache reste caché, même sous une règle qui pose un display. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
p { margin: 0 0 1em; }
/* Sans ligatures : le « fi » de Pixelify se lit comme un A (« ConAdentialité »). */
h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1.04; margin: 0; letter-spacing: 0;
  font-variant-ligatures: none; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; }
input { caret-color: var(--rose); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap; }
.saut { position: fixed; left: 16px; top: -80px; z-index: 100; background: var(--jaune); color: var(--noir);
  padding: 10px 16px; border: var(--trait) solid var(--noir); font-weight: 700; }
.saut:focus { top: 12px; }
.icone { width: 1em; height: 1em; color: var(--encre); shape-rendering: crispEdges; flex: none; }
.portrait { width: 48px; height: 48px; flex: none; image-rendering: pixelated; }

/* ─── La coque ───────────────────────────────────────────────────────────── */
/* La fenêtre : l'anneau sombre autour de l'écran, l'encre de part et
   d'autre, et la coque jaune tout autour (l'ombre géante). */
.fenetre { position: fixed; z-index: 60; pointer-events: none;
  top: var(--t); left: var(--c); right: var(--c); bottom: var(--b);
  border: var(--anneau) solid var(--cadran); border-radius: calc(var(--anneau) + 10px);
  box-shadow: inset 0 0 0 3px var(--noir), 0 0 0 3px var(--noir), 0 0 0 200vmax var(--coque); }
.fenetre::after { content: ""; position: absolute; inset: 0; background: var(--papier); opacity: 0; border-radius: 8px; }
.allumage .fenetre::after { animation: allumage 240ms steps(4) both; }
@keyframes allumage { from { opacity: 1; } to { opacity: 0; } }
.bezel, .poignee, .socle { position: fixed; z-index: 61; color: var(--noir); background: var(--coque); }
.poignee { z-index: 62; }
.socle { left: 0; right: 0; bottom: 0; height: calc(var(--b) - 3px); }
.bezel { top: 0; left: 0; right: 0; height: calc(var(--t) - 3px); display: flex; align-items: center; gap: 16px;
  padding: 0 calc(var(--c) + var(--anneau)); }
.marque { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--noir);
  font: 700 26px/1 var(--pixel); letter-spacing: .04em; }
.marque .icone { width: 30px; height: 30px; color: var(--noir); --a: var(--blanc); }
/* Le voyant : allumé, il clignote quand le piano joue. */
.voyant { margin-left: auto; width: 12px; height: 12px; background: var(--vert); border: var(--trait) solid var(--noir); }
.voyant.joue { background: var(--rose); }
/* CONSOLE : retire la coque, ou la remet. Une touche à verrou : enfoncée,
   la console est là ; relevée, la page devient un site simple. */
.console-bascule { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 9px;
  background: var(--coque); border: var(--trait) solid var(--noir); border-radius: 999px; color: var(--noir);
  font: 700 16px/1 var(--pixel); letter-spacing: .05em; cursor: pointer; box-shadow: 3px 3px 0 var(--noir);
  transition: transform 60ms steps(1), box-shadow 60ms steps(1); }
.console-bascule .icone { width: 22px; height: 22px; color: var(--noir); --a: var(--blanc); }
.console-bascule[aria-pressed=true] { background: var(--coque-ombre); transform: translate(3px, 3px);
  box-shadow: inset 3px 3px 0 rgb(0 0 0 / .18); }
.console-bascule:hover .icone { --a: var(--rose); }
/* L'interrupteur : la manette glisse vers la lune pour éteindre l'écran. */
.theme { flex: none; display: grid; place-items: center; background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--noir); }
.glissiere { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px; background: var(--coque-ombre);
  border: var(--trait) solid var(--noir); border-radius: 999px; box-shadow: inset 3px 3px 0 rgb(0 0 0 / .18); }
.glissiere .icone { width: 20px; height: 20px; color: var(--noir); --a: var(--blanc); }
.manette { width: 22px; height: 22px; background: var(--noir); border-radius: 50%; margin-right: 26px;
  transition: margin 120ms steps(2); }
.theme:hover .manette { background: #2B2833; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .manette { margin: 0 0 0 26px; } }
:root[data-theme=dark] .manette { margin: 0 0 0 26px; }

/* Les poignées : étroites, comme sur une console qu'on tient à deux mains.
   À gauche la croix et START, à droite A, B et le haut-parleur. */
.poignee { top: calc(var(--t) - 3px); bottom: calc(var(--b) - 3px); width: calc(var(--c) - 3px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 56px; }
.poignee.gauche { left: 0; }
.poignee.droite { right: 0; }

/* La croix : un dessin en pixels, et quatre bras qu'on enfonce. */
.croix { position: relative; width: 96px; height: 96px; }
.croix-dessin { position: absolute; inset: 0; transition: transform 60ms steps(1);
  filter: drop-shadow(4px 4px 0 var(--coque-ombre)); }
.croix-dessin::before, .croix-dessin::after { content: ""; position: absolute; background: var(--noir); border-radius: 5px; }
.croix-dessin::before { left: 32px; top: 0; width: 32px; height: 96px; }
.croix-dessin::after { left: 0; top: 32px; width: 96px; height: 32px; }
.croix.appui .croix-dessin { transform: translate(3px, 3px); }
.fleche { position: absolute; z-index: 1; width: 32px; height: 32px; padding: 0; border: 0; background: none;
  cursor: pointer; display: grid; place-items: center; }
/* La flèche gravée sur chaque bras. */
.fleche::before { content: ""; width: 12px; height: 12px; background: #3A3744;
  clip-path: polygon(50% 15%, 100% 85%, 0 85%); }
.fleche.haut { left: 32px; top: 0; }
.fleche.bas { left: 32px; bottom: 0; } .fleche.bas::before { rotate: 180deg; }
.fleche.gauche { left: 0; top: 32px; } .fleche.gauche::before { rotate: -90deg; }
.fleche.droite { right: 0; top: 32px; } .fleche.droite::before { rotate: 90deg; }
.fleche:hover::before { background: #6B6578; }
.fleche:focus-visible { outline-offset: -3px; }

/* Les écrans de la page, dans le haut de la coque : le menu de sélection. */
.menu-ecrans { display: flex; gap: 4px; margin-left: clamp(16px, 2.4vw, 40px); }
.menu-ecrans a { position: relative; display: block; padding: 8px 10px 8px 24px; text-decoration: none;
  font: 700 16px/1 var(--pixel); letter-spacing: .05em; color: var(--noir); border-radius: var(--r-petit);
  white-space: nowrap; }
.menu-ecrans a::before { content: ""; position: absolute; left: 8px; top: 50%; width: 9px; height: 12px;
  margin-top: -6px; background: var(--noir); clip-path: polygon(0 0, 100% 50%, 0 100%); opacity: 0; }
.menu-ecrans a:hover::before, .menu-ecrans a[aria-current]::before { opacity: 1; }
.menu-ecrans a[aria-current] { background: var(--noir); color: var(--coque); }
.menu-ecrans a[aria-current]::before { background: var(--coque); animation: clignote 960ms steps(1) infinite; }

/* A et B : deux boutons ronds qui s'enfoncent du décalage de leur ombre. */
.boutons-ab { display: grid; justify-items: center; gap: 26px; }
.rond { display: grid; justify-items: center; gap: 10px; text-decoration: none; color: var(--noir); }
.rond .lettre { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%;
  border: var(--trait) solid var(--noir); box-shadow: 4px 4px 0 var(--noir);
  font: 700 26px/1 var(--pixel); transition: transform 60ms steps(1), box-shadow 60ms steps(1); }
.rond.a { order: -1; }
.rond.a .lettre { background: var(--rose); width: 70px; height: 70px; font-size: 30px; }
.rond.b .lettre { background: var(--violet); }
.rond:hover .lettre { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--noir); }
.rond:active .lettre { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--noir); }
/* Libellés sur deux lignes, coupés là où on les lit : REJOINDRE / LA LISTE. */
.rond .appel-long, .rond .appel-court { font: 700 16px/1.15 var(--pixel); letter-spacing: .05em; text-align: center;
  max-width: 96px; }
.rond.b::after { content: "HAUT"; font: 700 16px/1 var(--pixel); letter-spacing: .05em; }
.appel-court { display: none; }
/* START : le jeu sur le web. Une touche de couleur qui clignote, comme les
   boutons A et B : on voit qu'elle s'enfonce. */
.start { display: grid; justify-items: center; gap: 8px; color: var(--noir); text-align: center; cursor: pointer; text-decoration: none; }
.start:active .start-touche { transform: translateY(2px); }
.start-touche { width: 52px; height: 18px; background: var(--vert); border: var(--trait) solid var(--noir); border-radius: 999px;
  rotate: -24deg; box-shadow: 3px 3px 0 var(--coque-ombre); animation: appeler 1.6s steps(1) infinite; }
.start:hover .start-touche, .start:focus-visible .start-touche { background: var(--blanc); animation: none; }
.start-texte { font: 700 16px/1.1 var(--pixel); letter-spacing: .05em; max-width: 96px; }
.start:hover .start-texte { text-decoration: underline; text-underline-offset: 4px; }
@keyframes appeler { 50% { background: #FFFFFF; } }
@media (prefers-reduced-motion: reduce) { .start-touche { animation: none; } }
/* Le haut-parleur : un damier de trous, comme le Dither de l'app. */
.haut-parleur { width: 54px; height: 54px; fill: var(--noir); opacity: .82; }

/* Sous 1280 px, le haut de la coque n'a plus la place du menu : la croix et
   la barre d'état suffisent pour passer d'un écran à l'autre. Juste au-dessus,
   la touche CONSOLE se contente de son icône pour lui laisser la place. */
@media (max-width: 1279px) { .menu-ecrans { display: none; } }
@media (min-width: 1280px) and (max-width: 1439px) { :root:not(.sans-console) .console-mot { display: none; } }

/* ─── Tablette : la croix et A/B seulement ─────────────────────────────── */
@media (max-width: 1099px) {
  .haut-parleur, .start { display: none; }
  .croix { width: 90px; height: 90px; }
  .croix-dessin::before { left: 30px; width: 30px; height: 90px; }
  .croix-dessin::after { top: 30px; width: 90px; height: 30px; }
  .fleche { width: 30px; height: 30px; }
  .fleche.haut, .fleche.bas { left: 30px; } .fleche.gauche, .fleche.droite { top: 30px; }
  .fleche::before { width: 11px; height: 11px; }
  .rond.a .lettre { width: 68px; height: 68px; }
  .rond .appel-long { display: none; } .rond .appel-court { display: inline; }
}

/* ─── Téléphone : la coque devient une barre de commandes, en bas ──────── */
@media (max-width: 759px) {
  /* Le socle, pleine largeur, touche le bas de l'écran : Safari (iOS 26) prend
     la couleur d'un élément fixe pleine largeur collé au bord pour teinter sa
     barre d'adresse. Sans lui, la barre laissait voir la page sous la console. */
  .socle { bottom: -8px; height: calc(var(--b) + 5px); }
  .bezel { padding: 0 14px; gap: 10px; }
  .marque { font-size: 21px; gap: 8px; } .marque .icone { width: 24px; height: 24px; }
  .voyant { width: 10px; height: 10px; }
  .glissiere { height: 32px; } .glissiere .icone { width: 17px; height: 17px; }
  .manette { width: 18px; height: 18px; margin-right: 22px; }
  .console-mot { display: none; }
  .console-bascule { height: 32px; padding: 0 7px; }
  .console-bascule .icone { width: 20px; height: 20px; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .manette { margin: 0 0 0 22px; } }
  :root[data-theme=dark] .manette { margin: 0 0 0 22px; }
  .poignee { top: auto; bottom: 0; height: calc(var(--b) - 3px); padding-bottom: env(safe-area-inset-bottom);
    width: 50%; flex-direction: row; gap: 0; }
  .poignee.gauche { justify-content: flex-start; padding-left: 18px; }
  .poignee.droite { justify-content: flex-end; padding-right: 16px; }
  .croix { width: 66px; height: 66px; }
  .croix-dessin { filter: drop-shadow(3px 3px 0 var(--coque-ombre)); }
  .croix-dessin::before { left: 22px; width: 22px; height: 66px; border-radius: 4px; }
  .croix-dessin::after { top: 22px; width: 66px; height: 22px; border-radius: 4px; }
  /* Au doigt, deux moitiés : le haut recule, le bas avance. */
  .fleche.gauche, .fleche.droite { display: none; }
  .fleche.haut, .fleche.bas { left: -8px; width: 82px; height: 41px; }
  .fleche.haut { top: -8px; } .fleche.bas { bottom: -8px; }
  .fleche::before { width: 9px; height: 9px; }
  .boutons-ab { grid-template-columns: auto auto; align-items: center; gap: 14px; }
  .rond { gap: 4px; }
  .rond.a { order: 0; }
  .rond .lettre { width: 44px; height: 44px; font-size: 20px; box-shadow: 3px 3px 0 var(--noir); }
  .rond.a .lettre { width: 52px; height: 52px; font-size: 22px; }
  .rond.b::after, .rond .appel-court { font: 800 12px/1 var(--texte); letter-spacing: .06em; }
  .rond:active .lettre { transform: translate(3px, 3px); }
}

/* ─── Sans la console : un site simple, sous un bandeau ──────────────────── */
/* Plus de poignées ni d'anneau : le haut de la coque devient le bandeau du
   site, l'écran prend toute la largeur. La barre d'état et le parallaxe
   restent. */
:root.sans-console { --c: 0px; --b: 0px; --anneau: 0px; --t: 68px; }
.sans-console .fenetre { border: 0; border-radius: 0; box-shadow: none; }
.sans-console .poignee, .sans-console .socle { display: none; }
.sans-console .bezel { height: var(--t); padding: 0 var(--marge); border-bottom: var(--trait) solid var(--noir); }
/* START n'est plus sur la coque : « jouer sur le web » revient sous l'inscription. */
.sans-console .web-jouer { display: inline-flex; }
@media (min-width: 1200px) { .sans-console .menu-ecrans { display: flex; } }
@media (max-width: 759px) { :root.sans-console { --t: 56px; } .sans-console .bezel { padding: 0 14px; } }
/* Les plus petits téléphones : le voyant s'efface, le nom se resserre. */
@media (max-width: 374px) {
  .voyant { display: none; }
  .bezel, .sans-console .bezel { gap: 8px; padding: 0 12px; }
  .marque { font-size: 18px; } .marque .icone { width: 22px; height: 22px; }
}

/* ─── iPhone : l'écran défile, pas la page ────────────────────────────── */
/* Safari (iOS 26 et suivants) coupe les éléments fixes au ras de sa barre
   d'adresse et montre dessous la page qui défile : la console s'arrêtait net
   au-dessus de la barre, et le site passait dessous. Sur iPhone, c'est donc
   l'écran de la console qui défile ; la page reste immobile et montre sous la
   barre le fond de la coque. */
@supports (-webkit-touch-callout: none) {
  /* Un iPhone, debout ou couché ; l'iPad garde sa barre en haut. */
  @media (max-width: 759px), (max-height: 500px) {
    :root:not(.sans-console) { background: var(--coque); }
    /* Jamais transparent : Safari 26 en tirerait une barre blanche (ou noire).
       Rien ne déborde du corps (tout y est fixe) : la page ne défile pas sans
       qu'on la verrouille. */
    :root:not(.sans-console) body { padding: 0; background: var(--coque); }
    :root:not(.sans-console) .defileur { position: fixed; z-index: 1; top: var(--fenetre-haut);
      left: calc(var(--c) + var(--anneau)); right: calc(var(--c) + var(--anneau)); bottom: calc(var(--b) + var(--anneau));
      overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--papier);
      scroll-behavior: smooth; scroll-padding-top: calc(var(--barre) + 8px); }
    :root:not(.sans-console) body.avec-barre .defileur { padding-top: var(--barre); }
  }
}
@media (prefers-reduced-motion: reduce) { .defileur { scroll-behavior: auto !important; } }

/* ─── L'écran : barre d'état, écrans, boutons ───────────────────────────── */
main { display: block; }
.ecran { position: relative; padding: clamp(72px, 8vw, 112px) var(--marge) clamp(64px, 7vw, 104px); }
/* Les écrans qui s'ouvrent sur leur scène la posent contre leur filet. */
.ecran-pause, .ecran-ligues { padding-top: 0; }
.ecran + .ecran { border-top: var(--trait) solid var(--encre); }
/* La barre d'état : le nom de l'écran courant, collée en haut de l'écran
   tant qu'on y est, poussée par celle de l'écran suivant. */
/* Les noms des écrans restent dans chaque section, pour les lecteurs d'écran ;
   à l'écran, c'est la barre d'état qui les porte. */
.ecran-nom, .doc .surtitre, .liste-reponse .surtitre { position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; }
@keyframes clignote { 50% { opacity: 0; } }
/* La barre d'état : une seule, collée en haut de l'écran de la console. Elle
   porte le nom de l'écran courant et le change au défilement, d'un coup,
   comme un affichage de console. */
.barre-etat { position: fixed; z-index: 59; top: var(--fenetre-haut); left: calc(var(--c) + var(--anneau));
  right: calc(var(--c) + var(--anneau)); min-height: var(--barre); display: flex; align-items: center;
  padding: 10px var(--marge); background: var(--encre); color: var(--papier);
  font: 700 16px/1.3 var(--pixel); letter-spacing: .07em; }
.barre-texte { display: flex; align-items: center; gap: 12px; min-width: 0; }
.barre-texte::before { content: ""; width: 9px; height: 12px; flex: none; background: var(--jaune);
  clip-path: polygon(0 0, 100% 50%, 0 100%); }
.barre-texte:has(.point)::before, .barre-texte:has(.icone)::before { display: none; }
.barre-texte .icone { width: 22px; height: 22px; color: var(--papier); --a: var(--jaune); }
.barre-texte .point { width: 10px; height: 10px; flex: none; background: var(--rose); animation: clignote 960ms steps(1) infinite; }
.barre-texte span:not(.point) { font: 700 16px/1.3 var(--texte); letter-spacing: 0; }
.barre-etat.change { background: var(--jaune); color: var(--noir); }
.barre-etat.change .icone { color: var(--noir); }
body.avec-barre { padding-top: calc(var(--fenetre-haut) + var(--barre)); }

.ecran h2 { font-size: clamp(34px, 4.4vw, 58px); max-width: 15em; margin-bottom: 22px; text-wrap: balance; }
.ecran h3 { font-size: clamp(24px, 2.4vw, 30px); text-wrap: balance; }
.ecran p { color: var(--encre-2); max-width: 38em; }
.intro { font-size: 19px; }

/* Les boutons d'action, en pilule, comme dans l'app. */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 54px;
  padding: 0 26px; border-radius: 999px; border: var(--trait) solid var(--noir); background: var(--jaune);
  color: var(--noir); box-shadow: 4px 4px 0 var(--ombre); font: 700 18px/1 var(--pixel); letter-spacing: .05em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 60ms steps(1), box-shadow 60ms steps(1); }
.bouton:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ombre); }
.bouton:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ombre); }
.bouton .plus { width: 12px; height: 12px; flex: none; background:
  linear-gradient(currentColor 0 0) center / 100% 4px no-repeat,
  linear-gradient(currentColor 0 0) center / 4px 100% no-repeat; }
.bouton[disabled] { background: var(--creux); color: var(--encre-3); cursor: progress; transform: none; }
.bouton.second { background: var(--creux); color: var(--encre-2); border-color: var(--encre-3); box-shadow: none;
  cursor: default; gap: 10px; }
.bouton.second:hover, .bouton.second:active { transform: none; box-shadow: none; }
.bientot-etiquette { font: 800 12px/1 var(--texte); letter-spacing: .08em; background: var(--rose); color: var(--noir);
  padding: 4px 6px; border: 2px solid var(--noir); }

/* Une capture de l'app : un écran dans son cadre d'encre. */
.ecran-app { position: relative; width: 260px; padding: 7px; background: var(--noir); border: var(--trait) solid var(--noir);
  border-radius: 22px; box-shadow: 6px 6px 0 var(--ombre); will-change: transform; }
.ecran-app picture { display: contents; }
/* En sombre, l'écran de l'app est sombre aussi : le cadre prend un liseré
   pour ne pas se fondre dans l'écran de la console. */
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .ecran-app { border-color: var(--filet); } }
:root[data-theme=dark] .ecran-app { border-color: var(--filet); }
.ecran-app img { width: 100%; height: auto; border-radius: 15px; }
/* Une étiquette d'ATH : l'icône et le mot, posés près d'une capture. */
.bulle { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px;
  background: var(--surface); color: var(--encre); border: var(--trait) solid var(--encre); border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ombre); font: 700 16px/1 var(--pixel); letter-spacing: .05em; white-space: nowrap;
  will-change: transform; }
.bulle .icone { width: 22px; height: 22px; }
.points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; max-width: 40em; }
.points li { display: flex; gap: 14px; align-items: flex-start; color: var(--encre-2); }
.points .icone { width: 26px; height: 26px; margin-top: 1px; --a: var(--jaune); }
.points b { color: var(--encre); }
/* Le damier de l'app : un pixel sur deux, en lieu et place d'un dégradé. */
.damier { background-color: var(--papier);
  background-image: repeating-conic-gradient(var(--damier) 0 25%, transparent 0 50%);
  background-size: 8px 8px; }

/* ─── L'écran-titre ──────────────────────────────────────────────────────── */
.ecran-titre { overflow: clip; text-align: center; padding-top: clamp(28px, 4.5vh, 52px); padding-bottom: 0;
  background-color: var(--papier);
  background-image: repeating-conic-gradient(var(--damier) 0 25%, transparent 0 50%);
  background-size: 8px 8px; }
.titre-centre { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.ecran-titre h1 { font-size: clamp(46px, 6.4vw, 88px); line-height: .98; max-width: 9.5em; text-wrap: balance; }
.souligne { background: linear-gradient(transparent 60%, var(--jaune) 60% 90%, transparent 90%); }
/* Éteint, l'écran écrit en clair : le jaune passe sous les lettres, en trait. */
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .souligne { background: none;
  text-decoration: underline var(--jaune) .14em; text-underline-offset: .1em; text-decoration-skip-ink: none; } }
:root[data-theme=dark] .souligne { background: none;
  text-decoration: underline var(--jaune) .14em; text-underline-offset: .1em; text-decoration-skip-ink: none; }
.chapeau { font-size: clamp(18px, 1.7vw, 20px); margin: 18px auto 24px; max-width: 42em; }
/* Le menu de l'écran-titre : l'inscription, déjà là. */
.menu-titre { width: min(100%, 620px); text-align: left; background: var(--surface); border: var(--trait) solid var(--encre);
  border-radius: var(--r); box-shadow: 6px 6px 0 var(--ombre); padding: 18px 22px 14px; }
.inscription.rapide { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: end; }
.inscription.rapide .champ { grid-column: 1; }
.inscription.rapide fieldset { grid-column: 2; }
.inscription.rapide .appel, .inscription.rapide .etat, .inscription.rapide .mentions,
.inscription.rapide .case, .inscription.rapide .champ ~ .champ { grid-column: 1 / -1; }
.inscription.rapide .case { margin-top: 2px; font-size: 15px; line-height: 1.45; }
.inscription.rapide .case + .case { margin-top: -4px; }
.inscription.rapide .champ ~ .champ .aide { margin: 6px 0 0; color: var(--encre-2); font-size: 14px; line-height: 1.45; }
.mentions { display: flex; flex-wrap: wrap; gap: 0 6px; }
/* Sur ordinateur, « jouer sur le web » est le START de la coque. */
@media (min-width: 1100px) { .web-jouer { display: none; } }
.inscription.rapide .choix label { min-width: 104px; }
.appel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 2px; }
.appel .bouton:not(.second) { flex: 1 1 auto; }
.sous-appel { color: var(--encre-3) !important; font-size: 14px; margin: 0; }
.menu-titre .merci { padding: 18px 6px 8px; }

/* Les écrans de l'app, qui montent de sous le menu en parallaxe. */
.demo { position: relative; z-index: 1; height: clamp(360px, 40vw, 520px); margin-top: clamp(20px, 3vh, 36px); }
.demo .ecran-app { position: absolute; bottom: -120px; }
.demo .principal { left: 50%; width: 300px; margin-left: -150px; z-index: 3; bottom: -60px; }
.demo .gauche { left: calc(50% - 470px); width: 250px; z-index: 2; }
.demo .droite { left: calc(50% + 220px); width: 250px; z-index: 2; }
.titre-fond { position: absolute; inset: var(--barre) 0 0; z-index: 0; pointer-events: none; }
.flotte { position: absolute; will-change: transform; filter: drop-shadow(4px 4px 0 var(--ombre)); }
.flotte .icone { width: 100%; height: 100%; }
.flotte.f1 { width: 64px; height: 64px; left: 6%; top: 18%; --a: var(--violet); }
.flotte.f2 { width: 52px; height: 52px; right: 7%; top: 14%; --a: var(--rose); }
.flotte.f3 { width: 72px; height: 72px; left: 9%; top: 58%; --a: var(--jaune); }
.flotte.f4 { width: 48px; height: 48px; right: 10%; top: 54%; --a: var(--vert); }

/* ─── Le piano : il écrit sur la portée la note qu'on joue ─────────────── */
.ecran-piano { padding: 0; }
.portee-piano { position: relative; display: flex; align-items: center; gap: 24px;
  padding: clamp(24px, 4vw, 44px) var(--marge) clamp(18px, 3vw, 28px); color: var(--encre); }
.portee { width: 100%; height: auto; max-height: 220px; fill: currentColor; color: var(--encre); overflow: visible; }
.portee .lignes rect { fill: var(--encre); }
.portee .notes use, .portee .notes rect { fill: var(--encre); }
.portee .notes .derniere { --a: var(--jaune); }
.portee .notes .derniere.noire-jouee { --a: var(--violet); }
.note-jouee { position: absolute; right: var(--marge); top: 14px; margin: 0; min-height: 1em;
  font: 700 20px/1 var(--pixel); letter-spacing: .04em; color: var(--encre) !important; }
.clavier { display: flex; height: clamp(150px, 19vw, 230px); border-top: var(--trait) solid var(--encre);
  background: var(--noir); }
.touche { position: relative; flex: 1 1 0; min-width: 0; }
.touche + .touche { border-left: var(--trait) solid var(--noir); }
.clavier button { -webkit-tap-highlight-color: transparent; cursor: pointer; padding: 0; font: inherit; }
.blanche { position: absolute; inset: 0; width: 100%; border: 0; background: var(--blanc); color: #6B665E;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 16px !important; }
.blanche span { font: 700 16px/1 var(--pixel); letter-spacing: .04em; }
.noire { position: absolute; z-index: 2; top: 0; right: 0; width: 56%; height: 60%; transform: translateX(50%);
  background: var(--noir); border: 0; border-radius: 0 0 5px 5px; box-shadow: inset 0 -6px 0 #2B2833; }
.blanche:hover { background: #FFF6CC; }
.noire:hover { background: #2B2833; }
.blanche.joue, .blanche:active { background: var(--jaune); color: var(--noir); box-shadow: inset 0 -5px 0 var(--coque-ombre); }
.noire.joue, .noire:active { background: var(--violet); box-shadow: inset 0 -4px 0 #6F4FE0; }
.blanche:focus-visible, .noire:focus-visible { outline: 3px solid var(--bleu); outline-offset: -7px; }
/* Sur un téléphone, une octave : les touches restent assez larges pour un doigt. */
@media (max-width: 759px) { .touche:nth-child(n+8) { display: none; } }

/* ─── L'écran de sélection : les cinq familles ─────────────────────────── */
.oreille { --c: var(--violet); --a: var(--violet); }
.lecture { --c: var(--jaune); --a: var(--jaune); }
.rythme { --c: var(--vert); --a: var(--vert); }
.voix { --c: var(--rose); --a: var(--rose); }
.theorie { --c: var(--bleu); --a: var(--bleu); }
.ecran-tete { margin-bottom: 44px; }
.selection { display: grid; gap: 28px; }
.famille { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: center;
  background: var(--surface); border: var(--trait) solid var(--encre); border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--ombre); padding: 32px; }
.famille .tete { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.famille .tete .icone { width: 48px; height: 48px; }
.famille .nombre { font: 700 22px/1 var(--pixel); padding: 6px 10px; background: var(--c); color: var(--noir);
  border: var(--trait) solid var(--noir); }
.famille h3 { margin-bottom: 14px; }
.famille p { margin-bottom: 20px; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.etiquettes li { border: 2px solid var(--encre); border-radius: var(--r-petit); padding: 4px 10px; background: var(--papier);
  font: 700 16px/1.2 var(--pixel); letter-spacing: .02em; }
/* Un exercice qui a sa page : le nom y mène. */
.etiquettes a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.etiquettes li:has(a):hover { background: var(--a, var(--jaune)); color: var(--noir); }
/* Les captures d'une famille posées sur l'aplat de sa couleur. */
.famille-ecrans { position: relative; align-self: stretch; min-height: 440px; background: var(--c);
  border: var(--trait) solid var(--noir); border-radius: var(--r); overflow: hidden;
  background-image: repeating-conic-gradient(rgb(0 0 0 / .07) 0 25%, transparent 0 50%); background-size: 8px 8px; }
.famille-ecrans .ecran-app { position: absolute; left: 22px; top: 30px; width: 214px; z-index: 2; }
.famille-ecrans .ecran-app.second { left: auto; right: -64px; width: 170px; top: 120px; z-index: 1; }
/* La voix : le micro et ce qu'il entend. */
.voix-scene { display: grid; place-items: center; align-content: center; gap: 28px; }
.micro { width: 120px; height: 120px; display: grid; place-items: center; background: var(--surface);
  border: var(--trait) solid var(--noir); border-radius: var(--r); box-shadow: 6px 6px 0 var(--noir); }
.micro .icone { width: 72px; height: 72px; color: var(--noir); --a: var(--rose); }
.ondes { display: flex; align-items: center; gap: 8px; height: 90px; }
.ondes span { width: 12px; background: var(--noir); height: 30%; }
.ondes span:nth-child(2), .ondes span:nth-child(6) { height: 55%; }
.ondes span:nth-child(3), .ondes span:nth-child(5) { height: 80%; }
.ondes span:nth-child(4) { height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .ondes span { animation: onde 960ms steps(4) infinite alternate; }
  .ondes span:nth-child(odd) { animation-delay: -480ms; }
}
@keyframes onde { from { transform: scaleY(.45); } to { transform: scaleY(1); } }

/* Avec le script : un vrai écran de sélection, le menu à gauche. */
.js .selection { grid-template-columns: 1fr; gap: 22px; }
.menu-familles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.menu-familles button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 100%; min-height: 104px; padding: 14px 6px 12px; background: var(--surface); color: var(--encre); border: var(--trait) solid var(--encre);
  border-radius: var(--r); box-shadow: 4px 4px 0 var(--ombre); font: 700 20px/1 var(--pixel); text-align: left;
  cursor: pointer; transition: transform 60ms steps(1), box-shadow 60ms steps(1); }
.menu-familles button .icone { width: 36px; height: 36px; }
.menu-familles button .n { position: absolute; right: 8px; top: 8px; font-size: 16px; color: var(--encre-3); }
.menu-familles button::before { content: ""; position: absolute; left: 50%; bottom: -19px; width: 16px; height: 11px;
  margin-left: -8px; background: var(--encre); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: 0; }
.menu-familles button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ombre); }
.menu-familles button[aria-selected=true] { background: var(--encre); color: var(--papier); transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ombre); }
.menu-familles button[aria-selected=true] .icone { color: var(--papier); }
.menu-familles button[aria-selected=true] .n { color: var(--c); }
.menu-familles button[aria-selected=true]::before { opacity: 1; background: var(--c); animation: clignote 960ms steps(1) infinite; }
.js .famille[hidden] { display: none; }
.js .famille { grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.js .famille .tete { display: none; }

/* ─── Les emplacements de sauvegarde : pour qui ─────────────────────────── */
.profils { display: grid; gap: 22px; margin-top: 40px; max-width: 900px; }
.profil { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 28px; align-items: center;
  padding: 24px 28px 24px 24px; background: var(--surface); border: var(--trait) solid var(--encre);
  border-radius: var(--r); box-shadow: 6px 6px 0 var(--ombre); }
.profil-plaque { width: 112px; height: 112px; display: grid; place-items: center; background: var(--c);
  border: var(--trait) solid var(--noir); border-radius: var(--r-petit); }
.profil-plaque .icone { width: 64px; height: 64px; color: var(--noir); --a: var(--blanc); }
.profil h3 { margin-bottom: 10px; }
.profil p { margin: 0; font-size: 18px; }
.profil-debut { --c: var(--jaune); }
.profil-musicien { --c: var(--bleu); margin-left: clamp(0px, 6vw, 72px); }
/* Le curseur se pose sur le premier emplacement : on commence par là. */
.profil-debut::before { content: ""; position: absolute; left: -34px; top: 50%; width: 16px; height: 22px; margin-top: -11px;
  background: var(--encre); clip-path: polygon(0 0, 100% 50%, 0 100%); animation: clignote 960ms steps(1) infinite; }

/* ─── La carte du parcours ───────────────────────────────────────────────── */
/* Une carte de jeu : cinq cases reliées par des dalles, le joueur posé sur la
   première ; la capture de l'écran du parcours à droite, dans la bande. */
.carte-monde { position: relative; isolation: isolate; overflow: clip; margin: 52px calc(-1 * var(--marge)) 0;
  padding: 72px calc(var(--marge) + 300px) 72px var(--marge); min-height: 600px; background-color: var(--vert);
  border-block: var(--trait) solid var(--noir);
  background-image: repeating-conic-gradient(rgb(0 0 0 / .08) 0 25%, transparent 0 50%); background-size: 8px 8px; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; }
.etapes li { position: relative; display: grid; justify-items: center; align-content: start; gap: 12px; }
.etapes li:nth-child(odd) { margin-top: 220px; }
.etapes li:nth-child(even) { margin-top: 60px; }
/* La case de l'étape. */
.etapes li::before { content: ""; width: 60px; height: 60px; background: var(--blanc); border: var(--trait) solid var(--noir);
  box-shadow: 4px 4px 0 var(--noir); order: 2; }
.etapes li.e1::before { background: var(--jaune); }
.etapes li > span:not(.joueur) { order: 1; font: 700 16px/1.1 var(--pixel); letter-spacing: .05em; text-align: center; color: var(--noir);
  background: var(--blanc); border: var(--trait) solid var(--noir); padding: 6px 8px; }
.etapes li .bulle.depart { position: static; background: var(--jaune); }
.etapes li .bulle .icone { color: var(--noir); --a: var(--blanc); }
/* Le joueur de l'app, debout sur la case de départ. */
.joueur { position: absolute; left: 50%; bottom: 12px; width: 48px; height: 48px; margin-left: -24px; z-index: 2; }
.joueur .icone { width: 100%; height: 100%; color: var(--noir); --a: var(--rose); }
/* Les dalles du chemin, d'une case à la suivante. */
.etapes li:not(:last-child)::after { content: ""; position: absolute; z-index: -1; left: 50%; width: 100%; height: 160px;
  border: 0 dashed var(--blanc); filter: drop-shadow(3px 3px 0 var(--noir)); }
.etapes li:nth-child(odd):not(:last-child)::after { bottom: 26px; border-width: 0 12px 12px 0; }
.etapes li:nth-child(even):not(:last-child)::after { top: 70px; border-width: 12px 12px 0 0; }
.carte-monde .ecran-app { position: absolute; right: var(--marge); top: 44px; width: 250px; }
/* Une étiquette blanche posée sur la carte verte, dans les deux thèmes : son
   encre ne s'inverse pas avec l'écran. */
.carte-monde .bulle.test { left: var(--marge); bottom: 30px; background: var(--blanc); color: var(--noir);
  border-color: var(--noir); }
.carte-monde .bulle.test .icone { color: var(--noir); }
.carte-texte .points { grid-template-columns: 1fr 1fr; max-width: none; gap: 20px 40px; }
/* La carte ferme son écran : pas de papier vide entre elle et le suivant. */
.ecran-carte { padding-bottom: 0; }
.ecran-carte .carte-monde { border-bottom: 0; }

/* ─── La pause : les fiches de cours ─────────────────────────────────────── */
.pause-scene { position: relative; display: flex; justify-content: center; gap: 0; margin: 0 calc(-1 * var(--marge));
  padding: 48px var(--marge) 120px; background-color: var(--bleu); border-block: var(--trait) solid var(--noir);
  background-image: repeating-conic-gradient(rgb(0 0 0 / .1) 0 25%, transparent 0 50%); background-size: 8px 8px; }
.pause-scene .ecran-app { width: 270px; z-index: 2; }
.pause-scene .ecran-app.second { width: 230px; margin: 70px 0 0 -40px; z-index: 1; }
.pause-scene .b1 { left: calc(50% - 300px); top: 90px; }
.pause-scene .b2 { left: calc(50% + 190px); top: 360px; background: var(--vert); color: var(--noir); border-color: var(--noir); }
.pause-scene .b2 .icone { color: var(--noir); }
/* La boîte de dialogue, posée sur la scène comme dans un jeu de rôle. */
.dialogue { position: relative; z-index: 4; max-width: 900px; margin: -88px auto 0; padding: 32px 36px 34px;
  background: var(--surface); border: var(--trait) solid var(--encre); border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--ombre); }
.dialogue::after { content: ""; position: absolute; right: 24px; bottom: 16px; width: 16px; height: 12px; background: var(--encre);
  clip-path: polygon(0 0, 100% 0, 50% 100%); animation: clignote 960ms steps(1) infinite; }

/* ─── La partie : l'écran de jeu et son ATH ─────────────────────────────── */
.partie-intro { max-width: 48em; margin: 0 auto 40px; text-align: center; }
.partie-intro h2 { margin-inline: auto; }
.partie-intro p { margin-inline: auto; font-size: 18px; }
/* L'écran de jeu : l'ATH en haut (vies, combo), la partie au milieu, les
   compteurs du jeu en bas. */
.partie-scene { position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 40px;
  margin: 0 calc(-1 * var(--marge)); background-color: var(--violet); border-block: var(--trait) solid var(--noir);
  background-image: repeating-conic-gradient(rgb(0 0 0 / .08) 0 25%, transparent 0 50%); background-size: 8px 8px; }
.hud { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; width: 100%;
  padding: 14px var(--marge); background: var(--noir); color: var(--blanc); }
.hud-haut { border-bottom: var(--trait) solid var(--noir); font: 700 20px/1 var(--pixel); letter-spacing: .05em; }
.hud-haut > span { display: inline-flex; align-items: center; gap: 10px; }
.hud-haut .icone { width: 26px; height: 26px; color: var(--blanc); --a: var(--rose); }
.hud-combo { padding: 8px 14px; background: var(--jaune); color: var(--noir); border: var(--trait) solid var(--blanc); }
.hud-combo .icone { color: var(--noir); }
.partie-scene .ecran-app { width: 270px; }
.hud-bas { justify-content: space-around; }
.chiffre { display: inline-flex; align-items: baseline; gap: 10px; }
.chiffre b { font: 700 30px/1 var(--pixel); color: var(--jaune); }
.chiffre span { font: 700 16px/1 var(--pixel); letter-spacing: .04em; text-transform: uppercase; color: var(--blanc); }
.ecran-partie > .points { grid-template-columns: 1fr 1fr; max-width: 920px; gap: 20px 44px; margin: 40px auto 0; }

/* ─── Chaque jour : l'échelle des ligues ───────────────────────────────── */
.ligues-texte { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
.ligues-texte > h2, .ligues-texte > p { grid-column: 1; }
.ligues-texte > .points { grid-column: 2; grid-row: 1 / span 2; margin-top: 8px; }
.ligues-scene { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; align-items: end;
  margin: 0 calc(-1 * var(--marge)) clamp(48px, 6vw, 72px); padding: 48px var(--marge); background-color: var(--jaune);
  border-block: var(--trait) solid var(--noir);
  background-image: repeating-conic-gradient(rgb(0 0 0 / .06) 0 25%, transparent 0 50%); background-size: 8px 8px; }
/* Sept marches, de Vivaldi à Mozart : on monte. */
.ligues { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end; gap: 0; }
.ligues li { display: grid; justify-items: center; align-content: start; gap: 10px; padding-top: 14px;
  background: var(--blanc); border: var(--trait) solid var(--noir); margin-left: -3px; color: var(--noir);
  font: 700 16px/1.1 var(--pixel); letter-spacing: .02em; text-align: center; }
.ligues li span { padding: 0 4px 12px; }
.ligues .portrait { width: 56px; height: 56px; }
.ligues .l1 { height: 150px; } .ligues .l2 { height: 180px; } .ligues .l3 { height: 210px; } .ligues .l4 { height: 240px; }
.ligues .l5 { height: 270px; } .ligues .l6 { height: 300px; } .ligues .l7 { height: 330px; background: var(--noir); color: var(--jaune); }
.ligues-scene .ecran-app { width: 270px; }
.ligues-scene .b1 { right: calc(var(--marge) + 200px); top: 150px; background: var(--rose); color: var(--noir); border-color: var(--noir); }
.ligues-scene .b1 .icone { color: var(--noir); --a: var(--jaune); }
.ligues-scene .b2 { right: 18px; bottom: 30px; }

/* ─── Le menu d'options : les questions ─────────────────────────────────── */
.faq { max-width: 920px; margin-top: 36px; padding: 8px; background: var(--surface); border: var(--trait) solid var(--encre);
  border-radius: var(--r); box-shadow: 6px 6px 0 var(--ombre); }
.faq details + details { border-top: 2px solid var(--filet); }
.faq summary { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 56px 14px 46px;
  border-radius: var(--r-petit);
  cursor: pointer; list-style: none; font: 700 19px/1.3 var(--texte); color: var(--encre); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; position: absolute; left: 18px; top: 50%; width: 11px; height: 15px; margin-top: -7.5px;
  background: var(--encre); clip-path: polygon(0 0, 100% 50%, 0 100%); opacity: 0; }
.faq summary:hover::before, .faq summary:focus-visible::before, .faq details[open] summary::before { opacity: 1; }
.faq details[open] summary::before { rotate: 90deg; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  --f: var(--encre);
  background: linear-gradient(var(--f) 0 0) center / 100% 4px no-repeat, linear-gradient(var(--f) 0 0) center / 4px 100% no-repeat; }
.faq details[open] summary::after { --f: var(--jaune);
  background: linear-gradient(var(--f) 0 0) center / 100% 4px no-repeat; }
.faq summary:hover { background: var(--creux); }
.faq details[open] summary { background: var(--encre); color: var(--papier); }
.faq details[open] summary::before { background: var(--jaune); }
.faq .reponse { padding: 18px 26px 6px 46px; }
.faq .reponse p { font-size: 17px; }
/* Avec le script : un menu d'options. Les questions à gauche, le curseur
   sur celle qu'on lit ; la réponse dans une boîte de dialogue à droite. */
.faq.options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); padding: 0; }
.options-menu { display: grid; align-content: start; gap: 4px; padding: 10px; border-right: var(--trait) solid var(--encre); }
.options-menu button { position: relative; display: block; width: 100%; min-height: 54px; padding: 12px 14px 12px 40px;
  background: none; border: 0; border-radius: var(--r-petit); color: var(--encre); font: 700 18px/1.3 var(--texte);
  text-align: left; cursor: pointer; }
.options-menu button::before { content: ""; position: absolute; left: 14px; top: 50%; width: 11px; height: 15px;
  margin-top: -7.5px; background: var(--encre); clip-path: polygon(0 0, 100% 50%, 0 100%); opacity: 0; }
.options-menu button:hover { background: var(--creux); }
.options-menu button:hover::before { opacity: 1; }
.options-menu button[aria-selected=true] { background: var(--encre); color: var(--papier); }
.options-menu button[aria-selected=true]::before { opacity: 1; background: var(--jaune); animation: clignote 960ms steps(1) infinite; }
.options-dialogue { position: relative; padding: 30px 32px 48px; }
.options-dialogue::after { content: ""; position: absolute; right: 24px; bottom: 18px; width: 16px; height: 12px;
  background: var(--encre); clip-path: polygon(0 0, 100% 0, 50% 100%); animation: clignote 960ms steps(1) infinite; }
.options-dialogue .reponse { padding: 0; }
.options-dialogue .reponse p { font-size: 19px; color: var(--encre); }

/* ─── La sauvegarde : la liste d'attente ───────────────────────────────── */
.sauvegarde-texte { margin-bottom: 40px; }
.sauvegarde-texte h2 { font-size: clamp(38px, 5vw, 66px); }
/* Un seul écran de sauvegarde : à gauche ce que l'inscription débloque (la
   plaque des fondateurs sous le portrait de Pérotin), à droite la fiche à
   remplir. */
.sauvegarde-panneau { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); max-width: 1000px;
  background: var(--surface); border: var(--trait) solid var(--encre); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ombre); }
.fondateurs { padding: 30px 28px; border-right: var(--trait) solid var(--encre); background: var(--creux);
  border-radius: calc(var(--r) - 3px) 0 0 calc(var(--r) - 3px); }
.fondateurs-badge { display: grid; justify-items: start; margin-bottom: 22px; }
.fondateurs-portrait { width: 104px; height: 104px; display: grid; place-items: center; background: var(--jaune);
  border: var(--trait) solid var(--noir); box-shadow: 4px 4px 0 var(--noir); }
.fondateurs-portrait .portrait { width: 72px; height: 72px; }
.ecran .fondateurs-nom { display: inline-block; margin: 14px 0 0; padding: 7px 10px; background: var(--noir); color: var(--jaune);
  font: 700 16px/1 var(--pixel); letter-spacing: .07em; }
.fondateurs .fondateurs-titre { font: 700 20px/1.3 var(--texte); color: var(--encre); margin: 0 0 6px; }
.fondateurs .points { margin-top: 14px; }
.compteur { margin: 18px 0 0; padding-top: 14px; border-top: 2px dotted var(--encre-3); font-weight: 700; color: var(--encre) !important; }
.compteur b { font-size: 1.15em; }
.formulaire { padding: 30px; }

/* Les champs, partout. */
.champ + .champ, fieldset { margin-top: 20px; }
.inscription.rapide fieldset { margin-top: 0; }
.titre, legend { display: block; font: 700 16px/1 var(--pixel); letter-spacing: .06em; margin-bottom: 10px; color: var(--encre); }
input[type=email], input[type=text], input[type=password] { width: 100%; min-height: 54px; padding: 0 16px;
  font: 500 18px/1 var(--texte); color: var(--encre); background: var(--papier); border: var(--trait) solid var(--encre);
  border-radius: var(--r); box-shadow: inset 3px 3px 0 var(--creux); }
input::placeholder { color: var(--encre-3); opacity: 1; }
input:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
input[aria-invalid=true] { border-color: var(--rose); }
.erreur-champ { margin: 8px 0 0; font-size: 15px; font-weight: 700; color: #C01048 !important; }
.erreur-champ:empty { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .erreur-champ { color: #FF7FA6 !important; } }
:root[data-theme=dark] .erreur-champ { color: #FF7FA6 !important; }
fieldset { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.choix { display: flex; gap: 10px; }
.choix label { position: relative; flex: 1; display: grid; place-items: center; min-height: 54px; padding: 0 16px;
  border: var(--trait) solid var(--encre); border-radius: var(--r); background: var(--surface); font: 700 17px/1 var(--pixel);
  letter-spacing: .03em; cursor: pointer; box-shadow: 4px 4px 0 var(--ombre);
  transition: transform 60ms steps(1), box-shadow 60ms steps(1); }
.choix input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choix label:has(input:checked) { background: var(--encre); color: var(--papier); transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ombre); }
.choix label:has(input:focus-visible) { outline: 3px solid var(--bleu); outline-offset: 3px; }
.case { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; color: var(--encre-2); font-size: 16px; cursor: pointer; }
.case input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--vert); flex: none; }
.case b { color: var(--encre); }
.case i { font-style: normal; color: var(--encre-3); }
.formulaire .bouton { width: 100%; margin-top: 26px; min-height: 58px; font-size: 20px; }
.formulaire .aide { margin: 6px 0 0; color: var(--encre-2); font-size: 14px; line-height: 1.45; }
.mention { font-size: 14px; color: var(--encre-3) !important; margin: 16px 0 0; }
.etat { margin: 4px 0 0; font-weight: 700; color: var(--encre) !important; }
.etat:empty { display: none; }
.etat.mauvais { color: #C01048 !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .etat.mauvais { color: #FF7FA6 !important; } }
:root[data-theme=dark] .etat.mauvais { color: #FF7FA6 !important; }
.retour { display: none; margin: 14px 0 0; font-weight: 700; }
.retour:target { display: block; }
.retour.mauvais { color: #C01048; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .retour.mauvais { color: #FF7FA6; } }
:root[data-theme=dark] .retour.mauvais { color: #FF7FA6; }
.miel { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.merci { text-align: center; padding: 28px 10px; }
.merci .icone { width: 72px; height: 72px; margin: 0 auto 16px; --a: var(--jaune); }
.merci strong { display: block; font: 700 34px/1 var(--pixel); margin-bottom: 12px; }
.merci p { margin: 0 auto; max-width: 26em; }

/* ─── Le générique de fin : le pied de page ─────────────────────────────── */
.pied { margin: 0 calc(-1 * 0px); border-top: var(--trait) solid var(--encre); padding: 64px var(--marge) 40px;
  background: var(--creux); }
.pied .cadre { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.pied .marque { color: var(--encre); font-size: 24px; } .pied .marque .icone { color: var(--encre); --a: var(--jaune); }
.pied h2 { font-size: 16px; letter-spacing: .07em; margin-bottom: 14px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pied a, .pied button.lien { color: var(--encre-2); text-decoration: none; font-size: 15px; }
.pied a:hover, .pied button.lien:hover { color: var(--encre); text-decoration: underline; }
.pied .resume { color: var(--encre-2); font-size: 15px; max-width: 26em; margin-top: 14px; }
.reseaux { display: flex; flex-wrap: wrap; gap: 10px; }
.reseaux a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: var(--trait) solid var(--encre);
  border-radius: 6px; font: 700 16px/1 var(--pixel); color: var(--encre); background: var(--surface); box-shadow: 3px 3px 0 var(--c);
  text-decoration: none; }
.reseaux a:active { transform: translate(3px, 3px); box-shadow: none; }
.reseaux .ig { --c: var(--rose); } .reseaux .tt { --c: var(--bleu); } .reseaux .x { --c: var(--jaune); } .reseaux .yt { --c: var(--vert); }
.pied .bas { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-top: 2px solid var(--filet); padding-top: 22px; color: var(--encre-3); font-size: 14px; }
button.lien { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }

/* ─── La bannière des cookies : une boîte de dialogue en bas de l'écran ── */
.cookies { position: fixed; z-index: 62; left: calc(var(--c) + var(--anneau) + 16px); bottom: calc(var(--b) + var(--anneau) + 16px);
  right: calc(var(--c) + var(--anneau) + 16px); max-width: 600px;
  background: var(--surface); color: var(--encre); border: var(--trait) solid var(--encre); border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--ombre); padding: 20px; }
.cookies h2 { font-size: 18px; margin-bottom: 8px; letter-spacing: .04em; }
.cookies p { font-size: 15px; color: var(--encre-2); margin: 0 0 16px; }
.cookies .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies .bouton { flex: 1 1 140px; min-height: 46px; font-size: 16px; }
.cookies .bouton.neutre { background: var(--surface); color: var(--encre); }
.cookies[hidden] { display: none; }

/* ─── Les pages de texte (confidentialité, conditions…) ──────────────────── */
.cadre { width: min(1080px, 100%); margin-inline: auto; }
.doc { padding: clamp(40px, 5vw, 64px) var(--marge) 96px; }
.doc .cadre { width: auto; margin: 0; }
.doc .cadre > :not(.surtitre) { max-width: 760px; }
/* Le petit titre d'une page de texte est sa barre d'état, comme les écrans
   de l'accueil. */
.doc .surtitre { position: sticky; top: var(--fenetre-haut); z-index: 20; display: flex; align-items: center; gap: 12px;
  min-height: var(--barre); margin: 0 calc(-1 * var(--marge)) clamp(40px, 6vw, 72px); padding: 10px var(--marge);
  background: var(--encre); color: var(--papier); font: 700 16px/1.3 var(--pixel); letter-spacing: .07em; }
.doc .surtitre::before { content: ""; width: 9px; height: 12px; flex: none; background: var(--jaune);
  clip-path: polygon(0 0, 100% 50%, 0 100%); }
.doc h1 { font-size: clamp(36px, 5vw, 56px); margin: 0 0 12px; }
.doc .maj { color: var(--encre-3); font-size: 15px; margin-bottom: 32px; }
.doc h2 { font-size: 26px; margin: 48px 0 14px; }
.fil-ariane { margin-bottom: 20px; font-size: 14px; color: var(--encre-2); }
.fil-ariane a { color: inherit; }
.doc h3 { font-size: 20px; margin: 28px 0 10px; }
.doc p:not(.surtitre), .doc li { color: var(--encre-2); }
.doc strong { color: var(--encre); }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc .resume { background: var(--surface); border: var(--trait) solid var(--encre); border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--jaune), 6px 6px 0 3px var(--encre); padding: 20px 22px; margin: 8px 0; }
.doc .resume p:last-child { margin: 0; }
.tableau { overflow-x: auto; border: var(--trait) solid var(--encre); border-radius: var(--r); margin: 12px 0; background: var(--surface); }
.tableau table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.tableau th, .tableau td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 2px solid var(--filet); }
.tableau tr:last-child td { border-bottom: 0; }
.tableau th { font: 700 16px/1.2 var(--pixel); letter-spacing: .04em; background: var(--creux); color: var(--encre); }
.sommaire { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; margin: 0 0 8px; }
.sommaire li { margin: 0 !important; }
.sommaire a { display: inline-block; font: 700 16px/1 var(--pixel); text-decoration: none; padding: 8px 10px;
  border: 2px solid var(--encre); border-radius: var(--r-petit); color: var(--encre); }
.sommaire a:hover { background: var(--jaune); color: var(--noir); }

/* ─── Partie terminée : la page introuvable, les pages des mails ───────── */
.perdu { min-height: calc(100vh - var(--fenetre-haut) - var(--b) - var(--anneau)); display: grid; place-items: center;
  text-align: center; padding: 48px var(--marge);
  background-color: var(--papier); background-image: repeating-conic-gradient(var(--damier) 0 25%, transparent 0 50%);
  background-size: 8px 8px; }
.perdu .code { font: 700 clamp(110px, 22vw, 220px)/0.9 var(--pixel); text-shadow: 8px 8px 0 var(--jaune); }
.perdu h1 { font-size: clamp(30px, 5vw, 46px); margin: 22px 0 14px; }
.perdu p { color: var(--encre-2); max-width: 28em; margin: 0 auto 30px; }
.perdu .icone { width: 64px; height: 64px; margin: 0 auto 16px; --a: var(--rose); }
.perdu .surtitre { display: inline-block; font: 700 16px/1 var(--pixel); letter-spacing: .07em; color: var(--encre-2); margin-bottom: 10px; }
.action { max-width: 460px; }
.action form { text-align: left; margin-top: 24px; }
.action .aide { margin: 6px 0 0; color: var(--encre-2); font-size: 15px; }
.action .bouton { width: 100%; margin-top: 22px; }
.action .etat { margin-top: 18px; }
.liste-reponse { max-width: 520px; text-align: left; }
.liste-reponse > .icone { display: block; margin: 0 auto 12px; }
.liste-reponse h1 { text-align: center; }
.liste-reponse .surtitre { display: table; margin-left: auto; margin-right: auto; }
.liste-reponse .carte-info { margin: 18px 0; padding: 16px 18px; border: var(--trait) solid var(--encre);
  border-radius: var(--r); background: var(--surface); box-shadow: 4px 4px 0 var(--ombre); }
.liste-reponse .carte-info .titre { font: 700 16px/1.2 var(--pixel); letter-spacing: .04em; margin: 0 0 6px; }
.liste-reponse .carte-info p:last-child { margin: 0; }
.liste-reponse .question { font-weight: 700; font-size: 19px; color: var(--encre); margin: 22px 0 4px; }
.liste-reponse .actuelle { color: var(--encre-2); margin: 0 0 18px; }
.liste-reponse .boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.liste-reponse .boutons .bouton { flex: 1 1 200px; }
.liste-reponse .bouton[disabled] { background: var(--creux); color: var(--encre-3); border-color: var(--encre-3);
  box-shadow: none; cursor: not-allowed; }
.liste-reponse .mention { font-size: 14px; color: var(--encre-3); margin-top: 16px; }
.liste-reponse #r-retour, .liste-reponse #q-retour { display: flex; margin-top: 22px; }
.liste-reponse [hidden] { display: none !important; }

/* ─── Tablette ──────────────────────────────────────────────────────────── */
@media (max-width: 1099px) {
  .demo .gauche { left: calc(50% - 400px); width: 220px; }
  .demo .droite { left: calc(50% + 180px); width: 220px; }
  .js .selection { grid-template-columns: 1fr; }
  .menu-familles { position: static; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .menu-familles button { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 6px; min-height: 92px;
    font-size: 16px; text-align: center; }
  .menu-familles button::before { display: none; }
  .menu-familles button .n { margin-left: 0; }
  .famille, .js .famille { grid-template-columns: 1fr; min-height: 0; }
  .famille-ecrans { min-height: 420px; }
  .flotte { display: none; }
  .carte-monde { display: grid; justify-items: start; gap: 28px; padding: 40px var(--marge) 44px; min-height: 0; }
  .carte-monde .ecran-app { position: relative; right: auto; top: auto; width: 240px; justify-self: center; order: -2; }
  .carte-monde .bulle.test { position: relative; left: auto; bottom: auto; order: -1; }
  .etapes { grid-template-columns: 1fr; gap: 30px; }
  .etapes li, .etapes li:nth-child(odd), .etapes li:nth-child(even) { margin: 0; grid-template-columns: 60px auto;
    justify-items: start; align-items: center; gap: 18px; }
  .etapes li > span:not(.joueur) { order: 2; }
  .etapes li::before { order: 1; }
  .joueur { left: 6px; bottom: auto; top: 6px; margin: 0; }
  .carte-monde [data-vitesse], .famille-ecrans [data-vitesse] { transform: none !important; }
  .etapes li:not(:last-child)::after, .etapes li:nth-child(odd):not(:last-child)::after,
  .etapes li:nth-child(even):not(:last-child)::after { left: 24px; top: 60px; bottom: auto; width: 12px; height: 30px;
    border-width: 0 0 0 12px; }
  .carte-texte .points { grid-template-columns: 1fr; }
  .sauvegarde-panneau { grid-template-columns: 1fr; }
  .formulaire { order: -1; }
  .fondateurs { border-right: 0; border-top: var(--trait) solid var(--encre); border-radius: 0 0 calc(var(--r) - 3px) calc(var(--r) - 3px); }
  .ecran-partie > .points, .ligues-texte { grid-template-columns: 1fr; }
  .ligues-texte > .points { grid-column: 1; grid-row: auto; margin-top: 24px; }
  .faq.options { grid-template-columns: 1fr; }
  .options-menu { border-right: 0; border-bottom: var(--trait) solid var(--encre); }
  .pause-scene .b1 { left: 16px; } .pause-scene .b2 { left: auto; right: 16px; }
  .ligues-scene { grid-template-columns: 1fr; }
  .ligues-scene .ecran-app { display: none; }
  .ligues-scene .b1 { right: 24px; }
  .pied .cadre { grid-template-columns: 1fr 1fr; }
  .pied .cadre > div:first-child { grid-column: 1 / -1; }
}

/* ─── Téléphone ─────────────────────────────────────────────────────────── */
@media (max-width: 759px) {
  .ecran-nom { font-size: 14px; letter-spacing: .05em; gap: 10px; }
  .ecran-piano .ecran-nom { line-height: 1.35; }
  .ecran-piano .ecran-nom span { font-size: 14px; }
  .ecran-titre h1 { font-size: clamp(34px, 9.6vw, 54px); }
  .menu-titre { padding: 18px 16px 14px; box-shadow: 4px 4px 0 var(--ombre); }
  .inscription.rapide { grid-template-columns: 1fr; }
  .inscription.rapide fieldset { grid-column: 1; }
  .appel .bouton { width: 100%; padding: 8px 14px; font-size: 15px; letter-spacing: .03em; white-space: normal; text-align: center; line-height: 1.15; }
  .demo { height: 340px; }
  .demo .principal { width: 220px; margin-left: -110px; bottom: -120px; }
  .demo .gauche { left: -40px; width: 170px; bottom: -170px; }
  .demo .droite { left: auto; right: -40px; width: 170px; bottom: -170px; }
  .flotte { display: none; }
  .note-jouee { font-size: 16px; top: 8px; }
  .menu-familles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .menu-familles button { padding: 10px 2px 8px; min-height: 70px; font-size: 0; gap: 6px; }
  .menu-familles button .n { position: static; font-size: 15px; line-height: 1; }
  .menu-familles button .icone { width: 28px; height: 28px; }
  .famille { padding: 20px; box-shadow: 4px 4px 0 var(--ombre); }
  .famille-ecrans { min-height: 0; display: grid; place-items: center; padding: 24px 0; }
  .famille-ecrans .ecran-app { position: relative; left: auto; top: auto; width: 210px; margin: 0; }
  .famille-ecrans .ecran-app.second { display: none; }
  .voix-scene { padding: 36px 0; }
  .hud-bas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .chiffre b { font-size: 24px; }
  .chiffre span { font-size: 14px; }
  .hud-haut { font-size: 17px; }
  .profil { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .profil-plaque { width: 76px; height: 76px; } .profil-plaque .icone { width: 44px; height: 44px; }
  .profil-musicien { margin-left: 0; }
  .profil-debut::before { left: auto; right: 18px; top: 36px; }
  .carte-monde .ecran-app { width: 220px; }
  .pause-scene { padding: 36px var(--marge) 110px; }
  .pause-scene .ecran-app { width: 210px; }
  .pause-scene .ecran-app.second { display: none; }
  .pause-scene .b1 { left: 14px; top: 40px; } .pause-scene .b2 { left: auto; right: 14px; top: 300px; }
  .dialogue { margin-top: -70px; padding: 22px 20px 30px; box-shadow: 4px 4px 0 var(--ombre); }
  .partie-scene { min-height: 520px; }
  .partie-scene .ecran-app { width: 220px; }
  .ligues { grid-template-columns: 1fr; gap: 8px; }
  .ligues li, .ligues .l1, .ligues .l2, .ligues .l3, .ligues .l4, .ligues .l5, .ligues .l6, .ligues .l7 { height: auto;
    display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 6px 12px; margin: 0; text-align: left; }
  .ligues li span { padding: 0; }
  .ligues .portrait { width: 40px; height: 40px; }
  .ligues .l1 { margin-left: 0; } .ligues .l2 { margin-left: 4%; } .ligues .l3 { margin-left: 8%; } .ligues .l4 { margin-left: 12%; }
  .ligues .l5 { margin-left: 16%; } .ligues .l6 { margin-left: 20%; } .ligues .l7 { margin-left: 24%; }
  .ligues { display: flex; flex-direction: column-reverse; }
  .ligues-scene .b1, .ligues-scene .b2 { display: none; }
  .faq summary { font-size: 17px; padding: 14px 46px 14px 36px; }
  .faq summary::before { left: 12px; }
  .faq .reponse { padding: 16px 18px 4px 36px; }
  .fondateurs { padding: 20px; }
  .formulaire { padding: 20px; }
  .pied .cadre { grid-template-columns: 1fr; gap: 32px; }
  .cookies { left: 12px; right: 12px; bottom: calc(var(--b) + 10px); padding: 16px; }
}

/* ─── Moins de mouvement ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .allumage .fenetre::after { animation: none; }
  .barre-texte .point, .options-menu button[aria-selected=true]::before, .options-dialogue::after,
  .ecran-nom .point, .menu-ecrans a[aria-current]::before, .menu-familles button[aria-selected=true]::before,
  .profil-debut::before, .dialogue::after { animation: none; }
  .bouton, .choix label, .rond .lettre, .manette, .croix-dessin, .menu-familles button { transition: none; }
}

/* ─── Le mur des membres fondateurs (/fondateurs) ─────────────────────────── */
.fondateurs-mur { margin: 14px 0 0; font-weight: 700; }
.fondateurs-mur a { color: var(--encre); }
.mur-cadre { margin: 28px 0 8px; padding: 22px; background: var(--surface); border: var(--trait) solid var(--encre);
  border-radius: 14px; box-shadow: 6px 6px 0 var(--ombre); }
.mur-badge { display: flex; align-items: center; gap: 12px; font: 700 16px/1 var(--pixel); letter-spacing: .07em;
  margin-bottom: 18px; }
.mur-badge .portrait { width: 40px; height: 40px; }
.mur { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mur li { font: 700 15px/1.2 var(--texte); padding: 8px 14px; background: var(--jaune); color: var(--noir);
  border: var(--trait) solid var(--noir); border-radius: 999px; overflow-wrap: anywhere; }
.doc p.mur-vide { margin: 0; color: var(--encre-2); }

/* ─── Les cours avec Gabriel (/cours) ─────────────────────────────────────── */
.cours-formules { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin: 18px 0 8px; }
.cours-formule { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface);
  border: var(--trait) solid var(--encre); border-radius: 14px; box-shadow: 6px 6px 0 var(--ombre); }
.cours-formule h3 { font: 700 18px/1.2 var(--pixel); letter-spacing: .04em; margin: 0; }
.cours-infos { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0;
  font-weight: 700; color: var(--encre-2); }
.cours-prix { font: 800 18px/1 var(--texte); color: var(--encre); }
.cours-formule > p:not(.cours-infos) { margin: 0; flex: 1; }
.cours-formule .bouton { align-self: flex-start; margin-top: 6px; }

/* ─── Les pages des exercices (/exercices/…) ─────────────────────────────── */
/* La capture posée sur l'aplat de sa famille, comme sur l'accueil ; à côté,
   la fiche d'identité de l'exercice et le bouton pour jouer. */
.doc .chapeau { font-size: 19px; margin: 0 0 8px; }
.exercice-tete { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; margin: 28px 0 8px; }
.exercice-scene { display: grid; place-items: center; padding: 22px 26px; background-color: var(--c);
  border: var(--trait) solid var(--noir); border-radius: var(--r);
  background-image: repeating-conic-gradient(rgb(0 0 0 / .07) 0 25%, transparent 0 50%); background-size: 8px 8px; }
.exercice-scene .ecran-app { width: 210px; }
.exercice-infos { display: grid; gap: 10px; margin: 0 0 20px; }
.exercice-infos div { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding-bottom: 8px;
  border-bottom: 2px solid var(--filet); }
.exercice-infos dt { min-width: 7.5em; font: 700 15px/1.2 var(--pixel); letter-spacing: .04em; color: var(--encre); }
.exercice-infos dd { margin: 0; color: var(--encre-2); }
.exercice-tete .mention a { color: inherit; }
.tableau.etroit table { min-width: 0; }
@media (max-width: 640px) {
  .exercice-tete { grid-template-columns: minmax(0, 1fr); }
  .exercice-scene .ecran-app { width: 190px; }
  .exercice-tete .bouton { width: 100%; }
}

/* ─── L'écran Cours : Gabriel parle, comme un personnage du jeu ─────────── */
.ecran-cours .dialogue { margin-top: 0; }
.cours-liste { list-style: none; padding: 0; margin: 24px 0 0; max-width: 34em; border-top: 2px solid var(--filet); }
.cours-liste li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0;
  border-bottom: 2px solid var(--filet); }
.cours-liste b { color: var(--encre); }
.cours-liste span { color: var(--encre-2); font-weight: 700; white-space: nowrap; }
.cours-appel { margin-top: 26px; }

/* ─── L'écran Crédits : les fondateurs, comme le générique d'un jeu ────── */
.ecran-credits { text-align: center; }
.credits { max-width: 760px; margin: 0 auto; }
.ecran-credits .fondateurs-portrait { margin: 0 auto; }
.credits-role { margin: 20px auto 8px; font: 700 16px/1 var(--pixel); letter-spacing: .1em; }
.ecran-credits h2, .ecran-credits p { margin-left: auto; margin-right: auto; }
.credits-noms { list-style: none; padding: 0; margin: 32px auto; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px 30px; max-width: 680px; }
.credits-noms li { font: 700 clamp(19px, 2.2vw, 26px)/1.2 var(--pixel); color: var(--encre); letter-spacing: .03em;
  overflow-wrap: anywhere; }
.ecran-credits .mur-vide { margin: 28px auto; }

/* ─── Les pseudos des fondateurs, qui flottent dans le fond du titre ───── */
/* Placés par site.js là où il reste de la place, et qui flottent comme les
   icônes : par à-coups de pixels, jamais en glissé. Jamais tronqués : un
   pseudo trop long pour la place ne s'y met pas. */
.noms-flottants { position: absolute; inset: 0; }
.nom-flottant { position: absolute; }
.nom-flottant > span { display: block; white-space: nowrap;
  padding: 7px 11px; color: var(--noir); background: var(--jaune); border: var(--trait) solid var(--noir);
  border-radius: var(--r); box-shadow: 3px 3px 0 var(--ombre); font: 700 14px/1 var(--pixel); letter-spacing: .04em;
  animation: flotter var(--duree, 3s) steps(6) var(--retard, 0s) infinite alternate;
  transition: opacity 360ms steps(3); }
.nom-flottant.rose > span { background: var(--rose); }
.nom-flottant.violet > span { background: var(--violet); }
.nom-flottant.vert > span { background: var(--vert); }
.nom-flottant.bleu > span { background: var(--bleu); }
.nom-flottant.eteint > span { opacity: 0; }
@keyframes flotter { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 4px), var(--dy, -12px)); } }
@media (prefers-reduced-motion: reduce) { .nom-flottant > span { animation: none; } }
@media (max-width: 1099px) { .noms-flottants { display: none; } }

