/* Typo de marque : Syne Bold (celle du logo) pour tout le texte,
   Space Mono seulement pour le chargement (le côté technique). Licence OFL. */
@font-face {
  font-family: "Space Mono";
  src: url("/assets/space-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("/assets/syne.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #000;
  --ink: #e9e9e9;     /* blanc */
  --dim: #8c8c8c;     /* argent */
  --faint: #4a4a4a;   /* gris */
  --line: #262626;
  --display: "Syne", "Helvetica Neue", Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--bg); color: var(--ink); }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* scanlines + grain, très discrets */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.22) 2px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.09;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.6svh, 26px);
  padding: max(24px, env(safe-area-inset-top)) 16px 12px;
  width: 100%;
}

/* emblème : la vidéo boucle, bords fondus dans le noir */
.emblem {
  position: relative;
  width: min(80vw, 50svh, 500px);
  aspect-ratio: 1;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.emblem__video, .emblem__still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.emblem__still { display: none; }

.wordmark { line-height: 0; margin-top: calc(-1 * clamp(4px, 1.5svh, 18px)); }
.wordmark img { width: min(64vw, 300px); height: auto; display: block; }

/* chargement */
.loading { width: min(86vw, 340px); color: var(--dim); font-family: var(--mono); font-weight: 400; }
.loading__row { display: flex; justify-content: space-between; margin-bottom: 7px; }
.loading__pct { color: var(--ink); font-variant-numeric: tabular-nums; }
.loading__bar { height: 1px; background: var(--line); position: relative; }
.loading__fill {
  position: absolute; left: 0; top: -1px; height: 3px; width: 0;
  background: var(--ink);
}
.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* inscription */
.signup { width: min(86vw, 340px); margin-top: clamp(4px, 1.2svh, 14px); }
.signup__title {
  color: var(--ink);
  margin-bottom: 11px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.34em;
}
.signup__row { display: flex; border: 1px solid var(--faint); }
.signup__row:focus-within { border-color: var(--ink); }
/* le champ reste à 16 px (pas de zoom auto sur iPhone) mais s'affiche réduit à 80 % */
.signup__field { flex: 1; min-width: 0; position: relative; overflow: hidden; display: flex; }
.signup input[type="email"] {
  width: 125%;
  flex: none;
  transform: scale(0.8);
  transform-origin: 0 50%;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;            /* pas de zoom automatique sur iPhone */
  letter-spacing: 0.06em;
  padding: 12px 15px;
  outline: none;
  border-radius: 0;
}
.signup input::placeholder { color: var(--faint); text-transform: uppercase; letter-spacing: 0.22em; font-size: 13.75px; } /* 11 px à l'écran */
.signup button {
  background: var(--ink);
  color: #000;
  border: 0;
  border-radius: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  padding: 0 12px 0 15px;
  cursor: pointer;
  white-space: nowrap;
}
.signup button:hover { background: #fff; }
.signup button:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.signup button[disabled] { opacity: 0.5; cursor: wait; }
.signup__status { min-height: 1.6em; margin-top: 10px; color: var(--ink); text-transform: uppercase; font-size: 10px; letter-spacing: 0.22em; }
.signup__status.is-error { color: var(--dim); }
.signup__legal { color: var(--faint); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.16em; line-height: 1.9; }
.signup__legal a { color: var(--dim); }
.signup.is-done .signup__row { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  font-family: var(--display);
  font-weight: 700;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
}

/* sélecteur de langue */
.lang {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  z-index: 11;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--faint);
}
.lang button {
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: 0.22em;
  color: var(--faint);
  cursor: pointer;
  padding: 4px 2px;
}
.lang button[aria-pressed="true"] { color: var(--ink); }
.lang button:hover, .lang button:focus-visible { color: var(--ink); outline: none; }
.links a { color: var(--dim); text-decoration: none; }
.links a:hover, .links a:focus-visible { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .emblem__video { display: none; }
  .emblem__still { display: block; }
  .cursor { animation: none; }
}

/* page mentions légales */
.legal { max-width: 640px; margin: 0 auto; padding: 48px 16px 24px; font-size: 12px; line-height: 1.85; letter-spacing: 0.04em; }
.legal h1 { font-family: var(--display); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.3em; margin-bottom: 28px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.26em; color: var(--dim); margin: 30px 0 10px; }
.legal p, .legal li { color: #c9c9c9; }
.legal ul { padding-left: 18px; }
.legal a { color: var(--ink); }
.legal .back { display: inline-block; margin-bottom: 28px; color: var(--dim); text-decoration: none; font-size: 10px; letter-spacing: 0.26em; }
.legal .todo { background: #fff; color: #000; padding: 0 4px; }
.legal .updated { margin-top: 28px; color: var(--faint); }
.legal #privacy, .legal h2 { scroll-margin-top: 56px; }
.legal-page .lang { position: absolute; }

/* colonne texte : empilée sur téléphone, à droite sur grand écran */
.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.6svh, 26px);
  width: 100%;
}

/* grand écran : emblème à gauche, texte et formulaire à droite */
@media (min-width: 900px) and (min-height: 500px) {
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
    align-items: center;
    justify-content: center;
    column-gap: clamp(40px, 7vw, 120px);
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px clamp(32px, 5vw, 72px) 24px;
  }
  .emblem {
    width: min(100%, 78svh, 680px);
    justify-self: end;
  }
  .panel {
    align-items: flex-start;
    gap: 30px;
  }
  .wordmark { margin-top: 0; width: 100%; max-width: 420px; }
  .wordmark img { width: 100%; max-width: 420px; }
  .loading, .signup { width: 100%; max-width: 420px; }
  .signup { margin-top: 6px; }
  .signup__title { font-size: 13px; }
  .signup__legal { font-size: 9px; }
  .links { justify-content: center; padding-bottom: 26px; }
  .lang { top: 24px; right: 32px; }
}
