/* =====================================================================
   Cours de musique Gilles Bardy · Feuille de styles
   ---------------------------------------------------------------------
   Identité : noir laqué du piano, papier de partition, rouge du feutre.
   Pour changer les couleurs, modifiez seulement la section « 1. Réglages ».
   ===================================================================== */

/* ---------- 0. Polices (hébergées sur le site, aucun appel à Google) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }

/* ---------- 1. Réglages ---------- */
:root {
  --ink: #1d1b19;            /* noir laqué */
  --ink-soft: #5b554d;       /* texte secondaire */
  --paper: #f7f2e8;          /* papier de partition */
  --paper-2: #efe7d8;
  --accent: #a8402c;         /* rouge brique (feutre de piano) */
  --accent-light: #dd8064;   /* version claire, sur fond noir */
  --felt: #7d2a25;
  --line: rgba(29, 27, 25, .14);
  --line-strong: rgba(29, 27, 25, .5);
  --dark-text: #ece5d8;
  --dark-soft: #a8a093;
  --dark-line: rgba(236, 229, 216, .16);

  --serif: "Cormorant Garamond", "Iowan Old Style", Garamond, "Palatino Linotype", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --gutter: clamp(18px, 4.5vw, 56px);
  --pad-left: max(var(--gutter), env(safe-area-inset-left));
  --pad-right: max(var(--gutter), env(safe-area-inset-right));
  --section-y: clamp(72px, 11vw, 148px);
  --header-h: 72px;
  --maxw: 1240px;
}

@view-transition { navigation: auto; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .97rem + .2vw, 1.075rem);
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Léger grain de papier sur toute la page */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--paper); }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.012em;
  margin: 0 0 .45em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h2 { font-size: clamp(2.6rem, 1.7rem + 3.6vw, 4.6rem); }
h2 em, h1 em { font-style: italic; color: var(--accent); }
h3 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
p { margin: 0 0 1em; text-wrap: pretty; color: var(--ink-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip-link:focus { top: calc(12px + env(safe-area-inset-top)); }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--pad-left) + var(--pad-right));
  margin-inline: auto;
  padding-left: var(--pad-left);
  padding-right: var(--pad-right);
}

/* Petites capitales espacées, utilisées pour les libellés */
.hero-kicker, .prog-label, .instr-num, .steps-title, .cl-label, .field label, .field legend, .video-tag, .facts dt {
  font-family: var(--sans); font-weight: 500; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
}

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: inset(50%); white-space: nowrap; }

