/*
 * rivalock.com — feuille unique.
 *
 * DEUX PRINCIPES, et tout le reste en decoule.
 *
 * 1. La palette est celle du JEU (`src/theme/palette.ts`), pas une palette
 *    inventee pour le web. Un site vitrine qui ne ressemble pas a son produit
 *    fait mentir la premiere seconde qui suit le telechargement.
 * 2. L'or ne sert QU'A une chose : ce vers quoi on va. Le monde du souvenir,
 *    le coin d'or de l'enigme, la Porte. Il n'apparait nulle part ailleurs —
 *    c'est cette privation qui lui donne son sens. Le cyan, lui, ne sert qu'a
 *    l'INTERACTION : un lien, un focus, la couture qu'on deplace. Rien de
 *    decoratif n'est cyan.
 *
 * Ecrit mobile d'abord : chaque bloc est d'abord juste sur 360 px de large, et
 * les media queries n'ajoutent que de la largeur. C'est la commande — « meme
 * limite + que sur ordinateur ».
 */

/* ------------------------------------------------------------------ polices */

/*
 * Hebergees ici, sous-ensemble latin + latin-ext (`tools/build-fonts.py`).
 * `swap` plutot que `block` : sur un reseau mobile lent, du texte en police
 * systeme vaut mieux qu'un ecran vide — et le hero doit etre LISIBLE avant
 * d'etre beau.
 */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  font-style: normal;
}

/* ------------------------------------------------------------------- jetons */

:root {
  /* Les six couleurs du jeu, aux memes valeurs que `palette.ts`. */
  --void: #030308;
  --night: #07070f;
  --navy: #12142b;
  --cream: #e9ecff;
  --mute: #8b93c4;
  /* 5,4:1 sur la nuit, 4,6:1 sur une carte : #565d8c faisait 3,2 et 2,7, sous
     le minimum de lisibilité (4,5), sur des surtitres de 11 px et le pied de page. */
  --dim: #7a81b2;
  --signal: #4de1ff;
  --violet: #a78bfa;
  --gold: #e9a94c;
  --success: #2ee6a8;

  --surface: rgba(140, 160, 255, 0.055);
  --surface-2: rgba(140, 160, 255, 0.09);
  --line: rgba(140, 160, 255, 0.14);
  --line-strong: rgba(140, 160, 255, 0.26);

  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

  --gutter: clamp(1.15rem, 5vw, 4rem);
  --page: 1240px;
  --measure: 36rem;
  --band: clamp(4.5rem, 12vw, 9rem);
  --radius: 14px;

  /* Une seule courbe pour tout le site. Deux courbes differentes sur une meme
     page se remarquent sans qu'on sache pourquoi. */
  --ease: cubic-bezier(0.16, 0.9, 0.24, 1);

  color-scheme: dark;
}

/* ------------------------------------------------------------------- socle */

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

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

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/*
 * `height: auto` est OBLIGATOIRE, pas cosmetique. Chaque <img> porte ses
 * dimensions en attributs pour que la page ne saute pas pendant le chargement,
 * et l'attribut `height` fait alors loi tant que le CSS ne dit rien : les
 * vignettes de salle sortaient en 86 x 409 et les gros plans en 304 x 615.
 * `aspect-ratio` reste sans effet tant que la hauteur n'est pas rendue libre.
 * Les images qui ont VRAIMENT une hauteur fixe la reposent en dessous.
 */
img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Un anneau de focus VISIBLE, dans la couleur de l'interaction. Le supprimer
   rendrait le site injouable au clavier, et rien a l'ecran ne le dirait. */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.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;
}

.skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--signal);
  color: var(--night);
  font-family: var(--mono);
  font-size: 0.75rem;
  border-radius: 8px;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}

/*
 * TOUT CE QUI SE TOUCHE FAIT AU MOINS 40 POINTS DE HAUT.
 *
 * La page se vante, dans la section des refus, de « grandes zones tactiles ».
 * Un pied de page dont les liens font dix-huit points de haut la dementirait a
 * l'endroit meme ou elle le promet. Releve avant cette regle : la bascule de
 * langue 33 x 28, les liens du pied 18 de haut, les boutons de l'enigme 34.
 */
.ghost,
.link-more,
.nav-links a,
.foot-links a,
.brand {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

/* ------------------------------------------------------------- typographie */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3rem, 13vw, 7rem);
}
h2 {
  font-size: clamp(2.1rem, 6.6vw, 3.9rem);
}
h3 {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  margin: 0;
  max-width: var(--measure);
}

.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: var(--mute);
}

.small {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--dim);
}

strong {
  font-weight: 500;
  color: var(--cream);
}

/*
 * Le carton de film.
 *
 * Le jeu annonce ses chapitres en capitales espacees — « MARDI 10 NOVEMBRE
 * 2026 ». C'est sa grammaire, pas une decoration : chaque titre de section du
 * site en porte un, et le filet qui le suit se trace a l'apparition. Un
 * dispositif structurel doit encoder quelque chose de vrai ; celui-ci dit
 * « voici une nouvelle scene ».
 */
.card-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.6rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}
.card-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  transform-origin: left;
  transition: transform 1.1s var(--ease) 0.15s;
}
.js .card-title::after {
  transform: scaleX(0);
}
.reveal.is-in .card-title::after,
.is-in > .card-title::after {
  transform: scaleX(1);
}

/* ------------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* La barre du haut est fixe : sans cette marge, un lien d'ancre depose le titre
   de section DERRIERE elle, et le visiteur croit avoir rate la section. */
section[id],
main[id] {
  scroll-margin-top: 4.5rem;
}

.band {
  padding-block: var(--band);
  border-top: 1px solid var(--line);
}

.band--flush {
  border-top: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* --------------------------------------------------------------- apparition */

/*
 * Une seule regle d'apparition pour toute la page, posee par IntersectionObserver.
 * Elle est deliberement PETITE — 14 px et 0.7 s. Une entree spectaculaire par
 * bloc fatigue au troisieme ecran ; ce qui doit impressionner ici, ce sont les
 * deux moments interactifs, pas le fait qu'un paragraphe monte.
 */
/*
 * `js` est pose par un script en ligne dans le <head>. Sans lui, `.reveal` ne
 * cache RIEN — c'est la difference entre une page qui s'anime et une page
 * blanche. Un `opacity: 0` ecrit sans condition rend toute la page invisible
 * des que le script ne tourne pas : script bloque, erreur ailleurs, vieux
 * navigateur sans IntersectionObserver. Et personne ne le signale : le
 * visiteur croit que le site est casse et il ferme.
 */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
.js .reveal[data-delay='1'] {
  transition-delay: 0.07s;
}
.js .reveal[data-delay='2'] {
  transition-delay: 0.14s;
}
.js .reveal[data-delay='3'] {
  transition-delay: 0.21s;
}
.js .reveal[data-delay='4'] {
  transition-delay: 0.28s;
}

/* ------------------------------------------------------------------- grain */

/*
 * Le grain et la vignette : le jeu est rendu comme un film, et une page
 * parfaitement propre a cote de ses images aurait l'air d'un autre produit.
 * Statique — aucune animation, donc aucun cout par image.
 */
.grain,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}
.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: overlay;
}
.vignette {
  background: radial-gradient(120% 90% at 50% 45%, transparent 42%, rgba(3, 3, 8, 0.55) 100%);
}

/* --------------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem var(--gutter);
  background: linear-gradient(
    to bottom,
    rgba(3, 3, 8, 0.92) 0%,
    rgba(3, 3, 8, 0.62) 55%,
    rgba(3, 3, 8, 0) 100%
  );
  transition: background 0.35s var(--ease);
}
.nav.is-stuck {
  background: rgba(4, 4, 10, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

/*
 * Les deux liens de mode sont la NAVIGATION PRINCIPALE du site depuis qu'il a
 * trois pages : ils sont donc visibles a toutes les largeurs, y compris sur un
 * telephone, ou ils etaient caches. Deux mots courts ne demandent pas de menu
 * deroulant — et un menu qu'il faut ouvrir pour decouvrir qu'il y a un mode
 * multijoueur est exactement ce que ce site doit eviter.
 */
.nav-links {
  display: flex;
  gap: 0.9rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}
.nav-links a {
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover {
  color: var(--cream);
}
.nav-links a[aria-current='page'] {
  color: var(--cream);
}
.nav-links a[aria-current='page']::after {
  transform: scaleX(1);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/*
 * LE MENU DES LANGUES (2026-10-06). Trois langues, trois adresses : chaque
 * entree est un VRAI lien vers la meme page dans l'autre langue, que les robots
 * suivent et qu'on peut ouvrir dans un onglet. `<details>` l'ouvre et le ferme
 * sans script ; `site.js` ne fait que le refermer d'un clic ailleurs ou
 * d'Echap. Il remplace deux boutons FR/EN qui retraduisaient la page sur place
 * — ce qui faisait lire a Google le francais en anglais.
 */
.lang {
  position: relative;
  flex: none;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
}
.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 0.85rem;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--cream);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.7;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s var(--ease);
}
.lang[open] summary::after {
  transform: translateY(1px) rotate(225deg);
}
.lang summary:hover,
.lang[open] summary {
  border-color: var(--line-strong);
  background: var(--surface);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 90;
  display: grid;
  min-width: 11.5rem;
  padding: 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(10, 11, 24, 0.97);
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: lang-in 0.22s var(--ease);
}
.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--mute);
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease);
}
.lang-menu a:hover,
.lang-menu a:focus-visible {
  background: var(--surface-2);
  color: var(--cream);
}
.lang-menu a[aria-current='page'] {
  color: var(--cream);
}
/* La langue de la page : un point allume, comme le voyant d'un mode actif. */
.lang-menu a[aria-current='page']::after {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
}
@keyframes lang-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/*
 * LA SUGGESTION DE LANGUE. Le navigateur du visiteur parle une autre langue du
 * site et il n'a encore rien choisi : on la PROPOSE, sous la barre, sans jamais
 * l'imposer — une redirection d'office ferait lire a Google une page sous
 * l'adresse d'une autre. La fermer vaut choix, elle ne revient plus.
 */
.lang-suggest {
  position: fixed;
  top: calc(4.1rem + env(safe-area-inset-top, 0px));
  right: var(--gutter);
  z-index: 85;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  width: max-content;
  max-width: min(27rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.9rem 3.1rem 0.9rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(10, 11, 24, 0.96);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: suggest-in 0.6s var(--ease) 0.7s both;
}
.lang-suggest p {
  flex: 1 1 11rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--cream);
}
.lang-suggest-go {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1.05rem;
  border-radius: 99px;
  background: var(--signal);
  color: var(--night);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lang-suggest-go:hover {
  background: var(--cream);
}
.lang-suggest-close {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--dim);
  font-size: 1.35rem;
  line-height: 1;
}
.lang-suggest-close:hover {
  background: var(--surface-2);
  color: var(--cream);
}
@media (max-width: 479px) {
  .lang-suggest {
    left: var(--gutter);
    width: auto;
    max-width: none;
  }
}
@keyframes suggest-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Le fil de progression : il dit ou l'on en est dans une page qui n'a pas de
   sommaire. Un pixel de haut, dans la couleur de l'interaction. */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 90;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--signal), var(--violet));
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: clip;
}

/*
 * LA COUTURE — l'element signature de la page.
 *
 * Deux plans de la MEME chambre, tires du meme ancrage Sora : meme porte, meme
 * fenetre, meme reveil a 7:15. L'un est etalonne en or, l'autre en bleu-nuit
 * desature. La ligne se deplace au doigt.
 *
 * C'est le dispositif entier du jeu, et il n'est explique nulle part : on voit
 * chaque lieu deux fois, une fois vivant, une fois vide. Le titre dit
 * « Regarde mieux » ; la couture est la reponse.
 *
 * Le decoupage passe par `clip-path: inset()` sur la couche du SOUVENIR, jamais
 * par une largeur : une largeur qui change relaierait l'image et la ferait
 * onduler. Un inset ne fait que masquer, donc le compositeur le pose sans
 * redessiner.
 */
.seam {
  position: absolute;
  inset: 0;
  touch-action: pan-y;
  cursor: ew-resize;
}
.seam-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
.seam-layer--warm {
  clip-path: inset(0 calc(100% - var(--seam, 55%)) 0 0);
}

