/* Atmos Fest — rétrospective 2026 (maquette)
   S'ajoute à /styles.css : mêmes tokens de la charte v1.0, mêmes composants
   (en-tête, boutons, eyebrow, pied de page). Accents coucher de soleil
   réservés aux pastilles de scène (< 5 % de la surface). */

/* Longueur enregistrée : calculée là où elle est déclarée (.stages__list,
   cqw relatif à .stages__inner) puis héritée en pixels par les panneaux,
   eux-mêmes conteneurs de requête. */
@property --open-w { syntax: "<length>"; inherits: true; initial-value: 0px; }

:root {
  --nuit-800: #2A1A3E;
  --aube: #E8593C;
  --rose: #D94FA0;
  --lac: #2F94B7;
}

.section-title {
  margin: 0;
  font-weight: 800; font-size: clamp(34px, 4.4vw, 64px); line-height: .9;
  letter-spacing: -0.035em; text-transform: uppercase;
  text-wrap: balance;
}

/* ---- Première vue : photo fixe au lieu de la vidéo ---- */
.page--retro { min-height: min(100svh, 860px); }
.page--retro .backdrop { background-position: 50% 45%; }
.page--retro .title__big { font-size: clamp(96px, 15vw, 220px); }
.jump { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 6px; }
.jump a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border: 2px solid rgba(255,255,255,.5); border-radius: 999px;
  font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; transition: border-color .2s, color .2s;
}
.jump a:hover { border-color: var(--lavande); color: var(--lavande); }

/* ---- Chiffres ---- */
/* Même fond que la section Merci de la vitrine : dégradé tramé voilé de
   Lavande côté gauche pour la lisibilité, plus libre à droite. */
.stats {
  position: relative; padding: 56px var(--page-x);
  background: var(--lavande) url("/assets/img/fond-degrade.webp") 60% 30% / cover no-repeat;
}
.stats::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(198,154,255,.82) 0%, rgba(198,154,255,.6) 45%, rgba(198,154,255,.15) 90%);
}
.stats__list { position: relative; z-index: 1; }
.stats__list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1280px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.stats__list li { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--nuit); }
.stats__num { font-family: var(--font-display); font-size: clamp(44px, 5vw, 76px); line-height: .95; letter-spacing: -0.02em; }
.stats__label { font-weight: 700; font-size: 16px; line-height: 1.3; max-width: 22ch; }

/* ---- Affiche du line-up ---- */
.poster { background: var(--nuit); color: #fff; padding: 120px var(--page-x); position: relative; overflow: hidden; }
/* Empreinte sonore (wave.js) : canevas sous le contenu */
.poster__wave { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.poster__inner { position: relative; z-index: 1; }
.poster .eyebrow { color: var(--lavande); }
.poster__inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
.poster__head { display: flex; flex-direction: column; gap: 24px; }
.poster__days { display: flex; flex-direction: column; gap: 48px; }
.poster__day { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding-top: 24px; border-top: 2px solid rgba(255,255,255,.15); }
.poster__label {
  margin: 6px 0 0;
  font-weight: 700; font-size: 14px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--lavande);
}
.poster__names { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; text-transform: uppercase; }
.poster__name { line-height: 1; }
.poster__name:not(:last-child)::after { content: "·"; margin: 0 .35em; color: var(--violet-500); }
.poster__name--t1 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 52px); letter-spacing: -0.02em; }
.poster__name--t2 { font-weight: 800; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.01em; }
.poster__name--t3 { font-weight: 700; font-size: clamp(17px, 1.6vw, 22px); color: rgba(255,255,255,.8); }

/* ---- Village Intentions : mosaïque ----
   Grille de 4 colonnes ; le titre occupe une case (sans carte), les tuiles
   ont des tailles différentes, certaines avec une photo voilée en fond. */
.village { background: #fff; padding: 120px var(--page-x); }
.bento {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1280px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px; grid-auto-flow: dense;
}
.bento__head { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; gap: 24px; padding: 8px 24px 0 0; }
.bento__head p { margin: 0; }
.village__intro { max-width: 440px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; grid-row: span 2; }

.tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border: 2px solid var(--nuit); border-radius: 28px;
  background: var(--brume);
}
/* Tuiles photo : la photo seule, sans texte ni voile */
.tile--photo { padding: 0; border-color: var(--nuit); background: var(--nuit); }
.tile--photo img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.tile--acro img { object-position: 50% 35%; }
.tile--relation img { object-position: 50% 30%; }
.tile--feu img { object-position: 50% 60%; }
.tile--breath img { object-position: 50% 55%; }
.tile--cabaret img { object-position: 50% 30%; }
.tile--enfant img { object-position: 45% 45%; }

