/* =========================================================================
   Big Ski Resort Tycoon — feuille de style
   -------------------------------------------------------------------------
   Organisation :
   1. Jetons (couleurs, polices) repris des variables Figma « ski-* »
   2. Base et utilitaires
   3. Composants partagés (boutons, logo, titres de section)
   4. Sections, du haut vers le bas — styles mobiles par défaut
   5. Desktop (≥ 1024 px, menu complet ≥ 1200 px) : cotes de la maquette 1440 exprimées en
      calc(N * var(--px)), où --px vaut 1px à 1440 px de large et se réduit
      proportionnellement en dessous. Au-delà de 1440 px, --px reste à 1px
      et le contenu est centré.
   ========================================================================= */

/* ---------- 1. Jetons ---------- */
:root {
  --navy: #081f40;
  --white: #ffffff;
  --snow: #edf3f9;
  --border: #c3d7e9;
  --mountain: #315b86;
  --glacier: #a8d5f0;
  --muted: #7393b5;
  --footer: #112337;
  --navy-hover: #0f2e5a;
  --white-hover: #e2ecf6;

  --font: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-logo: "Inter", "Arial Black", system-ui, sans-serif;

  --gutter: 20px;
  /* Échelle des sapins décoratifs en mobile (remplacée par --px en desktop) */
  --tree: 0.55px;

  /* Masques des visuels : tracés exportés de Figma, étirables (preserveAspectRatio none) */
  --mask-capture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 723.24 346.92' preserveAspectRatio='none'%3E%3Cpath transform='translate%283.3393 0%29' d='M 55.46074367442803 9.80000037931453 C 57.42074372428028 3.266666948871655 65.58740654872761 0 79.96074055917774 0 L 704.2207564371195 0 C 717.2874231246009 0 722.1874234828816 7.1866666332970315 718.9207568110113 21.560000834491966 L 673.8407556644096 323.40001251737954 C 671.8807556145573 339.0800131242828 663.0607553902222 346.9200134277344 647.3807549914042 346.9200134277344 L 19.200740882959693 346.9200134277344 C 4.174074145626058 346.9200134277344 -2.032592717847771 338.75334582190504 0.5807407598386337 322.4200124794481 L 55.46074367442803 9.80000037931453 Z'/%3E%3C/svg%3E");
  --mask-feature: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 492 392' preserveAspectRatio='none'%3E%3Cpath transform='translate%283.1579 0%29' d='M 114.84 3.85 L 472.84210205078125 0 C 483.50876903533936 0 487.1754353046417 6 483.84210205078125 18 L 400.84210205078125 372 C 398.84210205078125 385.3333330154419 392.17543506622314 392 380.84210205078125 392 L 11.8421049118042 392 C 1.8421049118041992 392 -1.8245614767074585 386 0.8421052694320679 374 L 97.19 17.51 Q 100.84 4 114.84 3.85 Z'/%3E%3C/svg%3E");
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html,
body { overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--snow);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--glacier);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--white); color: var(--navy); font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Image raster absente (pas encore téléchargée) : on la masque, le fond de secours prend le relais */
img.is-missing { opacity: 0; }

/* Élément désactivé par la configuration (ex. boutons Steam tant que STEAM_ENABLED = false) */
.is-hidden { display: none !important; }

.br-desktop { display: none; }

/* ---------- 3. Composants partagés ---------- */

/* Bouton (composant Figma « Button/Steam » et « Button/Play ») */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 18px;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease;
}
.btn__icon { width: 28px; height: 28px; flex: none; }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-hover); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--white-hover); }

/* Logo compact (header + footer) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  text-decoration: none;
  flex: none;
}
.brand__logo { height: 52px; width: auto; }
.brand--footer .brand__logo { height: 64px; }

/* Titres de section (style Figma « Ski/Heading ») */
.h-section {
  font-weight: 800;
  font-size: 30px;
  line-height: 34px;
  letter-spacing: -0.8px;
}
.text-large { font-size: 18px; line-height: 27px; }

.section-heading { display: flex; flex-direction: column; gap: 12px; }
.section-heading__line { width: 48px; height: 3px; background: var(--mountain); }

/* ---------- 4. Sections ---------- */

