/* =========================================================
   83 HOOVER — Feuille de style principale (V3 : DA noir / gris / rouge)
   Tailwind gère la mise en page ; ici : thème, effets, composants.
   ========================================================= */

:root {
  /* ---- Charte graphique officielle ---- */
  --bg-main: #0B0B0D;        /* Noir profond — arrière-plan, menu, footer */
  --bg-card: #1A1A1F;        /* Noir charbon — cartes et blocs */
  --text-secondary: #77777F; /* Gris acier — bordures, icônes, séparateurs */
  --text-main: #C6C6CC;      /* Gris clair — paragraphes, contenu lisible */
  --color-primary: #B51224;  /* Rouge Hoover — boutons, titres, accents */
  --color-hover: #E32636;    /* Rouge vif — survol, effets interactifs */

  /* ---- Dérivés (calculés à partir de la charte) ---- */
  --bg-alt: #111114;                      /* sections alternées */
  --bg-raised: #222228;                   /* champs, boutons secondaires */
  --line: #2A2A31;                        /* bordures discrètes */
  --white: #F2F2F5;                       /* titres */
  --primary-glow: rgba(181, 18, 36, .55);
  --hover-glow: rgba(227, 38, 54, .5);
  --steel-glow: rgba(119, 119, 127, .35);

  /* Courbes d'animation : sortie douce + petit rebond "satisfaisant" */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg-main); color: var(--text-main); overflow-x: hidden; }
body.is-locked { overflow: hidden; } /* bloque le scroll pendant l'intro */
section[id] { scroll-margin-top: 64px; } /* compense la barre de navigation */
::selection { background: var(--color-primary); color: #fff; }

/* Grain "pellicule" statique (aucune animation = aucun coût CPU) */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 90;
  opacity: 0.06;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   1. INTRO "HACKING" (terminal)
   ========================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem;
  padding: 1.25rem;
  background: radial-gradient(ellipse at center, #16070a 0%, #000 70%);
  cursor: pointer;
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), visibility .7s;
}
/* Lignes de balayage d'écran CRT (statiques) */
.preloader::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px 3px);
}
.preloader.is-hidden { opacity: 0; visibility: hidden; transform: scale(1.06); pointer-events: none; }

