/* Inside Life · site insidelifegame.com
   Style C « Verre et lumière » (design/ui/directions.md) : verre sombre, trait blanc à 14 %,
   lueur ambre, anneaux fins turquoise / ambre, comme le HUD du jeu.
   Rien n'est chargé depuis un autre site : polices locales (Outfit, Manrope), aucune ressource externe. */

/* Polices : Outfit (titres et chiffres) et Manrope (texte), licence SIL OFL (voir /polices/OFL_*.txt).
   Fichiers locaux réduits au latin + accents ; polices du système en secours. Rien ne vient d'un autre site. */
@font-face { font-family: "Outfit"; src: url("/polices/Outfit.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/polices/Manrope.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root { --police-titres: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; --police-texte: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif; }

:root {
  color-scheme: dark;
  --fond: #07090d;
  --fond-2: #0e1116;
  --nuit: #152b3a;
  --verre: rgba(14, 17, 22, 0.62);
  --verre-fort: rgba(14, 17, 22, 0.86);
  --trait: rgba(255, 255, 255, 0.14);
  --trait-fort: rgba(255, 255, 255, 0.24);
  --texte: rgba(255, 255, 255, 0.94);
  --texte-2: #aab3c0;
  --ambre: #ffb347;
  --ambre-2: #ffc874;
  --turquoise: #4fd1c5;
  --corail: #ff6f7d;
  --encre-bouton: #1a1206;
  --rayon: 20px;
  --rayon-image: 14px;
  --ombre: 0 18px 50px rgba(0, 0, 0, 0.5);
  --largeur: 1120px;
  --gouttiere: 16px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--fond);
  color: var(--texte);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}
/* Ciel de fin de journée : lueur ambre en haut, reflet turquoise de la lagune, bleu nuit en bas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70rem 42rem at 88% -14%, rgba(255, 179, 71, 0.2), transparent 62%),
    radial-gradient(46rem 34rem at -10% 34%, rgba(79, 209, 197, 0.09), transparent 62%),
    radial-gradient(70rem 40rem at 50% 118%, rgba(21, 43, 58, 0.95), transparent 70%),
    var(--fond);
}
img { max-width: 100%; height: auto; }
a { color: var(--ambre-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ambre); }
:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--police-titres); color: var(--texte); text-wrap: balance; }
p { text-wrap: pretty; }
strong { color: var(--texte); font-weight: 700; }

/* Bascule de langue : FR par défaut, le JS change data-lang sur <html> */
html[data-lang="fr"] [lang="en"]:not(html),
html[data-lang="en"] [lang="fr"]:not(html) { display: none !important; }

.conteneur { width: min(100% - 2 * var(--gouttiere), var(--largeur)); margin-inline: auto; }
.lien-evitement {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ambre); color: var(--encre-bouton); font-weight: 700; text-decoration: none;
}
.lien-evitement:focus { top: 12px; }
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Verre ---------- */
.verre {
  background: var(--verre);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .verre { background: var(--verre-fort); }
}

/* ---------- En-tête ---------- */
.entete { padding-block: 14px; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marque {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--texte); text-decoration: none;
  font-family: var(--police-titres); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
  white-space: nowrap;
}
.marque:hover { color: var(--texte); }
.marque-soleil {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--ambre-2), var(--ambre));
  box-shadow: 0 0 14px 3px rgba(255, 179, 71, 0.55);
}
.entete-actions { display: flex; align-items: center; gap: 10px; }
.langues { display: inline-flex; padding: 3px; border-radius: 999px; }
.langues a {
  min-width: 42px; min-height: 38px; padding: 0 8px;
  display: inline-grid; place-items: center; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--texte-2); text-decoration: none;
}
.langues a:hover { color: var(--texte); }
.langues a[aria-current="true"] { background: rgba(255, 255, 255, 0.13); color: var(--texte); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font-family: var(--police-titres); font-weight: 700; font-size: 1.02rem; line-height: 1.2;
  text-align: center; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.bouton svg { width: 20px; height: 20px; flex: none; }
.bouton-ambre {
  background: linear-gradient(180deg, var(--ambre-2), var(--ambre));
  color: var(--encre-bouton);
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.45), 0 10px 34px rgba(255, 179, 71, 0.3);
}
.bouton-ambre:hover { color: var(--encre-bouton); transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.6), 0 14px 42px rgba(255, 179, 71, 0.42); }
.bouton-verre {
  background: var(--verre); border-color: var(--trait-fort); color: var(--texte);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bouton-verre:hover { color: var(--texte); border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.08); }
