/* ============================================================
   PIANO EXQUIS - v0.1 prototype
   Direction artistique : laiton patine + encres profondes
   Reference VISUAL_SPEC.md sections 2-13
   Iteration v0.1 : fixes P0 1-5 + P1 DA drifts (Sparkles, Beam, Border)
   ============================================================ */

:root {
  /* Ink */
  --ink-0: #0a0807;
  --ink-1: #14100c;
  --ink-2: #1d1812;
  --ink-3: #2a231b;

  /* Bone */
  --bone: #f5ede0;
  --bone-dim: #a89580;
  --bone-mute: #6b5d48;

  /* Brass + Oxblood */
  --brass: #c9a46a;
  --brass-glow: #e8c98c;
  --brass-deep: #8a6f3e;
  --oxblood: #6b1f0e;

  /* Fonctions */
  --ivory: #e8e4da;
  --ebony: #120e0a;
  --felt: #4a3928;
  --paper: #f0e7d4;

  /* Spacing (base 8) */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 80px;
  --s-8: 120px;
  --s-9: 200px;

  /* Containers */
  --container-wide: 1200px;
  --container-narrow: 720px;
  --container-tight: 560px;

  /* Timings */
  --t-quick: 120ms;
  --t-smooth: 240ms;
  --t-reveal: 600ms;
  --t-ceremony: 1800ms;

  /* Easings */
  --ease-default: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-note: cubic-bezier(0.2, 0.7, 0.3, 1);
}

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes rotateAngle { to { --angle: 360deg; } }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink-0);
  color: var(--bone);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brass-deep); color: var(--bone); }

a {
  color: var(--bone);
  text-decoration: none;
  transition: color var(--t-quick) var(--ease-default), border-color var(--t-quick) var(--ease-default);
  border-bottom: 1px solid transparent;
}
a:hover { color: var(--brass-glow); border-bottom-color: var(--brass); }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bone-mute);
  margin-bottom: var(--s-3);
}

.section-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--bone);
  margin-bottom: var(--s-4);
}

.section-lead {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--bone-dim);
  max-width: 640px;
  margin-bottom: var(--s-6);
}

.section-note { color: var(--bone-mute); font-size: 0.7rem; }

.section-label {
  color: var(--bone-mute);
  font-size: 0.7rem;
  margin-bottom: var(--s-2);
  display: block;
}

.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 var(--s-4); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-4); }
.container-tight { max-width: var(--container-tight); margin: 0 auto; padding: 0 var(--s-3); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  position: fixed;
  top: var(--s-3);
  left: var(--s-4);
  z-index: 100;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-mute);
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: 6px 12px;
  background: rgba(10, 8, 7, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 164, 106, 0.12);
  border-radius: 2px;
}
.breadcrumb a { color: var(--bone-dim); }
.breadcrumb a:hover { color: var(--brass); }
.breadcrumb .sep { color: var(--bone-mute); opacity: 0.5; }
.breadcrumb .current { color: var(--brass); }

/* ============================================================
   GLOBAL TRACING BEAM (P1-4 fix)
   Court du hero au colophon, materialise la continuite.
   Position absolue dans body, interpolee via JS scroll.
   ============================================================ */
