/* ─── NyleRP v2 stylesheet ──────────────────────────────────────────────
 *
 * Design rules :
 *   • Montserrat Bold everywhere structural (header, CTA, body).
 *   • Markup font (handwritten) for bubble & beach playful text + the
 *     newsletter title.
 *   • Bubble text color #C87D64 (warm terracotta).
 *   • NO box-shadow / text-shadow / drop-shadow ANYWHERE (user spec).
 *   • All large composite backgrounds (beach/discord/newsletter) come
 *     from a single PNG so the wave/sand separator is built-in.
 *   • Beach and partie3/4 widths follow the natural asset aspect-ratio
 *     (3981 × N) — we set the section width to 100vw and the height
 *     auto-derives from the background's aspect.
 * ────────────────────────────────────────────────────────────────────── */

/* ═══ Fonts ═════════════════════════════════════════════════════════ */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Markup";
  src: url("/assets/fonts/markup.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bubble-color: #C87D64;
  --beach-sand: #f5d29a;
  --discord-dark: #0f0c0a;
  --accent-orange: #FFA827;
  --accent-orange-deep: #E67E0E;
  --discord-purple: #5865F2;
  --text-light: #ffffff;
  --text-soft: #e5dccd;
  --max-shell: 1280px;
}

/* ═══ Reset / base ══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-light);
  /* Matches partie 3 background colour so the small gaps left by the
     beach + newsletter scroll-translate (their visual bottom climbs
     above their flow bottom) blend into the dark band instead of
     flashing pure black. */
  background: #1a1311;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ═══ Site header — floating rounded bar with frosted glass ═════════
 * Detached from the top edge by 16 px on all sides. Background is
 * blurred glass that picks up whatever sits behind it (sky, beach,
 * dark partie3) so it integrates with every section. */