.terminal {
  position: relative; z-index: 1;
  width: min(640px, 100%);
  background: rgba(11, 11, 13, .94);
  border: 1px solid rgba(227, 38, 54, .4);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 40px rgba(227, 38, 54, .14), 0 30px 80px rgba(0,0,0,.8);
  overflow: hidden;
  font-family: "Share Tech Mono", ui-monospace, monospace;
}
.term-bar {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .9rem; background: #141417; border-bottom: 1px solid rgba(227,38,54,.2);
  color: var(--text-secondary); font-size: .8rem;
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--color-hover); }
.term-dots i:nth-child(2) { background: var(--text-secondary); }
.term-dots i:nth-child(3) { background: #3a3a42; }
.term-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.term-body {
  min-height: 14.5rem; padding: 1.1rem 1.1rem 1.4rem;
  color: var(--text-main); font-size: clamp(.9rem, 3.6vw, 1.1rem); line-height: 1.75;
  text-shadow: 0 0 6px rgba(227, 38, 54, .25);
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.muted { color: var(--text-secondary); text-shadow: none; }
.term-line .lbl { color: var(--color-hover); text-shadow: 0 0 8px var(--hover-glow); }
.term-line .val { color: var(--white); }
.term-line.ok .val { color: var(--color-hover); }
.term-cursor {
  display: inline-block; width: .6em; height: 1.1em; margin-left: 2px; vertical-align: text-bottom;
  background: var(--color-hover); box-shadow: 0 0 8px var(--color-hover);
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.term-enter {
  position: relative; z-index: 1;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: clamp(.95rem, 3.8vw, 1.25rem); letter-spacing: .12em; text-align: center;
  color: var(--white);
  padding: 1rem 1.5rem; border: 1px solid var(--color-hover); border-radius: 6px;
  background: rgba(181,18,36,.18);
  text-shadow: 0 0 10px var(--color-hover);
  box-shadow: 0 0 24px rgba(227,38,54,.3), inset 0 0 18px rgba(227,38,54,.12);
  animation: granted-in .5s var(--ease-spring) both, blink-soft 1.1s steps(1, end) .5s infinite;
  transition: transform .25s var(--ease-spring), background-color .25s;
}
.term-enter:hover { transform: scale(1.05); background: rgba(227,38,54,.3); }
.term-enter:active { transform: scale(.96); }
@keyframes granted-in { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes blink-soft { 50% { opacity: .35; } }

.term-hint {
  position: relative; z-index: 1;
  font-family: "Share Tech Mono", monospace; font-size: .75rem; letter-spacing: .25em; text-transform: uppercase;
  color: #4a4a52;
}

/* =========================================================
   BOUTONS — feedback hover/active "satisfaisant"
   ========================================================= */
.btn-hood, .btn-ghost, .btn-discord, .nav-pill {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  cursor: pointer; user-select: none;
  transition:
    transform .35s var(--ease-spring),
    box-shadow .35s var(--ease-out),
    background-color .3s var(--ease-out),
    border-color .3s var(--ease-out),
    color .3s var(--ease-out),
    opacity .3s;
}
.btn-hood, .btn-ghost { padding: 1rem 2rem; font-size: .9rem; border-radius: 8px; }

/* Reflet lumineux qui traverse le bouton au survol */
.btn-hood::before, .btn-ghost::before, .btn-discord::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn-hood:hover::before, .btn-ghost:hover::before, .btn-discord:hover::before { transform: translateX(120%); }

.btn-hood {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 20px -6px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-hood:hover {
  background-color: var(--color-hover);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 34px -8px var(--hover-glow), 0 0 0 3px rgba(227,38,54,.25), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-hood:active { transform: translateY(0) scale(.96); transition-duration: .1s; box-shadow: 0 4px 12px -6px var(--primary-glow); }
.btn-hood:disabled { opacity: .6; cursor: progress; transform: none; background-color: var(--color-primary); }

.btn-ghost { border: 2px solid var(--text-secondary); color: var(--white); background: rgba(119,119,127,.08); }
.btn-ghost:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: var(--color-hover);
  background: rgba(227,38,54,.12);
  box-shadow: 0 14px 34px -10px var(--hover-glow), 0 0 0 3px rgba(227,38,54,.18);
}
.btn-ghost:active { transform: scale(.96); transition-duration: .1s; }

/* Gros bouton Discord */
.btn-discord {
  width: 100%; justify-content: flex-start; gap: 1rem;
  padding: 1.25rem 1.5rem; border-radius: 14px;
  font-size: clamp(.95rem, 3.6vw, 1.15rem); color: #fff; text-transform: none; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--color-primary) 0%, #8E0F1D 100%);
  border: 1px solid rgba(227,38,54,.45);
  box-shadow: 0 12px 34px -10px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-discord small { font-size: .75rem; font-weight: 600; opacity: .75; letter-spacing: .04em; }
.btn-discord .discord-icon { width: 2.4rem; height: 2.4rem; flex-shrink: 0; fill: #fff; transition: transform .45s var(--ease-spring); }
.btn-discord .discord-arrow {
  width: 1.6rem; height: 1.6rem; margin-left: auto; flex-shrink: 0;
  fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .4s var(--ease-spring);
}
.btn-discord:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--color-hover);
  box-shadow: 0 22px 44px -12px var(--hover-glow), 0 0 0 3px rgba(227,38,54,.3);
}
.btn-discord:hover .discord-icon { transform: rotate(-10deg) scale(1.12); }
.btn-discord:hover .discord-arrow { transform: translateX(6px); }
.btn-discord:active { transform: scale(.97); transition-duration: .1s; }

/* Onde au clic (créée par js/app.js) */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  background: rgba(255,255,255,.35);
  transform: scale(0); animation: ripple .6s var(--ease-out) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.btn-hood:focus-visible, .btn-ghost:focus-visible, .btn-discord:focus-visible, .acc-btn:focus-visible,
.burger:focus-visible, .lore-arrow:focus-visible, .lore-tab:focus-visible,
.nav-pill:focus-visible, .term-enter:focus-visible {
  outline: 3px solid var(--white); outline-offset: 3px;
}

/* ---------------- Widget volume (bas à droite) ---------------- */
.sound-widget {
  --vol: 35%; /* rempli par js/app.js pour colorer la barre */
  position: fixed; right: 1rem; z-index: 110;
  bottom: 1rem;
  display: flex; align-items: center; gap: .35rem;
  padding: .4rem .55rem .4rem .4rem;
  background: rgba(11, 11, 13, .9);
  border: 1px solid rgba(181, 18, 36, .5); border-radius: 999px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.9), 0 0 18px -4px var(--primary-glow);
  backdrop-filter: blur(10px);
  transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.sound-widget:hover { border-color: var(--color-hover); box-shadow: 0 10px 30px -10px rgba(0,0,0,.9), 0 0 26px -2px var(--hover-glow); }
.sound-widget.is-muted { border-color: var(--line); box-shadow: 0 10px 30px -10px rgba(0,0,0,.9); }

.sw-btn {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 800; line-height: 1; color: var(--white);
  background: var(--bg-card); border: 1px solid var(--line);
  transition: transform .35s var(--ease-spring), background-color .25s, border-color .25s, color .25s, box-shadow .25s;
}
.sw-btn:hover { transform: scale(1.12); border-color: var(--color-hover); box-shadow: 0 0 14px var(--hover-glow); }
.sw-btn:active { transform: scale(.88); transition-duration: .1s; }
.sw-btn:disabled { opacity: .35; transform: none; box-shadow: none; cursor: default; }
.sw-btn:focus-visible, .sw-range:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.sw-mute { width: 40px; height: 40px; background: var(--color-primary); border-color: var(--color-primary); }
.sw-mute:hover { background: var(--color-hover); border-color: var(--color-hover); }
.sw-mute svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sw-mute .sw-speaker { fill: #fff; }
.sw-mute .sw-cross { display: none; }
.sw-wave { transition: opacity .25s; }
.sound-widget.is-muted .sw-mute { background: var(--bg-raised); border-color: var(--line); }
.sound-widget.is-muted .sw-mute svg { stroke: var(--text-secondary); }
.sound-widget.is-muted .sw-mute .sw-speaker { fill: var(--text-secondary); }
.sound-widget.is-muted .sw-wave { opacity: 0; }
.sound-widget.is-muted .sw-cross { display: inline; }
/* Ondes qui s'éteignent selon le volume */
.sound-widget.vol-low .sw-wave2 { opacity: 0; }

/* Barre de volume (slider) */
.sw-range {
  -webkit-appearance: none; appearance: none;
  width: 90px; height: 6px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, var(--color-primary), var(--color-hover)) 0 / var(--vol) 100% no-repeat, var(--line);
}
.sw-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--color-primary); box-shadow: 0 0 10px var(--primary-glow);
  transition: transform .3s var(--ease-spring);
}
.sw-range::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--color-primary); box-shadow: 0 0 10px var(--primary-glow);
}
.sw-range:hover::-webkit-slider-thumb, .sw-range:active::-webkit-slider-thumb { transform: scale(1.3); }
.sound-widget.is-muted .sw-range { background: var(--line); }

.sw-value { min-width: 2.6rem; text-align: right; font-size: .75rem; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; }

/* Petite bulle d'info au-dessus du widget (ex. fichier manquant) */
.sw-note {
  position: absolute; right: 0; bottom: calc(100% + .5rem);
  max-width: 240px; padding: .45rem .7rem; border-radius: 8px;
  font-size: .75rem; color: var(--white); background: var(--bg-card); border: 1px solid var(--line);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.sw-note.is-visible { opacity: 1; transform: none; }

/* Téléphone : widget compact (on garde haut-parleur, −, +) */
@media (max-width: 480px) {
  .sound-widget { right: .75rem; bottom: .75rem; }
  .sw-range { width: 64px; }
  .sw-value { display: none; }
}

/* =========================================================
   NAVIGATION + LOGO
   ========================================================= */
#navbar { transition: background-color .4s var(--ease-out), border-color .4s, backdrop-filter .4s; border-bottom: 1px solid transparent; }
#navbar.is-scrolled { background: rgba(11, 11, 13, .92); backdrop-filter: blur(10px); border-bottom-color: var(--line); }

.brand { display: flex; align-items: center; gap: .6rem; transition: transform .35s var(--ease-spring); }
.brand:hover { transform: scale(1.04); }
.brand-logo { height: 48px; width: auto; filter: drop-shadow(0 0 8px var(--primary-glow)); }

.nav-link { position: relative; color: var(--text-main); transition: color .3s var(--ease-out); }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--color-hover);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-pill {
  padding: .55rem 1.1rem; border-radius: 999px; font-size: .8rem;
  color: #fff; background: var(--color-primary);
  box-shadow: 0 4px 16px -4px var(--primary-glow);
}
.nav-pill:hover { background: var(--color-hover); transform: scale(1.07); box-shadow: 0 8px 24px -4px var(--hover-glow), 0 0 0 3px rgba(227,38,54,.22); }
.nav-pill:active { transform: scale(.95); }

.burger { width: 44px; height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px; border-radius: 8px; transition: background-color .3s; }
.burger:active { background: rgba(255,255,255,.08); }
.burger span { display: block; height: 3px; width: 100%; background: var(--white); border-radius: 2px; transition: transform .4s var(--ease-spring), opacity .25s, background-color .3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); background: var(--color-hover); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); background: var(--color-hover); }