.bouton-petit { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }

/* ---------- Accueil : le voyage dans la ville ----------
   Une scène plein écran par lieu. Au défilement, chaque plan s'ouvre par-dessus le précédent
   (fenêtre, rideau ou volets), avec un zoom lent. ville.js pose la classe « immersif » sur <html>
   et les variables de chaque lieu : --f (1 = fermé, 0 = ouvert), --zoom, --y (parallaxe), --sombre.
   Sans JavaScript ou avec « réduire les animations » : les lieux s'empilent, en images fixes. */
.surtitre {
  margin: 0;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--turquoise);
}
h1 { margin: 0.3em 0 0.35em; font-size: clamp(2.3rem, 6vw, 4.3rem); line-height: 1.03; letter-spacing: -0.03em; font-weight: 800; }
.lueur { color: var(--ambre); text-shadow: 0 0 30px rgba(255, 179, 71, 0.45); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.precisions { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 6px; font-size: 0.93rem; color: var(--texte-2); }
.precisions li { display: flex; gap: 10px; align-items: baseline; }
.precisions li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--turquoise); transform: translateY(-1px);
}
.capture { margin: 0; position: relative; isolation: isolate; }
.cadre { padding: 8px; box-shadow: var(--ombre), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.cadre img { display: block; width: 100%; height: auto; border-radius: var(--rayon-image); }
figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--texte-2); }

