/* ──────────────────────────────────────────────────────────────────────────
   Accueil — Figma : 💻 Desktop › Accueil-dls (7453:92), maquette 1440 px.
   Les marges verticales reprennent les écarts mesurés sur la maquette.
   Couleurs, colonne, lien rouge et footer : voir base.css.
   ────────────────────────────────────────────────────────────────────────── */

/* ---- Hero : affiche plein cadre + titrage ------------------------------- */

.hero {
  position: relative;
  /* 1440 × 1494 sur la maquette : le ratio suit la largeur de l'écran. */
  aspect-ratio: 1440 / 1494;
  overflow: hidden;
}

/* L'image (1920 × 2159) est placée à (-480, -363) dans le cadre 1440 × 1494 :
   en pourcentages pour garder le même cadrage à toutes les largeurs. */
.hero__image img {
  position: absolute;
  left: -33.333%;
  top: -24.297%;
  width: 133.333%;
  max-width: none;
  height: 144.511%;
  object-fit: cover;
}

/* Fondu vers le blanc sur les 505 derniers pixels. */
.hero__image::after {
  content: "";
  position: absolute;
  inset: 66.198% 0 0 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--blanc));
}

.hero__titre {
  position: absolute;
  inset: 0;
  text-align: center;
}

.hero__titre > * {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  white-space: nowrap;
}

.hero__logo     { top: 64px; width: 38px; height: 49.2953px; }
.hero__artiste  { top: 143px; font-size: 15px; }
.hero__presente { top: 159px; font-size: 12px; font-style: italic; }
.hero__spectacle{ top: 180px; font-size: 18px; }
.hero__genre    { top: 209px; font-size: 12px; font-style: italic; }

/* ---- Teaser : remonte de 301 px sur le fondu du hero -------------------- */

.teaser {
  position: relative;
  margin-top: calc(-301 / 1440 * 100vw);
}

/* Lien vers YouTube : js/mouvement.js l'ouvre dans le lecteur ci-dessous. */
.teaser__lecture {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1114 / 707;
  background: var(--noir);
  cursor: pointer;
}

.teaser__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teaser__voile {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .2);
  transition: background-color 220ms ease;
}

/* Boîte de 88 px ; le SVG (91 px, contour compris) déborde de 1,7 %. */
.teaser__bouton {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  translate: -50% -50%;
  transition: scale 220ms ease;
}

.teaser__bouton img {
  position: absolute;
  inset: -1.7%;
}

.teaser__lecture:hover .teaser__voile { background-color: rgba(0, 0, 0, .35); }
.teaser__lecture:hover .teaser__bouton { scale: 1.08; }

/* ---- Lecteur vidéo (teaser) ---------------------------------------------
   <dialog> natif : Échap, piège du focus et retour du focus sont gérés par
   le navigateur. Ouverture / fermeture en fondu, en CSS (@starting-style).  */

.video {
  width: min(var(--colonne), 100vw - 2 * var(--gouttiere));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  opacity: 0;
  transition:
    opacity 500ms ease,
    overlay 500ms allow-discrete,
    display 500ms allow-discrete;
}

.video[open] { opacity: 1; }

.video::backdrop {
  background: rgba(0, 0, 0, 0);
  transition:
    background-color 500ms ease,
    overlay 500ms allow-discrete,
    display 500ms allow-discrete;
}

.video[open]::backdrop { background: rgba(0, 0, 0, .92); }

.video__cadre {
  aspect-ratio: 16 / 9;
  background: var(--noir);
  scale: .96;
  transition: scale 800ms var(--ease-sortie);
}

.video[open] .video__cadre { scale: 1; }

@starting-style {
  .video[open] { opacity: 0; }
  .video[open]::backdrop { background: rgba(0, 0, 0, 0); }
  .video[open] .video__cadre { scale: .96; }
}

.video__cadre iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: auto;      /* Lenis coupe les iframes pendant le défilement */
}

.video__fermer {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--blanc);
  font: italic 18px var(--police);
  cursor: pointer;
}

/* ---- Présentation ------------------------------------------------------- */

.presentation {
  margin-top: 94px;
  color: var(--encre);
}

