/*
 * La fréquence crée la forme (frontend-design).
 * Deux matières et rien d'autre : le sable, chaud (craie, beige), et la lumière
 * des lignes nodales, froide (le cyan d'un acier revenu bleu, poussé vers le
 * clair). La page est la nuit de l'accueil ; les plaques sont de l'acier, un
 * ton plus froid, pour qu'on les lise comme des objets. Titres en Outfit, texte
 * en Switzer, les questions en Newsreader italique : c'est la seule voix
 * différente de la page, celle du doute.
 */

:root {
  --nuit: #181717;
  --charbon: #222121;
  --acier: #1d2022;
  --eau: #10282d;
  --craie: #edeae6;
  --gris: #9a9a9a;
  --gris-clair: #bdbab5;
  --sable: #e6d5b3;
  --lumiere: #7fd8e6;
  --bronze: #7a5237;
  --bronze-clair: #c39e89;
  --bord: #3a3a3a;
  --bord-doux: #2c2c2c;
  --craie-titre: color-mix(in srgb, var(--craie) 90%, transparent);
  --colonne: 1200px;
  --large: 1560px;
  --gouttiere: clamp(16px, 4.5vw, 64px);
  --doux: cubic-bezier(0.16, 1, 0.3, 1);
  --ressort: cubic-bezier(0.34, 1.42, 0.64, 1);
  --r-xs: 5px;
  --titre: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --sans: "Switzer", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --t-13: 0.8125rem;
  --t-15: 0.9375rem;
  --t-17: 1.0625rem;
  --t-20: 1.25rem;
  --t-24: clamp(1.25rem, 1.6vw, 1.5rem);
  --t-section: clamp(2.25rem, 4.6vw, 3.75rem);
  --t-titre: clamp(2.5rem, 4.8vw, 4.75rem); /* discret : la plaque reste le sujet */
  --espace-section: clamp(96px, 14vw, 200px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--nuit);
  color: var(--craie);
  font-family: var(--sans);
  font-size: var(--t-17);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
p {
  text-wrap: pretty;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--lumiere);
  outline-offset: 3px;
}
::selection {
  background: var(--bronze);
  color: #fff;
}
canvas {
  display: block;
}
.evitement {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--craie);
  color: var(--nuit);
  border-radius: var(--r-xs);
}
.evitement:focus {
  top: 16px;
}

.enveloppe,
.enveloppe-large {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}
.enveloppe {
  max-width: var(--colonne);
}
.enveloppe-large {
  max-width: var(--large);
}

/* ── Le bandeau de démonstration (comme Wabi-Sabi) : inversé, en haut de page ── */
.bandeau-demo {
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: var(--t-13);
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--nuit);
  background: var(--craie);
}
.bandeau-demo a {
  color: inherit;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}
.bandeau-demo a:hover,
.bandeau-demo a:focus-visible {
  text-decoration-thickness: 2px;
}

/* ── Entête : celle de l'accueil, posée sur la plaque ── */
.haut-page {
  position: relative;
  z-index: 10;
  height: 0;
}
.barre {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding-block: clamp(18px, 2.6vw, 32px);
}
.signature {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 1px;
  background: #0e0e0e;
}
.logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  -webkit-mask: url("/images/monogramme-dv.png") center / contain no-repeat;
  mask: url("/images/monogramme-dv.png") center / contain no-repeat;
  transition: background-color 300ms var(--doux);
}
.signature:hover .logo::after,
.pied-site:hover .logo::after {
  background: var(--bronze-clair);
}
.nom {
  font-family: var(--titre);
  font-weight: 600;
  font-size: var(--t-15);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--craie-titre);
}
.barre-droite {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu a {
  padding-block: 6px;
  font-size: var(--t-15);
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--gris-clair);
  text-decoration: none;
  background: linear-gradient(var(--bronze-clair), var(--bronze-clair)) left bottom / 0 1px no-repeat;
  transition: color 200ms, background-size 400ms var(--doux);
}
.menu a:hover {
  color: var(--craie);
  background-size: 100% 1px;
}