/*
 * La couture suit le curseur avec un LEGER retard sur ordinateur — 220 ms —
 * et instantanement pendant qu'on la tire. Sans retard elle est collee au
 * pointeur et devient nerveuse ; avec un retard pendant le geste, elle ne
 * suit plus le doigt et le geste ne tient plus.
 */
.seam:not(.is-held) .seam-layer--warm,
.seam:not(.is-held) .seam-line,
.seam:not(.is-held) .seam-grip {
  transition:
    clip-path 0.22s var(--ease),
    left 0.22s var(--ease);
}

.seam-line {
  position: absolute;
  inset-block: 0;
  left: var(--seam, 55%);
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(233, 236, 255, 0.15) 12%,
    var(--cream) 50%,
    rgba(233, 236, 255, 0.15) 88%,
    transparent
  );
  box-shadow: 0 0 26px rgba(233, 236, 255, 0.35);
}
.seam-grip {
  position: absolute;
  touch-action: none;
  top: 46%;
  left: var(--seam, 55%);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(233, 236, 255, 0.5);
  border-radius: 50%;
  background: rgba(4, 4, 10, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--cream);
}
.seam-grip::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(233, 236, 255, 0.16);
  animation: pulse 3.4s var(--ease) infinite;
}
.seam-grip svg {
  width: 22px;
  height: 22px;
}
.seam.is-held .seam-grip::before {
  animation: none;
  opacity: 0;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      var(--night) 1%,
      rgba(7, 7, 15, 0.94) 22%,
      rgba(7, 7, 15, 0.72) 42%,
      rgba(7, 7, 15, 0.18) 64%,
      rgba(7, 7, 15, 0) 76%
    ),
    linear-gradient(to bottom, rgba(3, 3, 8, 0.72), rgba(3, 3, 8, 0) 22%);
}

.hero-body {
  position: relative;
  z-index: 4;
  align-self: end;
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2.5rem, 8vh, 4.5rem);
  pointer-events: none;
}
.hero-body > * {
  pointer-events: auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero-eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
}

h1 .thin {
  font-weight: 400;
  color: var(--mute);
}

.hero-lead {
  margin-top: 1.2rem;
  max-width: 30rem;
}

/* -------------------------------------------------------------- boutons */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.9rem;
}

/*
 * Le badge de boutique.
 *
 * Il porte son etat : tant que `STORES.ios` / `STORES.android` sont vides dans
 * `site.js`, c'est un <span> inerte marque « bientot », pas un <a> qui ne mene
 * nulle part. Un lien mort dans un site vitrine est la seule faute que le
 * visiteur retient.
 */
/* Les badges OFFICIELS des deux magasins (`site.js`, BADGES). Ils ne se
   modifient pas : ni couleur, ni inclinaison, ni animation — seulement la
   marge de securite que les deux magasins demandent autour. */
.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 10px;
}
.badge img {
  display: block;
  height: 44px;
  width: auto;
}
.cta-row[data-stores] {
  align-items: flex-start;
}
.badge[data-state='live']:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}
.badge[data-state='soon'] {
  cursor: default;
}
.badge small {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.link-more::after {
  content: '↓';
  transition: transform 0.3s var(--ease);
}
.link-more:hover::after {
  transform: translateY(3px);
}

/* --------------------------------------------------------------- le compte */

/*
 * Quatre nombres, et pas un de plus. Chacun repond a une question qu'un
 * visiteur se pose vraiment : combien de jeu, combien de varie, est-ce que je
 * vais rester coince, est-ce que ca va me presser.
 */
.count {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.count > div {
  padding: 1.5rem var(--gutter);
  background: var(--night);
}
.count b {
  display: block;
  font-family: var(--mono);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--cream);
}
.count span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--mute);
}

/* ------------------------------------------------------------- l'enigme */

.puzzle-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 2rem;
}

/*
 * La dalle. C'est la figure IV de la salle 26, aux memes aretes que
 * `src/rooms/chapter-6/room-26.ts` — un hexagone et sa corde. Le trait se tire
 * au doigt, exactement comme dans le jeu.
 */
.slab {
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(140, 160, 255, 0.07), transparent 62%), var(--navy);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.slab svg {
  width: 100%;
  height: 100%;
}

.edge {
  stroke: rgba(233, 236, 255, 0.16);
  stroke-width: 2.4;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.25s var(--ease);
}
.edge.is-used {
  stroke: var(--signal);
  stroke-width: 3.4;
  filter: drop-shadow(0 0 6px rgba(77, 225, 255, 0.55));
}

.node {
  fill: var(--navy);
  stroke: rgba(233, 236, 255, 0.34);
  stroke-width: 2;
  transition:
    fill 0.2s var(--ease),
    stroke 0.2s var(--ease),
    r 0.2s var(--ease);
}
/*
 * Le remplissage est OPAQUE, et ce n'est pas un detail : trois chemins
 * aboutissent au coin d'or, et sous une teinte a 14 % ils traversaient le
 * disque. On lisait une petite aiguille de montre au milieu du coin qu'il faut
 * atteindre — c'est-a-dire un signe que personne n'a dessine, dans une enigme
 * ou tout ce qui est dessine compte.
 */
.node.is-gold {
  stroke: var(--gold);
  fill: #332a24;
}
.node.is-head {
  fill: var(--signal);
  stroke: var(--signal);
}
.node.is-visited {
  stroke: var(--signal);
}
.node-hit {
  fill: transparent;
  cursor: pointer;
}
.node-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  fill: var(--dim);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.node-num.is-gold {
  fill: var(--gold);
}

.slab-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(255, 92, 138, 0.3), transparent 70%);
}
.slab.is-wrong .slab-flash {
  animation: flash 0.55s var(--ease);
}
@keyframes flash {
  0% {
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.slab.is-wrong {
  animation: shake 0.42s var(--ease);
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  22% {
    transform: translateX(-7px);
  }
  55% {
    transform: translateX(6px);
  }
  80% {
    transform: translateX(-3px);
  }
}

.slab.is-solved {
  border-color: rgba(233, 169, 76, 0.5);
}
.slab.is-solved .edge.is-used {
  stroke: var(--gold);
  filter: drop-shadow(0 0 8px rgba(233, 169, 76, 0.6));
}
.slab.is-solved .node.is-visited {
  stroke: var(--gold);
}
.slab.is-solved .node.is-head {
  fill: var(--gold);
  stroke: var(--gold);
}

.puzzle-bar {
  display: grid;
  gap: 0.9rem;
  max-width: 30rem;
  margin: 1.1rem auto 0;
}
.puzzle-buttons {
  display: flex;
  gap: 0.6rem;
}
.puzzle-status {
  min-height: 3.4rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--mute);
}
.puzzle-status.is-good {
  color: var(--gold);
}
.puzzle-status.is-bad {
  color: var(--cream);
}

.ghost {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  transition:
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.ghost:hover {
  border-color: var(--line-strong);
  color: var(--cream);
}

.puzzle-foot {
  max-width: 30rem;
  margin: 1.6rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------- les enonces */

/*
 * La galerie roule horizontalement au doigt sur telephone et a la molette sur
 * ordinateur. Elle DEBORDE volontairement du conteneur : un rail qui s'arrete
 * au bord de la colonne a l'air fini, un rail qui sort du cadre dit qu'il
 * continue — et c'est ce qui fait glisser.
 */
.rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: var(--gutter);
  margin-inline: calc(-1 * var(--gutter));
  padding-bottom: 0.5rem;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar {
  display: none;
}

.plate {
  flex: 0 0 auto;
  width: min(78vw, 26rem);
  scroll-snap-align: center;
}
.plate figure {
  margin: 0;
}
.plate img {
  width: 100%;
  aspect-ratio: 1000 / 615;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy);
}
.plate figcaption {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
}
.plate .tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.plate p {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--mute);
}

.rail-hint {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.rail-hint .bar {
  position: relative;
  flex: 1;
  max-width: 12rem;
  height: 1px;
  background: var(--line);
}
.rail-hint .bar i {
  position: absolute;
  inset: -1px auto;
  height: 3px;
  width: 28%;
  background: var(--signal);
  transform: translateX(0);
}

/* ------------------------------------------------------------------ le duel */

/*
 * LA MANCHE JOUABLE DE /duel (2026-10-06). Elle remplace une reconstitution qui
 * se jouait toute seule : on regardait un duel, on le joue maintenant.
 *
 * Le cyan est « toi », le violet est l'autre, partout — les anneaux, les
 * scores, le liseré de la carte — exactement comme dans le jeu. L'or ne sert
 * qu'a la bonne reponse : c'est ce vers quoi on va.
 *
 * Tout ce qui bouge ici est TRANSITOIRE et pose par un geste (un point marque,
 * une erreur, la victoire), sauf deux choses : l'anneau de kestrel qui
 * cherche et le point de l'etiquette. Les deux ne tournent que sous
 * `.is-running`, que `site.js` retire des que la manche est close, que la carte
 * sort de l'ecran ou que l'onglet passe derriere.
 */
.clash {
  position: relative;
  display: grid;
  gap: 1.05rem;
  padding: 1rem 1rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 26px;
  background:
    radial-gradient(75% 50% at 0% 0%, rgba(77, 225, 255, 0.13), transparent 70%) padding-box,
    radial-gradient(75% 50% at 100% 0%, rgba(167, 139, 250, 0.16), transparent 70%) padding-box,
    linear-gradient(180deg, #151833, #0a0c1e) padding-box,
    linear-gradient(
        115deg,
        rgba(77, 225, 255, 0.75),
        rgba(140, 160, 255, 0.16) 42%,
        rgba(140, 160, 255, 0.16) 58%,
        rgba(167, 139, 250, 0.75)
      )
      border-box;
  box-shadow:
    0 50px 100px -45px rgba(0, 0, 0, 0.95),
    -36px 24px 90px -52px rgba(77, 225, 255, 0.6),
    36px 24px 90px -52px rgba(167, 139, 250, 0.7);
}

.clash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.clash-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid rgba(77, 225, 255, 0.35);
  border-radius: 99px;
  background: rgba(77, 225, 255, 0.09);
  color: var(--signal);
}
.clash-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.clash.is-running .clash-tag::before {
  animation: blink 1.2s ease-in-out infinite;
}
.clash-tier {
  color: var(--dim);
}

@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

/* -- les deux joueurs */

.clash-fighters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}
.fighter {
  --c: #4de1ff;
  --glow: rgba(77, 225, 255, 0.5);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.fighter--them {
  --c: #a78bfa;
  --glow: rgba(167, 139, 250, 0.55);
}
.fighter b {
  max-width: 100%;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fighter-face {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
}
.fighter-face img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c);
  box-shadow:
    0 0 0 4px rgba(7, 7, 15, 0.85),
    0 0 36px -2px var(--glow);
  transition:
    filter 0.5s var(--ease),
    opacity 0.5s var(--ease);
}
/* L'anneau qui tourne autour de kestrel : il cherche. */
.fighter-face::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 62%, var(--c) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.clash.is-running .fighter--them .fighter-face::before {
  opacity: 1;
  animation: spin 1.1s linear infinite;
}
/* L'onde d'un point marque. */
.fighter-face::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--c);
  opacity: 0;
  pointer-events: none;
}
.fighter.is-scored .fighter-face::after {
  animation: ring 0.8s var(--ease);
}
/* Le perdant s'eteint, a la fin seulement. */
.clash[data-result='win'] .fighter--them img,
.clash[data-result='lose'] .fighter--you img {
  filter: grayscale(0.85) brightness(0.6);
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}
@keyframes ring {
  from {
    transform: scale(1);
    opacity: 0.9;
  }
  to {
    transform: scale(1.75);
    opacity: 0;
  }
}

.clash-mid {
  display: grid;
  place-items: center;
  min-width: 5.6rem;
}
.clash-vs {
  font-family: var(--mono);
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  background: linear-gradient(100deg, var(--signal), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(140, 160, 255, 0.5));
}
.clash-score {
  display: none;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.clash-score span {
  display: inline-block;
}
.clash-score i {
  font-style: normal;
  font-size: 1.3rem;
  color: var(--dim);
}
#duelYouScore {
  color: var(--signal);
}
#duelThemScore {
  color: var(--violet);
}
.clash-score .is-pop {
  animation: pop 0.55s var(--ease);
}
.clash:not([data-phase='idle']) .clash-vs {
  display: none;
}
.clash:not([data-phase='idle']) .clash-score {
  display: flex;
}
.clash[data-phase='end'] .clash-score {
  font-size: 2.9rem;
}

