/* Layout: bright and reassuring for parents. Spruce green (the violin's top wood) for actions, rosin amber for details, generous white space; 70rem column. */
:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --fg: #1c2622;
  --muted: #56645d;
  --line: #dde3df;
  --spruce: #2c6a4d;
  --rosin: #b8740f;
  --tint: #e8f1ec;
  --display: "Young Serif", Georgia, serif;
  --body: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111715; --surface: #18201d; --fg: #e8eeea; --muted: #a0aea7; --line: #2a3531;
    --spruce: #7cc4a0; --rosin: #e3a54a; --tint: #1c2a24; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111715; --surface: #18201d; --fg: #e8eeea; --muted: #a0aea7; --line: #2a3531;
  --spruce: #7cc4a0; --rosin: #e3a54a; --tint: #1c2a24; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1.0625rem/1.7 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--spruce); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--spruce); color: var(--bg); }
html { scrollbar-color: var(--muted) var(--bg); accent-color: var(--spruce); caret-color: var(--spruce); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--rosin); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
.wrap { max-width: 70rem; margin-inline: auto; padding-inline: 1.25rem; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rosin); font-weight: 700; }
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section > .wrap { display: grid; gap: 2rem; }
.head { display: grid; gap: .6rem; max-width: 42rem; }
.lead { font-size: 1.2rem; color: var(--muted); }
.prose { display: grid; gap: 1rem; max-width: 42rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.todo { background: #fff3c4; color: #5c4400; padding: .1rem .4rem; border-radius: 3px; font-weight: 700; }

/* Header, as on the Orchestre Amati site: it slides away while scrolling down and comes back on the first scroll up (build.py).
   The ten links do not fit beside the name: the two buttons stay on the name's line, the links get the line below. */
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: var(--bg); transition: translate .3s ease; }
.top.away:not(:has(:focus-visible)) { translate: 0 -100%; } /* back for keyboard focus only: a tapped menu button must not pin it */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-block: .85rem; }
.top-acts { order: 1; display: flex; flex-wrap: wrap; gap: .6rem; }
.top nav { order: 2; flex-basis: 100%; }
.brand { color: var(--fg); text-decoration: none; font-family: var(--display); font-size: 1.45rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--body); font-size: .75rem; letter-spacing: .08em; color: var(--muted); }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; }
.top nav a:not(.btn) { color: var(--fg); text-decoration: none; font-weight: 600; font-size: .98rem; }
.top nav a:not(.btn)[aria-current="page"] { color: var(--spruce); text-decoration: underline; text-underline-offset: 6px; }
/* Menu button: below the width where the links no longer fit on one line, links and buttons fold behind it (build.py adds .menu). */
.menu-btn { display: none; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid var(--fg); border-radius: 10px; background: none; color: var(--fg); cursor: pointer; }
.menu-btn svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn path { transition: transform .25s ease, opacity .2s; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] path:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] path:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] path:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 55.9375rem) {
  .top.menu .menu-btn { display: grid; }
  .top.menu :is(nav, .top-acts) { display: none; }
  .top.menu.open nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .top.menu.open nav a { padding: .7rem 0; border-top: 1px solid var(--line); font-size: 1.1rem; }
  .top.menu.open .top-acts { order: 3; display: flex; flex-direction: column; flex-basis: 100%; padding-bottom: .5rem; }
  .top.menu.open .top-acts .btn { justify-content: center; }
}

.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.3rem; border-radius: 10px; text-decoration: none;
  border: 2px solid var(--spruce); background: var(--spruce); color: var(--bg); font: 700 1rem var(--body); cursor: pointer; }
.btn.ghost { background: transparent; color: var(--spruce); }
.btn.wa { background: #1f7a4a; border-color: #1f7a4a; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero .wrap { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero .text { display: grid; gap: 1.1rem; }
.hero h1 { font-size: clamp(2.6rem, 6.5vw, 4.4rem); }
.hero img { border-radius: 18px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.badges li { background: var(--tint); color: var(--fg); border-radius: 999px; padding: .35rem .9rem; font-weight: 600; font-size: .95rem; }

.pagehead { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }
.pagehead .wrap { display: grid; gap: .6rem; }
.pagehead h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }

/* Paths: the three ways to learn */
.paths { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.path { display: grid; gap: .7rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--fg); text-decoration: none; }
.path img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.path > div { display: grid; gap: .4rem; padding: 0 1.25rem 1.25rem; }
.path .more { color: var(--spruce); font-weight: 700; }
.path:hover h3 { color: var(--spruce); }

.split { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; }
.band { background: var(--tint); }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: 1rem; padding-block: .8rem; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
@media (max-width: 34rem) { .facts > div { grid-template-columns: 1fr; gap: .1rem; } }

.prices { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; display: grid; gap: .25rem; }
.price b { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1.1; color: var(--spruce); font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); }