/* Le titre déborde de la colonne de texte de 547 px, comme sur la maquette. */
.presentation > :not(.presentation__titre) { max-width: 547px; }

.presentation__titre {
  font-size: 42px;
  color: var(--noir);
}

.presentation__sous-titre {
  margin-top: 14px;
  font-size: 22px;
  font-style: italic;
}

.presentation__meta {
  margin-top: 14px;
  font-size: 18px;
  font-style: italic;
}

.presentation__influences {
  margin-top: 9px;
  font-size: 18px;
  color: var(--encre-influences);
  text-align: justify;
}

.presentation__influences strong { font-weight: 700; }

.presentation__synopsis {
  margin-top: 14px;
  font-size: 22px;
  text-align: justify;
}

.presentation__lien { margin-top: 18px; }   /* + .lien-rouge (base.css) */

/* ---- Images du film ----------------------------------------------------- */

.plans { margin-top: 73px; }

/* Le cadre coupe l'image, qui glisse dedans au défilement (parallaxe). */
.plan { overflow: hidden; }
.plan img { width: 100%; height: 100%; object-fit: cover; }
.plan--01 { aspect-ratio: 1115 / 622; }
.plan--02 { aspect-ratio: 1118 / 672; margin-top: 32px; }
.plan--03 { aspect-ratio: 1106 / 617; margin-top: 23px; }

/* ---- Le film / la musique : deux colonnes de 547 px --------------------- */

.experience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 101px;
  font-size: 22px;
  color: var(--encre);
  text-align: justify;
}

.experience strong { font-weight: 700; }

/* ---- Citation ----------------------------------------------------------- */

.citation {
  width: min(882px, 100% - 2 * var(--gouttiere));
  margin: 125px auto 0;
  font-size: 42px;
  font-style: italic;
  color: var(--encre-citation);
  text-align: center;
}

/* Lien vers la Genèse : la citation parle justement de ce projet né en 2017. */
.citation__suite {
  margin-top: 56px;
  padding-bottom: 143px;
  text-align: center;
}

/* ---- Écrans étroits ----------------------------------------------------- */

@media (max-width: 900px) {
  .presentation__titre { font-size: 32px; }
  .presentation__sous-titre,
  .presentation__synopsis,
  .experience { font-size: 19px; }
  .experience { grid-template-columns: 1fr; gap: 24px; margin-top: 64px; }
  .citation { font-size: 28px; margin-top: 80px; }
  .citation__suite { margin-top: 40px; padding-bottom: 96px; }
}

/* Entête mobile : pas de maquette. Le cadrage au ratio 1440 × 1494 réduisait
   l'affiche à une bande sous le titrage ; ici elle devient une affiche
   plein écran, cadrée sur les mains, titrage dans le voile clair du haut.
   Le haut du teaser dépasse en bas d'écran pour inviter à défiler. */
@media (max-width: 720px) {
  .hero {
    aspect-ratio: auto;
    height: 88svh;
    min-height: 560px;
  }

  .hero__image img {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-position: 85% 50%;
  }

  .hero__image::after { inset: 72% 0 0 0; }

  /* Voile clair derrière le titrage : la dernière ligne touche le bout des doigts. */
  .hero__image::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 50%;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .55) 35%, rgba(255, 255, 255, 0));
  }

  .hero__titre {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px var(--gouttiere) 0;
  }

  .hero__titre > * {
    position: static;
    translate: none;
    white-space: normal;
  }

  .hero__logo      { margin-bottom: 20px; }
  .hero__presente  { margin-top: 2px; }
  .hero__spectacle {
    margin-top: 14px;
    font-size: 30px;
    line-height: 1.12;
    text-wrap: balance;
  }
  .hero__genre     { margin-top: 10px; font-size: 14px; }

  .teaser { margin-top: -64px; }
}

@media (max-width: 600px) {
  .teaser__bouton { width: 64px; height: 64px; }
  .presentation__meta { font-size: 16px; }
  .presentation__influences { font-size: 16px; text-align: left; }
  .presentation__synopsis,
  .experience { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .teaser__voile,
  .teaser__bouton,
  .video,
  .video::backdrop,
  .video__cadre { transition: none; }
}