/* En-tête fixe en verre sombre ; pendant le voyage (mode immersif), posé à nu sur la vidéo */
.page-accueil .entete {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: rgba(7, 9, 13, 0.8); border-bottom: 1px solid var(--trait);
  -webkit-backdrop-filter: blur(14px) saturate(130%); backdrop-filter: blur(14px) saturate(130%);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.immersif .page-accueil .entete:not(.est-opaque) {
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}

/* Un lieu = un plan (image + vidéo), un voile pour lire le texte, et le texte */
.voyage { position: relative; }
.lieu {
  position: relative; overflow: hidden; isolation: isolate;
  height: 100vh; height: 100svh; min-height: 480px;
  background: var(--fond);
}
.lieu-plan { position: absolute; inset: 0; transform: translate3d(0, var(--y, 0px), 0); }
.lieu-cadre { position: absolute; inset: 0; overflow: hidden; background: var(--fond-2); }
.lieu-cadre > picture { position: absolute; inset: 0; }
.lieu-image, .lieu-video {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; max-width: none; object-fit: cover;
  transform: scale(var(--zoom, 1)); transform-origin: 50% 55%;
}
.lieu-image:not([src]) { visibility: hidden; } /* image pas encore chargée : rien plutôt que le texte alternatif */
.lieu-video { opacity: 0; transition: opacity 0.5s ease; }
.lieu-video.est-prete { opacity: 1; }
.lieu-flou { display: none; }

/* Voile : haut assombri pour l'en-tête, bas et coin gauche pour le texte */
.lieu-voile {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5, 7, 10, 0.55) 0, rgba(5, 7, 10, 0) 150px),
    linear-gradient(to top, rgba(5, 7, 10, 0.86) 0%, rgba(5, 7, 10, 0.5) 30%, rgba(5, 7, 10, 0) 62%);
}
/* Le plan qui s'efface derrière le suivant s'assombrit */
.lieu::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: #05070a; opacity: var(--sombre, 0);
}
.lieu-texte {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  height: 100vh; height: 100svh; min-height: 480px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding-bottom: clamp(28px, 6vh, 64px);
}
.lieu-numero {
  margin: 0 0 6px;
  font-family: var(--police-titres); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.7);
}
.lieu-numero span { color: var(--ambre); }
.lieu-titre {
  margin: 0.05em 0 0.25em; max-width: 16ch;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.lieu-ouverture .lieu-titre { font-size: clamp(2.5rem, 6.6vw, 5.6rem); max-width: 13ch; margin-top: 0.2em; }
.lieu-phrase {
  margin: 0; max-width: 40ch;
  font-size: clamp(1.02rem, 1.45vw, 1.22rem); line-height: 1.5; color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}
.lieu-ouverture .lieu-texte { padding-bottom: clamp(64px, 11vh, 110px); }
.lieu-final .actions { margin-top: 18px; }

/* Invitation à défiler (ouverture) */
.invite-defiler {
  position: absolute; left: 50%; bottom: 18px; z-index: 3; margin: 0;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72); transition: opacity 0.4s ease;
}
.invite-defiler::after {
  content: ""; width: 1px; height: 30px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  transform-origin: top; animation: invite 2.2s ease-in-out infinite;
}
@keyframes invite {
  0% { transform: scaleY(0); opacity: 1; }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
.voyage-scene.a-defile .invite-defiler { opacity: 0; }

/* Arrivée du texte de l'ouverture au chargement */
@keyframes monter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .lieu-ouverture .lieu-texte > * { animation: monter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .lieu-ouverture .lieu-texte > :nth-child(2) { animation-delay: 0.08s; }
  .lieu-ouverture .lieu-texte > :nth-child(3) { animation-delay: 0.16s; }
  .lieu-ouverture .lieu-texte > :nth-child(4) { animation-delay: 0.24s; }
}

/* Écrans larges : le texte en bas à gauche, voile plus marqué de ce côté */
@media (min-aspect-ratio: 4/3) {
  .lieu-voile {
    background:
      linear-gradient(to bottom, rgba(5, 7, 10, 0.55) 0, rgba(5, 7, 10, 0) 150px),
      radial-gradient(130% 95% at 0% 100%, rgba(5, 7, 10, 0.86) 0%, rgba(5, 7, 10, 0.5) 34%, rgba(5, 7, 10, 0) 62%),
      linear-gradient(to top, rgba(5, 7, 10, 0.5) 0%, rgba(5, 7, 10, 0) 40%);
  }
}

/* Téléphone debout : les plans trop larges (avion, zem, plage, cinéma) passent dans une fenêtre carrée,
   au-dessus du même plan flouté ; le texte reste dessous */
@media (max-aspect-ratio: 3/4) {
  .lieu[data-forme="carre"] .lieu-flou {
    display: block; position: absolute; inset: -6%; width: 112%; height: 112%; max-width: none; object-fit: cover;
  }
  .lieu[data-forme="carre"] .lieu-flou:not([src]) { visibility: hidden; }
  .lieu[data-forme="carre"] .lieu-cadre {
    /* fenêtre centrée dans la hauteur, avec la place du texte (environ 230 px) sous elle */
    inset: auto; left: 50%;
    width: min(100vw - 40px, 100vh - 330px, 520px);
    width: min(100vw - 40px, 100svh - 330px, 520px);
    top: max(76px, calc((100vh - min(100vw - 40px, 100vh - 330px, 520px) - 230px) / 2));
    top: max(76px, calc((100svh - min(100vw - 40px, 100svh - 330px, 520px) - 230px) / 2));
    aspect-ratio: 1 / 1; transform: translateX(-50%);
    border-radius: 24px; border: 1px solid var(--trait-fort);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
  .lieu[data-forme="carre"] .lieu-voile {
    background:
      linear-gradient(rgba(5, 7, 10, 0.24), rgba(5, 7, 10, 0.24)),
      linear-gradient(to top, rgba(5, 7, 10, 0.8) 0%, rgba(5, 7, 10, 0) 45%);
  }
}

/* Téléphone couché : tout tient sur une hauteur courte */
@media (orientation: landscape) and (max-height: 520px) {
  .entete { padding-block: 8px; }
  .lieu, .lieu-texte { min-height: 300px; }
  .lieu-texte { padding-bottom: 16px; }
  .lieu-ouverture .lieu-texte { padding-bottom: 18px; }
  .lieu-titre { font-size: 2rem; }
  .lieu-ouverture .lieu-titre { font-size: 2.2rem; max-width: none; margin: 0.15em 0 0.2em; }
  .lieu-phrase { font-size: 0.95rem; max-width: 52ch; }
  .actions { margin-top: 14px; }
  .bouton { min-height: 44px; }
  .precisions { margin-top: 10px; grid-template-columns: 1fr 1fr; gap: 4px 18px; font-size: 0.86rem; }
  .invite-defiler { display: none; }
}

/* ---------- Mode immersif (ville.js) ---------- */
.immersif .voyage { height: calc(100vh + (var(--nb, 10) - 1) * 100vh); height: calc(100lvh + (var(--nb, 10) - 1) * 100svh); }
.immersif .voyage-scene { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.immersif .lieu { position: absolute; inset: 0; height: auto; min-height: 0; pointer-events: none; background: none; }
.immersif .lieu.est-active { pointer-events: auto; }
.immersif .lieu.est-cachee .lieu-plan,
.immersif .lieu.est-cachee .lieu-voile { visibility: hidden; }

/* Les trois ouvertures */
.immersif .lieu[data-entree="fenetre"] { clip-path: inset(calc(var(--f, 0) * 50%) round calc(var(--f, 0) * 48px)); }
.immersif .lieu[data-entree="rideau"] { clip-path: inset(calc(var(--f, 0) * 100%) 0 0 0); }
.immersif .lieu[data-entree="volets"] { clip-path: inset(0 calc(var(--f, 0) * 50%)); }

/* Le texte du lieu arrive quand le plan est ouvert, et repart avant le suivant */
.immersif .lieu-texte > * { transition: opacity 0.55s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.immersif .lieu.est-active .lieu-texte > :nth-child(2) { transition-delay: 0.06s; }
.immersif .lieu.est-active .lieu-texte > :nth-child(3) { transition-delay: 0.14s; }
.immersif .lieu.est-active .lieu-texte > :nth-child(4) { transition-delay: 0.22s; }
.immersif .lieu.est-active .lieu-texte > :nth-child(5) { transition-delay: 0.3s; }
.immersif .lieu:not(.est-active) .lieu-texte > * { opacity: 0; transform: translateY(14px); transition-duration: 0.25s; }
/* Titres des lieux : ils montent derrière un masque */
.immersif .lieu:not(.lieu-ouverture) .lieu-titre { overflow: hidden; padding-bottom: 0.08em; }
.immersif .lieu:not(.lieu-ouverture) .lieu-titre > span { display: block; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.04s; }
.immersif .lieu:not(.lieu-ouverture):not(.est-active) .lieu-titre { opacity: 1; transform: none; }
.immersif .lieu:not(.lieu-ouverture):not(.est-active) .lieu-titre > span { transform: translateY(110%); transition-duration: 0.25s; transition-delay: 0s; }

/* Sommaire des lieux, à droite sur grand écran */
.chapitres { display: none; }
@media (min-width: 1024px) and (min-aspect-ratio: 4/3) {
  .immersif .chapitres {
    display: block; position: absolute; right: clamp(18px, 2.4vw, 40px); top: 50%; z-index: 5;
    transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
  }
  .immersif .voyage-scene.montre-chapitres .chapitres,
  .immersif .chapitres:focus-within { opacity: 1; pointer-events: auto; }
  .chapitres ol {
    list-style: none; margin: 0; padding: 8px 14px; display: grid; gap: 2px;
    border-radius: 16px; background: rgba(7, 9, 13, 0.34);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .chapitres a {
    display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 6px 0;
    font-family: var(--police-titres); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.6); text-decoration: none; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
    transition: color 0.3s ease;
  }
  .chapitres a::after {
    content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7); box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  }
  .chapitres a:hover { color: var(--texte); }
  .chapitres a[aria-current="true"] { color: var(--texte); }
  .chapitres a[aria-current="true"]::after { background: var(--ambre); border-color: var(--ambre); transform: scale(1.3); box-shadow: 0 0 12px rgba(255, 179, 71, 0.8); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(36px, 5vw, 64px); }
.section-titre { margin: 0 0 0.35em; font-size: clamp(1.65rem, 3.4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
.section-intro { margin: 0 0 30px; color: var(--texte-2); max-width: 62ch; }
.etiquette {
  display: inline-block; margin: 0 0 12px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ambre);
}

/* Cartes « Ce qu'on fait » */
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); list-style: none; margin: 0; padding: 0; }
.carte { padding: 22px 22px 24px; }
.carte h3 { margin: 16px 0 6px; font-size: 1.16rem; letter-spacing: -0.01em; }
.carte p { margin: 0; color: var(--texte-2); font-size: 0.98rem; }

/* Anneaux du HUD : un arc fin qui se remplit, turquoise si ça va, ambre quand il faut agir */
.anneau {
  --p: 75; --c: var(--turquoise);
  position: relative; width: 52px; height: 52px;
  display: grid; place-items: center; color: var(--c);
  border-radius: 50%;
  box-shadow: 0 0 26px -6px var(--c);
}
.anneau::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, 0.13) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.anneau svg { position: relative; width: 24px; height: 24px; }
.anneau.p35 { --p: 35; --c: var(--ambre); }
.anneau.p60 { --p: 60; }
.anneau.p76 { --p: 76; }
.anneau.p80 { --p: 80; }
.anneau.p50 { --p: 50; --c: var(--ambre); }
.anneau.p100 { --p: 100; }

/* Les deux modes */
.modes { display: grid; gap: 16px; }
.mode { position: relative; overflow: hidden; padding: clamp(22px, 3.4vw, 34px); border-radius: 24px; }
.mode::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -30% auto auto; width: 70%; height: 90%;
  background: radial-gradient(closest-side, var(--halo), transparent);
}
.mode { isolation: isolate; }
.mode-decouverte { --halo: rgba(79, 209, 197, 0.16); --puce: var(--turquoise); }
.mode-en-ligne { --halo: rgba(255, 179, 71, 0.18); --puce: var(--ambre); }
.pastille {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--trait-fort); background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-2);
}
.pastille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--puce); box-shadow: 0 0 10px var(--puce); }
.mode h3 { margin: 16px 0 8px; font-size: clamp(1.5rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; }
.mode > p { margin: 0; color: var(--texte-2); }
.points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 11px; }
.points li { position: relative; padding-left: 28px; }
.points li::before {
  content: ""; position: absolute; left: 3px; top: 0.5em;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--puce, var(--turquoise));
}
.note { margin: 18px 0 0; font-size: 0.93rem; color: var(--texte-2); }
@media (min-width: 760px) { .modes { grid-template-columns: 1fr 1fr; } }

