/* ==========================================================================
   Vocalise — base : jetons, reset, typographie, composants partagés
   Style « encre marine sur marbre froid »
   ========================================================================== */

:root {
  /* Couleurs */
  --ink: #0b3558;
  --blue: #006bff;
  --blue-deep: #0052cc;
  --slate: #476788;
  --mist: #a6bbd1;
  --cloud: #f8f9fb;
  --paper: #ffffff;
  --pebble: #f0f3f8;
  --hairline: #d4e0ed;
  --magenta: #e55cff;
  --cyan: #0099ff;
  --cobalt: #004eba;
  --tint: #e6f0ff;

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Élévation : toujours teintée de bleu, jamais de noir */
  --shadow-card: 0 4px 5px rgba(71,103,136,.04), 0 8px 15px rgba(71,103,136,.03), 0 30px 50px rgba(71,103,136,.08);
  --shadow-link: 0 4px 5px rgba(71,103,136,.04), 0 4px 10px rgba(71,103,136,.03), 0 10px 20px rgba(71,103,136,.05);
  --shadow-btn: 0 4px 5px rgba(71,103,136,.04), 0 8px 15px rgba(71,103,136,.03), 0 15px 30px rgba(71,103,136,.06);
  --shadow-lift: 0 6px 8px rgba(71,103,136,.05), 0 16px 32px rgba(71,103,136,.07), 0 44px 80px rgba(71,103,136,.16);

  /* Formes */
  --r-sm: 4px;
  --r-btn: 8px;
  --r-product: 16px;
  --r-card: 24px;
  --r-pill: 9999px;

  /* Mise en page */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 72px;

  /* Mouvement */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
[hidden] { display: none !important; }
main { overflow-x: clip; } /* coupe les formes décoratives sans casser position: sticky */
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
em { font-style: normal; }
strong, b { font-weight: 700; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Typographie ---------- */
.display, .h2 { font-weight: 700; letter-spacing: -0.025em; }
.display { font-size: clamp(44px, 6.4vw, 80px); line-height: 1.06; }
.h2 { font-size: clamp(36px, 4.8vw, 60px); line-height: 1.1; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--slate); }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Mise en page ---------- */
.container { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(80px, 11vw, 140px); }
.section--paper { background: var(--paper); }
.section-head { max-width: 780px; margin: 0 auto clamp(48px, 6vw, 72px); text-align: center; }
.section-head .h2 { margin-top: 18px; }
.section-head p { max-width: 620px; margin: 20px auto 0; color: var(--slate); font-size: 18px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--tint); color: var(--cobalt);
  font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.badge .icon { width: 16px; height: 16px; }
.badge__dot { --ping: rgba(0,107,255,.45); width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: ping 2s var(--ease) infinite; }
.badge--dark { background: rgba(255,255,255,.1); color: #fff; }
.badge--dark .badge__dot { --ping: rgba(255,255,255,.5); background: #fff; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 var(--ping); }
  80%, 100% { box-shadow: 0 0 0 9px transparent; }
}

/* ---------- Boutons (remplissage qui éclot depuis le curseur) ---------- */
.btn {
  --x: 50%; --y: 50%;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: var(--r-btn);
  font: 600 17px/1.4 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: translate .5s var(--ease), scale .2s ease, box-shadow .4s var(--ease), background-color .3s, color .3s;
}
.btn::before {
  content: ""; position: absolute; z-index: -1; left: var(--x); top: var(--y);
  width: 250%; aspect-ratio: 1; border-radius: 50%;
  background: var(--bloom);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .6s var(--ease);
}
.btn:hover::before { transform: translate(-50%, -50%) scale(1); }
.btn:hover { box-shadow: var(--shadow-btn); }
.btn:active { scale: .97; }
.btn .icon { width: 18px; height: 18px; transition: translate .4s var(--ease); }
.btn:hover .icon--arrow { translate: 4px 0; }

.btn--primary { background: var(--blue); color: #fff; --bloom: var(--blue-deep); }
.btn--dark { background: var(--ink); color: #fff; --bloom: #16466f; }
.btn--light { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); --bloom: var(--pebble); }
.btn--light:hover { box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-btn); }
.btn--white { background: #fff; color: var(--ink); --bloom: var(--tint); }
.btn--outline-white { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); --bloom: rgba(255,255,255,.12); }
.btn--sm { padding: 10px 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Lien texte (soulignement animé) ---------- */
.link { position: relative; color: var(--ink); font-weight: 600; text-decoration: none; }
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.link--arrow { display: inline-flex; align-items: center; gap: 8px; }
.link--arrow::after { right: 26px; }
.link--arrow .icon { width: 18px; height: 18px; transition: translate .4s var(--ease); }
.link--arrow:hover .icon { translate: 4px 0; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-size: 22px; font-weight: 800; letter-spacing: -0.04em; line-height: 1;
}
.logo__mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  transition: rotate .6s var(--ease-spring), background-color .3s;
}
.logo__mark i { width: 3px; height: 14px; border-radius: 2px; background: #fff; }
.logo__mark i:nth-child(1) { height: 8px; }
.logo__mark i:nth-child(2) { height: 16px; }
.logo__mark i:nth-child(3) { height: 11px; }
.logo__mark i:nth-child(4) { height: 6px; }
.logo:hover .logo__mark { rotate: -8deg; background: var(--blue); }
.logo:hover .logo__mark i { animation: eq .45s ease-in-out infinite alternate; }
.logo:hover .logo__mark i:nth-child(2) { animation-delay: -.2s; }
.logo:hover .logo__mark i:nth-child(3) { animation-delay: -.35s; }
.logo:hover .logo__mark i:nth-child(4) { animation-delay: -.1s; }
.logo__dot { color: var(--blue); }

/* ---------- Égaliseur ---------- */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
.eq i {
  width: 3px; height: 100%; border-radius: 2px; background: var(--blue);
  transform-origin: bottom; animation: eq 1s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * -.23s);
}
.eq--white i { background: #fff; }
@keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* ---------- Barre de progression ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px;
  background: var(--blue); transform-origin: left; transform: scaleX(0); pointer-events: none;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: translate .5s var(--ease), background-color .35s, box-shadow .35s, height .35s var(--ease);
}
.nav.is-scrolled {
  --nav-h: 64px;
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 1px 0 var(--hairline), var(--shadow-link);
}
.nav.is-hidden { translate: 0 -110%; }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.nav__menu { position: relative; margin: 0 auto; }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  position: relative; z-index: 1; display: block; padding: 8px 14px; border-radius: var(--r-btn);
  color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: color .25s;
}
.nav__links a.is-active { color: var(--blue); }
.nav__pill {
  position: absolute; left: 0; top: 50%; width: 0; height: 38px; margin-top: -19px;
  border-radius: var(--r-btn); background: var(--pebble); opacity: 0;
  transition: translate .45s var(--ease), width .45s var(--ease), opacity .25s;
}
.nav__pill.is-on { opacity: 1; }
.nav__cta { display: flex; align-items: center; gap: 20px; }
.nav__burger {
  display: none; position: relative; width: 44px; height: 44px; border: 0;
  border-radius: var(--r-btn); background: var(--pebble); cursor: pointer;
}
.nav__burger span {
  position: absolute; left: 13px; right: 13px; top: calc(50% - 1px); height: 2px; border-radius: 2px;
  background: var(--ink); transition: translate .4s var(--ease), rotate .4s var(--ease);
}
.nav__burger span:first-child { translate: 0 -4px; }
.nav__burger span:last-child { translate: 0 4px; }
.nav__burger.is-open span:first-child { translate: 0 0; rotate: 45deg; }
.nav__burger.is-open span:last-child { translate: 0 0; rotate: -45deg; }

/* Menu « Réserver » (cours découverte ou cours à l'unité) */
.book-menu { position: relative; }
.book-menu__chev { transition: rotate .45s var(--ease-spring); }
.book-menu.is-open .book-menu__chev { rotate: 180deg; }
.book-menu__panel {
  position: absolute; top: calc(100% + 14px); right: 0; z-index: 5; width: 330px; padding: 8px;
  border: 1px solid var(--hairline); border-radius: var(--r-product); background: var(--paper); box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; translate: 0 -8px; scale: .96; transform-origin: top right;
  transition: opacity .2s, translate .45s var(--ease-spring), scale .45s var(--ease-spring), visibility 0s .45s;
}
.book-menu.is-open .book-menu__panel {
  opacity: 1; visibility: visible; translate: 0 0; scale: 1;
  transition: opacity .2s, translate .45s var(--ease-spring), scale .45s var(--ease-spring), visibility 0s;
}
.book-menu__panel::before {
  content: ""; position: absolute; top: -7px; right: 34px; width: 12px; height: 12px; rotate: 45deg;
  border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); background: var(--paper);
}
.book-menu__item {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px;
  color: var(--ink); text-decoration: none; opacity: 0; translate: 0 6px;
  transition: background-color .2s, opacity .3s, translate .45s var(--ease);
}
.book-menu.is-open .book-menu__item { opacity: 1; translate: 0 0; transition-delay: 0s, calc(var(--i) * 70ms + 80ms), calc(var(--i) * 70ms + 80ms); }
.book-menu__item:hover, .book-menu__item:focus-visible { background: var(--pebble); outline: none; }
.book-menu__icon {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--tint); color: var(--blue); transition: background-color .3s, color .3s, rotate .5s var(--ease-spring);
}
.book-menu__item:hover .book-menu__icon { background: var(--blue); color: #fff; rotate: -8deg; }
.book-menu__item b { display: block; font-size: 15px; line-height: 1.3; }
.book-menu__item small { display: block; font-size: 13px; line-height: 1.4; color: var(--slate); }
.book-menu__arrow { width: 16px; height: 16px; margin-left: auto; color: var(--mist); transition: translate .3s var(--ease), color .3s; }
.book-menu__item:hover .book-menu__arrow { translate: 3px 0; color: var(--blue); }

/* Menu mobile (ouverture circulaire) */
.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: center; gap: 32px;
  padding: 96px var(--gutter) 40px; background: var(--paper); overflow-y: auto;
  clip-path: circle(0% at calc(100% - 44px) 36px); visibility: hidden;
  transition: clip-path .7s var(--ease), visibility 0s .7s;
}
.menu.is-open { clip-path: circle(150% at calc(100% - 44px) 36px); visibility: visible; transition: clip-path .8s var(--ease); }
.menu nav { display: flex; flex-direction: column; gap: 4px; }
.menu nav a {
  font-size: clamp(32px, 9vw, 44px); font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.menu__actions { display: grid; gap: 10px; }
.menu nav a, .menu__actions .btn { opacity: 0; translate: 0 24px; transition: opacity .5s, translate .6s var(--ease); }
.menu.is-open nav a, .menu.is-open .menu__actions .btn { opacity: 1; translate: 0 0; transition-delay: calc(var(--i) * 60ms + .2s); }

@media (max-width: 1040px) { .nav__links a { padding: 8px 10px; } }
@media (max-width: 960px) {
  .nav__menu { display: none; }
  .nav__cta { margin-left: auto; gap: 10px; }
  .nav__burger { display: block; }
}
@media (max-width: 420px) { .book-menu { display: none; } }

/* ---------- Formes décoratives (atmosphère uniquement) ---------- */
.blob {
  position: absolute; z-index: 0; pointer-events: none;
  border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%;
  filter: blur(28px); opacity: .7;
  animation: morph 16s ease-in-out infinite alternate;
}
.blob--magenta { background: var(--magenta); }
.blob--cyan { background: var(--cyan); }
@keyframes morph {
  0% { border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%; rotate: 0deg; }
  50% { border-radius: 63% 37% 38% 62% / 58% 62% 38% 42%; }
  100% { border-radius: 37% 63% 55% 45% / 40% 45% 55% 60%; rotate: 30deg; }
}

/* ---------- Apparitions au scroll ---------- */
:where(.js) [data-reveal] {
  opacity: 0; translate: 0 36px;
  transition: opacity .9s var(--ease) var(--d, 0ms), translate 1s var(--ease) var(--d, 0ms), scale 1s var(--ease) var(--d, 0ms);
}
:where(.js) [data-reveal="scale"] { translate: 0 24px; scale: .94; }
:where(.js) [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }

/* Titres découpés mot à mot */
.w, .w > span { display: inline-block; }
:where(.js) [data-split] .w > span {
  opacity: 0; translate: 0 .5em; filter: blur(8px);
  transition: opacity .8s var(--ease), translate 1s var(--ease), filter .8s var(--ease);
  transition-delay: calc(var(--i) * 70ms + 100ms);
}
:where(.js) [data-split].is-in .w > span { opacity: 1; translate: 0 0; filter: none; }

/* Mot surligné d'un trait dessiné */
.hl { position: relative; white-space: nowrap; }
.hl__line { position: absolute; left: -2%; bottom: -.14em; width: 104%; height: .32em; overflow: visible; }
.hl__line path {
  fill: none; stroke: var(--blue); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 1.4s var(--ease) 1s;
}
.is-in .hl__line path, html:not(.js) .hl__line path { stroke-dashoffset: 0; }

/* ---------- Curseur suiveur ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cursor.is-visible { opacity: 1; }
.cursor__ring {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; translate: -50% -50%;
  border-radius: 50%; border: 1.5px solid rgba(11,53,88,.3);
  transition: width .35s var(--ease), height .35s var(--ease), background-color .35s, border-color .35s;
}
.cursor.is-hover .cursor__ring { width: 60px; height: 60px; border-color: rgba(0,107,255,.45); background: rgba(0,107,255,.06); }
.cursor.is-down .cursor__ring { width: 24px; height: 24px; }

/* ---------- Notification + notes de musique ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--ink); color: #fff;
  box-shadow: var(--shadow-lift); translate: -50% calc(100% + 40px);
  transition: translate .6s var(--ease-spring);
}
.toast.is-show { translate: -50% 0; }
.toast__icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--blue); font-size: 18px; }
.toast__text { max-width: 360px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.toast__btn {
  flex: none; padding: 9px 14px; border-radius: var(--r-btn); background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 700; text-decoration: none; transition: background-color .25s;
}
.toast__btn:hover { background: var(--tint); }
.toast__close {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--mist); cursor: pointer;
}
.toast__close:hover { background: rgba(255,255,255,.1); color: #fff; }
.toast__close .icon { width: 18px; height: 18px; }
@media (max-width: 560px) { .toast { flex-wrap: wrap; } .toast__text { flex: 1 1 60%; } }

.note-burst {
  position: fixed; z-index: 80; pointer-events: none;
  font-size: 22px; font-weight: 700; line-height: 1; translate: -50% -50%;
  animation: note-fly 1.1s var(--ease) forwards;
}
@keyframes note-fly {
  to { translate: calc(-50% + var(--tx)) calc(-50% + var(--ty)); rotate: var(--r); scale: .6; opacity: 0; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
}