.global-beam {
  position: absolute;
  left: 50%;
  width: 2px;
  pointer-events: none;
  z-index: 4;
  transform: translateX(-1px);
  /* top + height calcules dynamiquement par JS (updateGlobalBeam) */
  top: 0;
  height: 0;
  transition: top 0.15s linear, height 0.15s linear;
}
.global-beam__line {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(138, 111, 62, 0.18) 6%,
    var(--brass-deep) 16%,
    var(--brass) 50%,
    var(--brass-deep) 84%,
    rgba(138, 111, 62, 0.18) 94%,
    transparent 100%);
  opacity: 0.6;
  mix-blend-mode: screen;
}
.global-beam__glow {
  position: absolute;
  left: -3px;
  width: 8px;
  height: 110px;
  background: radial-gradient(ellipse at center, var(--brass-glow) 0%, var(--brass) 35%, transparent 70%);
  filter: blur(4px);
  top: 0;
  opacity: 0.7;
  mix-blend-mode: screen;
  transition: top 0.1s linear;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: var(--s-8) 0 var(--s-8);
  overflow: hidden;
  background: var(--ink-0);
  background-image:
    radial-gradient(ellipse at 50% 60%, rgba(201, 164, 106, 0.08) 0%, transparent 60%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--s-4);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__spotlight {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 900px;
  background: radial-gradient(ellipse at center top, rgba(232, 201, 140, 0.18) 0%, rgba(201, 164, 106, 0.06) 35%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

.hero__beams {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.18;
}
.hero__beams .beam {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--brass) 40%, var(--brass) 60%, transparent 100%);
}
.hero__beams .beam:nth-child(1) { left: 12%; opacity: 0.6; }
.hero__beams .beam:nth-child(2) { left: 28%; opacity: 0.4; }
.hero__beams .beam:nth-child(3) { left: 50%; opacity: 0.3; }
.hero__beams .beam:nth-child(4) { left: 74%; opacity: 0.5; }
.hero__beams .beam:nth-child(5) { left: 88%; opacity: 0.4; }

.hero__title-wrap {
  text-align: center;
  margin-bottom: var(--s-6);
}
.hero__title-wrap .eyebrow { margin-bottom: var(--s-3); }

.hero__title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--bone);
  margin-bottom: var(--s-3);
  background: linear-gradient(180deg, var(--bone) 0%, var(--brass-glow) 50%, var(--brass) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(232, 201, 140, 0.08);
  opacity: 0;
  animation: heroReveal 1.8s var(--ease-out) 0.3s forwards;
}

@keyframes heroReveal {
  from { opacity: 0; filter: blur(8px); letter-spacing: 0.1em; }
  to { opacity: 1; filter: blur(0); letter-spacing: 0.04em; }
}

.hero__tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--bone-dim);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.4s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SCROLL CUE (P0-1 fix)
   Avant : position absolute bottom:48px chevauche l'info (qui termine le flux).
   Apres : element EN FLUX apres l'info, avec marge generous.
   ============================================================ */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--bone-mute);
  z-index: 5;
  animation: floatCue 3s ease-in-out infinite;
  text-decoration: none;
  border: none;
  margin: var(--s-6) auto var(--s-5);
  width: max-content;
  position: relative;
}
.scroll-cue:hover { color: var(--brass); border: none; }
.scroll-cue .mono { font-size: 0.7rem; letter-spacing: 0.18em; }
.scroll-cue svg { opacity: 0.6; }
@keyframes floatCue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   SONG GRID
   ============================================================ */
.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--s-1);
  width: 100%;
  max-width: 920px;
  margin-bottom: var(--s-4);
}

.song-card {
  background: var(--ink-1);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 10px 10px;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-smooth) var(--ease-default), border-color var(--t-smooth) var(--ease-default);
  position: relative;
}
.song-card:hover {
  background: var(--ink-2);
  border-color: var(--brass-deep);
}
.song-card.is-active {
  background: var(--ink-2);
  border-color: var(--brass);
}
.song-card.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 2px;
  height: 100%;
  background: var(--brass);
}
.song-card .sc-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bone);
  line-height: 1.2;
  margin-bottom: 2px;
}
.song-card .sc-artist {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--bone-dim);
  line-height: 1.3;
}
.song-card .sc-sound {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  color: var(--bone-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
}
.song-card.is-active .sc-title { color: var(--brass-glow); }
.song-card.is-active .sc-sound { color: var(--brass); }

/* ============================================================
   CONTROLS
   ============================================================ */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
  align-items: center;
  margin-bottom: var(--s-3);
}

.btn {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  background: var(--ink-1);
  border: 1px solid var(--brass-deep);
  padding: 10px 22px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--t-quick) var(--ease-default);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover {
  background: var(--ink-2);
  color: var(--bone);
  border-color: var(--brass);
}
.btn.is-active {
  background: var(--ink-2);
  color: var(--brass-glow);
  border-color: var(--brass);
  box-shadow: inset 0 0 16px rgba(201, 164, 106, 0.08);
}
.btn--small {
  padding: 8px 14px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  min-height: 36px;
}
.btn--large {
  padding: 16px 36px;
  font-size: 0.86rem;
  min-height: 52px;
}
.btn--outline {
  background: transparent;
  border: 1px solid var(--brass-deep);
}
.btn--outline:hover { background: rgba(138, 111, 62, 0.08); }
.btn--ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--bone-mute);
}
.btn--ghost:hover { color: var(--brass); background: rgba(201, 164, 106, 0.04); }

