/* =========================================================
   GREEN SERIES — STYLE DU SITE
   Mise en page : un « vaisseau » de nuit à South — HUD en haut,
   onglets en bas sur téléphone (en haut sur PC), néon vert sur
   asphalte sombre, bandana en filigrane. Un seul thème : la nuit.
   ========================================================= */

/* ---------- Polices de la collection (fichiers dans polices/) ---------- */
@font-face { font-family: 'GS Titre'; src: url('../polices/titre_album.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'GS Script'; src: url('../polices/nom_Satisfy.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'GS Hud'; src: url('../polices/bebas_BebasNeue.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'GS Varsity'; src: url('../polices/varsity_Graduate.ttf') format('truetype'); font-display: swap; }

:root {
  color-scheme: dark;
  /* Couleurs */
  --nuit: #050b08;
  --asphalte: #0b1510;
  --surface: #101e16;
  --surface-2: #16291e;
  --ligne: #22402e;
  --texte: #e3f1e7;
  --doux: #8fa99a;
  --neon: #3cff6e;
  --neon-fonce: #13863a;
  --danger: #ff5468;
  --or: #ffcd46;
  /* Raretés */
  --r-N: #b9c0c4;
  --r-R: #3cff6e;
  --r-SR: #46a5ff;
  --r-SSR: #be6eff;
  --r-UR: #ffcd46;
  --r-LR: #ff5fd2;
  --arc: linear-gradient(100deg, #ff4d4d, #ffb23c, #fff04a, #3cff6e, #46a5ff, #be6eff, #ff4dd2);
  /* Polices */
  --f-titre: 'GS Titre', 'GS Hud', Impact, sans-serif;
  --f-script: 'GS Script', 'Brush Script MT', cursive;
  --f-hud: 'GS Hud', 'Barlow Semi Condensed', Impact, sans-serif;
  --f-varsity: 'GS Varsity', 'GS Hud', Georgia, serif;
  --f-texte: 'Barlow Semi Condensed', 'Arial Narrow', system-ui, sans-serif;
  /* Mesures */
  --rayon: 14px;
  --hud-h: 58px;
  --onglets-h: 64px;
  --gouttiere-g: max(16px, env(safe-area-inset-left, 0px));
  --gouttiere-d: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font-family: var(--f-texte);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
/* Bandana en filigrane + lueurs de rue */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 50% at 10% 110%, rgba(60, 255, 110, .16), transparent 70%),
    radial-gradient(60% 40% at 100% -10%, rgba(190, 110, 255, .10), transparent 70%),
    radial-gradient(130% 90% at 50% 10%, transparent 50%, rgba(0, 0, 0, .55) 100%),
    linear-gradient(rgba(3, 9, 6, .34), rgba(3, 9, 6, .52)),
    url('../effets/bandana.webp') 0 0 / 300px 300px repeat;
  pointer-events: none;
}
/* Logo Green Room en filigrane, au milieu du fond */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../effets/logo_green_room.webp') center 58% / min(78vmin, 620px) auto no-repeat;
  opacity: .16;
  pointer-events: none;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--neon); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 400; }
p { margin: 0; }

/* ---------- Couleur par rareté (data-r="SSR"…) ---------- */
[data-r="N"] { --c: var(--r-N); }
[data-r="R"] { --c: var(--r-R); }
[data-r="SR"] { --c: var(--r-SR); }
[data-r="SSR"] { --c: var(--r-SSR); }
[data-r="UR"] { --c: var(--r-UR); }
[data-r="LR"] { --c: var(--r-LR); }

.puce-r {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.6em; padding: 1px 7px 0;
  font-family: var(--f-varsity); font-size: 12px; letter-spacing: .04em;
  color: var(--nuit); background: var(--c); border-radius: 5px;
  line-height: 1.5;
}
.puce-r[data-r="LR"] { background: var(--arc); }
.texte-r { color: var(--c); }
.texte-r[data-r="LR"] { background: var(--arc); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =========================================================
   HUD (barre du haut)
   ========================================================= */
.hud {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex; align-items: center; gap: 12px;
  min-height: var(--hud-h);
  padding-block: 6px;
  padding-left: var(--gouttiere-g);
  padding-right: var(--gouttiere-d);
  background: rgba(5, 11, 8, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ligne);
}
.logo {
  display: flex; flex-direction: column; align-items: flex-start;
  text-decoration: none; color: inherit; line-height: 1; flex-shrink: 0;
}
.logo-script {
  font-family: var(--f-script); font-size: 27px; color: var(--neon);
  text-shadow: 0 0 1px #fff, 0 0 10px rgba(60, 255, 110, .55);
  transform: rotate(-4deg); transform-origin: left center;
  padding-right: 4px;
}
.logo-tag {
  margin-top: 1px; margin-left: 18px;
  font-family: var(--f-varsity); font-size: 8.5px; letter-spacing: .16em;
  color: var(--texte); padding: 2px 6px 1px; border: 1px solid var(--neon); border-radius: 3px;
  background: var(--nuit);
}
.hud-compteurs { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.compteur {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px 0 8px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 999px;
  font-family: var(--f-hud); font-size: 22px; letter-spacing: .03em; line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s, transform .15s;
}
.compteur svg { width: 22px; height: 22px; flex-shrink: 0; }
.compteur small { font-family: var(--f-texte); font-size: 12px; color: var(--doux); letter-spacing: 0; }
.compteur:hover { border-color: var(--neon-fonce); }
.compteur.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.14); border-color: var(--neon); } }
.bouton-son {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 50%;
}
.bouton-son svg { width: 20px; height: 20px; }

/* =========================================================
   ONGLETS (en bas sur téléphone, dans le HUD sur PC)
   ========================================================= */