/* Mise en page calculée (bento.js, ≥ 1024 px) : la mosaïque tient dans l'écran,
   les photos gardent leur ratio, positions et tailles posées en ligne. */
@media (min-width: 1024px) {
  .village { padding-block: 48px; }
}
.bento--fit { display: block; position: relative; }
.bento--fit > * { position: absolute; }
.bento--fit .bento__head { padding: 8px 8px 0 0; overflow: hidden; }

/* ---- Les quatre scènes ----
   Desktop : quatre panneaux photo côte à côte ; celui survolé (ou focalisé,
   ou le premier par défaut) s'élargit et révèle horaires, sons et artistes. */
.stages { padding: 120px var(--page-x); }
.stages__inner { container-type: inline-size; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }
.stages__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px 72px; align-items: end; }
.stages__head p { margin: 0; }
.stages__head .eyebrow { grid-column: 1 / -1; }
.stages__intro { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }
.stages__list {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; height: clamp(540px, 76vh, 760px);
  /* Largeur de contenu d'un panneau ouvert. Le flex (base 0) ne répartit que
     l'espace restant après les 3 gouttières de 12 px et les marges intérieures
     (4 × 2 × 24 px), au prorata 2,9 / (2,9 + 3 × 1). */
  --open-w: calc((100cqw - 36px - 192px) * 2.9 / 5.9);
}
.stage--main { --dot: var(--lavande); }
.stage--signal { --dot: var(--lac); }
.stage--taverna { --dot: var(--aube); }
.stage--village { --dot: var(--rose); }
.stage {
  position: relative; isolation: isolate; overflow: hidden;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px; border-radius: 28px;
  background: var(--nuit); color: #fff; cursor: pointer;
  container-type: inline-size;
  transition: flex-grow .7s cubic-bezier(.6, 0, .2, 1);
}
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(26,16,32,.55) 0%, rgba(26,16,32,.1) 30%, rgba(26,16,32,.35) 55%, rgba(26,16,32,.92) 100%); transition: background-color .5s; }
.stage::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--dot); }
.stage__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); filter: saturate(.6); transition: transform .9s cubic-bezier(.6, 0, .2, 1), filter .6s; }
.stage:focus-visible { outline: 3px solid var(--violet-600); outline-offset: 3px; }
.stage__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stage__num { font-family: var(--font-display); font-size: 22px; color: var(--dot); }
.stage__credit { font-weight: 600; font-size: 12px; letter-spacing: .04em; color: rgba(255,255,255,.8); opacity: 0; transition: opacity .4s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__body { display: flex; flex-direction: column; gap: 10px; }
.stage__body p { margin: 0; }
.stage__name { margin: 0; font-weight: 800; font-size: clamp(26px, 11.5cqi, 84px); line-height: .88; letter-spacing: -0.035em; text-transform: uppercase; text-wrap: balance; }
.stage__tag { font-weight: 700; font-size: 17px; line-height: 1.3; }
.stage__more { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .7s cubic-bezier(.6, 0, .2, 1), opacity .4s; }
.stage__more > * { min-height: 0; overflow: hidden; }
.stage__more { gap: 0; }
.stage__stats { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.stage__stats b { font-family: var(--font-display); font-weight: 400; font-size: 28px; letter-spacing: -0.01em; color: var(--dot); margin-right: 6px; }
.stage__sound { margin-top: 10px !important; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.85); }
/* Le contenu détaillé est mis en page d'emblée à la largeur du panneau ouvert :
   pendant que le panneau s'élargit, il est simplement dévoilé, sans se replier. */
.stage__more > * { width: var(--open-w); max-width: 100%; } /* sécurité : se replie plutôt que d'être coupé */
/* Noms d'artistes en grand dès que le panneau est ouvert */
.stage__artists {
  margin-top: 14px !important; padding-top: 12px; border-top: 2px solid rgba(255,255,255,.2);
  font-weight: 800; font-size: clamp(18px, calc(var(--open-w) * .045), 30px); line-height: 1.2; letter-spacing: -0.005em; text-transform: uppercase;
}
/* Panneau ouvert : un seul à la fois. Priorité au survol, puis au focus
   clavier (ou au dernier clic), sinon le premier. */
.stages__list:has(.stage:hover) .stage:hover,
.stages__list:not(:has(.stage:hover)) .stage:focus-within,
.stages__list:not(:has(.stage:hover)):not(:focus-within) .stage:first-child { flex-grow: 2.9; }
.stages__list:has(.stage:hover) .stage:hover .stage__img,
.stages__list:not(:has(.stage:hover)) .stage:focus-within .stage__img,
.stages__list:not(:has(.stage:hover)):not(:focus-within) .stage:first-child .stage__img { transform: scale(1); filter: none; }
.stages__list:has(.stage:hover) .stage:hover :is(.stage__more, .stage__credit),
.stages__list:not(:has(.stage:hover)) .stage:focus-within :is(.stage__more, .stage__credit),
.stages__list:not(:has(.stage:hover)):not(:focus-within) .stage:first-child :is(.stage__more, .stage__credit) { opacity: 1; }
.stages__list:has(.stage:hover) .stage:hover .stage__more,
.stages__list:not(:has(.stage:hover)) .stage:focus-within .stage__more,
.stages__list:not(:has(.stage:hover)):not(:focus-within) .stage:first-child .stage__more { grid-template-rows: 1fr; transition-delay: .15s, .5s; }

/* ---- Revivre 2026 : bande défilante ----
   Sans JS : la piste défile à l'horizontale (scroll natif, aimanté).
   Avec film.js (desktop) : la section est épinglée et le scroll vertical
   fait glisser la piste ; l'horloge suit le set affiché au centre. */
.film { background: var(--nuit); color: #fff; }
.film .eyebrow { color: var(--lavande); }
.film__sticky { display: flex; flex-direction: column; gap: 32px; padding: 96px var(--page-x) 56px; }
.film__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.film__head > div { display: flex; flex-direction: column; gap: 24px; }
.film__head p { margin: 0; }
.film__clock { display: flex; align-items: baseline; gap: 14px; font-family: var(--font-display); text-transform: uppercase; }
.film__clock [data-film-day] { font-size: clamp(20px, 2vw, 28px); color: var(--lavande); }
.film__time { font-size: clamp(36px, 4.4vw, 64px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.film__track {
  list-style: none; margin: 0 calc(-1 * var(--page-x)); padding: 0 var(--page-x);
  position: relative; height: 460px;
  display: flex; align-items: center; gap: 24px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.film__track::-webkit-scrollbar { display: none; }
.film__item { flex: none; height: 100%; scroll-snap-align: center; }
.film__item--m { height: 82%; align-self: flex-start; }
.film__item--s { height: 64%; align-self: flex-end; }
.film__item figure { margin: 0; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.film__item img, .film__item video { display: block; height: calc(100% - 44px); width: auto; border-radius: 20px; background: var(--nuit-800); object-fit: cover; }
.film__item video { aspect-ratio: 16 / 9; }
/* Aftermovie : l'affiche reste en fond tant que la vidéo n'a pas d'image
   (chargement, lecture automatique bloquée), cadre Lavande comme les boutons. */
.film__item--video video {
  box-sizing: border-box; border: 3px solid var(--lavande);
  background: var(--nuit-800) url("/assets/img/video-poster-scene.webp") 50% 50% / cover no-repeat;
}
/* Aftermovie : toute la vidéo est cliquable et s'ouvre en grand, avec le son
   (/aftermovie.js). Le bouton couvre la vidéo, sans la légende. */
.film__item--video figure { position: relative; }
.film__play {
  position: absolute; left: 0; right: 0; top: 0; bottom: 44px;
  display: grid; place-items: center;
  border: 0; padding: 0; border-radius: 20px; background: transparent; color: var(--nuit); cursor: pointer;
}
.film__play[hidden] { display: none; }
.film__play-icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 999px;
  background: var(--lavande); box-shadow: 0 10px 30px rgba(26,16,32,.35);
  transition: transform .2s ease, background-color .2s ease;
}
.film__play-icon .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; margin-left: 4px; }
.film__play:hover .film__play-icon { background: #fff; transform: scale(1.06); }
.film__play:focus-visible { outline: 3px solid var(--lavande); outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .film__play-icon { transition: none; } }
.film__item figcaption { display: flex; flex-direction: column; gap: 2px; height: 34px; max-width: 100%; }
.film__item figcaption strong { font-weight: 800; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.film__item figcaption span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: rgba(255,255,255,.75); white-space: nowrap; }
.film__item figcaption span::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--dot, var(--lavande)); }
.film__item--main { --dot: var(--lavande); }
.film__item--signal { --dot: var(--lac); }
.film__item--taverna { --dot: var(--aube); }
.film__item--village { --dot: var(--rose); }
.film__day { flex: none; align-self: stretch; width: max-content; min-width: 240px; padding-right: 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-left: 24px; border-left: 2px solid rgba(255,255,255,.2); scroll-snap-align: start; }
.film__day-name { font-family: var(--font-display); font-size: 64px; line-height: .9; letter-spacing: -0.03em; text-transform: uppercase; color: var(--lavande); }
.film__day-date { font-weight: 700; font-size: 15px; letter-spacing: .18em; text-transform: uppercase; }
.film__bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; display: none; }
.film__bar span { display: block; height: 100%; background: var(--lavande); transform-origin: left; transform: scaleX(0); }
/* Mode épinglé (film.js) */
.film--pinned .film__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; padding-top: 72px; padding-bottom: 40px; }
.film--pinned .film__track { flex: 1; min-height: 0; height: auto; overflow: visible; scroll-snap-type: none; will-change: transform; }
.film--pinned .film__bar { display: block; }

/* ---- Bouton aftermovie de l'ouverture ---- */
.jump .jump__film { gap: 10px; padding: 0 22px 0 16px; border-color: var(--lavande); background: var(--lavande); color: var(--nuit); }
.jump .jump__film:hover { background: var(--brume); border-color: var(--brume); color: var(--nuit); }
.jump__film .icon { width: 18px; height: 18px; fill: currentColor; }

/* ---- Relance 2027 ---- */
/* Même fond que les chiffres, plus le monogramme AT en filigrane (repris de
   l'infolettre de la vitrine). */
.next {
  position: relative; overflow: hidden; padding: 120px var(--page-x);
  background: var(--lavande) url("/assets/img/fond-degrade.webp") 60% 30% / cover no-repeat;
}
.next::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(198,154,255,.82) 0%, rgba(198,154,255,.6) 45%, rgba(198,154,255,.15) 90%);
}
.next__watermark {
  position: absolute; right: -120px; top: -200px;
  height: 820px; width: auto;
  color: var(--nuit); opacity: .08; pointer-events: none;
}
.next__inner { position: relative; z-index: 1; }
.next__inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.next__inner p { margin: 0; }
.next__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(48px, 6.7vw, 96px); line-height: .9; letter-spacing: -0.03em; text-transform: uppercase; color: var(--nuit); }
/* REVIENT en contour seul : le dégradé du fond se voit à travers les lettres.
   Le contour déborde de moitié hors des lettres ; ATMOS reçoit le même contour
   pour que les deux mots aient exactement la même hauteur. */
