/* BeEnglish, la page de la liste d'attente.
   Le brouillard du jeu (gris bleuté) et les couleurs de l'appli : rouge, marine, or du butin. */

@font-face { font-family: 'Lilita One'; src: url('/polices/lilita-one-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('/polices/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('/polices/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --brume: #D3D8E0;
  --brume-claire: #E9ECF1;
  --brume-sombre: #8E97A6;
  --marine: #1D2F57;
  --nuit: #121C36;
  --rouge: #B4232F;
  --rouge-vif: #D02F3C;
  --or: #F2B233;
  --violet: #2A1A4D;
  --vert: #1F7A4D;
  --blanc: #FFFFFF;
  --titre: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --texte: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gouttiere: clamp(16px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--brume);
  color: var(--marine);
  font: 400 1.0625rem/1.55 var(--texte);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--titre); font-weight: 400; line-height: 1.02; letter-spacing: 0.005em; margin: 0; }

/* La barre du haut */
.barre {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gouttiere) 0;
  max-width: 1180px; margin: 0 auto;
}
.marque { display: inline-flex; align-items: center; gap: 10px; font: 400 1.5rem/1 var(--titre); text-decoration: none; color: var(--marine); }
.logo {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--marine); color: var(--blanc); font: 400 1.6rem/1 var(--titre); padding-bottom: 3px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.beta { font-weight: 700; font-size: 0.875rem; color: var(--marine); background: var(--blanc); border-radius: 999px; padding: 6px 12px; }

/* L'ouverture */
.ouverture {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--gouttiere) 40px;
  display: grid; gap: 36px;
}
.ouverture h1 {
  font-size: clamp(2.6rem, 10.5vw, 5.2rem);
  color: var(--nuit);
  max-width: 13ch;
  text-wrap: balance;
}
.chapo { font-size: clamp(1.125rem, 3.6vw, 1.3125rem); margin: 20px 0 0; max-width: 34ch; }
.revelation {
  margin: 18px 0 0; max-width: 30ch;
  font: 400 clamp(1.3rem, 4.6vw, 1.75rem)/1.15 var(--titre);
  color: var(--rouge);
}