.mobile-menu { background: rgba(11, 11, 13, .97); border-bottom: 2px solid var(--color-primary); animation: menu-in .35s var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mobile-link { display: block; padding: .9rem .5rem; border-bottom: 1px solid var(--line); color: var(--text-main); transition: color .2s, padding-left .3s var(--ease-out); }
.mobile-link:active, .mobile-link:hover { color: var(--color-hover); padding-left: 1rem; }

/* =========================================================
   HERO
   ========================================================= */
/* Image : images/hero.jpg. Le dégradé dessous sert de secours si l'image manque. */
.hero {
  background-color: var(--bg-main);
  background-image:
    url("../images/hero.jpg"),
    radial-gradient(ellipse at 20% 80%, rgba(181, 18, 36, .28), transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(119, 119, 127, .18), transparent 55%),
    linear-gradient(180deg, #141418 0%, var(--bg-main) 100%);
  background-size: cover, auto, auto, auto;
  background-position: center;
}
.hero-overlay {
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.65) 60%, var(--bg-main) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,.7) 100%);
}
/* Éclair WebGL : "screen" rend le noir transparent, seul l'éclair lumineux se voit */
.hero-lightning {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  mix-blend-mode: screen; pointer-events: none;
  opacity: 0; transition: opacity 1.2s var(--ease-out); /* apparaît en fondu */
}
.hero-lightning.is-on { opacity: 1; }

.hero-logo {
  width: auto; height: clamp(110px, 24vw, 190px); margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 22px var(--primary-glow)) drop-shadow(0 0 40px rgba(0,0,0,.6));
}
.hero-title {
  font-size: clamp(3.5rem, 15vw, 10rem);
  text-shadow: 0 0 30px rgba(181, 18, 36, .35), 5px 5px 0 rgba(119, 119, 127, .55);
}

