/* SmashMax — landing liste d'attente */

:root {
  --fond: #0A0F22;
  --surface: #111A35;
  --ligne: #22305A;
  --texte: #F2F5FF;
  --texte-2: #9CA8CC;
  --lime: #D8F34A;
  --lime-encre: #1A2206;
  --lime-ombre: #A7C226;
  --nuit-haut: #1A2650;

  --f-titre: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mot: var(--f-titre);
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));

  color-scheme: dark;
}

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

html { background: var(--fond); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--f-titre);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Grain : bruit SVG en overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding:
    calc(72px + env(safe-area-inset-top))
    var(--gutter)
    calc(72px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.glow {
  position: absolute;
  z-index: -2;
  pointer-events: none;
}
.glow--top {
  top: -30vh;
  left: 50%;
  width: min(1400px, 160vw);
  height: 80vh;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(26, 38, 80, .95), rgba(26, 38, 80, 0));
}
.glow--bottom {
  bottom: -38vh;
  left: 50%;
  width: min(1600px, 190vw);
  height: 70vh;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(216, 243, 74, .10), rgba(216, 243, 74, .035) 55%, rgba(216, 243, 74, 0));
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 60rem;
}

/* Symbole */
.symbol {
  position: relative;
  width: 88px;
  height: 88px;
  margin-bottom: 28px;
}
.symbol img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}

/* Titre */
.title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(48px, 9vw, 112px);
  line-height: .98;
  letter-spacing: -.05em;
  color: var(--texte);
}
.title__line {
  display: block;
  white-space: nowrap;
}
.title__word {
  display: block;
  height: 1.04em;
  margin-top: .02em;
}
.word__stage {
  position: relative;
  display: inline-block;
  height: 100%;
  vertical-align: top;
  transition: width 400ms var(--ease-out);
}
.word,
.word-measure {
  font-family: var(--f-mot);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1.04;
  color: var(--lime);
  white-space: nowrap;
}
.js .word {
  position: absolute;
  inset: 0 -.3em;
  text-align: center;
}
.word-measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  left: -9999px;
  top: 0;
}
.char {
  display: inline-block;
  transform-origin: 50% 100%;
  will-change: transform, opacity, filter;
}

/* Sous-titre */
.subtitle {
  margin: 28px 0 0;
  max-width: 34em;
  font-size: clamp(17px, 1.3vw, 19px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--texte-2);
  text-wrap: balance;
}

/* Preuve sociale */
.proof {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--texte-2);
}
.proof strong {
  font-weight: 600;
  color: var(--texte);
}
.proof__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}
.proof__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: .6; }
  to   { transform: scale(3); opacity: 0; }
}

/* Bouton */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
}
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 180ms var(--ease-out), box-shadow 220ms var(--ease-out), background-color 180ms, opacity 180ms;
}
.btn--lime {
  height: 60px;
  padding: 0 36px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-encre);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -.02em;
  box-shadow: 0 12px 36px -10px rgba(216, 243, 74, .35);
}
@media (hover: hover) {
  .btn--lime:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px -10px rgba(216, 243, 74, .5);
  }
}
.btn--lime:active { transform: scale(.97); }
.btn:disabled { cursor: progress; opacity: .7; transform: none; }

.cta__note {
  margin: 16px 0 0;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  color: rgba(156, 168, 204, .6);
}

/* Coins */
.corner {
  position: absolute;
  z-index: 3;
  margin: 0;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--texte-2);
  opacity: .7;
}
.corner--bl {
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: calc(var(--gutter) + 8px);
}

/* Arrivée */
@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.js .reveal { opacity: 0; }
.js.is-ready .reveal {
  animation: reveal 600ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 90ms + 60ms);
}