.onglets {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: rgba(5, 11, 8, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--ligne);
}
.onglet {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: var(--onglets-h);
  background: none; border: 0;
  color: var(--doux); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.onglet svg { width: 26px; height: 26px; transition: transform .2s; }
.onglet[aria-current="page"] { color: var(--neon); }
.onglet[aria-current="page"] svg { transform: translateY(-2px); filter: drop-shadow(0 0 6px rgba(60, 255, 110, .7)); }
.onglet[aria-current="page"]::before {
  content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px;
  background: var(--neon); border-radius: 0 0 3px 3px; box-shadow: 0 0 10px var(--neon);
}
.pastille {
  position: absolute; top: 9px; left: calc(50% + 8px);
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  font-family: var(--f-hud); font-size: 14px; line-height: 1;
  color: var(--nuit); background: var(--neon); border-radius: 9px;
  box-shadow: 0 0 10px rgba(60, 255, 110, .8);
}
.pastille[hidden] { display: none !important; }

/* =========================================================
   ÉCRANS
   ========================================================= */
.ecrans {
  max-width: 1120px; margin: 0 auto;
  padding-block: 18px calc(var(--onglets-h) + 28px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--gouttiere-g);
  padding-right: var(--gouttiere-d);
}
.ecran { display: flex; flex-direction: column; gap: 22px; animation: entree .35s ease both; }
@keyframes entree { from { opacity: .4; transform: translateY(8px); } }

.titre-ecran {
  font-family: var(--f-titre); font-size: clamp(34px, 7vw, 52px); line-height: 1;
  color: var(--neon); text-shadow: 0 0 18px rgba(60, 255, 110, .35);
}
.sous-titre { color: var(--doux); font-size: 16px; text-shadow: 0 1px 3px #000, 0 0 10px #000; }
.entete-ecran { display: flex; flex-direction: column; gap: 6px; }
.etiquette-section {
  font-family: var(--f-hud); font-size: 20px; letter-spacing: .08em; color: var(--doux);
}

.panneau {
  background: linear-gradient(180deg, var(--surface), var(--asphalte));
  border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 18px;
}

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font-family: var(--f-hud); font-size: 21px; letter-spacing: .06em; line-height: 1;
  background: var(--surface-2); color: var(--texte);
  border: 1px solid var(--ligne); border-radius: 10px;
  transition: transform .1s, background .2s, border-color .2s, box-shadow .2s;
}
.bouton:hover:not(:disabled) { border-color: var(--neon-fonce); }
.bouton:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.bouton:disabled { opacity: .45; }
.bouton svg { width: 20px; height: 20px; }
.bouton-neon {
  background: var(--neon); color: #03140a; border-color: var(--neon);
  box-shadow: 0 0 0 1px rgba(60, 255, 110, .3), 0 6px 24px rgba(60, 255, 110, .28);
}
.bouton-neon:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(60, 255, 110, .5), 0 6px 34px rgba(60, 255, 110, .45); }
.bouton-neon:disabled { background: var(--surface-2); color: var(--doux); border-color: var(--ligne); box-shadow: none; opacity: 1; }
.bouton-or { background: var(--or); color: #241800; border-color: var(--or); box-shadow: 0 6px 24px rgba(255, 205, 70, .25); }
.bouton-danger { border-color: rgba(255, 84, 104, .5); color: var(--danger); }
.bouton-petit { min-height: 36px; font-size: 18px; padding: 0 12px; }
.lien-bouton { background: none; border: 0; color: var(--neon); text-decoration: underline; padding: 0; font-weight: 600; }

/* =========================================================
   L'ALIEN ET SA BULLE
   ========================================================= */
.alien { display: block; overflow: visible; }
.alien .antenne { animation: antenne 3.2s ease-in-out infinite; }
.alien .antenne-g { transform-origin: 46px 30px; }
.alien .antenne-d { transform-origin: 74px 30px; }
.alien .antenne-d { animation-delay: -1.6s; }
.alien .bout { animation: bout 1.6s ease-in-out infinite; }
.alien.excite .antenne { animation-duration: .35s; }
.alien .yeux { transform-origin: 60px 64px; animation: cligne 5s infinite; }
@keyframes antenne { 50% { transform: rotate(5deg); } }
@keyframes bout { 50% { fill: #f6ff9e; filter: drop-shadow(0 0 6px #d6ff4a); } }
@keyframes cligne { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

.bulle {
  position: relative;
  background: rgba(0, 0, 0, .66); color: #f2fff5;
  border: 1px solid rgba(60, 255, 110, .28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-radius: 16px; padding: 12px 14px;
  font-size: 16px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  min-width: 0;
}
.bulle::before {
  content: ''; position: absolute; left: -9px; bottom: 18px;
  border-width: 9px 12px 9px 0; border-style: solid; border-color: transparent rgba(0, 0, 0, .66) transparent transparent;
}
.bulle .nom-alien { display: block; font-family: var(--f-hud); font-size: 15px; letter-spacing: .08em; color: var(--neon); font-weight: 400; }
.bulle.parle { animation: parle .3s ease; }
@keyframes parle { from { transform: scale(.94); opacity: .4; } }

/* =========================================================
   ÉCRAN « VAISSEAU » (accueil)
   ========================================================= */
.pont { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .pont { grid-template-columns: 1.15fr 1fr; } }

.pont-scene {
  position: relative; overflow: hidden;
  min-height: 260px;
  border-radius: var(--rayon); border: 1px solid var(--ligne);
  background:
    radial-gradient(60% 55% at 50% 30%, rgba(60, 255, 110, .16), transparent 70%),
    linear-gradient(180deg, #07130d 0%, #0a1c13 55%, #04100a 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
}
.pont-scene::before {
  content: ''; position: absolute; left: 12px; right: 12px; top: 12px; bottom: 34%;
  background: url('../effets/logo_green_room.webp') center / contain no-repeat;
  opacity: .5; filter: drop-shadow(0 0 24px rgba(60, 255, 110, .25));
  pointer-events: none;
}
@media (max-width: 859px) { .pont-scene { min-height: 330px; } .pont-scene::before { bottom: 38%; } }
.pont-scene .etoiles {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #cfe 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 8%, #cfe 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 72% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 30%, #cfe 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 26%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 22% 40%, #cfe 50%, transparent 51%);
  opacity: .7;
}
.pont-scene .ville {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background:
    linear-gradient(180deg, transparent, rgba(4, 16, 10, .9)),
    repeating-linear-gradient(90deg, #06120c 0 26px, #081a10 26px 30px, #050f09 30px 58px, #07150e 58px 70px);
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 40%);
  mask: linear-gradient(180deg, transparent 0, #000 40%);
  clip-path: polygon(0 40%, 6% 40%, 6% 22%, 13% 22%, 13% 48%, 20% 48%, 20% 10%, 26% 10%, 26% 36%, 34% 36%, 34% 28%, 41% 28%, 41% 50%, 50% 50%, 50% 18%, 55% 18%, 55% 34%, 63% 34%, 63% 6%, 70% 6%, 70% 40%, 78% 40%, 78% 24%, 86% 24%, 86% 46%, 93% 46%, 93% 30%, 100% 30%, 100% 100%, 0 100%);
}
.ovni-pont {
  position: absolute; left: 50%; top: 14px; width: 190px; margin-left: -95px;
  animation: plane 4s ease-in-out infinite;
}
@keyframes plane { 50% { transform: translateY(8px) rotate(-1.5deg); } }
.rayon {
  position: absolute; left: 50%; top: 64px; width: 220px; margin-left: -110px; height: 70%;
  background: linear-gradient(180deg, rgba(60, 255, 110, .28), rgba(60, 255, 110, 0));
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  opacity: .55; animation: rayon 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rayon { 50% { opacity: .85; } }
.pont-alien { position: relative; display: flex; align-items: flex-end; gap: 12px; margin-top: 110px; }
.pont-alien .alien { width: 96px; flex-shrink: 0; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6)); }
.pont-alien .bulle { flex: 1; }

.panneau-tirage { display: flex; flex-direction: column; gap: 14px; }
.reserve { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.reserve-nombre {
  font-family: var(--f-hud); font-size: 76px; line-height: .8; color: var(--neon);
  text-shadow: 0 0 22px rgba(60, 255, 110, .45);
  font-variant-numeric: tabular-nums;
}
.reserve-texte { display: flex; flex-direction: column; gap: 2px; }
.reserve-texte b { font-family: var(--f-hud); font-size: 26px; letter-spacing: .05em; font-weight: 400; line-height: 1; }
.reserve-texte small { color: var(--doux); font-size: 15px; }
.jauge-recharge { height: 6px; background: var(--nuit); border-radius: 3px; overflow: hidden; border: 1px solid var(--ligne); }
.jauge-recharge i { display: block; height: 100%; width: 0; background: var(--neon); box-shadow: 0 0 10px var(--neon); transition: width .8s linear; }

.choix-nombre { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.choix-nombre button {
  height: 44px;
  font-family: var(--f-hud); font-size: 24px; line-height: 1;
  background: var(--nuit); border: 1px solid var(--ligne); border-radius: 9px; color: var(--doux);
}
.choix-nombre button[aria-pressed="true"] { color: var(--neon); border-color: var(--neon); box-shadow: inset 0 0 12px rgba(60, 255, 110, .25); }
.choix-nombre button:disabled { opacity: .3; }
.choix-legende { font-size: 14px; color: var(--doux); }

.bouton-tirer {
  position: relative; overflow: hidden;
  min-height: 68px; font-size: 34px; letter-spacing: .08em; border-radius: 14px;
}
.bouton-tirer:not(:disabled)::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: balaye 3s ease-in-out infinite;
}
@keyframes balaye { 60%, 100% { left: 130%; } }
.bouton-tirer small { font-family: var(--f-texte); font-size: 15px; letter-spacing: 0; font-weight: 600; }

.garantie { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--doux); }
.garantie b { color: var(--texte); }
.garantie-barre { height: 8px; border-radius: 4px; background: var(--nuit); border: 1px solid var(--ligne); overflow: hidden; }
.garantie-barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--r-UR), var(--r-LR)); }

.bandeau-weekend {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 205, 70, .16), rgba(190, 110, 255, .14));
  border: 1px solid rgba(255, 205, 70, .4);
  font-weight: 600; font-size: 15px;
}
.info-weekend { font-size: 14px; color: var(--doux); }

.raccourcis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .raccourcis { grid-template-columns: 1fr; } }
.raccourci {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px; min-height: 84px;
  background: linear-gradient(180deg, var(--surface), var(--asphalte));
  border: 1px solid var(--ligne); border-radius: var(--rayon);
  transition: border-color .2s, transform .15s;
}
.raccourci:hover { border-color: var(--neon-fonce); transform: translateY(-2px); }
.raccourci svg { width: 40px; height: 40px; flex-shrink: 0; color: var(--neon); }
.raccourci b { display: block; font-family: var(--f-hud); font-size: 24px; letter-spacing: .05em; font-weight: 400; line-height: 1.1; }
.raccourci span { display: block; color: var(--doux); font-size: 14px; }
.raccourci.a-prendre { border-color: var(--neon); box-shadow: 0 0 22px rgba(60, 255, 110, .2); }
.raccourci.a-prendre svg { animation: sautille 1.2s ease-in-out infinite; }
@keyframes sautille { 50% { transform: translateY(-4px) rotate(-6deg); } }

