/* Piles de cartes et titres de section : règles reprises telles quelles de la page montage
   (css/base.css Codrops + finalhook-theme.css). */
.section-title {
  width: 100%;
  display: grid;
  place-items: center;
  font-size: clamp(2rem,6vw,6rem);
  line-height: 1;
  font-weight: 400;
  margin: 25vh auto 0;
  max-width: 600px;
  text-align: center;
  text-transform: uppercase;
}

.wrap {
  position: relative;
  min-height: 100vh;
}

.wrap__inner {
  position: relative;
  perspective: 1000px;
}

.content {
  width: 100vw;
  position: relative;
  transform-style: preserve-3d;
  display: grid;
  grid-template-areas: 'card';
  grid-template-columns: 100%;
  place-items: center;
}

.content .card {
  grid-area: card;
  background: rgba(132, 128, 143, 0.36);
}
.intro__title, .section-title, .outro__title {
  font-family: 'League Gothic', sans-serif;
  font-weight: 400;
  letter-spacing: .005em;
  text-shadow: 0 4px 28px rgba(0,0,0,.4);
}
.content .card { background: rgba(132,128,143,.36); }
.section-title { max-width: 920px; padding: 0 24px; font-size: clamp(38px, 5.8vw, 76px); line-height: 1; margin-top: var(--section-gap); }
/* Image-only grid identical to Codrops. Captions are outside grid flow:
   the 4 original auto rows, the image proportions and the 3D silhouette stay intact. */
.content .card { color: #fff; text-decoration: none; }
.content .card:hover { color: #fff; text-decoration: none; }
.content .card__img { position: relative; overflow: hidden; }
.content .card__caption {
  position: absolute; left: 5px; right: 5px; top: calc(75% - 5px); bottom: 5px;
  padding: 6px 7px; background: transparent; color: #fff;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
  text-align: left; text-transform: none;
}
.content .source-brand {
  color: #fff; font: 500 8px/10px 'Geist', sans-serif;
  letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 0;
}
.content .card__title {
  font: 400 18px/1.05 'League Gothic', sans-serif;
  padding: 0; margin: 0; background: transparent;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; flex-shrink: 0;
}
.content .card__subtitle {
  padding: 0; margin: 0; color: #fff; background: transparent;
  font: 400 8px/1.2 'Geist', sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0;
}
.content .caption-link { margin-top: auto; font: 400 7px/1.2 'Geist', sans-serif; color: #fff; flex-shrink: 0; }
.play-symbol { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 42px; height: 30px; background: #d63730e8; color: #fff; border-radius: 7px; font-size: 13px; padding-left: 2px; }
@media(max-width:600px) {
 .section-title { font-size: clamp(35px,8.7vw,49px); padding: 0 18px; }
 .content .card { width: 30vw; min-width: 150px; max-width: 255px; }
 .content .card__caption { padding: 4px; gap: 2px; }
 .content .source-brand { font-size: 6.5px; line-height: 8px; }
 .content .card__title { font-size: 12px; line-height: 1; }
 .content .card__subtitle { font-size: 7px; line-height: 1; }
}
:root { --section-gap: 12vh; --stack-pull: 35vh; }
.section-title { position: relative; z-index: 2; }
.section-title + .wrap { margin-top: calc(-1 * var(--stack-pull)); }
@media (max-width: 600px) { :root { --section-gap: 6vh; --stack-pull: 30vh; } }

/* Safari : dans les piles, l'image gardait son carré (aspect-ratio 1) au lieu de s'étirer
   comme dans Chrome, et devenait une petite vignette en haut de la carte.
   Hauteur explicite = celle que Chrome calcule (largeur intérieure + un quart de la place restante),
   donc rendu identique dans les deux navigateurs. */
.content .card__img {
  aspect-ratio: auto; width: 100%; min-height: 0;
  height: calc(1.125 * clamp(150px, 30vw, 255px) - 10px);
}

/* Mobile : les retours à la ligne forcés laissaient un mot seul (« SCRIPT, », « CONTEXTE, »).
   Sous 600 px, les titres de section coulent librement. */
@media (max-width: 600px) {
  .section-title br { display: none; }
  .section-title { text-wrap: balance; }
}

/* Mobile : la zone de chaque pile n'avait pas la hauteur d'écran qu'elle a sur ordinateur
   (règle d'origine réservée aux écrans ≥ 53em). Les cartes tournaient donc trop haut et
   sortaient par le haut de l'écran. Même boîte centrée qu'en version ordinateur. */
@media (max-width: 52.99em) {
  .content { min-height: 100vh; min-height: 100svh; align-items: center; }
}
@media screen and (min-width: 53em) { .content { min-height: 100vh; justify-content: center; align-items: center; } }
/* Passerelle « Un exemple » (identique à la page montage). */
.script-context { width: min(700px, 88vw); margin: 14vh auto 0; padding: 22px 0; text-align: center; position: relative; }
.eyebrow { font-size: 9px; letter-spacing: .17em; line-height: 1.7; color: #8f988d; text-transform: uppercase; font-weight: 500; }
.script-context__text { position: relative; font: italic 400 clamp(25px, 3vw, 38px)/1.2 'Cormorant Garamond', serif; color: #eeebe5; margin: 28px 0 18px; }
.line-number { display: block; font: 400 12px 'Geist', sans-serif; letter-spacing: .1em; color: #cc9933; margin-bottom: 12px; }
.context-note { font-size: 10px; color: #8f988d; line-height: 1.7; }
.drawn-arrow { display: block; font: 500 42px 'Caveat'; color: #cc9933; margin-top: 30px; }
@media(max-width:600px){
 .script-context { margin-top: 7vh; }.script-context__text { font-size: 28px; }
}