@keyframes pop {
  35% {
    transform: scale(1.5);
  }
}

/* -- les quatre etats : l'invitation, la manche, la reponse, la fin */

.clash-round,
.clash-end {
  display: none;
}
.clash[data-phase='play'] .clash-round,
.clash[data-phase='reveal'] .clash-round,
.clash[data-phase='end'] .clash-end {
  display: grid;
}
.clash:not([data-phase='idle']) .clash-invite {
  display: none;
}

.clash-invite,
.clash-end {
  justify-items: center;
  gap: 0.7rem;
  text-align: center;
}
.clash-invite {
  display: grid;
}
.clash-title {
  margin: 0;
  font-size: clamp(1.35rem, 5.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.clash-text {
  margin: 0;
  max-width: 26rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--mute);
}
.clash-invite .btn {
  width: 100%;
  margin-top: 0.35rem;
}
.clash-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--dim);
}
/* Sans script, rien ne doit pretendre marcher : l'invitation reste lisible,
   son bouton disparait. */
html:not(.js) #duelAccept {
  display: none;
}

.clash-round {
  gap: 0.75rem;
  text-align: center;
}
.clash-round .kind {
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
/* La place de l'enonce le plus long est reservee : le pave ne doit pas sauter
   d'une manche a l'autre sous le pouce. */
.clash-round .q {
  display: grid;
  align-items: center;
  min-height: 5.9em;
  margin: 0 auto;
  max-width: 30rem;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--cream);
}
.clash-round .q:focus {
  outline: none;
}

.clash-entry {
  display: grid;
  place-items: center;
  height: 3.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(3, 3, 8, 0.55);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5);
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.clash-display {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.clash-display b {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(233, 169, 76, 0.45);
}
.clash-display s {
  font-size: 1.3rem;
  color: var(--danger, #ff6b81);
  opacity: 0.85;
}
/* Le curseur : il ne clignote que pendant qu'on cherche, a l'ecran. */
.clash[data-phase='play'] .clash-display:empty::after {
  content: '';
  width: 2px;
  height: 1.7rem;
  align-self: center;
  background: var(--signal);
}
.clash.is-running .clash-display:empty::after {
  animation: blink 1s steps(1) infinite;
}
.clash[data-outcome='you'] .clash-entry {
  border-color: rgba(46, 230, 168, 0.65);
  background: rgba(46, 230, 168, 0.08);
}
.clash[data-outcome='wrong'] .clash-entry,
.clash[data-outcome='them'] .clash-entry {
  border-color: rgba(167, 139, 250, 0.6);
  background: rgba(167, 139, 250, 0.08);
}
.clash-entry.is-wrong {
  animation: shake 0.42s var(--ease);
}

.clash-pad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}
.clash[data-phase='reveal'] .clash-pad button:not(.clash-ok) {
  opacity: 0.28;
  pointer-events: none;
}
.clash-pad button {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(140, 160, 255, 0.07);
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  touch-action: manipulation;
  transition:
    background 0.15s var(--ease),
    border-color 0.15s var(--ease),
    transform 0.12s var(--ease);
}
.clash-pad button:hover {
  border-color: var(--line-strong);
  background: rgba(140, 160, 255, 0.12);
}
.clash-pad button:active,
.clash-pad button.is-down {
  transform: scale(0.94);
  background: rgba(77, 225, 255, 0.18);
}
.clash-erase svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.clash-pad .clash-ok {
  grid-column: span 4;
  border: 0;
  font-family: var(--display);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: #05060d;
  background: linear-gradient(100deg, #4de1ff, #8fb4ff 55%, #a78bfa);
  box-shadow: 0 10px 30px -12px rgba(77, 225, 255, 0.7);
}
.clash-pad .clash-ok:hover {
  background: linear-gradient(100deg, #6fe8ff, #a3c2ff 55%, #b8a1fb);
}
.clash-pad .clash-ok[disabled] {
  opacity: 0.35;
  box-shadow: none;
  cursor: default;
}

.clash-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 1.6rem;
  text-align: left;
}
.clash-foot {
  margin: 0;
  max-width: none;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--mute);
}
.clash[data-outcome='you'] .clash-foot {
  color: var(--success);
}
.clash[data-outcome='wrong'] .clash-foot,
.clash[data-outcome='them'] .clash-foot {
  color: var(--violet);
}
.clash-clock {
  flex: none;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
}

.clash-end {
  padding-top: 0.2rem;
}
/* Dans la carte, les deux badges tiennent cote a cote a condition de serrer
   leur marge : la carte est plus etroite que la page. */
.clash-end .cta-row {
  justify-content: center;
  margin-top: 0.5rem;
}
.clash-end .badge {
  padding: 0.15rem;
}
.clash-end .badge img {
  height: 40px;
}
.clash-end .link-more {
  margin-top: 0;
}

/* La gerbe du vainqueur : une fois, au-dessus du score. */
.clash-burst {
  position: absolute;
  left: 50%;
  top: 6rem;
  width: 0;
  height: 0;
  pointer-events: none;
}
.clash-burst i {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--k, #ffd58a);
  opacity: 0;
  animation: burst 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0s) forwards;
}

@keyframes burst {
  0% {
    opacity: 1;
    transform: rotate(var(--a)) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--a)) translateY(calc(var(--r, 120px) * -1)) scale(0.5) rotate(160deg);
  }
}

/* Les trois paliers, avec les VRAIS montants de `scoring.ts`. */
.tiers {
  display: grid;
  gap: 0.8rem;
}
.tier {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem 0.75rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(233, 169, 76, 0.08), transparent 60%), var(--navy);
}
/* La jauge : un, deux, trois crans. Elle dit l'ecart entre les trois sans
   qu'on ait a lire les mots. */
.gauge {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}
.gauge i {
  width: 5px;
  border-radius: 2px;
  background: var(--line-strong);
}
.gauge i:nth-child(1) {
  height: 7px;
}
.gauge i:nth-child(2) {
  height: 11px;
}
.gauge i:nth-child(3) {
  height: 16px;
}
.gauge[data-level='1'] i:nth-child(1),
.gauge[data-level='2'] i:nth-child(-n + 2),
.gauge[data-level='3'] i {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(233, 169, 76, 0.5);
}
.tier b {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.tier .lv {
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--mute);
  grid-column: 1 / -1;
}
.tier .coins {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gold);
}
.tier .coins svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* ------------------------------------------------------- ouverture de page */

/*
 * Les deux pages de mode s'ouvrent sur du TEXTE, pas sur une image plein cadre.
 * L'accueil a deja depense l'effet ; refaire un grand hero ici ferait trois
 * pages qui commencent pareil, et surtout retarderait ce qu'on est venu lire.
 */
.page-hero {
  padding-block: calc(4.5rem + var(--band) * 0.55) calc(var(--band) * 0.45);
  background:
    radial-gradient(80% 60% at 12% 0%, rgba(140, 160, 255, 0.09), transparent 60%), var(--night);
}
.page-hero h1 {
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  margin-bottom: 1.2rem;
  max-width: 16ch;
}
.page-hero .lead {
  max-width: 40rem;
}

/* -------------------------------------------------------------- les modes */

/*
 * LE CHOIX, ET C'EST LA RAISON D'ETRE DE L'ACCUEIL.
 *
 * Deux cartes de meme poids, cote a cote des qu'il y a la place. Elles doivent
 * se lire comme DEUX JEUX et non comme deux fonctionnalites : d'ou une image
 * pleine pour chacune, un tag qui dit avec qui l'on joue, et aucune hierarchie
 * entre les deux — ni ordre de lecture privilegie, ni couleur d'accent qui
 * ferait preferer l'une.
 *
 * Le cyan reste a « toi » et le violet a l'adversaire, exactement comme dans le
 * jeu : c'est la seule couleur que la carte du duel emprunte.
 */
.fork {
  display: grid;
  gap: 1rem;
}
.mode {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition:
    border-color 0.35s var(--ease),
    transform 0.35s var(--ease),
    background 0.35s var(--ease);
}
.mode:hover,
.mode:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.mode-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy);
}
.mode-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
  filter: saturate(0.86) brightness(0.8);
  transition:
    filter 0.5s var(--ease),
    transform 0.6s var(--ease);
}
.mode:hover .mode-media img {
  filter: saturate(1) brightness(0.92);
  transform: scale(1.03);
}

/* La carte du duel n'a pas de decor a montrer : elle montre les deux joueurs.
   Deux pastilles du jeu, l'une cyan l'autre violette, et rien entre elles que
   le mot qui dit ce qui se passe. */
.mode--duel .mode-media {
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 100% at 20% 50%, rgba(77, 225, 255, 0.16), transparent 70%),
    radial-gradient(60% 100% at 80% 50%, rgba(167, 139, 250, 0.16), transparent 70%), var(--navy);
}
.mode-media img.mode-face {
  position: absolute;
  top: 50%;
  width: clamp(74px, 18vw, 104px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  filter: none;
  border: 2px solid var(--line-strong);
  transition: transform 0.5s var(--ease);
}
.mode-face--you {
  left: 16%;
  transform: translate(-50%, -50%);
  border-color: rgba(77, 225, 255, 0.75);
  box-shadow: 0 0 34px rgba(77, 225, 255, 0.22);
}
.mode-face--them {
  left: 84%;
  transform: translate(-50%, -50%);
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 34px rgba(167, 139, 250, 0.22);
}
.mode:hover .mode-face--you {
  transform: translate(-58%, -50%);
}
.mode:hover .mode-face--them {
  transform: translate(-42%, -50%);
}
.mode-vs {
  position: relative;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--cream);
}

.mode-body {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 1.3rem 1.3rem 1.5rem;
}
.mode-tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.mode-body b {
  font-size: clamp(1.5rem, 4.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.mode-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--mute);
}
.mode-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
}
.mode-go::after {
  content: '→';
  transition: transform 0.3s var(--ease);
}
.mode:hover .mode-go::after {
  transform: translateX(4px);
}

/* ------------------------------------------------------- le renvoi croise */

/*
 * Chaque page de mode finit en montrant l'AUTRE. C'est ce qui rend les deux
 * moities lisibles separement sans les cloisonner : personne n'a besoin de lire
 * les duels pour trouver la campagne, et personne ne peut finir une page sans
 * savoir que l'autre existe.
 */
.cross-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition:
    border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}
.cross-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.cross-body {
  display: grid;
  align-content: center;
  gap: 0.6rem;
  padding: 1.6rem 1.4rem;
}
.cross-body .card-title {
  margin: 0;
}
.cross-body .card-title::after {
  display: none;
}
.cross-body b {
  font-size: clamp(1.4rem, 4.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.cross-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 11rem;
  background:
    radial-gradient(60% 100% at 20% 50%, rgba(77, 225, 255, 0.16), transparent 70%),
    radial-gradient(60% 100% at 80% 50%, rgba(167, 139, 250, 0.16), transparent 70%), var(--navy);
  overflow: hidden;
}
.cross-media--room {
  background: var(--navy);
}
.cross-media--room img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  filter: saturate(0.86) brightness(0.78);
}
/* Sur un telephone, la carte s'empile : le decor garde son cadrage, mais pas
   sa hauteur entiere, qui en faisait la plus grande image de la page. */
@media (max-width: 899px) {
  .cross-media--room {
    height: 12rem;
  }
}
.cross-media .mode-face {
  width: clamp(66px, 15vw, 88px);
}

/* -------------------------------------------------------------- classement */

.board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy);
  overflow: hidden;
}
.board-head,
.board-row {
  display: grid;
  grid-template-columns: 3.2rem 2.2rem 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
}
.board-head {
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-row + .board-row {
  border-top: 1px solid rgba(140, 160, 255, 0.07);
}
.board-row .rank {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dim);
  white-space: nowrap;
}
/* Le premier du tableau porte l'or, comme partout ailleurs sur la page : l'or
   est ce vers quoi on va. */
.board-row:first-child .rank {
  color: var(--gold);
}

