/* Kairosong — la vitrine. Une seule feuille pour toutes les pages.
   Jetons repris de Kairosong-design-system/tokens.json (seuls ceux qui servent ici),
   recettes de components/bundle.css (.ks-btn, .ks-door-rule, .ks-chevron, liens, focus).
   Règles du système : noir pur, l'or ne veut dire qu'action ou état actif, une seule donnée
   ivoire (le wordmark), aucune carte ni panneau, Playfair pour le seul mot « Kairosong ». */

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('fonts/SpaceMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/PlayfairDisplay-Variable.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --color-bg: #000000;
  --color-night-900: #0f0e0d;
  --color-night-700: #272420;
  --color-night-600: #332f29;
  --color-gold-light: #f6c773;
  --color-gold: #e0a448;
  --color-amber: #c98a2e;
  --color-off-white: #e4e1db;
  --color-ivory: #e8dcc4;
  --color-warm-grey-light: #c3bbad;
  --color-warm-grey: #9c9384;
  --color-hairline: rgba(255, 255, 255, 0.1);
  --color-gold-a50: rgba(224, 164, 72, 0.5);

  --color-surface: var(--color-night-700);
  --color-surface-alt: var(--color-night-600);
  --color-accent: var(--color-gold);
  --color-accent-strong: var(--color-gold-light);
  --color-text: var(--color-off-white);
  --color-text-secondary: var(--color-warm-grey-light);
  --color-text-muted: var(--color-warm-grey);
  --color-readout: var(--color-ivory);
  --color-focus-ring: var(--color-gold-light);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-title: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-lg: 16px;
  --tracking-wider: 0.12em;
  --tracking-widest: 0.2em;
  --touch-min: 44px;
  --screen-side: 28px;
  --screen-top-bar: 40px;
  --screen-foot: 24px;
  --measure: 34rem;
  --page-max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--color-accent-strong);
}

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Charpente ─────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--screen-side);
}

.section {
  padding: 72px 0 0;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.title {
  margin: 0 0 24px;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  color: var(--color-text);
  text-wrap: balance;
}

/* Un titre en deux phrases : une ligne chacune, équilibrée à part. */
.title-line {
  display: block;
}

.lead {
  margin: 0;
  max-width: var(--measure);
  color: var(--color-text-secondary);
}

/* Filet or : il sépare deux moments, jamais deux lignes d'une liste. */
.ks-door-rule {
  display: block;
  width: 100%;
  height: 1px;
  margin: 72px 0 0;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-gold-a50) 30%,
    var(--color-gold-light) 50%,
    var(--color-gold-a50) 70%,
    transparent
  );
}

/* ─── Boutons (recette .ks-btn) ─────────────────────────────────────────── */

.ks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  min-width: var(--touch-min);
  padding: 14px 32px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: var(--tracking-wider);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
}

/* Or plein — l'objet le plus lumineux de l'écran ; il n'y en a jamais deux. */
.ks-btn--fill-gold,
.ks-btn--fill-gold:hover {
  background: linear-gradient(90deg, var(--color-gold) 0%, var(--color-amber) 100%);
  border-color: var(--color-gold-a50);
  color: var(--color-night-900);
}
.ks-btn--fill-gold:active {
  background: linear-gradient(90deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  border-color: var(--color-gold-light);
}

/* Plaque à filet or — l'action forte qui n'est pas LE geste de l'écran. */
.ks-btn--plate-gold,
.ks-btn--plate-gold:hover {
  background: var(--color-surface);
  border-color: var(--color-gold-a50);
  color: var(--color-accent);
}
.ks-btn--plate-gold:active {
  background: var(--color-surface-alt);
  border-color: var(--color-accent-strong);
  color: var(--color-accent-strong);
}

.ks-chevron {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(135deg);
  transition: transform 170ms ease-out;
}

/* ─── Accueil ───────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 48px;
  padding-top: var(--screen-top-bar);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-weight: 400;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-readout);
}

.motto {
  margin: 28px 0 0;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  /* Deux temps, deux lignes : à 360 px, « Chaque musique a son moment. » ne tient qu'à 22 px. */
  font-size: clamp(22px, 6.1vw, 26px);
  line-height: 1.3;
  font-weight: 400;
  color: var(--color-text);
}