.btn-group { display: flex; gap: 0; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: 2px 0 0 2px; }
.btn-group .btn:last-child { border-radius: 0 2px 2px 0; border-right-width: 1px; }

.sound-btns { display: flex; gap: 4px; }
.sound-btns .btn { padding: 6px 10px; font-size: 0.65rem; min-height: 36px; letter-spacing: 0.14em; }

.tempo-wrap {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: 6px 10px;
  border: 1px solid var(--brass-deep);
  border-radius: 2px;
  background: var(--ink-1);
  min-height: 36px;
}
.tempo-wrap input[type=range] {
  width: 100px;
  accent-color: var(--brass);
  height: 2px;
}
.tempo-wrap span { font-size: 0.7rem; color: var(--bone-dim); min-width: 56px; }

/* ============================================================
   CHORD + PROGRESS + SEQUENCE
   ============================================================ */
.chord-display {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--brass);
  margin-bottom: var(--s-1);
  min-height: 1.4em;
  text-transform: uppercase;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-2);
  font-size: 0.7rem;
  color: var(--bone-mute);
}
.progress-wrap[hidden] { display: none; }
.progress-bar {
  width: 180px;
  height: 2px;
  background: var(--ink-2);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brass);
  border-radius: 2px;
  transition: width 0.3s var(--ease-default);
  box-shadow: 0 0 8px rgba(201, 164, 106, 0.4);
}

/* Sequence-wrap (P1-2 fix : scroll hint gradient) */
.sequence-wrap {
  width: 100%;
  max-width: 920px;
  margin-bottom: var(--s-3);
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  padding: 10px 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brass-deep) transparent;
  position: relative;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, black 0%, black 92%, transparent 100%);
  mask-image: linear-gradient(90deg, black 0%, black 92%, transparent 100%);
}
.sequence-wrap:active { cursor: grabbing; }
.sequence-wrap::-webkit-scrollbar { height: 4px; }
.sequence-wrap::-webkit-scrollbar-thumb { background: var(--brass-deep); border-radius: 2px; }

.seq-label {
  color: var(--bone-mute);
  margin-bottom: 8px;
  font-size: 0.62rem;
}
.seq-notes { display: flex; gap: 4px; padding-bottom: 2px; }
.seq-note {
  padding: 6px 4px;
  border-radius: 2px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: all var(--t-smooth) var(--ease-default);
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--ink-3);
  color: var(--bone-mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}
.seq-note.is-current {
  background: rgba(201, 164, 106, 0.12);
  color: var(--brass-glow);
  border-color: var(--brass);
  box-shadow: 0 0 14px rgba(201, 164, 106, 0.3);
  transform: scale(1.06);
}
.seq-note.is-played {
  background: transparent;
  color: var(--brass-deep);
  border-color: var(--brass-deep);
}
.seq-note .chord-label {
  display: block;
  font-size: 0.48rem;
  color: var(--bone-mute);
  margin-top: 2px;
  font-weight: 400;
  opacity: 0.7;
}
.seq-note.is-current .chord-label { color: var(--bone-dim); }

/* ============================================================
   PIANO (P0-3 fix : note-pointer align)
   Nouveau : .piano-inner (inline-block, max-content) devient
   la reference de positionnement pour .note-pointer et piano.
   ============================================================ */
.piano-section {
  position: relative;
  margin-bottom: var(--s-3);
  display: flex;
  justify-content: center;
  width: 100%;
}

.piano-inner {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.note-pointer {
  position: absolute;
  top: -26px;
  left: 0;
  transition: left 0.2s var(--ease-out);
  color: var(--brass-glow);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-align: center;
  width: 44px;
  margin-left: -22px;
  pointer-events: none;
  opacity: 0;
  text-transform: uppercase;
  filter: drop-shadow(0 0 8px rgba(232, 201, 140, 0.6));
  z-index: 4;
}
.note-pointer.is-visible { opacity: 1; }
.note-pointer::after {
  content: '';
  display: block;
  width: 0; height: 0;
  margin: 2px auto 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--brass-glow);
  filter: drop-shadow(0 0 4px rgba(232, 201, 140, 0.8));
  animation: pulseDown 1.4s ease-in-out infinite;
}
@keyframes pulseDown {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.piano {
  display: flex;
  position: relative;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(201, 164, 106, 0.08);
}
.felt {
  width: 100%;
  height: 4px;
  background: var(--felt);
  position: relative;
  top: -4px;
  z-index: 3;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5);
}