.dernieres { display: flex; flex-direction: column; gap: 10px; }
.bande-cartes { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.mini {
  flex: 0 0 auto; width: 92px; padding: 0; border: 0; background: none;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.mini img { width: 92px; aspect-ratio: 2 / 3; height: auto; border-radius: 6px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 4px 14px rgba(0, 0, 0, .5); }
.mini span { font-size: 12px; color: var(--doux); max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vide-texte { color: var(--doux); font-size: 15px; }

/* =========================================================
   CARTE 3D (tirages)
   ========================================================= */
.c3d {
  position: relative;
  width: var(--l, 240px); aspect-ratio: 2 / 3;
  perspective: 1400px;
  flex-shrink: 0;
}
.c3d-halo {
  position: absolute; inset: -7%; border-radius: 10%;
  background: var(--c, var(--neon)); filter: blur(26px);
  opacity: 0; transition: opacity .5s;
  pointer-events: none;
}
.c3d[data-r="LR"] .c3d-halo { background: var(--arc); animation: arcenciel 2.5s linear infinite; }
@keyframes arcenciel { to { filter: blur(26px) hue-rotate(360deg); } }
.c3d.allumee .c3d-halo { opacity: .55; animation-name: pulse-halo; animation-duration: 1.4s; animation-iteration-count: infinite; animation-timing-function: ease-in-out; }
.c3d.allumee[data-r="LR"] .c3d-halo { animation: arcenciel 2.5s linear infinite; opacity: .8; }
.c3d.retournee .c3d-halo { opacity: .45; }
.c3d.retournee[data-r="LR"] .c3d-halo, .c3d.retournee[data-r="UR"] .c3d-halo { opacity: .7; }
@keyframes pulse-halo { 50% { opacity: .85; } }

.c3d-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.2, .75, .2, 1);
}
.c3d.retournee .c3d-inner { transform: rotateY(180deg); }
.c3d-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.c3d-dos img {
  position: absolute; max-width: none;
  width: 128.125%; height: 118.75%; left: -14.0625%; top: -9.375%;
  pointer-events: none; user-select: none;
}
.c3d-dos .lueur { opacity: 0; transition: opacity .35s; }
.c3d.allumee .c3d-dos .lueur { opacity: 1; }
.c3d.vacille .c3d-dos .lueur { animation: vacille .12s steps(2) infinite; }
@keyframes vacille { 50% { opacity: .15; } }
.c3d-recto { transform: rotateY(180deg); border-radius: 3.6% / 2.4%; overflow: hidden; background: #000; }
.c3d-recto img { width: 100%; height: 100%; display: block; object-fit: cover; }
.c3d.cliquable { cursor: pointer; }
.c3d.cliquable:not(.retournee):hover .c3d-inner { transform: translateY(-6px) rotateZ(-1deg); }
.c3d.cliquable:not(.retournee) { animation: invite 1.6s ease-in-out infinite; }
@keyframes invite { 50% { transform: scale(1.025); } }

.c3d-etiquette {
  position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%) scale(.6);
  white-space: nowrap; opacity: 0;
  font-family: var(--f-hud); font-size: clamp(14px, calc(var(--l, 240px) * .1), 26px); letter-spacing: .06em; line-height: 1;
  padding: 5px 10px 3px; border-radius: 6px;
  transition: opacity .3s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.c3d-etiquette.nouvelle { background: var(--neon); color: #03140a; box-shadow: 0 0 18px rgba(60, 255, 110, .6); }
.c3d-etiquette.doublon { background: var(--surface-2); color: var(--texte); border: 1px solid var(--ligne); }
.c3d.retournee .c3d-etiquette { opacity: 1; transform: translate(-50%, -100%) scale(1); transition-delay: .45s; }

/* =========================================================
   SCÈNE DE TIRAGE (plein écran)
   ========================================================= */
.scene {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(60, 255, 110, .18), transparent 70%),
    radial-gradient(100% 80% at 50% 100%, #08170f, #020604 70%);
  overflow: hidden;
  touch-action: manipulation;
}
.scene[hidden] { display: none !important; }
.scene-particules { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.scene-haut { position: relative; z-index: 3; height: 78px; flex-shrink: 0; }
.scene-ovni { position: absolute; left: 50%; top: 6px; width: 150px; margin-left: -75px; transition: transform .5s; }
.scene-rayon {
  position: absolute; left: 50%; top: 52px; width: 70vw; max-width: 760px; transform: translateX(-50%);
  height: calc(100vh - 140px);
  background: linear-gradient(180deg, rgba(60, 255, 110, .30), rgba(60, 255, 110, .04) 70%, transparent);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  opacity: 0; transition: opacity .5s;
  pointer-events: none; z-index: 0;
}
.scene.fouille .scene-rayon { opacity: 1; animation: rayon 1s ease-in-out infinite; }
.scene.fouille .scene-ovni { animation: fouille .25s ease-in-out infinite; }
@keyframes fouille { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-4px) rotate(-3deg); } 75% { transform: translateX(4px) rotate(3deg); } }

.scene-cartes {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  gap: var(--gap, 18px);
  padding: 34px var(--gouttiere-d) 10px var(--gouttiere-g);
}
.scene-cartes .c3d.arrive { animation: descend var(--duree-arrivee, .75s) cubic-bezier(.2, .9, .3, 1.1) both; }
@keyframes descend {
  from { transform: translateY(-55vh) scale(.25) rotate(-8deg); opacity: 0; }
  60% { opacity: 1; }
}
.scene.alerte .scene-cartes { animation: secoue .09s linear infinite; }
.scene.alerte::after {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  box-shadow: inset 0 0 120px rgba(255, 40, 60, .55);
  animation: alerte-flash .5s ease-in-out infinite;
}
@keyframes secoue { 25% { transform: translate(3px, -2px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(2px, 3px); } }
@keyframes alerte-flash { 50% { box-shadow: inset 0 0 200px rgba(255, 95, 210, .55); } }

.scene-annonce {
  position: absolute; left: 0; right: 0; top: 40%; z-index: 5;
  text-align: center; pointer-events: none;
  font-family: var(--f-titre); font-size: clamp(40px, 11vw, 110px); line-height: .95;
  padding-left: var(--gouttiere-g); padding-right: var(--gouttiere-d);
}
.scene-annonce[hidden] { display: none !important; }
.scene-annonce.alerte-texte { color: #ff4d5e; text-shadow: 0 0 30px rgba(255, 77, 94, .7); animation: clignote .5s steps(2) infinite; }
.scene-annonce.lr-texte {
  top: calc(env(safe-area-inset-top, 0px) + 4px);
  font-size: clamp(34px, 8vw, 74px);
  background: var(--arc); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, .35)) drop-shadow(0 4px 0 #000);
  animation: tampon .6s cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes clignote { 50% { opacity: .35; } }
@keyframes tampon { from { transform: scale(2.4); opacity: 0; } }

.scene-bas {
  position: relative; z-index: 3; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  padding: 8px var(--gouttiere-d) 18px var(--gouttiere-g);
}
.scene-dialogue { display: flex; align-items: flex-end; gap: 10px; width: 100%; max-width: 640px; }
.scene-dialogue .alien { width: 64px; flex-shrink: 0; }
.scene-dialogue .bulle { flex: 1; font-size: 15.5px; }
.scene-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 44px; }
.scene.annonce-lr .scene-ovni { opacity: 0; transition: opacity .3s; }
.scene-passer {
  position: absolute; z-index: 6;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: max(14px, env(safe-area-inset-right, 0px));
  background: rgba(0, 0, 0, .4); border: 1px solid var(--ligne); color: var(--doux);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600;
}
.scene-passer[hidden] { display: none !important; }

/* =========================================================
   ALBUM (le classeur)
   ========================================================= */
.album-tete {
  align-self: center;
  background: #050505; border: 2px solid var(--neon); border-radius: 10px;
  box-shadow: 0 0 0 4px #050505, 0 0 24px rgba(60, 255, 110, .35);
  padding: 10px 26px 6px;
  text-align: center;
}
.album-titre { font-family: var(--f-titre); font-size: clamp(32px, 7vw, 54px); line-height: 1; color: #fff; }
.album-titre span { color: var(--neon); text-shadow: 0 0 14px rgba(60, 255, 110, .6); }

.progression { display: flex; flex-direction: column; gap: 10px; }
.progression-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.progression-ligne b { font-family: var(--f-hud); font-size: 30px; font-weight: 400; letter-spacing: .03em; }
.progression-ligne span { color: var(--doux); }
.barre { height: 10px; border-radius: 5px; background: var(--nuit); border: 1px solid var(--ligne); overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--neon); box-shadow: 0 0 12px var(--neon); border-radius: 5px; }
.raretes-mini { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
@media (max-width: 520px) { .raretes-mini { grid-template-columns: repeat(3, 1fr); } }
.rarete-mini { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 13px; color: var(--doux); font-variant-numeric: tabular-nums; }
.rarete-mini .barre { width: 100%; height: 5px; }
.rarete-mini .barre i { background: var(--c); box-shadow: none; }
.rarete-mini[data-r="LR"] .barre i { background: var(--arc); }

.filtres { display: flex; gap: 6px; flex-wrap: wrap; }
.filtre {
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--ligne); color: var(--doux);
}
.filtre[aria-pressed="true"] { color: var(--nuit); background: var(--neon); border-color: var(--neon); }
.filtre[data-r][aria-pressed="true"] { background: var(--c); border-color: var(--c); }
.filtre[data-r="LR"][aria-pressed="true"] { background: var(--arc); }

.classeur-zone { perspective: 2200px; display: flex; justify-content: center; }
.classeur {
  position: relative; width: 100%; max-width: 640px;
  touch-action: pan-y;
  user-select: none;
}
.classeur-page {
  position: relative;
  padding: 7% 7.5%;
  border-radius: 16px;
  background: #0b2a16 url('../effets/fond_album.webp') center / cover;
  box-shadow: 0 0 0 2px rgba(60, 255, 110, .55), 0 18px 50px rgba(0, 0, 0, .7), inset 0 0 60px rgba(0, 0, 0, .5);
}
.classeur-page.tourne-suivante, .classeur-page.tourne-precedente {
  position: absolute; inset: 0; z-index: 3;
  backface-visibility: hidden;
}
.classeur-page.tourne-suivante { transform-origin: left center; animation: page-suivante .55s ease-in forwards; }
.classeur-page.tourne-precedente { transform-origin: right center; animation: page-precedente .55s ease-in forwards; }
@keyframes page-suivante { to { transform: rotateY(-105deg); opacity: .2; } }
@keyframes page-precedente { to { transform: rotateY(105deg); opacity: .2; } }
.grille-pochettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4.2%; row-gap: 3.2%; }
.pochette {
  position: relative; aspect-ratio: 2 / 3;
  padding: 0; border: 0; border-radius: 6%/4%;
  background: rgba(0, 0, 0, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 3px 10px rgba(0, 0, 0, .5);
  transition: transform .15s;
}
.pochette:hover { transform: translateY(-3px); }
.pochette img { width: 100%; height: 100%; border-radius: inherit; display: block; object-fit: cover; }
.pochette.manquante {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%;
  background: rgba(0, 0, 0, .62);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent), 0 3px 10px rgba(0, 0, 0, .5);
}
.pochette.manquante .point-interro { font-family: var(--f-titre); font-size: clamp(30px, 8vw, 62px); line-height: 1; color: color-mix(in srgb, var(--c) 70%, #fff); opacity: .8; }
.pochette.manquante .num { font-family: var(--f-hud); font-size: clamp(12px, 2.6vw, 18px); letter-spacing: .06em; color: var(--doux); }
.pochette .exemplaires {
  position: absolute; right: -4%; bottom: -3%;
  font-family: var(--f-hud); font-size: clamp(13px, 2.8vw, 18px); line-height: 1;
  padding: 4px 6px 2px; border-radius: 6px;
  background: #050505; color: #fff; border: 1px solid var(--c);
}
.pochette .nouveau-point {
  position: absolute; left: -4%; top: -3%;
  font-family: var(--f-hud); font-size: clamp(11px, 2.4vw, 15px); line-height: 1;
  padding: 4px 6px 2px; border-radius: 6px; background: var(--neon); color: #03140a;
  box-shadow: 0 0 10px rgba(60, 255, 110, .8);
}
.pages-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pages-nav .bouton { min-width: 48px; padding: 0 10px; }
.pages-nav .numero-page { min-width: 110px; text-align: center; font-family: var(--f-hud); font-size: 22px; letter-spacing: .05em; color: var(--doux); }
.astuce { text-align: center; font-size: 14px; color: var(--doux); }

/* =========================================================
   CARTE EN GRAND (modale)
   ========================================================= */
.modale {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) var(--gouttiere-d) calc(env(safe-area-inset-bottom, 0px) + 16px) var(--gouttiere-g);
  background: rgba(2, 6, 4, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  animation: fondu .25s ease both;
}
.modale[hidden] { display: none !important; }
@keyframes fondu { from { opacity: 0; } }
.fermer {
  position: fixed; z-index: 2;
  top: calc(env(safe-area-inset-top, 0px) + 12px); right: max(12px, env(safe-area-inset-right, 0px));
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--ligne);
  display: grid; place-items: center; font-size: 22px; line-height: 1;
}
.grand {
  display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap;
  width: 100%; max-width: 980px;
}
.grand-carte-zone { position: relative; perspective: 1200px; }
.grand-carte {
  position: relative;
  width: min(78vw, calc(min(76vh, 760px) * 2 / 3), 440px);
  aspect-ratio: 2 / 3;
  transition: transform .15s ease-out;
  transform-style: preserve-3d;
}
.grand-carte::before {
  content: ''; position: absolute; inset: -5%; border-radius: 8%;
  background: var(--c); filter: blur(30px); opacity: .45; z-index: -1;
}
.grand-carte[data-r="LR"]::before { background: var(--arc); opacity: .7; animation: arcenciel 3s linear infinite; }
.grand-carte img { width: 100%; height: 100%; display: block; border-radius: 3.6% / 2.4%; }
.grand-carte.manquante {
  display: grid; place-items: center; border-radius: 4%;
  background: #070d0a; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent);
  font-family: var(--f-titre); font-size: 140px; color: color-mix(in srgb, var(--c) 70%, #fff);
}
.grand-infos { display: flex; flex-direction: column; gap: 12px; width: min(100%, 360px); min-width: 0; }
.grand-infos .nom { font-family: var(--f-script); font-size: 46px; line-height: 1.05; color: #fff; text-shadow: 0 0 2px var(--c), 0 0 18px var(--c); }
.grand-infos .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--doux); font-size: 15px; }
.stats-carte { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 10px; padding: 8px 12px;
  display: flex; flex-direction: column;
}
.stat small { font-family: var(--f-varsity); font-size: 11px; letter-spacing: .1em; color: var(--doux); }
.stat b { font-family: var(--f-hud); font-size: 34px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.skill { font-style: italic; color: var(--texte); font-size: 17px; line-height: 1.4; }
.grand-nav { display: flex; gap: 10px; }
.grand-nav .bouton { flex: 1; }

/* =========================================================
   CADEAU DU JOUR
   ========================================================= */
.serie { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 640px) { .serie { grid-template-columns: repeat(4, 1fr); } .jour-7 { grid-column: span 2; } }
.jour {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px;
  padding: 10px 6px; min-height: 120px;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px;
  text-align: center;
}
.jour .jour-nom { font-family: var(--f-hud); font-size: 18px; letter-spacing: .06em; color: var(--doux); }
.jour .jour-gain { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: 14px; line-height: 1.2; }
.jour .jour-gain svg { width: 30px; height: 30px; }
.jour .jour-etat { font-size: 18px; line-height: 1; }
.jour.pris { opacity: .55; }
.jour.pris .jour-etat { color: var(--neon); }
.jour.aujourdhui { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 0 26px rgba(60, 255, 110, .3); background: linear-gradient(180deg, #123522, var(--surface)); }
.jour.aujourdhui .jour-nom { color: var(--neon); }
.jour-7 { border-color: rgba(255, 205, 70, .6); background: linear-gradient(180deg, rgba(255, 205, 70, .14), var(--surface)); }
.jour-7 .jour-nom { color: var(--or); }
.jour-7.aujourdhui { border-color: var(--or); box-shadow: 0 0 0 1px var(--or), 0 0 30px rgba(255, 205, 70, .4); }
.cadeau-boite { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-block: 8px; }
.boite { width: 120px; height: 120px; position: relative; }
.boite svg { width: 100%; height: 100%; overflow: visible; }
.boite .couvercle { transform-origin: 60px 48px; transition: transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.boite.ouverte .couvercle { transform: translateY(-34px) rotate(-18deg); }
.boite:not(.ouverte).dispo { animation: tremble 1.6s ease-in-out infinite; }
@keyframes tremble { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-6deg); } 85% { transform: rotate(6deg); } 92% { transform: rotate(-3deg); } }
.gain-vol {
  position: fixed; z-index: 70; pointer-events: none;
  font-family: var(--f-hud); font-size: 30px; color: var(--neon); text-shadow: 0 0 12px rgba(60, 255, 110, .8), 0 2px 0 #000;
  animation: vole 1.2s ease-out forwards;
}
@keyframes vole { to { transform: translateY(-80px); opacity: 0; } }

/* =========================================================
   BOUTIQUE
   ========================================================= */
.achats-jour { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--doux); }
.achats-jour .points { display: flex; gap: 5px; }
.achats-jour .points i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--neon-fonce); }
.achats-jour .points i.utilise { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 8px var(--neon); }
.articles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .articles { grid-template-columns: 1fr; } }
.article { display: flex; flex-direction: column; gap: 14px; }
.article-visuel {
  position: relative; height: 210px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; overflow: hidden;
  background: radial-gradient(60% 70% at 50% 60%, rgba(60, 255, 110, .14), transparent 70%), var(--nuit);
}
.article-visuel img { position: absolute; height: 190px; width: auto; max-width: none; transition: transform .3s; }
.article:hover .article-visuel img { transform: translateY(-4px); }
.eventail img:nth-child(1) { transform: translateX(-66px) rotate(-14deg); }
.eventail img:nth-child(2) { transform: translateX(-22px) rotate(-5deg); }
.eventail img:nth-child(3) { transform: translateX(22px) rotate(5deg); }
.eventail img:nth-child(4) { transform: translateX(66px) rotate(14deg); }
.article:hover .eventail img:nth-child(1) { transform: translateX(-78px) rotate(-17deg); }
.article:hover .eventail img:nth-child(4) { transform: translateX(78px) rotate(17deg); }
.article h2 { font-family: var(--f-hud); font-size: 30px; letter-spacing: .05em; line-height: 1; }
.article p { color: var(--doux); }
.prix { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-hud); font-size: 30px; line-height: 1; }
.prix svg { width: 26px; height: 26px; }
.chances { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.chances span { display: inline-flex; gap: 5px; align-items: center; padding: 3px 8px 3px 4px; background: var(--nuit); border-radius: 6px; border: 1px solid var(--ligne); font-variant-numeric: tabular-nums; }
.raison { font-size: 14px; color: var(--doux); min-height: 1.4em; }

/* =========================================================
   PROFIL
   ========================================================= */
.profil-tete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #1d4a2c, #0a1a10);
  border: 2px solid var(--neon); box-shadow: 0 0 18px rgba(60, 255, 110, .35);
  font-family: var(--f-titre); font-size: 40px; color: var(--neon);
}
.pseudo-zone { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pseudo-zone label { font-size: 13px; color: var(--doux); }
.champ {
  width: 100%; max-width: 320px;
  background: var(--nuit); color: var(--texte);
  border: 1px solid var(--ligne); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 18px;
}
.champ:focus { border-color: var(--neon); outline: none; box-shadow: 0 0 0 3px rgba(60, 255, 110, .2); }
textarea.champ { max-width: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; min-height: 90px; resize: vertical; word-break: break-all; }
.tuiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 720px) { .tuiles { grid-template-columns: repeat(2, 1fr); } }
.tuile { background: var(--surface); border: 1px solid var(--ligne); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tuile b { font-family: var(--f-hud); font-size: 34px; line-height: 1; font-weight: 400; font-variant-numeric: tabular-nums; }
.tuile span { color: var(--doux); font-size: 14px; }
.tuile small { color: var(--doux); font-size: 12px; }
.journal { display: flex; flex-direction: column; gap: 6px; }
.ligne-journal {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center;
  padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1px solid transparent;
  text-align: left; width: 100%;
}
.ligne-journal:hover { border-color: var(--ligne); }
.ligne-journal img { width: 38px; height: 57px; border-radius: 4px; object-fit: cover; }
.ligne-journal .qui { display: flex; flex-direction: column; min-width: 0; }
.ligne-journal .qui b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-journal .qui small { color: var(--doux); font-size: 13px; }
.ligne-journal .neuf { font-family: var(--f-hud); font-size: 14px; color: var(--neon); letter-spacing: .06em; }
.options { display: flex; flex-direction: column; gap: 4px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--ligne); }
.option:last-child { border-bottom: 0; }
.option span small { display: block; color: var(--doux); font-size: 13px; }
.interrupteur { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.interrupteur input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.interrupteur i { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--ligne); transition: background .2s; }
.interrupteur i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--doux); transition: transform .2s, background .2s; }
.interrupteur input:checked + i { background: var(--neon-fonce); border-color: var(--neon); }
.interrupteur input:checked + i::after { transform: translateX(22px); background: #fff; }
.interrupteur input:focus-visible + i { outline: 2px solid var(--neon); outline-offset: 2px; }
.sauvegarde { display: flex; flex-direction: column; gap: 10px; }
.rangee-boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.note { font-size: 14px; color: var(--doux); }
.message-ok { color: var(--neon); font-weight: 600; font-size: 15px; }
.message-erreur { color: var(--danger); font-weight: 600; font-size: 15px; }
.confirmation { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; border: 1px solid rgba(255, 84, 104, .5); background: rgba(255, 84, 104, .08); }
.version { text-align: center; color: var(--doux); font-size: 13px; user-select: none; padding: 6px; }
.createur { border-color: rgba(255, 205, 70, .5); }
.createur h2 { color: var(--or); }

.deux-colonnes { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .deux-colonnes { grid-template-columns: 1fr 1fr; align-items: start; } }
.pile { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* =========================================================
   BIENVENUE
   ========================================================= */
.bienvenue { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 460px; text-align: center; }
.bienvenue .alien { width: 150px; filter: drop-shadow(0 0 30px rgba(60, 255, 110, .35)); }
.bienvenue .bulle { text-align: left; font-size: 17px; }
.bienvenue .bulle::before { left: 50%; bottom: auto; top: -10px; margin-left: -9px; border-width: 0 9px 10px 9px; border-color: transparent transparent rgba(0, 0, 0, .66) transparent; }
.bienvenue form { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: stretch; }
.bienvenue .champ { max-width: none; text-align: center; font-size: 22px; }
.bienvenue .logo-script { font-size: 44px; transform: rotate(-4deg); }

/* =========================================================
   MESSAGES (toasts)
   ========================================================= */
.toasts {
  position: fixed; z-index: 80; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--onglets-h) + 14px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: min(92vw, 460px); pointer-events: none;
}
.toast {
  background: #f1fff4; color: #08160d; font-weight: 700;
  padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  animation: toast 3.2s ease both; text-align: center;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(12px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* =========================================================
   PC : onglets dans le HUD
   ========================================================= */
@media (min-width: 900px) {
  :root { --onglets-h: 0px; }
  .onglets {
    position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--hud-h)); bottom: auto;
    display: flex; justify-content: center; gap: 4px;
    border-top: 0; border-bottom: 1px solid var(--ligne);
    padding: 0 16px;
  }
  .onglet { flex-direction: row; height: 46px; padding: 0 18px; gap: 8px; font-size: 16px; }
  .onglet svg { width: 22px; height: 22px; }
  .onglet[aria-current="page"]::before { top: auto; bottom: 0; left: 14px; right: 14px; border-radius: 3px 3px 0 0; }
  .pastille { top: 6px; left: auto; right: 4px; }
  .toasts { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* =========================================================
   ÉTAPE 2 — L'ALIEN (photo détourée), COMBATS, ATELIER
   ========================================================= */
/* ---------- L'Alien en marionnette (3 calques : corps, tête, bras + chapeau) ----------
   Cycle de 7 s : il respire, hoche la tête, puis prend son élan, saute
   et soulève son chapeau pour saluer. Il cligne des yeux de temps en temps. */
.alien-rig { position: relative; display: block; }
.rig { position: relative; display: block; width: 100%; aspect-ratio: 950 / 1590; }
.rig-saut, .rig-souffle, .rig-tete, .rig-bras { position: absolute; inset: 0; display: block; will-change: transform; }
.rig-calque { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; user-select: none; pointer-events: none; }
.rig-saut { transform-origin: 50% 100%; animation: alien-saut 7s cubic-bezier(.45, 0, .25, 1) infinite; animation-delay: var(--decal, 0s); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.rig-souffle { transform-origin: 50% 100%; animation: alien-souffle 3.5s ease-in-out infinite; animation-delay: var(--decal, 0s); }
.rig-tete { transform-origin: 55.9% 23.4%; animation: alien-tete 7s ease-in-out infinite; animation-delay: var(--decal, 0s); }
.rig-bras { transform-origin: 40.9% 24.2%; animation: alien-bras 7s cubic-bezier(.4, 0, .3, 1) infinite; animation-delay: var(--decal, 0s); }
.paupiere {
  position: absolute; width: 5.2%; height: 3.3%; transform-origin: 50% 0; transform: scaleY(0);
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(ellipse at 50% 25%, #d2b85a, #a39a3c 55%, #55702b 100%);
  box-shadow: inset 0 -2px 1px rgba(28, 40, 12, .7);
  animation: alien-cligne 4.6s infinite; animation-delay: var(--decal, 0s);
}
.paupiere.pg { left: calc(53.4% - 2.6%); top: calc(17.1% - 1.7%); }
.paupiere.pd { left: calc(61.7% - 2.6%); top: calc(17.2% - 1.7%); }
.rig-ombre { position: absolute; left: 22%; right: 22%; bottom: -1.5%; height: 3.5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); animation: alien-ombre 7s cubic-bezier(.45, 0, .25, 1) infinite; animation-delay: var(--decal, 0s); }
.alien-buste { overflow: hidden; aspect-ratio: 760 / 795; -webkit-mask: linear-gradient(#000 76%, transparent 100%); mask: linear-gradient(#000 76%, transparent 100%); }
.alien-buste .rig { position: absolute; width: 125%; left: -15%; top: 1%; }

@keyframes alien-souffle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.993, 1.012); } }
@keyframes alien-tete {
  0%, 100% { transform: rotate(0deg); }
  14% { transform: rotate(-2.2deg); }
  30% { transform: rotate(1.6deg); }
  46% { transform: rotate(-.8deg); }
  56% { transform: rotate(0deg); }
  61% { transform: rotate(-2.5deg) translateY(.6%); }
  68% { transform: rotate(3deg) translateY(-.4%); }
  75% { transform: rotate(-2deg); }
  82% { transform: rotate(1.2deg); }
  90% { transform: rotate(0deg); }
}
@keyframes alien-bras {
  0%, 56%, 100% { transform: rotate(0deg); }
  18% { transform: rotate(-1.4deg); }
  36% { transform: rotate(.4deg); }
  60% { transform: rotate(1.8deg); }
  66% { transform: rotate(-14deg); }
  70% { transform: rotate(-9deg); }
  74% { transform: rotate(-14deg); }
  78% { transform: rotate(-9deg); }
  84% { transform: rotate(1.2deg); }
  89% { transform: rotate(0deg); }
}
@keyframes alien-saut {
  0%, 57%, 100% { transform: translateY(0) scale(1, 1); }
  61% { transform: translateY(0) scale(1.035, .955); }
  66% { transform: translateY(-7%) scale(.975, 1.035); }
  71% { transform: translateY(0) scale(1.045, .945); }
  75% { transform: translateY(0) scale(.985, 1.02); }
  80% { transform: translateY(0) scale(1, 1); }
}
@keyframes alien-ombre { 0%, 57%, 100% { transform: scale(1); opacity: 1; } 66% { transform: scale(.7); opacity: .5; } 71% { transform: scale(1.08); opacity: 1; } }
@keyframes alien-cligne { 0%, 44%, 50%, 86%, 90%, 100% { transform: scaleY(0); } 47%, 88% { transform: scaleY(1); } }

/* Il s'emballe (tirage, combat, bienvenue) : petite danse et chapeau agité */
.alien-rig.excite .rig-saut { animation: alien-danse 1.1s cubic-bezier(.45, 0, .25, 1) infinite; }
.alien-rig.excite .rig-bras { animation: alien-agite .55s ease-in-out infinite; }
.alien-rig.excite .rig-tete { animation: alien-hoche .55s ease-in-out infinite; }
.alien-rig.excite .rig-ombre { animation: alien-ombre-danse 1.1s cubic-bezier(.45, 0, .25, 1) infinite; }
@keyframes alien-danse {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1.03, .97); }
  25% { transform: translateY(-4%) rotate(-3deg) scale(.98, 1.03); }
  50% { transform: translateY(0) rotate(0deg) scale(1.03, .97); }
  75% { transform: translateY(-4%) rotate(3deg) scale(.98, 1.03); }
}
@keyframes alien-ombre-danse { 0%, 50%, 100% { transform: scale(1); } 25%, 75% { transform: scale(.78); opacity: .6; } }
@keyframes alien-agite { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(-14deg); } }
@keyframes alien-hoche { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
/* ---------- Les autres humeurs de L'Alien (tuto, combats, tirages) ---------- */
/* Salut : il agite grand son sombrero */
.alien-rig.anim-salut .rig-bras { animation: alien-grand-salut 1.4s ease-in-out infinite; }
.alien-rig.anim-salut .rig-tete { animation: alien-hoche-lent 1.4s ease-in-out infinite; }
.alien-rig.anim-salut .rig-saut { animation: alien-rebond 1.4s ease-in-out infinite; }
@keyframes alien-grand-salut { 0%, 100% { transform: rotate(-2deg); } 25%, 75% { transform: rotate(-16deg); } 50% { transform: rotate(-5deg); } }
@keyframes alien-hoche-lent { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes alien-rebond { 0%, 50%, 100% { transform: translateY(0) scale(1, 1); } 25%, 75% { transform: translateY(-1.5%) scale(.99, 1.01); } }

/* Curieux : il regarde à gauche, à droite, et se gratte sous le chapeau */
.alien-rig.anim-lecture .rig-tete { animation: alien-curieux 3.2s ease-in-out infinite; }
.alien-rig.anim-lecture .rig-saut { animation: alien-penche 3.2s ease-in-out infinite; }
.alien-rig.anim-lecture .rig-bras { animation: alien-gratte 3.2s ease-in-out infinite; }
@keyframes alien-curieux { 0%, 100% { transform: rotate(0deg); } 18%, 42% { transform: rotate(-7deg) translateY(.4%); } 60%, 84% { transform: rotate(6deg); } }
@keyframes alien-penche { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-2deg); } 72% { transform: rotate(2deg); } }
@keyframes alien-gratte { 0%, 22%, 50%, 100% { transform: rotate(0deg); } 28%, 36%, 44% { transform: rotate(-4deg); } 32%, 40% { transform: rotate(-1.5deg); } }