.next__title { -webkit-text-stroke: 2px var(--nuit); }
.next__outline { color: transparent; }
.next__body { max-width: 560px; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.55; }
.next .btn--primary { background: var(--nuit); color: #fff; }
.next .btn--primary:hover { background: var(--violet-600); }
.footer__inner { padding-top: 64px; }

/* ---- Responsive ---- */
@media (max-width: 1023px) {
  .stats__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(200px, auto);
  }
  .bento__head { grid-row: auto; }
  .bento__head { padding: 0 0 16px; }
  .stages__head { grid-template-columns: minmax(0, 1fr); }
  .stages__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
  .stage { min-height: 460px; cursor: default; }
  .stage .stage__img { transform: none; filter: none; }
  .stage .stage__more { grid-template-rows: 1fr; opacity: 1; }
  .stage__more > * { width: auto; }
  .stage .stage__artists { font-size: 16px; line-height: 1.4; }
  .stage .stage__credit { opacity: 1; }
}
@media (max-width: 767px) {
  .page--retro .hero { padding-top: 120px; }
  .page--retro .title__big { font-size: 96px; }
  .jump a:not(.jump__film) { display: none; }
  .stats { padding: 40px var(--page-x); }
  .stats__list { gap: 24px 16px; }
  .poster, .village, .stages, .next { padding-block: 72px; }
  .film__sticky { padding-block: 72px 48px; }
  .film__track { height: 360px; gap: 14px; }
  .film__day { min-width: 0; padding-left: 16px; padding-right: 8px; }
  .film__day-name { font-size: 44px; }
  .stages__list { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 420px; padding: 20px; border-radius: 16px; }
  .poster__inner { gap: 40px; }
  .poster__day { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 10px; }
  .tile { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .jump a { transition: none; }
  .stage, .stage__img, .stage__more, .stage__credit { transition: none; }
}
