/* ============================================================
   ERYTHRITE — « Archives du Ministère »
   Réécriture totale. Direction brutaliste : béton + rouge signal,
   angles nets, bordures lourdes, gros texte, aucune fioriture dorée.
   Une seule police (Space Grotesk, SIL OFL — libre de droit).
   Motion façon Emil : courbes custom, :active, hover conditionné
   tactile, reduced-motion. On n'anime que transform / opacity.
   ============================================================ */

:root {
  --bg:      #0a0a0a;
  --bg-2:    #0f0f0f;
  --panel:   #131313;
  --panel-2: #181818;
  --line:    #242424;
  --line-2:  #383838;
  --line-3:  #565656;

  --text:      #ececea;
  --text-dim:  #9a9a96;
  --text-mute: #666663;

  /* --- Accent : pilote par le theme (voir « Thèmes » plus bas) --- */
  --accent:      #fb3b2c;
  --accent-hi:   #ff5a4d;
  --accent-deep: #c22a1d;
  --accent-rgb:  251, 59, 44;
  --ink:         #150403;   /* texte pose SUR l'accent (boutons pleins) */

  --steel:     #7f96ac;
  --steel-weak:rgba(127, 150, 172, 0.14);
  --green:     #4ade80;
  --danger:    #fb3b2c;

  /* Alias historiques : les pages des addons (entreprise, garde-robe…)
     continuent d'utiliser --red*, qui suit desormais l'accent du theme. */
  --red:      var(--accent);
  --red-hi:   var(--accent-hi);
  --red-deep: var(--accent-deep);
  --red-weak: rgba(var(--accent-rgb), .12);

  --r:    3px;
  --r-lg: 5px;

  --nav-h: 60px;

  --font: "Space Grotesk", system-ui, sans-serif;

  --e-out: cubic-bezier(0.23, 1, 0.32, 1);
  --e-io:  cubic-bezier(0.77, 0, 0.175, 1);
}

/* ============================================================
   THÈMES — saisons & evenements
   Le serveur ecrit <html data-theme="..."> (config : site.theme).
   Chaque theme ne redefinit que l'accent + quelques teintes :
   la direction artistique (beton, angles nets, typo) ne bouge pas.
   ============================================================ */

[data-theme="spring"] {
  --accent: #6cc24a; --accent-hi: #8ede66; --accent-deep: #4a9130;
  --accent-rgb: 108, 194, 74; --ink: #071505;
  --steel: #86a8c4;
}
[data-theme="summer"] {
  --accent: #2fc4e6; --accent-hi: #5fd9f5; --accent-deep: #1b93b0;
  --accent-rgb: 47, 196, 230; --ink: #041318;
  --steel: #d8b98a;
}
[data-theme="autumn"] {
  --accent: #e2703a; --accent-hi: #ff9057; --accent-deep: #a94d22;
  --accent-rgb: 226, 112, 58; --ink: #180903;
  --steel: #9a8b73;
}
[data-theme="winter"] {
  --accent: #7ab4ff; --accent-hi: #a3cdff; --accent-deep: #4a83d4;
  --accent-rgb: 122, 180, 255; --ink: #050d1a;
  --steel: #94a7bd;
}
[data-theme="christmas"] {
  --accent: #e8413f; --accent-hi: #ff6260; --accent-deep: #b32826;
  --accent-rgb: 232, 65, 63; --ink: #170303;
  --steel: #3f9e5a;
}
[data-theme="halloween"] {
  --accent: #ff8b17; --accent-hi: #ffa740; --accent-deep: #c25f00;
  --accent-rgb: 255, 139, 23; --ink: #170a00;
  --steel: #9a6bd8;
}
[data-theme="easter"] {
  --accent: #e34d9c; --accent-hi: #ff74ba; --accent-deep: #ad2f72;
  --accent-rgb: 227, 77, 156; --ink: #170410;
  --steel: #8fd05f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: var(--red); color: #fff; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grain de pellicule, très discret, au-dessus de tout */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- Boutons (blocs nets) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid transparent;
  border-radius: var(--r);
  font-family: var(--font); font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .14s var(--e-out), background .16s var(--e-out),
              border-color .16s var(--e-out), color .16s var(--e-out), box-shadow .16s var(--e-out);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red); color: var(--ink); box-shadow: 0 0 0 0 var(--red-weak); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--line-3); }
.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
.btn-small { padding: 8px 16px; font-size: .82rem; }
.btn-big   { padding: 15px 30px; font-size: 1rem; }
.btn-wide  { width: 100%; padding: 14px; font-size: .98rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--red-hi); transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(var(--accent-rgb),.6); }
  .btn-outline:hover { border-color: var(--red); color: var(--red-hi); }
  .btn-ghost:hover   { background: #202020; border-color: var(--line-3); }
}

/* ============================================================
   NAVIGATION
   Barre fixe : marque + edition du theme, liens de section avec
   indicateur glissant, raccourcis applicatifs, badge « en ligne »,
   et un panneau mobile complet (les liens n'etaient plus atteignables
   sous 820 px). Le trait du bas sert de jauge de progression.
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(14px) saturate(140%);
  transition: background .3s var(--e-out);
}
.nav.scrolled { background: rgba(10,10,10,.9); }
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 26px;
}

/* --- Marque --- */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; transition: opacity .15s var(--e-out); }
.brand:active { opacity: .7; }
.brand-gem { width: 13px; height: 13px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.brand-logo { width: 32px; height: 32px; border-radius: var(--r); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; justify-content: center; }
.brand-name {
  font-weight: 700; font-size: 1.26rem; letter-spacing: .16em; line-height: 1.1;
  color: var(--text);
}

/* --- Liens de section + indicateur glissant --- */
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-links a {
  position: relative;
  color: var(--text-dim); text-decoration: none;
  font-size: .78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 9px 13px; border-radius: var(--r);
  transition: color .15s var(--e-out), background .15s var(--e-out);
}
.nav-links a.is-active { color: var(--text); }

/* Un seul rectangle deplace en transform (translate + scaleX) : pas de
   recalcul de layout, et il peut etre redirige en plein vol. */
.nav-ind {
  position: absolute; left: 0; bottom: -2px;
  width: 100px; height: 2px; background: var(--accent);
  transform-origin: left center; transform: scaleX(0);
  opacity: 0; pointer-events: none;
  transition: transform .26s var(--e-io), opacity .18s var(--e-out);
}
.nav-ind.is-on { opacity: 1; }
.nav-ind.no-anim { transition: none; }

/* --- Raccourcis (Voice / Entreprises) --- */
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-app {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text); text-decoration: none;
  font-size: .78rem; font-weight: 600; letter-spacing: .03em;
  padding: 7px 12px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--panel);
  white-space: nowrap;
  transition: transform .14s var(--e-out), border-color .16s var(--e-out), background .16s var(--e-out);
}
.nav-app:active { transform: scale(.97); }
.nav-app.is-current { border-color: var(--accent); color: var(--accent-hi); }
.nav-app-icon { font-size: .95rem; line-height: 1; }
.nav-div { width: 1px; height: 22px; background: var(--line-2); flex-shrink: 0; }