/* Le son : toujours accessible, en haut à droite, puis collé en haut de l'écran */
.bouton-son {
  position: fixed;
  top: calc(var(--bandeau-vu, 0px) + clamp(14px, 2.2vw, 26px));
  right: var(--gouttiere);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px 0 14px;
  font-family: var(--sans);
  font-size: var(--t-15);
  font-weight: 600;
  line-height: 1;
  color: var(--craie);
  background: color-mix(in srgb, var(--nuit) 78%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--bord);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: border-color 200ms, color 200ms, transform 240ms var(--ressort);
}
.bouton-son:hover {
  border-color: var(--lumiere);
  transform: translateY(-1px);
}
.bouton-son[aria-pressed="true"] {
  color: var(--lumiere);
  border-color: color-mix(in srgb, var(--lumiere) 55%, transparent);
}
/* Le volume de toute la page : sous le bouton du son, tant qu'il est actif */
.volume-son {
  position: fixed;
  top: calc(var(--bandeau-vu, 0px) + clamp(14px, 2.2vw, 26px) + 48px);
  right: var(--gouttiere);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px 0 14px;
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--craie);
  background: color-mix(in srgb, var(--nuit) 78%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--bord);
  border-radius: var(--r-xs);
}
.volume-son[hidden] {
  display: none;
}
.volume-son input {
  width: 110px;
  margin: 0;
  accent-color: var(--lumiere);
  cursor: pointer;
}
.volume-son output {
  min-width: 3.2em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--gris);
}
.onde {
  width: 20px;
  height: 16px;
  fill: currentColor;
}
.onde rect {
  transform-origin: 50% 50%;
  transform-box: fill-box;
  transform: scaleY(0.4);
  transition: transform 300ms var(--doux);
}
.bouton-son[aria-pressed="true"] .onde rect {
  animation: onde 1.1s ease-in-out infinite alternate;
}
.bouton-son[aria-pressed="true"] .onde rect:nth-child(2) { animation-delay: -0.3s; }
.bouton-son[aria-pressed="true"] .onde rect:nth-child(3) { animation-delay: -0.6s; }
.bouton-son[aria-pressed="true"] .onde rect:nth-child(4) { animation-delay: -0.9s; }
.bouton-son[aria-pressed="true"] .onde rect:nth-child(5) { animation-delay: -0.2s; }
@keyframes onde {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1); }
}
/* l'entête laisse la place au bouton du son, qui reste fixe */
.barre-droite {
  margin-right: 176px;
}

/* ── 1. L'ouverture ── */
.ouverture {
  position: relative;
  height: calc(100svh - var(--bandeau, 0px));
  min-height: 560px;
  overflow: hidden;
  background: var(--acier);
  touch-action: pan-y;
}
.toile-page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ouverture-texte {
  position: absolute;
  inset: auto 0 0;
  padding-bottom: clamp(36px, 7vh, 88px);
  pointer-events: none;
}
.titre {
  max-width: 11ch;
  margin: 0;
  font-family: var(--titre);
  font-weight: 500;
  font-size: var(--t-titre);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--craie);
}
.titre .ligne {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}
.titre .ligne > span {
  display: block;
}
.chapo {
  max-width: 46ch;
  margin: clamp(16px, 2vw, 24px) 0 0;
  font-size: var(--t-17, 1.0625rem);
  line-height: 1.5;
  color: var(--gris-clair);
}
.consigne {
  margin: 14px 0 0;
  font-size: var(--t-15);
  color: var(--gris);
}
.cote-page {
  position: absolute;
  right: var(--gouttiere);
  bottom: clamp(36px, 7vh, 88px);
  margin: 0;
  font-size: var(--t-15);
  color: var(--gris-clair);
  text-align: right;
}
/* La règle des résonances, au ras du bas de l'ouverture (comme le hero du labo) */
.regle-page {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 16px;
  pointer-events: none;
}
.cote-page .hz,
.recit-cote .hz,
.generateur-cote .hz {
  color: var(--lumiere);
}

/* ── Titres de section ── */
.titre-section {
  margin: 0;
  font-family: var(--titre);
  font-weight: 600;
  font-size: var(--t-section);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--craie-titre);
}
.titre-bloc {
  margin: 0 0 18px;
  font-family: var(--titre);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--craie-titre);
}
.texte-courant {
  max-width: 64ch;
}
.texte-courant p,
p.texte-courant {
  margin: 0 0 1em;
  color: var(--gris-clair);
}
.texte-large {
  max-width: 34em;
  margin: 0 0 1em;
  font-size: var(--t-24);
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--craie);
}
i {
  font-family: var(--serif);
  font-size: 1.06em;
}