/* Sous 700 px la grille n'a que quatre colonnes : la cinquieme cellule tomberait
   sur une ligne fantome, et la ligne du tableau ferait le double de hauteur. */
.rec {
  display: none;
}
.board-row img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}
.board-row .who {
  min-width: 0;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row .pts {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.board-row.is-you {
  background: rgba(77, 225, 255, 0.07);
  box-shadow: inset 3px 0 0 var(--signal);
}
.board-row.is-you .who,
.board-row.is-you .pts {
  color: var(--signal);
}
/* Le rang de « toi » est sur un fond teinte : le gris des autres rangs y
   tombait a 4,2:1, sous le minimum de lisibilite. */
.board-row.is-you .rank {
  color: var(--mute);
}

.board-note {
  padding: 0.8rem 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ------------------------------------------------------------- les decors */

/*
 * QUATRE IMAGES, PAS TRENTE. La version precedente alignait les trente decors
 * de l'histoire dans l'ordre de jeu, avec un resume par chapitre : c'etait le
 * sommaire du jeu, offert avant d'y avoir joue. Quatre suffisent a prouver que
 * les lieux ne se ressemblent pas ; les trente-six autres se decouvrent.
 *
 * Deux colonnes sur telephone : a une seule, les images font toute la largeur
 * et la galerie devient un defilement interminable ou l'on ne compare plus rien.
 */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}
.gallery img {
  width: 100%;
  aspect-ratio: 760 / 970;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--navy);
  filter: saturate(0.9) brightness(0.92);
  transition:
    filter 0.5s var(--ease),
    transform 0.5s var(--ease);
}
.gallery img:hover {
  filter: none;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------- les refus */

/*
 * Ce que le jeu REFUSE de faire. C'est la section la plus persuasive de la
 * page, et elle n'existe que parce que ces refus sont vrais et verifiables
 * dans le code — pas des promesses de rubrique marketing.
 *
 * Un tiret, pas une coche : une coche dit « on l'a ajoute », un tiret dit
 * « on ne le fera pas ».
 */
.refusals {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.refusal {
  display: grid;
  gap: 0.4rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.refusal b {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.refusal b::before {
  content: '—';
  color: var(--signal);
  font-weight: 400;
}
.refusal p {
  padding-left: 1.55rem;
  font-size: 0.9375rem;
  color: var(--mute);
}

/* ------------------------------------------------------------------ la fin */

.finale {
  position: relative;
  min-height: 92svh;
  display: grid;
  place-items: center;
  overflow: clip;
  text-align: center;
  border-top: 1px solid var(--line);
}
.finale-media {
  position: absolute;
  inset: 0;
}
.finale-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  /*
   * On eteint l'IMAGE, pas seulement par un voile noir par-dessus.
   *
   * Le titre et les deux badges passent sur une porte en or clair, devant un
   * ciel blanc. Un voile assez opaque pour les rendre lisibles efface la porte
   * entierement — essaye et mesure : a 0,62 au centre, il ne restait plus rien
   * a voir. Baisser la luminosite garde le CONTRASTE LOCAL : la porte reste
   * une porte, ses moulures se lisent, et le voile n'a plus qu'a finir le
   * travail sur les bords.
   */
  filter: brightness(0.66) contrast(1.04);
}
.finale-scrim {
  position: absolute;
  inset: 0;
  /*
   * La Porte est de l'AMBIANCE, pas une illustration a admirer : le titre et
   * les deux badges passent dessus, et elle est en or clair sur ciel blanc.
   * Mesure sur 1440 x 900 avant ce voile : le cadrage `cover` d'une image
   * verticale ne gardait que les sept sceaux allumes, agrandis 1,6 fois, et le
   * titre devenait illisible. On l'eteint jusqu'a ce qu'il n'en reste qu'une
   * lueur — c'est aussi ce que la derniere image du jeu fait.
   */
  background:
    radial-gradient(72% 58% at 50% 46%, rgba(3, 3, 8, 0.18), rgba(3, 3, 8, 0.86) 100%),
    linear-gradient(
      to bottom,
      rgba(3, 3, 8, 0.72),
      rgba(3, 3, 8, 0.12) 28%,
      rgba(7, 7, 15, 0.96) 99%
    );
}
.finale-body {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  padding: var(--band) var(--gutter);
}
.finale-body p {
  margin-inline: auto;
}
/* Le carton de film de la fin est CENTRE : son filet, qui sert a pousser le
   titre de section vers la gauche, n'aurait la qu'une moitie et se lirait
   comme un trait oublie. */
.finale .card-title::after {
  display: none;
}
.finale .cta-row {
  justify-content: center;
}

/* ------------------------------------------------------------------- pied */

.foot {
  padding: 2.6rem var(--gutter) calc(2.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--void);
}
.foot-in {
  display: grid;
  gap: 1.6rem;
  max-width: var(--page);
  margin-inline: auto;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.foot-links a:hover {
  color: var(--cream);
}
.foot-legal {
  font-size: 0.8125rem;
  color: var(--dim);
  max-width: 34rem;
}

/* --------------------------------------------------------- l'enigme du jour */

/*
 * La page qu'on RECOIT, pas celle qu'on trouve.
 *
 * Elle est plus etroite que le reste du site : un enonce se lit en colonne, et
 * celui qui ouvre ce lien n'est pas venu visiter — il est venu resoudre. Tout
 * ce qui n'est pas l'enigme attend en dessous.
 */
.defi {
  display: grid;
  gap: 0;
  max-width: 34rem;
  margin-inline: auto;
  padding: calc(4.5rem + 1.5rem) var(--gutter) 0;
}

.daily-card {
  padding: 1.5rem 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(140, 160, 255, 0.07), transparent 62%),
    var(--navy);
}
.daily-card h1 {
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  margin-bottom: 0.5rem;
}
.daily-card .lead {
  font-size: 1rem;
}
.daily-card.is-solved {
  border-color: rgba(46, 230, 168, 0.45);
}
.daily-card.is-wrong {
  animation: shake 0.42s var(--ease);
}
.daily-card--empty {
  text-align: left;
}

.daily-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}
.daily-chip {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(233, 236, 255, 0.05);
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 700;
}

.daily-clues {
  display: grid;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}
.daily-clues li {
  padding: 0.6rem 0.8rem;
  border-left: 2px solid var(--line-strong);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--cream);
}

.daily-label {
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}

.daily-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}
.daily-slot {
  display: grid;
  place-items: center;
  min-width: 3rem;
  height: 3rem;
  padding-inline: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(3, 3, 8, 0.35);
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
}
.daily-slot.is-filled {
  border-color: var(--signal);
  background: rgba(77, 225, 255, 0.08);
}

/* Les touches font 52 points : c'est un pave numerique qu'on tape au pouce,
   pas une rangee de liens. */
.daily-pad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.daily-key {
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding-inline: 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(233, 236, 255, 0.045);
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cream);
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.12s var(--ease);
}
.daily-key:hover {
  border-color: var(--signal);
  background: rgba(77, 225, 255, 0.1);
}
.daily-key:active {
  transform: scale(0.94);
}
.daily-pad.is-done .daily-key {
  opacity: 0.35;
  pointer-events: none;
}

.daily-verdict {
  min-height: 1.6rem;
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--mute);
}
.daily-verdict.is-good {
  color: var(--success);
  font-weight: 500;
}
.daily-verdict.is-bad {
  color: var(--danger);
}

.daily-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

/* -------------------------------------------------- les figures de l'enonce */

/*
 * Ce que l'application DESSINE, la page le dessine aussi.
 *
 * Les phrases seules cassaient au moins une famille — voir `figures.js`. Ces
 * classes sont l'exact pendant des styles de `src/components/daily/`, et leurs
 * couleurs viennent des memes roles : la creme pour la matiere, l'or pour ce
 * qui compte, le vert pour ce qui est juste.
 */
.daily-figure {
  list-style: none;
  margin-top: 0.9rem;
  padding-left: 0;
  border-left: 0;
}
.daily-figure::marker {
  content: '';
}

.fig-svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
.fig-wood {
  fill: var(--cream);
}
.fig-head {
  fill: var(--gold);
}
.fig-shackle {
  fill: none;
  stroke: var(--dim);
  stroke-width: 5;
}
.fig-body {
  fill: rgba(140, 160, 255, 0.1);
  stroke: var(--dim);
  stroke-width: 1.6;
}
.fig-window {
  fill: rgba(10, 14, 30, 0.55);
  stroke: var(--gold);
  stroke-width: 1.6;
}
.fig-face {
  stroke: var(--dim);
  stroke-width: 1.4;
}
.fig-mark {
  fill: var(--cream);
  font-family: var(--display, inherit);
  font-weight: 600;
}

/* Les tableaux — cadenas, interrupteurs, tournoi — partagent leur grille. */
.fig-table {
  margin-top: 0.6rem;
}
.fig-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding-block: 0.32rem;
}
.fig-ruled {
  border-top: 1px solid var(--line);
}
.fig-lead {
  flex: 1 1 auto;
}
.fig-guess {
  font-family: var(--mono);
  letter-spacing: 0.16em;
  color: var(--cream);
}
.fig-num {
  flex: 0 0 5rem;
  text-align: center;
  font-weight: 500;
}
.fig-corner {
  flex: 0 0 2.2rem;
}
.fig-cell {
  flex: 1 1 1.7rem;
  text-align: center;
}
.fig-total {
  flex: 0 0 2.5rem;
  text-align: center;
  font-weight: 500;
}
.fig-good {
  color: var(--success);
}
.fig-warm {
  color: var(--gold);
}
.fig-dim {
  color: var(--mute);
}
.fig-faint {
  color: var(--dim);
}
.fig-strong {
  color: var(--cream);
  font-weight: 700;
}
.fig-legend,
.fig-scoring {
  font-size: 0.8125rem;
  color: var(--mute);
}
.fig-legend {
  margin-top: 0.35rem;
}
.fig-scoring {
  margin-bottom: 0.4rem;
  color: var(--cream);
  line-height: 1.45;
}

.fig-cubes {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.7rem;
}
.fig-cube {
  flex: 1 1 30%;
  min-width: 0;
}

/*
 * LA BALANCE. Le fleau porte l'information : c'est LUI qui penche, les
 * plateaux ne font que suivre. Deux signaux pour la meme chose, parce qu'une
 * inclinaison de neuf degres seule se rate sur un petit ecran.
 */
.fig-scales {
  margin-top: 0.6rem;
}
.fig-scale-row {
  padding-block: 0.55rem;
}
.fig-scale {
  display: flex;
  align-items: center;
}
.fig-pan {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(140, 160, 255, 0.07);
  color: var(--cream);
  letter-spacing: 0.2em;
}
.fig-pivot {
  flex: 0 0 3.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 0.3rem;
}
.fig-beam {
  width: 44px;
  height: 3px;
  border-radius: 1.5px;
  background: var(--mute);
}
.fig-fulcrum {
  margin-top: 1px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--dim);
}

/*
 * LES TOURS, repliees par defaut : la plupart des joueurs connaissent deja la
 * regle, et la leur reimposer coute plus qu'elle ne rapporte.
 */
.fig-towers {
  margin-top: 0.2rem;
}
.fig-rule {
  color: var(--cream);
  line-height: 1.45;
}
.fig-toggle {
  margin-top: 0.35rem;
  padding: 0.35rem 0;
  background: none;
  border: 0;
  color: var(--gold);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.fig-board {
  margin-top: 0.4rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.fig-tower-figure {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.fig-eye {
  margin-top: 2.1rem;
  color: var(--gold);
}
.fig-tower-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
}
.fig-tower {
  width: 14px;
  border-radius: 2px;
  background: rgba(140, 160, 255, 0.13);
}
.fig-tower-seen {
  background: var(--gold);
}
.fig-caption {
  margin-top: 0.55rem;
  font-size: 0.8125rem;
  color: var(--mute);
}

/*
 * QUI DEFIE, sous le titre de l'enigme.
 *
 * En ambre, la couleur que le site reserve a ce qui interpelle : c'est la
 * seule phrase de la page qui s'adresse au lecteur plutot que de decrire
 * l'enigme.
 */
.defi-from {
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--gold);
}

/*
 * LE FACE-A-FACE, revele d'un coup quand la manche du visiteur se termine.
 *
 * Un filet le detache du clavier : ce n'est plus le jeu, c'est le resultat.
 * Rien ici n'existe avant la reponse — le temps de l'autre apprendrait la
 * difficulte de l'enigme, donc aiderait.
 */
.defi-face {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.3rem;
}
.defi-face-mine {
  font-family: var(--mono);
  font-size: 1.0625rem;
  color: var(--cream);
}
.defi-face-theirs {
  font-size: 0.9375rem;
  color: var(--mute);
}
.defi-face-theirs:empty,
.defi-face-call:empty {
  display: none;
}
.defi-face-call {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--mute);
}
.defi-face-call[data-tone='good'] {
  color: var(--success);
}

