/* Habillage uniquement. Les géométries et animations restent celles de Codrops. */
:root {
  --section-gap: 23vh;
  --color-text: #eeebe5;
  --color-bg: #141414;
  --color-link: #bac4b8;
  --color-link-hover: #00a8a9;
  --color-card-1: #bac4b8;
  --color-card-2: #00a8a9;
  --color-card-3: #8f988d;
  --color-card-4: #bac4b8;
  --color-card-5: #00a8a9;
  --color-card-6: #8f988d;
  --color-bg-card: rgba(186, 196, 184, .12);
  --color-bg-card-inner: #1b1e1d;
}
body {
  font-family: 'Geist', sans-serif;
  background-image: none;
  isolation: isolate;
}
main { position: relative; z-index: 1; }
.fh-background { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: #141414; }
.fh-background canvas { display: block; width: 100%; height: 100%; opacity: .65; }
.fh-background::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 48%, rgba(20,20,20,.14), transparent 68%),
              linear-gradient(180deg, rgba(20,20,20,.15), transparent 30%, rgba(20,20,20,.2));
}
.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);
}
.intro__hint, .credits {
  font-family: 'Caveat', cursive;
  color: #bac4b8;
}
.intro__hint::after { font-family: 'Geist', sans-serif; color: #00a8a9; }
.frame { color: #bac4b8; }
.card__title { font-family: 'League Gothic', sans-serif; font-weight: 400; }
.card__subtitle { font-family: 'Geist', sans-serif; font-weight: 500; }
.card__description { color: #bac4b8; }
.content .card { background: rgba(132,128,143,.36); }
.card--rel .card__title { font-family: 'Geist', sans-serif; }
::selection { color: #141414; background: #bac4b8; }
a:focus-visible { outline-color: #00a8a9; }

/* Contenu montage : même géométrie de cartes et mêmes trois piles Codrops. */
html { overflow-x: clip; scroll-padding-top: 96px; }
.fh-background { inset: -40vh 0; }
.fh-background canvas { height: 100%; opacity: .45; }
.fh-nav.frame { position: fixed; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: auto; padding: 22px 32px 30px; background: linear-gradient(#141414ed, #141414aa 60%, transparent); }
.fh-nav a { text-decoration: none; }
.fh-logo { display: inline-flex; align-items: baseline; color: #eeebe5; text-decoration: none; white-space: nowrap; line-height: 1; }
.fh-logo .lf { font: 500 38px/.9 'Caveat', cursive; color: #cc9933; transform: rotate(-7deg); }
.fh-logo .lh { font: 400 37px/.9 'League Gothic', sans-serif; text-transform: uppercase; margin-left: 2px; }
.fh-nav nav, .fh-account { display: flex; align-items: center; gap: 26px; pointer-events: auto; }
.fh-nav nav a, .fh-account a { font-size: 11px; letter-spacing: .055em; }
.fh-nav nav a { position: relative; padding: 6px 0; }
.fh-nav nav a::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: #00a8a9; transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.fh-nav nav a:hover::after, .fh-nav nav a.is-current::after { transform: scaleX(1); }
.fh-account .fh-signup { border: 1px solid #bac4b84a; padding: 11px 14px; color: #eeebe5; }
.fh-signup span { margin-left: 10px; color: #00a8a9; }
.intro__title { font-size: clamp(48px, 8.2vw, 112px); line-height: .94; width: min(94vw, 1050px); text-shadow: 0 2px 15px #141414, 0 8px 55px #141414; }
.intro__hint { font-size: clamp(24px, 2.7vw, 35px); text-shadow: 0 2px 14px #141414; }
.grid { gap: 3rem; }
.script-card, .result-card, .stock-card { text-transform: none; }
.script-card { grid-template-columns: 1fr 65px; grid-template-rows: minmax(0,1fr) auto auto auto; }
.script-card .card__img { position: relative; min-height: 0; aspect-ratio: auto; overflow: hidden; }
.script-file { position: absolute; left: 9px; top: 9px; font-size: 7px; letter-spacing: .14em; color: #eeebe5; background: #14141488; padding: 5px 7px; border: 1px solid #eeebe526; }
.script-card .card__title { font-size: 21px; line-height: 1; padding: 10px 5px 7px; }
.script-card .card__meta { font-size: 7px; align-self: start; padding: 12px 4px 6px; color: #8f988d; }
.script-card .card__subtitle { padding: 0 5px 5px; font-size: 8px; color: #bac4b8; font-weight: 400; }
.script-card .card__subtitle span { color: #8f988d; }
.script-card .card__description { font-size: 9px; line-height: 1.5; padding: 0 5px 9px; }
.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: #00a8a9; margin-bottom: 12px; }
.context-note { font-size: 10px; color: #8f988d; line-height: 1.7; }
.drawn-arrow { display: block; font: 500 42px 'Caveat'; color: #00a8a9; margin-top: 30px; }
.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; }
.more-features { position: relative; margin: var(--section-gap) auto 0; width: min(1100px,90vw); text-align: center; }
.more-features > .eyebrow, .outro > .eyebrow { position: absolute; bottom: calc(100% + 18px); left: 0; right: 0; margin: 0; }
.more-features .section-title { margin: 0 auto 65px; font-size: clamp(60px,8vw,100px); }
.try-link { display: inline-flex; gap: 35px; align-items: center; border-bottom: 1px solid #00a8a9; padding: 16px 0; margin-top: 60px; font-size: 12px; text-decoration: none; }
.try-link span { color: #00a8a9; font-size: 19px; transition: transform .25s; }
.try-link:hover { text-decoration: none; }
.try-link:hover span { transform: translate(3px,-3px); }
.outro { position: relative; margin: var(--section-gap) 0 15vh; }
.outro__title { font-size: clamp(56px,7vw,90px); margin: 0; text-transform: uppercase; }
.mode-card, .feature { display: block; text-align: left; padding: 8px 8px 28px; border: 1px solid #bac4b836; border-radius: 10px; background: #1b1e1de8; color: #eeebe5; text-decoration: none; width: 100%; transition: border-color .3s; }
.mode-visual, .feature-visual { height: 290px; background: #242a27; position: relative; overflow: hidden; border-radius: 5px; }
.mode-label, .feature-number { margin: 24px 20px 16px; font-size: 9px; letter-spacing: .1em; }
.fh-footer { width: min(1100px,90vw); margin: 0 auto; padding: 40px 0 50px; border-top: 1px solid #bac4b82b; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.fh-footer p { font-size: 8px; color: #8f988d; flex: 1; margin: 0; line-height: 1.7; }
.fh-footer nav { display: flex; gap: 15px; font-size: 8px; }.fh-footer a { text-decoration: none; }
.fh-footer small { width: 100%; color: #626b60; font-size: 7px; }
@media(max-width:850px) {
 .fh-nav.frame { padding: 17px 20px 25px; gap: 16px; flex-wrap: wrap; }
 .fh-nav nav { gap: 19px; order: 3; width: 100%; justify-content: center; }
 .fh-account { margin-left: auto; gap: 16px; }
 .fh-nav nav a, .fh-account a { font-size: 10px; }
}
@media(max-width:600px) {
 :root { --section-gap: 16vh; }
 .fh-nav.frame { gap: 10px; padding: 16px 18px 20px; }
 .fh-nav .fh-logo .lf, .fh-nav .fh-logo .lh { font-size: 32px; }
 .fh-account { gap: 10px; }
 .fh-account a { font-size: 9px; letter-spacing: .01em; }
 .fh-account .fh-signup { padding: 9px; }
 .intro { padding-top: 90px; }.intro__title { font-size: clamp(43px,10vw,64px); width: 94vw; }
 .intro__hint { font-size: 26px; }
 .grid { gap: 1.2rem; }.card { min-width: 0; width: 29vw; }
 .script-card { grid-template-columns: 1fr; grid-template-areas: 'card-img' 'card-title' 'card-meta' 'card-subtitle' 'card-desc'; }
 .script-card .card__title { font-size: 15px; padding: 6px 4px 4px; }
 .script-card .card__meta { padding: 0 4px 3px; font-size: 6px; text-align: left; }
 .script-card .card__subtitle { padding: 0 4px 4px; font-size: 6px; }.script-card .card__subtitle span { display: none; }
 .script-card .card__description { font-size: 7px; line-height: 1.4; padding: 0 4px 6px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
 .script-file { font-size: 5px; padding: 3px; top: 5px; left: 5px; }
 .script-context { margin-top: 7vh; }.script-context__text { font-size: 28px; }
 .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; }
 .content .caption-link { display: none; }
 .fh-footer { align-items: flex-start; }.fh-footer p { flex-basis: 60%; }.fh-footer nav { width: 100%; }
}
@media(prefers-reduced-motion:reduce) {
 .intro__hint::after { animation: none; }
}

/* Cartes de fin : dimensions et matière exactes de .card--rel dans Codrops. */
.final-card.card--rel {
  width: 30vw;
  min-width: 150px;
  max-width: 255px;
  aspect-ratio: 2 / 3;
  padding: 5px;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  --color-card: #d09df2;
}
.final-card.card--rel:nth-child(2n) { --color-card: #9df2eb; }
.final-card.card--rel:nth-child(3n) { --color-card: #f5e2a4; }
.final-card.card--rel.final-feature { --color-card: #00A8A9; }
.final-card .card__img { position: relative; overflow: hidden; }
.final-card .card__title { font-family: 'Geist', sans-serif; }
.feature-cards.card-wrap { margin: 0 auto; justify-content: center; }
.related-original.card-wrap { margin-top: 5vh; }
@media (min-width: 53em) and (max-width: 999px) {
  .feature-cards > .final-card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .feature-cards.card-wrap { grid-template-columns: repeat(3,300px); }
}

/* Text-only cards: one compact, equal format, no empty image slot. */
.final-feature.card--rel {
  display: flex; flex-direction: column; justify-content: center;
  aspect-ratio: auto; height: 245px; padding: 25px;
  gap: 19px; text-align: left;
}
.final-feature .typographic-index {
  margin: 0; background: none; color: #00A8A9;
  font: 400 10px/1 'Geist', sans-serif; letter-spacing: .16em;
}
.final-feature .card__title {
  padding: 0; margin: 0; background: none;
  font: 400 32px/1.02 'League Gothic', sans-serif;
  text-transform: uppercase; text-align: left;
}
/* Original Codrops related cards: original markup and base.css own the layout.
   Only FinalHook type, content/images and previously approved mode accents differ.
   Transparent drawings sit on black, like the dark thumbnails in the example. */
.related-original { --color-bg-card-inner: #000; --color-link: #fff; --color-link-hover: #c471e1; }
.related-original .card { width: 30vw; min-width: 150px; max-width: 255px; }
.related-original .final-mode-writing { --color-card: #CC9933; }
.related-original .final-mode-podcast { --color-card: #AE75E6; }
@media(max-width:600px) {
  .final-feature.card--rel { width: 255px; padding: 25px; }
}

/* Troisième carrousel : le titre garde sa place ; la pile et son déclencheur descendent ensemble. */
.content--3 { top: clamp(24px, 5vh, 48px); }
[data-stack-3] { top: clamp(64px, 12vh, 112px); }

/* Local charcoal veil: inside the title stacking context, above the cards,
   below the letters. No layout change and no influence on the background canvas. */
.intro__title::before {
  content: ''; position: absolute; inset: -.45em -.55em;
  z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(20,20,20,.83) 0%, rgba(20,20,20,.70) 38%,
    rgba(20,20,20,.29) 63%, rgba(20,20,20,0) 80%);
  filter: blur(10px);
}

/* Only the text area of the two mode cards is rebalanced.
   Image size stays 4:3; original outer size, surface, radius and outlines remain. */
.related-original .final-mode {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: 'card-img' 'mode-copy';
}
.related-original .mode-copy {
  grid-area: mode-copy; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px 16px; background: none;
  color: #eeebe5; text-align: center; text-decoration: none;
}
.related-original .mode-name {
  margin: 0; padding: 0; color: var(--color-card);
  font: 500 20px/1.2 'Geist', sans-serif; letter-spacing: -.025em;
  text-transform: none;
}
.related-original .mode-description {
  margin: 0; padding: 0; min-height: 3em;
  color: #eeebe5cf; font: 400 14px/1.5 'Geist', sans-serif;
  text-transform: none; transition: color .2s;
}
.related-original .mode-copy:hover .mode-name {
  text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px;
}
.related-original .mode-copy:hover .mode-description { color: #eeebe5; }
.related-original .mode-copy:focus-visible { outline-color: var(--color-card); }
@media(max-width:600px) {
  .related-original .mode-copy { padding: 10px 8px; gap: 8px; }
  .related-original .mode-name { font-size: 16px; }
  .related-original .mode-description { font-size: 11px; line-height: 1.45; min-height: 4.35em; }
}

/* ── Corrections du 17/10 : navigation, boutons d'action, texte des trois cartes ── */
:root {
  --fh-bg: #141414;
  --fh-paper: #eeebe5;
  --fh-sage: #bac4b8;
  --fh-sage-2: #8f988d;
  --fh-line: rgba(186,196,184,.16);
  --fh-accent: #00a8a9;
  --fh-ease: cubic-bezier(.16,1,.3,1);
}

/* Navigation : fond charbon plein (plus de dégradé), libellés en capitales espacées ≥ 12,5 px.
   Ce qui défile passe proprement dessous au lieu de se mêler aux liens. */
.fh-nav.frame { padding: 16px 32px; background: var(--fh-bg); border-bottom: 1px solid var(--fh-line); }
.fh-nav nav { gap: 32px; }
.fh-account { gap: 24px; }
.fh-nav nav a, .fh-account a { font: 500 12.5px/1 'Geist', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.fh-nav nav a { padding: 8px 0; }
.fh-nav nav a::after { background: var(--fh-accent); transition: transform .6s var(--fh-ease); }
.fh-account .fh-signup { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border: 1px solid var(--fh-line); color: var(--fh-paper); }
.fh-signup span { margin-left: 12px; color: var(--fh-accent); }
.fh-nav a:focus-visible, .fh-btn:focus-visible { outline: 1px solid var(--fh-sage); outline-offset: 3px; }

/* Bouton principal (.fh-btn) : fond accent, texte charbon, angles droits, lettres qui roulent. */
.fh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 52px; padding: 0 24px;
  background: var(--fh-accent); color: var(--fh-bg);
  font: 500 13px/1 'Geist', sans-serif; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border-radius: 0; white-space: nowrap;
  transition: transform .15s var(--fh-ease);
}
.fh-btn:hover, .fh-btn:focus-visible { color: var(--fh-bg); text-decoration: none; }
.fh-btn:active { transform: scale(.97); }
.fh-btn .roll { display: inline-block; height: 1.2em; overflow: hidden; line-height: 1.2em; }
.fh-btn .roll__a, .fh-btn .roll__b { display: block; }
.fh-btn .roll span span { display: inline-block; transition: transform .6s var(--fh-ease); transition-delay: calc(var(--i) * 18ms); }
.fh-btn__arrow { font-size: 16px; transition: transform .6s var(--fh-ease); }
@media (hover: hover) {
  .fh-btn:hover .roll span span { transform: translateY(-100%); }
  .fh-btn:hover .fh-btn__arrow { transform: translate(2px,-2px); }
}

/* Accueil : la phrase manuscrite reste, le bouton vient juste dessous, le chevron sous le bouton. */
.intro__hint { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.intro__hint p { margin: 0; }
.intro__hint::after { top: calc(100% + 8px); }
.intro__hint .fh-btn { text-shadow: none; }

/* Fin de la présentation : même bouton à la place de l'ancien lien souligné. */
.feature-cta { margin-top: 48px; }

/* Trois cartes « Mais aussi » : une ligne d'explication sous chaque titre. */
.final-feature.card--rel { height: auto; min-height: 245px; gap: 16px; justify-content: flex-start; padding-top: 32px; }
.final-feature__text { margin: 0; padding: 0; background: none; font: 400 14px/1.5 'Geist', sans-serif; color: var(--fh-sage); text-transform: none; text-align: left; }

@media (max-width: 850px) {
  .fh-nav.frame { padding: 12px 16px; gap: 12px 16px; }
  .fh-nav nav { gap: 24px; }
  .fh-account { gap: 16px; }
  .fh-nav nav a, .fh-account a { font-size: 12.5px; }
}
@media (max-width: 600px) {
  /* Logo et compte tiennent sur une ligne : les deux liens du compte repassent en casse normale. */
  .fh-nav .fh-logo .lf, .fh-nav .fh-logo .lh { font-size: 28px; }
  .fh-account { gap: 12px; }
  .fh-account a { font-size: 13px; letter-spacing: 0; text-transform: none; }
  .fh-account .fh-signup { height: 44px; padding: 0 12px; }
  .intro { padding-top: 128px; }
  .fh-signup span { display: none; }
  .fh-btn { height: 52px; padding: 0 16px; }
  .final-feature.card--rel { width: min(320px, 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .fh-btn, .fh-btn .roll span span, .fh-btn__arrow, .fh-nav nav a::after { transition: none; }
}

/* Moins de vide entre les trois piles. Le mouvement des cartes n'est pas modifié :
   chaque pile démarre plus tôt (sa zone remonte sous son titre) et l'écart entre sections se resserre.
   Les titres restent au-dessus des cartes pour rester lisibles. */
: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; }
}