/* Titre en particules : le canvas prend toute la zone, le texte normal sert de secours */
.particle-title {
  position: relative;
  width: min(56rem, calc(100vw - 2rem)); /* toute la largeur dispo (le bloc parent est centré et rétréci) */
  margin-inline: auto;
  height: clamp(120px, 21vw, 230px);
  display: grid; place-items: center;
}
.particle-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  /* Lueur appliquée au canvas entier (bien plus léger qu'une lueur par particule) */
  filter: drop-shadow(0 0 6px rgba(227, 38, 54, .55)) drop-shadow(0 0 18px rgba(181, 18, 36, .35));
}
/* Une fois les particules prêtes, le texte normal n'est plus visible (mais reste lu par les lecteurs d'écran) */
.particle-title.is-ready .particle-fallback {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.scroll-hint { color: var(--text-secondary); transition: transform .35s var(--ease-spring); }
.scroll-hint:hover { transform: translate(-50%, 4px); }
.scroll-dot {
  display: block; width: 4px; height: 8px; margin: 6px auto 0; border-radius: 2px; background: var(--color-hover);
  animation: scroll-dot 1.8s var(--ease-out) infinite;
}
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(4.5rem, 10vw, 8rem) 0; position: relative; }
.section-kicker { font-size: .75rem; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; color: var(--text-secondary); }
.section-title { font-family: "Permanent Marker", cursive; font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1.05; color: var(--white); margin-top: .5rem; }

/* =========================================================
   3. LORE — Background officiel (8 chapitres)
   ========================================================= */
.lore-heading .section-title { font-size: clamp(2.1rem, 6vw, 3.8rem); }
.lore-heading .lore-dash { color: var(--text-secondary); }
.lore-heading .lore-sub { color: var(--text-main); }
@media (max-width: 640px) {
  .lore-heading .lore-dash { display: none; }
  .lore-heading .lore-sub { display: block; font-size: .62em; margin-top: .2rem; }
}
.lore-heading .lore-place {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1rem;
  font-size: .8rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--text-secondary);
}
.lore-heading .lore-place::before { content: ""; width: 28px; height: 2px; background: var(--color-primary); }

.lore-book {
  display: grid; gap: 1.5rem; margin-top: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1024px) {
  .lore-book { grid-template-columns: 290px minmax(0, 1fr); gap: 2rem; align-items: start; }
}

/* ---- Sommaire des chapitres (colonne sur PC, bandeau défilant sur mobile) ---- */
.lore-tabs {
  display: flex; gap: .5rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: .25rem .1rem .5rem; margin: 0 -1rem; padding-inline: 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
}
.lore-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .lore-tabs {
    flex-direction: column; overflow: visible; margin: 0; padding: 0;
    position: sticky; top: 88px;
    -webkit-mask-image: none; mask-image: none;
  }
}
.lore-tab {
  position: relative; flex: 0 0 auto; scroll-snap-align: start;
  display: flex; align-items: center; gap: .75rem; text-align: left;
  padding: .7rem 1rem; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--text-secondary); font-weight: 700; font-size: .85rem;
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out), background-color .3s var(--ease-out), transform .35s var(--ease-spring);
}
.lore-tab .num { font-family: "Permanent Marker", cursive; font-size: 1.05rem; color: var(--text-secondary); transition: color .3s; }
.lore-tab .label { white-space: nowrap; }
@media (min-width: 1024px) {
  .lore-tab { width: 100%; padding: .8rem 1rem .8rem 1.1rem; }
  .lore-tab .label { white-space: normal; line-height: 1.3; }
  /* Barre rouge qui glisse à gauche de l'onglet actif */
  .lore-tab::before {
    content: ""; position: absolute; left: -1px; top: 18%; bottom: 18%; width: 3px; border-radius: 3px;
    background: var(--color-hover); transform: scaleY(0); transition: transform .4s var(--ease-spring);
  }
  .lore-tab:hover { transform: translateX(4px); }
}
.lore-tab:hover { color: var(--text-main); border-color: var(--text-secondary); }
.lore-tab:active { transform: scale(.97); }
.lore-tab[aria-selected="true"] {
  color: var(--white); border-color: rgba(181,18,36,.7);
  background: linear-gradient(90deg, rgba(181,18,36,.22), var(--bg-card) 75%);
  box-shadow: 0 10px 26px -16px var(--primary-glow);
}
.lore-tab[aria-selected="true"] .num { color: var(--color-hover); }
.lore-tab[aria-selected="true"]::before { transform: scaleY(1); }

/* ---- Scène : image + texte du chapitre ---- */
.lore-stage {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
  scroll-margin-top: 80px;
}
.lore-chapter[hidden] { display: none; }
.lore-chapter.is-entering { animation: chapter-in .6s var(--ease-out); }
.lore-chapter.is-entering.from-left { animation-name: chapter-in-left; }
@keyframes chapter-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes chapter-in-left { from { opacity: 0; transform: translateX(-28px); } }

/* Image avec zoom intérieur au survol (le cadre ne bouge pas, seule l'image grossit) */
.lore-media {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; max-height: 420px; width: 100%;
  background: #0f0f12; border-bottom: 1px solid var(--line);
}
.lore-media img, .lore-media .lore-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease-out), filter .6s var(--ease-out);
}
.lore-media img { z-index: 1; filter: saturate(.9) contrast(1.05); }
.lore-media:hover img, .lore-media:hover .lore-fallback { transform: scale(1.03); }
.lore-media:hover img { filter: saturate(1) contrast(1.08); }
/* Dégradé en bas de l'image pour fondre vers le texte */
.lore-media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(26,26,31,.85));
}
/* Visuel de secours si l'image n'est pas encore là */
.lore-fallback {
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px),
    radial-gradient(circle at 25% 30%, rgba(181,18,36,.4), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(119,119,127,.22), transparent 60%),
    #121215;
}
.lore-fallback span {
  font-family: "Permanent Marker", cursive; font-size: clamp(5rem, 18vw, 9rem); line-height: 1;
  color: rgba(242,242,245,.92); text-shadow: 5px 5px 0 var(--color-primary), 0 0 40px var(--primary-glow);
}
.lore-tag {
  position: absolute; left: 1rem; top: 1rem; z-index: 3;
  padding: .35rem .7rem; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: rgba(181,18,36,.85); backdrop-filter: blur(4px);
}