.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  height: 76px;
  width: min(1080px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-radius: 22px;
  /* Almost-opaque white — 78 % was letting the warm gradient bleed
     through the blur and tint the bar yellow. 0.92 keeps a hint of
     transparency for the glass feel but kills the tint. */
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  z-index: 1000;
}
.hdr-logo img { height: 52px; }
.hdr-nav { gap: 22px; }
.hdr-nav .nav-link { color: #5a3624; }
.hdr-nav .nav-link:hover { color: var(--bubble-color); }
.hdr-actions { gap: 8px; }
/* No "scrolled" class needed anymore — the bar is always frosted. */

.hdr-logo {
  display: flex; align-items: center;
  flex: 0 0 auto;
}
.hdr-logo img {
  height: 56px; width: auto;
  transition: transform 220ms ease;
}
.hdr-logo:hover img { transform: rotate(-4deg) scale(1.04); }

.hdr-nav {
  display: flex; align-items: center; gap: 28px;
  margin-left: 24px;
}
.nav-link {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 8px 4px;
  position: relative;
  transition: color 180ms ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  inset: auto 4px 2px 4px;
  height: 2px;
  /* Underline always matches the base nav-link text colour (brown),
     never an accent. Doesn't change colour on hover — only its
     scale (the appear/disappear motion). */
  background: #5a3624;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after { transform: scaleX(1); }
/* Also pin the text colour : hover doesn't shift it to bubble — the
   only feedback is the underline's scale-in. */
.hdr-nav .nav-link:hover { color: #5a3624; }

.hdr-actions {
  display: flex; align-items: center; gap: 10px;
  margin-left: auto;
}

/* Header buttons — match the play-btn pattern EXACTLY (which the user
   confirmed works perfectly). The trick :
     • base img has `width: 100%; height: auto` and sets the layout box ;
     • parent has an explicit width per button so width:100% resolves ;
     • hover img is absolute with just `inset: 0; opacity: 0` — it stretches
       across the same box as the base.
   Previous attempt forced `width: 100%; height: 100%` on the hover img
   without giving the parent an explicit width → both ended up 0×0 → hover
   appeared blank. */
.hdr-btn {
  position: relative;
  display: inline-block;
  background: transparent;
  border: none;
  padding: 0;
  /* Set widths per button type so `width:100%` on the inner img has a real
     target. Heights derive from aspect ratio. */
  vertical-align: middle;
}
/* Widths tuned for the 76 px header. PNG aspect ratio kept intact. */
.hdr-btn--discord  { width: 58px;  }
.hdr-btn--wide     { width: 198px; }
.hdr-btn--account  { width: 78px;  }
.hdr-btn-img {
  width: 100%;
  height: auto;
  display: block;
  transition: none;
}
.hdr-btn-img--hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
}
.hdr-btn:hover .hdr-btn-img:not(.hdr-btn-img--hover) { opacity: 0; }
.hdr-btn:hover .hdr-btn-img--hover { opacity: 1; }

.hdr-btn--account { position: relative; }
.hdr-account-head {
  position: absolute;
  top: 42%;
  left: 10px;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  image-rendering: pixelated;
  border-radius: 2px;
  pointer-events: none;
  transition: transform 120ms ease;
}
.hdr-btn--account:hover .hdr-account-head {
  transform: translateY(calc(-50% + 3px));
}

/* ─── MOBILE BURGER + DRAWER ─────────────────────────────────────
 * Burger button is hidden on desktop ; the .hdr-nav (Wiki/Boutique/
 * Vote text links) + the wide download button are hidden on mobile
 * via the @media query at the bottom of this file. */
.hdr-burger {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hdr-burger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: #5a3624;
  border-radius: 2px;
  transition: transform 240ms cubic-bezier(.4,0,.2,1), opacity 220ms ease;
}
.hdr-burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hdr-burger.open span:nth-child(2) { opacity: 0; }
.hdr-burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.hdr-drawer {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}
.hdr-drawer.open { opacity: 1; pointer-events: auto; }
.hdr-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 19, 17, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hdr-drawer-panel {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(300px, 82vw);
  background: #fff7e6;
  padding: 90px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 340ms cubic-bezier(.34, 1, .64, 1);
  box-shadow: -22px 0 50px rgba(26, 19, 17, 0.18);
}
.hdr-drawer.open .hdr-drawer-panel { transform: translateX(0); }
.hdr-drawer-link {
  font-family: "Markup", "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 30px;
  color: var(--bubble-color);
  padding: 12px 0;
  text-decoration: none;
  position: relative;
  border-bottom: 1px dashed rgba(200, 155, 110, 0.35);
  transition: padding-left 240ms ease;
}
.hdr-drawer-link:last-child { border-bottom: 0; }
.hdr-drawer-link:hover { padding-left: 8px; }
.hdr-drawer-close {
  position: absolute;
  top: 22px; right: 22px;
  width: 36px; height: 36px;
  border: 0;
  background: transparent;
  font-size: 32px;
  line-height: 1;
  color: #6b3a23;
  cursor: pointer;
  padding: 0;
}

/* ─── MOBILE-ONLY EXPLAINER MODAL ────────────────────────────── */
.mom-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 8px 0 18px;
}
.mom-icon {
  position: relative;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 211, 163, 0.55);
  border: 2px solid #c89b6e;
  border-radius: 14px;
  color: #6b3a23;
}
.mom-icon svg { width: 32px; height: 32px; }
.mom-icon--phone { color: #c0392b; }
.mom-icon--phone { background: rgba(192, 57, 43, 0.08); border-color: rgba(192, 57, 43, 0.4); }
.mom-icon--laptop { color: #1f7a4a; }
.mom-icon--laptop { background: rgba(31, 122, 74, 0.08); border-color: rgba(31, 122, 74, 0.4); }
.mom-icon-cross,
.mom-icon-check {
  position: absolute;
  bottom: -8px; right: -8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.mom-icon-cross { background: #c0392b; }
.mom-icon-check { background: #1f7a4a; }
.mom-arrow {
  font-size: 24px;
  color: var(--bubble-color);
  font-weight: 900;
}
.mom-modal h2 { text-align: center; }
.mom-modal .dl-modal-intro { text-align: center; }
.mom-reassure {
  background: rgba(245, 211, 163, 0.45);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 18px 0 14px;
  text-align: center;
}
.mom-reassure-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-orange);
}
.mom-reassure p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: #6b3a23;
}
.mom-reassure strong { color: var(--bubble-color); font-weight: 700; }
.mom-cta {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8a6a4f;
}

/* ═══ HERO ══════════════════════════════════════════════════════════
 * Z-stacking spec (user req) :
 *   hero    z: 10   ← the video + logoandlauncher
 *   wave    z: 12   ← sits ON TOP of the beach, deliberately overflowing
 *                     the hero's bottom edge so it "drips into" partie2
 *   beach   z: 1    ← lowest, must rise UP from behind the hero/wave
 *                     as the user scrolls.
 * .hero uses overflow:visible so the wave can extend below ; the video
 * stays clipped by its own width/height + object-fit:cover so it doesn't
 * leak past the hero rect. */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 720px;
  overflow: visible;
  z-index: 10;
  background: linear-gradient(180deg, #7FEEFC 0%, #47B5E8 100%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  /* The scroll-linked blur is set inline by GSAP via style.filter */
  will-change: filter;
}
.hero-logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%);
  width: min(620px, 42vw);
  z-index: 5;
}
.hero-logo img { width: 100%; height: auto; display: block; }