/* ===== 01 / Hero ===== */
.hero {
  position: relative;
  z-index: 3;
  min-height: 640px;
  padding: 104px 0 104px;
  /* Fond de secours tant que l'illustration n'est pas présente */
  background: linear-gradient(180deg, #8fb9df 0%, #cfe1f0 55%, var(--snow) 100%);
}
.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}
.hero__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Voile de contraste de la navigation + voile clair pour lire le texte sur petit écran */
  background:
    linear-gradient(180deg, rgba(20, 59, 110, .6) 0, rgba(20, 59, 110, 0) 120px),
    linear-gradient(180deg, rgba(237, 243, 249, 0) 70px, rgba(237, 243, 249, .72) 34%, rgba(237, 243, 249, .78) 78%, rgba(237, 243, 249, .3) 100%);
}

/* Barre de navigation */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  height: 72px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  position: relative;
  z-index: 30;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 24px; height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform .2s ease, background-color .2s ease;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile : panneau plein écran */
.nav {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 96px 24px 48px;
  background: var(--navy);
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
.nav.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity .2s ease;
}
.nav__list { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: var(--white);
  font-weight: 800;
  font-size: 28px;
  line-height: 34px;
  text-decoration: none;
}
.nav__link.is-active::after {
  content: "";
  width: 60px; height: 2px;
  background: var(--white);
}
body.menu-open { overflow: hidden; }
.nav__actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Sélecteur de langue : drapeau de l'autre langue */
.lang-switch {
  margin-left: auto;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 800;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  position: relative;
  z-index: 30;
  transition: background-color .15s ease;
}
.lang-switch:hover { background: rgba(255, 255, 255, .16); }
.lang-switch img {
  width: 30px; height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .7);
}

/* Contenu du hero */
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* Logo du jeu (image fournie, fond transparent) */
/* Accueil : grand logo dans la barre, qui déborde vers le bas sur le hero.
   --logo-w pilote à la fois sa largeur et le décalage du contenu du hero
   (hauteur du logo = 0,62 × largeur). Le reste de la largeur reste libre
   pour le drapeau et le burger. */
:root { --logo-w: min(300px, calc(100vw - 2 * var(--gutter) - 140px)); --logo-top: 12px; }
.brand--hero {
  align-self: flex-start;
  margin: var(--logo-top) 0 0;
  width: var(--logo-w);
  flex: none;
  position: relative;
  z-index: 11;
}
.brand--hero img { width: 100%; height: auto; }
.page-home .hero { padding-top: calc(var(--logo-top) + var(--logo-w) * 0.62 + 20px); }

.hero__promise {
  font-weight: 800;
  font-size: 24px;
  line-height: 29px;
  letter-spacing: -0.8px;
  max-width: 590px;
}
.hero__desc { font-size: 17px; line-height: 25px; max-width: 460px; }
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin-top: 4px;
}
.hero__actions .btn { width: 100%; }
.summit__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Sapin raster de premier plan : desktop uniquement */
.hero__pine-wrap { display: none; }

/* Découpe de neige en diagonale */
.hero__snowcut {
  position: absolute;
  left: 0; bottom: -1px;
  z-index: 1;
  width: 100%;
  height: 56px;
}

/* ===== 02 / Présentation du jeu ===== */
.intro {
  position: relative;
  z-index: 1;
  padding: 24px 0 56px;
}
.intro__massifs {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  opacity: .5;
  pointer-events: none;
}
.intro__massifs img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.intro__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Capture du jeu : rotation −3°, masque asymétrique, HUD en surimpression.
   Le HUD est dimensionné en unités relatives à la largeur de la capture (--u),
   pour garder exactement les proportions de la maquette à toutes les tailles. */
.capture {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: 3% 1.2%;
}
.capture__tilt { transform: rotate(-3deg); }
.capture__inner {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 723.24 / 346.92;
}
.capture__inner > * { --u: calc(100cqw / 723.24); }
.capture__mask {
  position: absolute;
  inset: 0;
  background: #cfe1f0;
  -webkit-mask: var(--mask-capture) center / 100% 100% no-repeat;
          mask: var(--mask-capture) center / 100% 100% no-repeat;
}
.capture__mask img {
  position: absolute;
  top: 0; bottom: 0;
  left: 0.4617%;
  width: 99.538%;
  height: 100%;
  object-fit: cover;
}

.hud {
  position: absolute;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}