.quotes { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); align-items: start; }
.quotes figure { margin: 0; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: .8rem; }
.quotes blockquote { margin: 0; }
.quotes figcaption { font-family: var(--display); font-size: 1.2rem; color: var(--spruce); }
.quotes .short blockquote { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.55rem); line-height: 1.35; } /* short ones set large, as on Amati */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
.event { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); }
.event time { font-family: var(--display); font-size: 1.6rem; color: var(--rosin); line-height: 1.1; font-variant-numeric: tabular-nums; }
.event time small { display: block; font-family: var(--body); font-size: .85rem; color: var(--muted); }
.event .body { display: grid; gap: .8rem; min-width: 0; }
.event .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
@media (max-width: 34rem) { .event { grid-template-columns: 1fr; gap: .4rem; } }

.grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.grid figure { margin: 0; display: grid; gap: .35rem; }
.grid button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .3s ease; }
.grid button:hover img { transform: scale(1.03); }
.grid figcaption { font-size: .9rem; color: var(--muted); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1400px); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(8, 12, 10, .9); }
dialog.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; cursor: zoom-out; }
dialog.lightbox p { color: #fff; text-align: center; padding-top: .5rem; }
dialog.lightbox button { position: fixed; top: 1rem; right: 1rem; }

.videos { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.video { display: grid; gap: .5rem; color: var(--fg); text-decoration: none; }
.video .thumb { position: relative; border-radius: 12px; overflow: hidden; }
.video .thumb img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.video .play { position: absolute; inset: 0; margin: auto; width: 3.5rem; height: 3.5rem; fill: rgba(44, 106, 77, .92); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.video .play path { fill: #fff; }
.video:hover .play { transform: scale(1.08); }
.video h3 { font-family: var(--body); font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
.video p { color: var(--muted); font-size: .95rem; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }

.contact { display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); align-items: start; }
.direct { display: grid; gap: 1.25rem; }
.direct dl { margin: 0; display: grid; gap: .9rem; }
.direct dt { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.direct dd { margin: 0; font-size: 1.15rem; }
form { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.25rem, 3vw, 2rem); }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
label { display: grid; gap: .35rem; font-weight: 700; font-size: .95rem; }
label span { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 1rem var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; }
textarea { min-height: 8rem; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.status { font-weight: 700; }
.status.ok { color: #1f7a4a; }
.status.err { color: #b3261e; }

.cta-band { background: var(--spruce); color: var(--bg); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band .btn { background: var(--bg); color: var(--spruce); border-color: var(--bg); }
.cta-band .btn.wa { background: #1f7a4a; color: #fff; border-color: #1f7a4a; }
footer { padding-block: 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
footer .wrap { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
footer h3 { font-family: var(--body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--fg); margin-bottom: .5rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Motion, adapted from 21st.dev components (js/fx.js runs the typewriter and the open panel) ----------
   Scroll effects use CSS scroll-driven animations: browsers without them (Firefox today) simply show the page still.
   Everything that moves is switched off by "reduce motion". */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Splitting Text (as on Amati): the hero title enters letter by letter */
.letters .w { display: inline-block; white-space: nowrap; }
.letters .w span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .letters .w span { animation: split-in 1s calc(var(--i) * 45ms + .2s) both cubic-bezier(.2, .7, .2, 1); }
}
@keyframes split-in { from { opacity: 0; transform: translateY(.45em); filter: blur(6px); } }

/* Typewriter: the end of the title types itself again and again */
.typed { min-height: 2.3em; }
.type { color: var(--spruce); }
.type::after { content: ""; display: inline-block; width: .08em; height: .9em; margin-left: .06em; vertical-align: -.05em; background: var(--rosin); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 30rem) { .typed { min-height: 3.45em; } }

/* Text Highlight: a rosin stroke under « premier cours » in the closing band */
.hl { background: linear-gradient(color-mix(in srgb, var(--rosin) 70%, transparent), color-mix(in srgb, var(--rosin) 70%, transparent)) no-repeat 0 92% / 100% .3em; }

/* Four ways to play. Wide screens: Hover Expand Gallery, one panel open, the others a rail with their name.
   Phones: Stacking Cards, each card pinned a little lower than the previous one as you scroll. */
@media (min-width: 48rem) {
  .paths { --rail: 4.75rem; --n: 4; display: flex; gap: 0; height: clamp(24rem, 62vh, 31rem); border-radius: 16px; overflow: hidden; background: var(--fg); }
  .path { position: relative; display: block; flex: 0 0 var(--rail); min-width: 0; border: 0; border-radius: 0; background: var(--fg); color: #fff;
    transition: flex-basis .62s cubic-bezier(.32, .72, 0, 1); }
  .path + .path { border-left: 1px solid rgba(255, 255, 255, .18); }
  .path.on { flex-basis: calc(100% - (var(--n) - 1) * var(--rail)); }
  .path::before { content: attr(data-label); position: absolute; left: 0; bottom: 1.4rem; width: var(--rail); writing-mode: vertical-rl; rotate: 180deg;
    display: flex; align-items: center; white-space: nowrap; font-family: var(--display); font-size: 1.3rem; opacity: .65; transition: opacity .4s; }
  .path.on::before { opacity: 1; }
  .path img { position: absolute; inset: 0 0 0 var(--rail); width: calc(100% - var(--rail)); height: 100%; aspect-ratio: auto; opacity: 0; transition: opacity .62s ease; }
  .path > div { position: absolute; left: var(--rail); right: 0; bottom: 0; padding: 4rem 1.75rem 1.5rem; background: linear-gradient(to top, rgba(12, 22, 18, .9), transparent);
    opacity: 0; transition: opacity .4s .15s; }
  .path.on :is(img, div) { opacity: 1; }
  .path:hover h3 { color: #fff; }
  .path .more { color: #f2c46b; }
}
@media (max-width: 47.99rem) {
  .path { position: sticky; top: calc(1rem + var(--k) * 1.1rem); box-shadow: 0 -10px 30px rgba(28, 38, 34, .14); }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hl { animation: hl-draw linear both; animation-timeline: view(); animation-range: entry 80% cover 40%; }
    /* Parallax Grid Scroll: the middle column of « La classe en concert » rises while the outer ones sink */
    @media (min-width: 40rem) {
      .grid.pgrid { grid-template-columns: repeat(3, 1fr); }
      .grid.pgrid figure { animation: sink linear both; animation-timeline: view(); animation-range: cover; }
      .grid.pgrid figure:nth-child(3n + 2) { animation-name: rise; }
    }
    /* 3D Parallax Unfurling Gallery (as on the Amati photo page): the photo wall unfolds row by row */
    .grid.unfurl { overflow-x: clip; } /* the tilted rows would otherwise widen the page on phones */
    .grid.unfurl figure { transform-origin: 50% 0; animation: unfurl linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .grid.unfurl figure:nth-child(2n) { animation-range: entry 10% entry 100%; }
  }
}
@media (prefers-reduced-motion: reduce) { .type::after { animation: none; } }
@keyframes hl-draw { from { background-size: 0% .3em; } }
@keyframes sink { from { translate: 0 -2.5rem; } to { translate: 0 2.5rem; } }
@keyframes unfurl { from { transform: perspective(1100px) rotateX(32deg) translateY(2.5rem); opacity: .15; } }
@keyframes rise { from { translate: 0 2.5rem; } to { translate: 0 -2.5rem; } }

/* Accueil : les photos de la classe défilent en fondu sur la première (aucun mouvement si l'appareil le demande) */
.hero .slides { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; }
.hero .slides img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; object-fit: cover; }
.hero .slides img + img { opacity: 0; animation: hero-slide 25s ease-in-out infinite backwards; }
.hero .slides img:nth-child(2) { animation-delay: 5s; }
.hero .slides img:nth-child(3) { animation-delay: 10s; }
.hero .slides img:nth-child(4) { animation-delay: 15s; }
.hero .slides img:nth-child(5) { animation-delay: 20s; }
@keyframes hero-slide { 0% { opacity: 0; } 5%, 20% { opacity: 1; } 25%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero .slides img + img { animation: none; } }