.wave-separator {
  position: absolute;
  /* Pulled further down so the wave "drips" into the start of the beach
     (user req : "baisse encore le séparateurvague"). The wave PNG is
     ~7.8 vw tall — pushing it 5 vw below the hero edge keeps ~3 vw of
     wave still anchored to the hero while letting the rest extend into
     the beach band. Layer z=12 ensures it sits ON TOP of the rising beach. */
  bottom: -5vw;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 12;
  pointer-events: none;
}

/* ═══ BEACH (partie 2) ══════════════════════════════════════════════
 * z-index 1 so the wave/hero overlay it from above (user spec :
 * "elle doit être inférieur dans l'odre des calques au séparateur
 * vague et a la partie hero"). The "rise up on scroll" effect lives
 * in site.js (translateY from +N → 0 as user scrolls past the hero). */
.beach {
  position: relative;
  width: 100%;
  /* Above discord (z:3) so partie 2 overlaps the top of partie 3 — user :
     "la partie 4 et 2 doivent recouvrir plus la partie 3, donc réduit
      l'écart en faisant en sorte que les deux partient surplombent
      la partie 3". */
  z-index: 6;
  height: calc(100vw * 2843 / 3981);
  background: url("/assets/v2/beach-bg.png") center top / 100% 100% no-repeat;
  /* Pull up into hero (top) AND down into discord (bottom). Both edges
     of the beach now eat into their neighbours. */
  margin-top: -6vw;
  margin-bottom: -5vw;
}

/* All beach overlay items absolute. Plants are pushed half off-screen
   per user req ("a moitié hors champs"). */
.plant {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  bottom: 0;
}
/* Plants pushed even further off-screen + bigger + raised, per feedback.
   plant-left raised a LOT (bottom 4vw → 18vw), plant-right raised slightly. */
.plant--left  {
  left: -16vw;
  bottom: 18vw;
  width: 36vw;
  transform-origin: 80% bottom;
}
.plant--right {
  right: -14vw;
  bottom: 12vw;
  width: 34vw;
  transform-origin: 20% bottom;
}

.character {
  position: absolute;
  /* Slightly lower + more to the left per latest feedback. */
  left: 50%;
  top: 34%;
  width: 13vw;
  min-width: 160px;
  z-index: 4;
  transform-origin: 50% 90%;
}