/* ── 2. L'histoire, épinglée ── */
.recit {
  position: relative;
  height: 460svh;
  background: var(--nuit);
}
.recit-scene {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  max-width: var(--large);
  margin-inline: auto;
  padding: clamp(72px, 9vh, 104px) var(--gouttiere) clamp(24px, 4vh, 48px);
}
.recit-plaque {
  position: relative;
  justify-self: end;
  width: min(100%, calc(100svh - 190px));
  aspect-ratio: 1;
  background: var(--acier);
  border-radius: 3px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.recit-plaque canvas,
.instrument-plaque canvas,
.generateur-plaque canvas {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.recit-cote {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  margin: 0;
  font-size: var(--t-13);
  color: var(--gris);
}
.recit-texte {
  max-width: 34rem;
}
.recit-intro {
  margin: 18px 0 clamp(28px, 4vh, 48px);
  color: var(--gris-clair);
}
.recit-intro a {
  color: var(--craie);
  text-decoration-color: var(--bronze-clair);
  text-underline-offset: 3px;
}
.chapitres {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chapitre {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 500ms var(--doux), transform 700ms var(--doux), visibility 0s 500ms;
}
.chapitre.actif {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 600ms var(--doux) 120ms, transform 800ms var(--doux) 120ms, visibility 0s;
}
.annee {
  margin: 0;
  font-family: var(--titre);
  font-weight: 300;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--lumiere);
}
.chapitre h3 {
  margin: 14px 0 10px;
  font-family: var(--titre);
  font-weight: 600;
  font-size: var(--t-24);
  letter-spacing: -0.01em;
  color: var(--craie);
}
.chapitre p:not(.annee) {
  margin: 0;
  color: var(--gris-clair);
}
/* le fil des quatre dates, sous le texte */
.fil {
  display: flex;
  gap: 6px;
  margin-top: 28px;
}
.fil span {
  width: 28px;
  height: 2px;
  background: var(--bord);
  transition: background-color 400ms;
}
.fil span.fait {
  background: var(--lumiere);
}

/* ── Une étape par écran (comme les outils de l'accueil) : chaque arrêt du
   guide remplit l'écran, son contenu au milieu ; deux étapes ne se
   partagent jamais la vue. Plus haute que l'écran, une étape s'allonge. ── */
.etape {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding-block: clamp(72px, 9vh, 112px) clamp(48px, 7vh, 88px);
}
.bloc {
  margin-top: clamp(32px, 4.5vh, 64px);
}

/* Les lignes nodales : texte à gauche, la lame à droite */
.bloc-nodal {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px clamp(32px, 5vw, 80px);
  align-items: start;
}
.corde {
  margin: 0;
}
.toile-corde {
  width: 100%;
  height: clamp(220px, 22vw, 300px);
  background: var(--charbon);
  border-radius: 3px;
}
.corde figcaption,
.bac-pupitre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 14px;
  font-size: var(--t-15);
  color: var(--gris);
}
.corde figcaption > span:first-child {
  flex: 1 1 100%;
}
.corde-modes,
.motifs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pastilles-nom {
  margin-left: 6px;
}
.aparte {
  grid-column: 1;
  max-width: 52ch;
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--bord);
  font-size: var(--t-15);
  color: var(--gris);
}

/* Boutons : ceux de NoMore Draft (5 px, se lèvent d'un pixel) */
.pastille,
.pas-bouton,
.bascule,
.btn {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1;
  color: var(--gris-clair);
  background: transparent;
  border: 1px solid var(--bord);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: color 200ms, background-color 200ms, border-color 200ms, transform 240ms var(--ressort);
}
.pastille {
  min-width: 34px;
  height: 34px;
  padding: 0 11px;
  font-size: var(--t-15);
}
.pastille:hover,
.pas-bouton:hover,
.bascule:hover,
.btn:hover {
  color: var(--craie);
  border-color: var(--gris);
  transform: translateY(-1px);
}
.pastille[aria-pressed="true"] {
  color: var(--nuit);
  background: var(--lumiere);
  border-color: var(--lumiere);
}
.lien-bouton {
  padding: 6px 0;
  font-family: var(--sans);
  font-size: var(--t-15);
  font-weight: 500;
  color: var(--gris-clair);
  background: linear-gradient(var(--gris), var(--gris)) left bottom / 100% 1px no-repeat;
  border: 0;
  cursor: pointer;
  transition: color 200ms;
}
.lien-bouton:hover {
  color: var(--craie);
}

/* L'équation : l'objet typographique de la page */
.bloc-equation {
  max-width: 1080px;
}
.equation {
  margin: clamp(18px, 3vh, 40px) 0;
  padding: clamp(16px, 3vh, 36px) 0;
  border-block: 1px solid var(--bord-doux);
  overflow-x: auto;
}
.equation math {
  text-align: left;
  font-size: clamp(2rem, 5.2vw, 4.25rem);
  color: var(--craie);
}
.equation-2 math {
  font-size: clamp(1rem, 1.55vw, 1.625rem);
  color: var(--lumiere);
}
/* sous la grande équation : la légende à gauche, la suite à droite */
.equation-suite {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px clamp(32px, 5vw, 80px);
  align-items: start;
}
.equation-raisonnement .equation {
  margin: clamp(12px, 2vh, 24px) 0;
  padding: clamp(12px, 2vh, 22px) 0;
}
.legende {
  display: grid;
  gap: 14px;
  margin: 0;
}
.legende div {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: baseline;
}
.legende dt {
  font-family: var(--serif);
  font-size: var(--t-24);
  color: var(--craie);
}
.legende dd {
  margin: 0;
  font-size: var(--t-15);
  color: var(--gris-clair);
}

/* L'instrument : la plaque à gauche, le pupitre à droite */
.instrument {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  margin-top: clamp(28px, 4vw, 48px);
}
.instrument-plaque {
  width: min(100%, calc(100svh - 340px));
  justify-self: end;
  aspect-ratio: 1;
  background: var(--acier);
  border-radius: 3px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  touch-action: none;
  cursor: ew-resize;
}
.pupitre {
  display: grid;
  gap: 26px;
}
.reglage-paire {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.pas-a-pas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pas-nom {
  width: 1.4em;
  font-size: 1.5rem;
  color: var(--craie);
}
.pas-bouton {
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
}
.pas-valeur {
  min-width: 2ch;
  font-family: var(--titre);
  font-size: 2.25rem;
  font-weight: 300;
  line-height: 1;
  text-align: center;
  color: var(--craie);
}
.reglage {
  display: grid;
  gap: 10px;
}
.reglage-tete {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--t-15);
  color: var(--gris-clair);
}
.reglage-tete output {
  font-family: var(--titre);
  font-size: var(--t-20);
  font-weight: 500;
  color: var(--craie);
}
.lecture-hz {
  color: var(--lumiere) !important;
}