/* Boxe : il sautille et envoie des directs */
.alien-rig.anim-boxe .rig-saut { animation: alien-sautille .5s ease-in-out infinite; }
.alien-rig.anim-boxe .rig-bras { animation: alien-direct 1s ease-in-out infinite; }
.alien-rig.anim-boxe .rig-tete { animation: alien-esquive 1s ease-in-out infinite; }
.alien-rig.anim-boxe .rig-ombre { animation: alien-ombre-danse .5s ease-in-out infinite; }
@keyframes alien-sautille { 0%, 100% { transform: translateY(0) scale(1.02, .98); } 50% { transform: translateY(-3%) scale(.98, 1.02); } }
@keyframes alien-direct { 0%, 40%, 50%, 90%, 100% { transform: rotate(0deg); } 15%, 65% { transform: rotate(8deg); } 25%, 75% { transform: rotate(-3deg); } }
@keyframes alien-esquive { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } }

/* Marteau : il tape comme à l'atelier */
.alien-rig.anim-marteau .rig-bras { animation: alien-marteau .75s cubic-bezier(.5, 0, .3, 1) infinite; }
.alien-rig.anim-marteau .rig-saut { animation: alien-impact .75s ease-out infinite; }
.alien-rig.anim-marteau .rig-tete { animation: alien-concentre .75s ease-out infinite; }
@keyframes alien-marteau { 0%, 100% { transform: rotate(-14deg); } 30% { transform: rotate(6deg); } 40% { transform: rotate(3deg); } }
@keyframes alien-impact { 0%, 26%, 50%, 100% { transform: scale(1, 1); } 32% { transform: scale(1.03, .97); } }
@keyframes alien-concentre { 0%, 100% { transform: rotate(0deg); } 32% { transform: rotate(2.5deg) translateY(.5%); } }