.lore-body { padding: clamp(1.25rem, 4vw, 2.25rem); }
.lore-title { font-family: "Permanent Marker", cursive; font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.1; color: var(--white); }
.lore-title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: .8rem; background: var(--color-primary); border-radius: 3px; }
.lore-body p { margin-top: 1rem; color: var(--text-main); font-size: clamp(.98rem, 2.2vw, 1.06rem); line-height: 1.85; }
.lore-body p:first-of-type { margin-top: 1.25rem; }

/* Liste des principes (chapitre 8) */
.lore-principles { display: grid; gap: .75rem; margin-top: 1.25rem; }
@media (min-width: 640px) { .lore-principles { grid-template-columns: 1fr 1fr; } }
.lore-principles li {
  padding: .9rem 1rem; border-radius: 12px;
  background: var(--bg-main); border: 1px solid var(--line); border-left: 3px solid var(--color-primary);
  color: var(--text-main); line-height: 1.6; font-size: .95rem;
  transition: border-color .3s var(--ease-out), transform .35s var(--ease-spring);
}
.lore-principles li:hover { border-color: var(--color-hover); transform: translateY(-2px); }
.lore-principles strong { display: block; color: var(--white); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; margin-bottom: .2rem; }

/* ---- Navigation bas de scène : précédent / compteur / suivant ---- */
.lore-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.25rem) 1.5rem; border-top: 1px solid var(--line);
}
.lore-arrow {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-raised); color: var(--white);
  font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  transition: transform .35s var(--ease-spring), border-color .3s, background-color .3s, box-shadow .3s, opacity .3s;
}
.lore-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.lore-arrow:hover:not(:disabled) { transform: scale(1.06); border-color: var(--color-hover); background: rgba(227,38,54,.14); box-shadow: 0 0 22px -4px var(--hover-glow); }
.lore-arrow:active:not(:disabled) { transform: scale(.94); transition-duration: .1s; }
.lore-arrow:disabled { opacity: .35; cursor: default; }
@media (max-width: 420px) { .lore-arrow .txt { display: none; } .lore-arrow { padding: .75rem; } }

.lore-counter { flex: 1; max-width: 260px; text-align: center; }
.lore-counter-text { font-family: "Share Tech Mono", monospace; font-size: .85rem; letter-spacing: .2em; color: var(--text-secondary); }
.lore-counter-text b { color: var(--white); font-weight: 400; }
.lore-progress { height: 3px; margin-top: .5rem; border-radius: 3px; background: var(--line); overflow: hidden; }
.lore-progress span {
  display: block; height: 100%; width: 100%; transform-origin: left;
  background: linear-gradient(90deg, var(--color-primary), var(--color-hover));
  transform: scaleX(.125); transition: transform .5s var(--ease-out); /* largeur réglée par js/app.js */
}

/* ---- Conclusion ---- */
.lore-conclusion {
  position: relative; overflow: hidden; margin-top: 2.5rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 18px; border: 1px solid rgba(181,18,36,.45);
  background:
    radial-gradient(circle at 0% 0%, rgba(181,18,36,.22), transparent 55%),
    linear-gradient(160deg, var(--bg-card), var(--bg-main));
}
.lore-conclusion::before {
  content: "“"; position: absolute; right: 1.5rem; top: -1.5rem;
  font-family: Georgia, serif; font-size: 10rem; line-height: 1; color: rgba(181,18,36,.18); pointer-events: none;
}
.lore-conclusion p { position: relative; color: var(--text-main); line-height: 1.85; font-size: clamp(1rem, 2.3vw, 1.1rem); max-width: 62rem; }
.lore-motto {
  position: relative; display: inline-block; margin-top: 1.5rem;
  font-family: "Permanent Marker", cursive; font-size: clamp(1.4rem, 4.5vw, 2.2rem); color: var(--white);
}
.lore-motto em { font-style: normal; color: var(--color-hover); text-shadow: 0 0 22px var(--hover-glow); }

/* =========================================================
   RÈGLEMENT — accordéon
   ========================================================= */