.defi-cta {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding-block: var(--band) calc(var(--band) * 0.6);
}
.defi-cta h2 {
  font-size: clamp(1.6rem, 5.5vw, 2.2rem);
}

/* ---------------------------------------------------------- page interieure */

.doc {
  max-width: 44rem;
  margin-inline: auto;
  padding: calc(5rem + var(--band) / 2) var(--gutter) var(--band);
}
.doc h1 {
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  margin-bottom: 1.6rem;
}
.doc h2 {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  margin: 2.6rem 0 0.9rem;
}
.doc p,
.doc li {
  max-width: none;
  color: var(--mute);
  margin-bottom: 0.9rem;
}
.doc ul {
  padding-left: 1.1rem;
}
.doc .card-title {
  margin-bottom: 1rem;
}
.doc .card-title::after {
  transform: scaleX(1);
}

/* -------------------------------------------------------------- largeurs */

@media (min-width: 700px) {
  .count {
    grid-template-columns: repeat(4, 1fr);
  }
  .tiers {
    grid-template-columns: repeat(3, 1fr);
  }
  .refusals {
    grid-template-columns: 1fr 1fr;
    column-gap: 3rem;
  }
  .board-head,
  .board-row {
    grid-template-columns: 3rem 2.6rem 1fr 5rem 4rem;
  }
  .rec {
    display: block;
    text-align: right;
  }
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  /*
   * LE HERO SE COUPE EN DEUX SUR GRAND ECRAN, et ce n'est pas un gout : c'est
   * une contrainte de RESOLUTION.
   *
   * Les deux plans sont natifs en 720 x 1280 — ce sont des images de
   * cinematique, et le jeu est vertical. Etale plein cadre sur 1440 px de
   * large, il faut les agrandir de 1,33x et on ne voit plus qu'une bande
   * horizontale molle de la chambre. Enferme dans une colonne de la moitie de
   * la largeur, le meme fichier est REDUIT — donc net — et la piece se lit
   * enfin en entier, comme sur un telephone.
   *
   * Le texte prend l'autre moitie, sur le noir, ou il n'a besoin d'aucun voile
   * pour etre lisible.
   */
  .seam {
    inset: 0 0 0 50%;
  }
  .hero-scrim {
    background: linear-gradient(
      to right,
      var(--night) 46%,
      rgba(7, 7, 15, 0.55) 53%,
      rgba(7, 7, 15, 0) 66%
    );
  }
  .hero-body {
    align-self: center;
    padding-bottom: 0;
  }
  .finale-media img {
    object-position: 50% 24%;
  }
  .hero h1 {
    font-size: clamp(2.9rem, 4.8vw, 5rem);
  }
  .hero-eyebrow,
  .hero h1,
  .hero-lead,
  .hero .cta-row,
  .hero .link-more {
    max-width: min(30rem, 42vw);
  }
  .hero-lead {
    max-width: min(26rem, 40vw);
  }
  .split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
  }
  /*
   * Sur grand ecran, la dalle se met a COTE du texte et non dessous.
   *
   * Empilee, elle se retrouvait centree dans une colonne de 1240 px pendant
   * que tout le reste etait cale a gauche : la figure avait l'air d'avoir
   * glisse. Les zones nommees gardent l'ordre du document — donc l'ordre de
   * lecture au clavier et au lecteur d'ecran reste consigne, dalle, message.
   */
  #enigme > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      'head slab'
      'bar  slab'
      'foot slab';
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(2.5rem, 6vw, 5rem);
    align-items: start;
  }
  .puzzle-head {
    grid-area: head;
    margin-bottom: 1.4rem;
  }
  .slab {
    grid-area: slab;
    align-self: center;
    max-width: none;
    margin-inline: 0;
  }
  .puzzle-bar {
    grid-area: bar;
    margin-inline: 0;
    max-width: none;
  }
  .puzzle-foot {
    grid-area: foot;
    margin-inline: 0;
    max-width: none;
    align-self: start;
  }
  .foot-in {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .fork {
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
  }
  .cross-card {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }
  .cross-body {
    padding: 2.2rem 2.4rem;
  }
  .page-hero {
    padding-block: calc(5rem + var(--band) * 0.6) calc(var(--band) * 0.5);
  }
  /* Quatre decors sur une seule ligne : c'est la comparaison qui compte, et
     deux rangees de deux la coupent en deux. */
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1100px) {
  .plate {
    width: 30rem;
  }
}

/* ---------------------------------------------------- ecrans courts/etroits */

/*
 * Un iPhone SE fait 568 points de haut, et le hero doit y tenir ENTIER — titre,
 * chapo, deux badges et le lien. Mesure sur 320 x 568 avant cette regle : le
 * bloc de texte remontait jusqu'en haut de l'image, qui ne se voyait plus. Ce
 * sont les seuls telephones ou la typographie doit ceder ; ailleurs elle est
 * deja calee au viewport.
 */
@media (max-width: 899px) and (max-height: 730px) {
  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }
  .hero-lead {
    margin-top: 0.85rem;
    font-size: 1rem;
  }
  .hero-eyebrow {
    margin-bottom: 0.7rem;
  }
  .hero .cta-row {
    margin-top: 1.3rem;
  }
  .hero-body {
    padding-bottom: 1.6rem;
  }
  .seam-grip {
    top: 34%;
  }
}

/* Sous 360 points, les deux badges ne tiennent cote a cote qu'en resserrant. */
@media (max-width: 359px) {
  .badge {
    padding: 0.2rem;
  }
  .badge img {
    height: 40px;
  }
}

/* ------------------------------------------------------ mouvement reduit */

/*
 * Le reglage systeme est respecte partout, et il ne CASSE rien : la couture
 * reste deplacable, l'enigme reste jouable, la boucle du duel s'arrete sur une
 * manche lisible. Un site qui devient inutilisable sans animation a mis son
 * contenu dans l'animation.
 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .card-title::after {
    transform: scaleX(1);
  }
  .seam-grip::before {
    display: none;
  }
}

/* ==========================================================================
 * L'ACCUEIL REFAIT ET LE DEFI DU JOUR (2026-10-06)
 *
 * Tout ce bloc est mobile d'abord, comme le reste : juste a 360 points, et les
 * media queries du bas n'ajoutent que de la largeur.
 *
 * LA REGLE DE L'OR TIENT TOUJOURS : il ne sert qu'a ce vers quoi on va. Ici
 * c'est le defi du jour, le seul endroit du site ou l'on JOUE. Le degrade
 * cyan → violet est celui du bouton principal du jeu (« Lancer la partie ») :
 * il ne sert qu'a telecharger.
 * ========================================================================== */

:root {
  /* Utilisee par `.daily-verdict.is-bad` depuis toujours et jamais definie :
     « Ce n'est pas ça » s'affichait dans la couleur du texte courant. */
  --danger: #ff6b81;
}

/* `hidden` doit gagner contre tout `display` ecrit plus bas : la porte, le
   resultat et l'appel a telecharger sont des grilles, et restaient affiches. */
[hidden] {
  display: none !important;
}

/* ----------------------------------------------------------------- boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 0.6rem 1.35rem;
  border-radius: 16px;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.btn:active {
  transform: scale(0.97);
}
.btn--go {
  border: 0;
  color: #05060d;
  background: linear-gradient(100deg, #4de1ff 0%, #8fb4ff 55%, #a78bfa 100%);
  box-shadow:
    0 10px 34px -10px rgba(77, 225, 255, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--go:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 44px -10px rgba(120, 190, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--gold {
  border: 0;
  color: #1a1206;
  background: linear-gradient(100deg, #ffd58a 0%, #e9a94c 100%);
  box-shadow: 0 10px 30px -12px rgba(233, 169, 76, 0.8);
}
.btn--line {
  border: 1px solid var(--line-strong);
  background: rgba(233, 236, 255, 0.04);
  color: var(--cream);
  font-weight: 500;
  font-size: 0.9375rem;
}
.btn--line:hover {
  border-color: var(--signal);
  background: rgba(77, 225, 255, 0.08);
}
.btn--sm {
  min-height: 44px;
  padding: 0.4rem 1.05rem;
  border-radius: 13px;
  font-size: 0.9375rem;
}
.btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.only-desk {
  display: none;
}

/* ------------------------------------------------------------ le telephone */

/*
 * Un cadre, et une vraie capture dedans. La capture fait 540 x 1170 : le cadre
 * prend ce rapport, donc `cover` n'a rien a rogner.
 */
.phone {
  position: relative;
  flex: none;
  width: min(62vw, 268px);
  aspect-ratio: 540 / 1170;
  padding: 6px;
  border-radius: 36px;
  background: linear-gradient(155deg, #3a4170 0%, #14162c 38%, #05060d 100%);
  box-shadow:
    0 0 0 1px rgba(170, 185, 255, 0.22),
    0 40px 90px -30px rgba(0, 0, 0, 0.95),
    0 0 120px -30px rgba(110, 150, 255, 0.55);
}
.phone img {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: cover;
  border-radius: 30px;
  background: var(--navy);
}
.phone[data-cycle] img {
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}
.phone[data-cycle] img.is-on {
  opacity: 1;
}

/* -------------------------------------------------------------------- hero */

.top {
  position: relative;
  overflow: hidden;
  padding: 5.4rem var(--gutter) 0;
  background:
    linear-gradient(rgba(140, 160, 255, 0.045) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(140, 160, 255, 0.045) 1px, transparent 1px) 0 0 / 44px 100%,
    var(--night);
}
.top::after {
  /* Le quadrillage s'eteint vers le bas : il ne doit pas couper la carte du jour. */
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 9rem;
  background: linear-gradient(to bottom, transparent, var(--night));
  pointer-events: none;
}
.top-glow {
  position: absolute;
  inset: -20% -40% auto;
  height: 120%;
  background:
    radial-gradient(42% 34% at 72% 62%, rgba(167, 139, 250, 0.34), transparent 70%),
    radial-gradient(38% 30% at 30% 70%, rgba(77, 225, 255, 0.22), transparent 70%),
    radial-gradient(30% 22% at 55% 18%, rgba(233, 169, 76, 0.1), transparent 70%);
  pointer-events: none;
}
.top-in {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.4rem;
  max-width: var(--page);
  margin-inline: auto;
}
.top h1 {
  font-size: clamp(2.55rem, 11.5vw, 5.2rem);
  line-height: 0.96;
}
.top .lead {
  margin-top: 1.1rem;
  max-width: 31rem;
}
.top-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.7rem;
}
.top-actions .cta-row {
  margin-top: 0;
}
.top-phone {
  display: flex;
  justify-content: center;
  /* Le telephone depasse sous le pli : il dit qu'il y a une suite. */
  margin-bottom: -5.5rem;
}
.phone--hero {
  width: min(70vw, 300px);
  transform: rotate(-3deg);
}

/* ----------------------------------------------------------- defi du jour */