/* ---------- 3. Boutons et liens ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .8em;
  min-height: 52px; padding: 1em 1.9em;
  border: 1px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink);
  font: 500 .76rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out), transform .2s ease;
}
/* Remplissage rouge qui monte depuis le bas au survol */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .6s var(--ease-out);
}
.btn:hover::before { transform: scaleY(1); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { border-color: var(--accent); }
.btn-outline:hover { color: var(--paper); border-color: var(--accent); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { color: var(--paper); border-color: var(--accent); }
.btn-small { min-height: 40px; padding: .7em 1.3em; font-size: .7rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .9em; padding: .7em 0;
  font: 500 .76rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  transition: color .35s ease;
}
.link-arrow svg { width: 34px; height: 12px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .5s var(--ease-out); }
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover svg { transform: translateX(8px); }

/* ---------- 4. En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition: border-color .4s ease, transform .6s var(--ease-out);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(247, 242, 232, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header.tucked { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }

.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1; transition: color .4s ease; }
.wm-name { font: 600 1.5rem/1 var(--serif); letter-spacing: -.005em; white-space: nowrap; }
.wm-sub { margin-top: 5px; font: 500 .62rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; transition: color .4s ease; }

.site-nav { position: relative; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(14px, 2.2vw, 34px); }
.site-nav a:not(.btn) {
  font: 500 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; padding: 10px 0; transition: color .3s ease;
}
.site-nav a:not(.btn) { background: linear-gradient(currentColor, currentColor) 0 calc(100% - 4px) / 0 1px no-repeat; transition: color .3s ease, background-size .5s var(--ease-out); }
.site-nav a:not(.btn):hover { background-size: 100% 1px; }
.site-nav a:not(.btn):hover, .site-nav a.active { color: var(--accent); }
.nav-num, .nav-footer { display: none; }
.nav-indicator {
  position: absolute; left: 0; top: 0; height: 1px; width: 1px; background: var(--accent);
  pointer-events: none; opacity: 0; transform-origin: 0 50%;
  transform: translate(var(--ni-x, 0), var(--ni-y, 0)) scaleX(var(--ni-w, 0));
  transition: transform .6s var(--ease-out), opacity .3s ease;
}
.nav-indicator.on { opacity: 1; }

.nav-toggle {
  display: none; position: relative; z-index: 60; align-items: center; gap: 12px;
  min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  font: 500 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  transition: color .4s ease;
}
.nt-icon { position: relative; width: 24px; height: 9px; }
.nt-icon i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .5s var(--ease-out); }
.nt-icon i:first-child { top: 0; }
.nt-icon i:last-child { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nt-icon i:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nt-icon i:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* Menu plein écran (téléphones, tablettes, pliables à deux écrans) */
@media (max-width: 960px), (horizontal-viewport-segments: 2) {
  .nav-toggle { display: inline-flex; }
  .nav-indicator { display: none; }
  .site-nav {
    position: fixed; inset: 0; z-index: 55;
    display: flex; flex-direction: column;
    background: var(--ink); color: var(--dark-text);
    padding: calc(var(--header-h) + env(safe-area-inset-top) + 24px) var(--pad-right) calc(28px + env(safe-area-inset-bottom)) var(--pad-left);
    overflow-y: auto; visibility: hidden;
    clip-path: circle(0 at calc(100% - var(--pad-right) - 20px) calc(env(safe-area-inset-top) + var(--header-h) / 2));
    transition: clip-path .7s var(--ease-out), visibility 0s linear .7s;
  }
  .site-nav.open {
    visibility: visible;
    clip-path: circle(150vmax at calc(100% - var(--pad-right) - 20px) calc(env(safe-area-inset-top) + var(--header-h) / 2));
    transition: clip-path .85s var(--ease-out);
  }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { opacity: 0; transform: translateY(20px); transition: opacity .3s ease, transform .3s ease; }
  .site-nav.open li { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s var(--ease-out); transition-delay: calc(.15s + var(--i, 0) * 60ms); }
  .site-nav a:not(.btn) {
    display: flex; align-items: baseline; padding: 14px 0;
    font: italic 500 clamp(2rem, 1.5rem + 3vw, 2.8rem)/1.1 var(--serif); letter-spacing: 0; text-transform: none;
    border-bottom: 1px solid var(--dark-line); background: none;
    transition: color .3s ease, padding-left .5s var(--ease-out);
  }
  .site-nav a:not(.btn):hover, .site-nav a.active { color: var(--accent-light); }
  .site-nav a:not(.btn):hover { padding-left: 10px; }
  .nav-num { display: inline-block; width: 3.2em; flex: none; font: 500 .7rem/1 var(--sans); font-style: normal; letter-spacing: .14em; color: var(--accent-light); }
  .nav-cta { margin-top: 28px; }
  .site-nav .btn-outline { width: 100%; min-height: 54px; color: var(--dark-text); border-color: var(--dark-text); }
  .nav-footer {
    display: flex; flex-direction: column; gap: 4px; margin: auto 0 0; padding-top: 32px;
    opacity: 0; transition: opacity .3s ease;
  }
  .site-nav.open .nav-footer { opacity: 1; transition: opacity .8s ease .5s; }
  .site-nav .nav-footer a { display: inline; padding: 0; border: 0; font: 500 1.35rem/1.5 var(--serif); font-style: normal; font-variant-numeric: lining-nums; color: var(--dark-soft); text-decoration: none; }
  .site-nav .nav-footer a:hover { color: var(--accent-light); }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-header { transform: none; border-bottom-color: transparent; }
  body.menu-open .wordmark, body.menu-open .nav-toggle { color: var(--dark-text); }
  body.menu-open .wm-sub { color: var(--dark-soft); }
  .wordmark { position: relative; z-index: 60; }
}

/* ---------- 5. Accueil ---------- */
.hero { position: relative; padding-top: clamp(28px, 5vw, 64px); overflow: hidden; }

.hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; color: var(--ink-soft); }
.kicker-rule { flex: 0 0 44px; height: 1px; background: currentColor; }

.hero-top { display: grid; gap: 28px; margin-top: 4px; }
.hero-title {
  position: relative; isolation: isolate; margin: 0;
  padding-top: .46em;                        /* place pour la boucle de la clé de sol */
  font-size: clamp(3.6rem, 22vw, 11.5rem); line-height: .88; letter-spacing: -.025em; font-weight: 500;
}
.ht-line { display: block; position: relative; }
.ht-word { display: inline-block; }
.ht-second { padding-left: .5em; }
.ht-second em { color: var(--accent); }
/* Portée musicale (5 lignes) derrière le prénom. Interligne et position calculés pour que
   la clé de sol soit placée comme sur une partition (sa barre sur la 2e ligne, celle du sol). */
.ht-staff, .fm-staff { position: relative; }
.ht-staff::before, .fm-staff::before {
  content: ""; position: absolute; z-index: -1; left: -50vw; right: -50vw;
  top: -.113em; height: calc(.85em + 1px);
  background: repeating-linear-gradient(to bottom, rgba(29, 27, 25, .16) 0 1px, transparent 1px .2125em);
  transform-origin: 0 50%;
}
/* Le G de « Gilles » : une clé de sol dont la spirale forme un G (panse ouverte + barre) */
.cg {
  position: relative; display: inline-block;
  width: .612em; height: .6em;              /* n'agrandit pas la ligne */
  color: inherit; cursor: pointer;
  transform-origin: 50% 30%;
  transition: color .5s ease;
}
.cg-svg { position: absolute; left: 0; bottom: -.361em; width: .612em; height: 1.5555em; overflow: visible; }
.cg-fill, .cg-ball { fill: currentColor; }
.cg-line { fill: none; stroke: none; }
.cg:hover { color: var(--accent); }
.cg.ring { animation: cg-ring .9s var(--ease-out); }
@keyframes cg-ring { 25% { transform: rotate(-6deg) scale(1.04); } 55% { transform: rotate(3deg); } }
/* Au chargement : la plume trace la clé d'un seul geste, de la boule jusqu'à la barre du G,
   puis l'encre se pose. */
.js .hero .cg-line {
  stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: cg-draw 2.6s cubic-bezier(.45, 0, .25, 1) .25s forwards, cg-fade .9s ease 2.6s forwards;
}
.js .hero .cg-fill, .js .hero .cg-ball { opacity: 0; animation: cg-show 1s ease 2.3s forwards; }
@keyframes cg-draw { to { stroke-dashoffset: 0; } }
@keyframes cg-fade { to { stroke-opacity: 0; } }
@keyframes cg-show { to { opacity: 1; } }
/* Au défilement, le prénom et le nom s'écartent doucement */
.ht-staff { translate: calc(var(--spread, 0) * -36px) 0; }
.ht-second { translate: calc(var(--spread, 0) * 56px) 0; }

.hero-programme { border-top: 1px solid var(--line-strong); padding-top: 14px; }
.prog-label { margin: 0 0 6px; color: var(--ink-soft); }
.hero-programme ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.hero-programme li { font: 500 1.35rem/1.35 var(--serif); }
.roman { font-style: italic; color: var(--accent); margin-right: .2em; }
.hero-programme a {
  color: inherit; text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease-out), color .3s ease;
}
.hero-programme a:hover { color: var(--accent); background-size: 100% 1px; }

.hero-foot { display: grid; gap: 28px; margin-top: clamp(26px, 4vw, 48px); padding-bottom: clamp(40px, 5vw, 64px); }
.hero-lead { margin: 0; max-width: 31em; font: 500 clamp(1.3rem, 1.12rem + .8vw, 1.72rem)/1.38 var(--serif); color: var(--ink); }
.hero-lead em { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }

/* Clavier pleine largeur */
.piano { position: relative; }
/* Petit récital : quatre médaillons centrés au-dessus du clavier */
.recital { margin: 0 0 24px; padding: 0 var(--pad-right) 0 var(--pad-left); text-align: center; }
.recital-kicker {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0 0 16px; font: 500 .68rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
}
.recital-kicker::before, .recital-kicker::after { content: ""; width: 34px; height: 1px; background: var(--line-strong); }
.recital-kicker span { font: italic 500 1.02rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.recital-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px clamp(22px, 3vw, 40px);
  margin: 0 auto; padding: 0; list-style: none;
}
.recital-list li { display: flex; }
/* Bouton : une note dans un médaillon, comme un tampon de partition */
.piece {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0; padding: 4px 6px 4px 0; border: 0; background: none; cursor: pointer;
  color: var(--ink); text-align: left; font: inherit; -webkit-tap-highlight-color: transparent;
}
.pc-note {
  position: relative; display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%;
  font: 500 1.4rem/1 var(--serif); color: var(--accent);
  transition: background .5s var(--ease-out), color .5s var(--ease-out), border-color .5s ease, transform .5s var(--ease-out);
}
/* onde qui part du médaillon à chaque temps du morceau */
.pc-note::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--accent);
  opacity: 0; pointer-events: none;
}
.piece.beat .pc-note::after { animation: pc-beat .9s var(--ease-out); }
@keyframes pc-beat { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.pc-text { display: grid; gap: 3px; }
.pc-title {
  justify-self: start; white-space: nowrap;
  font: italic 500 1.14rem/1.1 var(--serif); color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease-out), color .4s ease;
}
.pc-composer { font: 500 .62rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
@media (hover: hover) {
  .piece:hover .pc-title { background-size: 100% 1px; }
  .piece:hover .pc-note { border-color: var(--accent); transform: rotate(-8deg); }
}
.piece:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.piece[aria-pressed="true"] .pc-note { background: var(--accent); border-color: var(--accent); color: #fbf7ef; }
.piece[aria-pressed="true"] .pc-title { color: var(--accent); }
.piece.loading { cursor: progress; }
.piece.loading .pc-note { animation: pc-wait 1s ease-in-out infinite; }
@keyframes pc-wait { 50% { transform: scale(.9); } }
@media (max-width: 720px) {
  .recital-kicker span { display: none; }
  .recital-list { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 14px 22px; }
  .recital-list li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; }
}
@media (max-width: 359px) {
  .recital-list { grid-template-columns: max-content; }
  .pc-note { width: 38px; height: 38px; }
}
/* Pendant le récital, la barre d'appel (téléphone) laisse le clavier visible */
body.recital-on .call-bar { transform: translateY(110%); }

/* Partition qui défile pendant le morceau */
.score-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease-out); }
.score-panel.open { grid-template-rows: 1fr; }
.score-panel.instant, .score-panel.instant .score-inner { transition: none; }
.score-inner { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s linear .8s; }
.score-panel.open .score-inner { visibility: visible; transition: none; }
.score-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 2px var(--pad-right) 10px var(--pad-left);
}
.score-title { min-width: 0; margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 1.08rem/1.3 var(--serif); color: var(--ink); }
.score-title em { color: var(--accent); }
.score-stop {
  flex: none; margin: 0; padding: 4px 0; border: 0; cursor: pointer; color: var(--ink);
  font: 500 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
}
.score-stop:hover { color: var(--accent); }
.score-stop:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.score-view {
  position: relative; height: clamp(128px, 14vw, 186px); overflow: hidden;
  background: #fbf8f1; border-top: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.score-track { position: absolute; top: 0; bottom: 0; left: 0; width: max-content; display: flex; align-items: center; will-change: transform; }
/* max-width: none : sinon Safari (iPhone, iPad, Mac) réduit la partition à la largeur de l'écran */
.score-svg { display: block; flex: none; max-width: none; overflow: visible; color: var(--ink); }
.score-svg .nh { transition: color .35s ease; }
.score-svg .nh.on { color: var(--accent); transition: none; }
.score-playhead {
  position: absolute; top: 6%; bottom: 6%; left: 34%; width: 2px; margin-left: -1px; pointer-events: none; will-change: transform;
  background: linear-gradient(transparent, rgba(168, 64, 44, .45) 18%, rgba(168, 64, 44, .45) 82%, transparent);
}
@media (max-width: 599px) { .score-playhead { left: 28%; } }
.score-progress { height: 2px; background: var(--line); }
.score-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.piano-body { height: 16px; background: linear-gradient(#34302c, #12110f); }
.piano-felt { height: 5px; background: var(--felt); box-shadow: inset 0 -1px 0 rgba(0,0,0,.35); }
.keyboard {
  --n: 24;
  position: relative; display: flex;
  height: clamp(118px, 15vw, 200px);
  background: #12110f;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
}
.keyboard button { border: 0; margin: 0; padding: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.keyboard button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.wk {
  position: relative; flex: 1 1 0; min-width: 0;
  border-right: 1px solid #cdc3b0 !important;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, #e2d9c8 0, #fbf8f1 7%, #f5efe3 100%);
  box-shadow: inset 0 -7px 0 #e3dac8;
  transition: background .25s ease, box-shadow .12s ease;
}
.wk::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 14px; height: 2px; background: var(--accent); opacity: 0; transition: opacity .6s ease; }
.bk {
  position: absolute; top: 0; z-index: 2;
  width: calc(100% / var(--n) * .58);
  left: calc(100% / var(--n) * var(--b) - 100% / var(--n) * .29);
  height: 62%;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, #0b0a09 0, #2b2825 82%, #3d3934 100%);
  box-shadow: inset 0 -6px 0 #0d0c0b, 0 3px 4px rgba(0,0,0,.35);
  transition: box-shadow .12s ease, background .25s ease;
}
/* Le clavier change d'étendue (musique au défilement) : les touches se redéploient en douceur */
.keyboard.regrow .wk, .keyboard.regrow .bk { animation: kb-regrow .55s var(--ease-out) both; }
.keyboard.regrow .bk { animation-delay: .08s; }
@keyframes kb-regrow { from { opacity: 0; transform: translateY(-10%); } }
.wk.down { background: linear-gradient(180deg, #d5cab5 0, #efe6d5 10%, #ebe1cd 100%); box-shadow: inset 0 -2px 0 #d8cbb2, inset 0 3px 8px rgba(0,0,0,.18); transition-duration: .03s; }
.wk.down::after { opacity: 1; transition: none; }
.bk.down { background: linear-gradient(180deg, #0b0a09 0, #1c1a18 92%); box-shadow: inset 0 -2px 0 #0d0c0b, 0 1px 1px rgba(0,0,0,.35); transition-duration: .03s; }

.note-fly {
  position: absolute; z-index: 3; pointer-events: none;
  font: 500 clamp(1.4rem, 3vw, 2rem)/1 var(--serif); color: var(--accent);
  animation: note-fly 1.6s var(--ease-out) forwards;
}
@keyframes note-fly {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -150px) rotate(var(--rot, 0deg)); }
}

/* ---------- 6. Sections ---------- */
.section { position: relative; padding-block: var(--section-y); }
.section-soft { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--dark-text); }
.section-dark h2, .section-dark h3 { color: #f6f0e4; }
.section-dark h2 em { color: var(--accent-light); }
.section-dark p { color: var(--dark-soft); }

.sec-head { margin-bottom: clamp(34px, 5vw, 60px); }
.sec-num {
  display: flex; align-items: center; gap: 16px; margin: 0 0 .5rem;
  font: italic 500 1.5rem/1 var(--serif); color: var(--accent);
}
.sec-num::after { content: ""; width: 72px; height: 1px; background: currentColor; opacity: .55; transform-origin: 0 50%; }
.section-dark .sec-num { color: var(--accent-light); }
.sec-head h2 { margin: 0; }
.sec-intro { max-width: 34em; margin: 18px 0 0; font-size: 1.08rem; }

/* ---------- 7. Le professeur ---------- */
.about-grid { display: grid; gap: clamp(48px, 7vw, 110px); align-items: start; }
.about-media { position: relative; isolation: isolate; margin: 0; width: 100%; max-width: 460px; justify-self: center; }
.arch { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--paper-2); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 1.6s var(--ease-out); }
.about-media:hover .arch img { transform: scale(1.035); }
/* Fin filet en arche, concentrique à la photo (même centre, écart constant),
   comme l'encadrement d'une fenêtre de salle de concert */
.arch-frame { --gap: clamp(8px, 2.2vw, 13px); position: relative; }
.arch-frame::before {
  content: ""; position: absolute; z-index: -1; inset: calc(var(--gap) * -1) calc(var(--gap) * -1) 0;
  border: 1px solid var(--accent); border-bottom: 0; border-radius: 999px 999px 0 0;
  pointer-events: none;
}
.about-media figcaption { display: flex; align-items: center; gap: 12px; margin-top: 16px; font: italic 500 1.05rem/1.3 var(--serif); color: var(--ink-soft); }
.about-media figcaption::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.about-lead { margin: 0 0 1.2em; font: 500 clamp(1.45rem, 1.2rem + 1vw, 2.05rem)/1.28 var(--serif); color: var(--ink); }
.facts { margin: 40px 0 0; border-top: 1px solid var(--line-strong); }
.facts div { display: grid; grid-template-columns: minmax(7.5em, 10em) 1fr; gap: 6px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); padding-top: .45em; }
.facts dd { margin: 0; font: 500 1.25rem/1.4 var(--serif); }
.signature { margin: 30px 0 0; font: italic 500 clamp(2.8rem, 2rem + 2.4vw, 3.9rem)/1 var(--serif); color: var(--accent); transform: rotate(-5deg); transform-origin: 0 50%; }

/* ---------- 8. Instruments ---------- */
.instr-list { border-top: 1px solid var(--line-strong); }
.instr {
  position: relative; display: grid; gap: 10px 20px;
  grid-template-columns: auto 1fr;
  grid-template-areas: "num num" "name name" "text text";
  padding: clamp(30px, 4.5vw, 52px) 0; border-bottom: 1px solid var(--line);
}
.instr::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s var(--ease-out); }
.instr:hover::before { transform: scaleX(1); }
.instr-num { grid-area: num; color: var(--accent); }
.instr h3 { grid-area: name; margin: 0; font-size: clamp(2.7rem, 1.7rem + 3.8vw, 5rem); line-height: 1; transition: transform .7s var(--ease-out), color .4s ease; }
.instr:hover h3 { transform: translateX(14px); color: var(--accent); font-style: italic; }
.instr-text { grid-area: text; }
.instr-text p { margin: 0 0 .7em; max-width: 34em; }
.instr-text .instr-styles { margin: 0; font: italic 500 1.2rem/1.4 var(--serif); color: var(--ink); }
.instr-icon { grid-area: icon; display: none; width: 64px; height: 64px; overflow: visible; fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s ease; }
.instr:hover .instr-icon { stroke: var(--accent); }
.instr-icon g, .instr-icon circle, .instr-icon path { transform-box: fill-box; transform-origin: center; }
.instr:hover .ic-keys { animation: ic-tap .9s ease-in-out; }
@keyframes ic-tap { 30% { transform: translateY(2px); } 60% { transform: translateY(-1px); } }
.instr:hover .ic-screen { transform-origin: 0 50%; animation: ic-level 1.1s ease-in-out infinite alternate; }
@keyframes ic-level { from { transform: scaleX(.3); } to { transform: scaleX(1); } }
.instr:hover .ic-knob { animation: ic-pulse 1.1s ease-in-out infinite alternate; }
.instr:hover .ic-knob2 { animation-delay: -.55s; }
@keyframes ic-pulse { to { transform: scale(1.4); } }
.instr:hover .ic-bellows { animation: ic-squeeze 1.4s ease-in-out infinite; }
.instr:hover .ic-left { animation: ic-left 1.4s ease-in-out infinite; }
.instr:hover .ic-right { animation: ic-right 1.4s ease-in-out infinite; }
@keyframes ic-squeeze { 50% { transform: scaleX(.78); } }
@keyframes ic-left { 50% { transform: translateX(3.5px); } }
@keyframes ic-right { 50% { transform: translateX(-3.5px); } }

/* ---------- 9. Les cours (programme de concert) ---------- */
.programme { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(236,229,216,.4); }
.programme li { padding: 26px 0 28px; border-bottom: 1px solid var(--dark-line); }
.prog-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.prog-line h3 { margin: 0; font-size: clamp(1.7rem, 1.35rem + 1.3vw, 2.4rem); }
.leader { flex: 1 1 40px; min-width: 40px; border-bottom: 1px dotted rgba(236,229,216,.45); transform: translateY(-.3em); }
.prog-meta { font: italic 500 1.25rem/1.2 var(--serif); color: var(--accent-light); white-space: nowrap; }
.programme p { margin: 12px 0 0; max-width: 38em; }
.prog-note { margin: 36px 0 0; padding-left: 22px; border-left: 1px solid var(--accent-light); font: italic 500 clamp(1.25rem, 1.1rem + .5vw, 1.5rem)/1.4 var(--serif); color: var(--dark-text) !important; max-width: 32em; }
.steps { margin-top: clamp(48px, 7vw, 80px); }
.steps-title { margin: 0 0 18px; color: var(--dark-soft) !important; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.steps li { padding-top: 16px; border-top: 1px solid var(--dark-line); }
.step-num { display: block; font: italic 500 2.8rem/1 var(--serif); color: var(--accent-light); }
.steps li p { margin: 10px 0 0; }

/* ---------- 10. Vidéos ---------- */
.video-grid { display: grid; gap: 40px clamp(20px, 3vw, 36px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.video-card { min-width: 0; }
/* Deux vidéos par ligne : une vidéo seule sur la dernière ligne se place au centre */
@media (min-width: 728px) and (max-width: 1131.98px) {
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .video-grid > * { grid-column: span 2; }
  .video-grid > :last-child:nth-child(odd) { grid-column: 2 / span 2; }
}
@media (min-width: 1132px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); overflow: hidden; }
/* Vidéo filmée en portrait : même hauteur que les autres en grille (centrée sur fond sombre),
   au format haut seulement sur téléphone, où elle est seule sur sa ligne */
@media (max-width: 699px) {
  .video-card.vertical .video-frame { aspect-ratio: 9 / 16; max-height: 78svh; width: 100%; margin-inline: auto; }
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame video { object-fit: contain; background: #000; }
.video-frame iframe { animation: fade-in .6s ease; }
@keyframes fade-in { from { opacity: 0; } }
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: var(--ink); color: #fff; overflow: hidden; }
.video-play .thumb { position: absolute; inset: 0; background: center / cover no-repeat; filter: saturate(.9); transition: transform 1.4s var(--ease-out), filter .6s ease; }
.video-play:hover .thumb { transform: scale(1.05); filter: saturate(1); }
.video-play .play-icon {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.85); background: rgba(29,27,25,.35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background-color .4s ease, border-color .4s ease, transform .6s var(--ease-out);
}
.video-play:hover .play-icon { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.video-play .play-icon svg { width: 22px; height: 22px; margin-left: 3px; }
.video-privacy { position: absolute; z-index: 2; left: 12px; bottom: 10px; font: 400 .7rem/1.3 var(--sans); letter-spacing: .04em; color: rgba(255,255,255,.85); }
/* Lecture des vidéos du dossier : un bouton maison sur la première image */
.video-start { background: transparent; }
.video-start::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(29,27,25,.4), transparent 60%); }
.video-frame video { transition: transform 1.4s var(--ease-out); }
@media (hover: hover) { .video-frame:not(.started):hover video { transform: scale(1.04); } }
.video-frame.started .video-start { opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; }
.video-frame.started video { transform: none; }

/* Rotation des vidéos : fondu croisé, flou léger, titre qui se dévoile mot à mot */
.video-slot { position: relative; min-width: 0; transition: height .9s var(--ease-out); }
.video-slot > .video-card.pending { position: absolute; top: 0; left: 0; right: 0; visibility: hidden; pointer-events: none; }
.video-slot > .video-card.leaving { position: absolute; top: 0; left: 0; right: 0; z-index: 1; pointer-events: none; opacity: 0; }
.rotating .video-slot > .video-card.leaving { transition: opacity .9s ease .15s; }
.rotating .video-card.leaving .video-frame > * { filter: blur(8px); transform: scale(.98); transition: filter .9s ease, transform 1.2s var(--ease-out); }
.rotating .video-card.leaving .video-body { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .6s var(--ease-out); }
.rotating .video-frame > video, .rotating .video-frame > .video-play { transition: opacity 1.1s ease, filter 1.1s ease, transform 1.6s var(--ease-out); }
.rotating .video-card .w { display: inline-block; transition: transform 1s var(--ease-out), opacity .8s ease; transition-delay: calc(.42s + var(--i) * 60ms); }
.video-card.entering .video-frame > video, .video-card.entering .video-frame > .video-play { opacity: 0; filter: blur(12px); transform: scale(1.06); transition: none; }
.video-card.entering .w { opacity: 0; transform: translateY(.6em); transition: none; }
.video-card.entering .video-timer { opacity: 0; }
/* Fil du temps : se remplit jusqu'au prochain changement, s'estompe quand la carte est en pause */
.video-timer { display: none; }
.rotating .video-timer { display: block; position: relative; height: 1px; margin: -16px 0 15px; background: var(--line); overflow: hidden; transition: opacity .8s ease .3s; }
.video-timer span { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: opacity .5s ease; }
.video-slot.held .video-timer span { opacity: .35; }
/* « Voir d'autres vidéos » : même médaillon que les morceaux du petit récital */
.video-more { display: flex; justify-content: center; margin-top: clamp(32px, 4.5vw, 52px); }
.video-shuffle .pc-note svg { width: 20px; height: 20px; transition: transform .8s var(--ease-out); }
@media (hover: hover) { .video-shuffle:hover .pc-note svg { transform: rotate(-70deg); } }
.video-shuffle.spin .pc-note { background: var(--accent); border-color: var(--accent); color: #fbf7ef; }
.video-shuffle.spin .pc-note svg { animation: vm-spin 1s var(--ease-out); }
.video-shuffle.spin .pc-note::after { animation: pc-beat .9s var(--ease-out); }
.video-shuffle.spin .pc-title { color: var(--accent); }
@keyframes vm-spin { from { transform: rotate(0); } to { transform: rotate(-360deg); } }

.video-body { padding-top: 16px; }
.video-tag { display: block; margin-bottom: 4px; color: var(--accent); }
.video-body h3 { margin: 0 0 .25em; font-size: 1.6rem; }
.video-body p { margin: 0; font-size: .98rem; }

/* Emplacement « vidéo à venir » : une portée où passe une note */
.video-placeholder .video-frame { display: grid; place-items: center; background: var(--ink); color: var(--dark-text); }
.ph-staff { position: absolute; left: 10%; right: 10%; top: 50%; height: 41px; margin-top: -40px; background: repeating-linear-gradient(to bottom, rgba(236,229,216,.25) 0 1px, transparent 1px 10px); overflow: hidden; }
.ph-staff span { position: absolute; top: 6px; left: 0; font: 500 1.8rem/1 var(--serif); color: var(--accent-light); animation: ph-note 9s linear infinite; }
.ph-staff span:nth-child(2) { top: -2px; animation-delay: -3s; }
.ph-staff span:nth-child(3) { top: 12px; animation-delay: -6s; }
@keyframes ph-note { from { transform: translateX(-30px); } to { transform: translateX(min(80vw, 420px)); } }
.ph-text { position: relative; margin-top: 70px; font: italic 500 1.35rem/1 var(--serif); color: var(--dark-text); }

/* ---------- 11. Questions ---------- */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); overflow: hidden; }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 56px 22px 0; min-height: 48px;
  font: 500 clamp(1.3rem, 1.15rem + .6vw, 1.62rem)/1.25 var(--serif); color: var(--ink);
  transition: color .3s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 1.5px; background: currentColor;
  transition: transform .5s var(--ease-out);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details[open] summary { color: var(--accent); }
.faq-body p { margin: 0; padding-bottom: 26px; max-width: 40em; }

/* ---------- 12. Contact ---------- */
.contact-grid { display: grid; gap: clamp(56px, 7vw, 100px); align-items: start; }
.contact-info > p { font-size: 1.08rem; max-width: 28em; }
.contact-phone {
  display: inline-block; margin: 26px 0 6px;
  font: 500 clamp(2.5rem, 1.7rem + 3.6vw, 4.4rem)/1 var(--serif); letter-spacing: .01em;
  color: #f6f0e4; text-decoration: none; white-space: nowrap; font-variant-numeric: lining-nums;
  background: linear-gradient(var(--accent-light), var(--accent-light)) 0 100% / 0 1px no-repeat;
  padding-bottom: 6px;
  transition: background-size .7s var(--ease-out), color .3s ease;
}
.contact-phone:hover { background-size: 100% 1px; color: var(--accent-light); }
.contact-list { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid rgba(236,229,216,.4); }
.contact-list li { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--dark-line); }
.cl-label { color: var(--dark-soft); padding-top: .5em; }
.contact-list a, .contact-list li > span:not(.cl-label) { font: 500 1.3rem/1.4 var(--serif); color: var(--dark-text); text-decoration: none; overflow-wrap: anywhere; transition: color .3s ease; }
.contact-list a:hover { color: var(--accent-light); }
.contact-list a, .contact-list span, .facts dd, .nav-footer a { font-variant-numeric: lining-nums; }
.map-link { display: inline-block; margin-left: .7em; font: 500 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-light); vertical-align: 2px; transition: transform .4s var(--ease-out); }
.contact-list a:hover .map-link { transform: translateX(4px); }

.contact-form { display: grid; gap: 24px; min-width: 0; }
.form-title { margin: 0; font: italic 500 1.6rem/1.2 var(--serif); color: var(--dark-text) !important; }
.field-row { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field legend { color: var(--dark-soft); transition: color .3s ease; }
.field:focus-within > label { color: var(--accent-light); }
.field input, .field textarea {
  width: 100%; min-width: 0; padding: 10px 0; border: 0; border-radius: 0;
  border-bottom: 1px solid rgba(236,229,216,.35);
  background: transparent; color: var(--dark-text);
  font: 400 max(16px, 1.02rem)/1.5 var(--sans); /* 16 px minimum : pas de zoom auto sur iPhone */
  transition: border-color .3s ease, box-shadow .3s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent-light); box-shadow: 0 1px 0 var(--accent-light); }
.field input::placeholder, .field textarea::placeholder { color: rgba(236,229,216,.35); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--dark-text); transition: background-color 9999s ease 0s; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-bottom-color: #f0907a; }
.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

fieldset.field { border: 0; padding: 0; margin: 0; }
.field legend { padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px;
  border: 1px solid rgba(236,229,216,.3); color: var(--dark-text);
  font: 500 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.chips label:hover span { border-color: var(--dark-text); }
.chips input:checked + span { background: var(--dark-text); color: var(--ink); border-color: var(--dark-text); }
.chips input:focus-visible + span { outline: 2px solid var(--accent-light); outline-offset: 2px; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--dark-soft); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--accent-light); }
.consent a { color: var(--dark-text); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.btn-submit { justify-self: start; min-width: 240px; }
.btn-submit .btn-label { transition: opacity .25s ease, transform .35s var(--ease-out); }
.btn-spinner, .btn-check { position: absolute; left: 50%; top: 50%; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.btn-spinner { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 1.5px solid rgba(29,27,25,.25); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.btn-submit .btn-check { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.btn-check path { stroke-dasharray: 20; stroke-dashoffset: 20; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-submit.loading, .btn-submit.success { pointer-events: none; }
.btn-submit.loading .btn-label, .btn-submit.success .btn-label { opacity: 0; transform: translateY(-8px); }
.btn-submit.loading .btn-spinner { opacity: 1; }
.btn-submit.success .btn-check { opacity: 1; }
.btn-submit.success .btn-check path { stroke-dashoffset: 0; transition: stroke-dashoffset .5s var(--ease-out) .1s; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 500; }
.form-status.ok { color: #a9d8b2; }
.form-status.err { color: #f0a08a; }
.form-status:not(:empty) { animation: fade-in .5s ease; }

/* ---------- 13. Pied de page et barre d'appel ---------- */
.site-footer { background: #141210; color: var(--dark-soft); padding: clamp(56px, 8vw, 96px) 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-mark { margin: 0 0 28px; padding-bottom: 28px; font: 500 clamp(3.2rem, 2rem + 7vw, 8rem)/.95 var(--serif); letter-spacing: -.02em; color: var(--dark-text); }
.footer-mark em { color: var(--accent-light); }
.footer-mark { position: relative; isolation: isolate; line-height: .88; padding-top: .46em; }
.fm-staff { display: inline-block; }
.fm-staff::before { top: -.15em; left: -100vw; right: -100vw; background: repeating-linear-gradient(to bottom, rgba(236, 229, 216, .14) 0 1px, transparent 1px .2125em); }
/* Quelques notes discrètes sur la portée, comme au verso de la carte de visite
   (dessinées en interlignes : 1 unité = .2125em, la 1re ligne de la portée est à y = 0) */
.fm-notes {
  position: absolute; z-index: -1; left: calc(100% + 3.05em); top: -1em;
  width: 3.6125em; height: 2.55em; pointer-events: none; color: #3f3c38;   /* teinte pleine (crème à 20 % sur le fond) : aucun chevauchement visible */
}
.fm-notes svg { display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
.fm-notes .ng.off { display: none; }
.js .fm-notes .ng { opacity: 0; transform: translateY(.5px); transition: opacity 1.4s ease, transform 1.6s var(--ease-out); transition-delay: calc(var(--i) * .22s); }
.js .fm-notes.on .ng { opacity: 1; transform: none; }
@media (max-width: 599px) { .fm-notes { left: calc(100% + 2.7em); } }
.nowrap { white-space: nowrap; }
.fm-staff .cg:hover { color: var(--accent-light); }
.site-footer { position: relative; overflow: hidden; }
.site-footer .note-fly { color: var(--accent-light); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
.footer-inner p, .footer-copy { margin: 0; color: var(--dark-soft); font-size: .92rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer-inner a {
  color: var(--dark-text); text-decoration: none; font-size: .92rem;
  background: linear-gradient(var(--accent-light), var(--accent-light)) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease-out), color .3s ease;
}
.footer-inner a:hover { background-size: 100% 1px; color: var(--accent-light); }
.footer-copy { margin-top: 18px; font-size: .82rem; }

.call-bar {
  display: none; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px var(--pad-right) calc(14px + env(safe-area-inset-bottom)) var(--pad-left);
  background: var(--ink); color: var(--dark-text); text-decoration: none;
  border-top: 3px solid var(--felt);
  font: 500 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  transition: transform .6s var(--ease-out);
}
.call-bar strong { font: 500 1.4rem/1 var(--serif); font-variant-numeric: lining-nums; letter-spacing: .02em; text-transform: none; color: #f6f0e4; }
.call-bar:active { background: #2b2825; }
.call-bar.hidden { transform: translateY(110%); }
@media (max-width: 720px) and (hover: none) {
  .call-bar { display: flex; }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ---------- 14. Animations d'entrée et d'apparition ---------- */
.js .intro { animation: intro-up 1.1s var(--ease-out) var(--d, 0s) both; }
.js .ht-word { animation: word-up 1.3s var(--ease-out) var(--d, 0s) both; }
.js .ht-staff::before { animation: staff-draw 2s var(--ease-out) .1s both; }
@keyframes intro-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes word-up { from { opacity: 0; transform: translateY(.22em); } }
@keyframes staff-draw { from { transform: scaleX(0); } }

.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.visible { opacity: 1; transform: none; }
.js .sec-head.reveal .sec-num::after { transform: scaleX(0); transition: transform 1.2s var(--ease-out) .3s; }
.js .sec-head.reveal h2 { clip-path: inset(0 0 100% 0); transform: translateY(.3em); transition: clip-path 1.3s var(--ease-out) .12s, transform 1.3s var(--ease-out) .12s; }
.js .sec-head.reveal.visible h2 { clip-path: inset(-.3em -.3em -.35em -.3em); transform: none; }
.js .sec-head.reveal.visible .sec-num::after { transform: none; }
/* Les étapes arrivent l'une après l'autre */
.js .steps.reveal li { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform 1s var(--ease-out); }
.js .steps.reveal.visible li { opacity: 1; transform: none; }
.js .steps.reveal.visible li:nth-child(2) { transition-delay: .15s; }
.js .steps.reveal.visible li:nth-child(3) { transition-delay: .3s; }
/* Photo : dévoilement de bas en haut, puis l'arche apparaît */
.js .about-media.reveal { opacity: 1; transform: none; }
.js .about-media.reveal .arch { clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease-out); }
.js .about-media.reveal.visible .arch { clip-path: inset(0 0 0 0); }
.js .about-media.reveal .arch-frame::before { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease-out) .35s; }
.js .about-media.reveal.visible .arch-frame::before { clip-path: inset(0 0 0 0); }
/* Signature : elle « s'écrit » de gauche à droite */
.js .signature.reveal { opacity: 1; transform: rotate(-5deg); clip-path: inset(0 100% 0 0); transition: clip-path 1.8s cubic-bezier(.45, 0, .2, 1) .2s; }
.js .signature.reveal.visible { clip-path: inset(0 -10% 0 0); }

/* =====================================================================
   15. RESPONSIVE
   ===================================================================== */
@media (min-width: 600px) {
  .instr { grid-template-columns: 3.5rem 1fr 64px; grid-template-areas: "num name icon" ". text text"; align-items: center; }
  .instr-icon { display: block; justify-self: end; }
}

@media (min-width: 860px) {
  .hero-top { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; }
  .hero-title { font-size: min(11.5rem, 14vw); }
  .hero-programme { border-top: 0; border-left: 1px solid var(--line-strong); padding: 4px 0 4px 26px; margin-bottom: 1.4rem; }
  .hero-programme ol { flex-direction: column; gap: 2px; }
  .hero-programme li { font-size: 1.6rem; }
  .hero-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 56px; }

  .sec-head-wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "num num" "title intro"; gap: 0 56px; align-items: end; }
  .sec-head-wide .sec-num { grid-area: num; }
  .sec-head-wide h2 { grid-area: title; }
  .sec-head-wide .sec-intro { grid-area: intro; margin: 0; justify-self: end; }

  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .about-media { justify-self: start; margin-top: 18px; }
  .instr { grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 6fr) 72px; grid-template-areas: "num name text icon"; gap: 20px 32px; }
  .instr-num { align-self: start; padding-top: 1.6em; }
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (min-width: 960px) {
  .sec-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; align-items: start; }
  .sec-layout > .sec-head { position: sticky; top: calc(var(--header-h) + 40px); }
}

/* Grands écrans : l'accueil et son clavier tiennent dans la hauteur de l'écran */
@media (min-width: 860px) {
  .hero { padding-top: clamp(24px, 3.2vw, 48px); }
  .hero-title { font-size: min(10rem, 12.2vw); }
  .hero-top { margin-top: 0; }
  .hero-foot { margin-top: clamp(18px, 2.4vw, 34px); padding-bottom: clamp(28px, 3.4vw, 46px); }
  .keyboard { height: clamp(118px, 11.5vw, 170px); }
}
@media (min-width: 860px) and (min-height: 760px) {
  .hero { min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; }
  .hero > .container { flex: 1; display: flex; flex-direction: column; justify-content: center; }
}

/* Écrans presque carrés : pliables ouverts (iPhone pliable, Galaxy Z Fold…), petites tablettes */
@media (min-width: 600px) and (max-width: 859.98px) and (min-aspect-ratio: 3/4) and (max-aspect-ratio: 4/3) {
  .hero-title { font-size: min(9rem, 17vw); }
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .keyboard { height: 130px; }
}

/* Téléphones en paysage */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-h: 60px; --section-y: 60px; }
  .hero-title { font-size: min(7rem, 13vw); }
  .hero-top { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .hero-programme { border-top: 0; border-left: 1px solid var(--line-strong); padding-left: 18px; }
  .hero-programme ol { flex-direction: column; gap: 0; }
  .keyboard { height: 110px; }
  .site-nav a:not(.btn) { padding: 8px 0; font-size: 1.6rem; }
}

/* Petits téléphones et écrans extérieurs des pliables */
@media (max-width: 380px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .wm-name { font-size: 1.3rem; }
  .hero-actions .btn { width: 100%; }
  .btn { padding-inline: 1.3em; letter-spacing: .14em; }
  .contact-phone { font-size: 2.3rem; }
  .contact-list li, .facts div { grid-template-columns: 1fr; }
  .contact-list .cl-label, .facts dt { padding-top: 0; }
  .btn-submit { width: 100%; min-width: 0; }
}
@media (max-width: 320px) {
  .wm-sub { letter-spacing: .16em; }
  .hero-kicker .kicker-rule { display: none; }
  .hero-programme li { font-size: 1.15rem; }
  .contact-phone { font-size: 2rem; }
  .nt-label { display: none; }
}

/* ---------------------------------------------------------------------
   Pliables à DEUX écrans (charnière) : rien n'est posé sur la pliure.
   --------------------------------------------------------------------- */
@media (horizontal-viewport-segments: 2) {
  :root {
    --seg-left: env(viewport-segment-width 0 0);
    --seg-right: env(viewport-segment-width 1 0);
    --hinge: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0));
  }
  .container { max-width: none; }
  .hero-top, .hero-foot, .about-grid, .contact-grid, .sec-layout, .video-grid, .sec-head-wide, .steps ol {
    grid-template-columns:
      calc(var(--seg-left) - var(--pad-left) - 16px)
      calc(var(--hinge) + 32px)
      calc(var(--seg-right) - var(--pad-right) - 16px) !important;
    grid-template-areas: none !important;
    column-gap: 0 !important;
  }
  .hero-top > :nth-child(odd), .hero-foot > :nth-child(odd), .about-grid > :nth-child(odd), .contact-grid > :nth-child(odd),
  .sec-layout > :nth-child(odd), .video-grid > :nth-child(odd), .steps ol > :nth-child(odd) { grid-column: 1; }
  .hero-top > :nth-child(even), .hero-foot > :nth-child(even), .about-grid > :nth-child(even), .contact-grid > :nth-child(even),
  .sec-layout > :nth-child(even), .video-grid > :nth-child(even), .steps ol > :nth-child(even) { grid-column: 3; }
  .video-grid > :nth-child(odd) { grid-column: 1 !important; }
  .video-grid > :nth-child(even) { grid-column: 3 !important; }
  .sec-head-wide > * { grid-column: 1 !important; }
  .sec-head-wide .sec-intro { justify-self: start; }
  .hero-title { font-size: calc(var(--seg-left) * .24); }
  .instr { grid-template-columns: 3.5rem calc(var(--seg-left) - var(--pad-left) - 3.5rem - 36px) calc(var(--hinge) + 32px) 1fr; grid-template-areas: "num name . text"; column-gap: 0; }
  .instr-icon { display: none; }
  .site-nav { left: env(viewport-segment-left 1 0); }
}
@media (vertical-viewport-segments: 2) {
  .hero { min-height: auto; }
  .hero-title { font-size: min(8rem, 11vw); }
}

/* « Réduire les animations » : tout est visible immédiatement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .intro, .js .ht-word, .js .steps.reveal li { opacity: 1 !important; transform: none !important; }
  .js .signature.reveal { transform: rotate(-5deg) !important; clip-path: none; }
  .js .about-media.reveal .arch { clip-path: none; }
  .js .about-media.reveal .arch-frame::before { clip-path: none; }
  .js .sec-head.reveal .sec-num::after { transform: none; }
  .js .sec-head.reveal h2 { clip-path: none; transform: none; }
  .js .hero .cg-line { stroke: none; }
  .js .hero .cg-fill, .js .hero .cg-ball { opacity: 1; }
  .ht-staff, .ht-second { translate: none; }
}

@media print {
  body::after, .site-header, .call-bar, .contact-form, .piano, #videos { display: none !important; }
  .section-dark { background: #fff; color: #000; }
  .section-dark h2, .section-dark h3, .section-dark p { color: #000; }
}