.acc-item { border: 1px solid var(--line); background: var(--bg-card); border-left: 4px solid var(--text-secondary); border-radius: 10px; overflow: hidden; transition: border-color .3s var(--ease-out), box-shadow .3s; }
.acc-item:hover { box-shadow: 0 10px 30px -18px var(--steel-glow); }
.acc-item.is-open { border-left-color: var(--color-primary); box-shadow: 0 12px 34px -18px var(--primary-glow); }
.acc-btn {
  position: relative; overflow: hidden;
  width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left;
  padding: 1.1rem 1.25rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  transition: background-color .3s var(--ease-out);
}
.acc-btn:hover { background: rgba(255,255,255,.03); }
.acc-btn:active { background: rgba(255,255,255,.06); }
.acc-num { font-family: "Permanent Marker", cursive; color: var(--color-primary); font-size: 1.4rem; min-width: 2.2rem; transition: transform .4s var(--ease-spring), color .3s; }
.acc-btn:hover .acc-num { transform: scale(1.15) rotate(-6deg); color: var(--color-hover); }
.acc-label { flex: 1; color: var(--white); font-size: clamp(.95rem, 3.6vw, 1.05rem); }
.acc-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; background: var(--color-hover); transition: transform .4s var(--ease-spring); }
.acc-icon::after { transform: rotate(90deg); }
.acc-item.is-open .acc-icon::after { transform: rotate(0deg); }
/* Animation de hauteur sans JS : grid 0fr → 1fr */
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }
.acc-inner ul { padding: 0 1.25rem 1.25rem 4.45rem; color: var(--text-main); line-height: 1.7; }
.acc-inner li { position: relative; margin-top: .35rem; }
.acc-inner li::before { content: "▸"; position: absolute; left: -1.1rem; color: var(--color-primary); }
@media (max-width: 480px) { .acc-inner ul { padding-left: 2.4rem; } }

/* =========================================================
   MEMBRES
   ========================================================= */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
/* Sous-titre « 🟢 Actifs dans le quartier » */
.hood-subtitle {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: .85rem; letter-spacing: .35em; text-transform: uppercase;
  color: #86efac; text-shadow: 0 0 10px rgba(34, 197, 94, .45);
}

/* Cartes centrées : une ligne incomplète reste au milieu, pas collée à gauche */
.members-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.members-grid > li { flex: 0 1 170px; }
@media (max-width: 420px) {
  .members-grid { gap: .75rem; }
  .members-grid > li { flex-basis: calc(50% - .375rem); }
}
.member-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center;
  padding: 1.35rem .85rem 1.15rem; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 14px;
  transition: transform .4s var(--ease-spring), border-color .3s, box-shadow .3s;
}
/* Liseré rouge en haut de la carte */
.member-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-hover));
  transform: scaleX(.25); transition: transform .5s var(--ease-out);
}
.member-card:hover { transform: translateY(-6px) scale(1.03); border-color: var(--color-primary); box-shadow: 0 14px 30px -14px var(--primary-glow), 0 0 22px -6px var(--primary-glow); }
.member-card:hover::before { transform: scaleX(1); }

/* Apparition en cascade (fill "backwards" pour ne pas bloquer l'effet de survol ensuite) */
.members-grid:not(.is-in) .member-card { opacity: 0; }
.members-grid.is-in .member-card { animation: member-in .6s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes member-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }

.member-avatar { position: relative; width: 68px; height: 68px; transition: transform .45s var(--ease-spring); }
.member-card:hover .member-avatar { transform: scale(1.08) rotate(-3deg); }
.member-avatar img, .member-avatar .avatar-fallback {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--text-secondary); box-shadow: 0 0 14px var(--steel-glow);
}
/* Pastille avec initiale : couleur calculée depuis le pseudo (--c) */
.avatar-fallback {
  --c: var(--color-primary);
  display: grid; place-items: center;
  background-color: var(--c); /* secours pour les vieux navigateurs */
  background-image: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 75%, #fff), color-mix(in srgb, var(--c) 45%, #000) 80%);
  border-color: var(--c) !important; box-shadow: 0 0 16px color-mix(in srgb, var(--c) 55%, transparent) !important;
  font-family: "Permanent Marker", cursive; font-size: 1.75rem; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.45);
}
.member-status { position: absolute; right: 0; bottom: 2px; width: 17px; height: 17px; border-radius: 50%; border: 3px solid var(--bg-card); background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.member-status.idle { background: #facc15; box-shadow: 0 0 8px #facc15; }
.member-status.dnd { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.member-status.offline { background: var(--text-secondary); box-shadow: none; }

/* Membres hors ligne : carte atténuée, avatar en noir et blanc (redevient net au survol) */
.member-card.is-offline { opacity: .45; filter: grayscale(.85); transition: transform .4s var(--ease-spring), border-color .3s, box-shadow .3s, opacity .3s, filter .3s; }
.member-card.is-offline:hover { opacity: .85; filter: none; }
/* Mises à jour suivantes (toutes les minutes) : pas d'animation d'entrée rejouée */
.members-grid.is-static .member-card { animation: none; }
.member-name {
  font-size: .9rem; font-weight: 800; color: var(--white); line-height: 1.25; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Grade sous le pseudo : rouge pour les gradés, gris pour les autres */
.member-role {
  font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-secondary); padding: .25rem .6rem; border-radius: 999px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.member-role.is-high { color: var(--color-hover); border-color: rgba(181,18,36,.55); background: rgba(181,18,36,.1); }

/* =========================================================
   TÉLÉCHARGEMENT — FiveM Cleaner
   ========================================================= */
.download-card {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2rem, 6vw, 3.25rem) clamp(1.25rem, 5vw, 3rem);
  background:
    radial-gradient(circle at 50% -20%, rgba(181,18,36,.25), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
  transition: border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.download-card:hover { border-color: rgba(181,18,36,.55); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 40px -16px var(--primary-glow); }
/* Liseré rouge en haut du bloc */
.download-card::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 40%; height: 3px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--color-hover), transparent);
}

.download-icon {
  width: 64px; height: 64px; margin: 0 auto 1.25rem; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--bg-main); border: 1px solid rgba(181,18,36,.5);
  box-shadow: 0 0 24px -6px var(--primary-glow);
  transition: transform .45s var(--ease-spring);
}
.download-card:hover .download-icon { transform: translateY(-4px) rotate(-4deg); }
.download-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--color-hover); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.download-title { font-family: "Permanent Marker", cursive; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; color: var(--white); margin-top: .5rem; }
.download-text { max-width: 34rem; margin: 1rem auto 0; color: var(--text-main); line-height: 1.7; }