.band--today {
  position: relative;
  z-index: 2;
  border-top: 0;
  padding-block: 0 calc(var(--band) * 0.75);
}
.today {
  display: grid;
  gap: 1.1rem;
  padding: 1.3rem 1.25rem 1.35rem;
  border: 1px solid rgba(233, 169, 76, 0.5);
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(233, 169, 76, 0.2), transparent 55%),
    linear-gradient(180deg, #171a36, #0d0f22);
  box-shadow:
    0 30px 70px -30px rgba(0, 0, 0, 0.9),
    0 0 60px -24px rgba(233, 169, 76, 0.55);
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.today:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
}
.today-date {
  display: inline-grid;
  justify-items: center;
  align-content: center;
  width: 4.3rem;
  height: 4.6rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffd58a, #e9a94c);
  color: #1a1206;
  line-height: 1;
}
.today-date b {
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.today-date span {
  margin-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.today-body {
  display: grid;
  gap: 0.45rem;
}
.today-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.today-body b {
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.today-text {
  color: var(--mute);
  font-size: 0.9375rem;
}
.today.is-done {
  border-color: rgba(46, 230, 168, 0.45);
}

/* ------------------------------------------------- une section et ses ecrans */

.feat {
  display: grid;
  /* `minmax(0, …)` et non `1fr` nu : les deux telephones cote a cote sont plus
     larges que l'ecran, et une piste `auto` s'elargirait a leur mesure — tout
     le texte de la section sortait alors par la droite. */
  grid-template-columns: minmax(0, 1fr);
  gap: 2.6rem;
}
.feat h2 {
  font-size: clamp(2rem, 8.4vw, 3.6rem);
}
.feat .lead {
  margin-top: 1.1rem;
}
.feat-phones {
  display: flex;
  justify-content: center;
}
.phone--tilt {
  transform: rotate(3deg);
}
.feat-phones--duo {
  position: relative;
  justify-content: center;
  padding-bottom: 2.4rem;
}
.feat-phones--duo .phone {
  width: min(48vw, 236px);
}
.feat-phones--duo .phone--back {
  transform: translate(12%, 0) rotate(-5deg);
  opacity: 0.92;
}
.feat-phones--duo .phone--front {
  transform: translate(-12%, 2.4rem) rotate(4deg);
  z-index: 1;
}

.ways3 {
  display: grid;
  gap: 0.7rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
}
.ways3 li {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--signal);
  border-radius: 4px 14px 14px 4px;
  background: var(--surface);
}
.ways3 li:nth-child(2) {
  border-left-color: var(--violet);
}
.ways3 li:nth-child(3) {
  border-left-color: var(--success);
}
.ways3 b {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.ways3 span {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ticks {
  display: grid;
  gap: 0.6rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 1rem;
  line-height: 1.45;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.32em;
  width: 0.85rem;
  height: 0.45rem;
  border-left: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}
.link-more--go {
  margin-top: 1.1rem;
}
.link-more--go::after {
  content: '→';
}
.link-more--go:hover::after {
  transform: translateX(3px);
}

/* ------------------------------------------------------------ les tuiles */

.tiles {
  display: grid;
  gap: 0.75rem;
}
.tile {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding: 1.2rem 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(140, 160, 255, 0.1), transparent 60%), var(--navy);
}
.tile b {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.tile span {
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.tile--gold {
  border-color: rgba(233, 169, 76, 0.45);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(233, 169, 76, 0.16), transparent 60%), var(--navy);
}
.tile--gold b {
  color: #ffd58a;
}

.tile--link {
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.tile--link:hover {
  transform: translateY(-3px);
  border-color: var(--signal);
}
.tile--link .link-more {
  color: var(--signal);
  margin-top: 0.4rem;
}

.faces {
  margin-top: 2.2rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.faces-row {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  margin-inline: auto;
}
.faces-row img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}
.faces-note {
  margin-top: 0.9rem;
  text-align: center;
}

.qr {
  margin: 1.6rem auto 0;
  width: 132px;
  height: 132px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
}

/* ------------------------------------------------------ la barre du bas */

.getbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  display: flex;
  align-items: center;
  /* L'ecart se resserre sur les petits telephones. Le badge Google Play (135 px)
     est plus large que le bouton qu'il remplace : a 360 px, « Gratuit · iOS et
     Android » perdait ses deux dernieres lettres sous des points de suspension.
     Le badge garde ses 40 px, le minimum qu'Apple impose au sien. */
  gap: clamp(0.5rem, 2.2vw, 0.7rem);
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-strong);
  background: rgba(8, 9, 20, 0.94);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease);
}
.getbar.is-up {
  transform: none;
}
.getbar > img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.getbar-text {
  display: grid;
  margin-right: auto;
  line-height: 1.2;
  min-width: 0;
}
.getbar-text b {
  font-size: 0.95rem;
}
.getbar-text span {
  font-size: 0.75rem;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.getbar-cta {
  flex: none;
  display: flex;
}
.getbar .badge {
  padding: 0;
}
.getbar .badge img {
  height: 40px;
}

/* Trois liens tiennent sur un telephone a condition que le nom s'efface : la
   marque reste, par son icone. */
.nav-links a {
  white-space: nowrap;
}
@media (max-width: 479px) {
  .nav {
    gap: 0.7rem;
  }
  .nav .brand span {
    display: none;
  }
  .nav-links {
    gap: 0.75rem;
    letter-spacing: 0.12em;
  }
}

/* Le lien du defi du jour, dans la barre du haut : c'est le seul en or. */
.nav-links .nav-day {
  color: var(--gold);
}
.nav-links .nav-day::after {
  background: var(--gold);
}

/* --------------------------------------------------- /jour : le defi du jour */

.jour {
  padding-bottom: 2rem;
}
.jour-gate {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
  border-color: rgba(233, 169, 76, 0.5);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(233, 169, 76, 0.18), transparent 58%), var(--navy);
  box-shadow: 0 0 70px -30px rgba(233, 169, 76, 0.6);
}
.jour-gate h1 {
  font-size: clamp(2.1rem, 9vw, 3rem);
  margin: 0;
}
.jour-date {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.jour-gate .btn {
  width: 100%;
  margin-top: 0.5rem;
}
.jour-note {
  font-size: 0.8125rem;
  color: var(--dim);
}

.jour-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.jour-head .card-title {
  flex: 1;
  margin-bottom: 1rem;
}
.jour-chrono {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.jour #defiFace {
  display: none;
}

.daily-slot--free {
  min-width: 6.5rem;
  justify-content: start;
  letter-spacing: 0.06em;
}
.daily-key[disabled] {
  opacity: 0.3;
  pointer-events: none;
}
.daily-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 1rem;
  border-radius: 14px;
  background: linear-gradient(100deg, #4de1ff, #a78bfa);
  color: #05060d;
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 700;
}
.daily-submit[disabled] {
  opacity: 0.35;
}

.jour-result {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  margin-top: 1rem;
  padding: 1.6rem 1.3rem 1.5rem;
  border: 1px solid rgba(46, 230, 168, 0.45);
  border-radius: 20px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(46, 230, 168, 0.14), transparent 62%), var(--navy);
  text-align: center;
}
.jour-result[data-tone='given'] {
  border-color: var(--line-strong);
  background: var(--navy);
}
.jour-result-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--success);
}
.jour-result[data-tone='given'] .jour-result-tag {
  color: var(--mute);
}
.jour-time {
  font-family: var(--mono);
  font-size: clamp(3rem, 16vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.jour-badge {
  color: var(--gold);
  font-weight: 500;
}
.jour-badge:empty {
  display: none;
}
.jour-next {
  font-size: 0.8125rem;
  color: var(--dim);
}
.jour-result .btn {
  width: 100%;
  margin-top: 0.7rem;
}

.jour-sell {
  display: grid;
  gap: 1.6rem;
  margin-top: 2.6rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}
.jour-sell h2 {
  font-size: clamp(1.75rem, 7vw, 2.4rem);
}
.jour-sell .lead {
  margin-top: 0.8rem;
  font-size: 1rem;
}
.jour-sell .ticks {
  margin-top: 1.1rem;
}
.jour-sell .btn {
  width: 100%;
  margin-top: 1.3rem;
}
.jour-sell .feat-phones {
  order: 2;
}

/* ------------------------------------------------- /solo : video et gestes */

.phone--video {
  aspect-ratio: 540 / 960;
}
.phone video {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: cover;
  border-radius: 30px;
  background: var(--navy);
}
.top--solo .top-glow {
  background:
    radial-gradient(42% 34% at 70% 60%, rgba(233, 169, 76, 0.26), transparent 70%),
    radial-gradient(38% 30% at 28% 72%, rgba(77, 225, 255, 0.2), transparent 70%);
}
/* Sous un hero dont le telephone depasse : la bande laisse la place. */
.band--after-top {
  border-top: 0;
  padding-top: calc(var(--band) + 3.5rem);
}

.steps {
  display: grid;
  gap: 2.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 1.2rem;
}
.step .phone {
  width: 100%;
  border-radius: 26px;
  padding: 4px;
}
.step .phone img {
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 22px;
}
/* Le deuxieme geste se lit dans l'autre sens : le regard zigzague, il ne
   descend pas une colonne. */
.step:nth-child(2) .phone {
  order: 2;
}
.step-body {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}
.step-n {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd58a, #e9a94c);
  color: #1a1206;
  font-family: var(--mono);
  font-weight: 700;
}
.step-body b {
  font-size: clamp(1.35rem, 5.6vw, 1.8rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.step-body p {
  margin: 0;
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.price {
  display: grid;
  gap: 0.2rem;
  margin: 2.2rem 0 0;
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(46, 230, 168, 0.4);
  border-radius: 18px;
  background: rgba(46, 230, 168, 0.07);
  text-align: center;
}
.price b {
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  letter-spacing: -0.03em;
  color: var(--success);
}
.price span {
  color: var(--mute);
}

/* ------------------------------------------------------------- largeurs */

@media (min-width: 700px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .today {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.7rem;
  }
  .top-actions {
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .only-desk {
    display: flex;
  }
  img.only-desk {
    display: block;
  }
  .only-touch,
  .getbar {
    display: none !important;
  }
  .top {
    padding-top: 7.5rem;
  }
  .top-in {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 3rem;
  }
  .top-actions {
    grid-auto-flow: row;
    justify-items: start;
    gap: 1rem;
  }
  .top-phone {
    margin-bottom: -4rem;
  }
  .phone--hero {
    width: 320px;
  }
  .feat {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 4rem;
  }
  .feat--flip .feat-copy {
    order: 2;
  }
  .feat-phones--duo .phone {
    width: 244px;
  }
  .phone--tilt {
    width: 290px;
  }
  .tiles {
    grid-template-columns: repeat(4, 1fr);
  }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
  }
  .step {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 1.6rem;
  }
  .step .phone {
    width: 230px;
    order: 0 !important;
  }
  .step-body {
    justify-items: center;
    text-align: center;
  }
  .faces-row img {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .getbar {
    transition: none;
  }
}

/* ------------------------------------------------------------- /duel */

/*
 * LE FACE-A-FACE. Le fond se coupe en deux — cyan a gauche pour « toi »,
 * violet a droite pour l'autre — le long d'un fil de lumiere en biais, et la
 * manche est posee dessus. C'est le seul endroit de la page qui ose : tout ce
 * qui suit se tait.
 */
.top--duel .top-glow {
  background:
    radial-gradient(46% 38% at 14% 72%, rgba(77, 225, 255, 0.26), transparent 70%),
    radial-gradient(46% 38% at 86% 64%, rgba(167, 139, 250, 0.32), transparent 70%),
    radial-gradient(30% 20% at 55% 12%, rgba(233, 169, 76, 0.08), transparent 70%);
}
.top--duel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    104deg,
    transparent calc(50% - 0.5px),
    rgba(233, 236, 255, 0.1) 50%,
    transparent calc(50% + 0.5px)
  );
  pointer-events: none;
}
.top-duel {
  display: grid;
  gap: 1.1rem;
  width: 100%;
  max-width: 31rem;
  margin-inline: auto;
  padding-bottom: calc(var(--band) * 0.7);
}
.top-duel-note {
  margin-inline: auto;
  max-width: 28rem;
  text-align: center;
  font-size: 0.8125rem;
}

/* Les trois facons de jouer : la grammaire des trois gestes de /solo, une
   etiquette de couleur a la place du numero — ce ne sont pas des etapes. */
.way-tag {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.way-tag--live {
  color: var(--signal);
  background: rgba(77, 225, 255, 0.08);
}
.way-tag--turn {
  color: var(--violet);
  background: rgba(167, 139, 250, 0.1);
}
.way-tag--arena {
  color: var(--success);
  background: rgba(46, 230, 168, 0.08);
}
/*
 * Sur un telephone, le texte COULE autour du telephone : ces trois textes sont
 * plus longs que les trois gestes de /solo, et une colonne de 170 points de
 * large en faisait des rubans de quinze lignes. Le telephone flotte, a gauche
 * puis a droite puis a gauche, et le texte reprend toute la largeur dessous.
 */
@media (max-width: 899px) {
  .steps--ways .step {
    display: flow-root;
  }
  .steps--ways .step .phone {
    float: left;
    width: 42%;
    margin: 0.2rem 1.1rem 0.8rem 0;
  }
  .steps--ways .step:nth-child(2) .phone {
    float: right;
    margin: 0.2rem 0 0.8rem 1.1rem;
  }
  /* `justify-items: start` de la grille d'origine REND ses enfants etroits
     jusque dans un bloc (Chrome applique l'alignement au bloc) : le titre
     prenait la largeur de ses mots, a gauche, sous le telephone — et sautait
     sous lui faute de place. `normal` lui rend toute la largeur. */
  .steps--ways .step-body {
    display: block;
    justify-items: normal;
  }
  .steps--ways .step-body b {
    display: block;
    margin: 0.75rem 0 0.55rem;
  }
}
.ways-try {
  display: flex;
  justify-content: center;
  margin: 2.4rem auto 0;
  max-width: none;
}
.ways-note {
  margin: 1.4rem auto 0;
  text-align: center;
}

/*
 * L'ECRAN VERROUILLE du « chacun son tour ». Ce mode n'a pas de capture qui le
 * raconte : ce qui le raconte, c'est la notification du matin. Tout est mesure
 * en `cqw` — en largeur du telephone — pour que l'ecran soit le meme a 130 et
 * a 230 points ; les tailles en pixels qui precedent sont le repli d'un
 * navigateur qui ne connait pas ces unites.
 */
.phone--lock {
  container-type: inline-size;
}
.lock {
  position: absolute;
  inset: 6px;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 20px 7px 0;
  padding: 19cqw 4.5cqw 0;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(1px 1px at 18% 9%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 72% 6%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 86% 15%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 34% 18%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(120% 50% at 50% 106%, rgba(233, 169, 76, 0.6), transparent 62%),
    radial-gradient(90% 38% at 50% 100%, rgba(167, 139, 250, 0.35), transparent 70%),
    linear-gradient(180deg, #04050d 0%, #0d1028 52%, #241d3d 100%);
}
.step .phone .lock {
  inset: 4px;
  border-radius: 22px;
}
.lock-time {
  font-size: 36px;
  font-size: 21cqw;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(233, 236, 255, 0.94);
}
.lock-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 5px;
  column-gap: 2.6cqw;
  width: 100%;
  margin-top: 6px;
  margin-top: 2.6cqw;
  padding: 6px 7px;
  padding: 3cqw 3.4cqw 3.2cqw;
  border-radius: 9px;
  border-radius: 4.6cqw;
  background: rgba(233, 236, 255, 0.14);
  text-align: left;
  font-size: 7px;
  font-size: 3.6cqw;
  line-height: 1.3;
  color: rgba(233, 236, 255, 0.82);
}
.lock-time + .lock-note {
  margin-top: 70px;
  margin-top: 40cqw;
}
.lock-note--old {
  opacity: 0.72;
}
.lock-icon {
  grid-row: 1 / span 3;
  align-self: start;
  width: 16px;
  width: 8.6cqw;
  aspect-ratio: 1;
  border-radius: 4px;
  border-radius: 2.2cqw;
  background: url('../img/mark-192.png') center / cover;
}
.lock-head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  gap: 2cqw;
  font-size: 6px;
  font-size: 2.9cqw;
  letter-spacing: 0.04em;
  color: rgba(233, 236, 255, 0.55);
}
.lock-head b {
  font-weight: 700;
}
.lock-title {
  font-size: 8px;
  font-size: 3.9cqw;
  font-weight: 700;
  color: #fff;
}

@media (min-width: 900px) {
  .top--duel .top-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
  .top-duel {
    margin: 0;
    padding-bottom: calc(var(--band) * 0.55);
  }
  .clash {
    padding: 1.2rem 1.25rem 1.35rem;
  }
}

@media (min-width: 700px) {
  .badge img {
    height: 48px;
  }
}

/* ------------------------------------------------- /duo : le defi entre amis */

/*
 * LE DEFI ENTRE AMIS, SANS L'APPLICATION (2026-10-06). La page reprend la
 * colonne de `/jour` et son lecteur d'enigmes ; elle ajoute une porte aux deux
 * couleurs du duel — le cyan pour soi, le violet pour l'autre — et un tableau
 * de fin a deux colonnes. L'or ne marque que le vainqueur.
 */
.duo-gate {
  display: grid;
  gap: 0.9rem;
  border-color: rgba(140, 160, 255, 0.4);
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(77, 225, 255, 0.14), transparent 60%),
    radial-gradient(90% 70% at 100% 0%, rgba(167, 139, 250, 0.16), transparent 60%),
    var(--navy);
  box-shadow: 0 0 70px -30px rgba(140, 160, 255, 0.6);
}
.duo-gate h1 {
  margin: 0;
  font-size: clamp(2rem, 8.5vw, 2.9rem);
}
.duo-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.3rem;
}
.duo-name {
  display: grid;
  gap: 0.45rem;
  font-size: 0.875rem;
  color: var(--mute);
}
.duo-name input {
  min-height: 50px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(3, 3, 8, 0.5);
  color: var(--cream);
  font: inherit;
  /* 16 points au moins : en dessous, Safari zoome la page au toucher. */
  font-size: 1.0625rem;
}
.duo-name input::placeholder {
  color: var(--dim);
}
.duo-name input:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
  border-color: transparent;
}
.duo-form .btn {
  width: 100%;
}

/* Les trois manches : un trait par enigme, qui dit ou l'on en est. */
.duo-steps {
  display: flex;
  gap: 6px;
  margin: -0.3rem 0 1rem;
}
.duo-steps i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.duo-steps i[data-state='now'] {
  background: var(--signal);
}
.duo-steps i[data-state='found'] {
  background: var(--success);
}
.duo-steps i[data-state='missed'] {
  background: var(--danger);
}
.duo #defiFace {
  display: none;
}
.duo-next {
  width: 100%;
  margin-top: 1rem;
}
.duo #defiEmpty {
  display: grid;
  gap: 0.8rem;
}

