/* Accueil : le contour d'un monde se dessine au fil du défilement [2026-07-15].
   Le tracé PORTE UN SENS, il ne décore pas : un contour qui va jusqu'au bout = aventure
   disponible ; un contour qui s'interrompt = monde en cours d'écriture. C'est l'effet
   lui-même qui annonce le catalogue à venir, sans bouton grisé.

   Tout est préfixé `tr-` : style.css a déjà `.etape` (frise du suivi) et `.etapes`
   (« comment ça marche »), et une collision de nom saccagerait les deux pages.
   Ce fichier ne charge QUE sur index.html, après style.css, dont il reprend les tokens. */

:root {
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
}

/* l'accueil sort du gabarit : la scène est plein écran, pas dans le conteneur 720 px */
body.accueil {
  padding: 0;
}

.tr-voile {  /* halo de lanterne : la nuit n'est jamais uniforme */
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(120% 80% at 50% 42%, #16233a 0%, rgba(7, 13, 22, 0) 62%);
}

/* l'accroche tient sur UN écran, sans course : elle n'a rien à tracer au défilement,
   elle pose le nom et la promesse. Les mondes viennent après, et se méritent. */
.tr-hero {
  position: relative;
  height: 100vh;
  z-index: 1;
}

.tr-horizon {
  width: min(60vw, 22rem);
  height: auto;
  margin-top: 1rem;
  flex: 0 0 auto;
}

.tr-horizon .tr-trait {
  fill: none;
  stroke: var(--titre);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.72;
  vector-effect: non-scaling-stroke;
}

/* la section est HAUTE : c'est sa hauteur qui donne au tracé sa course de défilement */
.tr-monde {
  position: relative;
  height: 280vh;
  z-index: 1;
}

.tr-scene {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vh, 1.5rem);
  padding: 4vh 1.25rem;
}

/* seule l'accroche porte « faites défiler » (posé en absolu) : c'est elle qui lui
   réserve sa place, sinon le repère vient buter dans le propos [2026-07-15] */
.tr-hero .tr-scene {
  padding-bottom: 13vh;
}

.tr-dessin {
  width: min(76vw, 40vh);
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.tr-dessin .tr-trait,
.tr-dessin .tr-cadre {
  fill: none;
  stroke: var(--titre);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* le cadre et les détails restent en retrait : le sujet doit dominer */
.tr-dessin .tr-fin,
.tr-dessin .tr-cadre {
  stroke-width: 1.2;
  opacity: 0.72;
}

.tr-propos {
  text-align: center;
  max-width: 34rem;
  opacity: 0;
  transform: translateY(0.6rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.tr-propos.visible {
  opacity: 1;
  transform: none;
}

.tr-sur-titre {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--or);
  margin: 0 0 0.65rem;
}

.tr-monde-a-venir .tr-sur-titre {
  color: var(--texte-doux);
}

.tr-propos h1,
.tr-propos h2 {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
  margin: 0 0 0.7rem;
  line-height: 1.12;
  text-align: center;
}

/* l'accroche et le monde OUVERT portent la même voix pleine ; le monde à venir reste en
   retrait (brume) — sa typo dit déjà qu'il n'est pas encore là.
   `.tr-propos .tr-titre-monde` (deux classes) doit l'emporter sur `.tr-propos h2` (classe
   + élément) : à spécificité égale, c'est l'ordre qui trancherait, et le titre du navire
   se retrouverait en brume comme la licorne. */
.tr-propos h1,
.tr-propos .tr-titre-monde {
  color: var(--titre);
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
}

.tr-propos h2 {
  color: var(--texte-doux);
  font-size: clamp(1.5rem, 4vw, 2.3rem);
}

.tr-propos p {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--texte-doux);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.65;
}

.tr-propos .bouton {
  margin-top: 1.5rem;
}

.tr-indice {
  position: absolute;
  bottom: 4vh;
  left: 50%;
  transform: translateX(-50%);
  color: var(--texte-doux);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.4s ease;
}

.tr-indice svg {
  width: 18px;
  height: 10px;
  stroke: var(--or);
  fill: none;
  stroke-width: 2;
}

/* le bandeau de reprise flotte au-dessus de la scène : il doit rester trouvable
   même quand on est au milieu d'un tracé */
.tr-reprise {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--bordure);
  border-radius: 0;
  background: rgba(16, 27, 44, 0.92);
  backdrop-filter: blur(6px);
  padding: 0.7rem 1.25rem;
  justify-content: center;
  font-size: 0.92rem;
}

/* le pied revient dans le gabarit du site : on quitte l'immersion pour l'information */
.tr-pied {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--bordure);
  background: var(--fond);
  padding: 3.5rem 1.25rem 4rem;
}

/* écrans étroits : le dessin cède la place au propos. Le haut est réservé au bandeau de
   reprise (posé en fixe), qui sinon rogne le sommet du tracé [vu au navigateur 2026-07-15] */
@media (max-width: 620px) {
  .tr-dessin {
    width: min(70vw, 30vh);
  }
  .tr-scene {
    padding: 10vh 1.25rem 4vh;   /* le haut esquive le bandeau de reprise (posé en fixe) */
  }
  .tr-hero .tr-scene {
    padding-bottom: 11vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-propos {
    opacity: 1;
    transform: none;
    transition: none;
  }
  /* sans défilement animé, les sections n'ont plus besoin de leur course */
  .tr-monde,
  .tr-hero {
    height: auto;
  }
  .tr-scene {
    position: static;
    height: auto;
    padding: 8vh 1.25rem;
  }
}

/* LES PORTAILS [vision Olivier 2026-07-20] : rangée d'icônes-croquis, ancres douces */
html { scroll-behavior: smooth; }
.tr-portails {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(14px, 4vw, 38px); padding: 10px 12px 26px; flex-wrap: wrap;
}
.tr-portail {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: inherit; opacity: 0.82;
  transition: opacity 0.2s, transform 0.2s;
}
.tr-portail:hover, .tr-portail:focus-visible { opacity: 1; transform: translateY(-2px); }
.tr-portail svg {
  width: clamp(44px, 7vw, 58px); height: clamp(44px, 7vw, 58px);
  border: 1.6px solid currentColor; border-radius: 50%; padding: 8px;
}
.tr-portail svg .tr-trait { fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round; }
.tr-portail span { font-size: 0.78rem; letter-spacing: 0.04em; }

/* [page « Comment ça marche » 2026-07-20] le pied de l'accueil résumait le parcours en
   trois mots sans mener nulle part : son titre et une ligne de renvoi ouvrent
   désormais la page qui explique le concept en entier. */
.bandeau-etapes .lien-etapes { color: inherit; text-decoration: none; }
.bandeau-etapes .lien-etapes:hover { text-decoration: underline; }
.bandeau-etapes .etapes-lien { text-align: center; margin-top: 14px; font-size: 0.92rem; }
.bandeau-etapes .etapes-lien a { color: var(--or); }