/* Sparkles layer (P1-3 DA drift fix) */
.sparkles-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}
.spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--brass-glow);
  box-shadow: 0 0 6px var(--brass-glow), 0 0 2px #fff3d6;
  pointer-events: none;
  opacity: 0;
  animation: sparkFly 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  --sx: 0px;
  --sy: -30px;
  --sr: 1;
}
@keyframes sparkFly {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3); }
  15% { opacity: 1; transform: translate(calc(var(--sx) * 0.2), calc(var(--sy) * 0.2)) scale(calc(var(--sr) * 0.9)); }
  60% { opacity: 0.9; transform: translate(calc(var(--sx) * 0.85), calc(var(--sy) * 0.85)) scale(var(--sr)); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(calc(var(--sr) * 0.5)); }
}

.key {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  transition: transform 0.06s var(--ease-note);
  padding-bottom: 10px;
  touch-action: none;
}
.key .note-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  pointer-events: none;
  font-weight: 400;
  letter-spacing: 0.06em;
}
.key .key-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.42rem;
  pointer-events: none;
  margin-top: 1px;
  opacity: 0.4;
  letter-spacing: 0.04em;
}

.white {
  width: 46px;
  height: 170px;
  background: linear-gradient(180deg, var(--ivory) 0%, #dcd5c4 100%);
  border: 1px solid rgba(107, 93, 72, 0.3);
  border-top: none;
  border-radius: 0 0 3px 3px;
  z-index: 1;
  box-shadow: inset -2px 0 2px rgba(0, 0, 0, 0.06);
}
.white:hover {
  background: linear-gradient(180deg, #f5ede0 0%, #d5cebb 100%);
}
.white.is-active {
  background: linear-gradient(180deg, var(--ivory) 0%, #dcd5c4 100%);
  box-shadow: inset 0 0 18px var(--brass);
  transform: translateY(1px) scaleY(0.995);
}
.white.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(201, 164, 106, 0.28);
  border-radius: 0 0 3px 3px;
  pointer-events: none;
}
.white.is-target {
  animation: targetPulseWhite 1.4s ease-in-out infinite;
}
.white .note-name { color: #6b5d48; }
.white .key-hint { color: rgba(0, 0, 0, 0.3); }
.white.is-active .note-name { color: var(--brass-deep); font-weight: 500; }

.black {
  position: absolute;
  width: 28px;
  height: 108px;
  background: linear-gradient(180deg, #1a1410 0%, var(--ebony) 100%);
  border: 1px solid #0a0706;
  border-top: none;
  border-radius: 0 0 3px 3px;
  z-index: 2;
  top: 0;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.5), inset -2px -2px 2px rgba(0, 0, 0, 0.4);
}
.black:hover { background: linear-gradient(180deg, #2a2015 0%, #1a140e 100%); }
.black.is-active {
  box-shadow: inset 0 0 14px var(--brass-glow), 0 2px 2px rgba(0, 0, 0, 0.5);
}
.black.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(232, 201, 140, 0.45);
  border-radius: 0 0 3px 3px;
  pointer-events: none;
}
.black.is-target { animation: targetPulseBlack 1.4s ease-in-out infinite; }
.black .note-name { color: rgba(245, 237, 224, 0.45); font-size: 0.45rem; }
.black .key-hint { color: rgba(245, 237, 224, 0.2); }
.black.is-active .note-name { color: var(--brass-glow); }

@keyframes targetPulseWhite {
  0%, 100% { box-shadow: 0 0 10px rgba(201, 164, 106, 0.2), inset 0 0 8px rgba(201, 164, 106, 0.12); }
  50% { box-shadow: 0 0 22px rgba(201, 164, 106, 0.5), inset 0 0 14px rgba(201, 164, 106, 0.25); }
}
@keyframes targetPulseBlack {
  0%, 100% { box-shadow: 0 0 10px rgba(232, 201, 140, 0.3), inset 0 0 6px rgba(232, 201, 140, 0.2); }
  50% { box-shadow: 0 0 22px rgba(232, 201, 140, 0.6), inset 0 0 12px rgba(232, 201, 140, 0.4); }
}

.key.flash-ok { background: rgba(201, 164, 106, 0.35) !important; transition: none; }
.key.flash-err { background: rgba(107, 31, 14, 0.4) !important; transition: none; }

.info {
  text-align: center;
  color: var(--bone-mute);
  font-size: 0.65rem;
  line-height: 1.7;
  margin-top: var(--s-3);
  max-width: 600px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  text-transform: none;
}
.info em { color: var(--bone-dim); font-style: normal; font-weight: 500; }

/* ============================================================
   TRANSITION (P0-5 fix : min-height, pas d'overflow)
   ============================================================ */
.transition {
  position: relative;
  background: var(--ink-0);
  padding: var(--s-9) 0;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breton-quote {
  text-align: center;
  max-width: 700px;
  padding: 0 var(--s-4);
  position: relative;
  z-index: 2;
}
.breton-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--bone-dim);
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: var(--s-3);
}
.breton-quote p em { font-style: italic; }
.breton-quote cite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-style: normal;
  color: var(--bone-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto {
  padding: var(--s-8) 0;
  background: var(--ink-0);
  position: relative;
}

.manifesto__body {
  margin-bottom: var(--s-7);
}
.manifesto__body p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--bone);
  margin-bottom: var(--s-3);
}
.manifesto__body p em { color: var(--brass); font-style: italic; }
.manifesto__body p strong { color: var(--bone); font-weight: 500; }

.lineage {
  padding-top: var(--s-5);
  border-top: 1px solid var(--ink-3);
}
.lineage__list { margin-top: var(--s-3); }
.lineage__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--ink-2);
}
.lineage__row:last-child { border-bottom: none; }
.lineage__row dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--brass);
  letter-spacing: 0.08em;
  padding-top: 3px;
}
.lineage__row dd {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--bone-dim);
}
.lineage__row dd strong { color: var(--bone); font-weight: 500; }