.download-actions { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-top: 2rem; }

/* Badge de sécurité vert (seule touche de vert du bloc) */
.safe-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: #4ade80; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.45);
  box-shadow: 0 0 18px -6px rgba(34,197,94,.6);
}

/* Bouton + compteur côte à côte (l'un sous l'autre sur téléphone) */
.download-row { display: flex; align-items: stretch; justify-content: center; gap: .9rem; flex-wrap: wrap; }
.download-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 128px; padding: .55rem 1.1rem; border-radius: 8px;
  background: var(--bg-main); border: 1px solid var(--line);
}
.download-stat-num {
  font-family: "Permanent Marker", cursive; font-size: 1.7rem; line-height: 1; color: var(--white);
  font-variant-numeric: tabular-nums; display: inline-block;
}
.download-stat-num.is-bump { animation: count-bump .6s var(--ease-spring); color: var(--color-hover); }
@keyframes count-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.download-stat-label { margin-top: .3rem; font-size: .65rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary); }
@media (max-width: 480px) { .download-row { flex-direction: column; } .download-stat { flex-direction: row; gap: .6rem; } .download-stat-label { margin-top: 0; } }

.btn-download { padding: 1.15rem 2.2rem; font-size: 1rem; }
.btn-download svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease-spring); }
.btn-download:hover svg { transform: translateY(3px); }
@media (max-width: 480px) { .btn-download { width: 100%; letter-spacing: .08em; } }

.download-meta { margin-top: 1rem; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-secondary); }
.download-hash { margin-top: .6rem; font-size: .75rem; color: var(--text-secondary); }
.download-hash summary { cursor: pointer; display: inline-block; transition: color .2s; }
.download-hash summary:hover { color: var(--text-main); }
.download-hash code {
  display: block; margin: .6rem auto 0; max-width: 100%; padding: .6rem .8rem; border-radius: 8px;
  font-family: "Share Tech Mono", monospace; font-size: .72rem; color: var(--text-main);
  background: var(--bg-main); border: 1px solid var(--line); word-break: break-all; user-select: all;
}

/* =========================================================
   4. REJOINDRE — étapes + formulaire
   ========================================================= */
.step-label { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; font-size: .85rem; color: var(--text-main); }
.step-label span {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  font-family: "Permanent Marker", cursive; font-size: 1rem; color: #fff; background: var(--color-primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.hood-form {
  display: flex; flex-direction: column; gap: 1.1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
}

/* Champ à label flottant : le label glisse vers le haut au focus / quand c'est rempli */
.float-field { position: relative; }
.float-field input, .float-field textarea {
  width: 100%; padding: 1.55rem 1rem .6rem;
  background: var(--bg-main); color: var(--white);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 16px; /* 16px évite le zoom automatique sur iPhone */
  outline: none;
  transition: border-color .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .35s var(--ease-out);
}
.float-field textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.float-field input::placeholder, .float-field textarea::placeholder { color: transparent; transition: color .3s; }
.float-field input:focus::placeholder, .float-field textarea:focus::placeholder { color: #4f4f57; }
.float-field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.float-field input::-webkit-outer-spin-button, .float-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.float-field label {
  position: absolute; left: 1rem; top: 1.05rem;
  color: var(--text-secondary); font-weight: 600; font-size: 1rem;
  pointer-events: none; transform-origin: left top;
  transition: transform .4s var(--ease-spring), color .3s var(--ease-out), letter-spacing .3s;
}
.float-field input:focus + label, .float-field input:not(:placeholder-shown) + label,
.float-field textarea:focus + label, .float-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-.62rem) scale(.72);
  letter-spacing: .12em; text-transform: uppercase; font-weight: 800;
}
.float-field input:focus + label, .float-field textarea:focus + label { color: var(--color-hover); }