.bubble {
  position: absolute;
  /* Shrunk + nudged down-right per latest feedback. Still upper-right
     of the character (which is "parfaitement positionné"). */
  left: 62%;
  top: 24%;
  width: 22vw;
  min-width: 280px;
  max-width: 400px;
  z-index: 4;
}
.bubble-img {
  width: 100%; height: auto;
  display: block;
}
.bubble-text {
  position: absolute;
  inset: 8% 8% 28% 10%;
  margin: 0;
  font-family: "Markup", "Montserrat", sans-serif;
  font-weight: 400;
  color: var(--bubble-color);
  /* Slightly smaller text to match the smaller bubble shell. */
  font-size: clamp(13px, 1.25vw, 19px);
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  will-change: opacity, transform;
}
.bubble-dots {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.bubble-dot {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bubble-dot-img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 250ms ease, transform 250ms ease;
}
.bubble-dot-img--off { width: 15px; height: 15px; opacity: 1; }
.bubble-dot-img--on  { width: 20px; height: 20px; opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
.bubble-dot--active .bubble-dot-img--off { opacity: 0; }
.bubble-dot--active .bubble-dot-img--on  { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.play-btn {
  position: absolute;
  left: 50%;
  /* Slightly smaller + dropped a few px more per latest feedback. */
  top: 80%;
  display: inline-block;
  width: clamp(200px, 15.5vw, 300px);
  z-index: 5;
  /* Centring is now managed by GSAP (gsap.set xPercent:-50) so the
     pulse + entrance + hover transforms can compose without
     fighting a CSS `transform: translateX(-50%)`. */
}
.play-btn-img { width: 100%; height: auto; display: block; transition: none; }
.play-btn-img--hover { position: absolute; inset: 0; opacity: 0; }
.play-btn:hover .play-btn-img:not(.play-btn-img--hover) { opacity: 0; }
.play-btn:hover .play-btn-img--hover { opacity: 1; }

/* ═══ DISCORD (partie 3) ════════════════════════════════════════════ */
.discord-section {
  position: relative;
  width: 100%;
  background: url("/assets/v2/discord-bg.png") center top / 100% auto no-repeat;
  background-color: #1a1311;
  padding-top: calc(100vw * 1683 / 3979);
  z-index: 3;
  /* More climb under partie 2 — user : "remonte encore la partie3,
     elle est trop basse". -7vw → -13vw. Beach z:6 covers the overlap
     so partie 3's top edge stays hidden by partie 2's bottom band. */
  margin-top: -13vw;
}
.discord-card {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translateX(-50%);
  width: min(520px, 70vw);
  background: #2b2d31;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.discord-card-row {
  display: flex; align-items: center; gap: 14px;
}
.discord-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--discord-purple);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.discord-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.discord-card-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.discord-card-name { margin: 0; font-size: 17px; color: #fff; letter-spacing: 0.02em; }
.discord-card-sub  { margin: 0; font-size: 13px; color: #b5bac1; font-weight: 400; }

.discord-card-stats {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #b5bac1; font-weight: 400;
  letter-spacing: 0.02em;
}
.dot-online {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: #23a55a;
  margin-right: 4px;
  vertical-align: middle;
}
.discord-card-sep { opacity: 0.6; }

.discord-cta {
  display: block;
  text-align: center;
  background: var(--discord-purple);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: background 160ms ease, transform 160ms ease;
}
.discord-cta:hover { background: #4752c4; transform: translateY(-1px); }

/* ═══ NEWSLETTER (partie 4) ═════════════════════════════════════════ */
.newsletter {
  position: relative;
  width: 100%;
  background: url("/assets/v2/newsletter-bg.png") center top / 100% auto no-repeat;
  padding: calc(100vw * 0.025) 24px 0;
  overflow: visible;
  height: calc(100vw * 1507 / 3981);
  z-index: 6;
  /* "la partie 4 doit remonter plus sur la partie 3" — was -4vw,
     now -11vw. Partie 3 sees a chunk of its bottom hidden by the
     newsletter, no gap left. */
  margin-top: -11vw;
}
.palm {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  /* Slightly bigger ("agrandis les légèrement"). */
  width: 44vw;
  max-width: 760px;
  transform-origin: 50% 100%;
}
/* Raised a touch ("remonte légèrement les palmiers") — bottom -18 → -14. */
.palm--left  { left:  -8vw; bottom: -14vw; transform-origin: 70% bottom; }
.palm--right { right: -7vw; bottom: -14vw; transform-origin: 30% bottom; }

.newsletter-card {
  position: relative;
  z-index: 5;
  /* A hair smaller + raised back up a touch ("rétrécis très très très
     légèrement le container et remonte la légèrement"). */
  margin: 7vw auto 0;
  max-width: 420px;
  background: #fff7e6;
  border: 3px solid #c89b6e;
  border-radius: 16px;
  padding: 20px 26px 22px;
  text-align: center;
}
.newsletter-title {
  font-family: "Markup", "Montserrat", sans-serif;
  font-weight: 400;
  color: var(--bubble-color);
  margin: 0 0 12px;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.02em;
}

/* ── 3-STEP PROGRESS GAUGE ────────────────────────────────────────
 * Horizontal track joining 3 stars (étoile = star.png from mediasite).
 * Stars are greyscale until reached, then bloom to full colour.
 * The fill bar is %-based : 0 → 50 → 95 → 100. JS bumps width based
 * on pseudo validity / email validity / submit-success.  */
.newsletter-progress {
  position: relative;
  margin: 0 8px 16px;
  height: 66px;
}
/* Track is bookended exactly at the CENTRE of the first and last
   stars. Stars are 44 px wide, row uses `justify-content: space-
   between`, so star 1's left edge = row left, star 1's centre = row
   left + 22 px. Same on the right. Setting left/right: 22 px ends
   the track exactly under the dernière étoile so the fill never
   overshoots. */
.progress-track {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 4px;
  background: rgba(200, 125, 100, 0.22);
  border-radius: 2px;
  z-index: 1;
}
.progress-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0;
  background: linear-gradient(90deg, var(--bubble-color), #e8a685);
  border-radius: 2px;
  transition: width 360ms cubic-bezier(.4,0,.2,1);
}
.progress-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.progress-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
/* Stars : fully gray (saturation 0, NOT opacity-faded) when the step
   is not done, full colour when reached. */
.progress-step .star-img {
  width: 44px; height: 44px;
  filter: grayscale(100%);
  transition: filter 380ms ease, transform 380ms cubic-bezier(.4,0,.2,1);
}
.progress-step.active .star-img {
  filter: grayscale(0%);
  transform: scale(1.08);
}
/* The 1/2/3 number sits on top of the star — dark-grey when the
   step isn't done yet, brown-beige when it is. Pushed down a few px
   from the star's top so it lands on the star's centre body rather
   than its upper spike ("baisse les chiffres des étapes"). */
.step-num {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 15px;
  color: #4a4a4a;
  pointer-events: none;
  z-index: 3;
  transition: color 380ms ease, transform 380ms cubic-bezier(.4,0,.2,1);
}
.progress-step.active .step-num {
  color: #6b3a23;
  transform: translateX(-50%) scale(1.08);
}
.progress-step p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(107, 58, 35, 0.55);
  transition: color 380ms ease;
}
.progress-step.active p { color: var(--bubble-color); }

/* ── CONSENT CHECKBOX (RGPD / LCEN compliance) ─────────────────── */
.newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 2px;
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
  color: #6b3a23;
  font-weight: 400;
}
.newsletter-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  margin: 1px 0 0;
  cursor: pointer;
  accent-color: var(--accent-orange);
}
.newsletter-consent a { color: var(--bubble-color); text-decoration: underline; }
.newsletter-consent a:hover { color: var(--accent-orange-deep); }

/* ── FORM ─────────────────────────────────────────────────────── */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.newsletter-field input {
  width: 100%;
  background: #fff;
  border: 2px solid #d9b896;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  color: #5a3624;
  outline: none;
  transition: border-color 160ms ease;
}
.newsletter-field input::placeholder { color: #b89878; font-weight: 400; }
.newsletter-field input:focus { border-color: var(--bubble-color); }

.newsletter-submit {
  margin-top: 4px;
  background: var(--accent-orange);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  letter-spacing: 0.08em;
  transition: background 160ms ease, transform 160ms ease;
}
.newsletter-submit:hover { background: var(--accent-orange-deep); transform: translateY(-2px); }
.newsletter-submit[disabled] { opacity: 0.6; cursor: progress; }
.newsletter-status {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b3a23;
  text-align: center;
}
.newsletter-status.ok    { color: #23a55a; }
.newsletter-status.error { color: #c0392b; }

/* ═══ FOOTER ════════════════════════════════════════════════════════
 * Four-column layout : Brand (logo + tagline) + three link columns
 * (server, community, contact). Bottom bar carries the copyright /
 * licence line. Designed to read as a real site footer rather than
 * an afterthought strip. */
.site-footer {
  background: #0c0a08;
  padding: 56px 24px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  /* Above .newsletter (z:6) so the palm trunks that extend down past
     the newsletter section bottom get covered by the dark footer band.
     Visually : palm leaves rise into partie 3, trunks sink into the
     footer "ground". */
  position: relative;
  z-index: 8;
}
.footer-shell {
  max-width: var(--max-shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo {
  display: inline-flex; align-items: center; gap: 12px;
  color: #fff; font-size: 16px;
  letter-spacing: 0.14em;
}
.footer-logo img { height: 36px; width: auto; }
.footer-tagline {
  margin: 0;
  font-size: 13px;
  color: #8a8580;
  font-weight: 400;
  line-height: 1.6;
  max-width: 320px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col h4 {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
}
.footer-col a {
  font-size: 13px;
  color: #a8a3a0;
  font-weight: 400;
  text-decoration: none;
  transition: color 160ms ease;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-shell);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: #6b6a68;
  font-weight: 400;
}
.footer-bottom p { margin: 0; }
@media (max-width: 720px) {
  .footer-shell { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ═══ ACCOUNT DROPDOWN ══════════════════════════════════════════════
 * Light, warm palette to match the site DA — same cream card +
 * burnt-sienna border as the newsletter, no dark glass. The whole
 * widget should feel like a continuation of the page's friendly
 * RP look rather than a generic dropdown. */
.account-dropdown {
  position: fixed;
  /* Dropped a touch below the header so it doesn't kiss the
     bottom edge of the header pill ("descend légèrement le popup
     par rapport au header"). */
  top: 104px; right: 28px;
  background: #fff7e6;
  border: 3px solid #c89b6e;
  border-radius: 16px;
  padding: 18px 20px;
  width: 320px;
  z-index: 999;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.account-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.account-dropdown h3 {
  margin: 0 0 14px;
  font-family: "Markup", "Montserrat", sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--bubble-color);
  text-align: center;
}
.account-pane { display: none; flex-direction: column; gap: 10px; }
.account-pane.active { display: flex; }
.acc-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b3a23;
  font-weight: 700;
  margin-bottom: -2px;
}
.account-pane input {
  background: #fff;
  border: 2px solid #d9b896;
  color: #5a3624;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  outline: none;
  transition: border-color 160ms ease;
}
.account-pane input::placeholder { color: #b89878; font-weight: 400; }
.account-pane input:focus { border-color: var(--bubble-color); }
.account-pane input.shake { animation: accShake 0.4s ease; border-color: #c0392b; }
@keyframes accShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
.account-pane button {
  background: var(--accent-orange);
  border: none;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 13px;
  margin-top: 4px;
  transition: background 160ms ease, transform 160ms ease;
}
.account-pane button:hover { background: var(--accent-orange-deep); transform: translateY(-1px); }
.account-pane small {
  color: #7a5840;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  margin-top: 2px;
}
.account-loggedin {
  display: none;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.account-loggedin.active { display: flex; }
.account-loggedin img {
  width: 56px; height: 56px;
  image-rendering: pixelated;
  border-radius: 6px;
  border: 2px solid #d9b896;
  flex: 0 0 auto;
}
.acc-loggedin-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.acc-loggedin-pseudo {
  font-size: 15px;
  font-weight: 700;
  color: #5a3624;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-loggedin-tag {
  font-size: 11px;
  font-weight: 400;
  color: #8a6a4f;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.account-loggedin button {
  background: transparent;
  border: 1.5px solid #c89b6e;
  color: #6b3a23;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
  transition: background 160ms ease, color 160ms ease;
}
.account-loggedin button:hover { background: var(--bubble-color); color: #fff; }

/* ═══ DOWNLOAD MODAL ════════════════════════════════════════════════
 * Replaces the dedicated /telecharger/ page : any link/button with
 * `data-open-download` (header CTA, JOUER play btn, anchor to
 * /telecharger/) opens this fullscreen overlay instead of navigating
 * away. Card uses the same cream + brown shell as the newsletter
 * card / account dropdown for cohesion. */
.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 240ms ease;
  padding: 24px;
}
.dl-modal.open { opacity: 1; pointer-events: auto; }
.dl-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 19, 17, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.dl-modal-card {
  position: relative;
  /* Dark partie-3 surface — black/very dark brown — with all text in
     warm white. */
  background: #1a1311;
  color: #fff7e6;
  border: none;
  border-radius: 22px;
  /* Wider per "Le popup de téléchargement doit être plus large". */
  max-width: 880px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px 36px 28px;
  text-align: left;
  transform: translateY(20px) scale(0.96);
  transition: transform 320ms cubic-bezier(.34, 1.56, .64, 1);
}
.dl-modal.open .dl-modal-card { transform: translateY(0) scale(1); }
.dl-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: none;
  background: rgba(255, 247, 230, 0.08);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #fff7e6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 160ms ease;
}
.dl-modal-close:hover { background: rgba(255, 247, 230, 0.16); }
.dl-modal h2 {
  font-family: "Markup", "Montserrat", sans-serif;
  font-weight: 400;
  color: #fff;
  text-transform: uppercase;
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: left;
}
.dl-modal-intro {
  font-size: 14px;
  color: rgba(255, 247, 230, 0.85);
  font-weight: 400;
  line-height: 1.6;
  margin: 0 0 22px;
  text-align: left;
}
.dl-modal-intro strong {
  color: var(--bubble-color);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.dl-modal-label {
  margin: 0 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 247, 230, 0.55);
  font-weight: 700;
  text-align: left;
}

/* ── 2-COL GRID : left = title + intro + select | right = tuto ── */
.dl-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 36px;
  margin-bottom: 28px;
  align-items: start;
}
.dl-modal-left,
.dl-modal-right { min-width: 0; }
.dl-modal-right .dl-modal-label { margin-top: 4px; }

.dl-modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0807;
}
.dl-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── CUSTOM DROPDOWN (site DA, not OS-native) ───────────────────
 * Native <select> open list inherits the host OS palette. We build
 * a button + <ul role="listbox"> so the open state can be styled in
 * the warm DA (cream + brown chevron + OS icons). A hidden <input>
 * mirrors the value for any backend handler. */
.dl-select {
  position: relative;
  width: 100%;
}
.dl-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 247, 230, 0.06);
  border: 2px solid rgba(200, 155, 110, 0.40);
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #fff7e6;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}
.dl-select-current {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dl-select-current-icon {
  width: 18px;
  height: 18px;
  color: var(--bubble-color);
  flex: 0 0 auto;
}
.dl-select-trigger:hover,
.dl-select-trigger[aria-expanded="true"] {
  border-color: var(--bubble-color);
  background: rgba(255, 247, 230, 0.1);
}
.dl-select-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--bubble-color);
  transition: transform 220ms cubic-bezier(.4, 0, .2, 1);
}
.dl-select-trigger[aria-expanded="true"] .dl-select-chevron {
  transform: rotate(180deg);
}
.dl-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #2a1f1a;
  border: 1.5px solid rgba(200, 155, 110, 0.4);
  border-radius: 12px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.6);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: dlSelectReveal 200ms cubic-bezier(.4, 0, .2, 1);
}
/* Respect the [hidden] attribute — `display: flex` above would
   otherwise override `display: none` from the user-agent stylesheet,
   leaving the listbox visible even when JS sets hidden=true. */
.dl-select-options[hidden] { display: none !important; }
@keyframes dlSelectReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dl-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff7e6;
  cursor: pointer;
  transition: background 140ms ease;
}
.dl-select-option svg {
  width: 16px;
  height: 16px;
  color: var(--bubble-color);
  flex: 0 0 auto;
}
.dl-select-option:hover,
.dl-select-option:focus {
  background: rgba(255, 247, 230, 0.08);
  outline: none;
}
.dl-select-option--active {
  background: rgba(200, 125, 100, 0.18);
}
.dl-select-option--active::after {
  content: "✓";
  margin-left: auto;
  color: var(--bubble-color);
  font-weight: 900;
}

/* ── DOWNLOAD BUTTON (standalone, bigger, image) ─────────────── */
.dl-modal-download {
  position: relative;
  display: block;
  margin: 4px auto 0;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  /* Reduced by 25 % per user feedback (340 → 255). */
  width: 255px;
}
.dl-modal-download-img {
  width: 100%;
  height: auto;
  display: block;
  transition: none;
}
.dl-modal-download-img--hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
}
.dl-modal-download:hover .dl-modal-download-img:not(.dl-modal-download-img--hover) { opacity: 0; }
.dl-modal-download:hover .dl-modal-download-img--hover { opacity: 1; }

@media (max-width: 720px) {
  .dl-modal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 22px;
  }
  .dl-modal-card { max-width: 480px; padding: 30px 22px 24px; }
  .dl-modal-download { width: 230px; }
}
@media (max-width: 480px) {
  .dl-modal-card { padding: 26px 18px 22px; }
  .dl-modal-download { width: 200px; }
}

/* ═══ Responsive tweaks ═════════════════════════════════════════════
 * Two breakpoints :
 *   ≤ 960 : tablets / narrow desktops — nav links collapse, sizes
 *           shrink, but the hero video + wide download button still
 *           render.
 *   ≤ 768 : full mobile mode — hero video off, header reduced to
 *           [logo · discord · account · burger], beach/newsletter
 *           layout reflowed for one-handed scrolling. */
@media (max-width: 960px) {
  .hdr-nav { display: none; }
  .site-header { padding: 0 14px; gap: 10px; }
  .hdr-actions { gap: 8px; }
  .character { width: 22vw; left: 16%; }
  .bubble { width: 42vw; right: 8%; }
  .play-btn { width: 240px; }
  .newsletter-card { padding: 28px 24px; }
}

@media (max-width: 768px) {
  /* ── Header reduced to 4 items ─────────────────────────────── */
  .hdr-btn--wide { display: none; }
  .hdr-burger { display: inline-flex; }
  .site-header { height: 64px; width: calc(100% - 24px); padding: 0 12px; gap: 8px; }
  .hdr-logo img { height: 42px; }
  .hdr-btn--discord { width: 44px; }
  .hdr-btn--account { width: 60px; }
  .hdr-account-head { width: 22px; height: 22px; left: 7px; }

  /* ── Hero : kill the video, keep a sky gradient + logoandlauncher ── */
  .hero-video { display: none !important; }
  .hero {
    background:
      linear-gradient(180deg, #7FEEFC 0%, #65C8EA 50%, #47B5E8 100%);
    min-height: 540px;
    height: 88vh;
  }
  .hero-logo { width: 78vw; max-width: 380px; }

  /* ── Beach : keep the EXACT same arrangement as desktop
     (character right of centre, bubble up-right of the character
     with the tail pointing down at its head). Only the vw widths
     are bumped up so the elements stay readable on a small screen ;
     the % positions are kept identical so the visual feels the same. */
  .beach { height: calc(100vw * 2843 / 3981); }
  .character {
    width: 26vw;
    min-width: 0;
    left: 50%;
    top: 36%;
  }
  .bubble {
    width: 42vw;
    min-width: 0;
    max-width: none;
    left: 56%;
    top: 16%;
  }
  .bubble-text { font-size: clamp(10px, 2.6vw, 13px); }
  .bubble-dots  { bottom: 14%; gap: 8px; }
  .bubble-dot   { width: 14px; height: 14px; }
  .bubble-dot-img--off { width: 10px; height: 10px; }
  .bubble-dot-img--on  { width: 14px; height: 14px; }
  .plant--left  { width: 44vw; bottom: 18vw; left: -18vw; }
  .plant--right { width: 42vw; bottom: 14vw; right: -16vw; }
  .wave-separator { bottom: -3vw; }
  .play-btn { width: 56vw; max-width: 240px; top: 78%; }

  /* ── Discord card scales down ───────────────────────────────── */
  .discord-card { width: min(440px, 88vw); padding: 18px 20px; }
  .discord-card-name { font-size: 16px; }

  /* ── Newsletter card full-width, palms smaller ──────────────── */
  .newsletter { margin-top: -4vw; padding: 6vw 16px 0; }
  .newsletter-card { max-width: 88vw; padding: 20px 22px; margin-top: 8vw; }
  .newsletter-title { font-size: 22px; }
  .newsletter-progress { height: 60px; margin: 0 4px 14px; }
  .progress-step .star-img { width: 38px; height: 38px; }
  .step-num { width: 38px; height: 38px; font-size: 14px; line-height: 38px; top: 8px; }
  .palm { width: 48vw; max-width: none; }
  .palm--left  { left: -16vw; bottom: -22vw; }
  .palm--right { right: -14vw; bottom: -22vw; }

  /* ── Footer stacks to 1 column ──────────────────────────────── */
  .footer-shell { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 4px; }

  /* ── Account dropdown : fit phone width ─────────────────────── */
  .account-dropdown { top: 78px; right: 12px; width: calc(100% - 24px); max-width: 360px; }

  /* ── Modals : margin tighter ────────────────────────────────── */
  .dl-modal { padding: 16px; }
  .dl-modal-card { padding: 26px 22px 22px; }
  .dl-modal h2 { font-size: 24px; }
  .mom-icon { width: 56px; height: 56px; }
  .mom-icon svg { width: 28px; height: 28px; }
}

@media (max-width: 480px) {
  .footer-shell { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .footer-brand { text-align: center; }
  .footer-logo { justify-content: center; }
  .footer-tagline { margin: 0 auto; }
  .hero-logo { width: 88vw; }
  /* Beach character + bubble keep the SAME arrangement as desktop ;
     vw values are bumped slightly more at this breakpoint because
     the section narrows further. */
  .character { width: 32vw; left: 50%; top: 36%; }
  .bubble    { width: 48vw; left: 56%; top: 16%; }
}

/* ═══ Reduced motion ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