/* Grains du mot qui se désintègre */
.dust {
  position: absolute;
  inset: 0;
  z-index: 1;           /* derrière le texte : le nouveau mot passe devant les grains */
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Tuiles ---------- */

.tiles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.tile {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  will-change: transform;
}
.tile__in {
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(.8);
}
.is-ready .tile__in {
  animation: tile-in 900ms var(--ease-out) both;
  animation-delay: var(--in-delay);
}
@keyframes tile-in {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}
.tile__float {
  width: 100%;
  height: 100%;
  animation: tile-float var(--dur) ease-in-out var(--delay) infinite alternate;
  will-change: transform;
}
@keyframes tile-float {
  from { transform: translate3d(0, calc(var(--amp) * -1), 0) rotate(calc(var(--wob) * -1)); }
  to   { transform: translate3d(0, var(--amp), 0) rotate(var(--wob)); }
}
.tile__face {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 26%;
  transform: rotate(var(--r));
}
.tile__face svg {
  width: 40%;
  height: 40%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile__face svg .fill { fill: currentColor; stroke: none; }

.tile--sombre .tile__face {
  background: linear-gradient(160deg, #18203B, #0F1529);
  border: 1px solid rgba(242, 245, 255, .05);
  color: rgba(242, 245, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.tile--lime .tile__face {
  background: var(--lime);
  color: var(--lime-encre);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.tile--blanche .tile__face {
  background: linear-gradient(170deg, #FFFFFF, #E9EDF8);
  color: var(--fond);
  box-shadow: inset 0 1px 0 #fff;
}

/* Profondeur */
.tile--devant .tile__face { box-shadow: var(--inner, inset 0 0 0 transparent), 0 22px 40px -8px rgba(0, 0, 0, .65), 0 4px 10px rgba(0, 0, 0, .35); }
.tile--devant.tile--sombre .tile__face { --inner: inset 0 1px 0 rgba(255, 255, 255, .05); }
.tile--devant.tile--lime .tile__face { --inner: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 40px -8px rgba(216, 243, 74, .35); }
.tile--devant.tile--blanche .tile__face { --inner: inset 0 1px 0 #fff; }

.tile--milieu .tile__face { filter: blur(1px); box-shadow: var(--inner, inset 0 0 0 transparent), 0 14px 28px -8px rgba(0, 0, 0, .55); }
.tile--milieu.tile--sombre .tile__face { --inner: inset 0 1px 0 rgba(255, 255, 255, .05); }
.tile--milieu.tile--lime .tile__face { --inner: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 30px -8px rgba(216, 243, 74, .28); }
.tile--milieu.tile--blanche .tile__face { --inner: inset 0 1px 0 #fff; }

.tile--fond .tile__face { filter: blur(var(--blur, 5px)); opacity: .5; }

/* ---------- Fenêtre « liste d'attente » ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
.sheet[hidden] { display: none; }

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 20, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 300ms ease;
}
.sheet__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 36px 32px 30px;
  background: #10172C;
  border: 1px solid rgba(242, 245, 255, .06);
  border-radius: 28px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .04);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: transform 420ms var(--ease-out), opacity 260ms ease;
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { opacity: 1; transform: none; }
.sheet.is-dragging .sheet__panel { transition: none; }

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(242, 245, 255, .06);
  color: var(--texte-2);
  cursor: pointer;
  transition: background-color 160ms, color 160ms;
}
.sheet__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
@media (hover: hover) {
  .sheet__close:hover { background: rgba(242, 245, 255, .1); color: var(--texte); }
}

.sheet__view { text-align: left; }

.eyebrow {
  margin: 0 0 10px;
  text-align: center;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.sheet__title {
  margin: 0 0 28px;
  text-align: center;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -.045em;
  color: var(--texte);
}
.sheet__text {
  margin: -12px 0 26px;
  text-align: center;
  color: var(--texte-2);
  font-size: 16px;
  line-height: 1.55;
}

/* Compte à rebours avant la sortie */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: -14px auto 22px;
  padding: 7px 14px 7px 8px;
  border: 1px solid rgba(216, 243, 74, .22);
  border-radius: 999px;
  background: rgba(216, 243, 74, .06);
  font-size: 14px;
  line-height: 1.3;
  color: var(--texte-2);
  text-align: left;
}
.countdown[hidden] { display: none; }
.countdown__days {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-encre);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .02em;
}

.field {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field__label {
  display: block;
  padding: 0;
  margin: 0 0 10px;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--texte-2);
}
.field__error {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #FF8A7A;
}
.field__error:empty { display: none; }
.field__error--form { text-align: center; margin-top: 12px; }

.input,
.select select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(242, 245, 255, .08);
  border-radius: 16px;
  background: rgba(242, 245, 255, .04);
  color: var(--texte);
  font: 400 17px/1 var(--f-titre);
  transition: border-color 160ms, box-shadow 160ms, background-color 160ms;
}
.input::placeholder { color: rgba(156, 168, 204, .5); }
.input:focus,
.select select:focus {
  border-color: var(--lime);
  background: rgba(242, 245, 255, .05);
  box-shadow: 0 0 0 3px rgba(216, 243, 74, .16);
}
.input:focus-visible,
.select select:focus-visible { outline: none; }
.input[aria-invalid="true"],
.select select[aria-invalid="true"] { border-color: #FF8A7A; }

.select { position: relative; }
.select select { padding-right: 48px; cursor: pointer; }
.select select:invalid { color: rgba(156, 168, 204, .55); }
.select select option { color: var(--texte); background: var(--surface); }
.select::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 1.75px solid var(--texte-2);
  border-bottom: 1.75px solid var(--texte-2);
  transform: rotate(45deg);
  pointer-events: none;
}

.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice__opt { position: relative; }
.choice--level { gap: 10px; }
.choice--level .choice__opt span { height: 48px; font-size: 16px; }
.choice__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.choice__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  border: 1px solid rgba(242, 245, 255, .08);
  border-radius: 16px;
  background: rgba(242, 245, 255, .04);
  color: var(--texte-2);
  font-weight: 500;
  font-size: 17px;
  transition: border-color 160ms, background-color 160ms, color 160ms;
  cursor: pointer;
}
.choice__opt svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  flex: none;
}
.choice__opt input:checked + span {
  border-color: rgba(216, 243, 74, .7);
  color: var(--lime);
  background: rgba(216, 243, 74, .08);
}
.choice__opt input:focus-visible + span {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn--block { width: 100%; }
#submit { margin-top: 12px; }

.btn--ghost {
  height: 52px;
  margin-top: 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--texte-2);
  font-weight: 500;
  font-size: 16px;
}
@media (hover: hover) {
  .btn--ghost:hover { color: var(--texte); background: rgba(242, 245, 255, .05); }
}

.share { display: grid; gap: 12px; }
.share__input {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--lime);
  text-align: center;
  text-overflow: ellipsis;
}

/* ---------- Mobile ---------- */

@media (max-width: 699px) {
  /* Tout suit la largeur de l'écran, comme sur jabmax */
  .hero {
    justify-content: flex-end;
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: calc(max(40px, 9svh) + env(safe-area-inset-bottom));
  }
  .symbol {
    width: clamp(48px, 15vw, 64px);
    height: clamp(48px, 15vw, 64px);
    margin-bottom: 18px;
  }
  .title { font-size: clamp(30px, 10vw, 48px); }
  .subtitle {
    margin-top: 16px;
    max-width: 30em;
    font-size: clamp(14px, 4vw, 16px);
  }
  .proof { margin-top: 18px; font-size: 14px; gap: 9px; }
  .cta { margin-top: 20px; }
  .cta .btn--lime {
    height: 52px;
    padding: 0 28px;
    font-size: 16px;
  }
  .cta__note { margin-top: 12px; font-size: clamp(11px, 3.4vw, 12px); white-space: nowrap; }
  .corner { font-size: 11px; }
  .corner--bl { bottom: calc(16px + env(safe-area-inset-bottom)); }

  .sheet__panel { padding: 30px 20px 20px; border-radius: 24px; }
  .sheet__close { top: 10px; right: 10px; width: 36px; height: 36px; }
  .eyebrow { margin: 0 32px 8px; font-size: 11px; letter-spacing: .06em; white-space: nowrap; }
  .sheet__title { font-size: clamp(24px, 7.6vw, 29px); margin-bottom: 20px; }
  .sheet__text { margin: -8px 0 20px; font-size: 15px; }
  .field { margin-bottom: 16px; }
  .field__label { margin-bottom: 8px; font-size: 12px; }
  .input,
  .select select,
  .choice__opt span { height: 50px; font-size: 16px; border-radius: 14px; }
  .choice { gap: 10px; }
  .choice__opt span { gap: 8px; }
  #submit { margin-top: 6px; height: 54px; font-size: 17px; }
  .countdown { margin: -10px auto 20px; font-size: 13px; gap: 8px; }
  .countdown__days { font-size: 12px; }
  .choice--level { gap: 8px; }
  .choice--level .choice__opt span { height: 44px; font-size: 15px; }
}


/* Petit téléphone : le © laisserait le bas trop chargé */
@media (max-width: 359px) {
  .eyebrow__brand { display: none; }
}
@media (max-width: 699px) and (max-height: 759px) {
  .corner--bl { display: none; }
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  .tile__float,
  .proof__dot::after { animation: none; }
  .js.is-ready .reveal { animation-duration: 1ms; animation-delay: 0ms; }
  .is-ready .tile__in { animation-duration: 300ms; animation-delay: 0ms; }
  .word__stage { transition: none; }
  .sheet__panel { transition-duration: 1ms; }
}

.sheet__panel:focus,
.sheet__title:focus { outline: none; }