/* Barre lumineuse rouge qui s'allume depuis le centre */
.float-field .bar {
  position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-hover), var(--color-primary));
  box-shadow: 0 0 10px var(--hover-glow);
  transform: scaleX(0); transition: transform .5s var(--ease-out);
}
.float-field input:hover, .float-field textarea:hover { border-color: #3a3a42; }
.float-field input:focus, .float-field textarea:focus {
  background: #101013;
  border-color: rgba(227,38,54,.7);
  box-shadow: 0 0 0 4px rgba(227,38,54,.12), 0 10px 30px -14px var(--primary-glow);
}
.float-field input:focus ~ .bar, .float-field textarea:focus ~ .bar { transform: scaleX(1); }

/* Erreurs */
.field.has-error .float-field input, .field.has-error .float-field textarea { border-color: rgba(239,68,68,.75); animation: shake .4s var(--ease-out); }
.field.has-error .float-field label { color: #f87171; }
.field-error { min-height: 1.1em; margin-top: .4rem; font-size: .8rem; color: #f87171; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
/* Champ piège anti-bot, caché hors écran */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--bg-main); border-top: 1px solid var(--line); }
.footer-logo { height: 56px; width: auto; margin: 0 auto 1rem; opacity: .9; filter: drop-shadow(0 0 10px var(--primary-glow)); transition: transform .4s var(--ease-spring), opacity .3s; }
.footer-logo:hover { transform: scale(1.06) rotate(-2deg); opacity: 1; }

/* =========================================================
   TOASTS
   ========================================================= */
.toast-zone { position: fixed; right: 1rem; bottom: 4.75rem; /* au-dessus du widget volume */ z-index: 120; display: flex; flex-direction: column; gap: .75rem; max-width: min(380px, calc(100vw - 2rem)); }
@media (max-width: 640px) { .toast-zone { left: 1rem; right: 1rem; bottom: 4.5rem; max-width: none; } }
.toast {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: 1rem 1.1rem; background: var(--bg-card); color: var(--white); border-radius: 12px;
  border: 1px solid var(--line); border-left: 5px solid var(--color-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 22px var(--primary-glow);
  animation: toast-in .5s var(--ease-spring) both;
}
.toast.is-error { border-left-color: #ef4444; box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 22px rgba(239,68,68,.4); }
.toast.is-leaving { animation: toast-out .35s var(--ease-out) both; }
.toast-title { font-family: "Permanent Marker", cursive; font-size: 1.15rem; line-height: 1.2; }
.toast-msg { font-size: .85rem; color: var(--text-main); margin-top: .15rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

/* =========================================================
   POPUP COOKIES (fenêtre centrale)
   ========================================================= */
/* Overlay plein écran sombre et opaque : isole le popup sans flou
   (backdrop-filter coûtait trop cher au processeur / à la carte graphique) */
.cookie-overlay {
  position: fixed; inset: 0; z-index: 130; /* au-dessus du widget de volume et des notifications */
  display: grid; place-items: center; padding: 1.25rem;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity .45s var(--ease-out);
}
.cookie-overlay[hidden] { display: none; }
.cookie-overlay.is-visible { opacity: 1; }
.cookie-overlay.is-leaving { opacity: 0; pointer-events: none; } /* fondu de sortie */

/* La boîte */
.cookie-box {
  width: min(420px, 100%);
  padding: 2rem clamp(1.25rem, 5vw, 2rem) 1.75rem;
  text-align: center;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.85), 0 0 0 1px rgba(181,18,36,.15), 0 0 40px -18px var(--primary-glow);
  transform: translateY(16px) scale(.96);
  transition: transform .5s var(--ease-spring);
}
.cookie-overlay.is-visible .cookie-box { transform: none; }
.cookie-overlay.is-leaving .cookie-box { transform: translateY(10px) scale(.97); }

/* Image qui flotte doucement de haut en bas.
   Uniquement transform: translateY dans les keyframes (aucun top / margin) :
   le navigateur déplace l'image sur la carte graphique sans recalculer la mise en page. */
.cookie-img-wrap { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.cookie-img {
  width: auto; height: 110px; max-width: 70%; object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.55)) drop-shadow(0 0 22px var(--primary-glow));
  animation: cookie-float 3.2s ease-in-out infinite;
  will-change: transform; /* image sur son propre calque : l'ombre n'est pas redessinée à chaque image */
}
.cookie-emoji { height: auto; font-size: 4.5rem; line-height: 1; }
@keyframes cookie-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.cookie-title {
  font-size: clamp(1.05rem, 4vw, 1.25rem); font-weight: 800; line-height: 1.4;
  color: var(--text-main);
}

/* Boutons arrondis côte à côte */
.cookie-actions { display: flex; gap: .75rem; margin-top: 1.5rem; }
.cookie-btn {
  position: relative; overflow: hidden; flex: 1;
  padding: .85rem 1rem; border-radius: 999px;
  font-size: .85rem; font-weight: 800; letter-spacing: .02em;
  transition: transform .35s var(--ease-spring), background-color .3s var(--ease-out), border-color .3s var(--ease-out), color .3s, box-shadow .3s;
}
.cookie-btn:active { transform: scale(.95); transition-duration: .1s; }
.cookie-btn:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* « J'accepte de manger » : rouge Hoover → rouge vif au survol */
.cookie-accept { background: var(--color-primary); color: #fff; border: 1px solid var(--color-primary); box-shadow: 0 8px 20px -10px var(--primary-glow); }
.cookie-accept:hover { background: var(--color-hover); border-color: var(--color-hover); transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 26px -10px var(--hover-glow); }

/* « Je refuse de manger » : noir charbon, bordure gris acier */
.cookie-refuse { background: #141418; color: var(--text-main); border: 1px solid var(--text-secondary); }
.cookie-refuse:hover { border-color: var(--text-main); color: var(--white); background: #1f1f25; transform: translateY(-2px); }

/* Très petits écrans : boutons l'un sous l'autre pour rester lisibles */
@media (max-width: 360px) { .cookie-actions { flex-direction: column; } }

/* =========================================================
   ACCESSIBILITÉ : mouvement réduit
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
