/* =========================================
= COMPOSANT — HOME STORY (.nl-home-story)
= Section « Atelier » de l'accueil, split-screen : photo + texte | vidéo.
= Markup : home-story.php · JS : assets/js/home-story.js (reveal au scroll)
= (Ex home-video.css — fichier mal nommé, renommé avec l'extraction du composant.)
========================================= */
.nl-home-story {
  display: grid;
  grid-template-columns: 1fr 1fr; /* photo | vidéo */
  min-height: calc(100vh - 5rem);
}

/* -----------------------------------------
   Volet gauche : photo + texte (titre en haut, texte en bas)
----------------------------------------- */
.nl-home-story--photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--primary);
}
.nl-home-story--photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Voile sombre pour la lisibilité du texte par-dessus la photo */
.nl-home-story--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
}
.nl-home-story--photo-text {
  position: relative; /* au-dessus du voile */
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* titre en haut, texte en bas */
  gap: 1rem;
  padding: 2.5rem;
  box-sizing: border-box;
  color: var(--secondary);
}

/* -----------------------------------------
   Volet droit : vidéo
----------------------------------------- */
.nl-home-story--wrap {
  position: relative;
  background: var(--primary);
  overflow: hidden;
}
.nl-home-story--media {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* -----------------------------------------
   Textes (posés sur la photo)
----------------------------------------- */
.nl-home-story--title {
  margin: 0;
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: var(--text-display-sm);
  letter-spacing: var(--ls-wide);
}
.nl-home-story--text {
  margin: 0;
  color: var(--secondary);
  font-family: var(--SR);
  font-size: var(--text-base);
  max-width: 40ch;
}

/* -----------------------------------------
   Mobile : empilé (photo puis vidéo), volets en portrait
----------------------------------------- */
@media (max-width: 48rem) {
  .nl-home-story { grid-template-columns: 1fr; }
  .nl-home-story--photo { aspect-ratio: 4 / 5; }
  .nl-home-story--wrap  { aspect-ratio: 3 / 4; }
  .nl-home-story--photo-text { padding: 1.75rem; }
}

/* Reveal au scroll (home-story.js) : volets + texte masqués AVANT le JS,
   uniquement si scripting actif ET animations autorisées → aucun flash.
   Sans JS / GSAP absent / reduced-motion → visible (le JS révèle en fallback). */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .nl-home-story--photo,
  .nl-home-story--wrap,
  .nl-home-story--title,
  .nl-home-story--text { opacity: 0; }
}