/* ============================================================
   OEUVRES EN COURS (Bento + Hover Border Gradient anime, P1-5)
   ============================================================ */
.en-cours {
  padding: var(--s-8) 0;
  background: var(--ink-0);
  position: relative;
}

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}

.oeuvre-card {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  padding: var(--s-4);
  transition: background var(--t-smooth) var(--ease-default), border-color var(--t-smooth) var(--ease-default), transform var(--t-smooth) var(--ease-default);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

/* P1-5 fix : Hover Border Gradient anime (conic-gradient + @property --angle)
   inset:0 + padding:1.5px cree une bordure de 1.5px, masquee par le double mask
   pour ne garder que la bordure. La card garde overflow: hidden (le ::before tient
   dedans car inset:0). */
.oeuvre-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  padding: 1.5px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0%,
    transparent 55%,
    var(--brass-deep) 70%,
    var(--brass-glow) 82%,
    var(--brass) 90%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-smooth) var(--ease-default);
  pointer-events: none;
  z-index: 1;
}
.oeuvre-card:hover {
  background: var(--ink-2);
  transform: translateY(-2px);
}
.oeuvre-card:hover::before {
  opacity: 1;
  animation: rotateAngle 4s linear infinite;
}
.oeuvre-card--large { grid-column: span 3; grid-row: span 1; }
.oeuvre-card--small { grid-column: span 3; }
@media (min-width: 900px) {
  .oeuvre-card--large { grid-column: span 4; }
  .oeuvre-card--small { grid-column: span 2; }
}

.oeuvre-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--s-3);
}
.oeuvre-card__id {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.04em;
}
.oeuvre-card__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--bone-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: right;
}

.oeuvre-card__progress {
  margin-bottom: var(--s-3);
}
.oeuvre-card__progress-bar {
  width: 100%;
  height: 2px;
  background: var(--ink-3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.oeuvre-card__progress-fill {
  height: 100%;
  background: var(--brass);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(201, 164, 106, 0.3);
  transition: width 0.8s var(--ease-out);
}
.oeuvre-card__progress-label {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--bone-mute);
  letter-spacing: 0.08em;
}
.oeuvre-card__progress-label .active { color: var(--brass); }

.oeuvre-card__staff {
  flex: 1;
  min-height: 70px;
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.oeuvre-card__staff svg {
  width: 100%;
  height: 70px;
  opacity: 0.8;
}

.oeuvre-card__last {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--bone-dim);
  margin-bottom: var(--s-3);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.oeuvre-card__last-pseudo {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 0.68rem;
  color: var(--brass);
  letter-spacing: 0.06em;
}

.oeuvre-card__cta {
  align-self: flex-start;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--brass-deep);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--t-quick) var(--ease-default);
  margin-top: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 2;
}
.oeuvre-card__cta:hover {
  background: var(--brass);
  color: var(--ink-0);
  border-color: var(--brass);
}
.oeuvre-card__cta::after {
  content: '  \2192';
  margin-left: 6px;
  transition: margin-left var(--t-quick) var(--ease-default);
}
.oeuvre-card__cta:hover::after { margin-left: 10px; }