.hud--top {
  left: calc(66.64 * var(--u));
  top: calc(15.68 * var(--u));
  width: calc(632.1 * var(--u));
  height: calc(41.16 * var(--u));
  padding: 0 calc(11.76 * var(--u));
  border-radius: calc(15.68 * var(--u));
  opacity: .88;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.hud__controls {
  display: flex;
  align-items: center;
  gap: calc(7.84 * var(--u));
  width: calc(171.5 * var(--u));
}
.hud__controls img { width: calc(19.6 * var(--u)); height: calc(19.6 * var(--u)); }
.hud__day {
  font-size: calc(11.76 * var(--u));
  line-height: calc(15.68 * var(--u));
  width: calc(70.56 * var(--u));
  white-space: nowrap;
}
.hud__stats {
  display: flex;
  justify-content: space-between;
  width: calc(321.44 * var(--u));
  font-size: calc(13.72 * var(--u));
  line-height: calc(19.6 * var(--u));
}
.hud__stat { width: calc(98 * var(--u)); white-space: nowrap; }
.hud__stat:last-child { width: calc(83.3 * var(--u)); }
.hud__stat--glacier { color: var(--glacier); }
.hud--tools {
  left: calc(37.24 * var(--u));
  top: calc(86.24 * var(--u));
  width: calc(47.04 * var(--u));
  height: calc(209.72 * var(--u));
  padding: calc(7.84 * var(--u));
  border-radius: calc(11.76 * var(--u));
  opacity: .9;
  display: flex;
  flex-direction: column;
  gap: calc(11.76 * var(--u));
}
.hud--tools img { width: calc(27.44 * var(--u)); height: calc(27.44 * var(--u)); }

.intro__text { display: flex; flex-direction: column; gap: 16px; }
.intro__peak { width: 80px; height: 34px; object-fit: contain; object-position: left center; }

/* ===== 03 / Fonctionnalités en diagonale ===== */
.features { position: relative; padding: 0 0 56px; }
.features__list { display: flex; flex-direction: column; gap: 16px; }
.feature {
  position: relative;
  min-height: 380px;
  color: var(--navy);
}
.feature--light { color: var(--white); }
.feature__art {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--mask-feature) center / 100% 100% no-repeat;
          mask: var(--mask-feature) center / 100% 100% no-repeat;
}
/* Fonds de secours, proches des teintes de chaque illustration */
.feature:nth-child(1) .feature__art { background: linear-gradient(180deg, #6cb2f0, #cfe6fa); }
.feature:nth-child(2) .feature__art { background: linear-gradient(180deg, #1e5aa8, #3f7cc8); }
.feature:nth-child(3) .feature__art { background: linear-gradient(180deg, #f6a58a, #c9b6e6); }
.feature__art img {
  position: absolute;
  top: 0; bottom: 0;
  left: 0.642%;
  width: 98.582%;
  height: 100%;
  object-fit: cover;
}
.feature__body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 44px 18% 32px 21%;
}
.feature__icon { width: 48px; height: 48px; }
.feature__title { font-weight: 800; font-size: 30px; line-height: 34px; letter-spacing: -0.8px; }
.feature__desc { font-size: 17px; line-height: 24px; }

/* ===== 04 + 05 / Carrousels (Devlogs, Aperçu du jeu) ===== */
.carousel-section { padding: 48px 0 32px; }
.devlogs { background: var(--white); }
.gallery { padding: 32px 0 24px; }

.carousel-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.carousel-nav { display: flex; gap: 12px; flex: none; }

/* Composant « Carousel/Control » : actif = navy, inactif = neige */
.carousel-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.carousel-btn__icon { width: 24px; height: 24px; grid-area: 1 / 1; }
.carousel-btn__icon--off { display: none; }
.carousel-btn:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
.carousel-btn[aria-disabled="true"] {
  background: var(--snow);
  border-color: var(--border);
  cursor: default;
}
.carousel-btn[aria-disabled="true"] .carousel-btn__icon--on { display: none; }
.carousel-btn[aria-disabled="true"] .carousel-btn__icon--off { display: block; }

.carousel-track {
  --track-pad: var(--gutter);
  display: flex;
  gap: 16px;
  margin-top: 24px;
  max-width: 1440px;
  margin-inline: auto;
  padding-left: var(--track-pad);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--track-pad);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
/* Espace de fin : permet au dernier élément de s'aligner sur la marge */
.carousel-track::after { content: ""; flex: 0 0 4px; }
.carousel-track > * { scroll-snap-align: start; flex: none; }

.devlog {
  width: min(82vw, 440px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.devlog__title { font-weight: 800; font-size: 24px; line-height: 30px; letter-spacing: -0.8px; text-wrap: balance; }
.devlog__title a { text-decoration: none; }
.devlog__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.devlog__desc { font-size: 17px; line-height: 25px; }

.shot {
  width: min(80vw, 420px);
  aspect-ratio: 420 / 192;
  border-radius: 16px;
  overflow: hidden;
  background: #cfe1f0;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* ===== 06 / Invitation au sommet ===== */
.summit {
  position: relative;
  /* Le titre blanc doit rester sur le massif (sombre) : le massif démarre à ~35 % de la hauteur sur les côtés */
  padding: 185px var(--gutter) 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.summit__art { position: absolute; inset: 0; pointer-events: none; }
.summit__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.summit__trees { position: absolute; top: 0; bottom: 0; width: 0; }
.summit__trees--left { left: 0; }
.summit__trees--right { right: 0; }
.summit__trees img {
  position: absolute;
  bottom: 0;
  width: calc(var(--w) * var(--tree));
  height: calc(var(--h) * var(--tree));
  max-width: none;
}
.summit__trees--left img { left: calc(var(--x) * var(--tree)); }
.summit__trees--right img { right: calc(var(--x) * var(--tree)); }
.summit__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.summit__title { color: var(--white); max-width: 820px; }

/* ===== 07 / Footer ===== */
.footer { background: var(--footer); color: var(--white); }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-block: 32px;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}
.footer__nav a {
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
  text-decoration: none;
}
.footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.socials { display: flex; gap: 12px; }
.social {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 999px;
  transition: background-color .15s ease;
}
.social:hover { background: rgba(255, 255, 255, .1); }
.social img { width: 26px; height: 26px; }

/* ===== Fenêtre du trailer ===== */
.trailer {
  width: min(960px, 92vw);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: var(--white);
  overflow: visible;
}
.trailer::backdrop { background: rgba(8, 31, 64, .82); }
.trailer__frame {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  padding: 24px;
}
.trailer__frame iframe { width: 100%; height: 100%; border: 0; }
.trailer__frame:has(iframe) { padding: 0; }
.dialog-close {
  position: absolute;
  top: -52px; right: 0;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Tablette ---------- */
@media (min-width: 640px) {
  :root { --gutter: 40px; --tree: 0.75px; }
  .hero__actions { flex-direction: row; flex-wrap: wrap; max-width: none; width: auto; }
  .hero__actions .btn { width: auto; }
  .hero__snowcut { height: 90px; }
  .h-section { font-size: 36px; line-height: 40px; }
  .features__list { display: grid; grid-template-columns: 1fr 1fr; }
  .feature:last-child { grid-column: 1 / -1; max-width: calc(50% - 8px); justify-self: center; width: 100%; }
}

/* =========================================================================
   5. Desktop — cotes de la maquette 1440
   ========================================================================= */
@media (min-width: 1024px) {
  /* --sbw = largeur de la barre de défilement (js/main.js), 0 sans JS */
  :root { --px: min(1px, calc((100vw - var(--sbw, 0px)) / 1440)); --tree: var(--px); }

  .container { padding-inline: 0; }
  .br-desktop { display: inline; }

  /* Boutons (Button/Steam, Button/Play) */
  .btn {
    min-height: 0;
    height: calc(60 * var(--px));
    padding: calc(16 * var(--px));
    gap: calc(16 * var(--px));
    font-size: max(15px, calc(20 * var(--px)));
    line-height: calc(24 * var(--px));
  }
  .btn { padding: calc(16 * var(--px)) calc(28 * var(--px)); }
  .btn__icon { width: calc(32 * var(--px)); height: calc(32 * var(--px)); }
  .btn--large { height: calc(64 * var(--px)); padding-inline: calc(32 * var(--px)); }
  /* Logo compact */
  .brand__logo { height: max(52px, calc(72 * var(--px))); }
  .brand--footer .brand__logo { height: max(48px, calc(60 * var(--px))); }

  .h-section { font-size: calc(44 * var(--px)); line-height: calc(48 * var(--px)); }
  .text-large { font-size: max(16px, calc(22 * var(--px))); line-height: calc(30 * var(--px)); }
  .section-heading { gap: calc(12 * var(--px)); }
  .section-heading__line { width: calc(48 * var(--px)); height: calc(3 * var(--px)); }

  /* ----- Hero ----- */
  .hero {
    min-height: 0;
    height: calc(710 * var(--px));
    padding: 0;
  }
  .hero__art { object-position: center; }
  .hero__veil {
    height: calc(160 * var(--px));
    bottom: auto;
    background: linear-gradient(180deg, rgba(20, 59, 110, .6), rgba(20, 59, 110, 0));
  }

  .topbar {
    height: calc(112 * var(--px));
    padding: 0 calc(48 * var(--px));
  }

  :root { --logo-w: calc(340 * var(--px)); --logo-top: calc(20 * var(--px)); }
  .brand--hero { margin-left: calc(38 * var(--px)); } /* bord gauche à 86 px, comme le texte du hero */
  .page-home .hero { padding-top: 0; }
  .hero__content {
    padding-top: calc(var(--logo-top) + var(--logo-w) * 0.62 + 70 * var(--px));
    padding-left: calc(86 * var(--px));
    gap: calc(16 * var(--px));
  }
  .hero__promise {
    font-size: calc(30 * var(--px));
    line-height: calc(33 * var(--px));
    max-width: none;
    width: calc(590 * var(--px));
  }
  .hero__desc {
    font-size: max(14px, calc(18 * var(--px)));
    line-height: calc(25 * var(--px));
    max-width: none;
    width: calc(460 * var(--px));
  }
  .hero__actions { gap: calc(16 * var(--px)); margin-top: 0; }

  .hero__pine-wrap {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
  }
  .hero__pine {
    position: absolute;
    right: calc(-41 * var(--px));
    top: calc(263 * var(--px));
    width: calc(341 * var(--px));
    height: calc(503 * var(--px));
    max-width: none;
    object-fit: cover;
  }
  .hero__snowcut { height: calc(150 * var(--px)); }

  /* ----- 02 / Présentation ----- */
  .intro {
    padding: 0;
    height: calc(388 * var(--px));
  }
  .intro__massifs { height: calc(238 * var(--px)); }
  .intro__inner {
    height: 100%;
    flex-direction: row;
    align-items: center;
    gap: calc(56 * var(--px));
    padding: 0 calc(72 * var(--px)) 0 calc(56 * var(--px));
  }
  .capture {
    flex: none;
    width: calc(740.405 * var(--px));
    height: calc(384.296 * var(--px));
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .capture__tilt { width: calc(723.24 * var(--px)); flex: none; }
  .intro__text { width: calc(500 * var(--px)); flex: none; gap: calc(16 * var(--px)); }
  .intro__peak { width: calc(112 * var(--px)); height: calc(48 * var(--px)); }
  .intro__text .h-section { width: calc(520 * var(--px)); }

  /* ----- 03 / Fonctionnalités ----- */
  .features { padding: calc(8 * var(--px)) 0 0; height: calc(408 * var(--px)); }
  .features__list { display: flex; flex-direction: row; gap: 0; }
  .feature,
  .feature:last-child {
    flex: none;
    width: calc(492 * var(--px));
    max-width: none;
    height: calc(392 * var(--px));
    min-height: 0;
    margin-right: calc(-12 * var(--px));
  }
  .feature:last-child { margin-right: 0; }
  .feature__body {
    gap: calc(12 * var(--px));
    padding: calc(48 * var(--px)) calc(44 * var(--px)) 0 calc(94 * var(--px));
  }
  .feature__icon { width: calc(64 * var(--px)); height: calc(64 * var(--px)); }
  .feature__title {
    font-size: calc(40 * var(--px));
    line-height: calc(44 * var(--px));
    width: calc(354 * var(--px));
  }
  .feature__desc {
    font-size: max(14px, calc(19 * var(--px)));
    line-height: calc(24 * var(--px));
    width: calc(354 * var(--px));
  }

  /* ----- 04 / 05 Carrousels ----- */
  .devlogs { padding: calc(62 * var(--px)) 0 calc(30 * var(--px)); }
  .gallery { padding: calc(32 * var(--px)) 0 calc(16 * var(--px)); }
  .carousel-section__head {
    align-items: center;
    height: calc(64 * var(--px));
    padding: 0 calc(80 * var(--px));
  }
  .carousel-nav { gap: calc(12 * var(--px)); }
  .carousel-btn {
    width: calc(40 * var(--px));
    height: calc(40 * var(--px));
    min-width: 32px; min-height: 32px;
    border-width: calc(2 * var(--px));
  }
  .carousel-btn__icon { width: calc(24 * var(--px)); height: calc(24 * var(--px)); }
  .carousel-track {
    --track-pad: calc(80 * var(--px));
    gap: calc(16 * var(--px));
    margin-top: calc(24 * var(--px));
  }
  .carousel-track::after { flex-basis: calc(64 * var(--px)); }
  .devlog { width: calc(500 * var(--px)); gap: calc(16 * var(--px)); }
  .devlog__title { font-size: calc(35 * var(--px)); line-height: calc(44 * var(--px)); text-wrap: balance; }
  .devlog__desc { font-size: max(16px, calc(22 * var(--px))); line-height: calc(30 * var(--px)); }
  .shot { width: calc(420 * var(--px)); height: calc(192 * var(--px)); border-radius: calc(16 * var(--px)); }

  /* ----- 06 / Invitation ----- */
  .summit {
    height: calc(280 * var(--px));
    padding: calc(76 * var(--px)) 0 0;
  }
  .summit__content { gap: calc(16 * var(--px)); }
  .summit__title { width: calc(820 * var(--px)); max-width: none; }

  /* ----- 07 / Footer ----- */
  .footer__inner {
    flex-direction: row;
    gap: calc(24 * var(--px));
    height: calc(80 * var(--px));
    padding: calc(16 * var(--px)) calc(64 * var(--px)) calc(16 * var(--px)) calc(80 * var(--px));
  }
  .footer__nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0;
    width: calc(600 * var(--px));
  }
  .footer__nav a {
    min-width: calc(66 * var(--px));
    text-align: center;
    font-size: max(13px, calc(14 * var(--px)));
  }
  .socials { gap: calc(12 * var(--px)); }
  .social { width: calc(40 * var(--px)); height: calc(40 * var(--px)); min-width: 32px; min-height: 32px; }
  .social img { width: calc(26 * var(--px)); height: calc(26 * var(--px)); }
}


/* Menu complet (≥ 1200 px). En dessous, le burger garantit que le menu ne
   chevauche jamais le logo, même avec les libellés français plus longs. */
@media (min-width: 1200px) {
  .topbar { justify-content: flex-start; }
  .menu-toggle { display: none; }
  .nav {
    position: static;
    inset: auto;
    flex: 1;
    min-width: 0;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: calc(16 * var(--px));
    margin-left: calc(48 * var(--px));
    padding: 0;
    background: none;
    visibility: visible;
    opacity: 1;
    transition: none;
  }
  /* Accueil : le menu s'aligne sur le haut de la barre, pas sur le logo */
  .topbar--home .nav,
  .topbar--home .lang-switch { align-self: flex-start; margin-top: calc(30 * var(--px)); }
  .nav__list {
    flex: 1;
    flex-direction: row;
    justify-content: center;
    gap: calc(28 * var(--px));
  }
  .nav__link {
    justify-content: center;
    gap: calc(8 * var(--px));
    height: calc(52 * var(--px));
    padding: 0 calc(8 * var(--px));
    font-weight: 700;
    font-size: max(14px, calc(18 * var(--px)));
    line-height: calc(24 * var(--px));
    white-space: nowrap;
  }
  .nav__link.is-active::after { width: calc(60 * var(--px)); height: calc(2 * var(--px)); min-height: 2px; }
  .nav__link:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
  .nav__link.is-active:hover { text-decoration: none; }
  .nav__actions { flex-direction: row; flex: none; gap: calc(12 * var(--px)); }
  /* Même hauteur que le bouton Discord : centres alignés */
  .lang-switch { margin: 0 0 0 calc(16 * var(--px)); flex: none; height: calc(52.2 * var(--px)); }

  /* Bouton du header : instance réduite à 87 % dans la maquette */
  .btn--header {
    height: calc(52.2 * var(--px));
    padding: calc(13.92 * var(--px)) calc(22 * var(--px));
    gap: calc(13.92 * var(--px));
    font-size: max(14px, calc(17.4 * var(--px)));
    line-height: calc(20.88 * var(--px));
  }
  .btn--header .btn__icon { width: calc(27.84 * var(--px)); height: calc(27.84 * var(--px)); }
}

/* =========================================================================
   6. Pages intérieures (Le jeu, Fonctionnalités, Médias)
   ========================================================================= */

/* Bandeau de page : même illustration que l'accueil, voile navy pour le texte blanc */
.page-hero {
  position: relative;
  z-index: 3;
  padding: 112px 0 96px;
  color: var(--white);
  background: linear-gradient(180deg, #14396b, #3a6da3);
}
.page-hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 31, 64, .78) 0%, rgba(20, 59, 110, .55) 55%, rgba(20, 59, 110, .25) 100%);
}
.page-hero__content { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; }
.page-hero__title { font-weight: 900; font-size: 40px; line-height: 44px; letter-spacing: -0.8px; }
.page-hero__lead { font-size: 18px; line-height: 27px; max-width: 620px; }
.page-hero__snowcut { position: absolute; left: 0; bottom: -1px; z-index: 1; width: 100%; height: 48px; }

/* Blocs de contenu */
.block { padding: 56px 0; }
.block--white { background: var(--white); }
.block__hint { margin-top: 12px; color: var(--mountain); font-size: 16px; }
.block__actions { margin-top: 28px; }
.h-sub { margin: 48px 0 16px; font-weight: 800; font-size: 24px; line-height: 30px; letter-spacing: -0.5px; }

/* Texte + image côte à côte */
.split { display: grid; gap: 32px; align-items: center; }
.split__text { display: flex; flex-direction: column; gap: 16px; }
.split__media {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #cfe1f0;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* Étapes de la boucle de jeu (vraie séquence : numérotation justifiée) */
.steps { display: grid; gap: 16px; margin-top: 28px; padding: 0; list-style: none; }
.step {
  position: relative;
  padding: 28px;
  border-radius: 20px;
  background: var(--snow);
}
.step__num {
  position: absolute; top: 16px; right: 24px;
  font-weight: 900; font-size: 56px; line-height: 1;
  color: var(--border);
}
.step__icon {
  width: 56px; height: 56px;
  padding: 12px;
  border-radius: 999px;
  background: var(--navy);
}
.step__title { margin: 18px 0 8px; font-weight: 800; font-size: 22px; line-height: 28px; }

/* Fiche du jeu */
.facts { display: grid; gap: 12px; margin: 0; }
.fact { padding: 20px 24px; border-radius: 16px; background: var(--white); }
.fact dt { font-size: 15px; font-weight: 700; color: var(--mountain); }
.fact dd { margin: 4px 0 0; font-size: 20px; line-height: 26px; font-weight: 800; }

/* Encart d'appel (Discord) */
.callout {
  margin-top: 40px;
  padding: 28px;
  border-radius: 20px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.callout p { font-size: 20px; line-height: 28px; font-weight: 700; max-width: 640px; }
.callout__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Fonctionnalités en détail */
.features--page { padding-top: 40px; }
.feature-grid { display: grid; gap: 16px; margin-top: 28px; }
.feature-item { padding: 24px; border-radius: 16px; background: var(--snow); }
.feature-item--planned { background: transparent; border: 2px dashed var(--border); }
.feature-item__title {
  margin-bottom: 8px;
  font-weight: 800; font-size: 20px; line-height: 26px;
}
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--glacier);
  font-size: 13px; line-height: 20px; font-weight: 800;
  vertical-align: 3px;
}

/* Trailer */
.video-card {
  position: relative;
  margin-top: 28px;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--navy);
}
.video-card__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-card__play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px 14px 20px;
  border: 0; border-radius: 999px;
  background: var(--white); color: var(--navy);
  font-weight: 800; font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(8, 31, 64, .35);
}
.video-card__soon {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 24px;
  text-align: center;
  color: var(--white);
  background: rgba(8, 31, 64, .6);
}
.video-card__soon p { max-width: 520px; font-size: 20px; line-height: 28px; font-weight: 800; }

/* Grille de captures */
.shots-grid { display: grid; gap: 16px; margin-top: 24px; padding: 0; list-style: none; }
.shots-grid__item {
  display: block; width: 100%;
  padding: 0; border: 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #cfe1f0;
  cursor: zoom-in;
}
.shots-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.shots-grid__item:hover img { transform: scale(1.03); }

/* Liste des devlogs */
.devlog-list { display: grid; gap: 16px; margin-top: 24px; padding: 0; list-style: none; }
.devlog-list__item { padding: 24px; border-radius: 16px; background: var(--white); }
.devlog-list__item time,
.devlog__date { font-size: 15px; font-weight: 700; color: var(--mountain); }
.devlog-list__item h3 { margin: 4px 0 8px; font-weight: 800; font-size: 22px; line-height: 28px; }
.devlog-list__item a { text-decoration: none; }
.devlog-list__item a:hover { text-decoration: underline; }

/* Visionneuse */
.lightbox {
  width: min(1200px, 94vw);
  max-height: 94vh;
  padding: 0; border: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(8, 31, 64, .9); }
.lightbox__figure { margin: 0; }
.lightbox__img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 12px; }
.lightbox__caption { margin-top: 12px; color: var(--white); text-align: center; font-weight: 700; }
.lightbox__nav {
  position: absolute; top: 40%;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 999px;
  background: var(--white);
  cursor: pointer;
}
.lightbox__nav img { width: 26px; height: 26px; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
.lightbox .dialog-close { position: absolute; top: -52px; right: 0; }

@media (min-width: 640px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .feature-grid,
  .shots-grid { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 132px 0 120px; }
  .page-hero__title { font-size: 52px; line-height: 56px; }
  .page-hero__snowcut { height: 80px; }
}

@media (min-width: 1024px) {
  .page-hero {
    height: calc(440 * var(--px));
    padding: calc(160 * var(--px)) 0 0;
  }
  .page-hero__content { padding-inline: calc(86 * var(--px)); gap: calc(16 * var(--px)); }
  .page-hero__title { font-size: calc(64 * var(--px)); line-height: calc(68 * var(--px)); }
  .page-hero__lead { font-size: max(16px, calc(22 * var(--px))); line-height: calc(30 * var(--px)); max-width: calc(680 * var(--px)); }
  .page-hero__snowcut { height: calc(150 * var(--px)); }

  .block { padding: calc(80 * var(--px)) 0; }
  .block > .container,
  .block .container { padding-inline: calc(80 * var(--px)); }
  .block__hint { font-size: max(14px, calc(18 * var(--px))); }
  .h-sub { margin-top: calc(64 * var(--px)); font-size: calc(30 * var(--px)); line-height: calc(36 * var(--px)); }

  .split { grid-template-columns: 1fr 1fr; gap: calc(64 * var(--px)); }
  .split--reverse .split__text { order: 2; }
  .split__text { gap: calc(20 * var(--px)); }
  .split__media { border-radius: calc(20 * var(--px)); transform: rotate(-2deg); }
  .split--reverse .split__media { transform: rotate(2deg); }

  .steps { grid-template-columns: repeat(3, 1fr); gap: calc(24 * var(--px)); margin-top: calc(40 * var(--px)); }
  .step { padding: calc(32 * var(--px)); }
  .step__title { font-size: max(18px, calc(24 * var(--px))); line-height: calc(30 * var(--px)); }
  .step p { font-size: max(15px, calc(18 * var(--px))); line-height: calc(27 * var(--px)); }

  .facts { grid-template-columns: repeat(4, 1fr); gap: calc(16 * var(--px)); }
  .callout {
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: calc(36 * var(--px)) calc(44 * var(--px));
  }

  .features--page { height: auto; padding: calc(56 * var(--px)) 0 calc(48 * var(--px)); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: calc(24 * var(--px)); margin-top: calc(40 * var(--px)); }
  .feature-item { padding: calc(28 * var(--px)); }
  .feature-item p { font-size: max(15px, calc(18 * var(--px))); line-height: calc(27 * var(--px)); }

  .video-card { max-width: calc(960 * var(--px)); }
  .shots-grid { grid-template-columns: repeat(3, 1fr); gap: calc(20 * var(--px)); }
  .devlog-list { grid-template-columns: repeat(3, 1fr); gap: calc(20 * var(--px)); }
  .devlog__date { font-size: max(13px, calc(16 * var(--px))); }

  .lightbox__nav--prev { left: -72px; }
  .lightbox__nav--next { right: -72px; }
}

/* Mouvement réduit : on coupe les transitions décoratives */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