.hero .lead {
  margin-top: 20px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 32px;
}

.hero-cta .ks-btn {
  width: 100%;
  max-width: 320px;
}

.fine {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-muted);
}

/* ─── Emplacements de capture (Jul les fournira, 360 × 640) ─────────────── */

.shot {
  margin: 0;
}

.shot-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 360 / 640;
  width: 100%;
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  overflow: hidden;
}

.shot-frame img,
.shot-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-secondary);
  text-align: center;
}

.hero .shot {
  width: 100%;
  max-width: 260px;
  justify-self: center;
}

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62%;
  gap: 16px;
  margin: 0 calc(-1 * var(--screen-side));
  padding: 0 var(--screen-side) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--screen-side);
  list-style: none;
}

.shots > li {
  scroll-snap-align: start;
}

/* ─── Listes à filets : comment ça marche, règles, FAQ ──────────────────── */

.lines {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-hairline);
}

.lines > li {
  border-bottom: 1px solid var(--color-hairline);
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 20px;
  padding: 24px 0;
}

.step svg {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  color: var(--color-text-muted);
}

.step h3 {
  margin: 0;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--color-text);
}

.step p {
  margin: 0;
  color: var(--color-text-secondary);
}

.aside {
  margin: 20px 0 0;
  max-width: var(--measure);
  color: var(--color-text-secondary);
}

.rules > li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--touch-min);
  padding: 14px 0;
}