.en-cours__cta {
  text-align: center;
  padding: var(--s-5) 0;
}

/* ============================================================
   MUSEE (timeline)
   ============================================================ */
.musee {
  padding: var(--s-8) 0 var(--s-5);
  background: var(--ink-0);
  position: relative;
}

.timeline {
  list-style: none;
  position: relative;
  padding-left: var(--s-5);
  margin-bottom: var(--s-5);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--brass-deep) 10%, var(--brass-deep) 90%, transparent 100%);
}

.timeline__item {
  position: relative;
  padding: var(--s-4) 0 var(--s-4) var(--s-4);
  border-bottom: 1px solid var(--ink-2);
  transition: background var(--t-smooth) var(--ease-default);
  cursor: pointer;
}
.timeline__item:last-child { border-bottom: none; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -52px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px var(--ink-0), 0 0 12px var(--brass);
  transform: translateY(-50%);
  transition: transform var(--t-smooth) var(--ease-default), box-shadow var(--t-smooth) var(--ease-default);
}
.timeline__item:hover {
  background: linear-gradient(90deg, rgba(29, 24, 18, 0.8) 0%, transparent 100%);
}
.timeline__item:hover::before {
  transform: translateY(-50%) scale(1.3);
  box-shadow: 0 0 0 4px var(--ink-0), 0 0 20px var(--brass-glow);
}

.timeline__date {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brass);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.timeline__title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.timeline__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.timeline__meta .sep { color: var(--ink-3); margin: 0 8px; }
.timeline__quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--bone-dim);
  line-height: 1.5;
  max-width: 600px;
  margin-bottom: var(--s-3);
}
.timeline__waveform {
  margin-bottom: var(--s-2);
}
.timeline__waveform svg { width: 100%; max-width: 420px; height: 36px; }
.timeline__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.timeline__play {
  color: var(--brass);
  padding: 8px 14px;
  border: 1px solid var(--brass-deep);
  border-radius: 2px;
  transition: all var(--t-quick) var(--ease-default);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.timeline__play:hover { background: var(--brass); color: var(--ink-0); border-color: var(--brass); }
.timeline__play svg { width: 10px; height: 10px; }

.musee__view-all {
  display: inline-block;
  color: var(--brass);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--brass-deep);
  border-radius: 2px;
  margin-top: var(--s-3);
  transition: all var(--t-quick) var(--ease-default);
}
.musee__view-all:hover { background: var(--brass); color: var(--ink-0); border-color: var(--brass); border-bottom: 1px solid var(--brass); }

/* ============================================================
   PSEUDO BAND (P0-4 fix : overflow contenu sur parent, pas sur page)
   ============================================================ */
.pseudo-band {
  margin-top: var(--s-7);
  padding: var(--s-4) 0;
  overflow: hidden;
  border-top: 1px solid var(--ink-2);
  border-bottom: 1px solid var(--ink-2);
  position: relative;
  width: 100%;
  max-width: 100vw;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.pseudo-band__track {
  display: flex;
  gap: var(--s-5);
  white-space: nowrap;
  animation: marquee 60s linear infinite;
  will-change: transform;
  width: max-content;
}
.pseudo-band__track span {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--bone-mute);
  letter-spacing: 0.04em;
  display: inline-block;
  flex-shrink: 0;
}
.pseudo-band__track span::before {
  content: '.';
  color: var(--brass);
  margin-right: var(--s-5);
  font-size: 1.2rem;
  vertical-align: middle;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   COLOPHON
   ============================================================ */
.colophon {
  padding: var(--s-8) 0 var(--s-6);
  background: var(--ink-0);
  border-top: 1px solid var(--ink-2);
  text-align: center;
}
.colophon__meta {
  font-size: 0.7rem;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  margin-bottom: var(--s-5);
}

.colophon__quote {
  max-width: 500px;
  margin: 0 auto var(--s-5);
}
.colophon__quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--bone-dim);
  margin-bottom: var(--s-2);
}
.colophon__quote cite {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--bone-mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-style: normal;
  display: block;
}