/* Compat : les pages d'addons (entreprise, garde-robe) posent encore leurs
   raccourcis dans .nav-links avec l'ancienne classe .nav-voice. */
.nav-links .nav-voice {
  color: var(--text); border: 1px solid var(--line-2); background: var(--panel);
  margin-left: 6px; text-transform: none; letter-spacing: .03em; font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--text); background: var(--panel-2); }
  .nav-app:hover { border-color: var(--accent); background: var(--panel-2); }
}

/* --- Jauge de lecture : le filet du bas se remplit en accent --- */
.nav-rail {
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--line-2);
  opacity: 0; transition: opacity .3s var(--e-out);
}
.nav.scrolled .nav-rail { opacity: 1; }
.nav-rail > i {
  display: block; height: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
}

/* --- Burger + panneau mobile --- */
.nav-burger {
  display: none; position: relative;
  width: 38px; height: 34px; padding: 0;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r);
  cursor: pointer;
  transition: transform .14s var(--e-out), border-color .16s var(--e-out);
}
.nav-burger:active { transform: scale(.94); }
.nav-burger span {
  position: absolute; left: 50%; width: 16px; height: 1.5px; background: var(--text);
  transition: transform .24s var(--e-out), opacity .16s var(--e-out);
}
.nav-burger span:nth-child(1) { top: 13px; transform: translateX(-50%); }
.nav-burger span:nth-child(2) { top: 19px; transform: translateX(-50%); }
.nav.menu-open .nav-burger { border-color: var(--accent); }
.nav.menu-open .nav-burger span:nth-child(1) { transform: translateX(-50%) translateY(3px) rotate(45deg); }
.nav.menu-open .nav-burger span:nth-child(2) { transform: translateX(-50%) translateY(-3px) rotate(-45deg); }

.nav-sheet {
  position: absolute; top: 100%; left: 0; right: 0;
  /* Opaque : le hero passe dessous, aucune translucidite a compenser */
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.9);
  padding: 6px 20px 20px;
  max-height: calc(100dvh - var(--nav-h)); overflow-y: auto;
  display: none; flex-direction: column;
  opacity: 0; transform: translateY(-8px);
  /* Fermeture : rapide. C'est le systeme qui repond, pas l'utilisateur qui decide. */
  transition: opacity .12s var(--e-out), transform .14s var(--e-out);
}
.nav.menu-open .nav-sheet {
  opacity: 1; transform: translateY(0);
  transition: opacity .18s var(--e-out), transform .24s var(--e-out);
}
.nav-sheet a {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); text-decoration: none;
  font-size: .95rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 15px 4px; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(6px);
  /* Sortie sans decalage : tout part d'un bloc quand on referme */
  transition: opacity .12s var(--e-out), transform .12s var(--e-out), color .15s var(--e-out);
}
.nav.menu-open .nav-sheet a {
  transition: opacity .22s var(--e-out), transform .22s var(--e-out), color .15s var(--e-out);
}
.nav-sheet a:last-child { border-bottom: none; }
.nav-sheet a:active { color: var(--accent-hi); }
.nav-sheet a.is-active { color: var(--text); }
.nav-sheet a.is-active::before { content: ""; width: 3px; align-self: stretch; background: var(--accent); margin-left: -4px; }
.nav.menu-open .nav-sheet a { opacity: 1; transform: translateY(0); }
.nav.menu-open .nav-sheet a:nth-child(1) { transition-delay: .02s; }
.nav.menu-open .nav-sheet a:nth-child(2) { transition-delay: .06s; }
.nav.menu-open .nav-sheet a:nth-child(3) { transition-delay: .10s; }
.nav.menu-open .nav-sheet a:nth-child(4) { transition-delay: .14s; }
.nav.menu-open .nav-sheet a:nth-child(5) { transition-delay: .18s; }
.nav.menu-open .nav-sheet a:nth-child(6) { transition-delay: .22s; }
.nav-sheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 20px;
}

.online-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(74,222,128,.07); border: 1px solid rgba(74,222,128,.28);
  padding: 6px 11px; border-radius: var(--r); white-space: nowrap;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(74,222,128,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.5); } 50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); } }

.profile-chip { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px 8px 4px 4px; font-size: .84rem; font-weight: 600; }
.profile-chip img { border-radius: 3px; }
.chip-logout { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: .8rem; padding: 4px; transition: color .15s var(--e-out), transform .14s var(--e-out); }
.chip-logout:active { transform: scale(.9); }
.chip-logout:hover { color: var(--red-hi); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 118%, rgba(var(--accent-rgb),.14), transparent 66%),
    radial-gradient(ellipse 60% 45% at 78% -12%, rgba(127,150,172,.08), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.013) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #060606 0%, #0d0d0d 55%, #0a0a0a 100%);
}
/* Vignette + lueur d'urgence rouge, vacillement discret */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 50% 120%, rgba(var(--accent-rgb),.16), transparent 66%),
    radial-gradient(120% 100% at 50% 40%, transparent 52%, rgba(0,0,0,.6) 100%);
  animation: emberflicker 9s linear infinite;
}
@keyframes emberflicker { 0%,90%,100% { opacity: .92; } 91% { opacity: .66; } 92% { opacity: .92; } 95% { opacity: .74; } 96% { opacity: .94; } }

