/* ══ QUIZ RIVALS, LA MATIÈRE COMMUNE DU SITE ═══════════════════════════════════
   Ce que la vitrine (/<langue>/), les pages légales et les pages d'erreur
   partagent : les polices de l'app, la nuit et le volt, la barre en pilule, les
   boutons et le pied. Chaque page ajoute sa mise en page à elle
   (assets/vitrine.css pour la vitrine, /style.css pour un long texte).
   La grammaire est celle de l'app (app/src/theme/tokens.ts) : volt = action,
   texte SOMBRE dessus ; rose = rivalité ; nuit = le monde de l'app, jamais un
   noir pur. Les polices s'affichent en `swap` : le texte paraît tout de suite
   dans la police du système, rien n'attend un fichier.
   ════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "QR Display";
  src: url("/assets/fonts/qr-display.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("/assets/fonts/urbanist-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("/assets/fonts/urbanist-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #09090c;
  --card: #16151d;
  --ink: #f4f2ff;
  --ink-2: rgba(244, 242, 255, 0.72);
  --volt: #aeff00;
  --pink: #ff5ad1;

  --font-display: "QR Display", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-lead: clamp(18px, 1.55vw, 22px);
  --t-s: 15px;

  --inset: 12px;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 36px;
  --nav-top: 14px;
  /* La barre fait 52 px de haut : ce qui commence sous elle part d'ici. */
  --nav-clear: calc(var(--nav-top) + 52px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

::selection {
  background: var(--volt);
  color: var(--night);
}

:focus-visible {
  outline: 3px solid var(--volt);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Lu par les lecteurs d'écran et les moteurs, invisible à l'œil (un titre
   dessiné porte les mêmes mots juste à côté). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--volt);
  color: var(--night);
  font-weight: 800;
  text-decoration: none;
  translate: 0 -160%;
}
.skip:focus {
  translate: none;
}

/* ── Boutons : gélules à plat, l'appui est un retrait (la recette de l'app) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--t-s);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    scale 140ms var(--ease-out),
    background-color 180ms ease;
}
.btn:active {
  scale: 0.96;
}
.btn-s {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
}
.btn-volt {
  background: var(--volt);
  color: var(--night);
}
.btn-night {
  background: var(--night);
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .btn-volt:hover {
    background: #c9ff4d;
  }
  .btn-night:hover {
    background: #26242f;
  }
}

/* ── Navigation : une pilule de nuit, lisible sur le volt comme sur la nuit ── */
.nav {
  position: fixed;
  z-index: 50;
  top: var(--nav-top);
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 4px;
  /* Sans largeur explicite, un élément fixe posé à `left: 50%` n'a que la
     moitié de l'écran pour lui : sur mobile, le logo s'écrasait à zéro. */
  width: max-content;
  min-width: min(640px, calc(100% - 2 * var(--inset)));
  max-width: calc(100% - 2 * var(--inset));
  padding: 5px 5px 5px 18px;
  border-radius: 999px;
  background: var(--night);
  color: var(--ink);
}
/* Sur la nuit, la pilule prend la face d'une carte pour se détacher du fond. */
.nav-card {
  background: var(--card);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  padding-right: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  flex: none;
  width: 18px;
  max-width: none;
  height: auto;
}
/* Le choix de la langue : un vrai <select>, posé invisible sur sa pastille.
   Le système ouvre sa propre liste (la roue d'iOS, la feuille d'Android) et
   la pastille ne montre que le code de la langue choisie. */
.nav-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}
.nav-lang svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-lang-globe {
  width: 17px;
  height: 17px;
}
.nav-lang-chev {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}
.nav-lang select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  /* 16 px : en dessous, iOS zoome sur la page en ouvrant la liste. */
  font-size: 16px;
  cursor: pointer;
}
.nav-lang option {
  background: var(--card);
  color: var(--ink);
}
.nav-lang:has(select:focus-visible) {
  outline: 3px solid var(--volt);
  outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .nav-lang:hover {
    background: var(--card);
    color: var(--ink);
  }
  .nav-card .nav-lang:hover {
    background: #26242f;
  }
}

/* Les boutons de store : le logo de la plateforme puis deux lignes, la
   construction des badges officiels, dans la matière des boutons de l'app. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 0 24px 0 18px;
  border-radius: 999px;
  background: var(--night);
  color: var(--ink);
  text-decoration: none;
  transition:
    scale 140ms var(--ease-out),
    background-color 180ms ease;
}
a.store:active {
  scale: 0.96;
}
@media (hover: hover) and (pointer: fine) {
  a.store:hover {
    background: #26242f;
  }
}
.store svg {
  flex: none;
  width: 26px;
  height: 26px;
}
.store-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
  white-space: nowrap;
}
.store-txt small {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.72;
}
.store-txt b {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.store-soon {
  background: rgba(9, 9, 12, 0.1);
  color: var(--night);
}

/* ── Pied ────────────────────────────────────────────────────────────────── */
.foot {
  padding: 36px var(--pad) 44px;
  color: var(--ink-2);
  font-size: var(--t-s);
  text-align: center;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot a {
  text-decoration: none;
}
.foot a[aria-current="page"] {
  color: var(--ink);
}
.foot-line {
  margin: 16px 0 0;
}
@media (hover: hover) and (pointer: fine) {
  .foot a:hover {
    color: var(--ink);
  }
}

@media (max-width: 420px) {
  .brand span {
    display: none;
  }
}