.duo-result {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  margin-top: 1rem;
  padding: 1.6rem 1.2rem 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(77, 225, 255, 0.1), transparent 60%),
    radial-gradient(90% 70% at 100% 0%, rgba(167, 139, 250, 0.12), transparent 60%),
    var(--navy);
  text-align: center;
}
.duo-result .jour-result-tag {
  color: var(--mute);
}
/* `auto-fit` : une seule colonne prend toute la largeur quand l'autre est
   cachee — le score de celui qui vient de lancer le defi. */
.duo-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.7rem;
  width: 100%;
}
.duo-col {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 1rem 0.6rem 1.05rem;
  border: 1px solid rgba(77, 225, 255, 0.35);
  border-radius: 16px;
  background: rgba(77, 225, 255, 0.06);
  min-width: 0;
}
.duo-col--b {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.07);
}
.duo-col.is-winner {
  box-shadow:
    0 0 0 2px var(--gold),
    0 0 40px -10px rgba(233, 169, 76, 0.7);
}
.duo-col p {
  margin: 0;
}
.duo-who {
  max-width: 100%;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--signal);
}
.duo-col--b .duo-who {
  color: var(--violet);
}
.duo-score {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 12vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
}
.duo-total {
  font-family: var(--mono);
  color: var(--mute);
}
.duo-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.duo-marks span {
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(46, 230, 168, 0.12);
  color: var(--success);
}
.duo-marks span[data-state='missed'] {
  background: rgba(255, 107, 129, 0.12);
  color: var(--danger);
}
.duo-call {
  margin: 0.3rem 0 0;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.duo-call:empty,
.duo-note:empty,
.duo-copied:empty {
  display: none;
}
.duo-note {
  max-width: 26rem;
}
.duo-result .btn {
  width: 100%;
}
.duo-copied {
  margin: 0;
  font-size: 0.875rem;
  color: var(--success);
}

/* ==========================================================================
 * /aide — LES QUESTIONS QU'ON NOUS POSE (2026-10-06)
 *
 * Une colonne, une recherche, cinq sujets. Chaque question est un `<details>` :
 * il s'ouvre sans script, se partage par son ancre, et le lecteur d'ecran
 * annonce son etat sans qu'on ait rien a lui dire.
 * ========================================================================== */

.help {
  max-width: 46rem;
  margin-inline: auto;
  padding: calc(5.6rem + env(safe-area-inset-top, 0px)) var(--gutter) var(--band);
}
.help .card-title {
  margin-bottom: 1.1rem;
}
.help .card-title::after {
  transform: scaleX(1);
}
.help-head h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.3rem, 9vw, 3.8rem);
}
.help-head .lead {
  max-width: 34rem;
}

.help-search {
  position: relative;
  margin-top: 1.9rem;
}
.help-search svg {
  position: absolute;
  top: 50%;
  left: 1.05rem;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--dim);
  stroke-width: 2;
  stroke-linecap: round;
  transform: translateY(-50%);
  pointer-events: none;
}
/* 16 px au moins : en dessous, iOS zoome la page au toucher du champ. */
.help-search input {
  width: 100%;
  min-height: 56px;
  padding: 0 1.1rem 0 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
  transition:
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.help-search input::placeholder {
  color: var(--dim);
  opacity: 1;
}
.help-search input:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 4px rgba(77, 225, 255, 0.12);
}

.help-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.help-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.help-topics a:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--cream);
}

.faq-section {
  margin-top: clamp(2.8rem, 8vw, 4rem);
  scroll-margin-top: 5rem;
}
.faq-section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 5vw, 1.8rem);
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  scroll-margin-top: 5.5rem;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.faq-item + .faq-item {
  margin-top: 0.6rem;
}
.faq-item[open] {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.faq-item summary {
  position: relative;
  display: block;
  padding: 1.05rem 3.4rem 1.05rem 1.15rem;
  list-style: none;
  font-size: 1.03rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--cream);
  cursor: pointer;
  border-radius: 14px;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
/* Un plus qui devient un moins : la barre verticale s'efface en tournant. */
.faq-item summary::before,
.faq-item summary::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 1.3rem;
  width: 14px;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--signal);
  transition:
    transform 0.35s var(--ease),
    opacity 0.35s var(--ease);
}
.faq-item summary::after {
  transform: rotate(90deg);
}
.faq-item[open] summary::after {
  opacity: 0;
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 1.15rem 1.2rem;
}
.faq-answer p {
  max-width: none;
  margin: 0;
  line-height: 1.6;
  color: var(--mute);
}
.faq-answer a,
.help-none a {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.faq-item[open] .faq-answer {
  animation: faq-in 0.35s var(--ease);
}
@keyframes faq-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
/* La reponse qu'on vient d'ouvrir par son lien se signale une seconde. */
.faq-item.is-target {
  animation: faq-glow 1.8s var(--ease);
}
@keyframes faq-glow {
  0%,
  35% {
    border-color: var(--signal);
    box-shadow: 0 0 0 4px rgba(77, 225, 255, 0.14);
  }
}

.help-none {
  max-width: none;
  margin: 2.6rem 0 0;
  text-align: center;
  color: var(--mute);
}
.help-none span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--cream);
}

.help-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  margin-top: clamp(3rem, 9vw, 4.5rem);
  padding: clamp(1.4rem, 5vw, 2rem);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(77, 225, 255, 0.12), transparent 55%),
    var(--navy);
}
.help-contact h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
}
.help-contact p {
  margin: 0;
  color: var(--mute);
}
@media (max-width: 479px) {
  .help-contact .btn {
    width: 100%;
  }
}

/* ==========================================================================
 * LA SAISON DU MOIS — sur l'accueil, sous les quatre modes (2026-10-06)
 *
 * Ce que le mois en cours fait gagner, calculé comme dans le jeu. L'or est la
 * couleur du pass dans le jeu, et c'est la seule carte de la page qui la porte
 * en entier : elle parle de ce qui se GAGNE.
 * ========================================================================== */