/* Fête : grands sauts et chapeau agité */
.alien-rig.anim-fete .rig-saut { animation: alien-fete .9s cubic-bezier(.45, 0, .25, 1) infinite; }
.alien-rig.anim-fete .rig-bras { animation: alien-agite .45s ease-in-out infinite; }
.alien-rig.anim-fete .rig-tete { animation: alien-hoche .45s ease-in-out infinite; }
.alien-rig.anim-fete .rig-ombre { animation: alien-ombre-danse .9s ease-in-out infinite; }
@keyframes alien-fete {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1.05, .95); }
  40% { transform: translateY(-9%) rotate(-5deg) scale(.97, 1.04); }
  60% { transform: translateY(-9%) rotate(5deg) scale(.97, 1.04); }
}

/* Triste : tête basse, chapeau enfoncé */
.alien-rig.anim-triste .rig-saut { animation: alien-soupir 3s ease-in-out infinite; }
.alien-rig.anim-triste .rig-tete { animation: alien-tete-basse 3s ease-in-out infinite; }
.alien-rig.anim-triste .rig-bras { animation: alien-bras-bas 3s ease-in-out infinite; }
.alien-rig.anim-triste .paupiere { animation: none; transform: scaleY(.55); }
@keyframes alien-soupir { 0%, 100% { transform: scale(1, .975); } 50% { transform: scale(1.005, .962); } }
@keyframes alien-tete-basse { 0%, 100% { transform: rotate(8deg) translateY(1.2%); } 50% { transform: rotate(10deg) translateY(1.5%); } }
@keyframes alien-bras-bas { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(7deg); } }