/* Les curseurs : un fil fin, une pièce carrée */
.curseur {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
.curseur::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--bord);
}
.curseur::-moz-range-track {
  height: 2px;
  background: var(--bord);
}
.curseur::-moz-range-progress {
  height: 2px;
  background: var(--gris);
}
.curseur::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -7px;
  background: var(--craie);
  border: 0;
  border-radius: 3px;
  transition: transform 200ms var(--ressort);
}
.curseur::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--craie);
  border: 0;
  border-radius: 3px;
  transition: transform 200ms var(--ressort);
}
.curseur:hover::-webkit-slider-thumb { transform: scale(1.15); }
.curseur:hover::-moz-range-thumb { transform: scale(1.15); }
.curseur:focus-visible {
  outline-offset: 2px;
}

.resonance-etat {
  margin: 0 0 10px;
  font-size: var(--t-17);
  color: var(--craie);
}
.jauge {
  height: 4px;
  background: var(--bord-doux);
  border-radius: 2px;
  overflow: hidden;
}
.jauge-plein {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lumiere);
  transform-origin: left;
  transform: scaleX(0);
}
.interrupteurs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bascule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px;
  font-size: var(--t-15);
}
.bascule::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid currentColor;
  transition: background-color 200ms;
}
.bascule[aria-pressed="true"] {
  color: var(--craie);
  border-color: var(--gris);
}
.bascule[aria-pressed="true"]::before {
  background: var(--lumiere);
  border-color: var(--lumiere);
}
.pupitre .lien-bouton {
  justify-self: start;
}

.insecable {
  white-space: nowrap;
}

/* ── 4. La matière ── */
.bloc-faraday {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px clamp(32px, 5vw, 80px);
  align-items: start;
}
.bac {
  margin: 0;
}
.toile-faraday {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--eau);
  border-radius: 3px;
}
.reglage-court {
  flex: 1 1 200px;
}
.bac-lecture {
  flex: 1 1 100%;
  margin: 0;
  color: var(--gris-clair);
}

.questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  gap: clamp(32px, 4vw, 64px);
}
.question h3 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.625rem, 2.5vw, 2.25rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--craie);
}
.question p {
  margin: 0;
  font-size: var(--t-15);
  line-height: 1.7;
  color: var(--gris-clair);
}

/* Le générateur : la plaque ronde et ses touches */
.generateur {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 48px);
}
.generateur-plaque {
  position: relative;
  width: min(100%, calc(100svh - 360px));
  justify-self: center;
  aspect-ratio: 1;
  background: var(--acier);
  border-radius: 50%;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.generateur-cote {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  translate: -50% 0;
  width: max-content;
  max-width: 100%;
  margin: 0;
  font-size: var(--t-15);
  color: var(--gris-clair);
  text-align: center;
}
.touches {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.touche {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  text-align: left;
  color: var(--gris-clair);
  background: transparent;
  border: 1px solid var(--bord-doux);
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: border-color 200ms, background-color 300ms, transform 240ms var(--ressort);
}
.touche:hover {
  border-color: var(--gris);
  transform: translateY(-1px);
}
.touche[aria-pressed="true"] {
  background: color-mix(in srgb, var(--lumiere) 9%, transparent);
  border-color: color-mix(in srgb, var(--lumiere) 60%, transparent);
}
.touche-nom {
  font-family: var(--titre);
  font-size: var(--t-17);
  font-weight: 600;
  color: var(--craie);
}
.touche-hz {
  font-size: var(--t-15);
  color: var(--gris);
  white-space: nowrap;
}
.touche[aria-pressed="true"] .touche-hz {
  color: var(--lumiere);
}
.touche-texte {
  grid-column: 1 / -1;
  font-size: var(--t-13);
  line-height: 1.55;
  color: var(--gris);
}
.touche-libre {
  display: grid;
  gap: 4px;
}

/* ── 5. La fin ── */
.ouvert .titre-section {
  margin-bottom: clamp(28px, 4vw, 48px);
}
/* Le projet : la page parle d'elle-même, au trait comme les apartés ; la
   parenthèse personnelle prend la voix des questions (Newsreader italique) */
.projet {
  max-width: 62ch;
  margin-top: clamp(16px, 2.5vh, 32px);
  padding-left: 16px;
  border-left: 1px solid var(--bord);
}
.projet-titre {
  margin: 0 0 8px;
  font-size: var(--t-15);
  font-weight: 600;
  color: var(--craie);
}
.projet p {
  margin: 0;
  font-size: var(--t-15);
  line-height: 1.6;
  color: var(--gris);
}
/* la dernière étape porte maintenant le projet : ses boutons restent dans l'écran */
.ouvert .actions {
  margin-top: clamp(24px, 3.5vh, 40px);
}
.projet .parenthese {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--gris-clair);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: clamp(36px, 5vw, 56px) 0 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  font-size: var(--t-15);
  text-decoration: none;
}
.btn-plein {
  color: var(--nuit);
  background: var(--craie);
  border-color: var(--craie);
}
.btn-plein:hover {
  color: var(--nuit);
  background: #fff;
  border-color: #fff;
}

/* ── Pied : celui de l'accueil, en plus sobre ; les réseaux en 3D à droite ── */
/* le pied est la dernière étape : un écran à lui, comme les autres (et comme
   le pied de l'accueil) ; le contenu au milieu, la ligne du site tout en bas */
.pied {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
  background: #121111;
  border-top: 1px solid var(--bord-doux);
}
/* la toile des réseaux 3D (posée par /js/reseaux-3d.js) couvre le pied */
.pied-toile {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pied-haut {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 30%, 380px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  align-content: center;
  padding-block: clamp(64px, 9vh, 120px) clamp(40px, 5vh, 64px);
}
.pied-titre {
  margin: 0;
  font-family: var(--titre);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
  color: var(--craie-titre);
}
.pied-texte {
  max-width: 40ch;
  margin: clamp(18px, 2vw, 26px) 0 0;
  font-size: var(--t-17);
  color: var(--gris-clair);
}
.pied-ecrire {
  margin: clamp(22px, 3vw, 36px) 0 0;
  font-family: var(--titre);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.2;
}
.pied-ecrire a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--craie);
  text-decoration: none;
}
.pied-ecrire span {
  text-decoration: underline;
  text-decoration-color: #4a4a4b;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 200ms;
}
.pied-ecrire a:hover span {
  text-decoration-color: var(--lumiere);
}
.pied-ecrire svg {
  width: 0.72em;
  height: 0.72em;
  color: var(--lumiere);
  transition: transform 240ms var(--ressort);
}
.pied-ecrire a:hover svg {
  transform: translateX(5px);
}
.pied-objets {
  position: relative;
  align-self: stretch;
  min-height: clamp(200px, 18vw, 300px);
}