.season {
  position: relative;
  margin-top: clamp(1.6rem, 5vw, 2.4rem);
  padding: clamp(1.3rem, 5vw, 2.2rem);
  border: 1px solid rgba(233, 169, 76, 0.42);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(233, 169, 76, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(18, 20, 43, 0.96), rgba(7, 7, 15, 0.98));
  box-shadow: 0 30px 80px -40px rgba(233, 169, 76, 0.45);
}
.season[hidden] {
  display: none;
}
.season-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}
.season-eyebrow,
.season-left {
  max-width: none;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.season-eyebrow {
  font-weight: 700;
  color: var(--gold);
}
.season-left {
  color: var(--mute);
}
.season h3 {
  margin: 0.8rem 0 1.5rem;
  font-size: clamp(1.7rem, 6.5vw, 2.3rem);
}
.season-prizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.season-avatar {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin: 0;
  text-align: center;
}
.season-avatar img {
  width: clamp(92px, 27vw, 120px);
  height: clamp(92px, 27vw, 120px);
  border: 2px solid rgba(233, 169, 76, 0.7);
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 5px rgba(233, 169, 76, 0.1),
    0 18px 40px -16px rgba(233, 169, 76, 0.6);
}
/* L'avatar du palier 30 est le plus beau de la saison, et le dernier gagné. */
.season-avatar--top img {
  border-color: var(--gold);
  box-shadow:
    0 0 0 6px rgba(233, 169, 76, 0.16),
    0 0 46px rgba(233, 169, 76, 0.45);
}
.season-avatar figcaption {
  display: grid;
  gap: 0.3rem;
}
/* Ce qui vaut pour les deux avatars se dit une fois, sous les deux. */
.season-track {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0.2rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.season-avatar b {
  font-size: 1.05rem;
}
.season-avatar span,
.season-title span {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.season-titles {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(233, 169, 76, 0.22);
}
.season-titles-tag {
  max-width: none;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--mute);
}
.season-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  max-width: none;
  margin: 0;
}
.season-title b {
  font-size: 1.15rem;
  color: var(--cream);
}
.season-title--gold b {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(233, 169, 76, 0.35);
}
.season-note {
  max-width: none;
  margin: 1.4rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--dim);
}
@media (min-width: 900px) {
  .season {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    column-gap: 3rem;
  }
  .season-head,
  .season h3,
  .season-note {
    grid-column: 1 / -1;
  }
  .season-titles {
    margin-top: 0;
    padding: 0 0 0 2.6rem;
    border-top: 0;
    border-left: 1px solid rgba(233, 169, 76, 0.22);
  }
}

/* ------------------------------------------- l'image de story (2026-10-06) */

/* Le second bouton du résultat : moins fort que le partage du lien, qui reste
   le geste principal — c'est lui qui fait jouer quelqu'un d'autre. */
.btn--story {
  gap: 0.6rem;
}
.jour-result .btn--story {
  margin-top: 0.1rem;
}
.btn-icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn--story[disabled] {
  opacity: 0.55;
  pointer-events: none;
}
.jour-story-note {
  max-width: none;
  margin: 0;
  font-size: 0.875rem;
  color: var(--success);
}
.jour-story-note:empty {
  display: none;
}
.duo-result .btn--story {
  width: 100%;
}

/* ------------------------------------------- le classement en direct (2026-10-06) */

/* L'initiale d'un joueur sans avatar : le même disque que les images. */
.board-initial {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--cream);
}
/* « En direct » : un point vert qui ne clignote pas — un tableau qu'on lit n'a
   pas besoin d'une animation pour être cru. */
.board.is-live .board-note::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  vertical-align: 0.08em;
}

/* La note de l'App Store, sous les badges du haut de page. */
.store-rating {
  max-width: none;
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--mute);
}
.store-rating-star {
  color: var(--gold);
}

/* --------------------------------------------- /essai : la salle jouable (2026-10-06) */

/* Deux liens sous une section (l'accueil, « En solo ») : ils passent a la ligne
   plutot que de se coller. */
.feat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.8rem;
}

/*
 * LE TELEPHONE OU L'ON JOUE. Sur un ordinateur, le jeu tourne dans ce cadre, a
 * sa taille d'iPhone (390 x 844), et le telephone entier se reduit a la hauteur
 * que l'ecran laisse (`initEssai` pose `--essai-s`). Il n'est jamais etire : un
 * jeu dessine pour un telephone ne se joue pas en paysage.
 *
 * SUR UN TELEPHONE, la scene entiere passe en plein ecran quand on joue
 * (`.is-playing`), avec une barre « Fermer » au-dessus du jeu et jamais
 * par-dessus : le coin haut du jeu porte deja ses propres boutons.
 *
 * La condition qui separe les deux est ecrite DEUX fois, ici et dans
 * `initEssai` : `(min-width: 900px) and (min-height: 600px)`.
 */
.top--essai {
  padding-bottom: 3rem;
}
.top--essai::after {
  height: 5rem;
}
.top--essai .top-glow {
  background:
    radial-gradient(40% 34% at 72% 48%, rgba(77, 225, 255, 0.2), transparent 70%),
    radial-gradient(36% 30% at 26% 70%, rgba(233, 169, 76, 0.18), transparent 70%);
}
.essai-note,
.essai-playing {
  max-width: 28rem;
  font-size: 0.9375rem;
  color: var(--dim);
}
.essai-playing {
  display: none;
  color: var(--mute);
}
.essai-copy.is-playing [data-essai-start],
.essai-copy.is-playing .essai-note,
.essai-copy.is-ended [data-essai-start],
.essai-copy.is-ended .essai-note {
  display: none;
}
.essai-copy.is-playing .essai-playing {
  display: block;
}

.essai-stage {
  --essai-w: 390px;
  --essai-h: 844px;
  --essai-s: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.essai-bar {
  display: none;
}
.essai-phone {
  position: relative;
  width: min(72vw, 300px);
  padding: 7px;
  border-radius: 44px;
  background: linear-gradient(155deg, #3a4170 0%, #14162c 38%, #05060d 100%);
  box-shadow:
    0 0 0 1px rgba(170, 185, 255, 0.22),
    0 40px 90px -30px rgba(0, 0, 0, 0.95),
    0 0 120px -30px rgba(110, 150, 255, 0.55);
}
.essai-screen {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: 37px;
  background: var(--navy);
  /* La capture et le jeu ont le meme fond : rien ne clignote entre les deux. */
  isolation: isolate;
}
.essai-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.92);
  transition: filter 0.45s var(--ease);
}
.essai-screen:hover .essai-poster {
  filter: brightness(0.82) saturate(1);
}
.essai-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd58a 0%, #e9a94c 100%);
  box-shadow:
    0 18px 50px -12px rgba(233, 169, 76, 0.9),
    0 0 0 12px rgba(233, 169, 76, 0.16);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.essai-play svg {
  width: 36px;
  height: 36px;
  margin-left: 5px;
  fill: #1a1206;
}
.essai-play:hover {
  transform: scale(1.06);
  box-shadow:
    0 22px 56px -12px rgba(233, 169, 76, 1),
    0 0 0 16px rgba(233, 169, 76, 0.18);
}
.essai-play:active {
  transform: scale(0.95);
}
.essai-play:focus-visible {
  outline: 3px solid var(--cream);
  outline-offset: 6px;
}
.essai-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--night);
}
.essai-stage.is-playing .essai-poster,
.essai-stage.is-playing .essai-play {
  display: none;
}
/* La fin se lit sur la salle, floutee — pas sur un ecran noir. */
.essai-stage.is-ended .essai-poster {
  display: block;
  filter: brightness(0.45) blur(6px);
  transform: scale(1.06);
}

.essai-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--night);
  text-align: center;
}
.essai-loading p {
  max-width: 16rem;
  font-size: 0.9375rem;
  color: var(--mute);
}
.essai-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(233, 169, 76, 0.22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: essai-spin 0.9s linear infinite;
}
@keyframes essai-spin {
  to {
    transform: rotate(1turn);
  }
}

.essai-end {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  background: linear-gradient(180deg, rgba(7, 7, 15, 0.55), rgba(7, 7, 15, 0.9));
}
.essai-end-in {
  display: grid;
  gap: 1rem;
  justify-items: center;
  max-width: 22rem;
  margin: auto;
  text-align: center;
}
.essai-end-in > [data-end] {
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}
.essai-end-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 0.2rem;
  border-radius: 50%;
  border: 1px solid rgba(46, 230, 168, 0.5);
  background: rgba(46, 230, 168, 0.12);
  box-shadow: 0 0 40px -8px rgba(46, 230, 168, 0.6);
}
.essai-end-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--success);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.essai-end-tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}
[data-end='done'] .essai-end-tag {
  color: var(--success);
}
.essai-end h2 {
  font-size: clamp(1.65rem, 7vw, 2.05rem);
  line-height: 1.05;
}
.essai-end h2:focus {
  outline: none;
}
.essai-end-in p:not(.essai-end-tag) {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--mute);
}
.essai-end .cta-row {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
/* Les deux badges sur une ligne, a la hauteur minimale que les deux magasins
   autorisent a l'ecran (40 px) : empiles, ils poussaient « Recommencer » hors
   du telephone. */
.essai-end .badge img {
  height: 40px;
}
.essai-again {
  min-height: 46px;
}

/* Un telephone couche, en plein ecran : le jeu se joue debout. */
.essai-rotate {
  display: none;
}
.essai-rotate svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--mute);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.essai-rotate p {
  font-size: 1rem;
  color: var(--mute);
}

/* ---------------------------------------------------- en plein ecran (telephone) */

@media not all and (min-width: 900px) and (min-height: 600px) {
  .essai-stage.is-playing {
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: stretch;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
      env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--night);
  }
  .essai-stage.is-playing .essai-bar {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 54px;
    padding: 0 0.6rem 0 1.1rem;
    border-bottom: 1px solid var(--line);
  }
  .essai-bar-title {
    font-family: var(--mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mute);
  }
  .essai-close {
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: rgba(233, 236, 255, 0.05);
    color: var(--cream);
    font-family: var(--display);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
  }
  .essai-stage.is-playing .essai-phone {
    flex: 1;
    min-height: 0;
    width: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .essai-stage.is-playing .essai-screen {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
  }
  html.essai-locked,
  html.essai-locked body {
    overflow: hidden;
    overscroll-behavior: none;
  }
  /* `.top-in` porte `z-index: 1` (le texte passe devant la lueur), donc un plan
     a lui : la scene « plein ecran » y restait enfermee, SOUS la barre du site
     (z-index 80) — qui recouvrait le bouton « Fermer » et avalait ses touches.
     Le temps de la partie, ce plan disparait, et la scene passe devant tout. */
  html.essai-locked .top-in {
    z-index: auto;
  }
}

/* Couché, la hauteur passe sous 600 : c'est donc toujours le plein écran. */
@media (orientation: landscape) and (max-height: 599px) {
  .essai-stage.is-playing .essai-rotate {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.9rem;
    background: var(--night);
    text-align: center;
  }
}

/* ------------------------------------------------------- dans la page (ordinateur) */

@media (min-width: 900px) and (min-height: 600px) {
  .top--essai {
    padding-top: 6rem;
  }
  .essai-in {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 4rem;
  }
  .essai-copy {
    align-self: center;
    padding-bottom: 2rem;
  }
  .essai-phone {
    width: auto;
  }
  .essai-screen {
    width: calc(var(--essai-w) * var(--essai-s));
    height: calc(var(--essai-h) * var(--essai-s));
    aspect-ratio: auto;
    border-radius: calc(37px * var(--essai-s));
  }
  /* Le jeu garde sa taille de telephone ; seule l'echelle le rapetisse. Et tout
     ce qui se pose SUR son ecran — le chargement, la fin — se dessine a la meme
     taille et se reduit avec lui : ecrite pour un telephone, la carte de fin
     debordait d'un telephone reduit (« Volver a jugar la sala » coupe, a
     1280 x 720). `transform` ne prend pas de place : la boite de
     `.essai-screen` est ecrite plus haut, a la taille deja reduite. */
  .essai-frame,
  .essai-end,
  .essai-loading {
    inset: 0 auto auto 0;
    width: var(--essai-w);
    height: var(--essai-h);
    transform: scale(var(--essai-s));
    transform-origin: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .essai-spinner {
    animation: none;
    border-top-color: rgba(233, 169, 76, 0.22);
  }
  .essai-poster,
  .essai-play {
    transition: none;
  }
}