.hero-city { position: absolute; left: 0; right: 0; bottom: 0; height: 36vh; background-repeat: repeat-x; background-position: bottom; z-index: 1; }
.hero-city-far {
  opacity: .55;
  background-image: linear-gradient(0deg, #171717 0%, #171717 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='none'%3E%3Cpath d='M0 300V190h60v-60h40v60h30V90h70v100h40V150h60v-40h50v90h30V120h80v80h50V60h30l10-30 10 30h30v140h60V130h70v70h40V100h60v100h50V160h70v-30h40v170z' fill='black'/%3E%3C/svg%3E") bottom / 1200px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='none'%3E%3Cpath d='M0 300V190h60v-60h40v60h30V90h70v100h40V150h60v-40h50v90h30V120h80v80h50V60h30l10-30 10 30h30v140h60V130h70v70h40V100h60v100h50V160h70v-30h40v170z' fill='black'/%3E%3C/svg%3E") bottom / 1200px 100% repeat-x;
}
.hero-city-near {
  height: 24vh;
  background-image: linear-gradient(0deg, #060606 0%, #0e0e0e 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200V120h90V60h60v60h50V90h80v70h60V40h20l8-25 8 25h24v120h70V80h90v80h60V50h70v110h70V100h80v60h90v-40h60v80z' fill='black'/%3E%3C/svg%3E") bottom / 1200px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200V120h90V60h60v60h50V90h80v70h60V40h20l8-25 8 25h24v120h70V80h90v80h60V50h70v110h70V100h80v60h90v-40h60v80z' fill='black'/%3E%3C/svg%3E") bottom / 1200px 100% repeat-x;
}
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 110px; z-index: 1; background: linear-gradient(180deg, transparent, var(--bg)); }

/* ============================================================
   DÉCORS DE THÈME
   Trois calques vides par défaut, remplis par le thème actif :
     .hero-orb    astre, derrière la skyline
     .hero-haze   mer, aurore, brume ou poussière
     .hero-ground sable, congère, tapis de feuilles, herbe
   Tout est en dégradés CSS : pas une seule image en plus.
   ============================================================ */
.hero-orb, .hero-haze, .hero-ground {
  display: none; position: absolute; pointer-events: none;
}
.hero-orb { border-radius: 50%; }
.hero-haze, .hero-ground { left: 0; right: 0; z-index: 1; }

/* Bord supérieur ondulé, réutilisé par tous les sols. Le dégradé qui s'y
   croise adoucit le haut du sol : aucun bord franc ne vient couper le texte. */
.hero-ground {
  bottom: 0;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath d='M0 140V52c120-26 230 16 350-4s210-38 330-18 250 44 370 22 150-16 150-16v104z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--wave), linear-gradient(180deg, transparent 0, #000 62%);
  -webkit-mask-size: 100% 100%, 100% 100%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-image: var(--wave), linear-gradient(180deg, transparent 0, #000 62%);
  mask-size: 100% 100%, 100% 100%;
  mask-repeat: no-repeat, no-repeat;
  mask-composite: intersect;
}

/* ---- ÉTÉ : le soleil se couche sur la mer, la ville en contre-jour ---- */
[data-theme="summer"] .hero-sky {
  background:
    radial-gradient(ellipse 95% 48% at 50% 94%, rgba(255,150,60,.30), transparent 62%),
    radial-gradient(ellipse 65% 34% at 50% 101%, rgba(255,208,130,.24), transparent 60%),
    linear-gradient(180deg, #04070e 0%, #0a1521 36%, #1f1815 70%, #130d0a 100%);
}
/* Le soleil s'enfonce derrière la skyline : seul l'arc supérieur reste
   visible, et jamais derrière le texte du hero. */
[data-theme="summer"] .hero-orb {
  display: block;
  width: min(270px, 40vw); aspect-ratio: 1;
  left: 77%; bottom: 7vh; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%,
    #ffe6a4 0 32%, #f8b25c 58%, #e8813a 76%, rgba(232,129,58,0) 78%);
  opacity: .82;
  filter: drop-shadow(0 0 90px rgba(255,150,60,.42));
}
/* La mer : la colonne de reflets qui court du soleil jusqu'à la plage */
[data-theme="summer"] .hero-haze {
  display: block; bottom: 23vh; height: 14vh;
  background: repeating-linear-gradient(0deg, rgba(255,201,132,.40) 0 2px, transparent 2px 10px);
  -webkit-mask: radial-gradient(ellipse 14% 130% at 77% 0%, #000 10%, transparent 72%);
  mask: radial-gradient(ellipse 14% 130% at 77% 0%, #000 10%, transparent 72%);
  animation: sea-shimmer 8s ease-in-out infinite alternate;
}
@keyframes sea-shimmer { from { opacity: .55; } to { opacity: 1; } }
/* La plage passe devant les ruines, puis se fond dans le bas du hero */
[data-theme="summer"] .hero-ground {
  display: block; height: 24vh;
  background: linear-gradient(180deg, #6b5236 0%, #3d2e1f 34%, #221913 66%, #140e0a 100%);
}

/* ---- HIVER : nuit claire, aurore, congère ---- */
[data-theme="winter"] .hero-sky {
  background:
    radial-gradient(ellipse 80% 50% at 50% 112%, rgba(122,180,255,.20), transparent 64%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #03060d 0%, #070d19 52%, #0a1220 100%);
}
[data-theme="winter"] .hero-orb {
  display: block; width: 104px; height: 104px; right: 8%; top: 11vh;
  background:
    radial-gradient(circle at 62% 62%, rgba(120,150,190,.16) 0 7%, transparent 8%),
    radial-gradient(circle at 38% 36%, #f4f8ff 0 50%, #d3e2f7 72%, #b7cdec 100%);
  box-shadow: 0 0 70px rgba(200,225,255,.32);
}
[data-theme="winter"] .hero-haze {
  display: block; top: 0; height: 62vh;
  background:
    radial-gradient(ellipse 38% 58% at 24% 4%, rgba(118,255,214,.13), transparent 70%),
    radial-gradient(ellipse 32% 50% at 58% 0%, rgba(140,180,255,.11), transparent 70%);
  animation: aurora-drift 16s ease-in-out infinite alternate;
}
@keyframes aurora-drift { from { transform: translateX(-2.5%); } to { transform: translateX(3.5%); } }
[data-theme="winter"] .hero-ground {
  display: block; height: 17vh;
  background: linear-gradient(180deg, #e8f1fb 0%, #b9cde4 32%, #64789a 100%);
  opacity: .9;
}

/* ---- NOËL : ciel étoilé, neige au sol, guirlande sous la barre ---- */
[data-theme="christmas"] .hero-sky {
  background:
    radial-gradient(1.6px 1.6px at 11% 17%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 27% 8%,  rgba(255,255,255,.8), transparent),
    radial-gradient(1.8px 1.8px at 41% 23%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 56% 6%,  rgba(255,255,255,.7), transparent),
    radial-gradient(1.7px 1.7px at 68% 19%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 83% 11%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.5px 1.5px at 92% 27%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 18% 33%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.6px 1.6px at 74% 35%, rgba(255,255,255,.7), transparent),
    radial-gradient(ellipse 80% 46% at 50% 112%, rgba(232,65,63,.14), transparent 64%),
    linear-gradient(180deg, #03050d 0%, #070a16 55%, #090b14 100%);
}
[data-theme="christmas"] .hero-ground {
  display: block; height: 17vh;
  background: linear-gradient(180deg, #f2f6fc 0%, #c3d2e6 34%, #6b7d99 100%);
  opacity: .92;
}
/* Guirlande accrochée sous la navbar. Volontairement fixe : elle est
   visible en permanence, une animation ici deviendrait vite pénible. */
[data-theme="christmas"] .nav::after {
  content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 13px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14px 7px, #ff5c5c 0 2.8px, rgba(255,92,92,.22) 3px, transparent 7px),
    radial-gradient(circle at 41px 7px, #6be08a 0 2.8px, rgba(107,224,138,.22) 3px, transparent 7px),
    radial-gradient(circle at 68px 7px, #ffd166 0 2.8px, rgba(255,209,102,.22) 3px, transparent 7px),
    radial-gradient(circle at 95px 7px, #8ec5ff 0 2.8px, rgba(142,197,255,.22) 3px, transparent 7px),
    linear-gradient(180deg, rgba(255,255,255,.16) 0 1px, transparent 1px);
  background-size: 108px 13px, 108px 13px, 108px 13px, 108px 13px, 100% 13px;
  background-repeat: repeat-x;
}

/* ---- HALLOWEEN : pleine lune derrière les ruines, brume au sol ---- */
[data-theme="halloween"] .hero-sky {
  background:
    radial-gradient(ellipse 80% 48% at 50% 114%, rgba(255,139,23,.18), transparent 62%),
    radial-gradient(ellipse 55% 42% at 70% 4%, rgba(154,107,216,.15), transparent 66%),
    linear-gradient(180deg, #050308 0%, #0a0711 55%, #0a0607 100%);
}
/* Pleine lune haute et à l'écart du texte : les chauves-souris passent devant */
[data-theme="halloween"] .hero-orb {
  display: block;
  width: min(190px, 26vw); aspect-ratio: 1;
  right: 7%; top: 13vh; opacity: .9;
  background:
    radial-gradient(circle at 37% 41%, rgba(150,130,95,.14) 0 9%, transparent 10%),
    radial-gradient(circle at 61% 57%, rgba(150,130,95,.11) 0 6%, transparent 7%),
    radial-gradient(circle at 52% 26%, rgba(150,130,95,.09) 0 4%, transparent 5%),
    radial-gradient(circle at 46% 46%, #fff7e6 0 58%, #f0dcae 100%);
  box-shadow: 0 0 100px rgba(255,228,175,.28);
}
[data-theme="halloween"] .hero-haze {
  display: block; bottom: 2vh; height: 26vh;
  background: linear-gradient(180deg, transparent, rgba(206,196,222,.13) 46%, rgba(206,196,222,.22));
  animation: fog-drift 24s ease-in-out infinite alternate;
}
@keyframes fog-drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

/* ---- AUTOMNE : lumière rasante, tapis de feuilles ---- */
[data-theme="autumn"] .hero-sky {
  background:
    radial-gradient(ellipse 90% 46% at 44% 98%, rgba(226,112,58,.24), transparent 62%),
    radial-gradient(ellipse 60% 40% at 80% 4%, rgba(180,140,90,.10), transparent 62%),
    linear-gradient(180deg, #060508 0%, #12100c 50%, #1a1310 78%, #0e0b09 100%);
}
/* Soleil rasant, décalé du texte, qui s'éteint derrière les ruines */
[data-theme="autumn"] .hero-orb {
  display: block; width: min(230px, 34vw); aspect-ratio: 1;
  left: 23%; bottom: 9vh; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%,
    #ffdca0 0 30%, #f0a45c 60%, rgba(226,112,58,0) 74%);
  opacity: .85;
  filter: blur(1px) drop-shadow(0 0 70px rgba(226,112,58,.38));
}
[data-theme="autumn"] .hero-haze {
  display: block; bottom: 8vh; height: 26vh;
  background: linear-gradient(180deg, transparent, rgba(226,160,90,.10));
}
[data-theme="autumn"] .hero-ground {
  display: block; height: 20vh;
  background:
    radial-gradient(6px 4px at 12% 40%, rgba(255,150,70,.55), transparent),
    radial-gradient(5px 4px at 33% 62%, rgba(200,90,40,.5), transparent),
    radial-gradient(7px 5px at 54% 34%, rgba(240,170,80,.45), transparent),
    radial-gradient(5px 4px at 71% 66%, rgba(180,80,35,.5), transparent),
    radial-gradient(6px 4px at 88% 44%, rgba(255,170,90,.4), transparent),
    linear-gradient(180deg, #4a2d18 0%, #2a1a10 50%, #150d09 100%);
}

/* ---- PRINTEMPS : aube tiède, herbe ---- */
[data-theme="spring"] .hero-sky {
  background:
    radial-gradient(ellipse 90% 46% at 50% 100%, rgba(108,194,74,.20), transparent 62%),
    radial-gradient(ellipse 55% 38% at 24% 6%, rgba(255,214,150,.10), transparent 64%),
    linear-gradient(180deg, #04070a 0%, #0a1210 52%, #0d1510 80%, #0a0d0a 100%);
}
[data-theme="spring"] .hero-orb {
  display: block; width: min(190px, 30vw); aspect-ratio: 1;
  left: 15%; top: 20vh;
  background: radial-gradient(circle at 50% 50%,
    #fff3cf 0 28%, #ffdf9a 56%, rgba(255,223,154,0) 72%);
  filter: blur(1px);
}
[data-theme="spring"] .hero-ground {
  display: block; height: 18vh;
  background:
    repeating-linear-gradient(96deg, rgba(140,215,100,.30) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #4c7a34 0%, #274b1e 45%, #101b0e 100%);
}

/* ---- PÂQUES : aube pastel, prairie ---- */
[data-theme="easter"] .hero-sky {
  background:
    radial-gradient(ellipse 90% 48% at 50% 102%, rgba(227,77,156,.18), transparent 62%),
    radial-gradient(ellipse 60% 40% at 74% 4%, rgba(180,140,230,.12), transparent 64%),
    linear-gradient(180deg, #06040a 0%, #100b14 50%, #150d14 78%, #0b080b 100%);
}
[data-theme="easter"] .hero-orb {
  display: block; width: min(200px, 30vw); aspect-ratio: 1;
  left: 85%; top: 19vh; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%,
    #ffeaf5 0 28%, #ffb7dc 56%, rgba(255,183,220,0) 72%);
  filter: blur(1px);
}
[data-theme="easter"] .hero-ground {
  display: block; height: 18vh;
  background:
    repeating-linear-gradient(84deg, rgba(160,220,120,.26) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #4f7f38 0%, #2a4d22 45%, #121c10 100%);
}

.hero-content { position: relative; z-index: 2; padding: 120px 24px 80px; max-width: 940px; }
.hero-content > * { animation: rise .55s var(--e-out) both; }
.hero-kicker { animation-delay: .04s; } .hero-title { animation-delay: .1s; }
.hero-tagline { animation-delay: .2s; } .hero-actions { animation-delay: .28s; } .hero-stats { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.hero-kicker {
  display: inline-block;
  color: var(--red); font-weight: 600;
  font-size: .74rem; letter-spacing: .28em; text-transform: uppercase;
  border: 1px solid var(--red-weak); padding: 6px 14px; border-radius: var(--r);
  margin-bottom: 26px;
}
.hero-title {
  position: relative; display: inline-block;
  font-weight: 700; font-size: clamp(3.6rem, 13vw, 8.5rem);
  letter-spacing: -.04em; line-height: .92; color: var(--text);
  text-transform: uppercase;
}
.hero-title::after { content: ""; display: block; width: 88px; height: 7px; background: var(--accent); margin: 22px auto 0; }

/* Logo saisonnier a la place du titre typographique.
   En background-image : le navigateur ne telecharge que le logo du theme
   actif, et rien du tout sur le theme par defaut. */
.hero-mark { display: none; }
[data-theme]:not([data-theme="default"]) .hero-mark {
  display: block; margin: 0 auto;
  width: min(720px, 84vw); aspect-ratio: 2048 / 593;
  /* Longhands : le raccourci `background` remettrait background-image a none
     et gagnerait sur les regles par theme, moins specifiques. */
  background-position: center; background-size: contain; background-repeat: no-repeat;
  filter: drop-shadow(0 20px 44px rgba(0,0,0,.6));
}
/* Le texte reste dans le h1 pour le SEO et les lecteurs d'ecran */
[data-theme]:not([data-theme="default"]) .hero-word {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
[data-theme]:not([data-theme="default"]) .hero-title { font-size: 0; line-height: 0; }

[data-theme="spring"]    .hero-mark { background-image: url("/themes/spring/wordmark.png"); }
[data-theme="summer"]    .hero-mark { background-image: url("/themes/summer/wordmark.png"); }
[data-theme="autumn"]    .hero-mark { background-image: url("/themes/autumn/wordmark.png"); }
[data-theme="winter"]    .hero-mark { background-image: url("/themes/winter/wordmark.png"); }
[data-theme="christmas"] .hero-mark { background-image: url("/themes/christmas/wordmark.png"); }
[data-theme="halloween"] .hero-mark { background-image: url("/themes/halloween/wordmark.png"); }
[data-theme="easter"]    .hero-mark { background-image: url("/themes/easter/wordmark.png"); }
.hero-tagline { margin-top: 26px; font-size: clamp(1.05rem, 3vw, 1.4rem); color: var(--text-dim); font-weight: 400; }
.hero-actions { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

#btn-copy-ip { font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.copy-hint { font-size: .78rem; opacity: .65; font-weight: 500; }

.hero-stats { margin-top: 58px; display: flex; justify-content: center; align-items: stretch; gap: 0; flex-wrap: wrap; border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; align-items: center; padding: 22px 34px; }
.stat-num { font-weight: 700; font-size: 2.5rem; color: var(--text); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .66rem; color: var(--text-mute); margin-top: 9px; text-transform: uppercase; letter-spacing: .16em; font-weight: 500; }
.stat-sep { width: 1px; background: var(--line); align-self: stretch; }

/* ---------- Sections ---------- */
/* Sans ca, un lien d'ancre glisse le titre sous la barre fixe */
.section[id], .hero[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
.section { padding: 108px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }

.section-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--red); font-weight: 600;
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px;
}
.section-kicker::before { content: ""; width: 26px; height: 8px; background: var(--red); display: inline-block; }
.section-title { font-weight: 700; font-size: clamp(2.1rem, 5.5vw, 3.4rem); letter-spacing: -.03em; line-height: 1.02; text-transform: uppercase; margin-bottom: 26px; }
.section-sub { color: var(--text-dim); max-width: 720px; margin-bottom: 48px; font-size: 1.02rem; }

.story p { color: var(--text-dim); margin-bottom: 18px; font-size: 1.05rem; }
.story strong { color: var(--text); font-weight: 600; }
.story-em { color: var(--text) !important; font-size: 1.25rem !important; font-weight: 600; border-left: 4px solid var(--red); padding-left: 18px; margin: 26px 0 !important; }

/* ---------- Voies ---------- */
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.path-card {
  background: var(--panel); border: 1.5px solid var(--line-2); border-radius: var(--r);
  padding: 34px 30px; position: relative; overflow: hidden;
  transition: transform .22s var(--e-out), border-color .22s var(--e-out), box-shadow .22s var(--e-out);
}
.path-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.path-legal::before { background: var(--steel); }
.path-crime::before { height: 8px; background: repeating-linear-gradient(45deg, var(--red) 0 11px, #1a0605 11px 22px); }
.path-card:active { transform: translateY(-1px) scale(.995); }
@media (hover: hover) and (pointer: fine) {
  .path-legal:hover { transform: translateY(-5px); border-color: var(--steel); box-shadow: 0 20px 44px -22px rgba(127,150,172,.5); }
  .path-crime:hover { transform: translateY(-5px); border-color: var(--red); box-shadow: 0 20px 44px -22px rgba(var(--accent-rgb),.5); }
}
.path-icon { font-size: 2.3rem; margin-bottom: 16px; }
.path-card h3 { font-weight: 700; font-size: 1.7rem; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 12px; }
.path-card p { color: var(--text-dim); font-size: .95rem; }
.path-card ul { margin-top: 18px; list-style: none; }
.path-card li { color: var(--text); font-size: .9rem; padding: 6px 0 6px 22px; position: relative; }
.path-legal li::before { content: ""; position: absolute; left: 0; top: 13px; width: 9px; height: 2px; background: var(--steel); }
.path-crime li::before { content: ""; position: absolute; left: 0; top: 13px; width: 9px; height: 2px; background: var(--red); }
.path-dare { margin-top: 18px; color: var(--red-hi) !important; font-weight: 600; }

/* ---------- Règles ---------- */
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.rule-card {
  background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 26px 24px;
  transition: transform .22s var(--e-out), border-color .22s var(--e-out);
}
.rule-card:active { transform: translateY(-1px) scale(.995); }
@media (hover: hover) and (pointer: fine) { .rule-card:hover { transform: translateY(-3px); border-color: var(--line-3); } }
.rule-card h3 { font-size: 1.04rem; font-weight: 600; margin-bottom: 10px; }
.rule-lead { color: var(--red-hi); font-size: .86rem; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .03em; }
.rule-card p:not(.rule-lead) { color: var(--text-dim); font-size: .92rem; }

/* ---------- Rejoindre ---------- */
.section-join { background: radial-gradient(ellipse 70% 90% at 50% 112%, rgba(var(--accent-rgb),.1), transparent 64%), var(--bg-2); border-top: 1px solid var(--line-2); }
.section-join .section-title { margin-bottom: 12px; }
.section-join .section-sub { margin: 0 auto 34px; }
.join-hint { margin-top: 16px; color: var(--text-mute); font-size: .8rem; letter-spacing: .02em; }

/* ---------- Partenaire (bandeau discret) ---------- */
.partner { background: var(--bg-2); border-top: 1px solid var(--line-2); }
.partner-inner { max-width: 1120px; margin: 0 auto; padding: 44px 24px; display: flex; justify-content: center; }
.partner-link { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 26px; max-width: 720px; text-decoration: none; transition: transform .14s var(--e-out); }
.partner-link:active { transform: scale(.99); }
.partner-mark { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.tt-mono { width: 36px; height: 36px; }
.partner-word { font-weight: 700; font-size: 1.4rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.partner-word b { font-weight: 700; color: var(--text); }
.partner-sep { width: 1px; height: 32px; background: var(--line-2); flex-shrink: 0; }
.partner-copy { color: var(--text-dim); font-size: .9rem; line-height: 1.5; max-width: 350px; }
.partner-more { color: var(--red-hi); font-weight: 600; white-space: nowrap; transition: color .15s var(--e-out); }
@media (hover: hover) and (pointer: fine) { .partner-link:hover .partner-more { color: var(--red); } }
@media (max-width: 560px) { .partner-sep { display: none; } .partner-link { flex-direction: column; text-align: center; gap: 16px; } .partner-copy { max-width: none; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-2); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-mute); font-size: .76rem; letter-spacing: .02em; }

/* ---------- Modale ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.82); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in .22s var(--e-out);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--panel); border: 1.5px solid var(--line-3); border-radius: var(--r-lg);
  padding: 36px 32px; max-width: 440px; width: 100%; position: relative;
  box-shadow: 0 30px 90px rgba(0,0,0,.7); text-align: center;
  transform-origin: center; animation: modal-in .3s var(--e-out);
}
@keyframes modal-in { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--text-dim); font-size: 1rem; cursor: pointer; transition: color .15s var(--e-out), transform .14s var(--e-out); }
.modal-close:active { transform: scale(.9); }
.modal-close:hover { color: var(--text); }
.modal-title { font-weight: 700; font-size: 1.7rem; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 14px; }
.modal-text { color: var(--text-dim); font-size: .93rem; margin-bottom: 22px; }
.modal-text code { color: var(--red-hi); font-weight: 600; }
.modal-hint { color: var(--text-dim); font-size: .78rem; margin: 10px 0 20px; }
.modal-expiry { color: var(--text-dim); font-size: .78rem; margin-top: 16px; font-variant-numeric: tabular-nums; }

/* ---------- Formulaire de connexion (pseudo + mot de passe) ---------- */
.login-form { text-align: left; }
.field-label {
  display: block; margin-bottom: 6px;
  color: var(--text-dim); font-size: .74rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.field {
  width: 100%; margin-bottom: 16px; padding: 12px 14px;
  background: #0c0c0c; border: 1.5px solid var(--line-2); border-radius: var(--r);
  color: var(--text); font-family: var(--font); font-size: .95rem;
  transition: border-color .16s var(--e-out), background .16s var(--e-out);
}
.field::placeholder { color: var(--text-mute); }
.field:focus { outline: none; border-color: var(--red); background: #0f0f0f; }
/* Autofill Chrome : le fond blanc par defaut casse completement la DA sombre */
.field:-webkit-autofill,
.field:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0c0c0c inset;
  caret-color: var(--text);
}
.form-error {
  margin: -6px 0 14px; padding: 10px 12px;
  background: var(--red-weak); border-left: 2px solid var(--red);
  color: var(--red-hi); font-size: .84rem;
}
.login-form .modal-hint { text-align: center; margin-bottom: 4px; }
.login-form .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Separateur « ou » entre mot de passe et validation par code en jeu */
.login-sep {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--text-mute);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
}
.login-sep::before, .login-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line-2);
}

.code-box {
  width: 100%; background: #0c0c0c; border: 1.5px dashed var(--red);
  border-radius: var(--r); color: var(--red-hi);
  font-weight: 600; font-size: 1.02rem; letter-spacing: .02em;
  padding: 16px 12px; cursor: pointer; word-break: break-all;
  transition: background .15s var(--e-out), transform .14s var(--e-out);
}
.code-box:active { transform: scale(.99); }
.code-box:hover { background: #131313; }

.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-dim); font-size: .88rem; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.welcome { margin-bottom: 22px; }
.welcome img { border-radius: var(--r); }
.welcome-name { font-weight: 700; font-size: 1.5rem; letter-spacing: -.01em; text-transform: uppercase; margin-top: 12px; }

/* ---------- Voice Chat ---------- */
.voice-page { padding: 148px 0 90px; min-height: 70vh; }
.center-sub { margin-left: auto; margin-right: auto; }
.voice-warn { background: var(--red-weak); border: 1px solid rgba(var(--accent-rgb),.4); color: var(--red-hi); border-radius: var(--r); padding: 14px 18px; font-size: .9rem; margin: 0 auto 26px; max-width: 560px; }

.voice-card { background: var(--panel); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: 34px 30px; max-width: 560px; margin: 0 auto; }
.voice-card-title { font-weight: 700; font-size: 1.6rem; letter-spacing: -.01em; text-transform: uppercase; margin-bottom: 14px; }
.voice-self { margin-bottom: 22px; }
.voice-status { color: var(--text-dim); font-size: .85rem; }

.voice-avatar-wrap { display: inline-flex; padding: 4px; border-radius: var(--r-lg); border: 3px solid var(--line-2); transition: border-color .18s var(--e-out), box-shadow .18s var(--e-out); }
.voice-avatar-wrap img { border-radius: var(--r); display: block; }
.voice-avatar-wrap.is-speaking { border-color: var(--green); box-shadow: 0 0 20px rgba(74,222,128,.55); }
.voice-avatar-wrap.is-muted { border-color: var(--danger); opacity: .7; }

.voice-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.voice-controls .btn { padding: 12px 22px; font-size: .9rem; }
.voice-offline { color: var(--red-hi); font-size: .85rem; margin-top: 10px; }

.voice-select-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 18px; }
.voice-select-label { color: var(--text-dim); font-size: .84rem; white-space: nowrap; }
.voice-select { flex: 1; max-width: 320px; background: #0c0c0c; color: var(--text); border: 1.5px solid var(--line-2); border-radius: var(--r); padding: 9px 12px; font-family: var(--font); font-size: .88rem; cursor: pointer; transition: border-color .15s var(--e-out); }
.voice-select:hover, .voice-select:focus { border-color: var(--red); outline: none; }

.voice-peers-title { font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; text-transform: uppercase; margin: 26px 0 14px; text-align: left; }
.voice-peers { display: flex; flex-direction: column; gap: 10px; }
.peer-card { display: flex; align-items: center; gap: 14px; background: #0c0c0c; border: 1.5px solid var(--line); border-radius: var(--r); padding: 10px 14px; text-align: left; transition: opacity .2s var(--e-out), border-color .2s var(--e-out); }
.peer-card.peer-far { opacity: .45; }
.peer-ring { padding: 2px; border-radius: var(--r); border: 2px solid var(--line-2); }
.peer-info { display: flex; flex-direction: column; flex: 1; }
.peer-name { font-weight: 600; font-size: .95rem; }
.peer-distance { color: var(--text-dim); font-size: .74rem; font-variant-numeric: tabular-nums; }
.peer-muted { font-size: 1.1rem; }
.voice-empty { color: var(--text-dim); font-size: .88rem; margin-top: 14px; }

/* ---------- Appel téléphonique ---------- */
.voice-call { display: flex; align-items: center; gap: 14px; background: #0c0c0c; border: 1.5px solid var(--green); border-radius: var(--r); padding: 12px 16px; margin-bottom: 20px; text-align: left; }
.voice-call img { border-radius: var(--r); }
.voice-call.is-ringing { animation: call-pulse 1.2s ease-in-out infinite; }
.call-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.call-title { font-weight: 600; font-size: .98rem; }
.call-sub { color: var(--text-dim); font-size: .78rem; }
.call-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.call-actions .btn { padding: 10px 16px; font-size: .84rem; }
.peer-card.peer-call { border-color: var(--green); }
@keyframes call-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,.35); } 50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); } }

/* ---------- Radios en cours d'ecoute (page vocal) ---------- */
.voice-radios { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; text-align: left; }
.radio-now-line {
  display: flex; align-items: center; gap: 10px;
  background: #0c0c0c; border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 9px 14px; font-size: .86rem;
}
.radio-now-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.radio-now-station { font-weight: 600; white-space: nowrap; }
.radio-now-title { color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-now-where { color: var(--text-mute); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
/* Arret de l'ecoute lancee depuis /radio (seule source que l'auditeur controle) */
.radio-now-stop {
  flex: none; width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1.5px solid var(--line); color: var(--text-mute);
  font-size: .74rem; line-height: 1; display: grid; place-items: center;
  transition: border-color .18s var(--e-out), color .18s var(--e-out), background .18s var(--e-out);
}
.radio-now-stop:hover { border-color: var(--accent); color: var(--accent); background: rgba(224,83,61,.1); }
.radio-now-stop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Rappel vocal actif (autres pages) ---------- */
#voice-reminder-overlay {
  position: fixed; right: 20px; bottom: 20px; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1.5px solid var(--green);
  border-radius: var(--r-lg); padding: 10px 12px 10px 16px;
  box-shadow: 0 14px 40px -14px rgba(0,0,0,.6);
  animation: rise .3s var(--e-out) both;
}
#voice-reminder-overlay .vro-icon { font-size: 1.1rem; }
#voice-reminder-overlay .vro-text { font-size: .86rem; font-weight: 600; color: var(--text); white-space: nowrap; }
#voice-reminder-overlay .vro-link {
  background: var(--green); color: #06210f; text-decoration: none;
  font-size: .8rem; font-weight: 700; padding: 7px 12px; border-radius: var(--r);
  transition: transform .14s var(--e-out);
}
#voice-reminder-overlay .vro-link:active { transform: scale(.96); }
#voice-reminder-overlay .vro-close {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: .82rem; padding: 4px; transition: color .15s var(--e-out);
}
#voice-reminder-overlay .vro-close:hover { color: var(--red-hi); }
@media (max-width: 560px) {
  #voice-reminder-overlay { left: 14px; right: 14px; bottom: 14px; }
  #voice-reminder-overlay .vro-text { display: none; }
}

/* ============================================================
   AMBIANCE DE THÈME — flocons, feuilles, pétales, braises
   Deux couches par particule : la chute (lineaire) et le balancement
   (ease-in-out alterne). Que du transform, aucune peinture par frame.
   Desactivable via la config (site.particules) et coupe en reduced-motion.
   ============================================================ */
#theme-fx {
  position: fixed; inset: 0; z-index: 40;
  pointer-events: none; overflow: hidden;
  /* Isole la couche : les particules ne declenchent jamais de recalcul du reste */
  contain: layout paint;
}
.fx { position: absolute; top: -10vh; animation: fx-fall linear infinite; }
.fx > i { display: block; animation: fx-sway ease-in-out infinite alternate; }
.fx-up { top: auto; bottom: -10vh; animation-name: fx-rise; }
.fx-across { top: 0; left: -14vw; animation-name: fx-cross; }
@keyframes fx-fall  { to { transform: translate3d(0, 122vh, 0); } }
@keyframes fx-rise  { to { transform: translate3d(0, -122vh, 0); } }
@keyframes fx-cross { to { transform: translate3d(128vw, 0, 0); } }
@keyframes fx-sway {
  from { transform: translateX(-16px) rotate(0deg); }
  to   { transform: translateX(16px) rotate(200deg); }
}

.fx-snow > i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; opacity: .62; box-shadow: 0 0 7px rgba(255,255,255,.45);
}
.fx-leaf > i {
  width: 10px; height: 12px; border-radius: 62% 6% 62% 6%;
  background: linear-gradient(140deg, #ffa257, #b34d16); opacity: .7;
}
.fx-petal > i {
  width: 9px; height: 9px; border-radius: 72% 6% 72% 6%;
  background: var(--accent-hi); opacity: .55;
}
.fx-mote > i {
  width: 4px; height: 4px; border-radius: 50%;
  background: #ffe6a3; opacity: .5; box-shadow: 0 0 8px rgba(255,224,150,.5);
}
.fx-ember > i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent-hi); opacity: .6; box-shadow: 0 0 9px rgba(var(--accent-rgb), .7);
}
/* Chauve-souris : silhouette en masque SVG, ailes qui battent en scaleY */
.fx-bat > i {
  background: #29203a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28'%3E%3Cpath d='M32 6c2-4 6-6 10-6 0 4 4 6 8 5 4-1 8-3 12-5-2 6-6 10-10 12-4 2-8 2-12 4-3 1.5-5 4-8 6-3-2-5-4.5-8-6-4-2-8-2-12-4C8 10 4 6 2 0c4 2 8 4 12 5 4 1 8-1 8-5 4 0 8 2 10 6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 28'%3E%3Cpath d='M32 6c2-4 6-6 10-6 0 4 4 6 8 5 4-1 8-3 12-5-2 6-6 10-10 12-4 2-8 2-12 4-3 1.5-5 4-8 6-3-2-5-4.5-8-6-4-2-8-2-12-4C8 10 4 6 2 0c4 2 8 4 12 5 4 1 8-1 8-5 4 0 8 2 10 6z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation-name: fx-flap; animation-duration: .42s !important;
}
@keyframes fx-flap { from { transform: scaleY(.5); } to { transform: scaleY(1); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero::after { animation: none; opacity: .86; }
  .hero-content > * { animation: none; }
  .spinner { animation: spin .8s linear infinite !important; }
  #theme-fx { display: none; }
  .nav-sheet a { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
/* Les libelles des raccourcis tombent : les icones suffisent */
@media (max-width: 1080px) {
  .nav-app-label { display: none; }
  .nav-app { padding: 7px 10px; }
  .nav-inner { gap: 18px; }
}

/* Sous 900 px : liens + raccourcis passent dans le panneau */
@media (max-width: 900px) {
  .nav-links, .nav-div, .nav-app { display: none; }
  .nav-burger { display: block; }
  .nav-sheet { display: flex; }
  .nav-inner { gap: 14px; }
  .nav-links { flex: 0; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 820px) {
  .section { padding: 68px 0; }
  .stat-sep { display: none; }
  .hero-stats { border-top: none; }
  .stat { padding: 14px 22px; }
}

@media (max-width: 560px) {
  .nav-inner { padding: 0 16px; }
  .online-word { display: none; }
  .online-badge { padding: 6px 9px; }
  .brand-name { font-size: 1.1rem; letter-spacing: .12em; }
  .nav-sheet { padding: 10px 16px 20px; }
}

/* Sous 400 px la place manque : on garde marque + burger */
@media (max-width: 400px) {
  .online-badge { display: none; }
  #btn-login { padding: 8px 12px; }
}