/* Les réseaux : cases de couleur en secours (sans WebGL), sinon réservés
   aux lecteurs d'écran, la 3D les montre (repris de l'accueil) */
.reseaux {
  display: grid;
  grid-template-columns: repeat(2, 72px);
  gap: 18px 28px;
  justify-content: center;
  align-content: center;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.reseaux li:nth-child(even) {
  translate: 0 22px;
}
.reseaux a,
.reseaux .reseau-vide {
  --marque: #303030;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  color: #fff;
  background: var(--marque);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 28px -12px rgba(0, 0, 0, 0.7);
  transition: transform 300ms var(--ressort);
}
.reseaux a:hover {
  transform: translateY(-6px) rotate(-4deg);
}
.reseaux .reseau-vide {
  cursor: default;
}
.reseaux [data-marque="Facebook"] { --marque: #0866ff; }
.reseaux [data-marque="X"] { --marque: #f2f1ef; color: #121212; }
.reseaux [data-marque="Instagram"] { background: radial-gradient(circle at 15% 105%, #feda75 0, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%); }
.reseaux [data-marque="LinkedIn"] { --marque: #0a66c2; }
.reseaux svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}
.objets-3d .reseaux {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pied-bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  position: relative;
  padding-block: 24px 28px;
  font-size: var(--t-15);
}
/* le trait s'arrête aux marges du texte, pas au bord de la colonne */
.pied-bas::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gouttiere);
  right: var(--gouttiere);
  height: 1px;
  background: #2a2a2a;
}
.pied-site {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gris-clair);
  text-decoration: none;
}
.pied-site .logo {
  width: 22px;
  height: 22px;
}
.pied-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.pied-liens a {
  color: var(--gris);
  text-decoration: none;
  transition: color 200ms;
}
.pied-liens a:hover {
  color: var(--craie);
}
@media (max-width: 860px) {
  .pied-haut {
    grid-template-columns: minmax(0, 1fr);
  }
  .pied-objets {
    min-height: clamp(110px, 28vw, 160px);
  }
  .reseaux {
    grid-template-columns: repeat(4, 56px);
    gap: 16px;
    justify-content: start;
  }
  .reseaux li:nth-child(even) {
    translate: 0 10px;
  }
  .reseaux a,
  .reseaux .reseau-vide {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }
  .reseaux svg {
    width: 24px;
    height: 24px;
  }
}

/* Sans WebGL : la plaque laisse un mot au lieu d'un trou */
.sans-webgl {
  display: grid;
  place-items: center;
}
.sans-webgl canvas {
  display: none;
}
.sans-webgl::after {
  content: "Ce navigateur n'affiche pas WebGL : la plaque ne peut pas vibrer ici.";
  padding: 24px;
  color: var(--gris);
  text-align: center;
}

/* ── Écrans bas (portables) : chaque étape tient encore dans l'écran ── */
@media (max-height: 900px) and (min-width: 821px) {
  .etape {
    padding-block: clamp(56px, 8vh, 80px) clamp(28px, 4vh, 48px);
  }
  .touche {
    padding: 10px 14px;
  }
  .touche-texte {
    font-size: 0.75rem;
    line-height: 1.45;
  }
  .touches {
    gap: 6px;
  }
}

/* ── Écrans moyens et petits ── */
@media (max-width: 980px) {
  .bloc-nodal,
  .bloc-faraday,
  .instrument,
  .generateur {
    grid-template-columns: minmax(0, 1fr);
  }
  .questions {
    grid-template-columns: minmax(0, 1fr);
  }
  .aparte {
    grid-column: auto;
  }
  .generateur-plaque {
    width: min(100%, 560px);
    justify-self: center;
    margin-bottom: 40px;
  }
}
@media (max-width: 820px) {
  .barre-droite nav {
    display: none;
  }
  .barre-droite {
    margin-right: 0;
  }
  .recit {
    height: 440svh;
  }
  .recit-scene {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    padding-top: 76px;
  }
  .recit-plaque {
    justify-self: center;
    width: min(100%, 42svh);
  }
  .recit-cote {
    display: none;
  }
  .recit-intro {
    display: none;
  }
  .recit-texte .titre-section {
    display: none;
  }
  .annee {
    font-size: 2.75rem;
  }
  .chapitre h3 {
    margin-top: 8px;
  }
  .chapitre p:not(.annee) {
    font-size: var(--t-15);
    line-height: 1.6;
  }
  .equation-suite {
    grid-template-columns: minmax(0, 1fr);
  }
  .cote-page {
    display: none;
  }
}
@media (max-width: 520px) {
  .bouton-son-texte {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .bouton-son {
    padding: 0 11px;
  }
  .nom {
    display: none;
  }
}


/* ══ SE REPÉRER (repris de l'accueil, la lumière en cyan au lieu du bronze) ══ */

/* Les deux actions de l'ouverture : descendre dans l'histoire, ou verser du sable */
.ouverture-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px clamp(24px, 3vw, 40px);
  margin-top: clamp(20px, 3vh, 32px);
}
.ouverture-actions .commencer {
  margin-top: 0;
}
.verser {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  font: inherit;
  font-size: var(--t-15);
  font-weight: 600;
  color: var(--craie);
  background: none;
  border: 0;
  cursor: pointer;
  pointer-events: auto;
}
.verser-carre {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--bord);
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--nuit) 60%, transparent);
  transition: background-color 250ms, border-color 250ms, transform 240ms var(--ressort);
}
.verser-carre svg {
  width: 16px;
  height: 16px;
}
.verser:hover .verser-carre,
.verser:focus-visible .verser-carre {
  background: var(--lumiere);
  border-color: var(--lumiere);
  color: var(--nuit);
  transform: translateY(-1px);
}
.verser:active .verser-carre {
  transform: translateY(1px);
}

