/* La data chez SALTI — page de soutenance. Palette : fond #0b0c0f, panneaux #121317, lignes #2a2c33, texte #f2f1ec, secondaire #8b8f9a, accent #FFDD00. */
:root {
  --y: #FFDD00; --bg: #0b0c0f; --panel: #121317; --line: #2a2c33; --txt: #f2f1ec; --mut: #8b8f9a; --mut2: #b8bac3;
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --marge: 48px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-snap-type: y mandatory; scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--txt); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--y); color: #000000; }

/* Barre du haut */
.barre { position: fixed; top: 0; left: 0; width: 100%; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--marge); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mut); pointer-events: none; }
.barre__marque { display: flex; align-items: center; gap: 12px; color: var(--txt); }
.barre__marque img { width: 22px; height: 22px; display: block; }
#compteur em { font-style: normal; color: var(--y); }

/* Sections */
#arrets { max-width: 1600px; margin: 0 auto; position: relative; z-index: 6; }
.arret { height: 100vh; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 40%) 1fr; align-items: center; padding: 80px var(--marge) 90px; }
.arret__texte { max-width: 560px; }
/* Le texte d'un arrêt entre en fondu, ligne après ligne, et celui qu'on quitte s'efface : pas de passage de slide à slide */
.arret__texte > * { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.arret.is-active .arret__texte > * { opacity: 1; transform: none; }
.arret.is-active .arret__texte > :nth-child(2) { transition-delay: .08s; }
.arret.is-active .arret__texte > :nth-child(3) { transition-delay: .16s; }
.arret.is-active .arret__texte > :nth-child(4) { transition-delay: .24s; }
.arret.is-active .arret__texte > :nth-child(5) { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .arret__texte > * { opacity: 1; transform: none; transition: none; } }
.arret--cinema { grid-template-columns: 1fr; align-content: start; padding-top: 120px; }
.arret--cinema .arret__texte { max-width: min(760px, 46vw); }

.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--y); }
.kicker::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--y); vertical-align: middle; margin-right: 12px; }
.titre { font-size: clamp(32px, 2.6vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin-top: 14px; }
.titre em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--y); }
.arret--cinema .titre { font-size: clamp(40px, 4vw, 72px); }
.texte { color: var(--mut2); font-size: clamp(15px, 1.05vw, 19px); line-height: 1.55; margin-top: 16px; max-width: 520px; }
.arret--cinema .texte { max-width: 720px; font-size: clamp(16px, 1.2vw, 21px); }

/* Tuiles de chiffres */
.tuiles { display: grid; gap: 12px; margin-top: 24px; grid-template-columns: 1fr 1fr; }
.tuiles[data-n="1"] { grid-template-columns: 1fr; }
.tuiles[data-n="3"] { grid-template-columns: repeat(3, 1fr); }
.tuile { border: 1px solid var(--line); background: rgba(18, 19, 23, .85); border-radius: 8px; padding: 12px 16px; }
.tuile__valeur { font-size: clamp(24px, 1.9vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--y); line-height: 1; font-variant-numeric: tabular-nums; }
.tuile__libelle { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--mut); text-transform: uppercase; margin-top: 8px; line-height: 1.4; }
.source { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: #5e6270; text-transform: uppercase; margin-top: 18px; }

.arret--cinema .tuiles { grid-template-columns: repeat(4, 1fr); max-width: 1100px; }
.auteur { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--mut); text-transform: uppercase; margin-top: 28px; }

/* Nacelle fixe (cockpit) et plein cadre (cinéma) */
#nacelle-couche { position: fixed; right: clamp(40px, calc((100vw - 1600px) / 2), 400px); bottom: 40px; width: min(58vw, 930px); z-index: 5; pointer-events: none; transition: width .6s ease, bottom .6s ease, right .6s ease, opacity .6s ease; }
#nacelle-couche svg { width: 100%; height: auto; display: block; overflow: visible; }
body.mode-cinema #nacelle-couche { right: 2vw; width: min(64vw, 1040px); bottom: 0; opacity: .95; }

/* Points d'étape */
#points { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 10px; }
#points a { width: 6px; height: 6px; border-radius: 50%; background: #3a3c45; display: block; transition: background .2s, box-shadow .2s; }
#points a.actif { background: var(--y); box-shadow: 0 0 0 3px rgba(255, 221, 0, .18); }

/* Flèche suivant */
#suivant { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 20; width: 38px; height: 38px; border: 1px solid #454851; border-radius: 50%;
  background: rgba(11, 12, 15, .7); color: var(--y); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .2s; }
#suivant:hover { border-color: var(--y); }
#suivant:focus-visible { outline: 2px solid var(--y); outline-offset: 3px; }
#suivant.fin { opacity: .35; cursor: default; }

/* Notes (N) et chrono (T) */
#notes, #chrono { position: fixed; left: var(--marge); bottom: 70px; z-index: 30; background: rgba(18, 19, 23, .92); border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); color: var(--txt); backdrop-filter: blur(6px); }
#notes { width: min(520px, 42vw); padding: 16px 18px; font-size: 13px; line-height: 1.6; max-height: 50vh; overflow: auto; }
#notes .notes__titre { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--y); margin-bottom: 8px; }
#chrono { bottom: auto; top: 60px; padding: 8px 14px; font-size: 14px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
#chrono.alerte { color: var(--y); border-color: var(--y); }
[hidden] { display: none !important; }

/* Écrans moyens (≤ 1440, ex. projecteur 1280×800) : nacelle un peu plus étroite, cockpit conservé */
@media (max-width: 1440px) {
  #nacelle-couche { width: 52vw; }
  .arret { grid-template-columns: minmax(0, 42%) 1fr; }
}

/* Écrans étroits (< 1024) : une colonne, nacelle dans le flux */
@media (max-width: 1023px) {
  :root { --marge: 24px; }
  .arret { grid-template-columns: 1fr; align-content: start; padding-top: 90px; height: auto; min-height: 100vh; }
  #nacelle-couche, body.mode-cinema #nacelle-couche { position: static; width: 100%; transform: none; margin-top: 24px; }
  .arret--cinema .tuiles { grid-template-columns: 1fr 1fr; }
  #notes { width: calc(100vw - 48px); }
}