.colophon__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s-1);
  margin-bottom: var(--s-4);
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.colophon__links a {
  color: var(--bone-dim);
  padding: 4px 8px;
  border-bottom: 1px solid transparent;
}
.colophon__links a:hover { color: var(--brass); border-bottom-color: var(--brass); }
.colophon__links .sep { color: var(--ink-3); font-size: 0.5rem; }

.colophon__tiny {
  font-size: 0.62rem;
  color: var(--bone-mute);
  letter-spacing: 0.1em;
  opacity: 0.7;
  text-transform: none;
  font-style: italic;
}

/* ============================================================
   MODAL (P0-2 fix : overflow hidden sur frame, piano centre)
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--s-4);
  overflow-y: auto;
  opacity: 0;
  transition: opacity var(--t-smooth) var(--ease-default);
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.is-open { opacity: 1; }

.modal {
  background: var(--ink-1);
  border: 1px solid var(--brass-deep);
  border-radius: 2px;
  max-width: 640px;
  width: 100%;
  margin-top: var(--s-5);
  margin-bottom: var(--s-5);
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(201, 164, 106, 0.08);
  transform: translateY(20px);
  transition: transform var(--t-smooth) var(--ease-out);
}
.modal-backdrop.is-open .modal { transform: translateY(0); }

.modal__inner { padding: var(--s-5); }
.modal__close {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  color: var(--bone-mute);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all var(--t-quick) var(--ease-default);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { color: var(--brass); border-color: var(--brass-deep); }

.modal__title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--bone);
  letter-spacing: 0.04em;
  margin-bottom: var(--s-2);
  line-height: 1.2;
}
.modal__body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bone-dim);
  margin-bottom: var(--s-4);
}

.divider {
  border: none;
  border-top: 1px solid var(--ink-3);
  margin: var(--s-3) 0;
}

/* Received staff */
.received {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 2px;
  padding: var(--s-3);
  margin-bottom: var(--s-3);
}
.received__staff {
  min-height: 70px;
  background: var(--paper);
  border-radius: 2px;
  margin-bottom: var(--s-2);
  padding: 10px 14px;
  position: relative;
  overflow: hidden;
}
.received__staff svg { width: 100%; height: 50px; display: block; }
.listen-counter {
  margin-left: var(--s-2);
  color: var(--bone-mute);
  font-size: 0.62rem;
}

/* Mini piano (P0-2 fix : frame overflow-hidden + centre) */
.mini-piano-wrap { margin-bottom: var(--s-3); }
.mini-piano-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0 0 4px 4px;
  margin-bottom: var(--s-2);
  padding: 0 20px; /* garantit que les touches noires ne depassent pas a gauche */
  display: flex;
  justify-content: center;
}
.mini-piano {
  display: flex;
  position: relative;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  border-radius: 0 0 4px 4px;
  overflow: visible;
}
.mini-piano .key { padding-bottom: 8px; }
.mini-piano .white {
  width: 44px;
  height: 130px;
}
.mini-piano .black {
  width: 26px;
  height: 82px;
}
.mini-piano .key.is-scale-hint { position: relative; }
.mini-piano .white.is-scale-hint::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 8px var(--brass);
}
.mini-piano .black.is-scale-hint { box-shadow: inset 0 0 8px var(--brass), 0 2px 2px rgba(0,0,0,0.4); }

.mini-scale-hint {
  text-align: center;
  color: var(--bone-mute);
  font-size: 0.62rem;
  margin-bottom: var(--s-3);
}
.mini-scale-hint::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brass);
  margin-right: 6px;
  vertical-align: middle;
}

.mini-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  flex-wrap: wrap;
  padding-top: var(--s-2);
}
.mini-counter {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  color: var(--bone-dim);
}
.counter-dots { display: inline-flex; gap: 6px; }
.counter-dots .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--brass-deep);
  transition: all var(--t-quick) var(--ease-default);
}
.counter-dots .dot.is-filled {
  background: var(--brass);
  box-shadow: 0 0 8px rgba(201, 164, 106, 0.5);
  border-color: var(--brass);
}
#timer {
  margin-left: var(--s-2);
  color: var(--bone-mute);
  min-width: 40px;
  text-align: right;
}
#timer.is-low { color: var(--oxblood); }