@media (prefers-reduced-motion: reduce) { .alien-rig * { animation: none !important; } }

.pont-alien .alien-buste { width: 92px; }
.pont-alien .alien-entier { width: 112px; margin-bottom: -16px; }
.pont-scene .pont-alien { margin-top: 24px; }
.scene-dialogue .alien-buste { width: 70px; }
.bienvenue .alien-entier { width: 150px; }

.bouton-cadeau { color: var(--nuit); background: var(--neon); border-color: var(--neon); animation: sautille 1.2s ease-in-out infinite; box-shadow: 0 0 14px rgba(60, 255, 110, .6); }
.onglets { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 899px) { .onglet { font-size: 11px; } .onglet svg { width: 24px; height: 24px; } }
@media (max-width: 420px) {
  .hud { gap: 8px; }
  .logo-script { font-size: 22px; }
  .logo-tag { margin-left: 10px; font-size: 7.5px; }
  .compteur { height: 34px; padding: 0 9px 0 6px; font-size: 19px; gap: 4px; }
  .compteur svg { width: 18px; height: 18px; }
  .compteur small { display: none; }
  .bouton-son { width: 34px; height: 34px; }
  #bouton-son { display: none; }
}

.ligne-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.budget { font-family: var(--f-hud); font-size: 24px; color: var(--doux); }
.budget b { color: var(--neon); font-weight: 400; }
.badge-auto { font-family: var(--f-texte); font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--nuit); background: var(--doux); border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
.eveil-badge { font-style: normal; font-family: var(--f-hud); color: var(--or); font-size: .9em; }

.equipe-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .equipe-slots { grid-template-columns: 1fr; } }
.carte-equipe { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--nuit); border: 1px solid color-mix(in srgb, var(--c, var(--ligne)) 45%, var(--ligne)); min-width: 0; }
.carte-equipe img { width: 54px; aspect-ratio: 2 / 3; height: auto; border-radius: 5px; flex-shrink: 0; }
.carte-equipe-infos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-equipe-infos b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-equipe-infos small { color: var(--doux); font-size: 13px; }
.carte-equipe .cout { color: var(--doux); }
.carte-equipe.vide { justify-content: center; min-height: 97px; border-style: dashed; color: var(--doux); }

.missions, .rivaux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .missions, .rivaux { grid-template-columns: 1fr; } }
.mission, .rival { display: flex; flex-direction: column; gap: 10px; }
.mission h3 { font-family: var(--f-hud); font-size: 26px; letter-spacing: .04em; line-height: 1; }
.mission .bouton, .rival .bouton { margin-top: auto; }
.mission-tete { display: flex; justify-content: space-between; align-items: center; }
.mission-icone { font-size: 30px; }
.niveau { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--ligne); }
.niveau-superette { color: var(--r-R); }
.niveau-poursuite { color: var(--r-SR); }
.niveau-cartel { color: var(--danger); }
.rival-tete { display: flex; gap: 10px; align-items: center; }
.rival-tete small { display: block; }
.avatar.petit { width: 42px; height: 42px; font-size: 24px; border-width: 1.5px; }
.rival-cartes { display: flex; gap: 6px; }
.rival-cartes img { width: 52px; aspect-ratio: 2 / 3; height: auto; border-radius: 5px; }

