/* Rocket Rush : site de présentation
   Idée directrice : la page est un vol. Plus on descend dans la page, plus on monte en altitude :
   le ciel de jour laisse place à l'espace et l'altimètre compte les kilomètres jusqu'à Nova (760 km). */

@font-face {
  font-family: "Roboto RR";
  src: url("fonts/roboto-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --sky: #4db8f7;
  --horizon: #b8e4ff;
  --navy: #142b7a;
  --space: #0f1a52;
  --rocket: #e8433a;
  --gold: #ffcb3d;
  --go: #4cc03a;
  --ink: #12245e;
  --paper: #ffffff;
  --muted: #c6d6ff;
  --p: 0; /* progression du vol (0 = sol, 1 = 760 km), pilotée en JS */
  --radius-phone: 34px;
  --step-1: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.9rem);
  --step-3: clamp(2rem, 1.5rem + 2.2vw, 3.4rem);
  --step-4: clamp(3.6rem, 2.2rem + 7vw, 8.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Roboto RR", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-1);
  font-weight: 420;
  line-height: 1.55;
  color: var(--paper);
  background: var(--space);
  -webkit-font-smoothing: antialiased;
}

/* ciel de jour → espace : deux couches fixes, l'une s'efface pendant que l'autre apparaît */
.sky, .stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.sky {
  background: linear-gradient(180deg, var(--sky) 0%, #7fcbfa 55%, var(--horizon) 100%);
  opacity: calc(1 - var(--p) * 1.6);
}
.stars {
  z-index: -3;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 62%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 71% 28%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 74%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 88%, #dfe8ff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 44%, #fff 50%, transparent 51%),
    linear-gradient(180deg, #1d3590 0%, var(--space) 60%, #0b1442 100%);
  background-size: 420px 420px, 380px 380px, 520px 520px, 300px 300px, 460px 460px, 350px 350px, 400px 400px, 480px 480px, 100% 100%;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe08a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

/* titres : Roboto condensé très gras, comme le logo du jeu */
h1, h2, h3 {
  font-weight: 900;
  font-stretch: 75%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0;
}
h2 {
  font-size: var(--step-3);
  text-shadow: 0 4px 0 rgba(10, 24, 80, 0.35);
}
h3 { font-size: var(--step-2); line-height: 1.05; }
p { margin: 0; max-width: 62ch; }

.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head p { color: var(--muted); }

/* ---------------------------------------------------------------- en-tête */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
}
.top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 900;
  font-stretch: 75%;
  font-size: 1.45rem;
  text-shadow: 0 2px 0 rgba(10, 24, 80, 0.4);
}
.brand img { width: 40px; height: 40px; }
.top nav { display: flex; gap: 1.4rem; font-weight: 600; }
.top nav a { color: var(--paper); text-decoration: none; }
.top nav a:hover { text-decoration: underline; color: var(--paper); }

/* ---------------------------------------------------------------- héros */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-top: 6rem;
  overflow: clip;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}
.logo {
  font-size: var(--step-4);
  line-height: 0.82;
  transform: rotate(-3deg);
  transform-origin: left bottom;
  margin-bottom: 2.2rem;
}
.logo span { display: block; }
.logo .l1 {
  color: #fff;
  -webkit-text-stroke: 0.06em var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--navy);
}
.logo .l2 {
  margin-left: 0.55em;
  background: linear-gradient(180deg, #fff27a 0%, #ffcf3a 45%, #ff9a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.06em #6b2a08;
  paint-order: stroke fill;
  filter: drop-shadow(0 0.07em 0 #6b2a08);
}
.lead {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  font-weight: 500;
  color: var(--ink);
  max-width: 34ch;
  margin-bottom: 2rem;
}
.stores { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 5px 0 #0a1a52;
}
.store small { display: block; font-weight: 500; font-size: 0.75rem; opacity: 0.75; line-height: 1.1; }
.store b { display: block; line-height: 1.15; }
.btn-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--go);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 5px 0 #2a7d1d;
}
.btn-go:hover { color: #fff; filter: brightness(1.06); }
.btn-go:active { transform: translateY(3px); box-shadow: 0 2px 0 #2a7d1d; }

.hero-shot { justify-self: center; position: relative; }
.hero-shot .phone { width: min(330px, 70vw); transform: rotate(4deg); }
.hero-shot .coin {
  position: absolute;
  width: 84px;
  left: -46px;
  top: 18%;
  transform: rotate(-12deg);
  filter: drop-shadow(0 6px 0 rgba(10, 24, 80, 0.25));
}
.hero-shot .gift {
  position: absolute;
  width: 92px;
  right: -40px;
  bottom: 16%;
  transform: rotate(10deg);
  filter: drop-shadow(0 6px 0 rgba(10, 24, 80, 0.25));
}

.cloud {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  background: #fff;
  opacity: 0.9;
  box-shadow: 40px -22px 0 6px #fff, 90px 4px 0 -4px #fff;
}
.cloud.c1 { width: 160px; height: 56px; left: -40px; bottom: 6%; }
.cloud.c2 { width: 120px; height: 44px; right: 8%; top: 22%; opacity: 0.75; }
.cloud.c3 { width: 210px; height: 70px; left: 42%; bottom: -20px; }

/* ---------------------------------------------------------------- téléphones */

.phone {
  margin: 0;
  display: block;
  aspect-ratio: 540 / 1170;
  border-radius: var(--radius-phone);
  border: 7px solid #0b1846;
  background: #0b1846;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(8, 18, 70, 0.35);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- les 4 temps d'un vol */

.flight-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  counter-reset: step;
}
.flight-steps li { display: grid; gap: 1rem; align-content: start; }
.flight-steps .num {
  font-weight: 900;
  font-stretch: 75%;
  font-size: 4.2rem;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
}
.flight-steps .phone { width: 100%; border-width: 6px; border-radius: 28px; }
.flight-steps p { color: var(--muted); font-size: 1rem; }

/* ---------------------------------------------------------------- route des planètes */

.route { position: relative; list-style: none; margin: 0; padding: 0; }
.route::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  margin-left: -2px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 14px, transparent 14px 26px);
}
.route li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.4rem;
  min-height: 132px;
}
.route .km {
  grid-column: 2;
  z-index: 1;
  min-width: 96px;
  text-align: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, 0.5);
  font-weight: 800;
  font-stretch: 85%;
  font-size: 0.95rem;
  white-space: nowrap;
}
.route .planet { display: flex; align-items: center; gap: 1rem; }
.route li:nth-child(odd) .planet { grid-column: 1; grid-row: 1; justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.route li:nth-child(even) .planet { grid-column: 3; grid-row: 1; }
.route .planet img { width: 108px; height: 108px; flex: none; }
.route .planet h3 { font-size: 1.7rem; }
.route .planet p { color: var(--muted); font-size: 0.98rem; max-width: 30ch; }
.route .mystery img { filter: brightness(0) invert(1); opacity: 0.16; }
.route .mystery h3 { color: var(--muted); letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- aides */

.helpers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.helper-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6rem; }
.helper-list li { display: grid; grid-template-columns: 64px 1fr; gap: 1.1rem; align-items: start; }
.helper-list img { width: 64px; height: 64px; }
.helper-list h3 { font-size: 1.45rem; margin-bottom: 0.25rem; }
.helper-list p { color: var(--muted); font-size: 1rem; }
.helper-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.helper-shots .phone:last-child { margin-top: 3.5rem; }

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

.board {
  max-width: 760px;
  background: rgba(20, 43, 122, 0.82);
  border: 3px solid rgba(140, 200, 255, 0.55);
  border-radius: 28px;
  padding: clamp(1rem, 3vw, 1.8rem);
}
.tabs { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tabs button {
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: #2f6ee6;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.15rem 0.65rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #1b4aa8;
}
.tabs button img { width: 28px; height: 28px; }
.tabs button[aria-pressed="true"] { background: var(--gold); color: #4a2105; box-shadow: 0 4px 0 #c48a12; }
.tabs button:active { transform: translateY(2px); box-shadow: 0 2px 0 #1b4aa8; }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; min-height: 200px; }
.rows li {
  display: grid;
  grid-template-columns: 48px 52px 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 1rem 0.45rem 0.6rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.rows .rank {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  font-stretch: 80%;
  font-size: 1.15rem;
}
.rows li:nth-child(1) .rank { background: #ffd23f; color: #5a2c06; }
.rows li:nth-child(2) .rank { background: #dde6f5; color: #2d3b5c; }
.rows li:nth-child(3) .rank { background: #ef9a52; color: #4d2106; }
.rows .avatar { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; overflow: hidden; display: grid; place-items: center; }
.rows .avatar img { width: 78%; height: 78%; object-fit: contain; }
.rows .avatar.photo img { width: 100%; height: 100%; object-fit: cover; }
.rows .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .value { font-weight: 800; color: #ffe38a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-status { color: var(--muted); padding: 2.5rem 0.5rem; text-align: center; }
.board-note { margin-top: 1.1rem; color: var(--muted); font-size: 0.95rem; }

/* ---------------------------------------------------------------- bas de page */

.foot { padding-block: 3.5rem 4.5rem; border-top: 1px solid rgba(255, 255, 255, 0.15); color: var(--muted); font-size: 0.98rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- altimètre */

.altimeter {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  height: min(62vh, 520px);
  width: 64px;
  display: grid;
  justify-items: center;
  pointer-events: none;
}
.altimeter .track {
  position: relative;
  width: 6px;
  height: 100%;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
}
.altimeter .fill {
  position: absolute;
  inset: auto 0 0 0;
  height: calc(var(--p) * 100%);
  border-radius: 6px;
  background: var(--gold);
}
.altimeter .tick {
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: 0 0 -7px -7px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--navy);
}
.altimeter .tick.passed { background: var(--gold); }
.altimeter .ship {
  position: absolute;
  left: 50%;
  bottom: calc(var(--p) * 100%);
  width: 44px;
  margin: 0 0 -22px -22px;
}
.altimeter .readout {
  position: absolute;
  right: 54px;
  bottom: calc(var(--p) * 100%);
  margin-bottom: -16px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, 0.6);
  font-weight: 800;
  font-stretch: 85%;
  font-size: 0.95rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- page de texte (confidentialité) */

.doc { padding-block: 7rem 4rem; }
.doc article { max-width: 70ch; background: rgba(20, 43, 122, 0.85); border-radius: 28px; padding: clamp(1.4rem, 4vw, 3rem); border: 3px solid rgba(140, 200, 255, 0.45); }
.doc h1 { font-size: var(--step-3); margin-bottom: 1rem; }
.doc h2 { font-size: var(--step-2); margin: 2.2rem 0 0.7rem; text-shadow: none; }
.doc p, .doc li { color: #e2eaff; }
.doc p + p { margin-top: 0.8rem; }
.doc ul { padding-left: 1.2rem; }
.doc li + li { margin-top: 0.4rem; }
.doc .updated { color: var(--muted); font-size: 0.95rem; }

/* ---------------------------------------------------------------- petits écrans */

@media (max-width: 1100px) {
  .altimeter { right: 10px; width: 40px; }
  .altimeter .readout { right: 34px; font-size: 0.85rem; }
  .altimeter .ship { width: 34px; margin: 0 0 -17px -17px; }
  .wrap { width: min(1160px, 100% - 5.5rem); margin-left: 1.25rem; }
}

@media (max-width: 860px) {
  .hero { padding-top: 5.5rem; }
  .hero .wrap { grid-template-columns: 1fr; }
  .logo { margin-bottom: 1.6rem; }
  .hero-shot .phone { width: min(260px, 64vw); }
  .flight-steps {
    grid-template-columns: repeat(4, minmax(220px, 70vw));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
  }
  .flight-steps li { scroll-snap-align: start; }
  .helpers { grid-template-columns: 1fr; }
  .helper-shots { max-width: 460px; }
  .route::before { left: 34px; }
  .route li { grid-template-columns: 70px 1fr; gap: 1rem; min-height: 0; padding-block: 0.9rem; }
  .route .km { grid-column: 1; min-width: 0; padding: 0.25rem 0.4rem; font-size: 0.8rem; }
  .route li:nth-child(odd) .planet,
  .route li:nth-child(even) .planet { grid-column: 2; flex-direction: row; text-align: left; justify-content: flex-start; }
  .route .planet img { width: 76px; height: 76px; }
  .top nav { display: none; }
  .altimeter .readout { display: none; }
  .cloud.c1, .cloud.c2 { display: none; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 4.4rem); margin-left: 1rem; }
  .rows li { grid-template-columns: 36px 44px 1fr; padding-right: 0.8rem; }
  .rows .value { grid-column: 3; font-size: 0.95rem; margin-top: -0.4rem; }
  .rows .rank { width: 34px; height: 34px; font-size: 1rem; }
  .rows .avatar { width: 44px; height: 44px; }
  .hero-shot .coin, .hero-shot .gift { display: none; }
}