/* Le bouton de l'ouverture : un carré au trait, la flèche qui invite à
   descendre et un appel qui s'allume à son rythme */
.commencer {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(20px, 3vh, 32px);
  font-size: var(--t-15);
  font-weight: 600;
  color: var(--craie);
  text-decoration: none;
  pointer-events: auto;
}
.commencer-carre {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--bord);
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--nuit) 60%, transparent);
  animation: appeler 2.6s var(--doux) 2.4s infinite;
  transition: background-color 250ms, border-color 250ms, transform 240ms var(--ressort);
}
.commencer-carre svg {
  width: 16px;
  height: 16px;
}
.commencer-carre path,
.guide .guide-apres path {
  animation: inviter 2.6s var(--doux) 2.4s infinite;
}
.commencer:hover .commencer-carre {
  background: var(--lumiere);
  border-color: var(--lumiere);
  color: var(--nuit);
  transform: translateY(-1px);
  animation: none;
}
.commencer:hover path {
  animation: none;
}
@keyframes inviter {
  0%, 60%, 100% { transform: none; }
  30% { transform: translateY(3px); }
}
@keyframes appeler {
  0%, 70%, 100% {
    border-color: var(--bord);
    box-shadow: 0 0 0 0 rgba(127, 216, 230, 0);
  }
  30% {
    border-color: var(--lumiere);
    box-shadow: 0 0 0 0 rgba(127, 216, 230, 0.4), 0 0 16px 1px rgba(127, 216, 230, 0.25);
  }
  65% {
    border-color: var(--bord);
    box-shadow: 0 0 0 9px rgba(127, 216, 230, 0), 0 0 16px 1px rgba(127, 216, 230, 0);
  }
}