/* Le formulaire */
.liste { margin-top: 28px; max-width: 520px; }
.liste label { display: block; font-weight: 700; margin-bottom: 8px; }
.champ {
  display: flex; gap: 6px; padding: 6px;
  background: var(--blanc); border-radius: 18px;
  box-shadow: 0 2px 0 var(--brume-sombre);
}
.champ input {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font: 400 1.0625rem var(--texte); color: var(--nuit);
  padding: 12px 12px; border-radius: 12px;
}
.champ input::placeholder { color: #8A93A3; }
.champ input:focus-visible { outline: none; }
.champ:focus-within { box-shadow: 0 0 0 3px var(--or), 0 2px 0 var(--brume-sombre); }
.champ button {
  flex: none; border: 0; cursor: pointer;
  font: 400 1.125rem/1 var(--titre); letter-spacing: 0.01em;
  color: var(--blanc); background: var(--rouge);
  padding: 14px 18px; border-radius: 13px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
  transition: transform 0.08s ease, background 0.15s ease;
}
.champ button:hover { background: var(--rouge-vif); }
.champ button:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22); }
.champ button[disabled] { opacity: 0.7; cursor: progress; }
.aide { font-size: 0.9375rem; margin: 10px 0 0; color: #3D4A66; max-width: 46ch; }
.aide.erreur { color: var(--rouge); font-weight: 700; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Les mots volés par le brouillard, perdus derrière le titre */
.mots-voles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.mots-voles span {
  position: absolute; left: var(--ml, auto); right: var(--mr, auto); top: var(--my); white-space: nowrap;
  font: 400 calc(1.6rem * var(--t)) / 1 var(--titre); color: #BCC3CF;
  filter: blur(var(--f)); transform: rotate(-4deg);
}
.mots-voles .large { display: none; }
.ouverture > :not(.mots-voles) { position: relative; z-index: 1; }

/* La scène : le téléphone et le brouillard qui se lève */
.scene { position: relative; display: grid; place-items: center; }
.telephone {
  position: relative; overflow: hidden;
  width: min(300px, 76vw); aspect-ratio: 780 / 1688;
  border-radius: 38px; background: var(--nuit);
  border: 9px solid var(--nuit);
  box-shadow: 0 30px 60px -20px rgba(18, 28, 54, 0.55), 0 0 0 2px #2C3A5E;
  transform: rotate(-3deg);
}
.ecran { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 29px; }
.ecran.couleur { opacity: 0; }
.leve .ecran.couleur { animation: couleurs 1.6s ease-out 0.5s forwards; }
.sans-js .ecran.couleur { opacity: 1; }
.sans-js .brume { display: none; }
.brume {
  position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(40% 22% at 30% 35%, rgba(233, 236, 241, 0.95), transparent 70%),
    radial-gradient(45% 25% at 70% 60%, rgba(233, 236, 241, 0.9), transparent 70%),
    radial-gradient(35% 20% at 40% 80%, rgba(233, 236, 241, 0.85), transparent 70%);
}
.leve .brume { animation: brume-part 2.6s ease-in 0.2s forwards; }
.brume.b2 { transform: scaleX(-1); }
.leve .brume.b2 { animation-duration: 3.2s; }
@keyframes couleurs { to { opacity: 1; } }
@keyframes brume-part { to { opacity: 0; transform: translateX(35%) scale(1.2); } }
.legende-scene { margin: -18px 0 0; text-align: center; font-size: 0.875rem; color: #4A5672; }

/* Ce qui t'attend */
.moments { background: var(--nuit); color: var(--brume-claire); padding: 56px 0 64px; }
.moments h2, .joueurs h2 { font-size: clamp(2rem, 7vw, 3.2rem); padding: 0 var(--gouttiere); max-width: 1180px; margin: 0 auto; }
.moments h2 { color: var(--blanc); }
.defile {
  list-style: none; margin: 28px auto 0; padding: 0 var(--gouttiere) 8px;
  max-width: 1180px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(66vw, 250px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gouttiere);
  scrollbar-width: none;
}
.defile::-webkit-scrollbar { display: none; }
.defile li { scroll-snap-align: start; }
.defile img { border-radius: 22px; border: 5px solid #24345C; aspect-ratio: 780 / 1688; object-fit: cover; width: 100%; background: #24345C; }
.defile h3 { font-size: 1.6rem; color: var(--or); margin-top: 16px; }
.defile p { margin: 6px 0 0; font-size: 1rem; color: #C9D0DD; }

/* Pour qui */
.joueurs { padding: 56px 0 56px; }
.joueurs > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.joueurs p { padding: 0 var(--gouttiere); margin-top: 12px; max-width: calc(56ch + 2 * var(--gouttiere)); margin-left: max(0px, calc((100% - 1180px) / 2)); }
.joueurs .gros { font: 400 clamp(1.4rem, 5vw, 2rem)/1.15 var(--titre); color: var(--rouge); margin-top: 14px; }

/* Le dernier appel */
.appel {
  background: var(--marine); color: var(--blanc);
  padding: 56px var(--gouttiere) 64px;
}
.appel > * { max-width: 620px; margin-left: auto; margin-right: auto; }
.appel h2 { font-size: clamp(2rem, 7.5vw, 3.4rem); }
.appel > p { margin-top: 14px; color: #D8DEEA; }
.appel .liste { margin-top: 24px; }
.appel .aide { color: #C2CBDC; }
.appel .aide.erreur { color: #FFB3B9; }
.appel .champ { box-shadow: 0 2px 0 #0D1630; }

.pied { padding: 28px var(--gouttiere) 40px; font-size: 0.9375rem; color: #3D4A66; max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
.pied p { margin: 0; }

/* Le butin : ce qui s'ouvre après l'inscription, comme dans le jeu */
.butin {
  position: fixed; inset: 0; z-index: 10;
  display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 50% 42%, #4A2C86 0%, var(--violet) 45%, #140C28 100%);
  overflow: hidden;
}
.butin[hidden] { display: none; }
.rayons {
  position: absolute; left: 50%; top: 42%; width: 200vmax; height: 200vmax; margin: -100vmax 0 0 -100vmax;
  background: repeating-conic-gradient(rgba(242, 178, 51, 0.16) 0 9deg, transparent 9deg 22deg);
  animation: tourne 40s linear infinite;
}
@keyframes tourne { to { transform: rotate(1turn); } }
.carte {
  position: relative; width: min(100%, 380px); text-align: center; color: var(--blanc);
  animation: surgit 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.carte:focus { outline: none; }
@keyframes surgit { from { transform: scale(0.6); opacity: 0; } }
.rarete { font: 400 1.25rem/1 var(--titre); color: var(--or); margin: 0 0 18px; }
.ticket { width: 136px; height: 136px; margin: 0 auto; filter: drop-shadow(0 0 28px rgba(242, 178, 51, 0.7)); }
.carte h2 { font-size: clamp(2.1rem, 9vw, 2.6rem); margin-top: 22px; }
.carte p { margin: 10px auto 0; max-width: 30ch; color: #E4DDF5; }
.carte button { display: block; width: 100%; border: 0; cursor: pointer; font: 400 1.2rem/1 var(--titre); border-radius: 14px; padding: 16px; }
.partager { margin-top: 28px; background: var(--or); color: var(--nuit); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18); }
.fermer { margin-top: 10px; background: transparent; color: var(--blanc); }
.copie { font-size: 0.9375rem; }

/* Écran large : le texte à gauche, le téléphone à droite */
@media (min-width: 900px) {
  .mots-voles span { left: var(--dx); right: auto; top: var(--dy); font-size: calc(2.2rem * var(--t)); }
  .mots-voles .large { display: block; }
  .mots-voles { left: calc(50% - 50vw); right: calc(50% - 50vw); }
  .mots-voles span:not([style*='--dx']) { display: none; }
  .ouverture { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px; }
  .ouverture .texte { grid-column: 1; grid-row: 1; }
  .scene { grid-column: 2; grid-row: 1; }
  .legende-scene { grid-column: 2; grid-row: 2; margin-top: -8px; }
  .telephone { width: 320px; }
  .defile { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .ecran.couleur, .leve .ecran.couleur { animation: none; opacity: 1; }
  .brume, .leve .brume { animation: none; opacity: 0; }
  .rayons, .carte { animation: none; }
  html { scroll-behavior: auto; }
}