/* Galerie */
.galerie { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); list-style: none; margin: 0; padding: 0; }
.galerie figure { margin: 0; }
.galerie img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--rayon-image); border: 1px solid var(--trait); background: var(--fond-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Ce qu'on construit ensuite */
.suite { display: grid; gap: 28px; align-items: center; }
.liste-suite { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste-suite li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--trait); }
.liste-suite li::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  border: 2px dashed rgba(255, 179, 71, 0.85);
}
.maquette-badge {
  display: inline-block; margin: 0 0 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(7, 9, 13, 0.82); border: 1px solid var(--trait-fort);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ambre-2);
}
@media (min-width: 900px) { .suite { grid-template-columns: 0.9fr 1.1fr; } }

/* Suivre */
.suivre { padding: clamp(26px, 4vw, 44px); border-radius: 28px; display: grid; gap: 20px; align-items: center; position: relative; overflow: hidden; isolation: isolate; }
.suivre::before {
  content: ""; position: absolute; z-index: -1; inset: auto -10% -60% auto; width: 60%; height: 140%;
  background: radial-gradient(closest-side, rgba(255, 179, 71, 0.2), transparent);
}
.suivre .section-titre { margin-bottom: 0.2em; }
.suivre p { margin: 0; color: var(--texte-2); }
@media (min-width: 760px) { .suivre { grid-template-columns: 1.4fr auto; } }