/* Les points de droite : une étape chacun, le nom paraît au survol */
.reperes {
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 20;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  translate: 0 -50%;
}
.reperes a {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4a4a4b;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nuit) 70%, transparent);
  transition: background-color 300ms, transform 400ms var(--ressort);
}
.reperes a:hover {
  background: var(--craie);
}
.reperes a[aria-current="true"] {
  background: var(--lumiere);
  transform: scale(1.5);
}
.reperes span {
  position: absolute;
  right: 22px;
  top: 50%;
  translate: 6px -50%;
  padding: 4px 8px;
  white-space: nowrap;
  font-size: var(--t-13);
  font-weight: 500;
  color: var(--craie);
  background: color-mix(in srgb, var(--nuit) 85%, transparent);
  border-radius: var(--r-xs);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms, translate 350ms var(--doux), scale 400ms var(--ressort);
}
.reperes a[aria-current="true"] span {
  /* le point courant est agrandi : son étiquette ne doit pas l'être */
  scale: 0.667;
  transform-origin: right center;
}
.reperes a:hover span,
.reperes a:focus-visible span {
  opacity: 1;
  translate: 0 -50%;
}
/* survoler la colonne montre tous les noms : on lit le plan d'un coup d'œil */
.reperes:hover span {
  opacity: 0.55;
  translate: 0 -50%;
}
.reperes:hover a:hover span {
  opacity: 1;
}

/* Le voile d'un long trajet : la page change d'endroit dessous, sans défiler dix écrans */
.voile-saut {
  position: fixed;
  inset: 0;
  z-index: 22;
  background: var(--nuit);
  opacity: 0;
  pointer-events: none;
}

/* « Activer le son » appelle comme le bouton suivant du guide, tant que le
   son est coupé ; au survol il se remplit de la lumière, comme les boutons
   du guide. Une fois le son actif, l'appel se tait. */
.bouton-son[aria-pressed="false"] {
  animation: appeler 2.6s var(--doux) 3s infinite;
}
.bouton-son:hover {
  color: var(--nuit);
  background: var(--lumiere);
  border-color: var(--lumiere);
  animation: none;
}
.bouton-son[aria-pressed="true"]:hover {
  color: var(--nuit);
}

/* Le guide : ↑ l'étape ↓ */
.guide {
  position: fixed;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: #262626;
  border: 1px solid var(--bord);
  border-radius: calc(var(--r-xs) + 5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--doux), translate 500ms var(--doux);
}
.guide.visible:not(.attente) {
  opacity: 1;
  pointer-events: auto;
}
.guide button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--craie);
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: background-color 250ms, color 250ms, opacity 250ms;
}
.guide button:hover:not(:disabled) {
  color: var(--nuit);
  background: var(--lumiere);
}
.guide button:disabled {
  opacity: 0.3;
  cursor: default;
}
.guide svg {
  width: 16px;
  height: 16px;
}
.guide .guide-apres {
  border: 1px solid var(--bord);
  animation: appeler 2.6s var(--doux) 0.6s infinite;
}
.guide .guide-apres path {
  animation-delay: 0.6s;
}
.guide .guide-apres:hover:not(:disabled),
.guide .guide-apres:hover path,
.guide .guide-apres:disabled,
.guide .guide-apres:disabled path,
.guide .guide-apres.relance,
.guide .guide-apres.relance path {
  animation: none;
}
.guide-texte {
  margin: 0;
  min-width: 13.5rem;
  padding-inline: 8px;
  text-align: center;
  line-height: 1.25;
}
.guide-texte b {
  display: block;
  font-family: var(--titre);
  font-weight: 600;
  font-size: var(--t-15);
  color: var(--craie);
}
.guide-texte span {
  font-size: var(--t-13);
  color: var(--gris);
}

/* Grand écran : une colonne compacte dans le coin bas droit, le nom à gauche au survol */
@media (min-width: 1341px) {
  .guide {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    gap: 2px;
    width: 50px;
    padding: 4px;
    border-radius: calc(var(--r-xs) + 4px);
    translate: 0 16px;
  }
  .guide.visible:not(.attente) {
    translate: 0 0;
  }
  /* le nom de la figure laisse la place au guide */
  .cote-page {
    right: calc(var(--gouttiere) + 40px);
  }
  .guide button {
    width: 40px;
    height: 36px;
  }
  .guide .guide-apres {
    height: 40px;
  }
  /* « Revenir au début » en tête de colonne, séparé du pas à pas par un filet */
  .guide .guide-haut {
    height: 32px;
    margin-bottom: 5px;
    /* le filet sous le bouton (une ombre : l'::after sert à l'onde du clic) */
    box-shadow: 0 4px 0 -3px var(--bord);
  }
  .guide-texte {
    position: relative;
    min-width: 0;
    padding: 2px 0;
  }
  .guide-texte span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .guide-texte b {
    position: absolute;
    right: calc(100% + 18px);
    top: 50%;
    translate: 6px -50%;
    padding: 6px 10px;
    white-space: nowrap;
    font-family: var(--sans);
    font-weight: 500;
    font-size: var(--t-13);
    background: #262626;
    border: 1px solid var(--bord);
    border-radius: var(--r-xs);
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms, translate 350ms var(--doux);
  }
  .guide:hover .guide-texte b,
  .guide:focus-within .guide-texte b {
    opacity: 1;
    translate: 0 -50%;
  }
}
/* Écran plus étroit : une barre en bas, opaque ; la page lui laisse sa place */
@media (max-width: 1340px) {
  .reperes {
    display: none;
  }
  .guide {
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: space-between;
    gap: 8px;
    padding: 6px max(16px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px));
    background: #1f1e1e;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
    translate: 0 100%;
  }
  .guide.visible:not(.attente) {
    translate: 0 0;
  }
  .guide-texte {
    flex: 1;
    min-width: 0;
  }
  /* en barre : « Revenir au début » à gauche, collé au pas à pas */
  .guide .guide-haut {
    margin-right: -4px;
  }
  .guide-texte b,
  .guide-texte span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* la barre du guide reste jusqu'au pied : il lui garde sa place en bas */
  .pied {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }
  .recit-scene {
    padding-bottom: 72px;
  }
}