.boss { display: grid; grid-template-columns: 170px 1fr; gap: 18px; align-items: start; border-color: rgba(255, 84, 104, .45); background: linear-gradient(180deg, rgba(255, 84, 104, .08), var(--asphalte)); }
@media (max-width: 560px) { .boss { grid-template-columns: 1fr; } .boss-carte { width: 150px; margin: 0 auto; } }
.boss-carte svg, .carte-boss { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 18px rgba(255, 84, 104, .35)); }
.boss-infos { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.boss-nom { font-family: var(--f-titre); font-size: 40px; line-height: 1; color: #fff; }
.pv-boss { display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
.barre-boss i { background: linear-gradient(90deg, #ff4d5e, #ff9a5e); box-shadow: 0 0 12px rgba(255, 77, 94, .7); }
/* paliers 75 / 50 / 25 % du Juge (28/10/2026) */
.barre-boss { position: relative; }
.barre-boss .repere { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .7); }
.reperes-boss { position: relative; height: 16px; font-size: 11px; opacity: .85; }
.reperes-boss span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.panneau.boss.sbire .barre-boss i { background: linear-gradient(90deg, #a24bff, #ff5ed1); box-shadow: 0 0 12px rgba(162, 75, 255, .7); }

/* ---------- Choix de l'équipe ---------- */
.choix-equipe { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 14px; }
.choix-tete { display: flex; flex-direction: column; gap: 8px; padding-right: 50px; }
.choix-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.choix-carte { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 10px; background: var(--surface); border: 2px solid transparent; text-align: left; }
.choix-carte img { width: 100%; aspect-ratio: 2 / 3; height: auto; border-radius: 6px; }
.choix-carte.choisie { border-color: var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 50%, transparent); }
.choix-carte[aria-disabled="true"] { opacity: .35; }
.choix-carte .ordre { position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--neon); color: var(--nuit); font-family: var(--f-hud); font-size: 20px; }
.choix-infos b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.choix-infos small { color: var(--doux); font-size: 12px; }
.choix-actions { position: sticky; bottom: 0; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 0 4px; background: linear-gradient(transparent, rgba(2, 6, 4, .95) 30%); }

/* ---------- Combat animé ---------- */
.combat {
  position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; gap: 6px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) var(--gouttiere-d) calc(env(safe-area-inset-bottom, 0px) + 12px) var(--gouttiere-g);
  background: radial-gradient(80% 45% at 50% 0%, rgba(255, 84, 104, .14), transparent 70%), radial-gradient(80% 45% at 50% 100%, rgba(60, 255, 110, .14), transparent 70%), #030805;
  overflow: hidden;
}
.combat[hidden] { display: none !important; }
.combat-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.combat-titre { font-family: var(--f-hud); font-size: 24px; letter-spacing: .05em; }
.combat-controles { display: flex; gap: 6px; }
.camp { display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 3vw, 28px); flex: 1; min-height: 0; }
.camp-ennemi { align-items: flex-start; }
.combattant { position: relative; width: min(26vw, 15vh, 150px); display: flex; flex-direction: column; gap: 4px; transition: transform .3s, opacity .3s, filter .3s; opacity: .55; transform: scale(.85); }
.combattant.actif { opacity: 1; transform: scale(1.12); z-index: 2; }
.combattant.est-boss { width: min(40vw, 22vh, 210px); opacity: 1; transform: none; }
.combattant-carte { position: relative; border-radius: 6%; }
.combattant-carte img { width: 100%; aspect-ratio: 2 / 3; height: auto; display: block; border-radius: 6%; }
.combattant.actif .combattant-carte { box-shadow: 0 0 0 2px var(--c, #ff4d5e), 0 0 22px color-mix(in srgb, var(--c, #ff4d5e) 60%, transparent); }
.combattant[data-r="LR"].actif .combattant-carte { box-shadow: 0 0 0 2px #fff, 0 0 26px rgba(255, 95, 210, .6); }
.combattant-pv { height: 7px; border-radius: 4px; background: #000; border: 1px solid var(--ligne); overflow: hidden; }
.combattant-pv i { display: block; height: 100%; background: var(--neon); transition: width .45s ease-out; }
.camp-ennemi .combattant-pv i { background: #ff5468; }
.combattant-nom { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combattant-nom small { display: block; color: var(--doux); font-weight: 500; font-variant-numeric: tabular-nums; }
.combattant.ko { opacity: .25; filter: grayscale(1); transform: scale(.8); }
.combattant.ko::after { content: 'K.O.'; position: absolute; top: 30%; left: 0; right: 0; text-align: center; font-family: var(--f-titre); font-size: 34px; color: #ff4d5e; transform: rotate(-12deg); text-shadow: 0 2px 0 #000; }
.camp-joueur .combattant.frappe { animation: frappe-haut .35s ease-out; }
.camp-ennemi .combattant.frappe { animation: frappe-bas .35s ease-out; }
.combattant.touche .combattant-carte { animation: touche .35s ease-out; }
@keyframes frappe-haut { 40% { transform: scale(1.12) translateY(-34px); } }
@keyframes frappe-bas { 40% { transform: scale(1.12) translateY(34px); } }
.est-boss.frappe { animation-name: frappe-boss !important; }
@keyframes frappe-boss { 40% { transform: translateY(26px) scale(1.04); } }
@keyframes touche { 20% { transform: translateX(-7px); filter: brightness(1.6) saturate(.5); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } }
.degat {
  position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%); z-index: 3; white-space: nowrap; pointer-events: none;
  font-family: var(--f-hud); font-size: clamp(20px, 5vw, 32px); color: #fff; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255, 84, 104, .9);
  animation: degat 1.2s ease-out forwards;
}
.degat.critique { color: #ffcd46; font-size: clamp(24px, 6vw, 40px); text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 205, 70, .9); }
.degat.fort { color: #ffb0b8; }
.degat.soin { color: var(--neon); text-shadow: 0 2px 0 #000, 0 0 10px rgba(60, 255, 110, .9); }
.degat.esquive, .degat.rate { color: #cfe; text-shadow: 0 2px 0 #000; }
@keyframes degat { 0% { opacity: 0; transform: translate(-50%, -60%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -100%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.combat-milieu { display: grid; place-items: center; height: 34px; flex-shrink: 0; }
.combat-vs { font-family: var(--f-titre); font-size: 34px; color: var(--doux); opacity: .6; }
.combat-bas { display: flex; flex-direction: column; gap: 10px; align-items: center; flex-shrink: 0; }
.combat-resultat {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 28px; border-radius: 16px; background: rgba(3, 8, 5, .9); border: 2px solid var(--neon);
  animation: tampon .5s cubic-bezier(.3, 1.6, .5, 1) both;
}
.combat-resultat[hidden] { display: none !important; }
.combat-resultat b { font-family: var(--f-titre); font-size: clamp(40px, 10vw, 72px); line-height: 1; color: var(--neon); text-shadow: 0 0 20px rgba(60, 255, 110, .6); }
.combat-resultat span { font-family: var(--f-hud); font-size: 24px; letter-spacing: .04em; }
.combat-resultat.defaite { border-color: #ff5468; }
.combat-resultat.defaite b { color: #ff5468; text-shadow: 0 0 20px rgba(255, 84, 104, .6); }
.combat-resultat.boss { border-color: var(--or); }
.combat-resultat.boss b { color: var(--or); }

/* ---------- Atelier ---------- */
.atelier-zone { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 900px) { .atelier-zone { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } .atelier-panneau { position: sticky; top: calc(var(--hud-h) + 60px); } }
.atelier-panneau { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
@media (max-width: 520px) { .atelier-panneau { grid-template-columns: 110px 1fr; } }
.atelier-visuel img { width: 100%; aspect-ratio: 2 / 3; height: auto; border-radius: 6%; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 24px color-mix(in srgb, var(--c) 45%, transparent); }
.atelier-panneau.eveil-flash .atelier-visuel img { animation: eveil-flash .9s ease-out; }
@keyframes eveil-flash { 30% { box-shadow: 0 0 0 3px var(--or), 0 0 50px var(--or); transform: scale(1.04); } }
.nom-script { font-family: var(--f-script); font-size: 36px; line-height: 1.05; color: #fff; text-shadow: 0 0 2px var(--c), 0 0 14px var(--c); }
.atelier-panneau .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eveil-etoiles { display: flex; gap: 3px; }
.eveil-etoiles i { width: 22px; height: 22px; color: var(--ligne); }
.eveil-etoiles i.pleine { color: var(--or); filter: drop-shadow(0 0 4px rgba(255, 205, 70, .7)); }
.eveil-etoiles svg { width: 100%; height: 100%; display: block; }
.atelier-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; }
.atelier-carte.selection { box-shadow: 0 0 0 2px var(--c), 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.eveil-coin, .evo-coin {
  position: absolute; z-index: 1; font-family: var(--f-hud); font-size: clamp(12px, 2.6vw, 16px); line-height: 1;
  padding: 3px 5px 1px; border-radius: 5px; background: #050505; border: 1px solid var(--or); color: var(--or);
}
.eveil-coin { left: -4%; bottom: -3%; }
.evo-coin { right: -4%; top: -3%; border-color: var(--neon); color: var(--neon); }
.ligne-recyclage { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface); }
.ligne-recyclage img { width: 38px; height: 57px; border-radius: 4px; object-fit: cover; }
.ligne-recyclage .qui { display: flex; flex-direction: column; min-width: 0; }
.ligne-recyclage .qui b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-recyclage .qui small { color: var(--doux); font-size: 13px; }
@media (max-width: 520px) { .ligne-recyclage { grid-template-columns: 38px minmax(0, 1fr); } .ligne-recyclage .rangee-boutons { grid-column: 1 / -1; } }

/* ---------- Classement ---------- */
.classement { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.classement li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; background: var(--nuit); font-variant-numeric: tabular-nums; }
.classement li.moi { border: 1px solid var(--neon); background: #0d2618; }
.classement .rang { font-family: var(--f-hud); font-size: 22px; color: var(--doux); text-align: center; }
.classement li:nth-child(1) .rang { color: var(--or); }
.classement li:nth-child(2) .rang { color: #d8dde0; }
.classement li:nth-child(3) .rang { color: #d08a4a; }
.classement .qui { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.classement .score { color: var(--doux); font-size: 14px; }
.classement .score b { color: var(--texte); font-family: var(--f-hud); font-size: 20px; font-weight: 400; }


/* =========================================================
   ÉTAPE 3 — QUÊTES, SUCCÈS, TUTORIEL
   ========================================================= */
.quete { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--ligne); }
.quete:first-of-type { border-top: 0; }
.quete-texte { display: flex; flex-direction: column; min-width: 0; }
.quete-texte small { color: var(--neon); font-weight: 600; font-size: 13px; }
.quete .barre { height: 8px; }
.quete.prete { animation: pulse-quete 1.6s ease-in-out infinite; }
@keyframes pulse-quete { 50% { background: rgba(60, 255, 110, .06); } }
.quete-ok { color: var(--neon); font-weight: 700; font-size: 14px; }
@media (max-width: 560px) { .quete { grid-template-columns: minmax(0, 1fr) auto; } .quete .barre { grid-column: 1 / -1; grid-row: 2; } }

.succes-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; padding: 10px 8px; border-radius: 12px; background: var(--nuit); border: 1px solid var(--ligne); opacity: .55; filter: grayscale(.9); }
.badge.debloque { opacity: 1; filter: none; border-color: rgba(255, 205, 70, .55); background: linear-gradient(180deg, rgba(255, 205, 70, .12), var(--nuit)); }
.badge .succes-icone { font-size: 30px; line-height: 1.1; }
.badge b { font-size: 14px; line-height: 1.2; }
.badge small { color: var(--doux); font-size: 12px; line-height: 1.25; }
.badge .badge-etat { color: var(--texte); font-weight: 600; font-variant-numeric: tabular-nums; }
.toast-succes { display: flex; gap: 12px; align-items: center; text-align: left; background: linear-gradient(90deg, #fff6d6, #f1fff4); border: 2px solid var(--or); }
.toast-succes .succes-icone { font-size: 32px; }
.toast-succes span { display: flex; flex-direction: column; }
.toast-succes small { font-size: 12px; font-weight: 600; color: #4b5a2a; }

.modale-tuto { background: rgba(2, 6, 4, .45); backdrop-filter: none; -webkit-backdrop-filter: none; place-items: end center; }
.tuto { display: flex; align-items: flex-end; gap: 10px; width: 100%; max-width: 640px; }
.tuto .alien-entier { width: 110px; flex-shrink: 0; }
.tuto-carte { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .7); border-color: var(--neon-fonce); }
.tuto-points { display: flex; gap: 6px; }
.tuto-points i { width: 8px; height: 8px; border-radius: 50%; background: var(--ligne); }
.tuto-points i.actif { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
@media (max-width: 520px) { .tuto .alien-entier { width: 76px; } }

/* =========================================================
   COMPTE DISCORD (liaison avec le bot L'Alien)
   ========================================================= */
.bouton-discord {
  background: #5865f2; color: #fff; border-color: #7983f5;
  box-shadow: 0 6px 24px rgba(88, 101, 242, .3);
}
.bouton-discord:hover:not(:disabled) { box-shadow: 0 0 0 1px rgba(121, 131, 245, .6), 0 6px 30px rgba(88, 101, 242, .45); }
.bienvenue .bouton-discord { width: 100%; min-height: 52px; font-size: 23px; }
.note.centre { text-align: center; margin: -6px 0 0; }
.separateur-ou { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; color: var(--doux); font-size: 14px; }
.separateur-ou::before, .separateur-ou::after { content: ''; flex: 1; height: 1px; background: var(--ligne); }
.compte-discord .bouton-discord { align-self: flex-start; }
.avatar-photo { object-fit: cover; padding: 0; }
.etiquette-compte { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #a9b0ff; }
.etiquette-compte svg { width: 15px; height: 15px; }
.pseudo-discord { font-family: var(--f-hud); font-size: 30px; letter-spacing: .04em; line-height: 1.05; overflow-wrap: anywhere; }
.profil-tete .pseudo-zone { min-width: 0; flex: 1 1 200px; }
.top-boss { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: top; }
.top-boss li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, .35); counter-increment: top; }
.top-boss li span::before { content: counter(top) '. '; color: var(--doux); }
.top-boss li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* « L'Alien s'en occupe… » pendant que le bot répond */
.attente-alien {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 200; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: rgba(0, 0, 0, .78); color: #fff; font-size: 15px; font-weight: 600;
  border: 1px solid rgba(60, 255, 110, .35); box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.attente-alien[hidden] { display: none !important; }
.attente-rond {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid rgba(60, 255, 110, .25); border-top-color: var(--neon);
  animation: tourne .8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .attente-rond { animation-duration: 2.4s; } }

/* Parcours d'intro sur l'accueil (28/10/2026) */
.intro-parcours { margin: 0 0 16px; }
.intro-etapes { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.intro-etapes li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.intro-etapes li.fait { opacity: .7; }
.intro-etapes small { opacity: .75; }

/* Bandeau d'événement + Contrats sur le site (28/10/2026) */
.bandeau-evenement { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: linear-gradient(90deg, rgba(70, 245, 110, .18), rgba(255, 205, 70, .18)); border: 1px solid rgba(255, 205, 70, .55); }
.contrats-en-cours { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.contrats-en-cours li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.contrats-en-cours small { opacity: .75; }
.contrats-tableau { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 10px 0; }
.contrat { border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; padding: 10px 12px; }
.contrat h3 { margin: 0 0 4px; font-size: 1rem; }
.contrat.fait { opacity: .6; }
.choix-cartes { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; max-height: 220px; overflow: auto; }
.carte-choix { border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; background: transparent; color: inherit; padding: 4px 8px; cursor: pointer; font: inherit; font-size: .85rem; }
.carte-choix small { opacity: .7; }
.carte-choix[aria-pressed="true"] { border-color: #46f56e; background: rgba(70, 245, 110, .18); }

/* Équipements (5.4) */
.equipements { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.equipements h2 { margin: 0; }
.equip-ligne { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); }
.equip-ligne.porte { border-color: rgba(255,205,70,.6); background: rgba(255,205,70,.06); }
.equip-emoji { font-size: 1.6em; width: 1.6em; text-align: center; }
.equip-nom { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.equip-nom small { opacity: .75; }

/* Parties hors ligne (5.6) */
.bandeau-invite { margin: 0 0 12px; border: 1px solid rgba(255, 205, 70, .55); background: rgba(255, 205, 70, .07); }
.bandeau-invite p { margin: 6px 0; }
.bandeau-invite .bouton { margin-top: 6px; }
.verrou-invite { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 10, 6, .92); }
.verrou-invite[hidden] { display: none; }
.verrou-boite { max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.verrou-boite svg { max-width: 140px; height: auto; }

/* Fonds des missions (5.7) : l'image derrière, assombrie pour garder les cartes lisibles */
.combat.avec-fond { background: linear-gradient(rgba(3, 8, 5, .55), rgba(3, 8, 5, .82)), var(--fond-combat) center / cover no-repeat, #030805; }
.prix-barre { opacity: .55; font-size: .8em; }
/* Juge sous 10 % : PV cachés pendant le combat (5.8) */
.combat.pv-cache .camp-ennemi .combattant-pv, .combat.pv-cache .camp-ennemi .combattant-nom small { visibility: hidden; }
/* Cartes du jour (5.9) */
.cartes-du-jour { margin: 0 0 12px; }
.cdj-liste { display: flex; gap: 10px; flex-wrap: wrap; }
.cdj-liste .mini { width: 92px; }
/* Titres (5.9) */
.titres { margin: 0 0 12px; }
.titres-liste { display: flex; flex-wrap: wrap; gap: 8px; }
.titre-joueur { display: block; opacity: .7; font-size: .8em; }