/* Form */
.contrib-form {
  animation: slideDown var(--t-reveal) var(--ease-out);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin-bottom: var(--s-3);
}
.form-group label { margin-bottom: var(--s-1); }
.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--ink-0);
  border: 1px solid var(--brass-deep);
  border-radius: 2px;
  color: var(--bone);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  transition: border-color var(--t-quick) var(--ease-default);
  min-height: 44px;
}
.form-group input::placeholder { color: var(--bone-mute); font-style: italic; }
.form-group input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201, 164, 106, 0.12); }
.form-hint {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--bone-mute);
  letter-spacing: 0.06em;
  margin-top: 6px;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--bone-dim);
  margin-bottom: var(--s-4);
  cursor: pointer;
}
.form-consent input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--brass);
  flex-shrink: 0;
  margin-top: 2px;
}
.form-consent strong { color: var(--brass); font-weight: 500; }

.btn--primary {
  font-family: 'Cinzel', serif;
  background: var(--ink-0);
  color: var(--brass-glow);
  border: 1px solid var(--brass);
  padding: 14px 32px;
  font-size: 0.9rem;
  letter-spacing: 0.26em;
  width: 100%;
  min-height: 52px;
  position: relative;
  overflow: hidden;
}
.btn--primary:hover { background: var(--oxblood); color: var(--bone); border-color: var(--oxblood); }
.btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--ink-1);
  color: var(--bone-mute);
  border-color: var(--brass-deep);
}
.btn--primary:disabled:hover { background: var(--ink-1); color: var(--bone-mute); }

.btn--moving:not(:disabled)::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0%, transparent 60%, var(--brass-glow) 80%, transparent 100%);
  border-radius: 2px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateAngle 3s linear infinite;
  pointer-events: none;
}

.contrib-thanks { text-align: center; padding: var(--s-3) 0; }
.contrib-thanks .modal__title { margin-bottom: var(--s-3); }
.contrib-thanks .modal__body strong { color: var(--brass); }

/* ============================================================
   RESPONSIVE (P1-1 hero mobile fix)
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding: var(--s-7) 0 var(--s-7); }
  .hero__inner { padding: 0 var(--s-3); }
  .bento { grid-template-columns: 1fr; gap: var(--s-2); }
  .oeuvre-card--large, .oeuvre-card--small { grid-column: span 1; }
  .controls { gap: var(--s-1); }
  .lineage__row { grid-template-columns: 60px 1fr; gap: var(--s-2); }
  .manifesto, .en-cours, .musee, .colophon { padding-top: var(--s-7); padding-bottom: var(--s-7); }
  .transition { padding: var(--s-7) 0; }
  .mini-piano-frame { padding: 0 14px; }
}

@media (max-width: 700px) {
  .breadcrumb { font-size: 0.62rem; padding: 4px 8px; }
  .white { width: 34px; height: 140px; }
  .black { width: 22px; height: 88px; }
  .mini-piano .white { width: 38px; height: 115px; }
  .mini-piano .black { width: 22px; height: 74px; }
  .song-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .piano-section { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .piano-inner { min-width: 510px; } /* 15 blanches * 34px pour C3-C5 */
  .modal__inner { padding: var(--s-3); }
  .modal__title { font-size: 1.4rem; }
  .hero__title { font-size: clamp(2rem, 10vw, 4rem); }
  .hero__inner { padding: 0 var(--s-2); }
  .section-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .timeline { padding-left: var(--s-4); }
  .timeline__item { padding: var(--s-3) 0 var(--s-3) var(--s-2); }
  .timeline__item::before { left: -40px; }
  .timeline__title { font-size: 1.3rem; }
  .controls { justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  .lineage__row { grid-template-columns: 50px 1fr; }
  .lineage__row dt { font-size: 0.65rem; }
  .lineage__row dd { font-size: 0.95rem; }
}

@media (max-width: 420px) {
  .hero__inner { padding: 0 14px; }
  .mini-piano-frame { padding: 0 10px; }
  .mini-piano .white { width: 32px; height: 100px; }
  .mini-piano .black { width: 20px; height: 64px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .global-beam__glow { display: none; }
  .pseudo-band__track { animation: none; }
  .scroll-cue { animation: none; }
  .btn--moving::before { animation: none; }
  .oeuvre-card:hover::before { animation: none; opacity: 0.5; }
  .spark { display: none; }
}