/* Les étapes s'arrêtent sous le haut de l'écran, pas collées */
.etape {
  scroll-margin-top: 0;
}

/* ══ LES PETITS MOUVEMENTS ══ */

/* L'onde du clic (NoMore Draft, accueil) */
.pastille,
.pas-bouton,
.bascule,
.btn,
.touche,
.lien-bouton {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* le bouton du son reste fixe : il ne prend que le cadre de l'onde */
.bouton-son {
  overflow: hidden;
  isolation: isolate;
}
.onde-clic::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--onde-x, 50%);
  top: var(--onde-y, 50%);
  width: var(--onde-d, 100px);
  height: var(--onde-d, 100px);
  margin: calc(var(--onde-d, 100px) / -2) 0 0 calc(var(--onde-d, 100px) / -2);
  border-radius: 50%;
  background: currentColor;
  opacity: 0.2;
  transform: scale(0);
  pointer-events: none;
  animation: clic 540ms var(--doux) forwards;
}
@keyframes clic {
  to { transform: scale(1); opacity: 0; }
}

/* Les titres : les mots montent, puis une ligne nodale se trace dessous */
.a-reveler .mot {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.a-reveler .mot > span {
  display: inline-block;
}
.titre-section.a-reveler::after {
  content: "";
  display: block;
  width: min(220px, 40%);
  height: 1px;
  margin-top: clamp(18px, 2vw, 26px);
  background: linear-gradient(90deg, var(--lumiere), transparent);
  box-shadow: 0 0 10px rgba(127, 216, 230, 0.45);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--doux);
}
.titre-section.trace::after {
  transform: scaleX(1);
}

/* L'équation : le terme désigné s'allume, les autres s'effacent un peu */
.equation [data-terme] {
  transition: color 300ms, opacity 300ms;
}
.legende [data-terme] {
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: var(--r-xs);
  cursor: default;
  transition: background-color 300ms;
}
.legende [data-terme]:focus-visible {
  outline-offset: 0;
}
.un-terme .equation:not(.equation-2) math > *:not(.designe) {
  opacity: 0.35;
}
.un-terme .equation math .designe,
.un-terme .equation math .designe * {
  color: var(--lumiere);
  opacity: 1;
}
.legende .designe {
  background: color-mix(in srgb, var(--lumiere) 8%, transparent);
}
.legende .designe dt {
  color: var(--lumiere);
}

/* Le générateur : une onde part du bord de la plaque quand une note arrive */
.generateur-plaque::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--lumiere);
  opacity: 0;
  pointer-events: none;
}
.generateur-plaque.impulsion::after {
  animation: impulsion 1.6s var(--doux);
}
@keyframes impulsion {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .commencer-carre,
  .commencer-carre path,
  .guide .guide-apres,
  .guide .guide-apres path,
  .bouton-son[aria-pressed="false"] {
    animation: none;
  }
  .titre-section.a-reveler::after {
    transition: none;
  }
}

/* ── Mouvement réduit : rien ne bouge tout seul ── */
@media (prefers-reduced-motion: reduce) {
  .bouton-son[aria-pressed="true"] .onde rect {
    animation: none;
    transform: none;
  }
  .chapitre,
  .chapitre.actif {
    transition: none;
    transform: none;
  }
}

/* Fait avec Claude — 1er octobre 2026, David : « de façon systématique,
   un petit logo de Claude avec son lien vers Anthropic », sur chaque
   page. Le dessin est celui de Simple Icons (CC0), dans l'orange de la
   marque ; le texte prend la couleur des liens voisins. */
.avec-claude { display: inline-flex; align-items: baseline; gap: .45em; text-decoration: none; white-space: nowrap; }
.avec-claude svg { width: 1.1em; height: 1.1em; flex: none; align-self: center;   /* le texte sur la ligne de base des voisins, le logo centré dessus */ fill: #D97757; transition: transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.avec-claude:hover svg, .avec-claude:focus-visible svg { transform: rotate(60deg); }
@media (prefers-reduced-motion: reduce) { .avec-claude svg { transition: none; } .avec-claude:hover svg, .avec-claude:focus-visible svg { transform: none; } }