.rules .pts {
  flex: none;
  font-size: 20px;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.rules .pts small {
  margin-left: 4px;
  font-size: 12px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Sous le barème, une seule ligne : l'année à deviner. */
.rules-note {
  margin: 20px 0 0;
  max-width: var(--measure);
  color: var(--color-text-secondary);
}

/* ─── Le cœur du jeu : la prose, puis ton année, qui roule jusqu'à la réponse ─ */

.heart {
  position: relative;
  isolation: isolate;
}

.heart-body {
  max-width: var(--measure);
  padding-top: 24px;
  border-top: 1px solid var(--color-hairline);
}

.heart-body p {
  margin: 0 0 16px;
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

.heart-body p:last-child {
  margin-bottom: 0;
}

/* « You call a year. » et « Then the answer lands… » : un cran sous le titre. */
.heart-line {
  margin: 40px 0 0;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 32;
  font-weight: 400;
  font-size: 23px;
  line-height: 1.2;
  color: var(--color-text);
}

/* Une seule année, la donnée ivoire de l'écran. Seul le chiffre des dizaines tourne : une
   fenêtre d'un chiffre (le rouleau, posé par assets/coeur.js), fondue en haut et en bas le
   temps qu'il roule seulement ; à l'arrivée, le 6 est net comme les autres. */
.heart-year {
  display: flex;
  margin: 8px 0 0;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 44;
  font-weight: 500;
  font-size: 120px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--color-readout);
}

.heart-roue {
  display: block;
  height: 1em;
  overflow: hidden;
}

.heart-rouleau {
  display: flex;
  flex-direction: column;
  transform: translateY(-2em);
}

.heart-rouleau span {
  display: block;
  height: 1em;
}

.heart-line.heart-then {
  margin-top: 16px;
}

.heart-coda {
  margin: 24px 0 0;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 32;
  font-size: 22px;
  line-height: 1.3;
  color: var(--color-text);
  text-wrap: pretty;
}

/* ─── Ce qui reste : le carnet de l'app, en boucle, puis une phrase ───── */

.keep-shot {
  max-width: 280px;
  margin-top: 8px;
}

.keep-text {
  max-width: var(--measure);
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-hairline);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

/* ─── La frise : l'objet du jeu, un an par cran, les décennies en Space Mono ── */

/* Neutre (filets blancs) : l'or reste à l'action. La réponse est l'ivoire de l'année révélée. */
.frise {
  --from: 1950;
  --to: 2026;
  --o: 0px; /* hauteur libre au-dessus du filet (l'onde de l'accueil s'y déploie) */
  position: relative;
  width: 100%;
  max-width: var(--measure);
  height: calc(var(--o) + 44px);
}

.frise-minor,
.frise-major,
.frise-rule {
  position: absolute;
  left: 0;
  right: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.frise-rule {
  top: calc(var(--o) + 20px);
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}

.frise-minor {
  top: calc(var(--o) + 17px);
  height: 7px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px) 0 0 / calc(100% / (var(--to) - var(--from))) 100% repeat-x;
}

.frise-major {
  top: calc(var(--o) + 13px);
  height: 15px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px) 0 0 / calc(1000% / (var(--to) - var(--from))) 100% repeat-x;
}

.frise-year,
.frise-dot,
.frise-arc {
  position: absolute;
  left: calc((var(--y) - var(--from)) / (var(--to) - var(--from)) * 100%);
}

.frise-year {
  top: calc(var(--o) + 30px);
  transform: translateX(-50%);
  font-family: var(--font-code);
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.frise-dot {
  top: calc(var(--o) + 20px);
  width: 11px;
  height: 11px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  border: 2px solid var(--color-bg);
  background: var(--color-text-muted);
}

.frise-dot--guess {
  background: var(--color-text-secondary);
}

.frise-dot--answer {
  width: 13px;
  height: 13px;
  margin: -6px 0 0 -6px;
  background: var(--color-readout);
  box-shadow: 0 0 0 4px rgba(232, 220, 196, 0.2);
  z-index: 1;
}

/* L’écart du cœur : 1940 à 1990 sur toute la colonne, centré sur la réponse, ton pari en creux et gris, la réponse
   pleine et ivoire, une seule courbe de l'un à l'autre. Les deux années au-dessus. */
.frise--coeur {
  --from: 1940;
  --to: 1990;
  --o: 36px;
  --h: 34px;
  width: auto;
  max-width: none;
  height: 100px;
  margin: 32px 14px 0;
}

.frise--coeur .frise-minor,
.frise--coeur .frise-major {
  right: -1px;
  -webkit-mask-image: none;
  mask-image: none;
}

.frise--coeur .frise-rule {
  -webkit-mask-image: none;
  mask-image: none;
}

.frise--coeur .frise-minor {
  background-size: calc((100% - 1px) / (var(--to) - var(--from))) 100%;
}

.frise--coeur .frise-major {
  background-size: calc((100% - 1px) * 10 / (var(--to) - var(--from))) 100%;
}

.frise--coeur .frise-year {
  top: calc(var(--o) + 36px);
}

.frise--coeur .frise-dot--guess {
  background: var(--color-bg);
  border-color: var(--color-text-muted);
}

.frise-mark {
  position: absolute;
  top: 0;
  left: calc((var(--y) - var(--from)) / (var(--to) - var(--from)) * 100%);
  transform: translateX(-50%);
  font-family: var(--font-code);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.frise-mark--guess {
  color: var(--color-text-muted);
}

.frise-mark--answer {
  color: var(--color-readout);
}

.frise-arc {
  --y: var(--answer);
  top: calc(var(--o) + 20px - var(--h));
  width: calc((var(--guess) - var(--answer)) / (var(--to) - var(--from)) * 100%);
  height: var(--h);
  box-sizing: border-box;
  border: 1px solid rgba(195, 187, 173, 0.6);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* L'accueil : trois ondes se resserrent en un filet, et ce filet devient la frise (assets/onde.js). */
.frise--hero {
  --o: 24px;
  margin: 8px auto 0;
}

.frise-onde {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(var(--o) * 2 + 40px);
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}

.frise-onde path {
  fill: none;
  stroke: url(#onde-filet);
  stroke-width: 1.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ─── La pleine lune en halo derrière le dernier bloc (assets/lune.js) ──── */

/* Le halo entoure la phrase et le bouton ; son centre est celui du bloc (le décalage compense
   la différence entre les marges haute et basse). */
.lune {
  position: absolute;
  z-index: -1;
  left: calc(-1 * var(--screen-side));
  right: calc(-1 * var(--screen-side));
  top: calc(50% + 36px - 250px);
  height: 500px;
  pointer-events: none;
}

.lune canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Les ondes s'éteignent avant le bord ; le cercle, lui, reste dans la partie pleine. */
  -webkit-mask-image: radial-gradient(closest-side, #000 90%, transparent);
  mask-image: radial-gradient(closest-side, #000 90%, transparent);
}

/* Sans WebGL ou sans script : le même cercle net, au même diamètre (60 % de la hauteur). */
.lune-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 60%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(195, 187, 173, 0.85);
  border-radius: 50%;
}

.lune.is-gl .lune-ring {
  display: none;
}

/* ─── Les gestes : chacun joue une fois, seule l'opacité bouge ──────────── */

/* Chaque geste part de son image finale : sans script, ou avec « réduire les animations »,
   rien n'est jamais caché. Les états d'attente ne valent qu'avec le script et le mouvement. */
@media (prefers-reduced-motion: no-preference) {
  /* L'accueil : caché dès la première image (classe « js » posée en tête), le temps que l'onde
     joue. Filet de secours : si le script manque, tout apparaît à 8 s. */
  .js .frise--hero:not(.is-set) > :not(.frise-onde) {
    opacity: 0;
    animation: ks-show 1ms linear 8s forwards;
  }

  .js .frise--hero.is-waving:not(.is-set) > :not(.frise-onde) {
    animation: none;
  }

  .frise--hero > :not(.frise-onde) {
    transition: opacity 400ms ease-out var(--at, 0ms);
  }

  .frise--hero.is-waving .frise-onde {
    opacity: 1;
  }

  .frise--hero.is-set .frise-onde {
    opacity: 0;
    transition: opacity 400ms ease-out;
  }

  /* Le cœur, une fois, quand l'année est bien à l'écran (assets/coeur.js) : le rouleau passe
     de 8 à 6 en deux crans, puis « Then the answer lands… », puis la frise et la dernière
     phrase. Chaque temps part à la fin du précédent. */
  .heart.is-waiting .heart-rouleau {
    transform: translateY(0);
  }

  .heart.is-waiting .heart-then,
  .heart.is-waiting .frise-arc,
  .heart.is-waiting .frise-dot,
  .heart.is-waiting .frise-mark,
  .heart.is-waiting .heart-coda {
    opacity: 0;
  }

  .heart.is-playing .heart-rouleau {
    animation: heart-roule 340ms both;
  }

  .heart.is-playing .heart-roue {
    animation: heart-fenetre 340ms both;
  }

  .heart.is-playing .heart-then {
    transition: opacity 250ms ease-out 340ms;
  }

  .heart.is-playing .frise-arc,
  .heart.is-playing .frise-dot,
  .heart.is-playing .frise-mark,
  .heart.is-playing .heart-coda {
    transition: opacity 450ms ease-out 590ms;
  }
}

/* Le fondu de la fenêtre, pendant le roulement seulement : il tombe à la dernière image. */
@keyframes heart-fenetre {
  0%,
  99.9% {
    -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  }
  100% {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* Deux crans de 170 ms, chacun freiné, sans rebond. */
@keyframes heart-roule {
  0% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1);
  }
  50% {
    transform: translateY(-1em);
    animation-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1);
  }
  100% {
    transform: translateY(-2em);
  }
}

@keyframes ks-show {
  to {
    opacity: 1;
  }
}

/* ─── Le nom ──────────────────────────────────────────────────────────── */

/* Une histoire, pas une règle : la seule zone claire de la page, un dégradé de la
   palette, de l'or clair vers l'or profond, encré de nuit. Même geste que l'en-tête d'Explore
   dans l'app (une lueur dans un coin, qui s'étend) ; rien à toucher dedans. Bord à bord. */
.kairos {
  margin: 72px calc(-1 * var(--screen-side)) 0;
  padding: 56px var(--screen-side) 48px;
  background: radial-gradient(ellipse 140% 110% at 15% 0%, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-amber) 100%);
  color: var(--color-night-900);
}

.kairos .eyebrow {
  color: var(--color-night-700);
}

.kairos p {
  margin: 0 0 16px;
  max-width: var(--measure);
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 18;
  font-size: 19px;
  line-height: 1.5;
  color: var(--color-night-900);
  text-wrap: pretty;
}

.kairos p:last-child {
  margin-bottom: 0;
}

.kairos .kairos-word {
  display: block;
  margin: 8px 0 4px;
  font-variation-settings: 'opsz' 72;
  font-size: 56px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ─── FAQ ───────────────────────────────────────────────────────────────── */

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-size: 20px;
  line-height: 1.3;
  color: var(--color-text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .ks-chevron {
  color: var(--color-text-muted);
  margin-right: 4px;
}

.faq details[open] summary .ks-chevron {
  transform: rotate(-45deg);
}

.faq details p {
  margin: 0;
  padding: 0 0 20px;
  max-width: var(--measure);
  color: var(--color-text-secondary);
}

/* ─── Envoi et pied de page ─────────────────────────────────────────────── */

/* Le dernier bloc tient dans le halo de la lune : de l'air au-dessus et au-dessous. */
.send {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 222px 0 150px;
  text-align: center;
  /* Le dessin du halo s'arrête au bas du bloc : le filet du pied de page reste entier. Rien
     n'est coupé en haut ni sur les côtés. */
  clip-path: inset(-100vh -100vw 0);
}

.send p {
  margin: 0;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-size: 22px;
  line-height: 1.3;
  color: var(--color-text);
}

.send .ks-btn {
  width: 100%;
  max-width: 240px;
}

/* Sous le halo, le pied de page suit sans marge de plus. */
main:has(.send) ~ .site-foot {
  margin-top: 0;
}

.site-foot {
  margin-top: 72px;
  padding: 28px 0 calc(var(--screen-foot) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-hairline);
  font-size: 14px;
  line-height: 20px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.foot-links,
.langs {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links a,
.langs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0 10px;
  color: var(--color-text-muted);
  text-decoration: none;
}

.foot-links li:first-child a,
.langs li:first-child a {
  padding-left: 0;
}

.foot-links a:hover,
.langs a:hover {
  color: var(--color-text-secondary);
}

/* La langue affichée : l'or de l'état actif. */
.langs a[aria-current='page'] {
  color: var(--color-accent);
}

.copyright {
  margin: 8px 0 0;
  color: var(--color-text-muted);
}

/* ─── Pages secondaires : Privacy, Legal, 404 ──────────────────────────── */

.top-bar {
  display: flex;
  align-items: center;
  padding-top: var(--screen-top-bar);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch-min);
  text-decoration: none;
}

.home-link img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.home-link .wordmark {
  font-size: 24px;
}

.doc {
  max-width: 40rem;
  padding-top: 48px;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
}

.doc h2 {
  margin: 40px 0 12px;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
}

.doc p,
.doc li {
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.doc p {
  margin: 0 0 14px;
}

.doc ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.doc address {
  font-style: normal;
}

.doc .updated {
  color: var(--color-text-muted);
  font-size: 14px;
}

.not-found {
  padding-top: 88px;
}

/* Une année posée au-delà de la frise : elle n'est pas encore arrivée. */
.not-found .frise {
  margin: 8px 0 32px;
}

.not-found .lines li {
  padding: 20px 0 12px;
}

.not-found .lines p {
  margin: 0;
  color: var(--color-text-secondary);
}

.not-found .lines .wink {
  margin-bottom: 4px;
  font-family: var(--font-title);
  font-variation-settings: 'opsz' 40;
  font-size: 22px;
  line-height: 1.3;
  color: var(--color-text);
}

.not-found .lines a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
}

/* ─── Grand écran ───────────────────────────────────────────────────────── */

@media (min-width: 720px) {
  .shots {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 40px;
    border-top: 0;
  }

  .steps > li {
    border-top: 1px solid var(--color-hairline);
  }

  .step {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 12px;
  }

  .step svg {
    grid-row: auto;
  }

  /* Le barème garde la mesure du texte : les points restent près de leur ligne. */
  .rules-body {
    max-width: var(--measure);
  }

  .rules > li {
    min-height: 64px;
    padding: 16px 0;
    font-size: 18px;
  }

  .rules .pts {
    font-size: 28px;
    line-height: 32px;
  }
}

/* Le pied de page tient sur une ligne : les liens, le copyright, puis les langues à droite.
   À partir de 800 px seulement : en français, les liens plus longs n'y tiennent pas avant. */
@media (min-width: 800px) {
  .site-foot .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 24px;
  }

  .foot-row {
    display: contents;
  }

  .copyright {
    order: 1;
    margin: 0;
  }

  .site-foot nav {
    order: 2;
    margin-left: auto;
  }
}

@media (min-width: 1000px) {
  :root {
    --screen-side: 48px;
  }

  .section {
    padding-top: 144px;
  }

  .ks-door-rule {
    margin-top: 144px;
  }

  .hero {
    grid-template-columns: 1fr minmax(0, 300px);
    align-items: center;
    gap: 64px;
    padding-top: 88px;
  }

  .hero-text {
    align-items: flex-start;
    text-align: left;
  }

  .brand {
    flex-direction: row;
    gap: 20px;
  }

  .wordmark {
    font-size: 48px;
  }

  .motto {
    font-size: 44px;
    line-height: 1.15;
  }

  .hero .lead {
    font-size: 18px;
  }

  .hero-cta {
    align-items: flex-start;
  }

  .hero .shot {
    max-width: 300px;
  }

  .shots {
    gap: 32px;
  }

  .title {
    font-size: 34px;
  }

  /* Deux colonnes alignées en haut : les mots à gauche, l'année et sa réponse à droite. */
  .heart,
  .keep {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 64px;
    align-items: start;
  }

  /* Les mots à gauche, centrés face au téléphone ; le carnet à droite, de toute sa hauteur. */
  .keep {
    grid-template-rows: 1fr auto auto auto 1fr;
  }

  .keep .eyebrow,
  .keep .title,
  .keep .keep-text {
    grid-column: 1;
  }

  .keep .eyebrow {
    grid-row: 2;
  }

  .keep .title {
    grid-row: 3;
  }

  .keep .keep-text {
    grid-row: 4;
    margin-top: 8px;
  }

  .keep .keep-shot {
    grid-column: 2;
    grid-row: 1 / -1;
    max-width: 360px;
    margin-top: 0;
  }

  .heart .title {
    margin-bottom: 28px;
    font-size: 40px;
    line-height: 1.12;
  }

  .heart-body {
    padding-top: 28px;
  }

  .heart-body p {
    margin-bottom: 18px;
    font-size: 17px;
    line-height: 1.6;
  }

  .heart-line {
    margin-top: 0;
    padding-top: 28px;
    font-size: 28px;
  }

  .heart-year {
    margin-top: 10px;
    font-size: 176px;
  }

  .heart-line.heart-then {
    margin-top: 20px;
    padding-top: 0;
  }

  .frise--coeur {
    --o: 40px;
    --h: 38px;
    height: 104px;
    margin-top: 40px;
  }

  .frise--coeur .frise-year {
    top: calc(var(--o) + 38px);
    font-size: 11px;
  }

  .frise--coeur .frise-mark {
    font-size: 12px;
  }

  .heart-coda {
    margin-top: 28px;
    font-size: 26px;
  }

  .frise--hero {
    margin: 16px 0 0;
  }

  .send {
    padding-top: 250px;
    padding-bottom: 170px;
  }

  .lune {
    left: 0;
    right: 0;
    top: calc(50% + 40px - 280px);
    height: 560px;
  }

  .kairos {
    padding: 72px var(--screen-side) 64px;
  }

  .kairos p {
    font-size: 20px;
  }

  .kairos .kairos-word {
    font-size: 72px;
  }

  /* Les règles et la FAQ côte à côte : libellés, titres et premiers filets sur les mêmes lignes. */
  .rules-faq {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 0 80px;
    align-items: start;
  }

  .rules-faq > .section {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    align-content: start;
  }

  .rules-faq .rules-body {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