/* ---------- Pied de page ---------- */
.pied { padding-block: 36px 48px; border-top: 1px solid var(--trait); margin-top: 24px; }
.pied .conteneur { display: grid; gap: 18px; }
.pied nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.pied a { color: var(--texte-2); text-decoration: none; }
.pied a:hover { color: var(--texte); text-decoration: underline; }
.pied-bas { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 0.9rem; color: var(--texte-2); }
.pied-bas p { margin: 0; }

/* ---------- Pages de texte (confidentialité, conditions, etc.) ---------- */
.page-texte { padding-block: clamp(16px, 4vw, 40px) clamp(48px, 7vw, 80px); }
.page-texte h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0.2em 0 0.3em; }
.texte-long { max-width: 74ch; }
.texte-long .maj { color: var(--texte-2); font-size: 0.93rem; margin-top: 0; }
.texte-long h2 { margin: 2em 0 0.5em; font-size: clamp(1.25rem, 2.4vw, 1.5rem); letter-spacing: -0.01em; }
.texte-long h3 { margin: 1.6em 0 0.4em; font-size: 1.1rem; }
.texte-long p, .texte-long li { color: rgba(255, 255, 255, 0.88); }
.texte-long ul, .texte-long ol { padding-left: 1.3em; }
.texte-long li { margin-bottom: 0.45em; }
.texte-long li::marker { color: var(--ambre); }
.encadre { padding: 20px 22px; margin: 1.4em 0; }
.encadre > :first-child { margin-top: 0; }
.encadre > :last-child { margin-bottom: 0; }
.a-remplir {
  padding: 1px 7px; border-radius: 6px;
  background: rgba(255, 111, 125, 0.14); border: 1px dashed rgba(255, 111, 125, 0.65);
  color: #ffc2c8; font-weight: 600; white-space: normal;
}
.a-valider { color: #ffc2c8; font-size: 0.9em; }

.tableau { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.96rem; }
.tableau th, .tableau td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--trait); }
.tableau th { color: var(--texte-2); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; }
@media (max-width: 640px) {
  .tableau thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau tr { padding: 10px 0; border-bottom: 1px solid var(--trait); }
  .tableau td { border: 0; padding: 4px 0; }
  .tableau td::before {
    content: attr(data-etiquette); display: block;
    font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--texte-2);
  }
}

/* Étapes numérotées en anneaux (page de suppression) */
.etapes { list-style: none; counter-reset: etape; padding: 0 !important; margin: 1em 0; display: grid; gap: 12px; }
.etapes li { counter-increment: etape; position: relative; padding: 4px 0 4px 50px; margin: 0; min-height: 36px; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--turquoise); color: var(--turquoise); font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 0 18px -6px var(--turquoise);
}
.options { display: grid; gap: 16px; margin: 1.6em 0; }
.option { padding: clamp(20px, 3vw, 28px); }
.option h2 { margin-top: 0.2em; }
@media (min-width: 860px) { .options { grid-template-columns: 1fr 1fr; } }

/* Page /jouer/ en attente et 404 */
.attente { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 40px; }
.attente .verre { padding: clamp(26px, 5vw, 48px); max-width: 620px; }
.attente h1 { font-size: clamp(2rem, 5vw, 3rem); }
.attente p { color: var(--texte-2); }
.attente .actions { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
