
v/* ═══════════════════════════════════════════════════════════
   MELEAIR — Styles
   Dark gamified UI · Purple/Neon accents
═══════════════════════════════════════════════════════════ */

/* ─── Fonts ──────────────────────────────────────────────── */
@font-face {
  font-family: 'Aquavit';
  src: url('aquavit-font/aquavit-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Aquavit';
  src: url('aquavit-font/aquavit-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* ─── Variables ─────────────────────────────────────────── */
:root {
  /* ── Backgrounds ─────────────────────────────────── */
  --bg:          #08071A;
  --bg2:         #110E2A;
  --bg3:         #17132F;
  --purple:      #8B5CF6;     /* brand primary — violet pur */
  --purple-l:    #A78BFA;     /* highlight / accent */
  --purple-d:    #5B21B6;     /* dark gradient stop */
  --neon:        #C026D3;     /* fuchsia profond — plus cosmique */
  --neon-cyan:   #22D3EE;
  --gold:        #F59E0B;
  --gold-l:      #FCD34D;
  --green:       #1D9E75;     /* énergie */
  --green-l:     #5DCAA5;
  --red:         #ef4444;
  /* ── Text ────────────────────────────────────────── */
  --text:        #F0EEF8;     /* blanc légèrement chaud */
  --text2:       #8B84B8;     /* secondaire */
  --text3:       #4A4270;     /* tertiaire / inactif */
  /* ── Cards ───────────────────────────────────────── */
  --card-bg:     rgba(17,14,42,0.8);
  --card-border: rgba(127,119,221,0.15);
  --card-hover-border: rgba(127,119,221,0.5);
  --glass:       rgba(255,255,255,0.04);
  --glass-border:rgba(255,255,255,0.08);
  /* ── Glows ───────────────────────────────────────── */
  --glow-p:      0 0 24px rgba(127,119,221,0.45);
  --glow-n:      0 0 32px rgba(168,143,240,0.55);
  --glow-g:      0 0 20px rgba(245,158,11,0.55);
  --glow-c:      0 0 20px rgba(6,182,212,0.45);
  /* ── Geometry ─────────────────────────────────────── */
  --r:           18px;
  --r-sm:        12px;
  --r-lg:        16px;        /* boutons principaux */
  --r-xl:        32px;
  --transition:  0.28s cubic-bezier(0.4,0,0.2,1);
  --transition-spring: 0.45s cubic-bezier(0.34,1.56,0.64,1);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button {
  font-family: 'Orbitron', 'Aquavit', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}

/* ─── Web app container (full screen only) ───────────────── */
#app {
  position: relative;
  width: 100vw;
  min-width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  /* Fond cosmique unifié (identique à l'ancien #screen-home) — partagé par
     TOUS les écrans, qui sont rendus transparents au-dessus. */
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(120,80,220,.38), transparent 55%),
    radial-gradient(90% 80% at 18% 85%, rgba(210,90,214,.20), transparent 60%),
    radial-gradient(70% 70% at 50% 40%, rgba(90,120,230,.18), transparent 70%),
    radial-gradient(140% 120% at 50% 0%, #0e0a24, #070512 70%);
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

/* ─── Fond cosmique GLOBAL (étoiles + vignette) partagé par tous les écrans ─── */
#cosmic-bg {
  position: absolute; inset: 0;
  z-index: 0;                 /* derrière les écrans (.screen = z-index:1) */
  pointer-events: none;
  overflow: hidden;
  /* Vignette (identique à l'ancien #screen-home::before) par-dessus la nébuleuse de #app */
  background: radial-gradient(ellipse 90% 75% at 50% 50%,
    transparent 0%,
    transparent 55%,
    rgba(0,0,0,0.35) 90%,
    rgba(0,0,0,0.55) 100%);
}

/* Tous les écrans sont transparents → ils laissent voir le fond cosmique unifié.
   Neutralise les fonds spécifiques (dégradés roses, noirs unis, etc.) de chaque page. */
.screen,
.screen-galaxy {
  background: transparent !important;
}

/* ─── Scrollable inner areas ─────────────────────────────── */
.scrollable { overflow-y: auto; overflow-x: hidden; }
.scrollable::-webkit-scrollbar { width: 4px; }
.scrollable::-webkit-scrollbar-track { background: transparent; }
.scrollable::-webkit-scrollbar-thumb { background: var(--purple-d); border-radius: 2px; }

/* ─── Screen system ──────────────────────────────────────── */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(16px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 1;
}
.screen.active {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
/* Anti-flash : si user déjà connecté au load, le screen-landing est masqué
   instantanément (même s'il a class="active" en HTML). Le JS retire cette classe
   dès qu'il prend la main pour permettre une navigation normale ensuite. */
html.hide-landing-init #screen-landing {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transition: none !important;
}

/* ── Onboarding (accueil · rôle · connexion) : PAS de fondu croisé ──
   Sinon, pendant le retour, l'ancienne page et la nouvelle se superposent
   (écrans transparents) et « se mélangent ». On masque l'écran sortant
   instantanément ; seul l'écran entrant apparaît. */
#screen-landing:not(.active),
#screen-role:not(.active),
#screen-auth:not(.active) {
  transition: none !important;
  visibility: hidden;
}

/* ─── Common screen header ───────────────────────────────── */
.screen-header {
  display: flex; align-items: center;
  padding: 18px 20px 14px;
  gap: 12px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, rgba(7,9,26,0.96) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative; z-index: 2;
}
/* « Crée ton avatar » : en-tête SANS fond (transparent, pas de bande ni flou) */
#screen-avatar .screen-header {
  background: transparent !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
/* Bouton « Continuer » identique à « Reprendre ma mission » : dégradé PLEIN violet→magenta */
#screen-avatar .screen-footer .btn-primary {
  outline: none !important;
  border: none !important;
  border-radius: 18px !important;
  background: linear-gradient(105deg, #6d5dfc 0%, #8b5cf6 45%, #d65ad6 100%) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  box-shadow:
    0 16px 44px -12px rgba(150,70,230,0.9),
    inset 0 1px 0 rgba(255,255,255,0.22) !important;
  animation: none !important;
}
#screen-avatar .screen-footer .btn-primary:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow:
    0 22px 56px -12px rgba(150,70,230,1),
    inset 0 1px 0 rgba(255,255,255,0.30) !important;
}
#screen-avatar .screen-footer .btn-primary:active {
  transform: translateY(1px) scale(0.985) !important;
}
.screen-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem; font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  flex: 1; text-align: center;
  text-shadow: 0 0 24px rgba(96,165,250,0.4), 0 1px 0 rgba(0,0,0,0.3);
}
.header-spacer { width: 38px; }

/* ─── Shop header cart icon ──────────────────────────────── */
.shop-header-hist {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.shop-hist-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(167,139,250,0.7);
  cursor: pointer; flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.shop-hist-btn:not(:disabled):hover {
  background: rgba(127,119,221,0.15);
  border-color: rgba(127,119,221,0.35);
  color: #c4b5fd;
}
.shop-hist-btn:disabled { opacity: 0.28; cursor: default; }

.shop-header-cart {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(127, 119, 221, 0.12);
  border: 1px solid rgba(127, 119, 221, 0.25);
  border-radius: 12px;
  color: var(--purple-l);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.shop-header-cart svg { width: 20px; height: 20px; }
.shop-header-cart:active { transform: scale(0.9); background: rgba(127,119,221,0.22); }

.shop-cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--purple);
  color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  box-shadow: 0 0 6px rgba(127,119,221,0.6);
}
.shop-cart-badge.badge-bounce {
  animation: badge-bounce 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes badge-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.55); }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}

/* ─── Flying star to cart ────────────────────────────────── */
.flying-item {
  position: fixed;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #c4b5fd 45%, rgba(127,119,221,0.4) 100%);
  box-shadow: 0 0 10px 5px rgba(196,181,253,0.7), 0 0 20px 8px rgba(127,119,221,0.35);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform, opacity, left, top;
}
.fly-trail {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(196,181,253,0.6);
  box-shadow: 0 0 5px 2px rgba(127,119,221,0.4);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  animation: trail-fade 0.38s ease-out forwards;
}
@keyframes trail-fade {
  0%   { opacity: 0.8; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(0.1); }
}

/* ══ BOUTON RETOUR — design unifié neon blanc ══ */
.btn-back, .btn-menu {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff; font-size: 1rem;
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  flex-shrink: 0;
  box-shadow:
    0 0 10px rgba(255,255,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 2px 8px rgba(0,0,0,0.35);
}
.btn-back:hover, .btn-menu:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.55);
  box-shadow:
    0 0 18px rgba(255,255,255,0.28),
    0 0 36px rgba(255,255,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-menu-lg {
  width: 48px; height: 48px;
  font-size: 1.5rem;
  border: 1.5px solid var(--purple-l);
  background: rgba(124,58,237,0.18);
  border-radius: var(--r);
  box-shadow: 0 0 14px rgba(96,165,250,0.3);
}
.btn-menu-lg:hover { background: rgba(124,58,237,0.35); box-shadow: 0 0 22px rgba(96,165,250,0.5); }

.screen-footer {
  padding: 16px 24px 30px;
  flex-shrink: 0;
  background: linear-gradient(to top, rgba(7,9,26,0.98) 65%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ─── Primary button ─────────────────────────────────────── */
.btn-primary {
  width: 100%;
  min-height: 54px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #5B21B6 0%, #8B5CF6 50%, #C026D3 100%);
  border: none; border-radius: var(--r-lg);
  color: white; font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 4px 20px rgba(139,92,246,0.5),
    0 0 14px rgba(192,38,211,0.25),
    0 1px 0 rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}
.btn-primary::before {
  content: ''; position: absolute; top: 0; left: -75%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: left-shimmer 3s ease-in-out infinite;
  pointer-events: none; z-index: 1; border-radius: inherit;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 8px 28px rgba(139,92,246,0.65),
    0 0 20px rgba(192,38,211,0.35),
    0 1px 0 rgba(0,0,0,0.4);
  background: linear-gradient(135deg, #6D28D9 0%, #A78BFA 50%, #D946EF 100%);
}
.btn-primary:active { transform: scale(0.97); filter: brightness(0.92); }
.btn-large {
  padding: 17px 40px; font-size: 0.88rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.2em;
}


/* ════════════════════════════════════════════════════════════
   SCREEN 1 — LANDING
════════════════════════════════════════════════════════════ */
#screen-landing {
  align-items: center; justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.landing-bg-gradient {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 75% 60% at 50% 50%, rgba(139,92,246,0.32) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 90%, rgba(124,58,237,0.10) 0%, transparent 65%);
}

.particles-canvas {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
}

.landing-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 24px;
  text-align: center;
}

/* Bloc logo + tagline */
.landing-header-block {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 14px;
  margin-bottom: -8px;
}

/* Logo premium blanc — halo unique et doux */
.landing-logo {
  font-family: 'Aquavit', 'Orbitron', sans-serif;
  font-size: 4.6rem; font-weight: 400;
  letter-spacing: 0.04em;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 32px rgba(196,181,253,0.32);
}

/* Avatar fantôme — taille équilibrée */
.landing-avatar-wrap {
  position: relative;
  width: 440px; height: 440px;   /* taille de réservation d'espace inchangée */
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  margin: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
}
/* Le papillon est agrandi visuellement SANS prendre plus de place dans la mise en page */
.landing-avatar-wrap .ghost-avatar {
  transform: scale(1.35);
  transform-origin: center;
}

/* Aura premium — synchronisée avec la respiration de l'avatar */
.ghost-aura {
  position: absolute;
  width: 620px; height: 620px;
  top: 50%; left: 50%;
  background: radial-gradient(ellipse 55% 60% at 50% 50%,
    rgba(196,181,253,0.16) 0%,
    rgba(167,139,250,0.06) 40%,
    transparent 70%);
  animation: aura-breathe 3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.4s ease;
  backface-visibility: hidden;
}
@keyframes aura-breathe {
  0%,100% { opacity: 0.75; transform: translate3d(-50%,-50%,0) scale(1); }
  50%     { opacity: 0.95; transform: translate3d(-50%,-50%,0) scale(1.03); }
}

.ghost-avatar {
  width: 100%; height: 100%;
  filter: brightness(2) saturate(0) contrast(0.7) drop-shadow(0 0 24px rgba(255,255,255,0.5));
  opacity: 0.5;
  position: relative; z-index: 1;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.3s ease;
}
.ghost-avatar svg, .ghost-avatar img { width: 100%; height: 100%; object-fit: contain; }

.click-hint {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.2em; color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.6);
  animation: blink 1.6s ease-in-out infinite;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  margin-top: -30px;
}
@keyframes blink { 0%,100%{opacity:0.4} 50%{opacity:1} }

.landing-tagline {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text2);
  line-height: 1.7;
  margin: 0;
  max-width: 260px;
  text-align: center;
}

/* ── Zone CTA : bouton + sparkles regroupés dans le flux ──── */
.landing-cta-area {
  position: relative;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-top: 8px;
}

/* ── Bouton CTA moderne — grand, vivant, irrésistible ── */
.landing-cta {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  width: auto !important;
  max-width: none;
  min-width: 0;
  min-height: 0;
  padding: 22px 62px;
  white-space: nowrap;
  font-family: 'Inter', 'Outfit', sans-serif;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(60,20,120,0.25);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background:
    linear-gradient(120deg,
      #7c3aed 0%,
      #8b5cf6 22%,
      #b06bf5 45%,
      #c084fc 55%,
      #8b5cf6 78%,
      #7c3aed 100%);
  background-size: 220% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    inset 0 -3px 8px rgba(80,40,160,0.35),
    0 22px 46px -14px rgba(124,58,237,0.9);
  z-index: 10;
  overflow: visible;
  isolation: isolate;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s ease, filter 0.25s ease;
  animation: cta-breathe 3.2s ease-in-out infinite, cta-gradient 5s ease-in-out infinite;
  will-change: transform, background-position;
}
@keyframes cta-breathe {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(0) scale(1.025); }
}
/* Le dégradé ondule en continu (même sans survol) */
@keyframes cta-gradient {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* Étoile retirée — bouton sans icône décorative */
.landing-cta::before,
.btn-primary.landing-cta::before {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Flèche → qui glisse au survol */
.landing-cta-arrow {
  width: 23px; height: 23px; flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1);
}
.landing-cta:hover .landing-cta-arrow { transform: translateX(5px); }

/* Halo violet qui respire (synchro avec l'aura du papillon) */
.landing-cta::after {
  content: '';
  position: absolute; inset: -16px;
  border-radius: 30px;
  background: radial-gradient(ellipse 78% 82% at 50% 50%,
    rgba(139,92,246,0.6) 0%,
    rgba(124,58,237,0.26) 45%,
    transparent 72%);
  filter: blur(24px);
  opacity: 0.6;
  z-index: -1;
  animation: cta-halo 3.2s ease-in-out infinite;
}
@keyframes cta-halo {
  0%,100% { opacity: 0.5;  transform: scale(1); }
  50%     { opacity: 0.9;  transform: scale(1.1); }
}

.landing-cta:hover {
  animation-play-state: paused;
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.07);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -3px 8px rgba(80,40,160,0.35),
    0 30px 60px -14px rgba(124,58,237,1);
}
.landing-cta:hover::after { animation-play-state: paused; opacity: 0.95; transform: scale(1.12); }
.landing-cta:active { transform: translateY(-1px) scale(0.99); }

@media (prefers-reduced-motion: reduce) {
  .landing-cta, .landing-cta::after { animation: none; }
}

/* ── Pages sans sidebar : landing + auth ─────────────────────
   Deux mécanismes pour garantir le résultat :
   1. body.no-sidebar — appliqué via JS dans onScreenEnter
   2. :has() — fallback CSS pur pour navigateurs récents       */
body.no-sidebar #menu-panel,
body.no-sidebar .sidebar-toggle-btn,
body.no-sidebar #bottom-nav-wrap,
body.no-sidebar #bn-reveal-btn,
body:has(#screen-landing.active) #menu-panel,
body:has(#screen-landing.active) .sidebar-toggle-btn,
body:has(#screen-landing.active) #bottom-nav-wrap,
body:has(#screen-landing.active) #bn-reveal-btn,
body:has(#screen-auth.active)    #menu-panel,
body:has(#screen-auth.active)    .sidebar-toggle-btn,
body:has(#screen-auth.active)    #bottom-nav-wrap,
body:has(#screen-auth.active)    #bn-reveal-btn,
body:has(#screen-home.active)    #menu-panel,
body:has(#screen-home.active)    .sidebar-toggle-btn,
body:has(#screen-home.active)    #bottom-nav-wrap,
body:has(#screen-home.active)    #bn-reveal-btn,
body:has(#screen-prof.active)    #menu-panel,
body:has(#screen-prof.active)    .sidebar-toggle-btn,
body:has(#screen-prof.active)    #bottom-nav-wrap,
body:has(#screen-prof.active)    #bn-reveal-btn {
  display: none !important;
}
body.no-sidebar #screen-landing,
body.no-sidebar #screen-auth,
body.no-sidebar #screen-prof,
#screen-landing.active,
#screen-auth.active,
#screen-prof.active,
#screen-home.active { right: 0 !important; }

/* ── Respiration de l'avatar (synchronisée avec l'aura) ───── */
.landing-avatar-wrap { animation: avatar-breathe 3s cubic-bezier(0.45, 0, 0.55, 1) infinite; will-change: transform; }
@keyframes avatar-breathe {
  0%, 100% { transform: translate3d(0,0,0); }
  50%      { transform: translate3d(0,-12px,0); }
}
/* Le hover éclaire l'avatar sans casser l'animation de la wrap */
.landing-avatar-wrap:hover .ghost-avatar { opacity: 0.65; transform: scale(1.4); }
.landing-avatar-wrap:hover .ghost-aura  { opacity: 1; }

/* Accessibilité — respecte le réglage système "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
  .landing-avatar-wrap,
  .ghost-aura,
  .home-avatar,
  .home-avatar-glow,
  .home-avatar-wrap::after,
  .home-avatar-wrap::before,
  .home-cinematic-top .home-player-name,
  .home-cinematic-top .home-greeting,
  .home-cinematic-top .home-storytelling,
  .home-brand-logo,
  .hrr-grid-lines,
  .hrr-shine-bar,
  .hrr-star,
  .hrr-particle,
  .hrr-ripple,
  .hrr-spot-pulse,
  .hrr-spot-pulse-2,
  .hrr-irid-layer,
  .hrr-edge-line,
  .hrr-ring,
  .hrr-ring-inner,
  .btn-play-hero,
  .btn-play-hero::before,
  .qp-bg-bf,
  .qp-bg-bf .qp-wL,
  .qp-bg-bf .qp-wR,
  .qp2-node:not(.done) .qp-nwL,
  .qp2-node:not(.done) .qp-nwR {
    animation: none !important;
  }
  /* Garde une seule animation de fade très douce pour signaler les transitions */
  .home-cinematic-top .home-player-name,
  .home-cinematic-top .home-greeting,
  .home-cinematic-top .home-storytelling {
    opacity: 1;
  }
}


/* ════════════════════════════════════════════════════════════
   SCREEN 2 — AVATAR CREATION
════════════════════════════════════════════════════════════ */
#screen-avatar { background: transparent; }
/* Avatar screen title — white in both modes */
#screen-avatar .screen-title { color: #fff !important; }
.av-btn-back { display: grid; place-items: center; }
.av-btn-back svg { display: block; }
body.light-theme #screen-avatar {
  background: #3b1a6e;
  background-image:
    radial-gradient(ellipse 65% 55% at 50% 65%, rgba(90,30,180,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 10%, rgba(120,50,200,0.3) 0%, transparent 60%);
}

.avatar-creation-body {
  flex: 1; overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  padding: 0;
}

/* Colonne gauche — avatar */
.av-left-col {
  display: flex; flex-direction: column;
  align-items: stretch;
  padding: 16px 16px 16px 20px;
  gap: 12px;
  border-right: 1px solid rgba(127,119,221,0.12);
  overflow: hidden;
}

/* Colonne droite — boutique */
.av-right-col {
  display: flex; flex-direction: column;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124,58,237,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(96,165,250,0.07) 0%, transparent 60%),
    linear-gradient(180deg, rgba(15,10,35,0.0) 0%, rgba(10,8,28,0.0) 100%);
  border-left: 1px solid rgba(139,92,246,0.15);
}
.av-right-col .avatar-tabs-bar {
  flex-shrink: 0;
  padding: 16px 20px 0;
  margin-top: 32px; /* aligne avec le label "Nom du personnage" */
}
.avatar-options-scroll {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 20px 12px;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%,   rgba(124,58,237,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 30% at 100% 100%, rgba(96,165,250,0.07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 25% at 0% 60%,   rgba(236,72,153,0.05) 0%, transparent 50%);
}
.avatar-options-scroll::-webkit-scrollbar { width: 3px; }
.avatar-options-scroll::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.5); border-radius: 2px; }

.avatar-preview-zone {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #03040f;
  box-shadow: 0 0 0 1.5px rgba(139,92,246,0.25), inset 0 0 40px rgba(76,29,149,0.15);
  transition: box-shadow 0.6s ease;
}

.av-preview-stars {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
  display: block; border-radius: 20px;
}

/* Bouton Continuer — identique à btn-launch */
#screen-avatar .screen-footer {
  padding: 10px 20px 16px;
  display: flex; justify-content: center;
}
#screen-avatar .btn-primary {
  all: unset;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 48px;
  height: 62px;
  border-radius: 100px;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 30%, #60a5fa 60%, #ec4899 100%);
  background-size: 200% 100%;
  outline: 2px solid rgba(255,255,255,0.15);
  outline-offset: 3px;
  box-shadow:
    0 5px 0 rgba(0,0,0,0.50),
    0 10px 30px rgba(124,58,237,0.65),
    0 0 60px rgba(96,165,250,0.25),
    0 0 100px rgba(236,72,153,0.15),
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem; font-weight: 900; letter-spacing: 0.2em;
  color: #ffffff; text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255,255,255,0.5), 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative; overflow: hidden;
  min-width: 250px;
  z-index: 1;
  animation: decolle-float 3.2s ease-in-out infinite, btn-launch-bg-shift 4s linear infinite;
}
#screen-avatar .btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: gen-shine 2.5s ease-in-out infinite;
}
#screen-avatar .btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 0 rgba(0,0,0,0.42),
    0 16px 36px rgba(96,165,250,0.7),
    0 0 80px rgba(124,58,237,0.4),
    inset 0 1px 0 rgba(255,255,255,0.35);
  animation: none;
  outline-color: rgba(255,255,255,0.3);
}
#screen-avatar .btn-primary:active {
  transform: translateY(4px) scale(0.98);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.50),
    0 4px 14px rgba(124,58,237,0.40),
    inset 0 2px 4px rgba(0,0,0,0.3);
  animation: none;
}

/* Premium white diffuse halo — subtle version for all skins */
.avatar-preview-zone.skin-dark-glow {
  box-shadow:
    0 0 12px 2px  rgba(255,255,255,0.04),
    0 0 30px 6px  rgba(255,255,255,0.03),
    0 0 60px 14px rgba(220,210,255,0.04);
}
.avatar-preview-zone.skin-dark-glow::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 24px;
  background: radial-gradient(
    ellipse 60% 65% at 50% 48%,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.015) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 3;
  animation: dark-glow-breathe 3.5s ease-in-out infinite;
}
@keyframes dark-glow-breathe {
  0%,100% { opacity: 0.7; }
  50%      { opacity: 1;   }
}

/* Subtle dark background for the star zone */
.avatar-glow-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 55%,
    rgba(76,29,149,0.22) 0%, rgba(8,11,24,0.0) 70%);
  pointer-events: none; z-index: 2;
}

/* ── Twinkling keyframe ── */
@keyframes twinkle {
  0%,100% { opacity: var(--op,0.8); transform: scale(1); }
  50%      { opacity: 0.08;         transform: scale(0.6); }
}

/* Small dot stars */
.avatar-star-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none; z-index: 1;
  animation: twinkle var(--tw-dur, 2.5s) ease-in-out infinite;
  animation-delay: var(--tw-delay, 0s);
}

/* Glowing colored stars */
.avatar-star-glow {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--sc, #fff);
  box-shadow: 0 0 4px 2px var(--sc, #fff), 0 0 10px 3px var(--sc, #fff);
  pointer-events: none; z-index: 1;
  animation: twinkle var(--tw-dur, 2s) ease-in-out infinite;
  animation-delay: var(--tw-delay, 0s);
}

/* Cross/spike premium stars */
.avatar-star-cross {
  position: absolute;
  width: 1px; height: 10px;
  background: rgba(255,255,255,0.9);
  pointer-events: none; z-index: 1;
  box-shadow: 0 0 4px 1px rgba(255,255,255,0.6);
  animation: twinkle var(--tw-dur, 2s) ease-in-out infinite;
  animation-delay: var(--tw-delay, 0s);
  transform: translate(-50%, -50%);
}
.avatar-star-cross::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  width: 1px; height: 10px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 4px 1px rgba(255,255,255,0.6);
}

.avatar-preview {
  width: 100%; height: 100%;
  position: relative; z-index: 3;
}
.avatar-preview svg { width: 100%; height: 100%; }
.avatar-preview img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; }

/* Tabs */
.avatar-tabs-bar {
  display: flex; gap: 6px;
  background: var(--bg2);
  border-radius: var(--r-sm);
  padding: 4px;
  flex-shrink: 0;
}
.av-tab {
  flex: 1; padding: 7px 4px;
  border: none; border-radius: 7px;
  background: transparent;
  color: var(--text2); font-size: 0.7rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.03em;
}
.av-tab.active {
  background: var(--purple);
  color: white;
  box-shadow: 0 0 10px rgba(124,58,237,0.5);
}

/* Option panels */
.av-panel { display: none; flex-direction: column; gap: 8px; }
.av-panel.active { display: flex; }

.panel-label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text2); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mt-8 { margin-top: 8px; }

/* Swatches */
.swatches-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.swatch {
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), border-color 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.swatch:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
.swatch:active { transform: scale(0.88); transition: transform 0.07s; }
.swatch.selected {
  border-color: white;
  box-shadow: 0 0 0 3px var(--purple-l), 0 4px 16px rgba(96,165,250,0.45);
  animation: swatch-pop 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes swatch-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.32); }
  75%  { transform: scale(1.12); }
  100% { transform: scale(1.18); }
}

/* Style grids */
.style-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}

/* Blush grid */
.blush-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.hair-divider {
  height: 1px; background: rgba(255,255,255,0.07); margin: 6px 0;
}
.hair-cat-label {
  margin-top: 12px; margin-bottom: 4px;
}.blush-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 4px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(139,92,246,0.20);
  border-radius: 10px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}
.blush-option:hover { border-color: rgba(139,92,246,0.55); background: rgba(124,58,237,0.12); }
.blush-option.selected { border-color: #7c3aed; background: rgba(124,58,237,0.25); box-shadow: 0 0 10px rgba(124,58,237,0.35); }
.blush-thumb {
  width: 40px; height: 40px; object-fit: contain;
}
.blush-none {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text3);
}
.blush-label {
  font-size: 0.5rem; color: var(--text2); text-align: center;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.blush-opacity-row {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.blush-opacity-label {
  font-size: 0.65rem; color: var(--text2); text-transform: uppercase;
  letter-spacing: 0.08em; white-space: nowrap;
}
.blush-opacity-slider {
  flex: 1; accent-color: var(--purple-l); height: 4px; cursor: pointer;
}
.blush-opacity-val {
  font-size: 0.65rem; color: var(--purple-l); font-weight: 700;
  min-width: 32px; text-align: right;
}
.style-option {
  padding: 9px 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  color: var(--text2); font-size: 0.75rem; font-weight: 500;
  cursor: pointer; text-align: center;
  transition: all 0.2s;
}
.style-option:hover { border-color: var(--purple-l); color: var(--text); }
.style-option.selected {
  background: rgba(124,58,237,0.25);
  border-color: var(--purple-l);
  color: white;
  box-shadow: 0 0 8px rgba(124,58,237,0.3);
}

/* Avatar name — top position */
.av-name-top { padding: 0 2px; }
.av-name-input {
  width: 100%; padding: 13px 18px;
  background: var(--bg2);
  border: 1.5px solid var(--card-border);
  border-radius: var(--r);
  color: var(--text);
  font-size: 1rem; font-family: 'Inter', sans-serif; font-weight: 600;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s;
  letter-spacing: 0.02em;
}
.av-name-input:focus {
  outline: none;
  border-color: var(--purple-l);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18), var(--glow-p);
}
.av-name-input::placeholder { color: var(--text3); font-weight: 400; }


/* ════════════════════════════════════════════════════════════
   SCREEN 3 — QUIZ
════════════════════════════════════════════════════════════ */
#screen-quiz { background: var(--bg); }

.quiz-body {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 24px;
}

.quiz-progress-row {
  display: flex; align-items: center; gap: 12px;
}
.quiz-progress-bar {
  flex: 1; height: 4px;
  background: var(--bg2); border-radius: 2px; overflow: hidden;
}
.quiz-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--purple), var(--neon));
  border-radius: 2px;
  transition: width 0.5s ease;
}
.quiz-step-label {
  font-size: 0.75rem; color: var(--text2);
  font-family: 'Orbitron', sans-serif; font-weight: 600;
  min-width: 36px;
}

.quiz-question-area { display: flex; flex-direction: column; gap: 16px; }

.quiz-question-text {
  font-size: 1.1rem; font-weight: 600;
  color: var(--text); line-height: 1.5;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  padding: 14px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  color: var(--text2); font-size: 0.9rem;
  cursor: pointer; text-align: left;
  transition: all 0.2s;
}
.quiz-option:hover {
  border-color: var(--purple-l); color: var(--text);
  background: rgba(124,58,237,0.15);
}
.quiz-option.selected {
  background: rgba(124,58,237,0.3);
  border-color: var(--purple-l); color: white;
  box-shadow: var(--glow-p);
}

/* Quiz multi-select options */
.quiz-option {
  padding: 13px 16px;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--r);
  color: var(--text2); font-size: 0.88rem;
  cursor: pointer; text-align: left;
  transition: all 0.18s;
  display: flex; align-items: center; gap: 12px;
}
.quiz-option::before {
  content: '';
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--card-border);
  flex-shrink: 0; transition: all 0.18s;
  background: transparent;
}
.quiz-option:hover {
  border-color: var(--purple); color: var(--text);
  background: rgba(124,58,237,0.1);
}
.quiz-option:hover::before { border-color: var(--purple); }
.quiz-option.selected {
  background: rgba(124,58,237,0.2);
  border-color: var(--purple-l); color: white;
}
.quiz-option.selected::before {
  background: var(--purple-l); border-color: var(--purple-l);
  content: '✓';
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.75rem; font-weight: 700;
}

.quiz-hint {
  font-size: 0.72rem; color: var(--text3);
  font-style: italic; text-align: center; margin-top: -8px;
}

.quiz-next-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; border-radius: var(--r);
  color: white; font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; cursor: pointer;
  box-shadow: var(--glow-p);
  transition: transform 0.15s, opacity 0.2s;
  align-self: flex-end;
}
.quiz-next-btn:hover { transform: translateY(-2px); }
.quiz-next-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

/* Quiz result */
.quiz-result-area { display: none; flex-direction: column; gap: 20px; }
.quiz-result-area.show { display: flex; }
.hidden { display: none !important; }

/* Dominant profile hero */
.result-profile-hero {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 24px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--r-lg); box-shadow: var(--glow-p);
  text-align: center;
  animation: pop-in 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes pop-in { from{transform:scale(0.8);opacity:0} to{transform:scale(1);opacity:1} }
.result-profile-icon { font-size: 3.2rem; display: grid; place-items: center; }
.result-profile-name {
  font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--purple-l), var(--neon));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.result-profile-desc {
  color: var(--text2); font-size: 0.82rem; line-height: 1.6;
}

/* Persona percentage bars */
.persona-bars-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.65rem; font-weight: 700;
  color: var(--text3); letter-spacing: 0.12em; text-transform: uppercase;
}
.persona-bars { display: flex; flex-direction: column; gap: 10px; }
.persona-bar-row {
  display: flex; align-items: center; gap: 10px;
}
.pbr-icon  { width: 22px; flex-shrink: 0; display: grid; place-items: center; color: var(--purple-l); }
.pbr-icon svg { width: 14px; height: 14px; }
.pbr-name  { font-size: 0.75rem; color: var(--text2); width: 110px; flex-shrink: 0; }
.pbr-track {
  flex: 1; height: 8px; background: var(--bg3);
  border-radius: 4px; overflow: hidden;
}
.pbr-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-l) 100%);
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  width: 0;
}
.pbr-fill.dominant {
  background: linear-gradient(90deg, var(--purple) 0%, var(--neon) 100%);
  box-shadow: 0 0 8px rgba(217,70,239,0.5);
}
.pbr-pct {
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700;
  color: var(--text2); width: 34px; text-align: right; flex-shrink: 0;
}
.pbr-pct.dominant { color: var(--neon); }

/* Old compat */
.result-profile-card {
  padding: 20px 24px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--glow-p);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}


/* ════════════════════════════════════════════════════════════
   SCREEN 1.5 — AUTHENTICATION
════════════════════════════════════════════════════════════ */
#screen-auth {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 55% 40% at 50% 70%, rgba(124,58,237,0.14) 0%, transparent 70%),
    radial-gradient(ellipse 30% 25% at 20% 20%, rgba(6,182,212,0.06) 0%, transparent 55%);
}

.auth-bg-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(124,58,237,0.12) 0%, transparent 60%);
}

.auth-header-logo {
  font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: 700;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--purple-l), var(--neon));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  flex: 1; text-align: center;
}
.header-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* ── Header : juste le bouton retour, hors flux pour ne pas décaler le contenu ─── */
.auth-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px 0; gap: 12px;
  position: absolute; top: 0; left: 0; right: 0; z-index: 60;
  pointer-events: none; /* la barre ne capte pas les clics… */
}
.auth-back {
  position: relative; z-index: 61;
  flex-shrink: 0;
  pointer-events: auto !important;
  /* Zone de clic CIRCULAIRE : la flèche + un rayon autour, tout est cliquable */
  width: 76px !important; height: 76px !important;
  border-radius: 50% !important;
  display: grid; place-items: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  color: #ffffff;
  cursor: pointer !important;
  opacity: 0.95;
  transition: transform 0.18s ease, opacity 0.18s ease, filter 0.18s ease, background 0.18s ease;
  font-size: 0;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,0.35));
}
/* La flèche (SVG) ne capte pas les clics → c'est TOUT le cercle qui clique */
.auth-back svg { width: 36px; height: 36px; pointer-events: none; }
/* Au survol : le cercle s'illumine en violet + la flèche brille */
.auth-back:hover {
  background: radial-gradient(circle at center,
    rgba(139,92,246,0.28) 0%,
    rgba(139,92,246,0.14) 55%,
    transparent 72%) !important;
  border: none !important;
  box-shadow: none !important;
  color: #ffffff;
  opacity: 1;
  transform: scale(1.06);
  filter: drop-shadow(0 0 12px rgba(196,181,253,0.95)) drop-shadow(0 0 22px rgba(139,92,246,0.6));
}
.auth-back:active { transform: scale(0.95); }
.header-spacer { width: 44px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   AUTH — style « carte blanche » (réf. Talya), fond cosmique conservé
═══════════════════════════════════════════════════════════════ */

/* ── Brand MELEAIR : centré AU-DESSUS de la carte blanche ─────── */
.auth-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  margin-bottom: 26px;
}
.auth-brand-logo {
  height: 76px; width: auto; object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(180,120,255,0.6));
  animation: brand-float 4s ease-in-out infinite;
}
@keyframes brand-float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-4px); }
}
.auth-brand-name {
  font-family: 'Aquavit', 'Orbitron', sans-serif;
  font-size: 2.7rem; font-weight: 400;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-shadow: 0 0 22px rgba(180,120,255,0.35);
  line-height: 1;
}

/* ── Body centré ─────────────────────────────────────────────── */
.auth-body {
  flex: 1; overflow-y: auto;
  padding: 24px 24px 56px;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative; z-index: 1;
}
.auth-form-wrap {
  width: 100%;
  max-width: 480px;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 0;
  margin: auto 0;
}

/* ── La carte blanche ────────────────────────────────────────── */
.auth-card {
  width: 100%;
  background: #ffffff;
  border-radius: 28px;
  padding: 38px 40px 42px;
  display: flex; flex-direction: column; gap: 26px;
  box-shadow:
    0 30px 80px -30px rgba(20,10,60,0.55),
    0 10px 28px -14px rgba(20,10,60,0.35);
  animation: slide-up 0.35s ease;
}

/* ── Tabs : segmented control clair ──────────────────────────── */
.auth-tabs {
  display: flex;
  background: #f2eefc;
  border: none;
  border-radius: 14px; padding: 5px; gap: 5px;
  flex-shrink: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: inset 0 0 0 1px rgba(124,58,237,0.06);
}
.auth-tab {
  flex: 1; padding: 12px 10px;
  border: none; border-radius: 10px;
  background: transparent; color: #8b7fb0;
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.01em; text-transform: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth-tab:hover:not(.active) { color: #5b21b6; }
.auth-tab.active {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 8px 18px -8px rgba(124,58,237,0.7);
}

/* ── Forms ──────────────────────────────────────────────────── */
.auth-form {
  display: none; flex-direction: column; gap: 18px;
  animation: slide-up 0.3s ease;
}
.auth-form.active { display: flex; }
@keyframes slide-up { from{transform:translateY(12px);opacity:0} to{transform:translateY(0);opacity:1} }

.auth-form-subtitle {
  font-size: 1.35rem; font-weight: 700;
  color: #1c1233;
  text-align: center;
  padding-bottom: 0;
  font-style: normal;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
/* Sous-titre hiérarchisé (Espace professeur / Connexion) */
.auth-role-title {
  font-size: 1.5rem; font-weight: 800;
  color: #1c1233; letter-spacing: -0.01em; line-height: 1.15;
}
.auth-role-sub {
  position: relative;
  font-size: 0.92rem; font-weight: 500;
  color: #6b6486; letter-spacing: 0.02em; line-height: 1.3;
  display: inline-flex; align-items: center; gap: 0;
}
/* Petit "i" cliquable */
.auth-info-btn {
  display: inline-grid; place-items: center;
  width: 17px; height: 17px; margin-left: 7px; padding: 0;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(124,58,237,0.14); color: #7c3aed;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.auth-info-btn svg { width: 11px; height: 11px; }
.auth-info-btn:hover { background: rgba(124,58,237,0.24); color: #5b21b6; transform: scale(1.08); }
/* Bulle d'info */
.auth-info-pop {
  position: absolute; left: 50%; top: calc(100% + 9px);
  transform: translateX(-50%) translateY(-4px);
  background: #2a1b4d; color: #ffffff;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 8px 13px; border-radius: 10px; white-space: nowrap;
  box-shadow: 0 12px 28px -10px rgba(20,10,60,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 6;
}
.auth-info-pop::before {
  content: ''; position: absolute; left: 50%; top: -4px;
  width: 10px; height: 10px; background: #2a1b4d;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.auth-info-pop.show {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}

/* ── « Se souvenir de moi » ─────────────────────────────────── */
.auth-remember {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  font-family: 'Inter', sans-serif; font-size: 0.9rem; color: #4a4166;
  margin-top: -4px;
}
.auth-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-remember-box {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid #cbbff0; background: #fbfaff;
  display: grid; place-items: center; color: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.auth-remember-box svg { width: 13px; height: 13px; opacity: 0; transition: opacity 0.15s; }
.auth-remember input:checked + .auth-remember-box {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6); border-color: #7c3aed;
}
.auth-remember input:checked + .auth-remember-box svg { opacity: 1; }
.auth-remember input:focus-visible + .auth-remember-box { box-shadow: 0 0 0 4px rgba(124,58,237,0.18); }
.auth-remember:hover .auth-remember-box { border-color: #a78bfa; }
.auth-remember-txt { line-height: 1; }

/* ═══════════════════════════ ESPACE PROFESSEUR ═══════════════════════════ */
#screen-prof { overflow: hidden; }
.prof-wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: 1180px; margin: 0 auto; height: 100%;
  overflow-y: auto;
  padding: 28px clamp(20px,4vw,48px) 64px;
  display: flex; flex-direction: column; gap: 22px;
}
.prof-topbar { display: flex; align-items: center; justify-content: space-between; }
.prof-brand { display: flex; align-items: center; gap: 12px; }
.prof-brand-logo { height: 40px; width: auto; filter: drop-shadow(0 0 12px rgba(180,120,255,.5)); }
.prof-brand-name { font-family: 'Aquavit','Orbitron',sans-serif; font-size: 1.6rem; color: #fff; letter-spacing: .12em; }
.prof-badge {
  font-family: 'Inter',sans-serif; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: #fff;
  background: linear-gradient(135deg,#7c3aed,#a06bf2); padding: 5px 11px; border-radius: 999px;
}
.prof-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pbc {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter',sans-serif; font-size: .92rem; font-weight: 600;
  color: #c4b5fd; padding: 4px 6px; border-radius: 8px; transition: color .15s, background .15s;
}
.pbc:hover { color: #fff; background: rgba(255,255,255,.06); }
.pbc.current { color: #fff; cursor: default; }
.pbc-sep { color: rgba(196,181,253,.5); }
.prof-head h1 { font-family: 'Clash Display','Outfit',sans-serif; font-weight: 800; font-size: clamp(24px,3vw,34px); color: #fff; margin: 0 0 4px; }
.prof-head p { color: #c4b5fd; font-size: .98rem; margin: 0; }

.prof-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 18px; margin-top: 4px; }
.prof-card {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 22px 20px; border-radius: 18px; min-height: 126px;
  background: #ffffff; border: 1.5px solid #e7e1f5;
  box-shadow: 0 16px 34px -18px rgba(55,20,110,.34), 0 5px 12px -6px rgba(55,20,110,.16);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.prof-card:hover { transform: translateY(-4px); border-color: #b794f4; box-shadow: 0 28px 50px -22px rgba(124,58,237,.5); }
.prof-card-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#7c3aed,#a06bf2); }
.prof-card-ic svg { width: 26px; height: 26px; }
.prof-card-name { font-family: 'Inter',sans-serif; font-weight: 700; font-size: 1.05rem; color: #1c1233; }
.prof-card-meta { font-size: .85rem; color: #6b6486; margin-top: auto; }
.prof-card-del { position: absolute; top: 10px; right: 12px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #b9b1cc; font-size: .82rem; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.prof-card:hover .prof-card-del { opacity: 1; }
.prof-card-del:hover { background: rgba(220,38,38,.12); color: #dc2626; }

.prof-card.prof-add {
  border: 1.6px dashed #c9bff0 !important; background: rgba(255,255,255,.04) !important; box-shadow: none !important;
  flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
  color: #c4b5fd;
}
.prof-card.prof-add:hover { border-color: #a78bfa !important; color: #fff; transform: translateY(-2px); }
.prof-add-plus { font-size: 1.4rem; line-height: 1; }
.prof-add span:last-child { font-family: 'Inter',sans-serif; font-weight: 600; font-size: .95rem; }

.prof-card.prof-add-active { background: #fff; align-items: stretch; justify-content: center; gap: 12px; cursor: default; }
.prof-add-input { width: 100%; padding: 11px 13px; border: 1.5px solid #cbbff0; border-radius: 11px; font-size: .95rem; font-family: 'Inter',sans-serif; color: #2a1b4d; outline: none; box-sizing: border-box; }
.prof-add-input:focus { border-color: #7c3aed; box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.prof-add-actions { display: flex; gap: 8px; }
.prof-add-actions button { flex: 1; padding: 9px; border: none; border-radius: 10px; font-family: 'Inter',sans-serif; font-weight: 600; font-size: .88rem; cursor: pointer; }
.paa-ok { background: linear-gradient(135deg,#7c3aed,#8b5cf6); color: #fff; }
.paa-no { background: #f2eefc; color: #6b6486; }

.prof-deposit { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 2px; }
.prof-deposit-tile {
  all: unset; box-sizing: border-box; cursor: pointer; flex: 1 1 220px; min-height: 116px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center;
  padding: 22px; border-radius: 18px; background: #fff; border: 1.5px solid #e7e1f5;
  box-shadow: 0 16px 34px -20px rgba(55,20,110,.3); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.prof-deposit-tile:hover:not(.disabled) { transform: translateY(-4px); border-color: #b794f4; box-shadow: 0 26px 46px -22px rgba(124,58,237,.5); }
.prof-deposit-tile.disabled { opacity: .55; cursor: default; }
.pdt-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#7c3aed,#a06bf2); }
.pdt-ic svg { width: 24px; height: 24px; }
.pdt-title { font-family: 'Inter',sans-serif; font-weight: 700; color: #1c1233; }
.pdt-sub { font-size: .82rem; color: #6b6486; }

.prof-courses { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.prof-empty { color: #c4b5fd; font-size: .95rem; font-style: italic; }
.prof-course-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid #ece7f8; box-shadow: 0 8px 20px -14px rgba(55,20,110,.3); }
.pcr-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #7c3aed; background: rgba(124,58,237,.1); flex-shrink: 0; }
.pcr-ic svg { width: 19px; height: 19px; }
.pcr-name { font-family: 'Inter',sans-serif; font-weight: 600; color: #2a1b4d; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcr-meta { font-size: .82rem; color: #8b7fb0; flex-shrink: 0; }
.pcr-del { background: none; border: none; cursor: pointer; color: #b9b1cc; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.pcr-del:hover { background: rgba(220,38,38,.12); color: #dc2626; }

/* ── Bibliothèque du prof (page principale) ── */
.prof-create-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Inter',sans-serif; font-weight: 700; font-size: .96rem; color: #fff;
  background: linear-gradient(135deg,#7c3aed,#8b5cf6); flex-shrink: 0;
  box-shadow: 0 12px 26px -10px rgba(124,58,237,.7);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.prof-create-btn svg { width: 18px; height: 18px; }
.prof-create-btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 16px 32px -10px rgba(124,58,237,.85); }
.prof-lib-head h1 { font-family: 'Outfit',sans-serif; font-weight: 800; font-size: clamp(26px,3vw,36px); color: #fff; margin: 6px 0 4px; letter-spacing: -.3px; }
.prof-lib-head p { font-family: 'Outfit',sans-serif; color: #9C95C4; font-size: .98rem; margin: 0; }

/* ── Layout dashboard prof : plein écran, sidebar distincte pleine hauteur À GAUCHE ── */
.prof-shell { flex: 1; display: flex; min-height: 0; width: 100%; }

/* Sidebar : CARTE BLANCHE arrondie (même design que l'écran de connexion), à gauche */
.prof-side {
  flex: 0 0 244px; display: flex; flex-direction: column; gap: 22px;
  align-self: stretch; overflow-y: auto; margin: 16px 0 16px 16px; padding: 22px 16px 20px;
  background: #fff; border-radius: 28px; border: none;
  box-shadow: 0 34px 80px -34px rgba(20,8,60,.6);
}
/* Marque MELEAIR retirée ; titre de la sidebar centré en haut */
.prof-side-brand { display: none; }
.prof-side-title {
  text-align: center; font-family: 'Outfit',sans-serif; font-weight: 800; font-size: 1.04rem;
  color: #7c3aed; letter-spacing: -.2px; padding: 6px 6px 16px; margin-bottom: 2px;
  border-bottom: 1px solid #efeaf9;
}
/* Le logo est clair (pensé pour fond sombre) → masqué sur la carte blanche, on garde le mot-symbole foncé. */
.prof-side-brand .prof-brand-logo { display: none; }
.prof-side-brand .prof-brand-name { font-family: 'Aquavit','Orbitron',sans-serif; font-size: 1.4rem; color: #1b1030; letter-spacing: .1em; }
.prof-side-nav { display: flex; flex-direction: column; gap: 3px; }
/* CTA « Créer un cours » : poussé en bas de la sidebar */
.prof-side-create {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px 14px; border: none; border-radius: 13px; cursor: pointer;
  font-family: 'Outfit',sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .2px;
  text-transform: none; white-space: nowrap; color: #fff;
  background: linear-gradient(120deg, #7C5CFF, #EC4FD0);
  box-shadow: 0 12px 28px -14px rgba(124,92,255,.8);
  transition: transform .18s ease, filter .18s ease;
}
.prof-side-create svg { width: 18px; height: 18px; flex: 0 0 auto; }
.prof-side-create:hover { transform: translateY(-1px); filter: brightness(1.06); }
.prof-side-create:active { transform: translateY(0); }

/* Contenu : occupe tout le reste de la largeur, défilement propre */
.prof-content {
  flex: 1; min-width: 0; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 20px;
  /* padding-haut calé pour aligner le titre avec le logo MELEAIR de la sidebar */
  padding: 30px clamp(24px,4vw,52px) 64px;
}
.prof-content .prof-lib-head { margin-top: 2px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.prof-content .prof-lib-head h1 { margin: 0; }
/* Bouton rond « + » (ajouter un cours) dans la page diaporama */
.prof-add-fab {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 18px 36px -12px rgba(124,58,237,.85), 0 0 26px -8px rgba(168,85,247,.6);
  transition: transform .16s ease, filter .16s ease;
}
.prof-add-fab svg { width: 26px; height: 26px; }
.prof-add-fab:hover { transform: translateY(-2px) scale(1.05); filter: brightness(1.06); }
.prof-add-fab:active { transform: scale(.96); }
.prof-content > .prof-topbar { justify-content: flex-end; }

/* Rubriques sur carte blanche : texte foncé, actif = pastille violette pleine (comme le bouton connexion). */
.prof-nav {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 13px; cursor: pointer; border: none; background: transparent;
  font-family: 'Outfit',sans-serif; font-weight: 500; font-size: 14.5px; letter-spacing: .1px;
  text-transform: none; color: #6b6486;
  transition: color .18s ease, background-color .18s ease;
}
.prof-nav svg { width: 19px; height: 19px; flex: 0 0 auto; color: #a99fc4; transition: color .18s ease; }
.prof-nav:hover { color: #1b1030; background: #f4f1fb; }
.prof-nav:hover svg { color: #7c3aed; }
.prof-nav.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 12px 26px -12px rgba(124,58,237,.75);
}
.prof-nav.active svg { color: #fff; }
.prof-main { flex: 1; min-width: 0; }

/* Cartes cours façon « Mes cours » : le mc-play (coin haut-droit) devient la corbeille au survol */
.prof-card { min-height: 168px; }
.prof-card .plc-del {
  top: 16px; right: 18px; width: 34px; height: 34px; font-size: 1rem; opacity: 0;
  background: rgba(15,10,32,.42); color: #fff; border: 1px solid rgba(255,255,255,.32);
  transform: scale(.8); transition: opacity .16s, transform .16s, background .16s;
}
.prof-card:hover .mc-play { opacity: 0; transform: scale(.6); }
.prof-card:hover .plc-del { opacity: 1; transform: scale(1); }
.prof-card .plc-del:hover { background: rgba(220,38,38,.9); border-color: transparent; }
.prof-card .mc-play { transition: opacity .16s, transform .16s; }
.prof-card-dest { font-family: 'Outfit',sans-serif; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); }

/* Barre d'édition PROF sur l'aperçu compagnon : EN HAUT AU MILIEU, compacte, verre sombre.
   (placée au centre du bandeau du haut pour ne rien recouvrir de la barre du bas) */
.cmp-prof-bar {
  position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 9500;
  display: flex; align-items: center; gap: 7px; width: min(560px, calc(100vw - 40px));
  padding: 6px 8px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(28,22,52,.9), rgba(12,9,26,.92));
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 18px 44px -22px rgba(0,0,0,.8);
}
/* Aperçu prof : pas de bouton déconnexion en bas à gauche (rien qui gêne l'aperçu). */
body.cmp-prof-preview .global-logout { display: none !important; }
.cmp-prof-bar[hidden] { display: none; }
.cpb-badge {
  flex: 0 0 auto; font-family: 'Outfit',sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; padding: 5px 9px; border-radius: 999px;
  background: linear-gradient(120deg,#7C5CFF,#EC4FD0);
}
.cpb-count {
  flex: 0 0 auto; font-family: 'Outfit',sans-serif; font-weight: 600; font-size: 11px; white-space: nowrap;
  color: #cdbdff; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
}
.cpb-count.is-full { color: #7ee6b0; border-color: rgba(84,214,160,.4); background: rgba(84,214,160,.12); }
.cpb-input {
  flex: 1; min-width: 0; padding: 8px 11px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #fff;
  font-family: 'Outfit',sans-serif; font-size: 13px;
}
.cpb-input::placeholder { color: rgba(198,190,228,.6); }
.cpb-input:focus { outline: none; border-color: rgba(183,164,255,.6); background: rgba(255,255,255,.09); }
.cpb-apply, .cpb-quit {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: 'Outfit',sans-serif; font-weight: 700; font-size: 12px; border-radius: 10px; padding: 8px 12px;
  transition: transform .16s, filter .16s, background .16s;
}
.cpb-apply svg { width: 15px; height: 15px; }
.cpb-apply { color: #fff; border: none; background: linear-gradient(120deg,#7C5CFF,#EC4FD0); box-shadow: 0 10px 22px -12px rgba(124,92,255,.8); }
.cpb-apply:hover { transform: translateY(-1px); filter: brightness(1.06); }
.cpb-quit { color: #cfc7ea; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); }
.cpb-quit:hover { color: #fff; background: rgba(255,255,255,.12); }
@media (max-width: 640px) { .cpb-badge { display: none; } }

/* ══════════ STUDIO DIAPORAMA — fenêtre carte blanche (style écran connexion) ══════════ */
.pstudio {
  position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(8,5,20,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pstudio.hidden { display: none; }
.pstudio-card {
  position: relative; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 30px; padding: 34px 36px 26px;
  box-shadow: 0 40px 100px -30px rgba(20,8,60,.7);
  font-family: 'Outfit','Inter',sans-serif;
  animation: pstudio-pop .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes pstudio-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.pstudio-close {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: none; cursor: pointer; color: #6b6486;
  background: #f2eefb; transition: background .16s, color .16s, transform .16s;
}
.pstudio-close svg { width: 18px; height: 18px; }
.pstudio-close:hover { background: #e9e2f8; color: #1c1233; transform: rotate(90deg); }

.pstudio-head { text-align: center; margin-bottom: 22px; }
.pstudio-title { font-family: 'Outfit',sans-serif; font-weight: 800; font-size: 1.7rem; color: #1b1030; margin: 0 0 4px; letter-spacing: -.3px; }
.pstudio-sub { color: #7b7397; font-size: .98rem; margin: 0; }

/* Stepper */
.pstudio-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; }
.pstudio-step { display: flex; align-items: center; gap: 9px; }
.ps-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  font-weight: 700; font-size: .92rem; color: #9a92b8; background: #f0ecf9; border: 1px solid #e6e0f4;
  transition: .2s;
}
.ps-lbl { font-size: .82rem; font-weight: 600; color: #9a92b8; white-space: nowrap; transition: .2s; }
.pstudio-step.active .ps-dot { color: #fff; background: linear-gradient(135deg,#7c3aed,#a855f7); border-color: transparent; box-shadow: 0 8px 18px -8px rgba(124,58,237,.8); }
.pstudio-step.active .ps-lbl { color: #4b2b8f; }
.pstudio-step.done .ps-dot { color: #fff; background: #a855f7; border-color: transparent; }
.pstudio-sep { flex: 1 1 auto; height: 2px; border-radius: 2px; background: #ece7f7; min-width: 8px; }
@media (max-width: 560px) { .ps-lbl { display: none; } }

/* Corps + panneaux */
.pstudio-body { min-height: 240px; display: flex; flex-direction: column; }
.pstudio-pane { display: flex; flex-direction: column; flex: 1; }
.pstudio-pane.hidden { display: none; }

/* Étape 1 : zone de dépôt */
.pstudio-drop {
  flex: 1; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; padding: 30px; cursor: pointer; border-radius: 22px;
  background: #faf8ff; border: 2px dashed #d7cdf3; transition: border-color .18s, background .18s, transform .18s;
}
.pstudio-drop:hover, .pstudio-drop.drag { border-color: #a855f7; background: #f4efff; }
.pstudio-drop.filled { border-style: solid; border-color: #22c55e; background: #f2fdf6; }
.psd-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #7c3aed; background: #efe8fd; }
.pstudio-drop.filled .psd-ic { color: #16a34a; background: #dcfce7; }
.psd-ic svg { width: 30px; height: 30px; }
.psd-title { font-weight: 700; font-size: 1.06rem; color: #23163f; }
.psd-hint { font-size: .88rem; color: #8b83a6; }

/* Étape 2 : instructions */
.pstudio-label { font-weight: 700; font-size: .95rem; color: #2a1c47; margin-bottom: 10px; }
.pstudio-textarea {
  flex: 1; min-height: 170px; resize: none; width: 100%; box-sizing: border-box;
  padding: 15px 17px; border-radius: 16px; border: 1.5px solid #e7e1f5; background: #faf8ff;
  font-family: 'Outfit',sans-serif; font-size: 1rem; color: #23163f; line-height: 1.5;
  transition: border-color .16s, box-shadow .16s;
}
.pstudio-textarea:focus { outline: none; border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168,85,247,.14); background: #fff; }
.pstudio-textarea::placeholder { color: #a99fc4; }
.pstudio-note { margin: 12px 2px 0; font-size: .85rem; color: #8b83a6; }
/* Champs matière / titre + bouton publier */
.pstudio-fields { display: flex; gap: 12px; }
@media (max-width: 480px) { .pstudio-fields { flex-direction: column; } }
.pstudio-field { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pstudio-input {
  padding: 12px 14px; border-radius: 13px; border: 1.5px solid #e7e1f5; background: #faf8ff;
  font-family: 'Outfit',sans-serif; font-size: 1rem; color: #23163f;
  transition: border-color .16s, box-shadow .16s;
}
.pstudio-input:focus { outline: none; border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168,85,247,.14); background: #fff; }
.pstudio-input::placeholder { color: #a99fc4; }
.pstudio-textarea { min-height: 120px; }
.pstudio-publish {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Outfit',sans-serif; font-weight: 700; font-size: .95rem; color: #fff;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 14px 30px -12px rgba(22,163,74,.7); transition: transform .16s, filter .16s;
}
.pstudio-publish svg { width: 17px; height: 17px; }
.pstudio-publish:hover { transform: translateY(-2px); filter: brightness(1.05); }
/* Fenêtre « J'enregistre » : boutons empilés pleine largeur */
.csd-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.csd-btn { width: 100%; justify-content: center; padding: 16px 20px; font-size: 1rem; }
.csd-btn svg { width: 18px; height: 18px; }

/* Étape 3 : génération */
.pstudio-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; }
.psl-spin { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #ece7f7; border-top-color: #8b5cf6; animation: psl-spin 0.9s linear infinite; }
@keyframes psl-spin { to { transform: rotate(360deg); } }
.psl-title { font-weight: 700; font-size: 1.1rem; color: #23163f; }
.psl-sub { font-size: .9rem; color: #8b83a6; max-width: 340px; }

/* Étape 4 : aperçu + barre d'édition */
.pstudio-preview { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 18px; }
.pstudio-preview-btn {
  display: inline-flex; align-items: center; gap: 11px; padding: 15px 28px; border: none; border-radius: 16px; cursor: pointer;
  font-family: 'Outfit',sans-serif; font-weight: 700; font-size: 1.02rem; color: #fff;
  background: linear-gradient(135deg,#7c3aed,#a855f7);
  box-shadow: 0 16px 34px -12px rgba(124,58,237,.8), 0 0 26px -8px rgba(168,85,247,.7);
  transition: transform .16s, filter .16s;
}
.pstudio-preview-btn svg { width: 20px; height: 20px; }
.pstudio-preview-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.pstudio-preview-hint { font-size: .88rem; color: #8b83a6; max-width: 360px; margin: 0; }
.pstudio-editbar { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #efeaf9; }
.pstudio-edit-input {
  flex: 1; min-width: 0; padding: 13px 16px; border-radius: 14px; border: 1.5px solid #e7e1f5; background: #faf8ff;
  font-family: 'Outfit',sans-serif; font-size: .96rem; color: #23163f;
}
.pstudio-edit-input:focus { outline: none; border-color: #a855f7; box-shadow: 0 0 0 4px rgba(168,85,247,.14); background: #fff; }
.pstudio-edit-input::placeholder { color: #a99fc4; }
.pstudio-edit-send {
  display: inline-flex; align-items: center; gap: 7px; padding: 12px 18px; border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Outfit',sans-serif; font-weight: 700; font-size: .92rem; color: #fff; flex: 0 0 auto;
  background: linear-gradient(135deg,#7c3aed,#a855f7); box-shadow: 0 12px 26px -12px rgba(124,58,237,.8);
  transition: transform .16s, filter .16s;
}
.pstudio-edit-send svg { width: 16px; height: 16px; }
.pstudio-edit-send:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* Pied : navigation */
.pstudio-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #efeaf9; }
.pstudio-foot-right { display: flex; align-items: center; gap: 10px; }
.pstudio-back, .pstudio-ghost {
  padding: 12px 20px; border-radius: 14px; cursor: pointer; font-family: 'Outfit',sans-serif; font-weight: 600; font-size: .92rem;
  color: #6b6486; background: #f4f1fb; border: 1px solid #e9e3f6; transition: background .16s, color .16s;
}
.pstudio-back:hover, .pstudio-ghost:hover { background: #ece6f8; color: #2a1c47; }
.pstudio-back[disabled] { opacity: .45; cursor: default; }
.pstudio-next {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border: none; border-radius: 14px; cursor: pointer;
  font-family: 'Outfit',sans-serif; font-weight: 700; font-size: .95rem; color: #fff;
  background: linear-gradient(135deg,#7c3aed,#8b5cf6);
  box-shadow: 0 14px 30px -12px rgba(124,58,237,.85); transition: transform .16s, filter .16s;
}
.pstudio-next svg { width: 17px; height: 17px; }
.pstudio-next:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Statistiques : placeholder « à venir » */
.prof-stats { padding: 8px 0; }
.prof-soon {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: 60px 24px; border-radius: 24px;
  background: linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.015));
  border: 1px dashed rgba(183,164,255,.28);
}
.prof-soon-ic {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #C4B5FD;
  background: rgba(124,92,255,.14); border: 1px solid rgba(183,164,255,.3);
}
.prof-soon-ic svg { width: 30px; height: 30px; }
.prof-soon-title { font-family: 'Outfit',sans-serif; font-weight: 700; font-size: 22px; color: #fff; }
.prof-soon-sub { font-family: 'Outfit',sans-serif; color: #9C95C4; font-size: 15px; max-width: 360px; margin: 0; line-height: 1.5; }

/* Sur la page prof : pas de bouton déconnexion en bas à gauche (dispo via le dock en bas à droite) */
body:has(#screen-prof.active) .global-logout { display: none !important; }

/* Sidebar empilée au-dessus du contenu sur petit écran */
@media (max-width: 720px) {
  .prof-shell { flex-direction: column; }
  .prof-side { flex: 0 0 auto; height: auto; width: 100%; border-right: none; border-bottom: 1px solid rgba(167,139,250,.24); box-shadow: none; }
  .prof-side-nav { flex-direction: row; flex-wrap: wrap; }
  .prof-nav { width: auto; flex: 1 1 auto; justify-content: center; }
  .prof-content { height: auto; }
}
.prof-tabs { display: flex; gap: 8px; background: rgba(20,14,44,.5); border: 1px solid rgba(167,139,250,.2); border-radius: 14px; padding: 5px; align-self: flex-start; }
.prof-tab { border: none; background: transparent; cursor: pointer; padding: 9px 20px; border-radius: 10px; font-family: 'Inter',sans-serif; font-weight: 600; font-size: .9rem; color: #c4b5fd; transition: background .18s, color .18s; }
.prof-tab.active { background: linear-gradient(135deg,#7c3aed,#8b5cf6); color: #fff; }
.prof-tab:hover:not(.active) { color: #fff; }
.prof-lib-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 18px; }
.prof-lib-empty { grid-column: 1/-1; color: #c4b5fd; font-size: .96rem; font-style: italic; padding: 24px 4px; }
.prof-lib-card { position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: #fff; border: 1.5px solid #e7e1f5; box-shadow: 0 16px 34px -18px rgba(55,20,110,.34); transition: transform .2s, box-shadow .2s, border-color .2s; }
.prof-lib-card:hover { transform: translateY(-4px); border-color: #b794f4; box-shadow: 0 28px 50px -22px rgba(124,58,237,.5); }
.plc-thumb { width: 100%; height: 92px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#7c3aed,#a06bf2); }
.plc-thumb svg { width: 40px; height: 40px; }
.plc-title { font-family: 'Inter',sans-serif; font-weight: 700; font-size: 1rem; color: #1c1233; line-height: 1.25; }
.plc-dest { font-size: .8rem; color: #6b6486; }
.plc-dest em { color: #a99fc4; font-style: italic; }
.plc-badge { position: absolute; top: 10px; left: 12px; z-index: 2; font-family: 'Inter',sans-serif; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; color: #fff; }
.plc-badge.pub { background: linear-gradient(135deg,#16a34a,#22c55e); }
.plc-badge.draft { background: linear-gradient(135deg,#a16207,#eab308); }
.plc-del { position: absolute; top: 8px; right: 10px; z-index: 2; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.85); color: #b9b1cc; font-size: .8rem; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.prof-lib-card:hover .plc-del { opacity: 1; }
.plc-del:hover { background: rgba(220,38,38,.14); color: #dc2626; }

/* ── Atelier (overlay chat IA + import) ── */
.prof-atelier { position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; padding: 24px; background: rgba(10,7,26,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.prof-atelier.hidden { display: none; }
.pa-panel { width: 100%; max-width: 720px; height: min(88vh,760px); display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(20,10,60,.7); }
.pa-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #eee6f8; }
.pa-title { font-family: 'Clash Display','Outfit',sans-serif; font-weight: 800; font-size: 1.25rem; color: #1c1233; }
.pa-close { border: none; background: #f2eefc; color: #6b6486; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.pa-close svg { width: 16px; height: 16px; }
.pa-close:hover { background: #e7ddfa; color: #2a1b4d; }
.pa-chat { flex: 1; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; background: #faf8ff; }
.pa-source { align-self: center; font-size: .8rem; color: #6b6486; background: #f0eafc; border: 1px solid #e3d9f7; padding: 7px 13px; border-radius: 999px; }
.pa-msg { display: flex; }
.pa-msg.user { justify-content: flex-end; }
.pa-bubble { max-width: 82%; padding: 12px 16px; border-radius: 16px; font-family: 'Inter',sans-serif; font-size: .95rem; line-height: 1.5; }
.pa-msg.assistant .pa-bubble { background: #fff; border: 1px solid #ece7f8; color: #2a1b4d; border-bottom-left-radius: 5px; }
.pa-msg.user .pa-bubble { background: linear-gradient(135deg,#7c3aed,#8b5cf6); color: #fff; border-bottom-right-radius: 5px; }
.pa-bubble strong { font-weight: 700; }
.pa-typing { display: inline-flex; gap: 5px; }
.pa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #b9aee0; animation: pa-blink 1.2s infinite; }
.pa-typing i:nth-child(2) { animation-delay: .2s; } .pa-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes pa-blink { 0%,80%,100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pa-inputbar { display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid #eee6f8; }
.pa-import, .pa-send { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: none; cursor: pointer; display: grid; place-items: center; }
.pa-import { background: #f2eefc; color: #7c3aed; } .pa-import:hover { background: #e7ddfa; }
.pa-import svg, .pa-send svg { width: 20px; height: 20px; }
.pa-send { background: linear-gradient(135deg,#7c3aed,#8b5cf6); color: #fff; } .pa-send:hover { filter: brightness(1.06); }
.pa-input { flex: 1; resize: none; max-height: 120px; padding: 12px 14px; border: 1.5px solid #e7e1f5; border-radius: 12px; font-family: 'Inter',sans-serif; font-size: .95rem; color: #2a1b4d; outline: none; line-height: 1.4; }
.pa-input:focus { border-color: #7c3aed; box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.pa-actions { display: flex; gap: 12px; padding: 0 18px 18px; }
.pa-draft, .pa-publish { flex: 1; padding: 13px; border: none; border-radius: 13px; font-family: 'Inter',sans-serif; font-weight: 700; font-size: .95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pa-draft { background: #f2eefc; color: #6b21a8; } .pa-draft:hover { background: #e7ddfa; }
.pa-publish { background: linear-gradient(135deg,#7c3aed,#8b5cf6); color: #fff; box-shadow: 0 12px 26px -12px rgba(124,58,237,.7); } .pa-publish:hover { filter: brightness(1.06); }

/* ── Publication (choix destination) ── */
.prof-publish { position: fixed; inset: 0; z-index: 9700; display: grid; place-items: center; padding: 24px; background: rgba(10,7,26,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.prof-publish.hidden { display: none; }
.pp-panel { width: 100%; max-width: 560px; max-height: 86vh; overflow: hidden; display: flex; flex-direction: column; background: #fff; border-radius: 24px; box-shadow: 0 40px 90px -30px rgba(20,10,60,.7); }
.pp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #eee6f8; font-family: 'Clash Display','Outfit',sans-serif; font-weight: 800; font-size: 1.15rem; color: #1c1233; }
.pp-close { border: none; background: #f2eefc; color: #6b6486; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.pp-close svg { width: 15px; height: 15px; }
.pp-body { padding: 18px 22px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.pp-step-label { font-family: 'Inter',sans-serif; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8b7fb0; margin-bottom: 9px; }
.pp-choices { display: flex; flex-wrap: wrap; gap: 9px; }
.pp-chip { border: 1.5px solid #e0d8f4; background: #fbfaff; color: #3a2b63; cursor: pointer; padding: 10px 15px; border-radius: 12px; font-family: 'Inter',sans-serif; font-weight: 600; font-size: .9rem; transition: border-color .15s, background .15s, transform .12s; }
.pp-chip:hover { border-color: #a78bfa; transform: translateY(-1px); }
.pp-chip.sel { background: linear-gradient(135deg,#7c3aed,#8b5cf6); border-color: transparent; color: #fff; }
.pp-chip.pp-final:hover { background: linear-gradient(135deg,#16a34a,#22c55e); border-color: transparent; color: #fff; }
.pp-none { color: #a99fc4; font-style: italic; font-size: .88rem; }
.pp-hint { font-size: .85rem; color: #6b6486; }

.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem; font-weight: 500;
  color: #423a5e;
  letter-spacing: 0; text-transform: none;
}
.auth-input-row { display: flex; gap: 0; align-items: stretch; }
#screen-auth .auth-input {
  width: 100%; padding: 14px 16px;
  background: #fbfaff;
  border: 1.5px solid #e7e2f5;
  border-radius: 12px;
  color: #2a1b4d;
  font-size: 0.98rem; font-family: 'Inter', sans-serif; font-weight: 500;
  box-shadow: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
#screen-auth .auth-input:hover { border-color: #cbbff0; }
#screen-auth .auth-input:focus {
  outline: none;
  border-color: #7c3aed;
  background: #ffffff;
  color: #2a1b4d;
  box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
}
#screen-auth .auth-input::placeholder { color: #a9a1c4; font-weight: 400; }
#screen-auth .auth-input-row .auth-input { border-radius: 12px 0 0 12px; border-right: none; }
#screen-auth .auth-eye-btn {
  padding: 0 15px;
  background: #fbfaff;
  border: 1.5px solid #e7e2f5;
  border-left: none;
  border-radius: 0 12px 12px 0;
  color: #7c3aed; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
#screen-auth .auth-eye-btn svg { width: 18px; height: 18px; }
#screen-auth .auth-eye-btn:hover {
  background: #f3ecff;
  color: #5b21b6;
  border-color: #cbbff0;
}

.auth-error {
  font-size: 0.85rem; color: #dc2626;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 10px; padding: 10px 14px;
  text-align: center;
  animation: slide-up 0.2s ease;
}

/* ── Bouton principal : dégradé violet plein largeur (réf.) ───── */
#screen-auth .auth-submit-btn {
  width: auto;
  align-self: center;
  min-width: 0;
  margin-top: 4px;
  padding: 15px 48px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 1.02rem; font-weight: 700;
  letter-spacing: 0.01em; text-transform: none;
  text-shadow: none;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 55%, #9d5cf0 100%);
  box-shadow: 0 14px 30px -12px rgba(124,58,237,0.75), inset 0 1px 0 rgba(255,255,255,0.25);
}
#screen-auth .auth-submit-btn::after {
  inset: -4px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,58,237,0.4), rgba(157,92,240,0.4));
  filter: blur(12px); opacity: 0.4;
}
#screen-auth .auth-submit-btn:hover {
  filter: brightness(1.05);
  box-shadow: 0 18px 38px -12px rgba(124,58,237,0.85), inset 0 1px 0 rgba(255,255,255,0.35);
}
#screen-auth .auth-submit-btn:hover::after { opacity: 0.6; }
#screen-auth .auth-submit-btn .game-btn-ico {
  filter: none;
}

.auth-recover-btn {
  background: none; border: none;
  color: #8b7fb0;
  font-family: 'Calibri', 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.86rem; font-weight: 500;
  letter-spacing: 0.01em; text-transform: none;
  text-decoration: none;
  cursor: pointer;
  text-align: center; padding: 4px 0 0; margin-top: 0;
  transition: color 0.15s;
}
.auth-recover-btn:hover { color: #7c3aed; text-decoration: none; }

/* ── Bouton principal "gaming" — réutilisable partout ───────── */
.game-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px;
  align-self: center;
  padding: 14px 38px;
  min-width: 220px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.92rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.35);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg,
    #5fb3ff 0%,
    #6aa8ff 28%,
    #8b88ff 55%,
    #a87cff 80%,
    #b66cff 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -2px 6px rgba(60,40,140,0.45),
    0 0 0 1.5px rgba(255,255,255,0.22),
    0 6px 22px rgba(106,168,255,0.45),
    0 0 38px rgba(180,120,255,0.35);
  transition: transform 0.18s ease, box-shadow 0.25s ease, filter 0.2s ease;
  overflow: visible;
  isolation: isolate;
}
.game-btn::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 999px;
  background: linear-gradient(135deg,
    rgba(95,179,255,0.45),
    rgba(168,124,255,0.45),
    rgba(182,108,255,0.45));
  filter: blur(14px);
  opacity: 0.55;
  z-index: -1;
  transition: opacity 0.25s;
}
.game-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    inset 0 -2px 6px rgba(60,40,140,0.5),
    0 0 0 1.5px rgba(255,255,255,0.4),
    0 8px 32px rgba(106,168,255,0.6),
    0 0 60px rgba(180,120,255,0.5);
}
.game-btn:hover::after { opacity: 0.85; }
.game-btn:active { transform: translateY(0) scale(0.97); }
.game-btn-ico {
  width: 18px; height: 18px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.7));
  flex-shrink: 0;
}
.auth-submit-btn { margin-top: 6px; }


/* ════════════════════════════════════════════════════════════
   SCREEN 4 — SETUP
════════════════════════════════════════════════════════════ */
#screen-setup { background: var(--bg); }

.setup-body {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 28px;
}

.setup-block { display: flex; flex-direction: column; gap: 12px; }
.setup-block-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
}
.setup-hint { font-size: 0.8rem; color: var(--text2); }

.subject-add-row { display: flex; gap: 8px; }
.setup-text-input {
  flex: 1; padding: 11px 14px;
  background: var(--bg2); border: 1px solid var(--card-border);
  border-radius: var(--r-sm); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}
.setup-text-input:focus { outline: none; border-color: var(--purple-l); }
.setup-text-input::placeholder { color: var(--text3); }

.btn-add {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%); border: none; color: white;
  font-size: 1.4rem; cursor: pointer; flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
  display: grid; place-items: center;
}
.btn-add:hover { background: linear-gradient(135deg, #8b4cf0 0%, #e357f5 60%, #22d3ee 100%); transform: scale(1.05); }
.btn-add:active { transform: scale(0.97); }

.tags-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(124,58,237,0.2);
  border: 1px solid var(--purple);
  border-radius: 20px;
  font-size: 0.8rem; color: var(--purple-l);
  animation: pop-in 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.tag-remove {
  cursor: pointer; color: var(--text3); font-size: 0.75rem;
  transition: color 0.2s;
}
.tag-remove:hover { color: var(--red); }

.life-areas-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.life-area-btn {
  padding: 12px 10px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--r); color: var(--text2);
  font-size: 0.82rem; font-weight: 500;
  cursor: pointer; text-align: center;
  transition: all 0.2s;
}
.life-area-btn:hover { border-color: var(--purple-l); color: var(--text); }
.life-area-btn.active {
  background: rgba(124,58,237,0.25);
  border-color: var(--purple-l); color: white;
  box-shadow: 0 0 10px rgba(124,58,237,0.3);
}


/* ════════════════════════════════════════════════════════════
   SCREEN 5 — QUEST SHOP (background handled by .qs-root below)
════════════════════════════════════════════════════════════ */
#screen-quest-shop {
  display: flex; flex-direction: column;
  overflow: clip;
}


.shop-layout {
  flex: 1; display: flex; overflow: hidden;
}

/* EXPAND BUTTONS */
.shop-expand-btn {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  background: rgba(124,58,237,0.2);
  border: 1.5px solid rgba(96,165,250,0.55);
  color: #c4b5fd; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 0 14px rgba(124,58,237,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.2s;
  animation: expand-btn-pulse 2.5s ease-in-out infinite;
}
@keyframes expand-btn-pulse {
  0%,100% { box-shadow: 0 0 10px rgba(124,58,237,0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
  50%      { box-shadow: 0 0 24px rgba(96,165,250,0.65), inset 0 1px 0 rgba(255,255,255,0.15); }
}
.shop-expand-btn svg { width: 15px; height: 15px; }
.shop-expand-btn:hover {
  background: rgba(124,58,237,0.4); color: #fff;
  border-color: #a78bfa;
  box-shadow: 0 0 30px rgba(96,165,250,0.7);
  transform: scale(1.08);
}
body.light-theme .shop-expand-btn {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.45);
  color: #6d28d9;
  box-shadow: 0 0 12px rgba(124,58,237,0.18);
}
body.light-theme .shop-expand-btn:hover { background: rgba(124,58,237,0.22); color: #4c1d95; }

.shop-right-topbar {
  display: flex; align-items: center;
  padding: 8px 10px 0;
  gap: 6px; flex-shrink: 0;
}
.shop-right-topbar .shop-tabs-bar {
  flex: 1; padding: 0; margin: 0;
}
.shop-expand-right { margin-bottom: 2px; }

/* Panel expanded states */
#shop-layout[data-expanded="left"]  .shop-right { display: none; }
#shop-layout[data-expanded="left"]  .shop-left  { width: 100%; align-items: center; }
#shop-layout[data-expanded="right"] .shop-left  { display: none; }
#shop-layout[data-expanded="right"] .shop-right { flex: 1; }
#shop-layout[data-expanded="right"] .shop-right-topbar { padding-top: 20px; }
#shop-layout[data-expanded="right"] .shop-summary-bar  { padding-top: 14px; padding-bottom: 14px; }

/* GAUCHE — avatar grand + panier (masqué — contenu déplacé dans le popup panier) */
.shop-left { display: none !important; }
.shop-left-_hidden_backup {
  width: 155px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 10px;
  padding: 10px 8px 10px;
  border-right: 1px solid var(--card-border);
  background: var(--bg);
  overflow-y: auto;
}
.shop-avatar-wrap {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.shop-main-avatar {
  width: 145px; height: 260px; flex-shrink: 0;
}
.shop-avatar-xp {
  display: flex; align-items: center; gap: 6px;
  width: 130px;
  margin-top: -8px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 4px 10px;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 2px 10px rgba(0,0,0,0.2);
  position: relative; overflow: hidden;
}
.shop-avatar-xp::after {
  content: ''; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: left-shimmer 2s ease-in-out infinite;
  pointer-events: none;
}
.shop-avatar-xp-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700;
  color: var(--purple-l); white-space: nowrap; flex-shrink: 0;
}
.shop-avatar-xp-bar {
  flex: 1; height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.shop-avatar-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-d), var(--purple-l));
  border-radius: 2px;
  transition: width 0.5s ease;
  position: relative; overflow: hidden;
}
.shop-avatar-xp-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: bar-shimmer 3s ease-in-out infinite;
}

/* DROITE — rayon + contenu scrollable */
.shop-right {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   SHOP — 5-PANEL WORKSPACE
══════════════════════════════════════════════════════════ */
.shop-workspace {
  flex: 1; display: flex; flex-direction: row;
  overflow: hidden; min-height: 0;
}

/* Panel column */
.shop-col {
  display: flex; flex-direction: column;
  overflow: hidden; min-width: 48px;
  background: rgba(0,0,0,0.12);
  border-right: 1px solid rgba(255,255,255,0.04);
  transition: opacity 0.2s;
  position: relative;
}
.shop-col:last-of-type { border-right: none; }

/* Collapsed state */
.shop-col--collapsed .shop-col-body { display: none; }
.shop-col--collapsed .shop-col-label { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 0.12em; }
.shop-col--collapsed .shop-col-dots { display: none; }

/* Dragging */
.shop-col--dragging { opacity: 0.45; }
.shop-col--drop { background: rgba(124,58,237,0.12); outline: 2px solid rgba(139,92,246,0.5); outline-offset: -2px; }

/* Drag handle header */
.shop-col-handle {
  display: flex; align-items: center; justify-content: space-between;
  gap: 5px; padding: 7px 8px 6px;
  cursor: grab; flex-shrink: 0; user-select: none;
  background: linear-gradient(180deg, rgba(15,8,40,0.9) 0%, rgba(8,5,22,0.7) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
}
.shop-col-handle:hover { background: rgba(109,40,217,0.18); }
.shop-col-handle:active { cursor: grabbing; }
.shop-col-icon { color: rgba(167,139,250,0.65); flex-shrink: 0; }
.shop-col-label {
  flex: 1; text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 800;
  letter-spacing: 0.13em; color: rgba(196,181,253,0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-col-dots {
  display: flex; gap: 2px; flex-shrink: 0;
}
.shop-col-dots::before,.shop-col-dots::after {
  content: ''; display: block;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(167,139,250,0.35);
}

/* Vertical color accent per panel */
#shop-col-revision .shop-col-handle   { border-top: 2px solid #8B5CF6; }
#shop-col-mandatory .shop-col-handle  { border-top: 2px solid #22D3EE; }
#shop-col-vitality .shop-col-handle   { border-top: 2px solid #EC4899; }
#shop-col-catchup .shop-col-handle    { border-top: 2px solid #34D399; }
#shop-col-prep .shop-col-handle       { border-top: 2px solid #F59E0B; }

#shop-col-revision .shop-col-label    { color: rgba(167,139,250,0.9); }
#shop-col-mandatory .shop-col-label   { color: rgba(34,211,238,0.9); }
#shop-col-vitality .shop-col-label    { color: rgba(236,72,153,0.9); }
#shop-col-catchup .shop-col-label     { color: rgba(52,211,153,0.9); }
#shop-col-prep .shop-col-label        { color: rgba(245,158,11,0.9); }

/* Panel body */
.shop-col-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 6px 8px 80px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.25) transparent;
  font-size: 0.82em; /* scale down content to fit compact panels */
}
.shop-col-body::-webkit-scrollbar { width: 3px; }
.shop-col-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 2px; }

/* Override quest-shop-body styles inside panels */
.shop-col-body .rayon-title { font-size: 0.82rem; letter-spacing: 0.1em; }
.shop-col-body .rayon-title-row { margin-bottom: 6px; }

/* Per-panel rayon title accent colors */
#shop-col-revision  .rayon-title { color: #a78bfa !important; -webkit-text-fill-color: #a78bfa !important; border-left-color: #8B5CF6; }
#shop-col-mandatory .rayon-title { color: #67e8f9 !important; -webkit-text-fill-color: #67e8f9 !important; border-left-color: #22D3EE; }
#shop-col-vitality  .rayon-title { color: #f9a8d4 !important; -webkit-text-fill-color: #f9a8d4 !important; border-left-color: #EC4899; }
#shop-col-catchup   .rayon-title { color: #6ee7b7 !important; -webkit-text-fill-color: #6ee7b7 !important; border-left-color: #34D399; }
#shop-col-prep      .rayon-title { color: #fcd34d !important; -webkit-text-fill-color: #fcd34d !important; border-left-color: #F59E0B; }

/* Resize bar between panels */
.shop-resize-bar {
  width: 5px; flex-shrink: 0; cursor: col-resize;
  background: transparent;
  border-left: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
  z-index: 5; position: relative;
}
.shop-resize-bar::after {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 3px; height: 32px; border-radius: 2px;
  background: rgba(139,92,246,0.2);
  transition: background 0.15s, height 0.15s;
}
.shop-resize-bar:hover, .shop-resize-bar--active {
  background: rgba(139,92,246,0.12);
}
.shop-resize-bar:hover::after, .shop-resize-bar--active::after {
  background: rgba(139,92,246,0.65);
  height: 48px;
}
.shop-right-footer {
  padding: 10px 16px; flex-shrink: 0;
  border-top: 1px solid var(--card-border);
}
.shop-main-avatar svg { width: 100%; height: 100%; }
.shop-basket-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-bottom: 4px;
  font-style: italic;
}
.shop-basket-btn {
  display: flex; flex-direction: column; gap: 0;
  padding: 0; width: 100%;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(96,165,250,0.35), 0 4px 20px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  cursor: pointer; transition: all 0.2s; overflow: hidden;
  position: relative;
}
.shop-basket-btn::before {
  content: 'PANIER';
  position: absolute; top: 0; left: 0; right: 0;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 900;
  letter-spacing: 0.25em; color: #fff;
  padding-top: 7px;
  opacity: 0.9;
  pointer-events: none;
}
.shop-basket-btn::after {
  content: ''; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: left-shimmer 2s ease-in-out infinite;
  animation-delay: 0.5s;
  pointer-events: none;
}
.shop-basket-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(96,165,250,0.5), 0 6px 28px rgba(124,58,237,0.65), inset 0 1px 0 rgba(255,255,255,0.25);
}
body.light-theme .shop-basket-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%) !important;
  border: none !important;
  box-shadow: 0 0 0 1px rgba(96,165,250,0.35), 0 4px 20px rgba(124,58,237,0.4) !important;
}
body.light-theme .shop-basket-btn:hover { transform: translateY(-1px); }
/* Ligne du haut : icône + count + label */
.sbb-top {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
}
.sbb-svg { width: 18px; height: 18px; color: rgba(255,255,255,0.6); flex-shrink: 0; }
.sbb-count {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 900;
  color: rgba(255,255,255,0.9); line-height: 1;
}
.sbb-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.48rem; font-weight: 600; color: rgba(255,255,255,0.35);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-left: auto;
}
/* Ligne du bas : pièces | énergie */
.sbb-totals {
  display: flex; align-items: center;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sbb-total-coin, .sbb-total-energy {
  flex: 1; text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem; font-weight: 700;
  padding: 5px 4px;
}
.sbb-total-coin { color: #f6c90e; border-right: 1px solid rgba(255,255,255,0.07); font-family: 'Inter', sans-serif; }
.sbb-total-energy { color: rgba(255,255,255,0.55); font-family: 'Inter', sans-serif; }
.sbb-gain-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 10px;
  border-top: 1px solid rgba(74,222,128,0.15);
  background: rgba(74,222,128,0.05);
}
.sbb-gain-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 600;
  color: rgba(74,222,128,0.6); text-transform: uppercase; letter-spacing: 0.08em;
}
.sbb-gain-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 800; color: #4ade80;
}
.sbb-time-row {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.sbb-time-row svg { opacity: 0.9; flex-shrink: 0; stroke: #fff; }
.sbb-time-row span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 800;
  color: #fff; letter-spacing: 0.06em;
}
.sbb-time-row.sbb-time-over span { color: #f87171; }
.sbb-time-row.sbb-time-over svg { stroke: #f87171; opacity: 0.9; }

/* QUEST SHOP BODY — rayon */
.quest-shop-body {
  flex: 1; overflow-y: auto; padding: 10px 12px 80px;
  display: flex; flex-direction: column; gap: 12px;
}

/* Rayon title row with optional info button */
.rayon-title-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: nowrap; margin-bottom: 6px;
}
.rayon-title-row .rayon-title {
  border-bottom: none; padding-bottom: 0; margin-right: 2px;
}
.prep-info-popup { order: 99; } /* toujours sur la ligne suivante */
.rayon-undo-btn { display: none; }
.prep-info-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(96,165,250,0.6);
  padding: 0 2px; line-height: 1; flex-shrink: 0;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.prep-info-btn svg { width: 18px; height: 18px; }
.prep-info-btn:hover, .prep-info-btn.active { color: var(--purple-l); }
.prep-info-popup {
  width: 100%;
  padding: 10px 12px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 8px;
  font-size: 0.72rem; color: rgba(255,255,255,0.65);
  line-height: 1.6; margin-top: 4px;
}
.prep-info-popup.hidden { display: none; }

/* Rayon title */
.rayon-title {
  font-family: 'Syne', 'Orbitron', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; color: rgba(255,255,255,0.7);
  -webkit-text-fill-color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  padding: 0 0 0 8px;
  border-bottom: none;
  border-left: 3px solid #7F77DD;
  text-shadow: none;
}

/* Horizontal shelf row */
.prep-list {
  display: flex; flex-direction: column; gap: 10px;
}
.prep-list .qcard { width: 100%; }
.prep-list .shelf-add-custom-card { width: 100%; margin-top: 4px; }

.rayon-shelf {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--purple) transparent;
}
.rayon-shelf::-webkit-scrollbar { height: 4px; }
.rayon-shelf::-webkit-scrollbar-track { background: transparent; }
.rayon-shelf::-webkit-scrollbar-thumb {
  background: var(--purple); border-radius: 2px;
}

/* Shelf card — vertical item card */
.shelf-card {
  position: relative;
  flex-shrink: 0;
  width: 140px; min-height: 170px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 14px 12px 12px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  transition: all 0.2s;
}
.shelf-card-remove {
  position: absolute; top: 6px; left: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.4);
  color: rgba(248,113,113,0.8);
  font-size: 0.65rem; cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.2s; z-index: 1;
}
.shelf-card-remove:hover {
  background: rgba(239,68,68,0.35);
  border-color: var(--red); color: white;
  transform: scale(1.2);
}
.shelf-card:hover {
  border-color: var(--purple);
  background: rgba(124,58,237,0.1);
  transform: translateY(-2px);
}
.shelf-card.in-basket {
  border-color: var(--neon);
  background: rgba(217,70,239,0.12);
  box-shadow: 0 0 14px rgba(217,70,239,0.2);
}
.shelf-card-icon {
  font-size: 2rem; line-height: 1;
}
.shelf-card-name {
  font-size: 0.74rem; font-weight: 600;
  color: var(--text);
  text-align: center; line-height: 1.3;
  flex: 1;
}
.shelf-card-meta {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  min-height: 28px;
}
.shelf-time { font-size: 0.65rem; color: var(--purple-l); font-weight: 600; }
.shelf-coins { font-size: 0.65rem; color: var(--gold); font-weight: 600; }
.shelf-add-hint { font-size: 0.65rem; color: var(--text3); }

/* Quantity selector — basket stepper */
.qty-selector {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border-radius: 20px;
  padding: 4px 6px;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none; cursor: pointer;
  font-size: 1rem; font-weight: 700; line-height: 1;
  display: grid; place-items: center;
  transition: all 0.15s;
}
.qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.qty-minus {
  background: rgba(124,58,237,0.3); color: var(--purple-l);
}
.qty-minus:not(:disabled):hover { background: rgba(124,58,237,0.6); }
.qty-plus {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%); color: white;
}
.qty-plus:not(:disabled):hover {
  background: linear-gradient(135deg, #8b4cf0 0%, #e357f5 60%, #22d3ee 100%);
  box-shadow: 0 0 8px rgba(217,70,239,0.5), 0 0 6px rgba(6,182,212,0.3);
}
.qty-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  color: var(--text); min-width: 16px; text-align: center;
}

/* Rayon navigation arrows */
.shop-rayon-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
  background: var(--bg);
}
.rayon-nav-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(124,58,237,0.15);
  border: 1.5px solid var(--card-border);
  color: var(--text); font-size: 1.8rem; font-weight: 300; cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.2s;
}
.rayon-nav-btn:not(:disabled):hover {
  background: rgba(124,58,237,0.35); border-color: var(--purple-l);
  color: white; box-shadow: 0 0 14px rgba(124,58,237,0.35);
}
.rayon-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.rayon-nav-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  color: var(--purple-l); letter-spacing: 0.1em;
  text-align: center;
}


/* ════════════════════════════════════════════════════════════
   SCREEN 6 — DAILY PLAN
════════════════════════════════════════════════════════════ */
/* ── Daily Plan: dark mode (default) ───────────────────── */
#screen-daily-plan {
  background:
    /* Nébuleuse supérieure gauche — violet chaud */
    radial-gradient(ellipse 70% 50% at 10% 0%,    rgba(99,60,240,0.20) 0%, transparent 65%),
    /* Coin inférieur droit — cyan froid */
    radial-gradient(ellipse 55% 45% at 90% 100%,  rgba(6,182,212,0.10) 0%, transparent 60%),
    /* Halo central subtil */
    radial-gradient(ellipse 45% 40% at 50% 48%,   rgba(139,92,246,0.07) 0%, transparent 70%),
    /* Accent rose bas gauche */
    radial-gradient(ellipse 35% 30% at 5% 90%,    rgba(236,72,153,0.08) 0%, transparent 60%),
    #07091C;
}
#screen-daily-plan .screen-header {
  background:
    repeating-conic-gradient(rgba(255,255,255,0.025) 0% 25%, transparent 0% 50%)
      0 0 / 28px 28px,
    linear-gradient(to bottom, rgba(6,8,26,0.98), rgba(6,8,26,0.92));
  position: relative;
}
/* Ligne de scan animée sous le header */
#screen-daily-plan .screen-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, #8b5cf6 25%, #06b6d4 50%, #ec4899 75%, transparent 100%);
  background-size: 200% 100%;
  animation: header-line-sweep 3.5s linear infinite;
  opacity: 0.7;
}
@keyframes header-line-sweep {
  from { background-position: 100% 0%; }
  to   { background-position: -100% 0%; }
}
/* Solde pièces dans le header */
.plan-header-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #f6c90e;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.plan-header-coins svg { opacity: 0.75; stroke: #f6c90e; }
.plan-header-coins-lbl { font-size: 13px; opacity: 0.9; }

body:not(.light-theme) #screen-daily-plan .screen-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  background: linear-gradient(135deg, #ffffff 0%, #67e8f9 50%, #a78bfa 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 14px rgba(34,211,238,0.5));
  animation: title-shimmer 4s ease-in-out infinite;
}
@keyframes title-shimmer {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(34,211,238,0.4)); }
  50%       { filter: drop-shadow(0 0 22px rgba(167,139,250,0.7)); }
}
#screen-daily-plan .screen-footer {
  background: none;
  display: flex; align-items: center; justify-content: center;
  padding: 2px 20px 8px;
  position: absolute;
  bottom: 60px;
  left: 0; right: 0;
  z-index: 5;
}

/* Wrapper bouton lancement */
.launch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

/* Label "MISSION PRÊTE" */
.launch-ready-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(34,211,238,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: launch-label-pulse 2s ease-in-out infinite;
}
@keyframes launch-label-pulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
.launch-ready-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: launch-dot-blink 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes launch-dot-blink {
  0%, 100% { transform: scale(1);   opacity: 1; box-shadow: 0 0 8px #22d3ee; }
  50%       { transform: scale(0.7); opacity: 0.4; box-shadow: 0 0 2px #22d3ee; }
}
/* Halos d'énergie derrière le bouton */
#screen-daily-plan .screen-footer::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 340px; height: 80px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.22) 0%, rgba(6,182,212,0.1) 50%, transparent 75%);
  filter: blur(16px);
  animation: launch-halo 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes launch-halo {
  0%, 100% { transform: translate(-50%,-50%) scale(1);   opacity: 0.7; }
  50%       { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
}

/* ── Theme toggle button in plan header ── */
.plan-theme-btn {
  width: 38px; height: 38px;
  border-radius: 13px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  transition: all 0.18s ease;
}
.plan-theme-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.plan-theme-btn svg { stroke: currentColor; }
/* dark mode → show moon, hide sun */
body:not(.light-theme) .plan-theme-moon { display: grid; place-items: center; }
body:not(.light-theme) .plan-theme-sun  { display: none; }
/* light mode → show sun, hide moon */
body.light-theme .plan-theme-sun  { display: grid; place-items: center; }
body.light-theme .plan-theme-moon { display: none; }
/* light mode button style */
body.light-theme .plan-theme-btn {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.25);
  color: #4c1d95;
}
body.light-theme .plan-theme-btn:hover { background: rgba(124,58,237,0.2); }

/* ── Daily Plan: light mode ─────────────────────────────── */
body.light-theme #screen-daily-plan {
  background: linear-gradient(160deg, #ffffff 0%, #f5f3ff 60%, #ede9fe 100%);
}
body.light-theme #screen-daily-plan .screen-title { color: #2e1065 !important; }
body.light-theme #screen-daily-plan .screen-header .btn-back,
body.light-theme #screen-daily-plan .screen-header .btn-menu { color: #2e1065 !important; }
body.light-theme #screen-daily-plan .screen-header {
  background: linear-gradient(to bottom, rgba(255,255,255,0.97), transparent);
}
body.light-theme #screen-daily-plan .screen-footer {
  background: linear-gradient(to top, rgba(237,233,254,0.98) 60%, transparent);
}
body.light-theme #screen-daily-plan .plan-date-label { color: #4c1d95; text-shadow: none; }
body.light-theme #screen-daily-plan .plan-receipt-tag { color: #6d28d9; }
body.light-theme #screen-daily-plan .plan-hint { color: rgba(109,40,217,0.4); }
body.light-theme #screen-daily-plan .plan-header-bar { border-color: rgba(124,58,237,0.18); }
body.light-theme #screen-daily-plan .plan-header-icon { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.22); color: #7c3aed; }
body.light-theme #screen-daily-plan .plan-block {
  background: rgba(255,255,255,0.92) !important;
  border-color: rgba(124,58,237,0.15) !important;
  box-shadow: 0 2px 16px rgba(124,58,237,0.07) !important;
}
body.light-theme #screen-daily-plan .pb-name { color: #1e1b4b !important; }
body.light-theme #screen-daily-plan .pb-meta { color: #4c1d95 !important; }
body.light-theme #screen-daily-plan .pb-num { color: #6d28d9 !important; }
body.light-theme #screen-daily-plan .pb-handle { color: rgba(124,58,237,0.35) !important; }
body.light-theme #screen-daily-plan .pb-time-input {
  color: #1e1b4b !important;
  background: #f5f3ff !important;
  border-color: rgba(124,58,237,0.25) !important;
}
body.light-theme #screen-daily-plan .pb-arrow {
  color: #6d28d9 !important;
  border-color: rgba(124,58,237,0.22) !important;
  background: rgba(255,255,255,0.85) !important;
}
body.light-theme #screen-daily-plan .pb-remove {
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.2);
  color: #dc2626;
}
body.light-theme #screen-daily-plan .history-btn {
  color: #6d28d9;
  border-color: rgba(124,58,237,0.22);
  background: rgba(255,255,255,0.75);
}
body.light-theme #screen-daily-plan .plan-total-stat { color: #1e1b4b !important; }
body.light-theme #screen-daily-plan .plan-total-stat.gold { color: #7c3aed !important; }
body.light-theme #screen-daily-plan .plan-totals-bar {
  background: rgba(255,255,255,0.6);
  border-color: rgba(124,58,237,0.14);
}
body.light-theme #screen-daily-plan .pb-cat-revision  { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.2); color: #7c3aed; }
body.light-theme #screen-daily-plan .pb-cat-mandatory { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.15); color: #6d28d9; }
body.light-theme #screen-daily-plan .pb-cat-vitality  { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.22); color: #7c3aed; }
body.light-theme #screen-daily-plan .pb-cat-catchup   { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.18); color: #4c1d95; }
body.light-theme #screen-daily-plan .pb-cat-prep      { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.15); color: #6d28d9; }
body.light-theme #screen-daily-plan .pb-cat-default   { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.18); color: #6d28d9; }

/* receipt-card kept for legacy reference — replaced by plan-blocks */
.receipt-card {
  width: 100%; max-width: 360px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--glow-p);
  display: flex; flex-direction: column; gap: 12px;
}

.receipt-top { text-align: center; }
.receipt-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  color: var(--purple-l); letter-spacing: 0.1em;
}
.receipt-date { font-size: 0.75rem; color: var(--text2); margin-top: 4px; }

.receipt-dashes {
  text-align: center; color: var(--text3); font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.receipt-items { display: flex; flex-direction: column; gap: 12px; }
.receipt-item {
  display: flex; flex-direction: column; gap: 3px;
  animation: plan-card-in 0.32s ease both;
}
.receipt-item:nth-child(1) { animation-delay: 0ms; }
.receipt-item:nth-child(2) { animation-delay: 50ms; }
.receipt-item:nth-child(3) { animation-delay: 100ms; }
.receipt-item:nth-child(4) { animation-delay: 150ms; }
.receipt-item:nth-child(5) { animation-delay: 200ms; }
.receipt-item:nth-child(6) { animation-delay: 250ms; }
.receipt-item:nth-child(7) { animation-delay: 300ms; }
.ri-num { font-size: 0.65rem; color: var(--purple-l); font-family: 'Orbitron', sans-serif; font-weight: 700; }
.ri-name { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.ri-meta { font-size: 0.72rem; color: var(--text2); display: flex; gap: 10px; }

.receipt-bottom { display: flex; justify-content: space-between; align-items: center; }
.receipt-total { font-size: 0.8rem; color: var(--text2); }
.receipt-coins { font-size: 0.85rem; color: var(--gold); font-weight: 700; }

.btn-launch {
  all: unset;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 48px;
  height: 62px;
  border-radius: 100px;
  cursor: pointer;
  background:
    repeating-conic-gradient(rgba(255,255,255,0.06) 0% 25%, transparent 0% 50%)
      0 0 / 20px 20px,
    linear-gradient(135deg, #7c3aed 0%, #4f46e5 30%, #60a5fa 60%, #ec4899 100%);
  background-size: 20px 20px, 200% 100%;
  outline: 2px solid rgba(255,255,255,0.15);
  outline-offset: 3px;
  box-shadow:
    0 5px 0 rgba(0,0,0,0.50),
    0 10px 30px rgba(124,58,237,0.65),
    0 0 60px rgba(96,165,250,0.25),
    0 0 100px rgba(236,72,153,0.15),
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem; font-weight: 900; letter-spacing: 0.2em;
  color: #ffffff; text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255,255,255,0.5), 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative; overflow: hidden;
  min-width: 250px;
  z-index: 1;
  animation: decolle-float 3.2s ease-in-out infinite, btn-launch-bg-shift 4s linear infinite;
}
@keyframes btn-launch-bg-shift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}
/* Pas de ring orbital — retiré */
.btn-launch::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: gen-shine 2.5s ease-in-out infinite;
}
.btn-launch:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 0 rgba(0,0,0,0.42),
    0 16px 36px rgba(96,165,250,0.7),
    0 0 80px rgba(124,58,237,0.4),
    inset 0 1px 0 rgba(255,255,255,0.35);
  animation: none;
  outline-color: rgba(255,255,255,0.3);
}
.btn-launch:active {
  transform: translateY(4px) scale(0.98);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.50),
    0 4px 14px rgba(124,58,237,0.40),
    inset 0 2px 4px rgba(0,0,0,0.3);
  animation: none;
}
.btn-launch svg { flex-shrink: 0; filter: drop-shadow(0 0 4px rgba(255,255,255,0.6)); }


/* ════════════════════════════════════════════════════════════
   SCREEN 7 — QUEST PATH
════════════════════════════════════════════════════════════ */
/* ── Quest Path: dark/light overrides handled in snake RPG block below ── */
/* ── Quest Path: light mode header ──────────────────────────────── */
body.light-theme #screen-quest-path {
  background: none;
}
body.light-theme .quest-path-header {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid rgba(124,58,237,0.18);
}
body.light-theme .qp-player-name { color: #2e1065; }
body.light-theme .quest-path-subtitle { color: #4c1d95; text-shadow: none; }
body.light-theme .qp-header-title { color: #2e1065 !important; -webkit-text-fill-color: #2e1065 !important; }
body.light-theme .btn-exit-game { color: #2e1065 !important; }
body.light-theme #screen-quest-path .btn-menu { color: #2e1065 !important; background: rgba(124,58,237,0.07) !important; border-color: rgba(124,58,237,0.2) !important; }
body.light-theme .path-node {
  background: rgba(255,255,255,0.9);
  border-color: rgba(124,58,237,0.18);
  box-shadow: 0 2px 16px rgba(124,58,237,0.07);
}
body.light-theme .path-node::before {
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.15), transparent);
}
body.light-theme .path-node.current {
  background: linear-gradient(135deg, rgba(124,58,237,0.1) 0%, rgba(217,70,239,0.05) 100%);
  border-color: rgba(124,58,237,0.42);
}
body.light-theme .path-node.completed {
  background: linear-gradient(135deg, rgba(16,185,129,0.07) 0%, rgba(6,182,212,0.03) 100%);
  border-color: rgba(16,185,129,0.22);
}
body.light-theme .path-node.locked { background: rgba(255,255,255,0.65); border-color: rgba(124,58,237,0.1); }
body.light-theme .path-node-title { color: #1e1b4b; }
body.light-theme .path-node-meta  { color: #4c1d95; }
body.light-theme .path-node-start { color: #6d28d9; }
body.light-theme .pni-cat-revision  { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.22); color: #7c3aed; }
body.light-theme .pni-cat-mandatory { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.22); color: #3b82f6; }
body.light-theme .pni-cat-vitality  { background: rgba(236,72,153,0.1); border-color: rgba(236,72,153,0.22); color: #ec4899; }
body.light-theme .pni-cat-catchup   { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.22); color: #d97706; }
body.light-theme .pni-cat-prep      { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.22); color: #059669; }
body.light-theme .pni-cat-default   { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.18); color: #7c3aed; }
body.light-theme .pni-treasure      { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); color: #d97706; }
body.light-theme .pns-current  { background: rgba(124,58,237,0.12); color: #7c3aed; }
body.light-theme .pns-done     { background: rgba(16,185,129,0.12); color: #059669; }
body.light-theme .pns-skipped  { background: rgba(245,158,11,0.12); color: #d97706; }
body.light-theme .pns-locked   { background: rgba(124,58,237,0.06); color: rgba(124,58,237,0.3); }
body.light-theme .pns-treasure-done { background: rgba(245,158,11,0.12); color: #d97706; }

/* quest-path-screen-title-wrap removed — title is now in the header bar */

.quest-path-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; flex-shrink: 0;
  background: rgba(7,9,26,0.92);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
}
.qp-header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0; padding: 0;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(139,92,246,0.5), 0 0 36px rgba(139,92,246,0.2);
}
.qp-header-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f6c90e;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.qp-header-coins-lbl { font-size: 14px; opacity: 0.9; }
.qp-avatar-mini { display: none; }

.qp-energy-hud {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 20px;
  background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.25);
}
.qp-energy-pct { font-size: 0.78rem; font-weight: 700; color: #4ade80; }
.qp-stats { display: flex; align-items: center; gap: 14px; }
.qp-stat { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: #ffffff; font-weight: 700; }
.qp-life-wrap { display: flex; align-items: center; gap: 6px; }
.qp-life-bar { width: 60px; height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.qp-life-fill { height: 100%; background: linear-gradient(90deg, #ef4444, #f97316); border-radius: 3px; transition: width 0.6s ease; }

/* ════════════════════════════════════════════════════════════
   QUEST PATH — Snake RPG map
════════════════════════════════════════════════════════════ */
#screen-quest-path {
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%,    rgba(99,60,240,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 90% 100%,  rgba(6,182,212,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 50% 50%,   rgba(139,92,246,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 35% 30% at 5% 90%,    rgba(236,72,153,0.07) 0%, transparent 60%),
    #07091C;
}

#screen-quest-path::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(7,9,28,0.85));
  pointer-events: none;
  z-index: 50;
}

.quest-path-map {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Écrans immersifs plein écran : ne PAS réserver l'espace sidebar
   (sinon le contenu est tassé à gauche + vide à droite quand on réduit). */
#screen-quest-path,
#screen-quest-companion,
#screen-combat {
  right: 0 !important;
  left: 0 !important;
}

/* ── Background decoration ── */
.qpmap-bg {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}

/* Atmospheric glow orbs */
.qpmap-orb {
  position: absolute; border-radius: 50%;
  filter: blur(40px); pointer-events: none;
}
.qpmap-orb1 { width:160px;height:160px;background:#5b21b6;opacity:.18;top:8%;left:5%; animation:orb-drift 9s ease-in-out infinite; }
.qpmap-orb2 { width:100px;height:100px;background:#7e22ce;opacity:.14;top:45%;right:4%;animation:orb-drift 13s ease-in-out infinite reverse; }
.qpmap-orb3 { width:80px; height:80px; background:#d946ef;opacity:.12;top:3%; left:55%;animation:orb-drift 7s  ease-in-out infinite 1s; }
@keyframes orb-drift {
  0%,100% { transform:translate(0,0); }
  33%      { transform:translate(18px,-22px); }
  66%      { transform:translate(-12px,14px); }
}

/* Bottom ground fog */
.qpmap-fog {
  position:absolute; bottom:0; left:0; right:0; height:22%;
  background:linear-gradient(to top, rgba(3,2,15,.7), transparent);
  pointer-events:none;
}

/* Torches */
.qpmap-torch { position:absolute; top:38%; display:flex; flex-direction:column; align-items:center; }
.qpmap-tl { left:6px; }
.qpmap-tr { right:6px; }
.qpmap-stick {
  display:block; width:5px; height:22px;
  background:linear-gradient(to top,#78350f,#92400e);
  border-radius:2px;
}
.qpmap-flame {
  display:block; width:10px; height:16px; margin-top:-4px;
  background:radial-gradient(ellipse at bottom, #fef08a 0%, #f59e0b 35%, #ef4444 75%, transparent 100%);
  border-radius:50% 50% 20% 20%;
  animation:flame 0.28s ease-in-out infinite alternate;
  filter:blur(0.5px);
}
@keyframes flame {
  from { transform:scaleX(1)   scaleY(1);   opacity:.9; }
  to   { transform:scaleX(.82) scaleY(1.12);opacity:1;  }
}

/* Floating rune symbols */
.qpmap-rune {
  position:absolute; font-size:1.1rem;
  color:#a78bfa; opacity:.06;
  animation:rune-pulse 4s ease-in-out infinite;
  pointer-events:none;
}
@keyframes rune-pulse { 0%,100%{opacity:.06} 50%{opacity:.16} }

/* Stars */
.qpmap-stars { position:absolute; inset:0; pointer-events:none; }
.qpmap-star {
  position:absolute; border-radius:50%;
  background:#fff;
  animation:star-twinkle ease-in-out infinite;
}
@keyframes star-twinkle {
  0%,100%{opacity:0}  40%,60%{opacity:.9}
}

/* ── SVG connector ── */
.qpmap-svg {
  position:absolute; inset:0;
  width:100%; height:100%;
  pointer-events:none; overflow:visible;
}
.qpmap-path-bg {
  fill:none; stroke:rgba(255,255,255,.07);
  stroke-width:3; stroke-linecap:round; stroke-linejoin:round;
}
.qpmap-path-done {
  fill:none; stroke:url(#qp-gold);
  stroke-width:3; stroke-linecap:round;
  filter:drop-shadow(0 0 4px rgba(251,191,36,.6));
}
.qpmap-path-active {
  fill:none; stroke:rgba(96,165,250,.65);
  stroke-width:2.5; stroke-linecap:round;
  stroke-dasharray:4 3.5;
  animation:dash-run .7s linear infinite;
}
@keyframes dash-run { to { stroke-dashoffset:-7.5; } }

/* ── Node container ── */
.qpmap-nodes { position:absolute; inset:0; pointer-events:none; }

/* ── Base node (all) ── */
.qpmap-node {
  position:absolute;
  transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center; gap:4px;
  pointer-events:all;
  animation:qp-popin .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes qp-popin {
  from { opacity:0; transform:translate(-50%,-50%) scale(.6); }
  to   { opacity:1; transform:translate(-50%,-50%) scale(1);  }
}

/* Start orb */
.qpmap-start-orb {
  width:38px; height:38px; border-radius:50%;
  background:radial-gradient(circle, rgba(139,92,246,.35) 0%, rgba(76,29,149,.15) 100%);
  border:1.5px solid rgba(139,92,246,.5);
  display:grid; place-items:center; color:#a78bfa;
}
.qpmap-start-orb svg { width:17px; height:17px; }

/* Shared label under start / treasure */
.qpmap-lbl {
  font-family:'Orbitron',sans-serif; font-size:.5rem; font-weight:700;
  letter-spacing:.1em; text-transform:uppercase;
  color:rgba(255,255,255,.3); pointer-events:none;
}
.qpmap-lbl.gold { color:#fbbf24; text-shadow:0 0 8px rgba(251,191,36,.7); }
.qpmap-lbl.lit  { color:rgba(255,255,255,.85); text-shadow:0 1px 8px rgba(0,0,0,.7); }
.qpmap-lbl.dim  { color:rgba(255,255,255,.15); }

/* ── Treasure node ── */
.qpn-treasure-wrap { display:flex; flex-direction:column; align-items:center; gap:5px; }
.qpn-gem {
  width:60px; height:60px;
  clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display:grid; place-items:center; transition:filter .4s;
}
.qpn-gem.stage-0 { background:rgba(15,12,35,.9); filter:grayscale(1); }
.qpn-gem.stage-1 { background:linear-gradient(145deg,#92400e,#b45309,#78350f); filter:drop-shadow(0 0 6px rgba(180,83,9,.5)); }
.qpn-gem.stage-2 { background:linear-gradient(145deg,#6b7280,#9ca3af,#d1d5db); filter:drop-shadow(0 0 8px rgba(156,163,175,.6)); }
.qpn-gem.stage-3 { background:linear-gradient(145deg,#fde68a,#f59e0b,#d97706); animation:gem-glow 1.8s ease-in-out infinite; }
.qpn-gem.stage-4 { background:linear-gradient(145deg,#fef08a,#f59e0b,#d97706); animation:gem-pulse .9s ease-in-out infinite; cursor:pointer; }
@keyframes gem-glow {
  0%,100%{ filter:drop-shadow(0 0 10px rgba(251,191,36,.7)) }
  50%    { filter:drop-shadow(0 0 24px rgba(251,191,36,1)) }
}
@keyframes gem-pulse {
  0%,100%{ transform:scale(1);   filter:drop-shadow(0 0 14px rgba(251,191,36,.9)) }
  50%    { transform:scale(1.07);filter:drop-shadow(0 0 30px rgba(251,191,36,1)) }
}

/* ── Circular quest nodes ── */
.qpn-node {
  position:absolute; transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center; gap:6px;
  pointer-events:all;
  animation:qp-popin .4s cubic-bezier(.34,1.56,.64,1) both;
}
.qpn-circle {
  border-radius:50%; display:grid; place-items:center;
  position:relative; flex-shrink:0;
}
/* Done: 56px gold border */
.qpn-done .qpn-circle {
  width:56px; height:56px;
  border:2.5px solid #fbbf24;
  box-shadow:0 0 12px rgba(251,191,36,.45);
}
/* Active: 72px golden pulsing */
.qpn-active .qpn-circle {
  width:72px; height:72px;
  border:3px solid #fbbf24;
  box-shadow:0 0 20px rgba(251,191,36,.6),0 0 40px rgba(251,191,36,.2);
  cursor:pointer;
  animation:active-node-pulse 1.8s ease-in-out infinite;
}
@keyframes active-node-pulse {
  0%,100%{ box-shadow:0 0 18px rgba(251,191,36,.55),0 0 36px rgba(251,191,36,.2); transform:scale(1); }
  50%    { box-shadow:0 0 30px rgba(251,191,36,.85),0 0 60px rgba(251,191,36,.4); transform:scale(1.04); }
}
/* Future: 50px dimmed dashed */
.qpn-future .qpn-circle {
  width:50px; height:50px;
  border:2px dashed rgba(255,255,255,.2);
  opacity:.5; filter:grayscale(.4);
}

/* Gold checkmark overlay on done node */
.qpn-check {
  position:absolute; inset:0; border-radius:50%;
  display:grid; place-items:center;
  background:rgba(251,191,36,.12);
}
.qpn-check svg { width:22px; height:22px; }

/* LANCER badge on active node */
.qpn-cta {
  display:inline-flex; align-items:center; gap:3px;
  padding:3px 10px; border-radius:12px;
  background:linear-gradient(90deg,#f59e0b,#fbbf24);
  font-family:'Orbitron',sans-serif; font-size:.44rem; font-weight:800;
  letter-spacing:.1em; color:#1c1206;
  box-shadow:0 2px 8px rgba(251,191,36,.4);
  animation:cta-glow 1.5s ease-in-out infinite;
}
@keyframes cta-glow {
  0%,100%{ box-shadow:0 2px 8px rgba(251,191,36,.4) }
  50%    { box-shadow:0 2px 16px rgba(251,191,36,.8) }
}

/* Quest name label */
.qpn-name {
  font-family:'Inter',sans-serif; font-size:.58rem; font-weight:600;
  text-align:center; line-height:1.3; max-width:82px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.qpn-active .qpn-name  { color:rgba(255,255,255,.98); }
.qpn-done .qpn-name    { color:rgba(255,255,255,.75); font-size:.53rem; }
.qpn-future .qpn-name  { color:rgba(255,255,255,.55); font-size:.53rem; }

/* Avatar above active node */
.qpn-avatar { width:46px; height:58px; filter:drop-shadow(0 0 8px rgba(96,165,250,.55)); }
.qpn-avatar svg { width:100%; height:100%; }

/* ── Light mode overrides ── */
body.light-theme #screen-quest-path { background:linear-gradient(160deg,#f5f3ff 0%,#ede9fe 60%,#ddd6fe 100%); }
body.light-theme .qpmap-path-bg { stroke:rgba(109,40,217,.15); }
body.light-theme .qpn-future .qpn-circle { border-color:rgba(109,40,217,.25); }
body.light-theme .qpn-name { color:#1e1b4b; }
body.light-theme .qpn-done .qpn-name { color:rgba(109,40,217,.45); }
body.light-theme .qpn-future .qpn-name { color:rgba(109,40,217,.25); }
body.light-theme .qpn-done .qpn-circle { border-color:#d97706; }
body.light-theme .qpmap-lbl { color:rgba(109,40,217,.5); }
body.light-theme .qpmap-start-orb { border-color:rgba(109,40,217,.5); background:rgba(109,40,217,.1); color:#6d28d9; }
body.light-theme .qpmap-fog { background:linear-gradient(to top,rgba(237,233,254,.8),transparent); }
body.light-theme .qpmap-orb1,.light-theme .qpmap-orb2,.light-theme .qpmap-orb3 { opacity:.08; }


/* ════════════════════════════════════════════════════════════
   SCREEN 8 — QUEST ACTIVE (Journey Map)
════════════════════════════════════════════════════════════ */
.qa-journey-screen {
  background: linear-gradient(180deg, #04031a 0%, #07091a 50%, #0c0f2e 100%);
  display: flex; flex-direction: column; overflow: hidden;
}

/* ── Header ── */
.qa-journey-header {
  padding: 22px 24px 10px;
  text-align: center; flex-shrink: 0;
}
.qa-jh-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.qa-jh-coins {
  display: flex; align-items: center; gap: 5px;
  font-family: 'Orbitron', sans-serif; font-size: 0.78rem; font-weight: 700;
  color: var(--gold);
}
.qa-journey-timer {
  font-family: 'Orbitron', sans-serif; font-size: 3.8rem; font-weight: 900;
  letter-spacing: 0.03em; color: #ffffff; line-height: 1;
  text-shadow: 0 0 30px rgba(96,165,250,0.55), 0 0 60px rgba(96,165,250,0.25);
  transition: color 0.4s, text-shadow 0.4s;
}
.qa-journey-timer.urgent {
  color: #f87171;
  text-shadow: 0 0 30px rgba(248,113,113,0.75), 0 0 60px rgba(239,68,68,0.35);
  animation: timer-blink 0.8s ease-in-out infinite;
}
@keyframes timer-blink {
  0%,100% { opacity: 1; } 50% { opacity: 0.65; }
}
.qa-journey-quest-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); margin-top: 8px;
}
/* Badge */
.qa-badge {
  display: inline-block; padding: 4px 13px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 20px; font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem; font-weight: 800; color: #ffffff;
  letter-spacing: 0.14em; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
body.light-theme .qa-badge { background: rgba(124,58,237,0.12); border-color: rgba(124,58,237,0.3); color: #5b21b6; }

/* ── Journey map ── */
.qa-journey-map {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative; overflow: hidden; min-height: 0;
  padding: 4px 0;
}

/* Goal (top) */
.qa-goal-node {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex-shrink: 0; padding-top: 6px; z-index: 2;
}
.qa-goal-circle {
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(239,159,39,0.10);
  border: 1.5px solid rgba(239,159,39,0.45);
  box-shadow:
    0 0 0 6px rgba(239,159,39,0.08),
    0 0 22px rgba(239,159,39,0.50),
    inset 0 1px 0 rgba(255,255,255,0.12);
  display: grid; place-items: center;
  font-size: 28px; color: #EF9F27;
  text-shadow: 0 0 12px rgba(239,159,39,1), 0 0 30px rgba(239,159,39,0.7);
  animation: qp2-anchor-pulse 3.2s ease-in-out infinite;
}
.qa-goal-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.45rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(245,158,11,0.85); text-transform: uppercase;
}

/* Vertical track */
.qa-track-wrap {
  flex: 1; width: 80px; position: relative; min-height: 0;
}
/* Stars layer */
.qa-track-stars {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 120% 40% at 50% 20%, rgba(99,60,240,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 100% 30% at 50% 75%, rgba(6,182,212,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 80% 25% at 50% 50%, rgba(236,72,153,0.05) 0%, transparent 70%);
  box-shadow:
    /* tiny white stars via box-shadow */
    12px 15% 0 0.5px rgba(255,255,255,0.35),
    -8px 28% 0 0.5px rgba(255,255,255,0.22),
    5px 42% 0 0.5px rgba(255,255,255,0.30),
    -12px 58% 0 0.5px rgba(255,255,255,0.18),
    9px 70% 0 0.5px rgba(255,255,255,0.28),
    -5px 85% 0 0.5px rgba(255,255,255,0.20),
    14px 92% 0 1px rgba(139,92,246,0.55),
    -10px 8% 0 1px rgba(6,182,212,0.45),
    7px 63% 0 1px rgba(236,72,153,0.40);
}

/* Holographic path */
.qa-track-bg {
  position: absolute; inset: 0;
  width: 4px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(to top, #10B981 0%, #8B5CF6 35%, #EC4899 62%, #06B6D4 82%, #F59E0B 100%);
  border-radius: 2px;
  opacity: 0.55;
  box-shadow: 0 0 12px rgba(139,92,246,0.5), 0 0 24px rgba(236,72,153,0.2);
  z-index: 1;
}
/* Holo glow blur duplicate */
.qa-track-bg::before {
  content: '';
  position: absolute; inset: 0; left: -5px; right: -5px;
  background: inherit;
  filter: blur(6px);
  opacity: 0.6;
  border-radius: 6px;
}
/* Traveling white ray */
.qa-track-bg::after {
  content: '';
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 3px; height: 18px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  filter: blur(2px);
  animation: qa-ray-travel 4s linear infinite;
}
@keyframes qa-ray-travel {
  from { bottom: -10px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { bottom: calc(100% + 10px); opacity: 0; }
}

/* Gold fill — grows from bottom (holo done) */
.qa-track-gold {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 4px; height: 0%;
  background: linear-gradient(to top, #EF9F27 0%, #fff7c0 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(245,158,11,0.7), 0 0 22px rgba(245,158,11,0.3);
  transition: height 0.85s ease;
  z-index: 2;
}

/* Milestones — multicolor holo stars */
.qa-milestone {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%; z-index: 2;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.25);
  display: grid; place-items: center;
  font-size: 11px; line-height: 1;
  color: rgba(255,255,255,0.5);
  transition: all 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
.qa-milestone::after { content: '✦'; }
.qa-milestone[data-pct="25"] { bottom: 25%; border-color: rgba(236,72,153,0.5); color: #EC4899; box-shadow: 0 0 8px rgba(236,72,153,0.35); }
.qa-milestone[data-pct="50"] { bottom: 50%; border-color: rgba(139,92,246,0.5); color: #8B5CF6; box-shadow: 0 0 8px rgba(139,92,246,0.35); }
.qa-milestone[data-pct="75"] { bottom: 75%; border-color: rgba(6,182,212,0.5);  color: #06B6D4; box-shadow: 0 0 8px rgba(6,182,212,0.35); }
.qa-milestone.hit {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.8);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.12), 0 0 20px rgba(255,255,255,0.5);
  transform: translateX(-50%) scale(1.3);
}
.qa-milestone-msg {
  position: absolute; left: 30px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 700; color: #fbbf24;
  text-shadow: 0 0 10px rgba(245,158,11,0.9);
  animation: ms-msg 2.8s ease forwards; pointer-events: none;
}
@keyframes ms-msg {
  0%   { opacity: 0; transform: translateY(-50%) translateX(-4px); }
  12%  { opacity: 1; transform: translateY(-50%) translateX(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-50%) translateX(8px); }
}

/* Avatar on path */
.qa-journey-avatar {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 50px; height: 62px; bottom: -34px; z-index: 3;
  transition: bottom 0.85s ease;
  animation: walk-bob 0.55s ease-in-out infinite;
}
.qa-journey-avatar svg { width: 100%; height: 100%; }
.qa-journey-avatar.arrived {
  animation: arrive-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes walk-bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-4px); }
}
@keyframes arrive-pop {
  0%   { transform: translateX(-50%) scale(1); }
  50%  { transform: translateX(-50%) scale(1.35); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Start (bottom) */
.qa-start-node {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex-shrink: 0; padding-bottom: 6px; z-index: 2;
}
.qa-start-circle {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.28);
  box-shadow:
    0 0 0 6px rgba(255,255,255,0.06),
    0 0 16px rgba(255,255,255,0.20),
    inset 0 1px 0 rgba(255,255,255,0.18);
  display: grid; place-items: center;
  font-size: 22px; color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.9), 0 0 24px rgba(255,255,255,0.5);
  animation: qp2-anchor-pulse 3.2s ease-in-out infinite;
}
.qa-start-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.44rem; font-weight: 700;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.38); text-transform: uppercase;
}

/* Tip — hidden */
.qa-journey-tip { display: none; }

/* Controls */
.qa-journey-controls {
  padding: 10px 20px 22px;
  display: flex; flex-direction: column; gap: 9px; flex-shrink: 0;
}
.qa-btn-start {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none;
  border-radius: 50px;
  font-family: 'Orbitron', sans-serif; font-size: 0.78rem; font-weight: 800;
  letter-spacing: 0.12em; color: white; cursor: pointer;
  box-shadow:
    0 4px 24px rgba(217,70,239,0.4),
    0 0 14px rgba(6,182,212,0.2),
    0 1px 0 rgba(255,255,255,0.18) inset;
  transition: all 0.2s;
}
.qa-btn-start:hover { box-shadow: 0 6px 32px rgba(217,70,239,0.6), 0 0 20px rgba(6,182,212,0.3), 0 1px 0 rgba(255,255,255,0.22) inset; }
.qa-btn-start.running {
  background: rgba(30,27,75,0.7);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.08) inset;
}
.qa-btn-start:active { transform: translateY(1px); }
.qa-btn-done {
  width: 100%; padding: 16px;
  background: rgba(16,185,129,0.12);
  border: 1.5px solid rgba(52,211,153,0.40);
  border-radius: 50px; color: #34d399;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.10em;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.15), 0 4px 22px rgba(16,185,129,0.18);
}
.qa-btn-done:hover { background: rgba(16,185,129,0.22); box-shadow: 0 4px 30px rgba(16,185,129,0.35); }

/* ════════════════════════════════════════════════════════════
   SCREEN 9 — QUEST COMPLETE
════════════════════════════════════════════════════════════ */
#screen-quest-complete {
  background: radial-gradient(ellipse 70% 50% at 50% 40%, rgba(124,58,237,0.25) 0%, var(--bg) 70%);
}

/* ══ QUEST COMPLETE — full redesign ══════════════════════════════ */
#screen-quest-complete {
  background: #06040F;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

/* Star canvas covers full screen */
.qc-star-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* Nebula background */
.qc-bg { position: absolute; inset: 0; pointer-events: none; }
.qc-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.qc-nebula-1 {
  width: 420px; height: 420px;
  top: -80px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
}
.qc-nebula-2 {
  width: 300px; height: 300px;
  bottom: 60px; left: -60px;
  background: radial-gradient(circle, rgba(6,182,212,0.10) 0%, transparent 70%);
}
.qc-nebula-3 {
  width: 280px; height: 280px;
  bottom: 80px; right: -40px;
  background: radial-gradient(circle, rgba(236,72,153,0.09) 0%, transparent 70%);
}

/* ── Modal: single centered block ── */
.qc-modal {
  position: relative;
  z-index: 10;
  width: min(660px, 88vw);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.qc-modal .qc-orb        { margin-bottom: 14px; }
.qc-modal .qc-title      { margin-bottom: 20px; }
.qc-modal .qc-message    { margin-bottom: 32px; }
.qc-modal .qc-coin-card  { margin-bottom: 36px; }
.qc-modal .qc-progress-row { margin-bottom: 40px; }

/* legacy .qc-body kept for compatibility but not used */
.qc-body {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: space-evenly; gap: 0; padding: 32px 24px; text-align: center;
  position: relative; z-index: 1;
}

/* ── Central orb ── */
.qc-orb {
  position: relative;
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  animation: qc-orb-enter 0.7s cubic-bezier(0.34,1.6,0.64,1) both;
}
@keyframes qc-orb-enter {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}
.qc-orb-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid transparent;
  animation: qc-orbit-cw 4s linear infinite;
}
.qc-orb-r1 {
  inset: -12px;
  border-top-color: rgba(251,191,36,0.6);
  border-right-color: rgba(251,191,36,0.15);
  animation-duration: 3.2s;
}
.qc-orb-r2 {
  inset: -24px;
  border-bottom-color: rgba(139,92,246,0.5);
  border-left-color: rgba(139,92,246,0.12);
  animation: qc-orbit-ccw 5s linear infinite;
}
.qc-orb-r3 {
  inset: -38px;
  border-right-color: rgba(6,182,212,0.35);
  border-top-color: rgba(6,182,212,0.08);
  animation-duration: 7s;
}
@keyframes qc-orbit-cw  { to { transform: rotate(360deg);  } }
@keyframes qc-orbit-ccw { to { transform: rotate(-360deg); } }
.qc-orb-core {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; backdrop-filter: none;
  box-shadow: none; animation: none;
}
.qc-orb-core svg {
  width: 72px; height: 72px;
  filter:
    drop-shadow(0 0 12px rgba(251,191,36,0.9))
    drop-shadow(0 0 30px rgba(251,191,36,0.55))
    drop-shadow(0 0 60px rgba(251,191,36,0.25));
  animation: qc-star-pulse 2.8s ease-in-out infinite;
}
@keyframes qc-star-pulse {
  0%,100% { filter: drop-shadow(0 0 12px rgba(251,191,36,0.9)) drop-shadow(0 0 30px rgba(251,191,36,0.55)) drop-shadow(0 0 60px rgba(251,191,36,0.25)); transform: scale(1) rotate(0deg); }
  50%     { filter: drop-shadow(0 0 18px rgba(251,191,36,1.0)) drop-shadow(0 0 50px rgba(251,191,36,0.75)) drop-shadow(0 0 90px rgba(251,191,36,0.35)); transform: scale(1.08) rotate(8deg); }
}

/* ── Title ── */
.qc-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem; font-weight: 900; line-height: 1.1;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff 0%, #e9d5ff 40%, #fbbf24 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: qc-title-rise 0.5s 0.2s both ease-out;
}
@keyframes qc-title-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qc-message {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  max-width: 560px; white-space: nowrap; line-height: 1.55;
  font-family: 'Inter', sans-serif;
  animation: qc-title-rise 0.5s 0.35s both ease-out;
}

/* ── Coin card ── */
.qc-coin-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 40px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(251,191,36,0.16) 0%, rgba(245,158,11,0.05) 100%);
  border: 1px solid rgba(251,191,36,0.28);
  backdrop-filter: blur(20px);
  position: relative; overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.10),
    0 0 40px rgba(245,158,11,0.12),
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.12);
  animation: qc-card-spring 0.65s 0.5s both cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes qc-card-spring {
  0%   { opacity: 0; transform: scale(0.65) translateY(24px); filter: blur(4px); }
  60%  { opacity: 1; filter: blur(0); }
  80%  { transform: scale(1.04) translateY(-3px); }
  100% { transform: scale(1) translateY(0); }
}
.qc-coin-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(108deg, transparent 20%, rgba(255,255,255,0.07) 50%, transparent 80%);
  background-size: 200% 100%; background-position: -200% center;
  animation: qc-card-sheen 3s 1.2s ease-in-out infinite;
}
@keyframes qc-card-sheen {
  0%,30%  { background-position: -200% center; }
  65%,100% { background-position: 250% center; }
}
.qc-coin-icon {
  width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle, rgba(251,191,36,0.22) 0%, rgba(245,158,11,0.08) 100%);
  border: 2px solid rgba(251,191,36,0.45);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(245,158,11,0.38), inset 0 1px 0 rgba(255,255,255,0.15);
}
.qc-coin-icon svg { width: 56px; height: 56px; }
.qc-coin-info {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.qc-coin-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.6rem; font-weight: 900; letter-spacing: -0.02em;
  color: #fbbf24;
  text-shadow: 0 0 24px rgba(251,191,36,0.5);
  animation: qc-val-pop 0.5s 0.7s both cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes qc-val-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.qc-coin-label {
  font-size: 0.72rem; font-weight: 500;
  color: rgba(255,255,255,0.42);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ── Progress ── */
.qc-progress-row {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 14px;
  animation: qc-title-rise 0.5s 0.7s both ease-out;
}
.qc-progress-label {
  font-size: 0.72rem; color: rgba(255,255,255,0.38);
  font-family: 'Orbitron', sans-serif; letter-spacing: 0.06em;
  text-align: center;
}
.qc-prog-bar {
  width: 100%; height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px; overflow: hidden;
}
.qc-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #D946EF, #FFB800);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(217,70,239,0.5);
}

/* ── CONTINUER / TU L'AS MÉRITÉ = même design que « LANCER MA MISSION » (néon violet→rose) ── */
.qc-btn-continuer, .t-btn-merite {
  width: auto !important;
  min-width: 240px !important;
  max-width: 340px !important;
  padding: 18px 44px !important;
  height: auto !important;
  border: none !important;
  outline: none !important;
  border-radius: 20px !important;
  color: #fff !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  text-shadow: none !important;
  background: linear-gradient(100deg, #7C5CFF, #A24FE6 45%, #EC4FD0) !important;
  box-shadow:
    0 22px 50px -14px rgba(190,72,210,0.8),
    0 0 40px -10px rgba(124,92,255,0.6),
    inset 0 1px 0 rgba(255,255,255,0.35) !important;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease !important;
  animation: none !important;
}
.qc-btn-continuer:hover, .t-btn-merite:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(100deg, #7C5CFF, #A24FE6 45%, #EC4FD0) !important;
  box-shadow:
    0 28px 58px -14px rgba(190,72,210,0.9),
    0 0 52px -8px rgba(124,92,255,0.7),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
}
.qc-btn-continuer:active, .t-btn-merite:active {
  transform: scale(.97) !important;
}



/* ════════════════════════════════════════════════════════════
   SCREEN 10 — TREASURE
════════════════════════════════════════════════════════════ */
#screen-treasure {
  background: #06040F;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.tr-star-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ── Centered modal block ── */
.tr-modal {
  position: relative; z-index: 10;
  width: min(680px, 90vw);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.tr-modal .treasure-chest-wrap  { margin-bottom: 14px; }
.tr-modal .treasure-title       { margin-bottom: 20px; }
.tr-modal .treasure-persona-msg { margin-bottom: 32px; }
.tr-modal .treasure-stats-row   { margin-bottom: 40px; }

.treasure-chest-wrap {
  position: relative; width: 120px; height: 120px;
  display: grid; place-items: center;
}
.treasure-chest-emoji {
  font-size: 4.5rem;
  animation: chest-open 0.8s 0.3s both cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes chest-open { from{transform:scale(0.3) rotate(-15deg);opacity:0} to{transform:scale(1) rotate(0);opacity:1} }

.chest-glow {
  position: absolute; inset: -24px;
  background: radial-gradient(circle, rgba(245,158,11,0.45) 0%, rgba(251,191,36,0.12) 50%, transparent 70%);
  border-radius: 50%;
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%,100% { opacity: 0.6; transform: scale(0.92); }
  50%      { opacity: 1;   transform: scale(1.12); }
}

.treasure-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem; font-weight: 900; line-height: 1.1;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff 0%, #e9d5ff 40%, #fbbf24 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: qc-title-rise 0.5s 0.15s both ease-out;
}
.treasure-congrats {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 400;
  color: rgba(255,255,255,0.5); line-height: 1.55;
  animation: qc-title-rise 0.5s 0.28s both ease-out;
}

.treasure-persona-msg {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 400;
  color: rgba(255,255,255,0.5);
  max-width: 560px; line-height: 1.55;
  animation: qc-title-rise 0.5s 0.28s both ease-out;
}
.treasure-philosophy {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 400; font-style: normal;
  color: rgba(255,255,255,0.5); line-height: 1.55;
  animation: qc-title-rise 0.5s 0.35s both ease-out;
}

/* Stats card — identique au .qc-coin-card */
.treasure-stats-row {
  display: flex; align-items: center; gap: 28px;
  padding: 20px 36px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(60,35,5,0.92) 0%, rgba(40,22,2,0.96) 100%);
  border: 1.5px solid rgba(251,191,36,0.45);
  position: relative; overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.12),
    0 0 50px rgba(245,158,11,0.20),
    0 8px 32px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,220,80,0.18);
  animation: qc-card-spring 0.65s 0.5s both cubic-bezier(0.34,1.56,0.64,1);
}
.treasure-stats-row::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(108deg, transparent 20%, rgba(255,255,255,0.07) 50%, transparent 80%);
  background-size: 200% 100%; background-position: -200% center;
  animation: qc-card-sheen 3s 1.2s ease-in-out infinite;
}
.tr-stat-divider {
  width: 1px; height: 52px; flex-shrink: 0; align-self: center;
  background: linear-gradient(to bottom, transparent, rgba(251,191,36,0.25), transparent);
}
/* Icon circles — same as .qc-coin-icon */
.ts-icon-circle {
  width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ts-icon-circle-gold {
  width: 76px; height: 76px;
  background: radial-gradient(circle, rgba(251,191,36,0.22) 0%, rgba(245,158,11,0.08) 100%);
  border: 2px solid rgba(251,191,36,0.45);
  box-shadow: 0 0 26px rgba(245,158,11,0.36), inset 0 1px 0 rgba(255,255,255,0.15);
  color: var(--gold);
}
.ts-icon-circle-gold svg { width: 44px; height: 44px; }
.ts-icon-circle-purple {
  background: radial-gradient(circle, rgba(139,92,246,0.22) 0%, rgba(109,40,217,0.08) 100%);
  border: 1.5px solid rgba(139,92,246,0.40);
  box-shadow: 0 0 20px rgba(139,92,246,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
  color: var(--purple-l);
}
/* Stat text — same as .qc-coin-info / .qc-coin-val / .qc-coin-label */
.ts-stat-info {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
}
.ts-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem; font-weight: 900; letter-spacing: -0.02em;
  color: #fbbf24;
  animation: qc-coin-pop 0.45s 0.65s both cubic-bezier(0.34,1.56,0.64,1);
}
.ts-val-purple { color: var(--purple-l); }
.ts-label {
  font-size: 0.72rem; font-weight: 500;
  color: rgba(255,255,255,0.42);
  font-family: 'Inter', sans-serif;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Nouvelle journée button — gold style ── */
.tr-btn-newday {
  width: auto !important;
  min-width: 240px !important; max-width: 320px !important;
  padding: 16px 36px !important;
  font-size: 0.8rem !important; font-weight: 900 !important; letter-spacing: 0.16em !important;
  border-radius: 100px !important;
  background: linear-gradient(135deg, #92400E 0%, #D97706 35%, #FBBF24 65%, #F59E0B 100%) !important;
  border: none !important;
  outline: 3px solid rgba(0,0,0,0.55) !important;
  box-shadow: 0 5px 0 rgba(0,0,0,0.50), 0 8px 28px rgba(251,191,36,0.60), inset 0 1px 0 rgba(255,255,255,0.30) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55) !important;
  animation: decolle-float 3.2s ease-in-out infinite, decolle-gold-breathe 4.5s ease-in-out infinite !important;
}
.tr-btn-newday:hover {
  transform: translateY(-3px) !important; animation: none !important;
  box-shadow: 0 8px 0 rgba(0,0,0,0.45), 0 14px 36px rgba(251,191,36,0.75), inset 0 1px 0 rgba(255,255,255,0.38) !important;
}
.tr-btn-newday:active {
  transform: translateY(4px) !important; animation: none !important;
  box-shadow: 0 2px 0 rgba(0,0,0,0.50), 0 4px 14px rgba(251,191,36,0.40) !important;
}


/* ════════════════════════════════════════════════════════════
   MENU PANEL
════════════════════════════════════════════════════════════ */
.menu-overlay {
  position: absolute; inset: 0; z-index: 950;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}
.menu-overlay.open { opacity: 1; pointer-events: all; }

.menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 340px; z-index: 960;
  background: rgba(10,8,28,0.85);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border-left: 1px solid rgba(96,165,250,0.18);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5), inset 1px 0 0 rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition);
  overflow-y: auto; overflow-x: hidden;
}
.menu-panel.open { transform: translateX(0); }

/* ══ MENU — TOPBAR ══ */
.mp-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
}
.mp-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}
.mp-close-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.mp-close-btn svg { width: 14px; height: 14px; }

.mp-theme-pill {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 6px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}
.mp-theme-pill:hover { background: rgba(255,255,255,0.12); }

.mp-expand-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7); cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}
.mp-expand-btn:hover { background: rgba(96,165,250,0.18); color: #c4b5fd; }
.mp-expand-btn svg { width: 14px; height: 14px; }

/* ══ MENU — HERO ══ */
.mp-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px 14px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(96,165,250,0.06) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.menu-avatar-mini-wrap { position: relative; width: 64px; height: 72px; flex-shrink: 0; }
.menu-avatar-mini { width: 64px; height: 72px; }
.menu-avatar-mini svg { width: 100%; height: 100%; }
.menu-arc-svg {
  position: absolute;
  top: -22px; left: -4px;
  width: 72px; height: 40px;
  pointer-events: none;
  overflow: visible;
}
.mp-hero-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.menu-player-name {
  font-size: 1rem; font-weight: 800;
  color: #fff; letter-spacing: 0.01em; line-height: 1.2;
}
.menu-player-sub {
  font-size: 0.72rem; font-weight: 500;
  color: rgba(167,139,250,0.85); letter-spacing: 0.02em;
}

/* ══ MENU — CLOCK CARD ══ */
.mp-clock-card {
  margin: 12px 14px;
  padding: 14px 18px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(124,58,237,0.22);
  border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.06);
}
.menu-clock {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem; font-weight: 900;
  color: #fff; letter-spacing: 0.12em; line-height: 1;
  text-shadow: 0 0 20px rgba(96,165,250,0.6);
}
.menu-date {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 600;
  color: rgba(255,255,255,0.5); letter-spacing: 0.1em; text-transform: uppercase;
}
.menu-castle-msg {
  font-size: 0.7rem; font-weight: 500;
  color: rgba(167,139,250,0.85);
  font-style: italic; letter-spacing: 0.01em;
  line-height: 1.4; text-align: center;
  max-width: 200px;
}

/* ══ MENU — NAV ══ */
.menu-nav {
  display: none !important;
  padding: 6px 10px;
  flex-direction: column; gap: 3px;
}
/* ══ MENU — Items modernisés (cartes nebula) ════════════════
   Chaque item se comporte comme une mini-carte gaming avec
   gradient, glow coloré et halo lumineux au hover.            */
.menu-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg,
    rgba(var(--mni-c1, 139,92,246), 0.10) 0%,
    rgba(var(--mni-c2, 96,165,250), 0.06) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(233,221,255,0.95);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer; text-align: left; width: 100%;
  transition: transform 0.2s ease, background 0.25s, border-color 0.25s, box-shadow 0.25s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
  isolation: isolate;
}
.menu-nav-item::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255,255,255,0.10) 50%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: -1;
}
.mni-icon-wrap {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg,
    rgba(var(--mni-c1, 139,92,246), 0.28),
    rgba(var(--mni-c2, 96,165,250), 0.18));
  border: 1px solid rgba(var(--mni-c1, 139,92,246), 0.35);
  display: grid; place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 0 14px rgba(var(--mni-c1, 139,92,246), 0.25);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.mni-icon-wrap svg {
  width: 18px; height: 18px;
  filter: drop-shadow(0 0 4px rgba(var(--mni-c1, 139,92,246), 0.6));
}
.mni-label { flex: 1; letter-spacing: 0.08em; text-transform: none; }
.mni-chevron {
  width: 14px; height: 14px; flex-shrink: 0;
  opacity: 0.4;
  color: rgba(var(--mni-c2, 96,165,250), 1);
  transition: opacity 0.25s, transform 0.25s;
}

.menu-nav-item:hover {
  transform: translateX(4px);
  background: linear-gradient(135deg,
    rgba(var(--mni-c1, 139,92,246), 0.22) 0%,
    rgba(var(--mni-c2, 96,165,250), 0.14) 100%);
  border-color: rgba(var(--mni-c1, 139,92,246), 0.45);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 6px 20px rgba(var(--mni-c1, 139,92,246), 0.25),
    0 0 30px rgba(var(--mni-c2, 96,165,250), 0.15);
}
.menu-nav-item:hover::before { transform: translateX(100%); }
.menu-nav-item:hover .mni-icon-wrap {
  transform: scale(1.06);
  background: linear-gradient(135deg,
    rgba(var(--mni-c1, 139,92,246), 0.5),
    rgba(var(--mni-c2, 96,165,250), 0.35));
  border-color: rgba(var(--mni-c1, 139,92,246), 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 0 22px rgba(var(--mni-c1, 139,92,246), 0.55);
}
.menu-nav-item:hover .mni-chevron { opacity: 1; transform: translateX(4px); }

.menu-nav-item.active {
  background: linear-gradient(135deg,
    rgba(var(--mni-c1, 139,92,246), 0.28) 0%,
    rgba(var(--mni-c2, 96,165,250), 0.18) 100%);
  border-color: rgba(var(--mni-c1, 139,92,246), 0.55);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 0 24px rgba(var(--mni-c1, 139,92,246), 0.3);
}
.menu-nav-item.active .mni-icon-wrap {
  background: linear-gradient(135deg,
    rgba(var(--mni-c1, 139,92,246), 0.55),
    rgba(var(--mni-c2, 96,165,250), 0.4));
  border-color: rgba(var(--mni-c1, 139,92,246), 0.8);
}
.menu-nav-item.active .mni-chevron { opacity: 1; }

/* Couleurs par item (chaque rubrique a sa propre teinte) */
.menu-nav li:nth-child(2) .menu-nav-item,
.menu-nav .menu-nav-item:nth-of-type(1) { --mni-c1: 139,92,246; --mni-c2: 192,132,252; } /* Avatar — violet */
.menu-nav .menu-nav-item:nth-of-type(2) { --mni-c1: 56,189,248;  --mni-c2: 14,165,233;  } /* Progression — cyan */
.menu-nav .menu-nav-item:nth-of-type(3) { --mni-c1: 236,72,153;  --mni-c2: 217,70,239;  } /* Apprentissage — magenta */
.menu-nav .menu-nav-item:nth-of-type(4) { --mni-c1: 167,139,250; --mni-c2: 96,165,250;  } /* Galaxie — violet/bleu */
.menu-nav .menu-nav-item:nth-of-type(5) { --mni-c1: 52,211,153;  --mni-c2: 16,185,129;  } /* Salle — émeraude */
.menu-nav .menu-nav-item:nth-of-type(6) { --mni-c1: 251,191,36;  --mni-c2: 245,158,11;  } /* Paramètres — or */

/* ══ Thèmes nebula du menu — appliqués aléatoirement à l'ouverture ══ */
#menu-panel.theme-aurora     { --neb-1: 6,182,212;    --neb-2: 16,185,129;   --neb-3: 168,85,247;  --neb-4: 250,204,21;  }
#menu-panel.theme-galaxy     { --neb-1: 139,92,246;   --neb-2: 217,70,239;   --neb-3: 96,165,250;  --neb-4: 6,182,212;   }
#menu-panel.theme-nebula     { --neb-1: 236,72,153;   --neb-2: 139,92,246;   --neb-3: 6,182,212;   --neb-4: 6,255,165;   }
#menu-panel.theme-sunset     { --neb-1: 251,113,133;  --neb-2: 251,146,60;   --neb-3: 217,70,239;  --neb-4: 250,204,21;  }
#menu-panel.theme-cosmic     { --neb-1: 96,165,250;   --neb-2: 124,58,237;   --neb-3: 14,165,233;  --neb-4: 217,70,239;  }
#menu-panel.theme-stardust   { --neb-1: 250,204,21;   --neb-2: 217,70,239;   --neb-3: 6,182,212;   --neb-4: 6,255,165;   }
#menu-panel.theme-plasma     { --neb-1: 244,114,182;  --neb-2: 56,189,248;   --neb-3: 168,85,247;  --neb-4: 250,204,21;  }
#menu-panel.theme-aether     { --neb-1: 134,239,172;  --neb-2: 196,181,253;  --neb-3: 251,191,36;  --neb-4: 244,114,182; }

#menu-panel[class*="theme-"] {
  background:
    /* Halos colorés saturés répartis sur tout le panneau */
    radial-gradient(ellipse 100% 40% at 20% 15%,  rgba(var(--neb-1), 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 90%  45% at 85% 25%,  rgba(var(--neb-2), 0.50) 0%, transparent 65%),
    radial-gradient(ellipse 100% 45% at 15% 70%,  rgba(var(--neb-3), 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 100% 40% at 80% 85%,  rgba(var(--neb-4), 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 60%  30% at 50% 50%,  rgba(var(--neb-1), 0.25) 0%, transparent 70%),
    linear-gradient(180deg, #0a0220 0%, #110630 50%, #0a0220 100%);
  background-size: 200% 200%;
  transition: background 0.6s ease;
  animation: menu-bg-flow 12s ease-in-out infinite;
}
@keyframes menu-bg-flow {
  0%, 100% { background-position: 0% 0%; }
  25%      { background-position: 100% 30%; }
  50%      { background-position: 50% 100%; }
  75%      { background-position: 0% 60%; }
}

/* Overlay holographique conique animé — donne l'effet chrome iridescent */
#menu-panel[class*="theme-"]::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(var(--neb-1), 0.18),
    rgba(var(--neb-2), 0.22),
    rgba(var(--neb-3), 0.18),
    rgba(var(--neb-4), 0.22),
    rgba(var(--neb-1), 0.18)
  );
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: menu-holo-spin 18s linear infinite;
  z-index: 0;
}
@keyframes menu-holo-spin {
  0%   { transform: rotate(0deg)   scale(1.6); }
  100% { transform: rotate(360deg) scale(1.6); }
}

/* Particules brillantes diffuses qui flottent */
#menu-panel[class*="theme-"] > * { position: relative; z-index: 1; }

#menu-panel[class*="theme-"]::before {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(var(--neb-1), 0.6) 15%,
    rgba(var(--neb-2), 1) 40%,
    rgba(var(--neb-3), 0.85) 60%,
    rgba(var(--neb-4), 0.6) 85%,
    transparent 100%);
}

.menu-section-content {
  flex: 1; overflow-y: auto; padding: 16px;
}

/* ══ MENU — FOOTER / LOGOUT ══ */
.menu-footer {
  padding: 12px 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mp-logout-btn {
  width: 100%; padding: 11px 16px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.22);
  border-radius: 14px; color: #f87171;
  font-size: 0.84rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background 0.18s, border-color 0.18s;
}
.mp-logout-btn:hover { background: rgba(239,68,68,0.16); border-color: rgba(239,68,68,0.5); }
.mp-logout-btn svg { width: 16px; height: 16px; flex-shrink: 0; }


/* ─────────────── MENU — PERSONAS SECTION ─────────────── */
.menu-personas-wrap {
  display: flex; flex-direction: column; gap: 12px;
}
.menu-section-heading {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  color: var(--purple-l); letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* replaced by new flex version at end of file */
.menu-persona-cards {
  display: flex; flex-direction: column; gap: 10px;
}
.menu-persona-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--r); padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.menu-persona-card.active-persona {
  border-color: var(--neon);
  background: rgba(217,70,239,0.08);
  box-shadow: 0 0 10px rgba(217,70,239,0.15);
}
.mpc-header {
  display: flex; align-items: center; gap: 8px;
}
.mpc-icon { font-size: 1.2rem; line-height: 1; }
.mpc-name {
  font-size: 0.82rem; font-weight: 700; color: var(--text);
  flex: 1;
}
.mpc-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700;
  color: var(--neon); background: rgba(217,70,239,0.2);
  border: 1px solid var(--neon); border-radius: 4px;
  padding: 2px 5px; letter-spacing: 0.06em;
}
.mpc-desc {
  font-size: 0.75rem; color: var(--text2); line-height: 1.5;
  margin: 0;
}
.mpc-tip {
  font-size: 0.72rem; color: var(--purple-l); line-height: 1.45;
  margin: 0;
}
.btn-retake-quiz {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none;
  border-radius: var(--r-sm);
  color: var(--purple-l); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  margin-top: 4px;
}
.btn-retake-quiz:hover {
  background: linear-gradient(135deg, #8b4cf0 0%, #e357f5 60%, #22d3ee 100%);
  box-shadow: 0 0 14px rgba(217,70,239,0.4), 0 0 8px rgba(6,182,212,0.2);
}


/* ════════════════════════════════════════════════════════════
   SCREEN HOME
════════════════════════════════════════════════════════════ */
#screen-home {
  /* Nébuleuse cosmique premium — 3 taches colorées + fond dégradé global */
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(120,80,220,.38), transparent 55%),
    radial-gradient(90% 80% at 18% 85%, rgba(210,90,214,.20), transparent 60%),
    radial-gradient(70% 70% at 50% 40%, rgba(90,120,230,.18), transparent 70%),
    radial-gradient(140% 120% at 50% 0%, #0e0a24, #070512 70%);
}

/* ── Champ d'étoiles scintillantes ── */
.home-starfield {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.home-cosmic-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: home-star-tw var(--d, 2s) ease-in-out infinite alternate;
  pointer-events: none;
  will-change: opacity, transform;
}
@keyframes home-star-tw {
  from { opacity: .35; transform: scale(.8); }
  to   { opacity: var(--opa-max, 1); transform: scale(1); }
}
/* Étoiles vedettes : halo doux multi-couche */
.home-cosmic-star--glow {
  box-shadow:
    0 0 2px rgba(255,255,255,0.9),
    0 0 6px rgba(220,232,255,0.55),
    0 0 14px rgba(180,200,255,0.30);
}

/* Désactive tous les éléments de fond animés / décoratifs de la home */
#screen-home .home-butterfly-canvas,
#screen-home .home-sparkle-canvas,
#screen-home .home-deco-planets {
  display: none !important;
}
/* Bloom global subtil — boost contraste + saturation pour le punch premium */
#screen-home.active .home-body,
#screen-home.active .home-topbar {
  filter: contrast(1.04) saturate(1.12);
}
/* Réduit l'intensité des glows en mobile pour préserver les perfs */
@media (max-width: 768px) {
  .home-cinematic-top .home-player-name { text-shadow: none; }
  .home-avatar-glow { width: 360px; height: 360px; }
  .btn-play-hero { box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 0 0 1.5px rgba(219,234,254,0.3),
    0 4px 18px rgba(59,130,246,0.45),
    0 0 30px rgba(96,165,250,0.4); }
}
/* Vignette subtil sur les bords — donne de la profondeur cinématique */
#screen-home::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 90% 75% at 50% 50%,
    transparent 0%,
    transparent 55%,
    rgba(0,0,0,0.35) 90%,
    rgba(0,0,0,0.55) 100%);
}
#screen-home .home-greeting,
#screen-home .home-xp-label,
#screen-home .hsc-val,
#screen-home .home-level-label,
#screen-home .hss-val,
#screen-home .hss-label,
#screen-home .home-cinematic-top .home-greeting {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#screen-home .btn-play,
#screen-home .btn-play-hero,
#screen-home .bph-text,
#screen-home .bph-icon {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#screen-home .home-stat-chip {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}
#screen-home .home-stats-strip {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}
#screen-home .home-xp-bar,
#screen-home .hss-xp-bar {
  background: rgba(255,255,255,0.2);
}
#screen-home .hss-sep {
  background: rgba(255,255,255,0.2);
}
.home-logo-inline {
  font-family: 'Aquavit', 'Orbitron', sans-serif;
  font-size: 1.8rem; font-weight: 400;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--purple-l), var(--neon));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(96,165,250,0.4));
}
.header-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.home-body {
  position: relative; z-index: 1;
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px 24px 24px;
  gap: clamp(10px, 2.2vh, 22px);
}
.home-top {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-bottom: 10px;
  margin-top: auto;
  transform: translateY(35px);
}
.home-play-zone {
  width: 100%; display: flex; justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  transform: none;
}
.home-greeting {
  font-size: 0.78rem; font-weight: 500;
  color: var(--text2); text-align: center;
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 2px;
}
.home-brand {
  display: flex; align-items: center; gap: 8px;
}
.home-brand-logo {
  height: 38px; width: auto; object-fit: contain;
  filter: brightness(10) drop-shadow(0 0 8px rgba(196,163,255,0.55));
  animation: home-brand-flap 3s cubic-bezier(0.45,0,0.55,1) infinite;
  transform-origin: center;
}
@keyframes home-brand-flap {
  0%, 100% { transform: scaleX(1);    }
  50%      { transform: scaleX(0.92); }
}
.home-brand-text {
  font-family: 'Aquavit', 'Orbitron', sans-serif;
  font-size: 1.3rem; font-weight: 400;
  letter-spacing: 0.14em;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  text-shadow:
    0 0 12px rgba(255,255,255,0.55),
    0 0 28px rgba(196,163,255,0.4),
    0 0 56px rgba(139,92,246,0.25);
}
@keyframes neon-flicker {
  0%,95%,100% { opacity: 1; }
  96%          { opacity: 0.7; }
  97%          { opacity: 1; }
  98%          { opacity: 0.5; }
}

.home-avatar-wrap {
  position: relative;
  width: 100%;
  flex: 0 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
}
.home-avatar-wrap *,
.home-avatar-wrap *::before,
.home-avatar-wrap *::after {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.home-avatar-wrap img,
.home-avatar-wrap svg {
  -webkit-user-drag: none;
  pointer-events: none;
}
.home-avatar-wrap:focus,
.home-avatar-wrap:focus-visible {
  outline: none;
}
/* ── Animation d'arrivée cinématique : l'avatar descend du ciel ── */
#screen-home.active .home-avatar {
  animation:
    home-avatar-arrive 1.6s cubic-bezier(.2,.7,.2,1.15) both,
    home-float-sync 6s ease-in-out infinite 1.6s;
}
/* Float partagé avatar + logo papillon — même rythme, même amplitude */
@keyframes home-float-sync {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
@keyframes home-avatar-arrive {
  0%   { transform: translateY(-110vh) scale(0.55) rotate(-6deg); opacity: 0; filter: blur(2px); }
  45%  { transform: translateY(0)       scale(0.95) rotate(2deg);  opacity: 1; filter: blur(0); }
  62%  { transform: translateY(-14px)   scale(1.02) rotate(-1deg); }
  78%  { transform: translateY(6px)     scale(0.99) rotate(0.5deg); }
  100% { transform: translateY(0)       scale(1)    rotate(0); }
}
/* Traînée d'arrivée — apparaît derrière l'avatar pendant sa descente */
#screen-home.active .home-avatar-wrap::after {
  animation:
    home-avatar-shadow 3.2s cubic-bezier(0.45,0,0.55,1) infinite 1.6s,
    home-avatar-trail 1.6s cubic-bezier(.2,.7,.2,1.15) both;
}
@keyframes home-avatar-trail {
  0%   { opacity: 0; height: 4px;  width: 6px;  filter: blur(4px); }
  35%  { opacity: 1; height: 320px; width: 30px; filter: blur(12px); }
  60%  { opacity: 0.85; height: 220px; width: 50px; filter: blur(10px); }
  100% { opacity: 0.55; height: 38px; width: 240px; filter: blur(8px); }
}
.home-avatar-bg-logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(calc(-50% - 12.5px), -50%);
  width: min(787px, 95vw); height: auto;
  opacity: 0.42;
  z-index: 0;
  filter:
    brightness(1.8)
    drop-shadow(0 0 3px rgba(255,255,255,0.9))
    drop-shadow(0 0 8px rgba(255,255,255,0.6))
    drop-shadow(0 0 18px rgba(220,210,255,0.5))
    drop-shadow(0 0 35px rgba(200,180,255,0.3));
  animation: logo-float 6s ease-in-out infinite 1.6s;
  pointer-events: none;
}
@keyframes logo-glow-pulse {
  0%,100% {
    filter:
      brightness(1.8)
      drop-shadow(0 0 3px rgba(255,255,255,0.9))
      drop-shadow(0 0 8px rgba(255,255,255,0.6))
      drop-shadow(0 0 18px rgba(220,210,255,0.5))
      drop-shadow(0 0 35px rgba(200,180,255,0.3));
  }
  50% {
    filter:
      brightness(2.1)
      drop-shadow(0 0 5px rgba(255,255,255,1))
      drop-shadow(0 0 14px rgba(255,255,255,0.8))
      drop-shadow(0 0 28px rgba(230,220,255,0.65))
      drop-shadow(0 0 50px rgba(210,190,255,0.45));
  }
}
@keyframes logo-float {
  0%,100% { transform: translate(calc(-50% - 12.5px), -50%) translateY(0px); }
  50%      { transform: translate(calc(-50% - 12.5px), -50%) translateY(-10px); }
}
/* Home screen stars — spread across full screen */
.home-star { position: absolute; pointer-events: none; z-index: 0; }
.home-star-dot {
  border-radius: 50%;
  animation: twinkle var(--tw-dur,2.5s) ease-in-out infinite;
  animation-delay: var(--tw-delay,0s);
}
.home-star-glow {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--sc,#fff);
  box-shadow: 0 0 4px 2px var(--sc,#fff), 0 0 10px 3px var(--sc,#fff);
  animation: twinkle var(--tw-dur,2s) ease-in-out infinite;
  animation-delay: var(--tw-delay,0s);
}
.home-star-cross {
  width: 1px; height: 12px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 5px 1px rgba(255,255,255,0.5);
  transform: translate(-50%,-50%);
  animation: twinkle var(--tw-dur,2s) ease-in-out infinite;
  animation-delay: var(--tw-delay,0s);
}
.home-star-cross::after {
  content:''; position:absolute; top:50%; left:50%;
  transform: translate(-50%,-50%) rotate(90deg);
  width:1px; height:12px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 5px 1px rgba(255,255,255,0.5);
}

/* ── Halo lavande désactivé (rendait l'effet "lune") ─────────── */
.home-avatar-glow {
  display: none;
}
@keyframes home-avatar-breathe {
  0%, 100% { transform: translate(-50%,-50%) scale(0.95); opacity: 0.7; }
  50%      { transform: translate(-50%,-50%) scale(1.08); opacity: 1;   }
}

/* Aura blanche lumineuse au sol — sous les pieds de l'avatar */
.home-avatar-wrap::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 6%;
  width: 240px; height: 38px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(255,255,255,0.65) 0%,
    rgba(255,255,255,0.35) 40%,
    rgba(196,163,255,0.18) 65%,
    transparent 80%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
  animation: home-avatar-shadow 3.2s cubic-bezier(0.45,0,0.55,1) infinite;
}
@keyframes home-avatar-shadow {
  0%, 100% { transform: translateX(-50%) scaleX(1);    opacity: 0.55; }
  50%      { transform: translateX(-50%) scaleX(0.85); opacity: 0.4;  }
}

/* Sparkles autour de l'avatar — 8 petites étoiles qui apparaissent aléatoirement */
.home-avatar-wrap::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 420px; height: 520px;
  transform: translate(-50%,-50%);
  background:
    radial-gradient(circle 1.5px at 8% 18%,  #ffffff 50%, transparent 51%),
    radial-gradient(circle 2px   at 22% 36%, #c4a3ff 50%, transparent 51%),
    radial-gradient(circle 1.2px at 12% 62%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 1.8px at 30% 78%, #fbbf24 50%, transparent 51%),
    radial-gradient(circle 1.4px at 88% 24%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 2px   at 75% 48%, #ff9cc4 50%, transparent 51%),
    radial-gradient(circle 1.5px at 92% 70%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 1.6px at 80% 88%, #c4a3ff 50%, transparent 51%);
  pointer-events: none;
  z-index: 2;
  animation: home-avatar-sparkles 2.6s cubic-bezier(0.45,0,0.55,1) infinite;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.9));
}
@keyframes home-avatar-sparkles {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 0.9;  }
}

/* ══ RAINBOW ROAD PREMIUM ════════════════════════════════════════
   Trapèze céleste + iridescence + 3 reflets + particules + ondes  */
.home-rainbow-road {
  display: none !important;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: min(100%, 60vh);
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  filter:
    drop-shadow(0 0 18px rgba(236,72,153,0.42))
    drop-shadow(0 0 36px rgba(34,211,238,0.28))
    drop-shadow(0 0 70px rgba(168,85,247,0.24));
}

/* Bordures néon — pulsation subtile */
.hrr-edge-line {
  animation: hrr-edge-pulse 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes hrr-edge-pulse {
  0%, 100% { stroke-opacity: 0.85; }
  50%      { stroke-opacity: 1;    }
}

/* Couche iridescente holographique — décale lentement */
.hrr-irid-layer {
  mix-blend-mode: overlay;
  transform-origin: 50% 50%;
  opacity: 0.5;
}

/* 3 reflets brillants — vitesses et délais différents pour du mouvement perpétuel */
.hrr-shine-bar          { animation: hrr-shine-slide 4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.hrr-shine-1 { animation-duration: 4.2s; animation-delay: 0s;   opacity: 0.45; }
.hrr-shine-2 { animation-duration: 5.5s; animation-delay: -1.5s; opacity: 0.35; }
.hrr-shine-3 { animation-duration: 6.8s; animation-delay: -3s;   opacity: 0.25; }
@keyframes hrr-shine-slide {
  0%   { transform: translateY(0);      opacity: 0;   }
  12%  {                                opacity: 0.5; }
  88%  {                                opacity: 0.5; }
  100% { transform: translateY(2800px); opacity: 0;   }
}

/* ── Destination : cristal scintillant entre NONOHEY et l'avatar ── */
.hrr-destination {
  transform-origin: 600px 560px;
  animation: hrr-dest-float 4s cubic-bezier(0.45,0,0.55,1) infinite;
  will-change: transform;
}
@keyframes hrr-dest-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.hrr-dest-halo {
  animation: hrr-dest-halo-pulse 3s cubic-bezier(0.45,0,0.55,1) infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes hrr-dest-halo-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
.hrr-dest-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: hrr-dest-ring-spin 8s linear infinite;
}
@keyframes hrr-dest-ring-spin {
  from { transform: rotateZ(0deg) skewX(0); }
  to   { transform: rotateZ(360deg) skewX(0); }
}
.hrr-dest-crystal {
  animation: hrr-dest-crystal-spin 6s cubic-bezier(0.45,0,0.55,1) infinite;
  filter: drop-shadow(0 0 8px rgba(253,230,138,0.9))
          drop-shadow(0 0 20px rgba(196,163,255,0.6));
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes hrr-dest-crystal-spin {
  0%, 100% { transform: scaleX(1); }
  50%      { transform: scaleX(0.65); }
}
.hrr-dest-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: hrr-dest-spark-twinkle 1.8s cubic-bezier(0.45,0,0.55,1) infinite;
  filter: drop-shadow(0 0 3px currentColor);
}
.hrr-dest-spark-1 { animation-delay: 0s;    }
.hrr-dest-spark-2 { animation-delay: -0.45s; }
.hrr-dest-spark-3 { animation-delay: -0.9s; }
.hrr-dest-spark-4 { animation-delay: -1.35s; }
@keyframes hrr-dest-spark-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.6); }
  50%      { opacity: 1;   transform: scale(1.3); }
}

/* ═══════════════════════════════════════════════════════════════
   PLANÈTES DÉCORATIVES — ambiance cosmique sur les côtés du chemin
═══════════════════════════════════════════════════════════════════ */
.home-deco-planets {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.deco-planet,
.deco-cloud {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}
.deco-planet {
  border-radius: 50%;
  opacity: 0.55;
}

/* ─── GAUCHE : violet lointain en haut ─── */
.deco-violet {
  width: 56px; height: 56px;
  top: 18%; left: 8%;
  background: radial-gradient(circle at 32% 28%, #c4a3ff 0%, #8b5cf6 55%, #4c1d95 100%);
  box-shadow:
    inset -10px -10px 16px rgba(0,0,0,0.45),
    inset 6px 6px 14px rgba(255,255,255,0.15),
    0 0 28px rgba(139,92,246,0.45),
    0 0 60px rgba(139,92,246,0.18);
  filter: blur(0.5px);
  animation: deco-float-A 12s cubic-bezier(0.45,0,0.55,1) infinite;
}

/* ─── GAUCHE : rose avec anneau au milieu ─── */
.deco-pink-ring {
  width: 92px; height: 92px;
  top: 48%; left: 9%;
  background: radial-gradient(circle at 35% 28%, #fbcfe8 0%, #ec4899 55%, #831843 100%);
  box-shadow:
    inset -12px -12px 22px rgba(0,0,0,0.5),
    inset 8px 8px 18px rgba(255,255,255,0.18),
    0 0 42px rgba(244,114,182,0.4),
    0 0 90px rgba(244,114,182,0.15);
  animation: deco-float-B 9.5s cubic-bezier(0.45,0,0.55,1) infinite;
}
.deco-pink-ring .deco-ring {
  position: absolute;
  width: 175%; height: 22%;
  top: 41%; left: -37.5%;
  border-radius: 50%;
  background: linear-gradient(90deg,
    transparent 10%,
    rgba(252,189,233,0.55) 35%,
    rgba(255,255,255,0.75) 50%,
    rgba(252,189,233,0.55) 65%,
    transparent 90%);
  border-top: 1px solid rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,200,230,0.2);
  transform: rotate(-18deg);
}

/* ─── GAUCHE : nuage stellaire lavande en bas ─── */
.deco-cloud-lavender {
  width: 160px; height: 110px;
  bottom: 18%; left: 4%;
  background: radial-gradient(ellipse 50% 60% at 50% 50%,
    rgba(196,163,255,0.22) 0%,
    rgba(167,139,250,0.12) 40%,
    transparent 75%);
  filter: blur(10px);
  animation: deco-drift-A 15s cubic-bezier(0.45,0,0.55,1) infinite;
}

/* ─── DROITE : nuage rose en haut ─── */
.deco-cloud-rose {
  width: 130px; height: 95px;
  top: 16%; right: 7%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    rgba(255,200,235,0.22) 0%,
    rgba(244,114,182,0.10) 40%,
    transparent 75%);
  filter: blur(9px);
  animation: deco-drift-B 13s cubic-bezier(0.45,0,0.55,1) infinite;
}

/* ─── DROITE : planète dorée à anneau au milieu (Saturne) ─── */
.deco-gold-saturn {
  width: 104px; height: 104px;
  top: 44%; right: 8%;
  background: radial-gradient(circle at 34% 28%, #fef3c7 0%, #fbbf24 50%, #92400e 100%);
  box-shadow:
    inset -13px -13px 24px rgba(0,0,0,0.55),
    inset 9px 9px 18px rgba(255,255,255,0.2),
    0 0 46px rgba(251,191,36,0.45),
    0 0 100px rgba(251,191,36,0.18);
  animation: deco-float-C 11s cubic-bezier(0.45,0,0.55,1) infinite;
}
.deco-gold-saturn .deco-ring-gold {
  position: absolute;
  width: 195%; height: 26%;
  top: 39%; left: -47.5%;
  border-radius: 50%;
  background: linear-gradient(90deg,
    transparent 6%,
    rgba(253,224,71,0.5) 30%,
    rgba(255,255,255,0.85) 50%,
    rgba(253,224,71,0.5) 70%,
    transparent 94%);
  border-top: 1.5px solid rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(253,230,138,0.25);
  transform: rotate(-22deg);
}

/* ─── DROITE : petite lune cyan en bas ─── */
.deco-cyan-moon {
  width: 42px; height: 42px;
  bottom: 22%; right: 13%;
  background: radial-gradient(circle at 32% 28%, #cffafe 0%, #22d3ee 55%, #0c4a6e 100%);
  box-shadow:
    inset -7px -7px 11px rgba(0,0,0,0.5),
    inset 4px 4px 9px rgba(255,255,255,0.2),
    0 0 24px rgba(34,211,238,0.5),
    0 0 50px rgba(34,211,238,0.2);
  animation: deco-float-D 13s cubic-bezier(0.45,0,0.55,1) infinite;
}

/* ─── Keyframes flottements (parallaxe naturelle, durées toutes différentes) ─── */
@keyframes deco-float-A {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(8px, -20px, 0); }
}
@keyframes deco-float-B {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-10px, -14px, 0); }
}
@keyframes deco-float-C {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50%      { transform: translate3d(6px, -16px, 0) rotate(-1.5deg); }
}
@keyframes deco-float-D {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(10px, -12px, 0); }
}
@keyframes deco-drift-A {
  0%, 100% { transform: translate3d(0, 0, 0);   opacity: 0.7; }
  50%      { transform: translate3d(16px, -22px, 0); opacity: 1; }
}
@keyframes deco-drift-B {
  0%, 100% { transform: translate3d(0, 0, 0);    opacity: 0.7; }
  50%      { transform: translate3d(-14px, 16px, 0); opacity: 1; }
}

/* Cache les planètes sous 768px pour pas surcharger mobile */
@media (max-width: 768px) {
  .home-deco-planets { display: none; }
}

/* ── Lignes de grille qui défilent vers le spectateur (MK8 forward motion) ── */
.hrr-grid-lines {
  animation: hrr-grid-scroll 2.6s linear infinite;
  transform-box: fill-box;
  will-change: transform;
}
@keyframes hrr-grid-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(200px); }
}

/* ── Anneaux dorés flottants — loops dans l'espace ── */
.hrr-ring,
.hrr-ring-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: hrr-ring-shimmer 3.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.hrr-ring-1 { animation-delay: 0s; }
.hrr-ring-2 { animation-delay: -1.2s; }
.hrr-ring-3 { animation-delay: -2.4s; }
@keyframes hrr-ring-shimmer {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1;   }
}

/* Champ d'étoiles scintillantes sur la route — style Mario Kart Rainbow Road */
.hrr-star {
  transform-origin: center;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.9));
  animation: hrr-star-twinkle 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.hrr-star-cross {
  filter: drop-shadow(0 0 5px rgba(255,255,255,1));
}
.hrr-star-a { animation-delay: 0s;    animation-duration: 2.2s; }
.hrr-star-b { animation-delay: -0.4s; animation-duration: 2.8s; }
.hrr-star-c { animation-delay: -0.8s; animation-duration: 2.4s; }
.hrr-star-d { animation-delay: -1.2s; animation-duration: 3s;   }
.hrr-star-e { animation-delay: -1.6s; animation-duration: 2.6s; }
.hrr-star-f { animation-delay: -2s;   animation-duration: 2.3s; }
.hrr-star-g { animation-delay: -0.6s; animation-duration: 2.9s; }
.hrr-star-h { animation-delay: -1.4s; animation-duration: 2.5s; }
@keyframes hrr-star-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50%      { opacity: 1;   transform: scale(1.3); }
}

/* Particules qui montent depuis la route vers l'avatar */
.hrr-particle {
  animation: hrr-particle-rise 4.5s linear infinite;
  transform-origin: center;
}
.hrr-p-1 { animation-delay: 0s;    animation-duration: 4.2s; }
.hrr-p-2 { animation-delay: -0.6s; animation-duration: 5s;   }
.hrr-p-3 { animation-delay: -1.2s; animation-duration: 4.5s; }
.hrr-p-4 { animation-delay: -1.8s; animation-duration: 5.5s; }
.hrr-p-5 { animation-delay: -2.4s; animation-duration: 4.8s; }
.hrr-p-6 { animation-delay: -3s;   animation-duration: 5.2s; }
.hrr-p-7 { animation-delay: -3.6s; animation-duration: 4.4s; }
.hrr-p-8 { animation-delay: -0.3s; animation-duration: 5.8s; }
@keyframes hrr-particle-rise {
  0%   { transform: translateY(0)     scale(0.5); opacity: 0;   }
  20%  {                              opacity: 1;   }
  80%  {                              opacity: 0.9; }
  100% { transform: translateY(-820px) scale(1.4); opacity: 0;   }
}

/* Onde d'énergie pulsée sous les pieds — 3 anneaux à délais décalés */
.hrr-ripple { transform-origin: 600px 1000px; animation: hrr-ripple-pulse 2.4s ease-out infinite; }
.hrr-ripple-1 { animation-delay: 0s;    }
.hrr-ripple-2 { animation-delay: -0.8s; }
.hrr-ripple-3 { animation-delay: -1.6s; }
@keyframes hrr-ripple-pulse {
  0%   { transform: scale(0.4); stroke-opacity: 0.9; }
  100% { transform: scale(2.2); stroke-opacity: 0;   }
}

/* Pulsation lumineuse du spot sous les pieds */
.hrr-spot-pulse {
  transform-origin: 600px 1000px;
  animation: hrr-spot-breathe 3s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.hrr-spot-pulse-2 {
  transform-origin: 600px 995px;
  animation: hrr-spot-breathe 3s cubic-bezier(0.45, 0, 0.55, 1) infinite 0.5s;
}
@keyframes hrr-spot-breathe {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.12); opacity: 1;    }
}
.home-sparkle-canvas {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
}
.home-sparkle-fullscreen {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
#screen-home:not(.active) .home-sparkle-canvas { display: none; }
.home-arc-svg {
  display: none;
}
@keyframes home-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.08); opacity: 1; }
}
.home-avatar {
  /* Hauteur adaptative : sur écran court, l'avatar rétrécit pour que le rail
     de navigation reste TOUJOURS visible (les <img> internes suivent via
     object-fit). width:auto + aspect-ratio conserve les proportions 320/400. */
  width: auto; aspect-ratio: 320 / 400;
  height: min(400px, 42vh); max-height: 400px;
  margin-top: min(40px, 2vh);
  position: relative; z-index: 1;
  animation: home-idle 4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes home-idle {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
.home-player-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem; font-weight: 900;
  color: white;
  text-shadow: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0;
}
.btn-play {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem !important;
  font-weight: 900;
  letter-spacing: 0.18em;
  width: auto !important;
  padding: 18px 56px !important;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%) !important;
  box-shadow: 0 0 40px rgba(217,70,239,0.6), 0 0 20px rgba(6,182,212,0.3), 0 0 70px rgba(124,58,237,0.35) !important;
  border-radius: 50px !important;
  margin-top: 0;
}
.btn-play:hover {
  box-shadow: 0 0 48px rgba(217,70,239,0.7), 0 0 80px rgba(124,58,237,0.4) !important;
  transform: translateY(-3px) scale(1.04);
}

/* ════════════════════════════════════════════════════════════
   AGENDA RAYON (Obligatoire)
════════════════════════════════════════════════════════════ */
.agenda-date-label {
  font-size: 0.8rem; color: var(--purple-l);
  text-transform: capitalize; padding: 4px 4px 10px;
  font-weight: 600;
}
.agenda-list {
  display: flex; flex-direction: column; gap: 10px;
  padding: 0 2px;
}
.agenda-block {
  display: flex; align-items: stretch; gap: 14px;
  padding: 14px 16px;
  background: var(--card-bg); border: 1.5px solid var(--card-border);
  border-radius: var(--r); cursor: pointer;
  transition: all 0.2s;
}
.agenda-block:hover { border-color: var(--purple); transform: translateX(4px); }
.agenda-block.selected {
  border-color: var(--green);
  background: rgba(16,185,129,0.1);
  box-shadow: 0 0 12px rgba(16,185,129,0.2);
}
.agenda-block.missed {
  border-color: var(--red);
  background: rgba(239,68,68,0.08);
  opacity: 0.75;
}
.agenda-time-col {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 32px; flex-shrink: 0;
}
.agenda-hour {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 700;
  color: var(--text2);
}
.agenda-time-bar {
  flex: 1; width: 2px;
  background: linear-gradient(to bottom, var(--purple), var(--neon));
  border-radius: 1px; min-height: 16px;
}
.agenda-block.missed .agenda-time-bar { background: var(--red); }
.agenda-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.agenda-subject {
  font-size: 1rem; font-weight: 700; color: var(--text);
  line-height: 1.2;
}
.agenda-block.missed .agenda-subject { color: #f87171; }
.agenda-duration { font-size: 0.78rem; color: var(--text2); }
.agenda-toggle-icon {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--card-border);
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0; align-self: center;
  transition: all 0.2s;
}
.agenda-block.selected .agenda-toggle-icon {
  background: var(--green); border-color: var(--green); color: white;
}
.agenda-block.missed .agenda-toggle-icon {
  background: rgba(239,68,68,0.2); border-color: var(--red); color: #f87171;
}
.agenda-hint {
  font-size: 0.76rem; color: var(--text2);
  padding: 10px 4px 0; line-height: 1.5;
  border-top: 1px solid var(--card-border);
  margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════
   CATCHUP RAYON
════════════════════════════════════════════════════════════ */
.catchup-section { display: flex; flex-direction: column; gap: 6px; }
.catchup-section-label {
  font-size: 0.82rem; font-weight: 700; color: var(--purple-l);
  padding-bottom: 4px; border-bottom: 1px solid var(--card-border);
}
.catchup-missed-list { display: flex; flex-direction: column; gap: 8px; }
.catchup-missed-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.catchup-missed-item:hover { background: rgba(239,68,68,0.14); }
.catchup-missed-item.cmi-selected {
  background: rgba(139,92,246,0.12);
  border-color: var(--purple);
}
.catchup-missed-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 700; color: rgba(248,113,113,0.75);
  flex-shrink: 0;
}
.cmi-selected .catchup-missed-time { color: var(--purple-l); }
.catchup-missed-subject {
  font-size: 0.78rem; font-weight: 600; color: rgba(252,165,165,0.85);
}
.cmi-selected .catchup-missed-subject { color: var(--text); }
.catchup-missed-meta {
  font-size: 0.62rem; color: rgba(255,255,255,0.3); margin-top: 1px;
}
.cmi-check {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cmi-check svg { width: 13px; height: 13px; }
.cmi-check-on  { background: rgba(139,92,246,0.25); }
.cmi-check-on  svg { stroke: #a78bfa; }
.cmi-check-off { background: rgba(239,68,68,0.12); }
.cmi-check-off svg { stroke: rgba(248,113,113,0.5); }
.catchup-incomplete-card { border-color: rgba(245,158,11,0.4) !important; }
.catchup-incomplete-card.in-basket { border-color: var(--gold) !important; }
.catchup-empty {
  text-align: center; padding: 32px 16px;
  font-size: 0.9rem; color: var(--text2);
  background: var(--card-bg); border-radius: var(--r); border: 1px solid var(--card-border);
}

/* ── Prep exam cards ── */
.prep-exam-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(239,68,68,0.18);
  background: rgba(239,68,68,0.04);
  cursor: pointer; transition: all 0.15s;
  margin-bottom: 6px;
}
.prep-exam-card:hover { background: rgba(239,68,68,0.09); border-color: rgba(239,68,68,0.3); }
.prep-exam-card.prep-off {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  opacity: 0.5;
}
.pec-left { display: flex; flex-direction: column; gap: 3px; }
.pec-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.44rem; font-weight: 700;
  color: rgba(248,113,113,0.7); letter-spacing: 0.08em; text-transform: uppercase;
}
.pec-subject {
  font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.9);
}
.pec-meta {
  font-size: 0.62rem; color: rgba(255,255,255,0.35);
}
.pec-check {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pec-check svg { width: 14px; height: 14px; }
.pec-on  { background: rgba(139,92,246,0.25); }
.pec-on  svg { stroke: #a78bfa; }
.pec-off { background: rgba(255,255,255,0.08); }
.pec-off svg { stroke: rgba(255,255,255,0.3); }

/* ════════════════════════════════════════════════════════════
   SHELF CARD — editable time
════════════════════════════════════════════════════════════ */
.shelf-time-edit-wrap {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 40px;
}
.shelf-time-input {
  width: 100%; background: var(--bg3);
  border: 1.5px solid var(--purple);
  border-radius: var(--r-sm); color: var(--text);
  font-size: 1rem; font-weight: 700;
  text-align: center; padding: 6px 8px;
  font-family: 'Orbitron', sans-serif;
  outline: none; transition: border-color 0.2s;
}
.shelf-time-input:focus { border-color: var(--neon); box-shadow: 0 0 8px rgba(217,70,239,0.3); }
.shelf-time-input:disabled { opacity: 0.4; }
.shelf-coins-badge {
  font-size: 0.7rem; color: var(--gold); font-weight: 700;
}
/* ════════════════════════════════════════════════════════════
   QUEST ACTIVE — abandon button
════════════════════════════════════════════════════════════ */
.btn-skip-quest {
  width: 100%; padding: 15px 28px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; border-radius: var(--r-lg);
  color: #ffffff;
  font-size: 0.82rem; font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.35), 0 4px 24px rgba(124,58,237,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  margin-top: 8px;
  position: relative; overflow: hidden;
}
.btn-skip-quest:hover {
  box-shadow: 0 0 0 1px rgba(96,165,250,0.5), 0 0 40px rgba(139,92,246,0.65);
  transform: translateY(-2px);
}

.btn-abandon-quest {
  width: 100%; padding: 15px 28px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; border-radius: var(--r-lg);
  color: #ffffff;
  font-size: 0.82rem; font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(91,33,182,0.4), 0 4px 24px rgba(59,7,100,0.6), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  margin-top: 8px;
  position: relative; overflow: hidden;
}
.btn-abandon-quest:hover {
  box-shadow: 0 0 0 1px rgba(109,40,217,0.5), 0 0 40px rgba(76,29,149,0.65);
  transform: translateY(-2px);
}

.path-node.skipped {
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.06);
  opacity: 0.75;
}
.path-node.skipped .path-node-icon { background: rgba(245,158,11,0.15); }

/* ═══════════════════════ TOAST ═══════════════════════ */
/* BLOCKED PLAN OVERLAY */
.blocked-plan-overlay {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.blocked-plan-card {
  background: var(--bg2);
  border: 1.5px solid rgba(248,113,113,0.4);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 320px; width: 100%;
  box-shadow: 0 0 40px rgba(248,113,113,0.15);
}
.bpc-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(248,113,113,0.12);
  border: 1.5px solid rgba(248,113,113,0.4);
  display: grid; place-items: center;
}
.bpc-icon svg { width: 24px; height: 24px; stroke: #f87171; }
.bpc-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem; font-weight: 900;
  color: #f87171; letter-spacing: 0.06em; text-align: center;
}
.bpc-msg {
  font-size: 0.8rem; color: #e2e8f0;
  text-align: center; line-height: 1.5;
}
.bpc-tip {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; color: #a78bfa;
  text-align: center; letter-spacing: 0.04em; line-height: 1.6;
  padding: 8px 12px;
  background: rgba(167,139,250,0.08);
  border-radius: 10px; border: 1px solid rgba(167,139,250,0.2);
}
.bpc-btn { margin-top: 4px; width: 100%; }

.toast {
  position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%);
  z-index: 20;
  padding: 10px 20px;
  background: var(--bg2);
  border: 1px solid var(--purple);
  border-radius: 20px;
  font-family: 'Outfit', sans-serif; font-weight: 400;
  font-size: 14px; color: var(--text);
  box-shadow: var(--glow-p);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.toast.show { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   MA GALAXIE — canvas full-screen
═══════════════════════════════════════════════════════════════ */
.screen-galaxy {
  background: transparent !important;   /* fond cosmique GLOBAL de l'accueil (#cosmic-bg), comme partout */
  overflow: hidden;
}

.galaxy-stars-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.gstar {
  position: absolute;
  transform: translate(-50%, -50%);
  animation: gstar-twinkle ease-in-out infinite;
}

@keyframes gstar-twinkle {
  0%, 100% { opacity: 1;   transform: translate(-50%,-50%) scale(1);    filter: brightness(1.2); }
  50%       { opacity: 0.6; transform: translate(-50%,-50%) scale(0.82); filter: brightness(0.9); }
}

/* Canvas système solaire — par-dessus les étoiles, fond transparent */
.galaxy-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; cursor: default;
  z-index: 2;
  background: transparent;
}

/* Header flottant par-dessus le canvas */
.galaxy-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center;
  padding: 18px 20px 14px;
  background: linear-gradient(to bottom, rgba(2,2,10,0.85) 0%, transparent 100%);
  pointer-events: none;
}
.galaxy-header button { pointer-events: all; }
.galaxy-back {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.45); padding: 4px;
  transition: color 0.2s; flex-shrink: 0;
}
.galaxy-back:hover { color: #fff; }
.galaxy-header-center {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.galaxy-title {
  font-family: 'Orbitron', sans-serif; font-size: 1.15rem; font-weight: 900;
  letter-spacing: 0.15em; color: #ffffff;
  text-transform: uppercase;
  text-shadow:
    0 0 14px rgba(167,139,250,0.9),
    0 0 40px rgba(139,92,246,0.6),
    0 0 70px rgba(91,33,182,0.35),
    0 1px 0 rgba(0,0,0,0.5);
}
.galaxy-count {
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em;
  color: #C4B5FD;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(167,139,250,0.9),
    0 0 22px rgba(139,92,246,0.55);
  pointer-events: all;
}

/* Bouton calendrier dans le header galaxie */
.galaxy-cal-btn {
  position: relative;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: rgba(167,139,250,0.8); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; pointer-events: all;
  transition: background 0.2s, color 0.2s;
}
.galaxy-cal-btn:hover { background: rgba(139,92,246,0.3); color: #fff; }
.galaxy-cal-btn-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: #E879F9; color: #fff;
  font-family: 'Orbitron', sans-serif; font-size: 0.48rem; font-weight: 700;
  display: none; align-items: center; justify-content: center; padding: 0 3px;
}
.galaxy-cal-btn-count.visible { display: flex; }

/* Modale calendrier galaxie */
.galaxy-cal-modal {
  position: absolute; inset: 0; z-index: 12;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px;
  background: rgba(5,2,18,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.galaxy-cal-modal.visible { opacity: 1; pointer-events: all; }
.galaxy-cal-modal-card {
  width: 100%; max-width: 360px; max-height: 80vh;
  background: linear-gradient(160deg, rgba(14,7,36,0.99) 0%, rgba(6,3,18,0.99) 100%);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.85), 0 0 0 1px rgba(139,92,246,0.1);
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1);
}
.galaxy-cal-modal.visible .galaxy-cal-modal-card { transform: translateY(0); }
.gcm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(139,92,246,0.12);
  flex-shrink: 0;
}
.gcm-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; color: rgba(255,255,255,0.7); text-transform: uppercase;
}
.gcm-close {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.gcm-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.gcm-panel {
  flex: 1; overflow-y: auto;
  padding: 12px 16px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.gcm-panel.hidden { display: none; }
#galaxy-cal-modal-tabs {
  flex-shrink: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(139,92,246,0.12);
}

/* ── Bottom sheet révision ── */
.galaxy-review-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 6;
  transform: translateY(calc(100% - 88px));
  transition: transform 0.42s cubic-bezier(0.34, 1.2, 0.64, 1);
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(12,6,32,0.97) 0%, rgba(6,3,18,0.99) 100%);
  border-top: 1px solid rgba(139,92,246,0.3);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.7), 0 -1px 0 rgba(139,92,246,0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-height: 78vh;
  display: flex; flex-direction: column;
}
.galaxy-review-sheet.expanded { transform: translateY(0); }

.grs-handle-area {
  cursor: pointer;
  padding: 10px 20px 4px;
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.grs-handle {
  width: 36px; height: 4px;
  background: rgba(139,92,246,0.4);
  border-radius: 2px;
}

/* Onglets */
.grs-tabs {
  display: flex; gap: 0; flex-shrink: 0;
  padding: 8px 14px 0;
  border-bottom: 1px solid rgba(139,92,246,0.15);
}
.grs-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(167,139,250,0.4);
  background: none; border: none; cursor: pointer;
  padding: 7px 4px 9px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.grs-tab.active {
  color: #A78BFA;
  border-bottom-color: #A78BFA;
}
.grs-tab-count {
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem; font-weight: 700;
  color: #E879F9;
  background: rgba(192,38,211,0.18);
  border: 1px solid rgba(192,38,211,0.35);
  border-radius: 8px; padding: 1px 6px;
  display: none;
}
.grs-tab-count.visible { display: inline; }

/* Contenu des onglets */
.galaxy-review-sheet .grs-content {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 14px 24px;
  overflow-y: auto; flex: 1;
}
.galaxy-review-sheet .grs-content.hidden { display: none; }
.galaxy-review-banner { /* contenu injecté via JS */ }

/* ── Calendrier Galaxy ── */
.grs-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 8px;
}
.grs-cal-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}
.grs-cal-nav {
  display: flex; gap: 4px;
}
.grs-cal-nav-btn {
  width: 24px; height: 24px; border-radius: 6px;
  background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.25);
  color: #A78BFA; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.grs-cal-nav-btn:hover { background: rgba(139,92,246,0.28); }
.grs-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.grs-cal-dow {
  font-family: 'Orbitron', sans-serif; font-size: 0.42rem; font-weight: 700;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.22);
  text-align: center; padding: 2px 0 4px;
  text-transform: uppercase;
}
.grs-cal-day {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 2px 5px; border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 40px;
}
.grs-cal-day:hover { background: rgba(139,92,246,0.12); }
.grs-cal-day.is-today { background: rgba(139,92,246,0.18); }
.grs-cal-day.is-today .grs-cal-day-num { color: #A78BFA; font-weight: 700; }
.grs-cal-day.other-month { opacity: 0.3; }
.grs-cal-day-num {
  font-family: 'Rajdhani', sans-serif; font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.75); line-height: 1;
}
.grs-cal-dots {
  display: flex; gap: 2px; flex-wrap: wrap; justify-content: center;
  margin-top: 3px; max-width: 28px;
}
.grs-cal-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}
.grs-cal-agenda {
  margin-top: 10px; display: flex; flex-direction: column; gap: 5px;
}
.grs-cal-agenda-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.16em; color: rgba(255,255,255,0.28);
  text-transform: uppercase; margin-bottom: 2px;
}
.grs-cal-agenda-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(5,2,18,0.7); border-radius: 8px; padding: 6px 10px;
}
.grs-cal-agenda-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.grs-cal-agenda-info { flex: 1; min-width: 0; }
.grs-cal-agenda-chap {
  font-family: 'Rajdhani', sans-serif; font-size: 0.8rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.grs-cal-agenda-subj {
  font-family: 'Rajdhani', sans-serif; font-size: 0.65rem; color: rgba(255,255,255,0.35);
}
.grs-cal-agenda-interval {
  font-family: 'Orbitron', sans-serif; font-size: 0.5rem; font-weight: 700;
  color: rgba(255,255,255,0.3); flex-shrink: 0;
}
.grb-empty {
  text-align: center;
  font-family: 'Rajdhani', sans-serif; font-size: 0.75rem;
  color: rgba(255,255,255,0.2); letter-spacing: 0.06em;
}
.grb-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); text-align: center;
  margin-bottom: 2px;
}
.grb-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(5,2,18,0.78);
  border-radius: 10px; padding: 7px 12px;
  pointer-events: all; cursor: pointer;
  transition: background 0.2s;
}
.grb-row:hover { background: rgba(139,92,246,0.10); }
.grb-row:hover .grb-chap,
.grb-row:hover .grb-subj {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
}
.grb-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.grb-info { flex: 1; min-width: 0; }
.grb-chap {
  font-family: 'Rajdhani', sans-serif; font-size: 0.82rem; font-weight: 700;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.grb-subj {
  font-family: 'Rajdhani', sans-serif; font-size: 0.68rem; font-weight: 500;
  color: rgba(255,255,255,0.4); letter-spacing: 0.04em;
}
.grb-badge {
  font-family: 'Orbitron', sans-serif; font-size: 0.58rem; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; white-space: nowrap; flex-shrink: 0;
}
/* URGENT — rose vif, pulsant */
.grb-badge-critical {
  background: rgba(244,114,182,0.18); color: #F472B6;
  border: 1px solid rgba(244,114,182,0.5);
  box-shadow: 0 0 10px rgba(244,114,182,0.35);
  animation: grb-pulse 1.6s ease-in-out infinite;
}
@keyframes grb-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(244,114,182,0.35); }
  50%       { box-shadow: 0 0 18px rgba(244,114,182,0.7); }
}
/* NOUVEAU — violet doux, statique */
.grb-badge-new      { background: rgba(139,92,246,0.18); color: #A78BFA; border: 1px solid rgba(139,92,246,0.4); }
/* AUJOURD'HUI — cyan, légèrement lumineux */
.grb-badge-today    { background: rgba(34,211,238,0.12); color: #67E8F9; border: 1px solid rgba(34,211,238,0.35); box-shadow: 0 0 8px rgba(34,211,238,0.2); }
/* BIENTÔT — vert menthe, discret */
.grb-badge-soon     { background: rgba(134,239,172,0.10); color: #86EFAC; border: 1px solid rgba(134,239,172,0.25); }
.grb-more {
  text-align: center;
  font-family: 'Rajdhani', sans-serif; font-size: 0.72rem;
  color: rgba(255,255,255,0.25); letter-spacing: 0.05em;
}

/* ── Overlay surface planète ── */
.galaxy-planet-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  background: rgba(5,2,18,0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* position: absolute déjà défini — le tooltip enfant s'y rattache */
}
.galaxy-planet-overlay.visible { opacity: 1; pointer-events: all; }

.gpo-card {
  position: relative;
  width: 100%;
  max-width: 820px;   /* carte large → GROS blocs (au lieu de 380px) */
  max-height: 88vh;
  background: linear-gradient(160deg, rgba(20,10,45,0.98) 0%, rgba(8,4,22,0.99) 100%);
  border: 1px solid var(--planet-color, #7F77DD);
  border-radius: 20px;
  padding: 20px 20px 28px;
  overflow-y: auto;
  overflow-x: visible;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px color-mix(in srgb, var(--planet-color, #7F77DD) 25%, transparent);
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.galaxy-planet-overlay.visible .gpo-card {
  transform: translateY(0);
}

.gpo-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.5); font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  margin-bottom: 14px; padding: 0;
}
.gpo-back:hover { color: #fff; }

.gpo-title {
  font-family: "Clash Display", sans-serif; font-size: 24px; font-weight: 600;
  letter-spacing: 0; text-transform: none; color: #fff;
  text-shadow: none;
  margin-bottom: 8px;
}

.gpo-counter {
  font-family: "Satoshi", sans-serif; font-size: 13px; font-weight: 500;
  color: #b3a9d6; letter-spacing: 0; text-transform: none;
  margin-bottom: 18px;
}

.gpo-chapters { display: flex; flex-direction: column; gap: 16px; }

/* ── Planisphère ── */
.gpo-planisphere-wrap {
  position: relative;
  width: 100%; border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.gpo-map-canvas {
  width: 100%; height: auto; display: block;
  image-rendering: auto;
}
.gpo-map-tooltip {
  display: none;
  position: absolute;
  flex-direction: column; gap: 8px;
  background: rgba(6,3,18,0.98);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px; padding: 12px 14px;
  pointer-events: all;
  z-index: 20; width: 210px;
  max-height: 60vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.9), 0 0 0 1px rgba(139,92,246,0.2);
  scrollbar-width: none;
}
.gpo-map-tooltip::-webkit-scrollbar { display: none; }
.gmt-header {
  display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 8px;
}
.gmt-name {
  font-family: 'Rajdhani', sans-serif; font-size: 0.88rem; font-weight: 700;
  color: #fff; line-height: 1.2;
}
.gmt-status {
  font-family: 'Orbitron', sans-serif; font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.gmt-section { display: flex; flex-direction: column; gap: 4px; }
.gmt-section-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.48rem; font-weight: 700;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.28); margin-bottom: 2px;
}
.gmt-hist-row {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Rajdhani', sans-serif; font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}
.gmt-hist-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.gmt-dot-past    { background: #A78BFA; }
.gmt-dot-missed  { background: #7F1D1D; opacity: 0.5; }
.gmt-dot-today   { background: #FCD34D; box-shadow: 0 0 6px #FCD34D; }
.gmt-dot-future  { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); }
.gmt-hist-date { font-size: 0.75rem; }
.gmt-empty {
  font-family: 'Rajdhani', sans-serif; font-size: 0.72rem;
  color: rgba(255,255,255,0.2); font-style: italic;
}
.gmt-btn {
  margin-top: 2px; padding: 6px 10px; border-radius: 8px;
  background: rgba(139,92,246,0.22); border: 1px solid rgba(139,92,246,0.5);
  color: #A78BFA; font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
  letter-spacing: 0.06em; text-align: center;
  transition: background 0.15s;
}
.gmt-btn:hover { background: rgba(139,92,246,0.4); }
.gpo-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 0;
}
.gpo-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-family: "Satoshi", sans-serif; font-size: 12.5px;
  color: #b3a9d6; text-transform: none;
}
.gpo-legend-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
}

/* Bouton « Flash cards » — vrai bouton d'action (dégradé violet→magenta) */
#galaxy-planet-overlay .gpo-fc-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 14px; border: none; cursor: pointer;
  font-family: "Clash Display", sans-serif; font-weight: 600; font-size: 16px; text-transform: none;
  letter-spacing: 0; color: #fff;
  background: linear-gradient(105deg, #6d5dfc, #d65ad6);
  box-shadow: 0 14px 36px -12px rgba(150,70,230,.85);
  transition: transform .18s, box-shadow .18s;
}
#galaxy-planet-overlay .gpo-fc-btn:hover { transform: translateY(-2px); }
#galaxy-planet-overlay .gpo-fc-btn svg { width: 16px; height: 16px; }

/* ── Progress bar matière ── */
.gpo-progress-bar {
  height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 6px; overflow: hidden;
}
.gpo-progress-fill {
  height: 100%; border-radius: 2px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px currentColor;
}
.gpo-progress-label {
  font-family: "Satoshi", sans-serif; font-size: 13px;
  color: #b3a9d6; letter-spacing: 0; text-transform: none;
}
.gpo-chap-dots {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px;
}
.gpo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  opacity: 0.85;
}

/* ── Question "T'as combien de minutes ?" ── */
.gpo-time-ask {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 8px 0 4px;
}
.gpo-time-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.6); text-align: center;
}
.gpo-time-btns {
  display: flex; gap: 12px; align-items: flex-end;
}
.gpo-time-btn {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 14px 18px;
  cursor: pointer; transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.gpo-time-btn:hover {
  background: rgba(139,92,246,0.18);
  border-color: rgba(139,92,246,0.5);
  transform: translateY(-3px);
}
.gpo-time-btn-main {
  background: rgba(139,92,246,0.22);
  border-color: rgba(139,92,246,0.55);
  padding: 18px 24px;
  box-shadow: 0 0 20px rgba(139,92,246,0.3);
}
.gpo-time-btn-main:hover {
  background: rgba(139,92,246,0.35);
  box-shadow: 0 0 30px rgba(139,92,246,0.5);
}
.gpo-time-num {
  font-family: 'Orbitron', sans-serif; font-size: 1.6rem; font-weight: 900;
  color: #fff; line-height: 1;
}
.gpo-time-btn-main .gpo-time-num { font-size: 2rem; }
.gpo-time-unit {
  font-family: 'Rajdhani', sans-serif; font-size: 0.65rem; font-weight: 600;
  color: rgba(255,255,255,0.45); letter-spacing: 0.1em; margin-top: 3px;
}

/* Prochain chapitre suggéré */
.gpo-next-chap {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  width: 100%;
}
.gpo-next-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.3); text-transform: uppercase;
}
.gpo-next-name {
  font-family: 'Rajdhani', sans-serif; font-size: 0.92rem; font-weight: 700;
  color: #fff;
}
.gpo-next-since {
  font-family: 'Rajdhani', sans-serif; font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
}

/* Liste complète des chapitres */
.gpo-chap-list { display: flex; flex-direction: column; gap: 6px; }
.gpo-chap-list-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.25);
  margin-bottom: 4px;
}
.gpo-chap-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.gpo-chap-row:hover { background: rgba(255,255,255,0.09); }
.gpo-chap-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gpo-chap-name {
  flex: 1; font-family: 'Rajdhani', sans-serif; font-size: 0.85rem; font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.gpo-chap-since {
  font-family: 'Rajdhani', sans-serif; font-size: 0.68rem; font-weight: 600;
  white-space: nowrap;
}

.gps-chap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px;
  font-family: 'Rajdhani', sans-serif; font-size: 0.85rem; font-weight: 600;
}
.gps-chap-ok {
  background: rgba(30,200,120,0.08);
  border: 1px solid rgba(30,200,120,0.25);
  color: rgba(255,255,255,0.8);
}
.gps-chap-crisis {
  background: rgba(220,50,50,0.12);
  border: 1px solid rgba(220,80,60,0.45);
  color: #fff;
  animation: gps-shake 0.5s ease infinite alternate;
}
@keyframes gps-shake {
  0%   { transform: translateX(0); }
  100% { transform: translateX(3px); }
}
.gps-chap-name { flex: 1; }
.gps-chap-badge {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5); margin-left: 8px; white-space: nowrap;
}
.gps-chap-crisis .gps-chap-badge { color: #ff8070; }
.gps-empty {
  text-align: center; color: rgba(255,255,255,0.25);
  font-family: 'Rajdhani', sans-serif; font-size: 0.85rem; padding: 20px 0;
}

/* Tooltip clic planète */
.galaxy-tooltip {
  position: absolute; z-index: 10;
  background: rgba(6,3,22,0.93);
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 10px; padding: 7px 13px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Rajdhani', sans-serif; font-size: 0.82rem; font-weight: 600;
  color: rgba(255,255,255,0.88);
  pointer-events: none;
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap; backdrop-filter: blur(4px);
}
.galaxy-tooltip.visible { opacity: 1; transform: translateY(0); }
.gtt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gtt-date { font-size: 0.68rem; color: rgba(255,255,255,0.38); margin-left: 4px; }

/* Menu item galaxie */
.menu-nav-galaxy .mni-icon-wrap { background: rgba(167,139,250,0.12); }
.menu-nav-galaxy .mni-label { color: inherit; }

/* ═══════════════════════ NOTIF OUI/NON ═══════════════════════ */
.confirm-notif {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 32px;
  pointer-events: none;
}
.confirm-notif.hidden { display: none; }
.confirm-notif.visible { pointer-events: all; }
.confirm-notif-card {
  width: calc(100% - 32px); max-width: 400px;
  background: #1a1535;
  border: 1px solid rgba(127,119,221,0.4);
  border-radius: 20px;
  padding: 20px 20px 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(127,119,221,0.1);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transform: translateY(24px); opacity: 0;
  transition: transform 0.28s cubic-bezier(.22,1,.36,1), opacity 0.28s ease;
}
.confirm-notif.visible .confirm-notif-card {
  transform: translateY(0); opacity: 1;
}
.confirm-notif-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(127,119,221,0.15);
  display: flex; align-items: center; justify-content: center;
}
.confirm-notif-icon svg { width: 20px; height: 20px; stroke: #A89FF0; }
.confirm-notif-msg {
  font-family: 'Rajdhani', sans-serif; font-size: 0.95rem; font-weight: 600;
  color: rgba(255,255,255,0.85); text-align: center; line-height: 1.4; margin: 0;
}
.confirm-notif-actions {
  display: flex; gap: 10px; width: 100%;
}
.confirm-notif-yes {
  flex: 1;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; border-radius: 12px;
  font-family: 'Orbitron', sans-serif; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.05em; color: #fff; padding: 12px;
  cursor: pointer; transition: opacity 0.15s;
}
.confirm-notif-yes:hover { opacity: 0.88; }
.confirm-notif-no {
  flex: 1;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  font-family: 'Orbitron', sans-serif; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.05em; color: rgba(255,255,255,0.5); padding: 12px;
  cursor: pointer; transition: all 0.15s;
}
.confirm-notif-no:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75); }

/* ─── Misc utilities ─────────────────────────────────────── */
.show { display: flex !important; }

@media (max-height: 660px) {
  .landing-logo { font-size: 2.4rem; }
  .landing-avatar-wrap { width: 140px; height: 175px; }
  .landing-tagline { font-size: 0.85rem; }
}


/* ════════════════════════════════════════════════════════════
   EXIT GAME BUTTON
════════════════════════════════════════════════════════════ */
.btn-exit-game {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(239,68,68,0.15);
  border: 2px solid rgba(239,68,68,0.5);
  color: #f87171; font-size: 1.3rem; font-weight: 700;
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-exit-game:hover {
  background: rgba(239,68,68,0.3);
  border-color: var(--red); color: white;
  box-shadow: 0 0 16px rgba(239,68,68,0.4);
  transform: scale(1.1);
}


/* ════════════════════════════════════════════════════════════
   BASKET POPUP
════════════════════════════════════════════════════════════ */
.basket-popup-overlay {
  position: absolute; inset: 0;
  background: rgba(8,11,24,0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 950;
  display: flex; align-items: flex-end; justify-content: center;
}
.basket-popup-overlay.hidden { display: none; }
.basket-popup-card,
.basket-popup-card * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Restore specific colors inside basket */
.basket-popup-card .bes-val.gold,
.basket-popup-card .bpc-item-coins,
.basket-popup-card .bpc-item-coins svg { color: var(--gold) !important; -webkit-text-fill-color: var(--gold) !important; stroke: var(--gold) !important; }
.basket-popup-card .bes-val.red { color: #f87171 !important; -webkit-text-fill-color: #f87171 !important; }
.basket-popup-card .bes-val.green { color: #4ade80 !important; -webkit-text-fill-color: #4ade80 !important; }
.basket-popup-card .bpc-remove-btn,
.basket-popup-card .bpc-remove-btn svg { color: #f87171 !important; -webkit-text-fill-color: #f87171 !important; stroke: #f87171 !important; }
.basket-popup-card .bpc-item-icon-cal svg { stroke: var(--purple-l) !important; }
.basket-popup-card .bpc-item-icon-quest svg { stroke: #ffffff !important; }

.basket-popup-card {
  width: 100%; max-height: 82vh;
  color: #ffffff;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 20px 18px 28px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
  animation: slide-up 0.28s ease;
}
/* drag handle managed by JS */
.bpc-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.bpc-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  letter-spacing: 0.06em;
}
.bpc-cart-icon { width: 18px; height: 18px; stroke: #ffffff !important; flex-shrink: 0; }
.bpc-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff !important; cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s;
}
.bpc-close svg { width: 14px; height: 14px; stroke: #ffffff !important; }
.bpc-close:hover { background: rgba(255,255,255,0.2); }
.bpc-items {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0; /* required: lets flex child shrink so scroll kicks in */
}
/* Swipe-to-delete inside basket items */
#basket-popup-items .qswipe-wrap {
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0; /* never compress — let the container scroll instead */
}
#basket-popup-items .qswipe-del  { border-radius: 0 14px 14px 0; }
#basket-popup-items .qswipe-content.bpc-item {
  background: #1a1535;
  border-radius: 14px;
  min-height: 70px;
}
.bpc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  transition: background 0.15s;
  min-height: 70px;
  box-sizing: border-box;
}
.bpc-item:hover { background: rgba(255,255,255,0.08); }
.bpc-item-icon { flex-shrink: 0; display: grid; place-items: center; }
.bpc-item-icon-cal {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.3);
}
.bpc-item-icon-cal svg { width: 20px; height: 20px; stroke: #ffffff; }
.bpc-item-icon-quest {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  display: grid; place-items: center;
}
.bpc-item-icon-quest svg { width: 20px; height: 20px; stroke: #ffffff; }
.bpc-item-info { flex: 1; min-width: 0; }
.bpc-item-name {
  font-size: 0.82rem; font-weight: 600; color: #ffffff !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bpc-item-time { font-size: 0.68rem; color: rgba(255,255,255,0.6) !important; margin-top: 2px; }
.bpc-item-coins {
  display: flex; align-items: center; gap: 3px;
  font-size: 0.68rem; color: var(--gold); margin-top: 2px;
}
.bpc-item-coins svg { width: 10px; height: 10px; stroke: var(--gold); }
.bpc-item-energy-gain {
  display: flex; align-items: center; gap: 3px;
  font-size: 0.68rem; color: #4ade80 !important; margin-top: 2px; font-weight: 600;
}
.bpc-item-energy-gain svg { width: 10px; height: 10px; stroke: #4ade80 !important; }
.bpc-item-dur {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.7rem; font-weight: 600; color: #ffffff !important;
  white-space: nowrap; flex-shrink: 0;
}
.bpc-item-dur svg { width: 12px; height: 12px; }
.bpc-no-time-badge {
  font-size: 0.65rem; font-weight: 700;
  color: #c4b5fd; background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 20px; padding: 3px 9px;
  white-space: nowrap; flex-shrink: 0;
}
.bpc-remove-btn {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(239,68,68,0.18); border: 1px solid rgba(239,68,68,0.45);
  color: #f87171; cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s;
  flex-shrink: 0;
}
.bpc-remove-btn svg { width: 11px; height: 11px; stroke: #f87171; }
.bpc-remove-btn:hover { background: rgba(239,68,68,0.35); border-color: #f87171; }
.bpc-empty {
  text-align: center; padding: 32px 16px;
  color: rgba(255,255,255,0.7) !important; font-size: 0.85rem;
}
.bpc-footer { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.bpc-total { font-size: 0.8rem; color: var(--text2); }
.bpc-confirm-btn {
  margin-top: 0 !important;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%) !important;
  border: none !important;
  border-radius: 60px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 0 24px rgba(217,70,239,0.5), 0 0 14px rgba(6,182,212,0.25), 0 8px 32px rgba(0,0,0,0.35) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: hero-pulse 3s ease-in-out infinite;
  position: relative; overflow: hidden;
}
.bpc-confirm-btn::before {
  content: ''; position: absolute; top: 0; left: -75%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: left-shimmer 2.2s ease-in-out infinite;
  animation-delay: 0.6s;
  pointer-events: none; border-radius: inherit;
}
.bpc-confirm-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea, #c026d3) !important;
  transform: translateY(-1px);
}


/* ════════════════════════════════════════════════════════════
   DAILY PLAN — DRAGGABLE BLOCKS
════════════════════════════════════════════════════════════ */
.plan-body {
  flex: 1; overflow: hidden; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
.plan-body > * {
  width: 100%; max-width: 560px;
}
.plan-header-bar {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}
.plan-header-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(124,58,237,0.32);
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--purple-l);
}
.plan-header-icon svg { stroke: currentColor; }
.plan-date-info { display: flex; flex-direction: column; gap: 2px; }
.plan-date-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem; font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 0 12px rgba(96,165,250,0.4);
}
.plan-receipt-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--purple-l);
  opacity: 0.6;
  font-style: italic;
  text-transform: uppercase;
}
.plan-controls-row {
  display: flex; align-items: center; gap: 8px;
}
.plan-hint {
  flex: 1;
  font-size: 0.6rem; color: rgba(255,255,255,0.35);
  font-style: italic; letter-spacing: 0.02em; margin: 0;
}

/* ─── Undo / Redo ────────────────────────────────────────── */
.history-bar {
  display: flex; justify-content: flex-end; gap: 8px;
  flex-shrink: 0;
}
.history-btn {
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: 10px;
  color: var(--purple-l);
  width: 38px; height: 38px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, opacity 0.15s;
}
.history-btn svg { stroke: currentColor; }
.history-btn:hover:not(:disabled) { background: rgba(124,58,237,0.28); }
.history-btn:disabled { opacity: 0.25; cursor: not-allowed; }
/* ── Plan blocks: scrollable list container ── */
.plan-blocks {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 2px 0;
}
.plan-blocks::-webkit-scrollbar { width: 3px; }
.plan-blocks::-webkit-scrollbar-track { background: transparent; }
.plan-blocks::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.25); border-radius: 99px; }

/* ── Quest card list ── */
/* ── Dialogue "Commandement" ── */
.plan-dialogue {
  border: 1.5px solid rgba(34,211,238,0.45);
  border-radius: 12px;
  background:
    /* Scanlines texture */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(34,211,238,0.015) 3px,
      rgba(34,211,238,0.015) 4px
    ),
    rgba(34,211,238,0.05);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 0 24px rgba(34,211,238,0.12),
    0 0 60px rgba(34,211,238,0.05),
    inset 0 0 20px rgba(34,211,238,0.04);
  position: relative;
  animation: dialogue-border-pulse 3s ease-in-out infinite;
}
@keyframes dialogue-border-pulse {
  0%, 100% { border-color: rgba(34,211,238,0.38); box-shadow: 0 0 20px rgba(34,211,238,0.10); }
  50%       { border-color: rgba(34,211,238,0.65); box-shadow: 0 0 32px rgba(34,211,238,0.22), inset 0 0 20px rgba(34,211,238,0.06); }
}
/* Scan line qui descend continuellement */
.plan-dialogue::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(34,211,238,0.6) 40%, rgba(34,211,238,0.8) 50%, rgba(34,211,238,0.6) 60%, transparent 100%);
  animation: dialogue-scan-line 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes dialogue-scan-line {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 0.6; }
  100% { top: calc(100% + 2px); opacity: 0; }
}
.plan-dialogue-header {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  background: rgba(34,211,238,0.12);
  border-bottom: 1px solid rgba(34,211,238,0.25);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.44rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(34,211,238,0.9);
  text-shadow: 0 0 8px rgba(34,211,238,0.5);
}
.plan-dialogue-header svg { flex-shrink:0; opacity:0.7; }
.plan-dialogue-header span { flex:1; }
.plan-dialogue-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee, 0 0 16px rgba(34,211,238,0.5);
  flex-shrink: 0;
  animation: dialogue-ping 1.4s ease-in-out infinite;
}
@keyframes dialogue-ping {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22d3ee, 0 0 16px rgba(34,211,238,0.5); transform: scale(1); }
  50%       { opacity: 0.4; box-shadow: 0 0 2px #22d3ee; transform: scale(0.85); }
}
.plan-dialogue-text {
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem; font-weight: 500;
  line-height: 1.75;
  color: rgba(255,255,255,0.92);
  font-style: normal;
  letter-spacing: 0.015em;
  text-shadow: 0 0 20px rgba(34,211,238,0.12);
}

/* ── Chemin de quêtes (path timeline) ── */
.pqpath-list {
  display: flex; flex-direction: column;
  padding: 2px 0;
}
.pqpath-item {
  display: flex; gap: 10px; align-items: stretch;
}
.pqpath-spine {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; width: 30px;
}
.pqpath-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem; font-weight: 900;
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
.pqpath-trail {
  flex: 1; width: 2px; min-height: 6px;
  margin: 2px 0;
  border-radius: 2px;
}
.pqpath-item:last-child .pqpath-trail { display: none; }

.pqpath-card {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  padding: 9px 10px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
  cursor: grab;
  position: relative; overflow: hidden;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.pqpath-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pq-col, #a78bfa);
  border-radius: 3px 0 0 3px;
}
.pqpath-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  transform: translateX(2px);
}
.pqpath-card:active { cursor: grabbing; }

.pqpath-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pqpath-name {
  font-size: 0.8rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pqpath-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pqpath-cat {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.4rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.pqpath-time { display: flex; align-items: center; gap: 3px; font-size: 0.67rem; color: rgba(255,255,255,0.5); }
.pqpath-time svg { flex-shrink: 0; }
.pqpath-coins { display: flex; align-items: center; gap: 3px; font-size: 0.67rem; color: #fbbf24; font-weight: 600; }

.pqpath-remove {
  all: unset; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.pqpath-remove:hover { color: #f87171; background: rgba(239,68,68,0.12); }

/* Drag states */
.pqpath-card.pmp-dragging { opacity: 0.35; transform: scale(0.97); }
.pqpath-card.pmp-drag-over {
  background: rgba(99,102,241,0.22);
  border-color: rgba(167,139,250,0.7);
  box-shadow: 0 0 14px rgba(99,102,241,0.3);
  transform: translateY(-2px);
}
@keyframes pqc-flash {
  0%   { background: rgba(99,102,241,0.4); border-color: rgba(167,139,250,0.8); }
  100% { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
}
.pqpath-card.pmp-flash { animation: pqc-flash 0.5s ease forwards; }

.pqpath-empty {
  text-align: center; padding: 24px 16px;
  font-size: 0.75rem; color: rgba(255,255,255,0.3);
  font-style: italic; line-height: 1.6;
}

/* ── Ticket frame : 3 zones centrées ── */
#screen-daily-plan .plan-ticket-frame {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 560px;
  flex: 1;
  gap: 8px;
}

/* ── Colonnes latérales : chaque carte centrée dans sa zone ── */
.plan-side-col {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
}

/* Ticket au milieu */
#screen-daily-plan .plan-ticket-frame > .plan-parchment {
  flex: 0 0 56%;
  min-width: 0;
}

/* ── Mini cartes latérales : même design que le ticket ── */
.plan-brief-card {
  width: 100%;
  border-radius: 16px;
  padding: 18px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Shimmer sweep (même que parchment) */
.plan-brief-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    108deg,
    transparent 20%,
    rgba(255,255,255,0.02) 42%,
    rgba(255,255,255,0.04) 50%,
    rgba(255,255,255,0.02) 58%,
    transparent 80%
  );
  pointer-events: none; z-index: 0;
}
.plan-brief-card > * { position: relative; z-index: 1; }

/* ── Violet (durée) ── */
.plan-brief-card--purple {
  border: 1.5px solid rgba(139,92,246,0.5);
  background-image:
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 16 L2 2 L16 2' stroke='rgba(139,92,246,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L20 2 L20 16' stroke='rgba(139,92,246,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6 L2 20 L16 20' stroke='rgba(139,92,246,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 20 L20 20 L20 6' stroke='rgba(139,92,246,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    repeating-linear-gradient(45deg,  rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 12px),
    linear-gradient(175deg, #130b38 0%, #1a1050 45%, #0f0828 100%);
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-size: 22px 22px, 22px 22px, 22px 22px, 22px 22px, auto, auto, 100% 100%;
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.14),
    0 0 0 4px rgba(139,92,246,0.05),
    0 0 28px rgba(109,40,217,0.45),
    0 0 55px rgba(99,102,241,0.15),
    0 20px 60px rgba(0,0,0,0.88),
    inset 0 1px 0 rgba(255,255,255,0.09),
    inset 0 0 40px rgba(109,40,217,0.07);
}

/* ── Rose (récompense) ── */
.plan-brief-card--pink {
  border: 1.5px solid rgba(236,72,153,0.5);
  background-image:
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 16 L2 2 L16 2' stroke='rgba(236,72,153,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L20 2 L20 16' stroke='rgba(236,72,153,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6 L2 20 L16 20' stroke='rgba(236,72,153,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 20 L20 20 L20 6' stroke='rgba(236,72,153,0.65)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    repeating-linear-gradient(45deg,  rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 12px),
    linear-gradient(175deg, #2a0820 0%, #3b0f2a 45%, #1f0518 100%);
  background-position: 6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-size: 22px 22px, 22px 22px, 22px 22px, 22px 22px, auto, auto, 100% 100%;
  box-shadow:
    0 0 0 1px rgba(236,72,153,0.14),
    0 0 0 4px rgba(236,72,153,0.05),
    0 0 28px rgba(190,24,93,0.4),
    0 0 55px rgba(236,72,153,0.12),
    0 20px 60px rgba(0,0,0,0.88),
    inset 0 1px 0 rgba(255,255,255,0.09),
    inset 0 0 40px rgba(190,24,93,0.06);
}

.plan-brief-icon {
  color: rgba(255,255,255,0.7);
  line-height: 0;
}
.plan-brief-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.34rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  line-height: 1.3;
}
.plan-brief-val {
  font-size: 0.75rem; font-weight: 800;
  color: #fff;
  line-height: 1.25; text-align: center;
  word-break: break-word;
  padding: 0 2px;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* ── Totaux + Undo/Redo ── */
.plan-history-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; flex-shrink: 0;
}
.plan-history-btns { display: flex; gap: 4px; }
.plan-total-inline {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text2);
  display: flex; align-items: center; gap: 5px;
}
.plan-total-inline.gold { color: var(--gold); }

/* ── Plan block: 2-row iOS-premium layout ── */
.plan-block {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: all 0.2s;
  cursor: grab;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.plan-block:active { cursor: grabbing; }
.plan-block.drag-over {
  border-color: var(--purple-l);
  background: rgba(124,58,237,0.15);
  transform: scale(1.01);
}

/* Row 1: handle · num · icon · name · remove */
.pb-row-top {
  display: flex; align-items: center; gap: 8px;
}
/* Row 2: meta · time-wrap — indented to align under name */
.pb-row-bottom {
  display: flex; align-items: center; gap: 8px;
  padding-left: 88px; /* handle(14) + gap(8) + num(22) + gap(8) + icon(32) + gap(4) ≈ 88 */
}
.pb-remove {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  color: rgba(248,113,113,0.75);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}
.pb-remove svg { width: 10px; height: 10px; }
.pb-remove:hover {
  background: rgba(239,68,68,0.28);
  border-color: var(--red); color: white;
  transform: scale(1.12);
}
.pb-handle {
  color: var(--text3);
  cursor: grab; flex-shrink: 0; user-select: none;
  display: grid; place-items: center;
}
.pb-handle svg { stroke: currentColor; }
.pb-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700;
  color: var(--purple-l); letter-spacing: 0.1em;
  flex-shrink: 0; min-width: 22px;
  opacity: 0.7;
}
/* Category icon badge */
.pb-cat-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.pb-cat-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.pb-cat-revision  { background: rgba(124,58,237,0.2); border: 1px solid rgba(124,58,237,0.35); color: #a78bfa; }
.pb-cat-mandatory { background: rgba(59,130,246,0.18); border: 1px solid rgba(59,130,246,0.35); color: #93c5fd; }
.pb-cat-vitality  { background: rgba(236,72,153,0.18); border: 1px solid rgba(236,72,153,0.35); color: #f9a8d4; }
.pb-cat-catchup   { background: rgba(245,158,11,0.18); border: 1px solid rgba(245,158,11,0.35); color: #fcd34d; }
.pb-cat-prep      { background: rgba(16,185,129,0.18); border: 1px solid rgba(16,185,129,0.35); color: #6ee7b7; }
.pb-cat-default   { background: rgba(124,58,237,0.14); border: 1px solid rgba(124,58,237,0.28); color: #a78bfa; }
.pb-name {
  flex: 1; min-width: 0;
  font-size: 0.97rem; font-weight: 700; color: var(--text);
  letter-spacing: 0.01em; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-meta {
  flex: 1; font-size: 0.78rem; color: var(--text2);
  display: flex; align-items: center; gap: 4px;
}
.pb-meta svg { flex-shrink: 0; }
.pb-time-wrap { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.pb-time-input {
  width: 68px; padding: 5px 8px;
  background: var(--bg3); border: 1px solid var(--card-border);
  border-radius: 999px; color: var(--text);
  font-size: 0.68rem; font-weight: 600; font-family: 'Inter', sans-serif;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
.pb-time-input:focus { outline: none; border-color: var(--purple); background: rgba(124,58,237,0.08); }
.pb-arrows { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.pb-arrow {
  width: 22px; height: 22px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 7px; color: var(--text2);
  cursor: pointer;
  display: grid; place-items: center; transition: all 0.15s;
}
.pb-arrow svg { width: 10px; height: 10px; stroke: currentColor; }
.pb-arrow:hover { background: rgba(124,58,237,0.2); color: var(--purple-l); border-color: var(--purple); }
.pb-arrow:disabled { opacity: 0.2; cursor: not-allowed; }

/* ── Parchment title ── */
/* ── Mission top block ── */
.plan-mission-top {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-bottom: 4px;
}
.plan-mission-top-right {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 100%;
}

/* Badge importance */
.plan-mission-badge {
  display: inline-flex; align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem; font-weight: 900; letter-spacing: 0.15em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.badge-critical {
  background: rgba(239,68,68,0.18);
  border: 1.5px solid rgba(239,68,68,0.6);
  color: #fca5a5;
  box-shadow: 0 0 14px rgba(239,68,68,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: badge-pulse 2s ease-in-out infinite;
}
.badge-high {
  background: rgba(251,146,60,0.18);
  border: 1.5px solid rgba(251,146,60,0.55);
  color: #fdba74;
  box-shadow: 0 0 14px rgba(251,146,60,0.2);
}
.badge-normal {
  background: rgba(34,211,238,0.12);
  border: 1.5px solid rgba(34,211,238,0.4);
  color: #67e8f9;
  box-shadow: 0 0 10px rgba(34,211,238,0.15);
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(239,68,68,0.25); }
  50%       { box-shadow: 0 0 28px rgba(239,68,68,0.55); }
}

.plan-parchment-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: center;
}
body:not(.light-theme) .plan-parchment-title {
  background: linear-gradient(135deg, #fff 0%, #67e8f9 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(34,211,238,0.45));
}
body.light-theme .plan-parchment-title { color: #2e1065; }

.plan-date-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem; font-weight: 500;
  color: rgba(255,255,255,0.45);
  text-transform: capitalize;
  letter-spacing: 0.04em;
}

/* ── Séparateur avec étoile ── */
.plan-sep {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.plan-sep-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.35), transparent);
}
.plan-sep-star {
  color: rgba(34,211,238,0.6);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(34,211,238,0.5));
}

/* ── Message narratif ── */
.plan-mission-msg {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem; font-weight: 400;
  line-height: 1.6;
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ── Tampon circulaire MISSION APPROUVÉE ── */
.plan-stamp {
  display: flex; justify-content: center; align-items: center;
  flex-shrink: 0; padding-top: 4px;
  opacity: 0;
  pointer-events: none;
}
.plan-stamp.stamp-visible {
  opacity: 1;
  pointer-events: auto;
}
.plan-stamp-inner {
  width: 116px; height: 116px;
  border-radius: 50%;
  border: 3px solid rgba(74,222,128,0.88);
  /* double-ring: outer border + inner inset ring */
  box-shadow:
    inset 0 0 0 8px rgba(74,222,128,0.0),
    inset 0 0 0 9px rgba(74,222,128,0.28),
    0 0 0 2px rgba(74,222,128,0.18),
    0 0 40px rgba(74,222,128,0.55),
    0 0 80px rgba(74,222,128,0.2);
  background: rgba(74,222,128,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: rgba(74,222,128,0.9);
  transform: rotate(-12deg);
  transform-origin: center center;
  position: relative;
}
.plan-stamp-inner::before {
  /* dashed inner decorative ring */
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1.5px dashed rgba(74,222,128,0.3);
  pointer-events: none;
}
.plan-stamp-check {
  color: rgba(74,222,128,0.95);
  filter: drop-shadow(0 0 8px rgba(74,222,128,0.7));
  flex-shrink: 0;
}
.plan-stamp-word {
  font-size: 0.38rem;
  line-height: 1.1;
  text-align: center;
  color: rgba(74,222,128,0.88);
  text-shadow: 0 0 10px rgba(74,222,128,0.5);
}
@keyframes stamp-drop {
  0%   { transform: scale(4) rotate(-20deg); opacity: 0; filter: blur(4px); }
  28%  { transform: scale(0.78) rotate(-10deg); opacity: 1; filter: blur(0); }
  48%  { transform: scale(1.15) rotate(-13deg); opacity: 1; }
  65%  { transform: scale(0.91) rotate(-11deg); opacity: 1; }
  80%  { transform: scale(1.05) rotate(-12.5deg); opacity: 1; }
  92%  { transform: scale(0.97) rotate(-11.8deg); opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: 1; }
}
.plan-stamp-inner.stamp-animate {
  animation: stamp-drop 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* Onde de choc sur le ticket */
@keyframes ticket-wave {
  0%   { transform: translateY(0) scale(1) rotate(0deg); }
  10%  { transform: translateY(-8px) scale(1.008) rotate(-0.6deg); }
  24%  { transform: translateY(6px) scale(0.994) rotate(0.5deg); }
  38%  { transform: translateY(-4px) scale(1.003) rotate(-0.3deg); }
  52%  { transform: translateY(2.5px) scale(0.998) rotate(0.2deg); }
  66%  { transform: translateY(-1.5px) scale(1.001) rotate(-0.1deg); }
  80%  { transform: translateY(0.8px) scale(1) rotate(0deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}
.plan-parchment.ticket-impact {
  animation: ticket-wave 0.75s ease-out forwards;
}



/* ════════════════════════════════════════════════════════════
   PERSONA % BARS IN MENU
════════════════════════════════════════════════════════════ */
.persona-score-row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 0;
  border-bottom: 1px solid var(--card-border);
}
.persona-score-row:last-child { border-bottom: none; }
.psr-top {
  display: flex; justify-content: space-between; align-items: center;
}
.psr-name {
  font-size: 0.8rem; font-weight: 600; color: var(--text);
}
.psr-pct {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem; font-weight: 700; color: var(--purple-l);
}
.psr-bar-bg {
  height: 6px; background: var(--bg3);
  border-radius: 3px; overflow: hidden;
}
.psr-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--purple), var(--neon));
  transition: width 0.6s ease;
}
.psr-bar-fill.dominant { background: linear-gradient(90deg, var(--neon), var(--gold)); }
.persona-advice-box {
  margin-top: 12px; padding: 12px;
  background: rgba(124,58,237,0.1);
  border: 1px solid var(--purple-d);
  border-radius: var(--r-sm);
  font-size: 0.78rem; color: var(--text2);
  line-height: 1.5;
}


/* ════════════════════════════════════════════════════════════
   AGENDA EDITABLE (Obligatoire rayon)
════════════════════════════════════════════════════════════ */
/* ── Calendar 2026 ── */
.cal-view-toggle {
  display: flex; gap: 4px;
  margin-bottom: 10px;
}
.cal-view-btn {
  flex: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.25);
  border-radius: 8px;
  color: rgba(96,165,250,0.7);
  padding: 5px 4px;
  cursor: pointer; transition: all 0.15s;
}
.cal-view-btn:hover { background: rgba(96,165,250,0.18); color: #60a5fa; border-color: rgba(96,165,250,0.5); }
.cal-view-btn.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #fff;
  box-shadow: 0 0 10px rgba(96,165,250,0.35);
}
/* Week strip */
/* Day view label */
.cal-today-label { color: #c4b5fd !important; }

/* ── Week/Day header row ── */
.cal-week-header {
  display: grid;
  grid-template-columns: 28px repeat(7, 1fr);
  gap: 2px; margin-bottom: 2px;
}
.cwh-spacer {}
.cwh-day {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 2px; border-radius: 8px; cursor: pointer;
  transition: background 0.12s;
}
.cwh-day:hover { background: rgba(139,92,246,0.2); }
.cwh-day.cal-today { background: rgba(139,92,246,0.2); border: 1px solid rgba(139,92,246,0.4); }
.cwh-day.cal-selected { background: #7c3aed; }
.cwh-dname {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.36rem; font-weight: 700;
  color: rgba(255,255,255,0.4); text-transform: uppercase;
}
.cwh-day.cal-selected .cwh-dname,
.cwh-day.cal-today .cwh-dname { color: rgba(255,255,255,0.8); }
.cwh-dnum {
  font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.7);
}
.cwh-day.cal-selected .cwh-dnum { color: #fff; }

/* ── Time grid (shared week + day) ── */
.cal-tgrid {
  display: grid;
  grid-auto-rows: 19px;
  overflow-y: auto;
  max-height: 300px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}
.ctg-hour {
  font-family: 'Inter', sans-serif;
  font-size: 0.48rem; font-weight: 500;
  color: rgba(255,255,255,0.28);
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 3px 5px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.1);
  position: relative; z-index: 0;
}
.ctg-slot {
  border-left: 1px solid rgba(255,255,255,0.04);
}
.ctg-slot.ctg-slot-hour { border-top: 1px solid rgba(255,255,255,0.05); }
.ctg-slot.ctg-slot-half { border-top: 1px dashed rgba(255,255,255,0.02); }

/* Light mode time grid */
body.light-theme .cal-tgrid {
  background: rgba(237,233,254,0.3);
  border-color: rgba(109,40,217,0.1);
}
body.light-theme .ctg-hour {
  color: rgba(109,40,217,0.5);
  background: rgba(221,214,254,0.4);
  border-top-color: rgba(109,40,217,0.08);
}
body.light-theme .ctg-slot { border-left-color: rgba(109,40,217,0.06); }
body.light-theme .ctg-slot.ctg-slot-hour { border-top-color: rgba(109,40,217,0.1); }
body.light-theme .ctg-slot.ctg-slot-half { border-top-color: rgba(109,40,217,0.04); }
.ctg-event {
  background: rgba(124,58,237,0.65);
  border-left: 3px solid #8b5cf6;
  border-radius: 5px;
  margin: 2px 3px;
  padding: 3px 5px;
  overflow: hidden;
  z-index: 2;
  display: flex; flex-direction: column; gap: 1px;
  cursor: pointer;
  transition: background 0.12s;
}
.ctg-event:hover { background: rgba(124,58,237,0.25); }
.ctg-missed {
  background: rgba(248,113,113,0.3);
  border-left-color: #f87171;
}
.ctg-ename {
  font-size: 0.55rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ctg-etime {
  font-size: 0.44rem; color: rgba(255,255,255,0.65);
}

.agenda-cal-wrap {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 12px 10px 8px;
  margin-bottom: 12px;
}
.agenda-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; padding: 0 2px;
}
.cal-month-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.9); letter-spacing: 0.04em; text-transform: uppercase;
}
.cal-nav-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5); font-size: 1rem; font-weight: 400;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color 0.15s;
}
.cal-nav-btn:hover:not(:disabled) { color: #fff; }
.cal-nav-btn:disabled { opacity: 0.25; cursor: default; }
.agenda-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day-hdr {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem; font-weight: 700;
  color: rgba(96,165,250,0.85); text-align: center;
  padding: 4px 0 5px; text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(96,165,250,0.08);
  border-radius: 4px;
}
.cal-cell {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem; font-weight: 400;
  color: rgba(255,255,255,0.50);   /* défaut : neutre */
  text-align: center;
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 0;
}
.cal-cell:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.cal-cell.cal-empty { cursor: default; pointer-events: none; }

/* ── Passé : sombre, discret ── */
.cal-cell.cal-day-past,
.cal-cell.cal-day-missed { color: rgba(255,255,255,0.18); font-weight: 400; }
.cal-cell.cal-day-past:hover,
.cal-cell.cal-day-missed:hover { color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.04); }

/* ── Aujourd'hui : vert ── */
.cal-cell.cal-today {
  color: #4ade80; font-weight: 700;
  border: 1.5px solid rgba(74,222,128,0.65);
  background: rgba(74,222,128,0.07);
}

/* ── Futur : bleu premium ── */
.cal-cell.cal-day-future { color: rgba(96,165,250,0.9); font-weight: 600; }
.cal-cell.cal-day-done,
.cal-cell.cal-has-items { color: rgba(96,165,250,0.75); font-weight: 500; }

/* ── Jour sélectionné : disque plein ── */
.cal-cell.cal-selected {
  background: rgba(255,255,255,0.18);
  color: #fff; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: none;
}
.cal-cell.cal-selected:hover { background: rgba(255,255,255,0.24); }

/* today + selected : disque vert */
.cal-cell.cal-selected.cal-today {
  background: rgba(74,222,128,0.25);
  border: 1.5px solid rgba(74,222,128,0.70);
  color: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,0.25);
}

/* ── Dots ── */
.cal-dots-row {
  display: flex; gap: 2px; align-items: center;
  justify-content: center; margin-top: 1px;
  min-height: 5px; flex-wrap: wrap;
}
.cal-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(96,165,250,0.75);  /* bleu — couleur universelle */
  display: block; flex-shrink: 0; transition: background 0.15s;
}
/* passé manqué : bleu discret */
.cal-dot.cal-dot-missed { background: rgba(96,165,250,0.35); }
/* passé validé : bleu très discret */
.cal-dot.cal-dot-past,
.cal-dot.cal-dot-done  { background: rgba(96,165,250,0.28); }
/* futur : bleu vif */
.cal-dot.cal-dot-future { background: rgba(96,165,250,0.80); }
/* aujourd'hui : bleu brillant */
.cal-cell.cal-today .cal-dot { background: rgba(96,165,250,0.95); }

.cal-galaxy-dot {
  width: 4px; height: 4px; border-radius: 50%;
  display: block; flex-shrink: 0;
  box-shadow: 0 0 3px currentColor; opacity: 0.75;
}
.cal-cell.cal-selected .cal-dot { background: rgba(255,255,255,0.85); }
.cal-cell.cal-selected .cal-galaxy-dot { opacity: 1; }

/* ── Vue semaine — états ── */
.cwh-day.cal-day-past .cwh-dnum,
.cwh-day.cal-day-missed .cwh-dnum  { color: rgba(255,255,255,0.22); }
.cwh-day.cal-today .cwh-dnum       { color: #4ade80; }
.cwh-day.cal-day-future .cwh-dnum,
.cwh-day.cal-day-done .cwh-dnum    { color: rgba(255,255,255,0.85); }
/* Override when selected */
.cwh-day.cal-selected .cwh-dnum,
.cwh-day.cal-selected.cal-day-past .cwh-dnum,
.cwh-day.cal-selected.cal-day-missed .cwh-dnum,
.cwh-day.cal-selected.cal-day-done .cwh-dnum,
.cwh-day.cal-selected.cal-day-future .cwh-dnum { color: #fff; }

.agenda-editable-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 10px;
}
.agenda-today-label {
  font-size: 0.78rem; color: var(--purple-l);
  text-transform: capitalize; font-weight: 600;
}
.btn-add-agenda {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px;
  background: rgba(96,165,250,0.05);
  border: 1px solid rgba(96,165,250,0.28);
  border-radius: 14px;
  color: rgba(147,197,253,0.85);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s, color 0.18s;
  letter-spacing: 0.04em;
  -webkit-text-fill-color: initial;
}
.btn-add-agenda:hover {
  background: rgba(96,165,250,0.11);
  border-color: rgba(96,165,250,0.55);
  color: #bfdbfe;
  -webkit-text-fill-color: initial;
  box-shadow: 0 4px 18px rgba(96,165,250,0.22), 0 0 8px rgba(96,165,250,0.12);
  transform: translateY(-2px);
}
.btn-add-agenda:active { transform: translateY(0); box-shadow: 0 1px 6px rgba(96,165,250,0.15); }
body.light-theme .btn-add-agenda {
  background: rgba(96,165,250,0.08); border-color: rgba(59,130,246,0.35); color: #1d4ed8;
  -webkit-text-fill-color: initial;
}
body.light-theme .btn-add-agenda:hover { background: rgba(96,165,250,0.15); border-color: rgba(59,130,246,0.6); }
/* ── Add button above calendar ── */
.btn-add-agenda-top {
  width: 100%; margin-bottom: 10px;
}

/* ── New agenda add form ── */
.agenda-add-form {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  margin-bottom: 10px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.aaf-subject {
  width: 100%; padding: 13px 14px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 12px;
  color: var(--text); font-size: 0.9rem; font-weight: 500;
  box-sizing: border-box;
  transition: background 0.15s;
}
.aaf-subject:focus { outline: none; background: rgba(124,58,237,0.12); }
.aaf-subject::placeholder { color: var(--text3); }

/* iOS-style grouped card */
.aaf-ios-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
}
.aaf-ios-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; gap: 8px;
}
.aaf-ios-row-sep { border-bottom: 1px solid rgba(255,255,255,0.07); }
.aaf-ios-lbl {
  font-size: 0.78rem; font-weight: 500; color: var(--text2);
  flex-shrink: 0;
}
.aaf-required { color: #a78bfa; font-size: 0.7rem; }
.aaf-ios-inp {
  background: transparent; border: none;
  color: var(--text); font-size: 0.82rem; font-weight: 500;
  text-align: right; width: auto;
  -moz-appearance: textfield;
}
.aaf-ios-inp:focus { outline: none; }
.aaf-ios-inp::-webkit-inner-spin-button,
.aaf-ios-inp::-webkit-outer-spin-button { -webkit-appearance: none; }
.aaf-ios-inp::placeholder { color: var(--text3); }
.aaf-date { min-width: 0; flex: 1; text-align: right; }
.aaf-hm-wrap {
  display: flex; align-items: center; gap: 2px;
}
.aaf-hm-inp { width: 34px; text-align: center; }
.aaf-hm-sep { color: var(--text3); font-size: 0.85rem; font-weight: 600; padding: 0 1px; }

.aaf-types {
  display: flex; gap: 6px;
}
.aaf-type-btn {
  flex: 1; padding: 8px 4px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 0.62rem; font-weight: 700; color: var(--text3);
  cursor: pointer; transition: all 0.18s;
  font-family: 'Orbitron', sans-serif; letter-spacing: 0.03em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.aaf-type-icon { display: flex; align-items: center; justify-content: center; }
.aaf-type-icon svg { width: 20px; height: 20px; }
.aaf-type-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); border-color: rgba(255,255,255,0.2); }
.aaf-type-btn.active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.15);
}
.aaf-prep-check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 8px;
  cursor: pointer;
}
.aaf-prep-check input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: #4ade80; cursor: pointer; flex-shrink: 0;
}
.aaf-prep-check-label {
  font-size: 0.65rem; font-weight: 700;
  color: #4ade80; font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.aaf-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ── Prep add form ── */
.prep-add-form {
  background: var(--card-bg); border: 1.5px solid var(--purple);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 10px;
}
.pf-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pf-label { font-size: 0.72rem; color: var(--text2); flex-shrink: 0; }
.pf-input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  padding: 7px 10px; color: var(--text); font-size: 0.8rem;
}
.pf-input-sm { flex: 0 0 60px; text-align: center; }
.pf-input:focus { outline: none; border-color: var(--purple-l); }

/* ── Inline slot editing ── */
.ctg-slot-editing {
  background: rgba(124,58,237,0.15) !important;
  border: 1px dashed rgba(124,58,237,0.6) !important;
  z-index: 3;
}
.inline-slot-input {
  width: 100%; height: 100%;
  background: transparent; border: none;
  color: #fff; font-size: 0.6rem; padding: 2px 4px;
  font-family: 'Inter', sans-serif;
}
.inline-slot-input:focus { outline: none; }

/* ── Type colors in grid ── */
.ctg-exam  { background: rgba(239,68,68,0.5);  border-left-color: #ef4444; }
.ctg-rdv   { background: rgba(34,197,94,0.4);  border-left-color: #22c55e; }
.ctg-tdtp  { background: rgba(251,191,36,0.4); border-left-color: #fbbf24; }

/* ── Item type badge ── */
.aei-badge {
  font-size: 0.58rem; font-weight: 700;
  opacity: 0.8; margin-left: 4px;
}

/* legacy form (keep for compatibility) */
.agenda-form-row { display: flex; gap: 8px; align-items: center; }
.agenda-form-label { font-size: 0.7rem; color: var(--text2); min-width: 52px; }
.agenda-form-input {
  flex: 1; padding: 7px 10px;
  background: var(--bg3); border: 1px solid var(--card-border);
  border-radius: var(--r-sm); color: var(--text); font-size: 0.8rem;
  transition: border-color 0.2s;
}
.agenda-form-input:focus { outline: none; border-color: var(--purple); }
.agenda-form-time { width: 64px; text-align: center; }
.agenda-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-agenda-add-confirm {
  flex: 1; padding: 13px;
  background: #7c3aed;
  border: none;
  border-radius: 14px; color: #fff; -webkit-text-fill-color: #fff;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
  transition: all 0.18s;
  font-family: 'Inter', sans-serif; letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-agenda-add-confirm:hover {
  background: #6d28d9;
  box-shadow: 0 6px 18px rgba(124,58,237,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-1px);
}
.btn-agenda-add-confirm:active { transform: translateY(0); }
.btn-agenda-add-cancel {
  padding: 13px 18px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px; color: rgba(255,255,255,0.55);
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  transition: all 0.18s; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-family: 'Orbitron', sans-serif; letter-spacing: 0.04em;
}
.btn-agenda-add-cancel:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.22); }
.agenda-empty-hint {
  text-align: center; padding: 28px 16px;
  color: var(--text3); font-size: 0.82rem; line-height: 1.6;
}
.agenda-past-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(248,113,113,0.3);
  border-left: 3px solid #f87171;
  border-radius: 14px;
  cursor: pointer; transition: all 0.18s;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.agenda-past-banner:hover { background: rgba(248,113,113,0.1); }
.agenda-past-banner > svg { width: 18px; height: 18px; stroke: #f87171; flex-shrink: 0; }
.apb-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  color: #fca5a5; margin-bottom: 2px;
}
.apb-sub { font-size: 0.7rem; color: rgba(255,255,255,0.45); line-height: 1.4; }
.apb-sub strong { color: #fca5a5; }

/* ─── Agenda accordion items ─── */
.agenda-editable-item {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 18px; /* match qswipe-wrap to prevent gap bleed */
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
  cursor: default;
}
/* Color states */
.agenda-editable-item.aei-upcoming {
  border-color: rgba(34,197,94,0.45);
  background: rgba(34,197,94,0.05);
}
.agenda-editable-item.aei-overdue {
  border-color: rgba(239,68,68,0.45);
  background: rgba(239,68,68,0.05);
}
.agenda-editable-item.aei-selected {
  border-color: rgba(139,92,246,0.5);
  background: rgba(139,92,246,0.07);
}
.agenda-editable-item.aei-today {
  border-color: rgba(127,119,221,0.3);
  background: rgba(127,119,221,0.04);
}
/* Compact row */
.aei-compact {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 12px 12px 0; /* left padding handled by .aei-plan-check margin-left */
  cursor: pointer; user-select: none;
}
.aei-compact:active { opacity: 0.8; }
/* Left color bar */
.aei-color-bar {
  width: 4px; flex-shrink: 0; border-radius: 0 3px 3px 0;
  align-self: stretch; min-height: 36px;
  background: rgba(255,255,255,0.15);
}
.aei-upcoming  .aei-color-bar { background: #22c55e; }
.aei-overdue   .aei-color-bar { background: #ef4444; }
.aei-selected  .aei-color-bar { background: #8b5cf6; }
.aei-today     .aei-color-bar { background: rgba(127,119,221,0.6); }
.aei-compact-body { flex: 1; min-width: 0; }
.aei-compact-top {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.aei-subject-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem; font-weight: 700; color: var(--text);
  word-break: break-word;
}
.aei-compact-time {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem; color: rgba(255,255,255,0.5);
  margin-top: 3px;
}
.aei-upcoming  .aei-compact-time { color: rgba(134,239,172,0.8); }
.aei-overdue   .aei-compact-time { color: rgba(252,165,165,0.8); }
.aei-chevron {
  width: 16px; height: 16px; flex-shrink: 0;
  stroke: rgba(255,255,255,0.3);
  transition: transform 0.22s ease;
  margin-right: 10px;
}
.aei-open .aei-chevron { transform: rotate(180deg); }
/* Expanded section */
.aei-expanded {
  max-height: 0; overflow: hidden;
  transition: max-height 0.28s cubic-bezier(0.25,0.46,0.45,0.94);
  border-top: 0px solid rgba(255,255,255,0.07);
}
.aei-open .aei-expanded {
  max-height: 160px;
  border-top-width: 1px;
}
.aei-expand-actions {
  display: flex; gap: 8px; padding: 10px 12px 12px;
  flex-wrap: wrap;
}
.aei-validate {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid rgba(139,92,246,0.4);
  background: rgba(139,92,246,0.1);
  color: var(--purple-l);
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.aei-validate svg { width: 13px; height: 13px; stroke: var(--purple-l); }
.aei-validate:hover { background: rgba(139,92,246,0.2); border-color: var(--purple-l); }
.aei-validate.aei-validate-on {
  background: rgba(139,92,246,0.25); border-color: var(--purple-l);
}
.aei-validate.aei-validate-on svg { stroke: #c4b5fd; }
.aei-prep-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid rgba(96,165,250,0.3);
  background: rgba(96,165,250,0.08);
  color: rgba(196,181,253,0.9);
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.aei-prep-btn input[type="checkbox"] { display: none; }
.aei-prep-icon { display: flex; align-items: center; }
.aei-prep-icon svg { width: 14px; height: 14px; stroke: rgba(96,165,250,0.7); }
.aei-prep-btn input:checked ~ .aei-prep-icon svg { stroke: #a78bfa; }
.aei-prep-btn:hover { background: rgba(96,165,250,0.15); border-color: rgba(96,165,250,0.5); }
.aei-edit-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.aei-edit-btn svg { width: 13px; height: 13px; stroke: rgba(255,255,255,0.5); }
.aei-edit-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }
/* Plan checkbox button (left of compact row) — square shape */
.aei-plan-check {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  border: 2px solid rgba(139,92,246,0.4);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s;
  margin-left: 12px; margin-right: 4px; /* push away from left edge */
  -webkit-tap-highlight-color: transparent;
}
.aei-plan-check:hover { border-color: rgba(139,92,246,0.7); background: rgba(139,92,246,0.08); }
.aei-plan-check.aei-plan-on {
  background: linear-gradient(135deg, #7c3aed, #60a5fa);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(139,92,246,0.5);
}
.aei-plan-check.aei-plan-on svg { width: 13px; height: 13px; stroke: #fff; }
/* Red delete button inside expanded */
.aei-del-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid rgba(239,68,68,0.35);
  background: rgba(239,68,68,0.08);
  color: rgba(248,113,113,0.85);
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.aei-del-btn svg { width: 13px; height: 13px; stroke: rgba(248,113,113,0.85); }
.aei-del-btn:hover { background: rgba(239,68,68,0.18); border-color: #ef4444; color: #f87171; }
/* Calendar event color states */
.ctg-event.ctg-selected    { background: rgba(139,92,246,0.45) !important; border-left-color: #a78bfa !important; }
.ctg-event.ctg-upcoming-ev { background: rgba(34,197,94,0.25)  !important; border-left-color: #22c55e !important; }
/* Tab pulse animation for prep shooting star target */
@keyframes tab-pulse-anim {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 16px rgba(167,139,250,0.6); }
}
.shop-tab.tab-pulse { animation: tab-pulse-anim 0.6s ease; }

/* ─── Apple Calendar-style Event Popup ─── */
.aep-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,0);
  display: flex; align-items: flex-end; justify-content: center;
  transition: background 0.25s;
  pointer-events: none;
}
.aep-overlay.aep-visible {
  background: rgba(0,0,0,0.55);
  pointer-events: all;
}
.aep-card {
  width: 100%; max-width: 480px;
  background: #1a1535;
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 24px 24px 0 0;
  padding: 0 0 32px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 -2px 0 rgba(139,92,246,0.15);
}
.aep-overlay.aep-visible .aep-card { transform: translateY(0); }
.aep-drag-knob {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
  margin: 12px auto 0;
}
.aep-header {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px 14px;
}
.aep-color-strip {
  width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; min-height: 40px;
}
.aep-info { flex: 1; min-width: 0; }
.aep-subject {
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 1rem; color: #fff; line-height: 1.3;
  word-break: break-word; margin-bottom: 5px;
}
.aep-meta {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-family: 'Inter', sans-serif; font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
}
.aep-date { color: rgba(255,255,255,0.6); }
.aep-time { color: rgba(196,181,253,0.85); font-weight: 600; }
.aep-dur  { color: rgba(255,255,255,0.4); }
.aep-close-btn {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.08); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.aep-close-btn svg { width: 14px; height: 14px; stroke: rgba(255,255,255,0.6); }
.aep-close-btn:hover { background: rgba(255,255,255,0.15); }
.aep-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
  margin-top: 2px;
}
.aep-action-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 22px;
  border: 1.5px solid rgba(139,92,246,0.3);
  background: rgba(139,92,246,0.08);
  color: rgba(196,181,253,0.9);
  font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.aep-action-btn svg { width: 14px; height: 14px; stroke: rgba(196,181,253,0.7); flex-shrink: 0; }
.aep-action-btn:hover { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.6); }
.aep-action-btn.aep-action-on {
  background: rgba(139,92,246,0.25); border-color: rgba(139,92,246,0.6); color: #c4b5fd;
}
.aep-action-btn.aep-action-prep { border-color: rgba(96,165,250,0.3); }
.aep-action-btn.aep-action-danger {
  border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.07);
  color: rgba(248,113,113,0.85);
}
.aep-action-btn.aep-action-danger svg { stroke: rgba(248,113,113,0.7); }
.aep-action-btn.aep-action-danger:hover { background: rgba(239,68,68,0.15); border-color: #ef4444; }
body.light-theme .aep-card { background: #fff; border-color: rgba(0,0,0,0.08); box-shadow: 0 -8px 40px rgba(0,0,0,0.15); }
body.light-theme .aep-subject { color: #1e1b4b; }
body.light-theme .aep-date { color: rgba(30,27,75,0.6); }
body.light-theme .aep-time { color: #6d28d9; }
body.light-theme .aep-dur  { color: rgba(30,27,75,0.4); }
body.light-theme .aep-drag-knob { background: rgba(0,0,0,0.12); }
body.light-theme .aep-close-btn { background: rgba(0,0,0,0.06); }
body.light-theme .aep-close-btn svg { stroke: rgba(30,27,75,0.5); }
body.light-theme .aep-action-btn { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.2); color: #4c1d95; }
body.light-theme .aep-action-btn svg { stroke: #6d28d9; }
body.light-theme .aep-action-btn:hover { background: rgba(124,58,237,0.12); }
body.light-theme .aep-action-btn.aep-action-on { background: rgba(124,58,237,0.15); }
body.light-theme .aep-action-btn.aep-action-danger { color: #b91c1c; background: rgba(239,68,68,0.05); }
body.light-theme .aep-action-btn.aep-action-danger svg { stroke: #b91c1c; }

/* Legacy — kept for compat */
.aei-prep-toggle {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 2px;
}
.aei-duration { font-size: 0.65rem; color: var(--text3); margin-top: 2px; }

.aei-delete {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(239,68,68,0.08); border: 1.5px solid rgba(239,68,68,0.35);
  color: rgba(248,113,113,0.6); cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s; flex-shrink: 0;
}
.aei-delete svg { width: 12px; height: 12px; }
.aei-delete:hover { background: rgba(239,68,68,0.2); border-color: var(--red); color: #f87171; transform: scale(1.1); }

.agenda-hint-footer {
  padding: 4px 4px 8px; text-align: center;
}
.ahf-missed {
  display: inline-block;
  font-size: 0.65rem; font-weight: 600; color: #fca5a5;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 20px; padding: 3px 10px;
}

/* Galaxy spaced-repetition reviews in agenda */
.agenda-galaxy-reviews {
  margin: 10px 0 4px;
  border-radius: 12px;
  border: 1px solid rgba(139,92,246,0.2);
  background: rgba(109,40,217,0.07);
  overflow: hidden;
}
.agr-header {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.12em;
  color: #a78bfa; text-transform: uppercase;
  border-bottom: 1px solid rgba(139,92,246,0.12);
}
.agr-header svg { opacity: 0.7; }
.agr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(139,92,246,0.07);
}
.agr-item:last-child { border-bottom: none; }
.agr-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.agr-info {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.agr-chap {
  font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agr-subj {
  font-size: 0.6rem; color: rgba(255,255,255,0.4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agr-interval {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700;
  color: #a78bfa; flex-shrink: 0;
  background: rgba(109,40,217,0.2);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 6px; padding: 2px 6px;
}


/* ════════════════════════════════════════════════════════════
   QUEST SHOP — custom + block
════════════════════════════════════════════════════════════ */
.shelf-add-custom-card {
  flex-shrink: 0;
  width: 120px; min-height: 150px;
  background: rgba(124,58,237,0.06);
  border: 1.5px dashed rgba(124,58,237,0.4);
  border-radius: var(--r);
  padding: 14px 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  cursor: pointer; transition: all 0.2s;
}
.shelf-add-custom-card:hover {
  border-color: var(--purple-l);
  background: rgba(124,58,237,0.14);
  transform: translateY(-2px);
}
.sac-plus { display: flex; align-items: center; justify-content: center; color: var(--purple-l); }
.sac-plus svg { width: 22px; height: 22px; }
.sac-label { font-size: 0.68rem; color: var(--text2); text-align: center; }


/* ════════════════════════════════════════════════════════════
   MENU EXPAND BUTTON
════════════════════════════════════════════════════════════ */
.menu-panel.expanded { width: min(92%, 560px); }

/* ── Progression — Apple Health style ── */
#screen-progression {
  background: #08071A;
  display: flex; flex-direction: column;
}
.prog-stars-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  width: 100%; height: 100%;
}
#screen-progression:not(.active) .prog-stars-canvas { display: none; }
.prog-header {
  position: relative;
  display: flex; align-items: center;
  padding: 14px 16px 10px; flex-shrink: 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.05);
}
.prog-header .btn-back {
  width: 38px; height: 38px; flex-shrink: 0;
}
.prog-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: 'Syne', 'Orbitron', sans-serif; font-size: 22px; font-weight: 700;
  letter-spacing: .2em; text-align: center; pointer-events: none;
  background: linear-gradient(90deg, #f472b6, #a78bfa, #60a5fa, #34d399, #fbbf24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.prog-pills { display: flex; gap: 5px; flex-shrink: 0; }
.prog-pill {
  padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4); background: transparent; transition: all .18s;
}
.prog-pill.active {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 0 10px rgba(217,70,239,0.35);
}
.prog-scroll {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 16px 40px;
}
.prog-scroll::-webkit-scrollbar { width: 2px; }
.prog-scroll::-webkit-scrollbar-thumb { background: rgba(127,119,221,0.3); border-radius: 2px; }
/* Card base — glassmorphism ticket style */
.pc {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(127,119,221,0.22);
  padding: 20px;
  background-image:
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 14 L2 2 L14 2' stroke='rgba(127,119,221,0.55)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L18 2 L18 14' stroke='rgba(127,119,221,0.55)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6 L2 18 L14 18' stroke='rgba(127,119,221,0.55)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 18 L18 18 L18 6' stroke='rgba(127,119,221,0.55)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    repeating-linear-gradient(45deg,  rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 10px),
    linear-gradient(160deg, rgba(14,12,40,0.72) 0%, rgba(16,14,44,0.68) 50%, rgba(12,10,30,0.72) 100%);
  background-position:
    6px 6px, calc(100% - 6px) 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px),
    0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-size: 20px 20px, 20px 20px, 20px 20px, 20px 20px, auto, auto, 100% 100%;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    0 0 0 1px rgba(127,119,221,0.08),
    0 0 32px rgba(127,119,221,0.12),
    0 8px 30px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
}
.pc:hover {
  transform: translateY(-3px) scale(1.012);
  box-shadow:
    0 0 0 1px rgba(127,119,221,0.18),
    0 0 40px rgba(127,119,221,0.2),
    0 0 20px rgba(217,70,239,0.08),
    0 16px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}
.pc-title {
  font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: 800;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 0 12px rgba(96,165,250,0.4);
  margin-bottom: 16px;
}
/* Section 1 — Rings */
.prog-rings-center-wrap {
  position: relative; width: 172px; height: 172px; margin: 0 auto 0;
}
.prog-rings-total-row {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  margin: 10px 0 2px;
}
.prog-rings-total-val {
  font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 900;
  color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.prog-rings-total-lbl {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,0.5);
}
.prog-ring-fill, .prog-ring-glow { transition: stroke-dashoffset 1.2s cubic-bezier(.34,1.1,.64,1); }
/* Stat tiles */
.prog-stat-tiles { display: flex; gap: 8px; margin-top: 18px; }
.prog-stat-tile {
  flex: 1; min-width: 0;
  background: rgba(var(--trgb), 0.07);
  border: 1px solid rgba(var(--trgb), 0.25);
  border-radius: 12px;
  padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  box-shadow:
    0 0 20px rgba(var(--trgb), 0.1),
    0 0 0 1px rgba(var(--trgb), 0.06),
    inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: pointer; transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
  position: relative; overflow: hidden;
}
.prog-stat-tile::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(var(--trgb), 0.6), transparent);
}
.prog-stat-tile:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 0 28px rgba(var(--trgb), 0.25),
    0 0 0 1px rgba(var(--trgb), 0.12),
    0 8px 20px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.prog-stat-tile:active { transform: scale(0.96); box-shadow: 0 0 32px rgba(var(--trgb), 0.22); }
.prog-tile-arc-wrap { position: relative; width: 60px; height: 60px; margin-bottom: 4px; }
.prog-tile-arc-svg { display: block; }
.prog-tile-arc-fill { transition: stroke-dashoffset 1.2s cubic-bezier(.34,1.1,.64,1); }
.prog-tile-arc-pct {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 800; line-height: 1;
  letter-spacing: -.02em;
  filter: drop-shadow(0 0 5px var(--tc));
}
.prog-tile-name {
  font-family: 'Orbitron', sans-serif; font-size: 7.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,0.55);
  margin-top: 3px;
}
.prog-tile-count {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 800;
  color: rgba(255,255,255,0.92); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.prog-tile-unit {
  font-family: 'Inter', sans-serif; font-size: 8px; font-weight: 500;
  color: rgba(255,255,255,0.2); letter-spacing: .02em;
}
.prog-tile-desc {
  font-family: 'Inter', sans-serif; font-size: 8px; color: rgba(255,255,255,0.18);
  line-height: 1.3; margin-top: 1px;
}
/* Section 2 — Highlights */
.prog-highlight-row { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; }
.prog-hl-bar { width: 3px; border-radius: 2px; flex-shrink: 0; align-self: stretch; min-height: 20px; }
.prog-hl-text { font-family: 'Inter', sans-serif; font-size: 13px; color: #F0EEF8; line-height: 1.5; flex: 1; }
.prog-hl-trend { flex-shrink: 0; padding-top: 4px; }
.prog-trend-up { color: #1D9E75; }
.prog-trend-down { color: #D85A30; }
.prog-trend-flat { color: rgba(255,255,255,0.3); }
/* Section 3 — Domaines */
.prog-dom-card {
  border-radius: 16px; padding: 16px; margin-bottom: 10px;
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
  cursor: pointer;
}
.prog-dom-card:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 0 24px rgba(127,119,221,0.2), 0 10px 30px rgba(0,0,0,0.4);
}
.prog-dom-card:last-child { margin-bottom: 0; }
.prog-dom-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.prog-dom-name { font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 800; color: #ffffff; letter-spacing: -0.01em; }
.prog-dom-count { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 800; line-height: 1; }
.prog-dom-bar-bg { height: 4px; border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.prog-dom-bar-fill { height: 100%; border-radius: 2px; width: 0; transition: width .8s ease-out; }
.prog-dom-meta { font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.35); }
.prog-dom-badge {
  font-family: 'Inter', sans-serif; font-size: 8px; font-weight: 700;
  letter-spacing: .1em; padding: 2px 8px; border-radius: 6px;
  margin-bottom: 8px; display: inline-block;
}
/* Section 5 — Émotionnel */
.prog-emo-empty { font-family: 'Inter', sans-serif; font-size: 12px; color: rgba(255,255,255,0.2); text-align: center; padding: 32px 0; }
.prog-emo-msg { font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.3); font-style: italic; margin-top: 12px; line-height: 1.5; }
.prog-emo-sub { font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.25); margin-bottom: 16px; line-height: 1.5; }
/* Section 6 — Streak */
.prog-streak-row { display: flex; align-items: stretch; }
.prog-streak-left { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding-right: 16px; }
.prog-streak-num { font-family: 'Inter', sans-serif; font-size: 52px; font-weight: 800; line-height: 1; color: #F0EEF8; }
.prog-streak-num.gold { color: #EF9F27; }
.prog-streak-num.super-streak { color: #FCDE5A; }
.prog-streak-lbl { font-family: 'Inter', sans-serif; font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 4px; }
.prog-streak-sep { width: 0.5px; background: rgba(255,255,255,0.08); flex-shrink: 0; }
.prog-streak-right-col { flex: 1; display: flex; flex-direction: column; align-items: flex-end; padding-left: 16px; justify-content: center; }
.prog-record-num { font-family: 'Inter', sans-serif; font-size: 28px; font-weight: 700; color: rgba(255,255,255,0.3); }
.prog-record-lbl { font-family: 'Inter', sans-serif; font-size: 10px; color: rgba(255,255,255,0.2); margin-top: 4px; }
.prog-14days { display: flex; gap: 4px; margin-top: 16px; overflow: hidden; }
.prog-14day { width: 18px; height: 18px; border-radius: 3px; flex-shrink: 0; background: rgba(255,255,255,0.06); }
.prog-14day.done { background: #7F77DD; }
.prog-14day.today-sq { outline: 1.5px solid rgba(239,159,39,0.5); outline-offset: 2px; }
/* Sage message */
.prog-sage-card {
  background: rgba(127,119,221,0.04); border: 0.5px solid rgba(127,119,221,0.08);
  border-radius: 16px; padding: 20px; margin-bottom: 32px; text-align: center;
}
.prog-sage-text { font-family: 'Inter', sans-serif; font-size: 13px; font-style: italic; color: rgba(255,255,255,0.4); line-height: 1.7; }
/* Fierté card (treasure screen) */
.fierte-card {
  margin: 0 20px 24px;
  background: rgba(127,119,221,0.06);
  border: 0.5px solid rgba(127,119,221,0.18);
  border-radius: 20px;
  padding: 24px 20px 20px;
  animation: fierte-in 0.4s ease both;
}
.fierte-card.hidden { display: none; }
@keyframes fierte-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fierte-question {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.85); text-align: center; line-height: 1.5;
  margin-bottom: 20px;
}
.fierte-scores { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; }
.fierte-score-col { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; }
.fierte-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(127,119,221,0.08); border: 1px solid rgba(127,119,221,0.2);
  color: rgba(255,255,255,0.5); font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: all .18s;
}
.fierte-btn.active { background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%); border-color: transparent; color: #fff; transform: scale(1.1); }
.fierte-lbl { font-family: 'Inter', sans-serif; font-size: 8px; color: rgba(255,255,255,0.25); text-align: center; line-height: 1.3; }
.fierte-submit {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  color: #fff;
  border: none; border-radius: 12px; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: opacity .2s;
}
.fierte-submit:disabled { opacity: 0.3; cursor: default; }

/* Bilan modal */
.bilan-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.bilan-overlay.hidden { display: none; }
.bilan-modal {
  background: #0F0D28; border: 1px solid rgba(127,119,221,0.2);
  border-radius: 24px; padding: 32px; max-width: 320px; width: 100%;
}
.bilan-title { font-family: 'Syne','Orbitron',sans-serif; font-size: 18px; font-weight: 800; color: #fff; }
.bilan-question { font-family: 'Inter', sans-serif; font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.6; margin: 20px 0; }
.bilan-scores { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }
.bilan-score-col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bilan-score-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(127,119,221,0.08); border: 1px solid rgba(127,119,221,0.2);
  color: rgba(255,255,255,0.5); font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 700; cursor: pointer; transition: all .18s;
}
.bilan-score-btn.active { background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%); border-color: transparent; color: #fff; }
.bilan-score-lbl { font-family: 'Inter', sans-serif; font-size: 9px; color: rgba(255,255,255,0.25); text-align: center; }
.bilan-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  color: #fff;
  border: none; border-radius: 14px; font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-bottom: 12px;
}
.bilan-skip { width: 100%; padding: 6px; background: none; border: none; color: rgba(255,255,255,0.2); font-family: 'Inter', sans-serif; font-size: 12px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .prog-ring-fill { transition: none !important; }
  .prog-dom-bar-fill { transition: none !important; }
}
/* Period context bar */
.prog-period-bar {
  border-bottom: 1px dashed rgba(127,119,221,0.15);
  padding: 7px 20px; flex-shrink: 0; text-align: center;
  font-family: 'Orbitron', sans-serif; font-size: 7px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(217,70,239,0.8);
  text-shadow: 0 0 10px rgba(217,70,239,0.3);
}
/* Section nav */
.prog-section-nav {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 10px 16px 12px; flex-shrink: 0;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(127,119,221,0.08);
  position: relative;
}
.prog-section-nav::-webkit-scrollbar { display: none; }
#prog-snav-indicator {
  position: absolute;
  top: 10px;
  height: calc(100% - 22px);
  border-radius: 6px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  box-shadow: 0 0 14px rgba(217,70,239,0.4), 0 0 6px rgba(6,182,212,0.2);
  pointer-events: none;
  z-index: 0;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: left, width;
}
.prog-snav-pill {
  padding: 5px 13px; border-radius: 6px; flex-shrink: 0;
  font-family: 'Orbitron', sans-serif; font-size: 7px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap; cursor: pointer; touch-action: manipulation;
  border: 1px solid rgba(127,119,221,0.18);
  color: rgba(255,255,255,0.4); background: transparent;
  position: relative; z-index: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.prog-snav-pill.active {
  background: transparent;
  border-color: transparent;
  color: #ffffff;
}
/* Universal tooltip */
#prog-tooltip {
  position: fixed; z-index: 9999; pointer-events: none;
  background: #1A1640; border: 0.5px solid rgba(127,119,221,0.35);
  border-radius: 10px; padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0; transition: opacity 120ms ease;
  min-width: 110px; max-width: 190px;
}
#prog-tooltip.vis { opacity: 1; }
.prog-tt-l1 { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: .04em; margin-bottom: 3px; font-family: 'Inter',sans-serif; }
.prog-tt-l2 { font-size: 14px; font-weight: 700; color: #F0EEF8; font-family: 'Inter',sans-serif; line-height: 1.2; }
.prog-tt-l3 { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; font-family: 'Inter',sans-serif; }
/* Ring ticket header */
.prog-rings-ticket-title {
  font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: 900;
  letter-spacing: .22em; text-transform: uppercase; text-align: center;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 0 20px rgba(96,165,250,0.5), 0 1px 0 rgba(255,255,255,0.1);
  margin-bottom: 6px;
}
.prog-rings-ticket-tag {
  font-family: 'Orbitron', sans-serif; font-size: 7px; font-weight: 700;
  letter-spacing: .2em; text-align: center;
  color: rgba(255,255,255,0.75); margin-bottom: 12px;
}
.prog-rings-cut {
  display: flex; align-items: center; gap: 0; margin-bottom: 14px;
  color: rgba(127,119,221,0.4);
}
.prog-rings-cut::before, .prog-rings-cut::after {
  content: ''; flex: 1; height: 1px;
  border-top: 1px dashed rgba(127,119,221,0.2);
}
.prog-rings-cut svg { flex-shrink: 0; margin: 0 8px; }
/* Ring card header */
.prog-rings-day-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(127,119,221,0.2);
}
.prog-rings-day-ttl {
  font-family: 'Orbitron', sans-serif; font-size: 7px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase; color: rgba(217,70,239,0.8);
}
.prog-rings-day-sep { color: rgba(127,119,221,0.4); font-size: 10px; }
.prog-rings-day-date {
  font-family: 'Orbitron', sans-serif; font-size: 13px; font-weight: 900;
  color: #ffffff; letter-spacing: .06em;
  text-shadow: 0 0 16px rgba(96,165,250,0.5);
}
.prog-rings-day-date-sm {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500;
  color: rgba(255,255,255,0.35); letter-spacing: .02em;
}
/* Domain trend + detail */
.prog-dom-trend { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.prog-dom-detail { max-height: 0; overflow: hidden; transition: max-height 200ms ease-out; }
.prog-dom-detail.open { max-height: 90px; }
.prog-dom-detail-inner { padding-top: 10px; border-top: 0.5px solid rgba(255,255,255,0.06); margin-top: 10px; font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.7; }
/* Activity card */
.prog-act-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.prog-act-hdr .pc-title { margin-bottom: 0; }
.prog-act-avg { font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.35); }
.prog-act-summary { font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.3); font-style: italic; margin-top: 8px; }
.prog-act-bar { cursor: pointer; touch-action: manipulation; }
/* Streak 14-day with labels */
.prog-14days { display: flex; gap: 3px; margin-top: 16px; overflow: hidden; }
.prog-14day-col { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; cursor: pointer; touch-action: manipulation; }
.prog-14day { width: 100%; aspect-ratio: 1; border-radius: 3px; background: rgba(255,255,255,0.06); transition: transform 100ms ease; }
.prog-14day.done { background: #7F77DD; }
.prog-14day.today-sq { outline: 1.5px solid rgba(239,159,39,0.5); outline-offset: 2px; }
.prog-14day-lbl { font-family: 'Inter', sans-serif; font-size: 8px; color: rgba(255,255,255,0.2); text-align: center; }
.prog-14day-lbl.today-lbl { color: rgba(239,159,39,0.6); }


/* ════════════════════════════════════════════════════════════
   MENU AVATAR SECTION
════════════════════════════════════════════════════════════ */
.mas-wrap { display:flex; flex-direction:column; align-items:center; gap:14px; padding:8px 0; }
.mas-avatar { width:110px; height:138px; }
.mas-avatar svg { width:100%; height:100%; }
.mas-name { font-family:'Orbitron',sans-serif; font-size:1rem; font-weight:700; color:var(--text); }
.mas-btn {
  width: auto !important;
  padding: 12px 28px !important;
  margin: 0 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  border-radius: 50px !important;
  box-shadow: 0 0 24px rgba(124,58,237,0.5) !important;
}
.mas-encouragement { font-size:0.78rem; color:var(--text2); text-align:center; font-style:italic; line-height:1.5; }


/* ════════════════════════════════════════════════════════════
   PERSONA DETAIL CARDS IN MENU
════════════════════════════════════════════════════════════ */
.persona-detail-card { background:var(--card-bg); border:1px solid var(--card-border); border-radius:var(--r-sm); padding:12px; margin-bottom:8px; }
.persona-detail-card.active-persona-card { border-color:var(--purple-l); background:rgba(124,58,237,0.1); }
.pdc-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.pdc-name { font-size:0.82rem; font-weight:700; color:var(--text); flex:1; }
.pdc-you { font-size:0.6rem; font-weight:700; color:var(--neon); background:rgba(217,70,239,0.15); border:1px solid rgba(217,70,239,0.4); border-radius:4px; padding:2px 6px; }
.pdc-desc { font-size:0.72rem; color:var(--text2); margin-bottom:6px; line-height:1.5; }
.pdc-blockers { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:6px; }
.pdc-blocker { font-size:0.62rem; color:var(--text3); background:var(--bg3); border-radius:4px; padding:2px 6px; }
.pdc-tip { font-size:0.72rem; color:var(--purple-l); font-style:italic; }


/* ════════════════════════════════════════════════════════════
   VITALITY GRID
════════════════════════════════════════════════════════════ */
.rayon-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; color: rgba(255,255,255,0.4);
  letter-spacing: 0.05em; padding: 0 4px 10px;
}
.vitality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  container-type: inline-size;
  container-name: vgrid;
}
/* Narrow: icônes masquées, 1 colonne naturelle via auto-fit */
@container vgrid (max-width: 300px) {
  .vc-big-icon { display: none; }
  .vitality-card { padding-right: 12px; }
}
.vitality-card {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 14px 46px 14px 10px;
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.vitality-card::before {
  content: ''; position: absolute; inset: 0; border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.vitality-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.vitality-card.in-basket {
  background: rgba(16,185,129,0.1);
  border-color: rgba(74,222,128,0.45);
  box-shadow: 0 0 0 1px rgba(74,222,128,0.2), 0 8px 24px rgba(16,185,129,0.15);
}

/* Checkbox */
.vc-cb {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  display: grid; place-items: center;
  cursor: pointer; transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  margin-top: 1px;
}
.vc-cb svg { width: 14px; height: 14px; stroke: #fff; }
.vc-cb.checked {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(124,58,237,0.5);
}

/* Body */
.vc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.vc-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem; font-weight: 800;
  color: #fff; letter-spacing: -0.02em; line-height: 1.15;
  word-break: break-word; hyphens: auto;
}
.vc-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.vc-chip-energy {
  display: flex; align-items: center; gap: 3px;
  background: rgba(74,222,128,0.15);
  border: 1px solid rgba(74,222,128,0.35);
  border-radius: 20px; padding: 3px 8px;
  font-size: 0.64rem; font-weight: 700; color: #4ade80;
}
.vc-chip-energy svg { width: 10px; height: 10px; stroke: #4ade80; }
.vc-chip-energy.penalized { color: #fb923c; background: rgba(251,146,60,0.12); border-color: rgba(251,146,60,0.3); }
.vc-chip-energy.penalized svg { stroke: #fb923c; }
.vc-penalty-label {
  font-size: 0.58rem;
  color: rgba(251,146,60,0.7);
  margin-left: 2px;
  opacity: 0.85;
}
.vc-chip-bonus {
  display: flex; align-items: center;
  background: rgba(96,165,250,0.12);
  border: 1px solid rgba(96,165,250,0.28);
  border-radius: 20px; padding: 3px 8px;
  font-size: 0.6rem; font-weight: 600; color: #c4b5fd;
}
.vc-time-row {
  display: flex; flex-direction: column; gap: 5px;
  padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 2px;
}

/* Big icon — absolute top-right, never interferes with layout */
.vc-big-icon {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  pointer-events: none;
}
.vc-big-icon svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.5); }
.vitality-card.in-basket .vc-big-icon {
  background: rgba(74,222,128,0.12);
  border-color: rgba(74,222,128,0.25);
}
.vitality-card.in-basket .vc-big-icon svg { stroke: #4ade80; }

/* Light mode */
body.light-theme .vitality-card {
  background: rgba(255,255,255,0.82);
  border-color: rgba(124,58,237,0.14);
}
body.light-theme .vitality-card:hover { background: rgba(255,255,255,0.96); }
body.light-theme .vitality-card.in-basket { background: rgba(16,185,129,0.07); border-color: rgba(74,222,128,0.5); }
body.light-theme .vc-cb { border-color: rgba(124,58,237,0.3); background: rgba(124,58,237,0.05); }
body.light-theme .vc-name { color: #1e1b4b; }
body.light-theme .vc-big-icon { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.14); }
body.light-theme .vc-big-icon svg { stroke: #7c3aed; }
body.light-theme .vitality-card.in-basket .vc-big-icon svg { stroke: #10b981; }


/* ════════════════════════════════════════════════════════════
   SHELF TOGGLE BUTTON (new quest card)
════════════════════════════════════════════════════════════ */
.shelf-toggle-btn { width:100%; padding:6px; background:rgba(124,58,237,0.15); border:1px solid var(--purple); border-radius:20px; color:var(--purple-l); font-size:0.72rem; font-weight:700; cursor:pointer; transition:all 0.2s; }
.shelf-toggle-btn.active { background:rgba(217,70,239,0.15); border-color:var(--neon); color:var(--neon); }
.shelf-toggle-btn:hover { background:rgba(124,58,237,0.3); }


/* ════════════════════════════════════════════════════════════
   BASKET ENERGY SUMMARY
════════════════════════════════════════════════════════════ */
.basket-energy-summary {
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 12px 14px;
}
.bes-row { display:flex; justify-content:space-between; align-items:center; font-size:0.78rem; color:#ffffff !important; }
.bes-row * { color: inherit; }
.bes-lbl { display:flex; align-items:center; gap:6px; color:#ffffff !important; }
.bes-lbl svg { width:13px; height:13px; flex-shrink:0; }
.bes-total { font-weight:700; color:#fff !important; }
.bes-val { font-weight:700; }
.bes-val.gold { color:var(--gold); }
.bes-val.red { color:#f87171; }
.bes-val.green { color:var(--green); }
.bes-val.orange { color:#fb923c; }
.bes-energy-bar-wrap {
  height:6px; border-radius:6px;
  background:rgba(255,255,255,0.1);
  overflow:hidden; margin:-2px 0 2px;
}
.bes-energy-bar {
  height:100%; border-radius:6px;
  transition: width 0.4s ease;
}
.bes-divider { height:1px; background:rgba(255,255,255,0.08); margin:2px 0; }
.bes-warning {
  display:flex; align-items:flex-start; gap:7px;
  font-size:0.73rem; color:var(--gold);
  background:rgba(245,158,11,0.08); border:1px solid rgba(245,158,11,0.2);
  border-radius:10px; padding:8px 10px; margin-top:2px;
}
.bes-warning svg { width:14px; height:14px; flex-shrink:0; margin-top:1px; stroke:var(--gold); }

/* ════════════════════════════════════════════════════════════
   PREMIUM REDESIGN — HOME STATS + XP + SHOP TABS + QUEST CARDS
════════════════════════════════════════════════════════════ */

/* HOME STATS ROW */
.home-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 6px;
  flex-shrink: 0; z-index: 10;
  gap: 10px;
}
.home-header-left {
  flex: 1; display: flex; flex-direction: column; gap: 5px;
  min-width: 0;
}
.home-stats-row {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; z-index: 2; position: relative;
  width: 100%;
}
.home-stat-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 6px 14px;
  backdrop-filter: blur(10px);
}
.hsc-icon { font-size: 1rem; }
.hsc-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem; font-weight: 700; color: white;
}
.home-streak-badge {
  display: flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, rgba(251,146,60,0.2), rgba(239,68,68,0.15));
  border: 1px solid rgba(251,146,60,0.4);
  border-radius: 20px; padding: 6px 14px;
}
.hstreak-fire { font-size: 1rem; }
.hstreak-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem; font-weight: 900; color: #fb923c;
}
.hstreak-label { font-size: 0.58rem; color: #fb923c; text-transform: uppercase; letter-spacing: 0.06em; }

/* XP BAR */
.home-xp-row {
  display: flex; align-items: center; gap: 6px;
  padding: 0;
  flex-shrink: 0; z-index: 2; position: relative;
  width: 100%;
}
.home-xp-label {
  font-size: 0.6rem; font-weight: 700; color: var(--purple-l);
  font-family: 'Orbitron', sans-serif; white-space: nowrap;
}
.home-xp-bar {
  flex: 1; max-width: 120px; height: 5px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden;
}
.home-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--neon));
  border-radius: 3px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(124,58,237,0.6);
}
.home-xp-pct { font-size: 0.58rem; color: var(--text3); white-space: nowrap; }

/* HOME PLAYER BLOCK */
.home-player-block {
  text-align: center; z-index: 2; position: relative;
  padding: 0;
  flex-shrink: 0;
  width: 100%;
}

/* SHOP CLOCK */
.shop-clock-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 10px; width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.shop-clock {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem; font-weight: 900;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.08em;
}
.shop-avail-time {
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem; font-weight: 600;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
  text-transform: uppercase; margin-top: 2px;
  text-align: center;
}

/* SHOP LEFT STATS */
.shop-left-stats {
  display: flex; flex-direction: column; gap: 5px; width: 100%;
  margin-top: -4px;
}
.shop-left-stat {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 6px 8px;
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 2px 10px rgba(0,0,0,0.15);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.9);
  position: relative; overflow: hidden;
}
.shop-left-stat::after {
  content: ''; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: left-shimmer 2s ease-in-out infinite;
  animation-delay: 0.25s;
  pointer-events: none;
}
@keyframes left-shimmer {
  0%   { left: -70%; opacity: 0; }
  8%   { opacity: 1; }
  50%  { left: 140%; opacity: 1; }
  51%  { opacity: 0; }
  100% { left: 140%; opacity: 0; }
}
body.light-theme .shop-avatar-xp {
  background: rgba(255,255,255,0.65);
  border-color: rgba(124,58,237,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 10px rgba(124,58,237,0.1);
}
body.light-theme .shop-avatar-xp::after,
body.light-theme .shop-left-stat::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}
body.light-theme .shop-left-stat {
  background: rgba(255,255,255,0.65) !important;
  border-color: rgba(124,58,237,0.2) !important;
  color: #1e1b4b !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 10px rgba(124,58,237,0.08);
}

/* ───────────────────────────────────────────────────────────
   SHOP TABS — Floating Pills
   Chaque onglet correspond à un rayon (data-rayon="0..4") :
     0 → Révision  (violet  #7F77DD)
     1 → Planif.   (bleu    #378ADD)
     2 → Vitalité  (vert    #1D9E75)
     3 → Rattrapage (or     #EF9F27)
     4 → Préparation (feu   #D85A30)
   Inactif : icône seule, fond très transparent
   Actif    : icône + label Cinzel, bordure néon couleur du rayon
   ─────────────────────────────────────────────────────────── */
/* SHOP TABS — Floating Pills */
.shop-tabs-bar {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
  padding: 8px 10px 10px;
  position: relative;
}

#shop-tab-indicator { display: none; }

.shop-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px 7px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.40);
  cursor: pointer;
  flex: 1;
  transition: all 0.2s cubic-bezier(0.34,1.2,0.64,1);
  position: relative; z-index: 1;
  min-width: 0;
}

/* Nuances de violet — état inactif */
.shop-tab[data-rayon="0"] { border-color: rgba(127,119,221,0.3); color: rgba(127,119,221,0.6); }
.shop-tab[data-rayon="0"] svg { stroke: rgba(127,119,221,0.6); }
.shop-tab[data-rayon="1"] { border-color: rgba(168,100,255,0.3); color: rgba(168,100,255,0.6); }
.shop-tab[data-rayon="1"] svg { stroke: rgba(168,100,255,0.6); }
.shop-tab[data-rayon="2"] { border-color: rgba(192,148,255,0.3); color: rgba(192,148,255,0.6); }
.shop-tab[data-rayon="2"] svg { stroke: rgba(192,148,255,0.6); }
.shop-tab[data-rayon="3"] { border-color: rgba(217,70,239,0.3); color: rgba(217,70,239,0.6); }
.shop-tab[data-rayon="3"] svg { stroke: rgba(217,70,239,0.6); }
.shop-tab[data-rayon="4"] { border-color: rgba(147,51,234,0.3); color: rgba(147,51,234,0.6); }
.shop-tab[data-rayon="4"] svg { stroke: rgba(147,51,234,0.6); }

.shop-tab:hover { filter: brightness(1.4); }

/* Onglet actif — couleur différente par rayon */
.shop-tab.active {
  border: 1.5px solid #7F77DD;
  color: #F0EEF8;
  -webkit-text-fill-color: #F0EEF8;
  background: rgba(127,119,221,0.15);
  box-shadow: 0 0 14px rgba(127,119,221,0.3);
}
/* Nuances de violet — état actif */
.shop-tab.active[data-rayon="0"] { background: rgba(127,119,221,0.18); border-color: #7F77DD; box-shadow: 0 0 14px rgba(127,119,221,0.4); }
.shop-tab.active[data-rayon="1"] { background: rgba(168,100,255,0.18); border-color: #A864FF; box-shadow: 0 0 14px rgba(168,100,255,0.4); }
.shop-tab.active[data-rayon="2"] { background: rgba(192,148,255,0.18); border-color: #C094FF; box-shadow: 0 0 14px rgba(192,148,255,0.4); }
.shop-tab.active[data-rayon="3"] { background: rgba(217,70,239,0.18); border-color: #D946EF; box-shadow: 0 0 14px rgba(217,70,239,0.4); }
.shop-tab.active[data-rayon="4"] { background: rgba(147,51,234,0.18); border-color: #9333EA; box-shadow: 0 0 14px rgba(147,51,234,0.4); }
.shop-tab.active .shop-tab-label,
.shop-tab.active .shop-tab-icon { color: #F0EEF8; -webkit-text-fill-color: #F0EEF8; }
.shop-tab.active .shop-tab-icon svg { stroke: #F0EEF8; }

.shop-tab-icon { width: 15px; height: 15px; display: flex; align-items: center; }
.shop-tab-icon svg { width: 15px; height: 15px; }
.shop-tab-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
  display: block;   /* toujours visible */
  opacity: 0.7;
}
.shop-tab.active .shop-tab-label { opacity: 1; }

/* SHOP SUMMARY BAR */
.shop-summary-bar {
  display: flex; align-items: center;
  padding: 6px 12px;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0; overflow: hidden;
}
.ssb-item {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem; font-weight: 600;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
  white-space: nowrap;
}
.ssb-item.ssb-gold { color: #f6c90e; }
.ssb-item.ssb-purple { color: rgba(255,255,255,0.6); }
.ssb-item.ssb-green { color: rgba(255,255,255,0.6); }
.ssb-item.ssb-over { color: #f87171 !important; }
.ssb-item.ssb-energy-bar-item {
  gap: 6px; flex: 0 1 45%; min-width: 80px; max-width: 45%; overflow: hidden;
}
.ssb-ebar-wrap {
  flex: 1; height: 5px; border-radius: 4px;
  background: rgba(255,255,255,0.1); overflow: hidden; min-width: 30px;
}
.ssb-ebar-fill { height: 100%; border-radius: 4px; transition: width 0.35s ease, background 0.35s ease; width: 100%; }
#ssb-ebar-label { font-size: 0.65rem; font-weight: 700; min-width: 22px; text-align: right; flex-shrink: 0; }
.ssb-sep { width: 1px; height: 12px; background: rgba(255,255,255,0.15); flex-shrink: 0; margin: 0 8px; }

/* QUEST LIST — cartes verticales */
.quest-list {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 10px;
}
.quest-card {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  background-color: rgba(17,14,42,0.6);
  background-image:
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 14 L2 2 L14 2' stroke='rgba(127,119,221,0.5)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L18 2 L18 14' stroke='rgba(127,119,221,0.5)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6 L2 18 L14 18' stroke='rgba(127,119,221,0.5)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 18 L18 18 L18 6' stroke='rgba(127,119,221,0.5)' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: 5px 5px, calc(100% - 5px) 5px, 5px calc(100% - 5px), calc(100% - 5px) calc(100% - 5px);
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 18px 18px, 18px 18px, 18px 18px, 18px 18px;
  border: 1px solid rgba(127,119,221,0.18);
  border-radius: 18px;
  padding: 14px 46px 14px 10px;
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
.quest-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127,119,221,0.3), transparent);
}
.quest-card:hover {
  border-color: rgba(127,119,221,0.45);
  transform: translateY(-3px) scale(1.012);
  box-shadow:
    0 0 24px rgba(127,119,221,0.2),
    0 10px 28px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
/* Inside a swipe wrapper, suppress the transform so iOS clip-path stays intact */
.qswipe-wrap .quest-card:hover { transform: none; }
.quest-card.in-basket {
  border-color: rgba(0,255,128,0.55);
  background-color: rgba(0,30,20,0.55);
  box-shadow:
    0 0 28px rgba(0,255,128,0.4),
    0 0 60px rgba(0,255,128,0.12),
    0 0 0 1px rgba(0,255,128,0.18),
    0 4px 16px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(0,255,128,0.15);
}
.quest-card.in-basket::before {
  background: linear-gradient(90deg, transparent, rgba(29,158,117,0.4), transparent);
}
@keyframes quest-flash-add {
  0%   { box-shadow: 0 0 0 rgba(52,211,153,0); border-color: rgba(29,158,117,0.6); transform: scale(1); }
  20%  { transform: scale(1.035); box-shadow: 0 0 0 6px rgba(74,222,128,0.18), 0 0 28px rgba(52,211,153,0.4); border-color: rgba(74,222,128,0.9); }
  50%  { box-shadow: 0 0 0 3px rgba(74,222,128,0.1), 0 0 40px rgba(52,211,153,0.25), 0 0 80px rgba(52,211,153,0.1); }
  100% { transform: scale(1); box-shadow: 0 4px 18px rgba(74,222,128,0.2), 0 0 0 1px rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.45); }
}
.quest-card.quest-check-anim {
  animation: quest-flash-add 0.65s cubic-bezier(0.34,1.2,0.64,1) forwards;
}

.qcard-left { flex-shrink: 0; display: flex; align-items: center; }
.qcard-checkbox {
  width: 30px; height: 30px;
  border-radius: 10px;
  border: 1.5px solid rgba(96,165,250,0.3);
  background: rgba(255,255,255,0.04);
  color: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.25s var(--transition-spring);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}
.qcard-checkbox svg { width: 18px; height: 18px; }
.qcard-checkbox:hover {
  border-color: var(--purple-l);
  background: rgba(124,58,237,0.15);
  transform: scale(1.06);
}
.qcard-checkbox.checked {
  background: linear-gradient(135deg, #1D9E75 0%, #34d399 100%);
  border-color: #34d399;
  color: white;
  box-shadow: 0 0 20px rgba(52,211,153,0.6), 0 0 8px rgba(52,211,153,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: scale(1.08);
}

.qcard-mid { flex: 1; min-width: 0; }
.qcard-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem; font-weight: 800; color: rgba(241,245,249,0.95);
  margin-bottom: 5px; line-height: 1.4; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 5px;
  cursor: pointer;
}
.qcard-name-text { flex: 1; }
.qcard-edit-hint {
  opacity: 0; transition: opacity 0.15s;
  display: flex; align-items: center;
  color: rgba(96,165,250,0.5);
  flex-shrink: 0;
}
.qcard-name:hover .qcard-edit-hint { opacity: 1; }
.qcard-name-input {
  width: 100%; padding: 4px 8px;
  background: rgba(124,58,237,0.2);
  border: 1.5px solid var(--purple-l);
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.63rem; font-weight: 800; color: #fff;
  letter-spacing: 0.04em;
  box-shadow: 0 0 10px rgba(124,58,237,0.2);
}
.qcard-name-input:focus { outline: none; box-shadow: 0 0 16px rgba(96,165,250,0.35); }
.qcard-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.qcard-time, .qcard-coins, .qcard-energy {
  display: flex; align-items: center; gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem; font-weight: 700;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 3px 8px;
  color: rgba(255,255,255,0.65);
  backdrop-filter: blur(4px);
}
.qcard-coins { color: #fcd34d; background: rgba(246,201,14,0.1); border-color: rgba(246,201,14,0.2); }
.qcard-energy { color: #c4b5fd; background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.2); }
.qcard-energy-gain { color: #4ade80 !important; background: rgba(74,222,128,0.1) !important; border-color: rgba(74,222,128,0.2) !important; }
.qcard-date-chip { font-size: 0.6rem; color: var(--text3); padding: 2px 6px; background: rgba(255,255,255,0.05); border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); }
.qcard-time-edit {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  margin-top: 8px;
}
.qcard-time-inputs {
  display: flex; align-items: center; gap: 4px;
}
.time-num-input {
  width: 38px; padding: 4px 6px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(124,58,237,0.4);
  border-radius: 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  text-align: center;
  -moz-appearance: textfield;
}
.time-num-input::-webkit-outer-spin-button,
.time-num-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.time-num-input:focus {
  outline: none;
  border-color: var(--purple-l);
  background: rgba(124,58,237,0.15);
}
.time-unit {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  color: rgba(255,255,255,0.45); letter-spacing: 0.05em;
}
.qcard-no-time-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  cursor: pointer; user-select: none;
  font-size: 0.68rem; font-weight: 600;
  color: var(--purple-d);
  background: rgba(124,58,237,0.12);
  border: 1.5px solid rgba(124,58,237,0.3);
  border-radius: 20px;
  transition: all 0.2s;
}
.qcard-no-time-toggle:hover { background: rgba(124,58,237,0.22); border-color: var(--purple-l); color: #fff; }
.qcard-no-time-cb {
  appearance: none; -webkit-appearance: none;
  width: 13px; height: 13px; flex-shrink: 0;
  border: 1.5px solid rgba(124,58,237,0.5);
  border-radius: 3px;
  background: transparent;
  cursor: pointer; transition: all 0.2s;
  position: relative;
}
.qcard-no-time-cb:checked {
  background: var(--purple);
  border-color: var(--purple-l);
}
.qcard-no-time-cb:checked::after {
  content: '';
  position: absolute; top: 1px; left: 3px;
  width: 4px; height: 7px;
  border: 1.5px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}
.qcard-remove-corner {
  position: absolute; bottom: 6px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.45);
  color: #f87171; cursor: pointer;
  display: grid; place-items: center; transition: all 0.2s;
}
.qcard-remove-corner svg { width: 10px; height: 10px; stroke: #f87171; }
.qcard-remove-corner:hover { background: rgba(239,68,68,0.28); border-color: #f87171; transform: scale(1.1); }
.shop-hint-btn { color: rgba(96,165,250,0.6) !important; }
.shop-hint-btn svg { width: 14px; height: 14px; }
.shop-hint-btn.active { color: var(--purple-l) !important; background: rgba(124,58,237,0.2) !important; }
.shop-hint-popup {
  margin: 0 12px 6px;
  padding: 10px 12px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 600;
  color: rgba(255,255,255,0.55); letter-spacing: 0.04em; line-height: 1.7;
}
.shop-hint-popup.hidden { display: none; }

.quest-add-card {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: var(--r); padding: 12px 16px;
  color: var(--text3); cursor: pointer;
  transition: all 0.2s;
}
.quest-add-card:hover {
  border-color: var(--purple-l); color: var(--purple-l);
  background: rgba(124,58,237,0.06);
}
.qac-plus { display: flex; align-items: center; justify-content: center; }
.qac-plus svg { width: 16px; height: 16px; }
.qac-label { font-size: 0.72rem; }

/* SHOP RIGHT FOOTER */
.shop-right-footer {
  padding: 10px 12px;
  flex-shrink: 0;
  border-top: 1px solid var(--card-border);
}
.shop-right-footer .btn-primary { width: 100%; display: none; }

/* ════════════════════════════════════════════════════════════
   HOME SCREEN — PREMIUM CINEMATIC REDESIGN
════════════════════════════════════════════════════════════ */

/* Top bar */
.home-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 29px 16px 8px;
  flex-shrink: 0; position: relative; z-index: 20;
}
.home-menu-avatar-btn { pointer-events: all !important; }
/* ─────────────── ÉTOILES FILANTES ─────────────── */
.falling-stars-wrap {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh; z-index: 1;
  overflow: hidden; pointer-events: none;
}
#screen-home:not(.active) .falling-stars-wrap { display: none; }
.fall-star {
  position: absolute;
  top: var(--top); left: var(--left);
  width: 200px; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(200,180,255,0.55) 35%,
    rgba(255,255,255,1) 100%);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(200,200,255,0.7);
  transform: rotate(210deg) translateX(-200px);
  opacity: 0;
  animation: fallStar var(--dur, 8s) ease-out var(--delay, 0s) infinite;
}
.fall-star.fall-star-gold {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(253,224,71,0.4) 35%,
    rgba(255,236,164,1) 100%);
  box-shadow: 0 0 7px rgba(253,224,71,0.85);
}
.fall-star.fall-star-cyan {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(103,232,249,0.4) 35%,
    rgba(207,250,254,1) 100%);
  box-shadow: 0 0 7px rgba(34,211,238,0.85);
}
.fall-star.fall-star-pink {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(244,114,182,0.4) 35%,
    rgba(253,212,233,1) 100%);
  box-shadow: 0 0 7px rgba(244,114,182,0.85);
}
@keyframes fallStar {
  0%   { transform: rotate(210deg) translateX(-200px); opacity: 0; }
  4%   { opacity: 1; }
  20%  { opacity: 0; transform: rotate(210deg) translateX(800px); }
  100% { transform: rotate(210deg) translateX(800px); opacity: 0; }
}
.home-butterfly-canvas {
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 1;
}
.home-butterfly-canvas { display: none !important; }

.home-topbar-brand {
  display: flex; align-items: center; gap: 12px;
}
.home-datetime {
  display: none !important;
  flex-direction: column;
  line-height: 1.05;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.18);
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
}
.home-datetime-time {
  font-size: 0.85rem; font-weight: 800;
  letter-spacing: 0.06em;
}
.home-datetime-date {
  font-size: 0.55rem; font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-top: 2px;
}

/* Bouton déconnexion bas à droite — Liquid Glass */
.home-logout-btn {
  all: unset;
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 20;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 18px;
  height: 36px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
  border-radius: 999px;
  cursor: pointer;

  /* Liquid Glass — verre translucide */
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.16) 0%,
      rgba(255,255,255,0.05) 50%,
      rgba(255,255,255,0.12) 100%);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);

  border: 1px solid rgba(255,255,255,0.20);
  outline: none;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.40),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 6px 22px rgba(0,0,0,0.28),
    0 2px 6px rgba(0,0,0,0.16);

  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.home-logout-btn:hover {
  transform: translateY(-2px);
  color: rgba(254,226,226,1);
  background:
    linear-gradient(135deg,
      rgba(248,113,113,0.22) 0%,
      rgba(255,255,255,0.08) 50%,
      rgba(248,113,113,0.18) 100%);
  border-color: rgba(255,255,255,0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 10px 28px rgba(248,113,113,0.28),
    0 3px 10px rgba(0,0,0,0.20);
}
.home-logout-btn:active {
  transform: translateY(1px) scale(0.985);
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 3px 10px rgba(0,0,0,0.24);
}
.home-logout-btn svg {
  width: 14px; height: 14px;
}

/* Masque le bouton sidebar (avatar/level) sur la home */
#screen-home .home-menu-avatar-btn {
  display: none !important;
}

/* Cinematic greeting block */
.home-cinematic-top {
  text-align: center;
  position: relative; z-index: 2;
  flex-shrink: 0;
}
.home-cinematic-top .home-greeting {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem; letter-spacing: 0.4em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(255,255,255,0.45);
  animation: home-greeting-fade 1.2s ease-out both;
}
@keyframes home-greeting-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 0.9; transform: translateY(0); }
}

/* ── Nom joueur — blanc pur, sans néon ──────────────────────── */
.home-cinematic-top .home-player-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem; font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0; transform: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  text-shadow: none;
  animation: home-name-rise 1s cubic-bezier(0.2,0.7,0.2,1) 0.15s both;
  will-change: opacity, transform;
}
@keyframes home-name-rise {
  from { opacity: 0; transform: translateY(14px); letter-spacing: 0.3em; }
  to   { opacity: 1; transform: translateY(0);   letter-spacing: 0.16em; }
}

/* ── Phrase "vibe" contextuelle sous le nom du joueur ─────── */
.home-cinematic-top .home-vibe {
  font-family: 'Inter', 'Sora', sans-serif;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 0 12px rgba(196,163,255,0.5);
  margin: 12px 0 0;
  text-align: center;
  opacity: 0;
  animation: home-vibe-fade 1.4s cubic-bezier(0.45,0,0.55,1) 0.6s both;
}
@keyframes home-vibe-fade {
  from { opacity: 0;    transform: translateY(-4px); }
  to   { opacity: 0.85; transform: translateY(0); }
}

/* ── Tap reaction sur l'avatar : petit rebond + sparkles burst ── */
.home-avatar.home-avatar-tap {
  animation: home-avatar-tap-bounce 0.55s cubic-bezier(.2,.7,.2,1.3) !important;
}
@keyframes home-avatar-tap-bounce {
  0%   { transform: scale(1)    rotate(0); }
  25%  { transform: scale(1.08) rotate(-3deg); }
  55%  { transform: scale(0.96) rotate(2deg); }
  80%  { transform: scale(1.03) rotate(-1deg); }
  100% { transform: scale(1)    rotate(0); }
}
.home-avatar-burst {
  transform: translate(-50%, -50%);
  animation: home-avatar-burst-fly 0.85s cubic-bezier(.2,.7,.2,1) forwards;
  will-change: transform, opacity;
}
@keyframes home-avatar-burst-fly {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  18%  { opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2);
    opacity: 0;
  }
}

/* ── Mini papillons blancs qui s'envolent au tap (vol en zigzag) ── */
.home-avatar-butterfly {
  will-change: transform, opacity;
}
.home-avatar-butterfly svg {
  width: 100%; height: 100%;
  overflow: visible;
}
.home-avatar-butterfly svg .bf-wing-l,
.home-avatar-butterfly svg .bf-wing-r {
  transform-box: fill-box;
  transform-origin: 12px 12px;
  animation: home-avatar-bf-flap 0.22s cubic-bezier(.45,0,.55,1) infinite alternate;
}
.home-avatar-butterfly svg .bf-wing-r {
  animation-delay: -0.11s;
}
@keyframes home-avatar-bf-flap {
  from { transform: scaleX(1);    }
  to   { transform: scaleX(0.35); }
}
/* Vol en zigzag avec balancement latéral et fade-out à la fin */
@keyframes home-avatar-bf-fly {
  0% {
    transform: translate(-50%, -50%) scale(0.4) rotate(-10deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx) * 0.1), calc(-50% + var(--dy) * 0.1)) scale(1) rotate(6deg);
  }
  35% {
    transform: translate(calc(-50% + var(--dx) * 0.35 - 18px), calc(-50% + var(--dy) * 0.35)) scale(1) rotate(-14deg);
  }
  60% {
    transform: translate(calc(-50% + var(--dx) * 0.6 + 14px), calc(-50% + var(--dy) * 0.6)) scale(0.95) rotate(12deg);
    opacity: 1;
  }
  85% {
    transform: translate(calc(-50% + var(--dx) * 0.85 - 8px), calc(-50% + var(--dy) * 0.85)) scale(0.85) rotate(-8deg);
    opacity: 0.7;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.6) rotate(0deg);
    opacity: 0;
  }
}

/* ── Colonnes de navigation latérales sur la home ─────────────── */
.home-nav-side {
  position: absolute;
  top: 50%;
  display: flex; flex-direction: column;
  gap: 16px;
  z-index: 5;
  pointer-events: auto;
}
.home-nav-side--left  { left: calc(17% + 25px);  transform: translate(-50%, -50%); }
.home-nav-side--right { left: calc(83% - 25px);  transform: translate(-50%, -50%); }

/* Boutons nav — Liquid Glass (verre translucide iOS 26) */
.home-nav-btn {
  all: unset;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 14px;
  padding: 20px 64px;
  min-width: 260px;
  box-sizing: border-box;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem; font-weight: 900;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.45),
    0 0 14px rgba(196,163,255,0.30);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;

  /* Liquid Glass — verre translucide + reflet diagonal */
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.20) 0%,
      rgba(255,255,255,0.06) 45%,
      rgba(255,255,255,0.14) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);

  /* Bordure fine claire (rim light) */
  border: 1px solid rgba(255,255,255,0.22);
  outline: none;

  /* Reflet supérieur intérieur + ombre douce */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.50),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 8px 32px rgba(0,0,0,0.22),
    0 2px 8px rgba(0,0,0,0.14);

  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
/* Reflet glissant supprimé — bouton statique */
.home-nav-btn::after { content: none; }
/* Couche iridescente qui glisse lentement (effet hologramme) */
@keyframes iridescent-shift {
  0%, 100% { background-position: 0% 50%, 0 0; }
  50%      { background-position: 100% 50%, 0 0; }
}
.home-nav-btn:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.28) 0%,
      rgba(255,255,255,0.10) 45%,
      rgba(255,255,255,0.22) 100%);
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.60),
    inset 0 -1px 0 rgba(255,255,255,0.10),
    0 14px 42px rgba(196,163,255,0.28),
    0 4px 14px rgba(0,0,0,0.20);
}
.home-nav-btn:active {
  transform: translateY(1px) scale(0.985);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 4px 12px rgba(0,0,0,0.18);
}
/* Icônes & labels : blanc avec lueur subtile */
.hnb-icon {
  color: #ffffff !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45)) drop-shadow(0 0 6px rgba(196,163,255,0.4)) !important;
}
.hnb-label { color: #ffffff !important; }
.hnb-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  color: #ffffff;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)) drop-shadow(0 1px 2px rgba(12,30,80,0.5));
}
.hnb-icon svg {
  width: 100%; height: 100%;
}
.hnb-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
}

/* ── Stats bar : Liquid Glass (flamme · pièces · niveau) ─────────── */
.home-stats-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: inline-flex; align-items: center; gap: 0;
  padding: 8px 16px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.06) 50%,
      rgba(255,255,255,0.14) 100%);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 8px 28px rgba(0,0,0,0.22),
    0 2px 8px rgba(0,0,0,0.14);
  font-family: 'Orbitron', sans-serif;
  pointer-events: none;
  animation: home-stats-pop 0.6s cubic-bezier(.2,.7,.2,1.3) 1.4s both;
}
.hsb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 10px;
  line-height: 1;
}
.hsb-sep {
  width: 1px; height: 16px;
  background: linear-gradient(180deg,
    rgba(196,163,255,0) 0%,
    rgba(196,163,255,0.45) 50%,
    rgba(196,163,255,0) 100%);
  flex-shrink: 0;
}
.hsb-flame {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  filter: drop-shadow(0 0 6px rgba(251,146,60,0.85)) drop-shadow(0 0 12px rgba(220,38,38,0.45));
  animation: home-stats-flicker 1.6s cubic-bezier(0.45,0,0.55,1) infinite;
}
.hsb-flame svg { width: 100%; height: 100%; }
.hsb-val {
  font-size: 0.95rem; font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(196,163,255,0.6);
  letter-spacing: 0.04em;
  line-height: 1;
}
.hsb-val--coins {
  text-shadow: 0 0 8px rgba(251,191,36,0.7);
}
.hsb-val--lvl {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196,163,255,0.95);
  text-shadow: 0 0 8px rgba(167,139,250,0.7);
}
.hsb-unit {
  font-size: 0.7rem; font-weight: 700;
  color: rgba(253,230,138,0.85);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hsb-unit--lvl {
  color: rgba(196,163,255,0.85);
}
@keyframes home-stats-flicker {
  0%, 100% { transform: scale(1)    rotate(0deg);    opacity: 1;    }
  50%      { transform: scale(1.08) rotate(-2deg);   opacity: 0.92; }
}
@keyframes home-stats-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── Storytelling : métaphore du parcours étudiant pour le jury ── */
.home-cinematic-top .home-storytelling {
  font-family: 'Sora', 'Inter', 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255,255,255,0.45);
  margin: 10px 0 0;
  text-align: center;
  opacity: 0;
  animation: home-storytelling-fade 1.4s cubic-bezier(0.45,0,0.55,1) 1s both;
}
@keyframes home-storytelling-fade {
  from { opacity: 0;    transform: translateY(-4px); }
  to   { opacity: 0.78; transform: translateY(0); }
}

/* Stats strip — compact pill sous l'avatar */
.home-stats-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 40px;
  padding: 8px 20px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  position: relative; z-index: 2;
  flex-shrink: 0;
  transform: translateY(-25px);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.12);
}
.home-stats-strip::after {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: stats-shimmer 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes stats-shimmer {
  0%   { left: -60%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { left: 130%; opacity: 1; }
  51%  { opacity: 0; }
  100% { left: 130%; opacity: 0; }
}
body.light-theme .home-stats-strip {
  background: rgba(255,255,255,0.55);
  border-color: rgba(124,58,237,0.18);
  box-shadow: 0 4px 24px rgba(124,58,237,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}
body.light-theme .home-stats-strip::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}
.home-stats-panier {
  transform: translateY(-40px);
  z-index: 2; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: rgba(255,255,255,0.5);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.home-stats-panier svg { opacity: 0.5; }
body.light-theme .home-stats-panier { color: rgba(76,29,149,0.5); }
.hss-item {
  display: flex; align-items: center; gap: 4px;
  padding: 0 12px;
}
.hss-icon { display: flex; align-items: center; justify-content: center; }
.hss-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem; font-weight: 700; color: white;
}
.hss-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.hss-streak .hss-val { color: #fb923c; }
.hss-sep {
  width: 1px; height: 18px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.hss-xp {
  display: flex; align-items: center; gap: 6px;
}
.hss-xp-bar {
  width: 50px; height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.hss-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--neon));
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Hero play button */
.home-play-zone {
  width: 100%; display: flex; justify-content: center;
  position: relative; z-index: 2; flex-shrink: 0;
  transform: none;
}
/* ── Bouton LET'S GO — Liquid Glass teinté violet (CTA hero) ──── */
.btn-play-hero {
  all: unset;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 48px;
  height: 62px;
  min-width: 250px;
  border-radius: 100px;
  cursor: pointer;

  /* Liquid Glass teinté violet/bleu/rose */
  background:
    linear-gradient(135deg,
      rgba(124,58,237,0.34) 0%,
      rgba(79,70,229,0.28) 30%,
      rgba(96,165,250,0.26) 60%,
      rgba(236,72,153,0.32) 100%);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);

  /* Rim light */
  border: 1px solid rgba(255,255,255,0.30);
  outline: none;

  /* Reflet + halo coloré diffus */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.50),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 10px 36px rgba(124,58,237,0.38),
    0 0 60px rgba(96,165,250,0.20),
    0 4px 14px rgba(0,0,0,0.22);

  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem; font-weight: 900; letter-spacing: 0.2em;
  color: #ffffff; text-transform: uppercase;
  text-shadow: 0 0 16px rgba(255,255,255,0.5), 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  position: relative; overflow: hidden;
  z-index: 1;
}
/* Damier fixe, seul le dégradé en dessous défile */
@keyframes btn-play-bg-shift {
  0%   { background-position: 0 0, 0%   0%; }
  50%  { background-position: 0 0, 100% 0%; }
  100% { background-position: 0 0, 0%   0%; }
}
.btn-play-hero::after { content: none; }
.btn-play-hero:hover {
  transform: translateY(-3px) scale(1.02);
  background:
    linear-gradient(135deg,
      rgba(124,58,237,0.44) 0%,
      rgba(79,70,229,0.36) 30%,
      rgba(96,165,250,0.34) 60%,
      rgba(236,72,153,0.42) 100%);
  border-color: rgba(255,255,255,0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.60),
    inset 0 -1px 0 rgba(255,255,255,0.10),
    0 16px 48px rgba(96,165,250,0.45),
    0 0 90px rgba(124,58,237,0.35),
    0 4px 14px rgba(0,0,0,0.22);
}
.btn-play-hero:active {
  transform: translateY(1px) scale(0.985);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 4px 14px rgba(124,58,237,0.30);
}
.btn-play-hero .bph-icon,
.btn-play-hero svg {
  flex-shrink: 0;
  color: #ffffff;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.6));
}
.btn-play-hero .bph-text {
  color: #ffffff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem; font-weight: 900;
  letter-spacing: 0.2em;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.btn-play-hero .bph-icon {
  width: 18px; height: 18px;
}
@keyframes hero-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(96,165,250,0.5), 0 0 60px rgba(96,165,250,0.2), 0 8px 32px rgba(0,0,0,0.4); }
  50%       { box-shadow: 0 0 50px rgba(96,165,250,0.7), 0 0 90px rgba(96,165,250,0.35), 0 8px 32px rgba(0,0,0,0.4); }
}

/* HOME MENU AVATAR BUTTON */
.home-menu-avatar-btn {
  position: relative;
  width: 54px; height: 54px;
  border-radius: 18px;
  border: 2px solid rgba(96,165,250,0.6);
  background: rgba(124,58,237,0.15);
  backdrop-filter: blur(12px);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(96,165,250,0.3);
  transition: all 0.2s;
}
.home-menu-avatar-btn:hover {
  border-color: rgba(217,70,239,0.8);
  box-shadow: 0 0 24px rgba(96,165,250,0.5);
  transform: scale(1.05);
}
.hmab-avatar {
  width: 100%; height: 100%;
  overflow: hidden;
}
.hmab-avatar div { width: 100%; height: 100%; }
.hmab-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hmab-level {
  position: absolute;
  bottom: -1px; right: -1px;
  background: linear-gradient(135deg, #7c3aed, #d946ef);
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 900;
  padding: 2px 5px;
  border-radius: 6px 0 6px 0;
  line-height: 1;
}

/* ════════════════════════════════════════════════════════════
   THEME TOGGLE COMPONENT
════════════════════════════════════════════════════════════ */
.theme-toggle-track {
  position: relative;
  width: 44px; height: 24px;
  border-radius: 12px;
  background: rgba(124,58,237,0.35);
  border: 1.5px solid rgba(96,165,250,0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  flex-shrink: 0;
}
.theme-toggle-track.light {
  background: rgba(251,191,36,0.25);
  border-color: rgba(245,158,11,0.5);
}
.theme-toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--purple-l);
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.theme-toggle-track.light .theme-toggle-thumb {
  transform: translateX(20px);
  background: #f59e0b;
  box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}

/* Menu theme toggle row */
.menu-theme-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0;
}
.menu-theme-row-actions {
  margin-left: auto; display: flex; align-items: center; gap: 4px;
}

/* Shop theme toggle row */
.shop-theme-toggle {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 2px;
  padding: 6px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.shop-theme-toggle:hover { background: rgba(255,255,255,0.11); border-color: rgba(255,255,255,0.2); }
.stt-icon { display: flex; align-items: center; }
.stt-icon svg { width: 16px; height: 16px; }
.stt-icon.moon svg { stroke: #a78bfa; }
.stt-icon.sun  svg { stroke: #f59e0b; }
body.light-theme .stt-icon.moon svg { stroke: #7c3aed; }
body.light-theme .stt-icon.sun  svg { stroke: #d97706; }

/* Settings row */
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
}
.settings-row-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: var(--text); font-weight: 500;
}
.settings-row-icon { font-size: 1.1rem; }

/* ════════════════════════════════════════════════════════════
   LIGHT THEME
════════════════════════════════════════════════════════════ */
body.light-theme {
  background: #e8e2ff;
  --bg:          #f5f2ff;
  --bg2:         #ece7fe;
  --bg3:         #f0ecff;
  --card-bg:     rgba(255,255,255,0.88);
  --card-border: rgba(124,58,237,0.2);
  --text:        #1e1b4b;
  --text2:       #4c1d95;
  --text3:       #7c3aed;
  --glow-p:      0 4px 18px rgba(124,58,237,0.14);
  --glow-n:      0 4px 22px rgba(217,70,239,0.14);
}
body.light-theme #app {
  background: var(--bg);
  box-shadow: 0 0 60px rgba(124,58,237,0.12), 0 0 0 1px rgba(96,165,250,0.12);
}
@media (min-height: 960px) and (min-width: 500px) {
  body.light-theme { background: radial-gradient(ellipse at 40% 30%, #ddd4ff 0%, #e8e2ff 70%); }
}

/* ── Global white text → dark violet ── */
body.light-theme { color: #2e1065; }
body.light-theme *:not(svg):not(path):not(circle):not(line):not(polyline):not(rect):not(polygon):not(ellipse):not(defs):not(linearGradient):not(stop) {
  color: #2e1065;
}
/* Avatar screen keeps white text on dark bg */
body.light-theme #screen-avatar *:not(svg):not(path):not(circle):not(line):not(polyline):not(rect):not(polygon):not(ellipse) { color: #fff; }

/* Header & footer overlays */
body.light-theme .screen-header {
  background: linear-gradient(to bottom, rgba(245,242,255,0.97), transparent);
}
body.light-theme .screen-header .screen-title,
body.light-theme .screen-header button { color: #1e1b4b; }
body.light-theme .screen-footer {
  background: linear-gradient(to top, rgba(245,242,255,0.98) 60%, transparent);
}

/* ── Avatar screen light mode — dark purple bg, white text ── */
body.light-theme #screen-avatar .screen-header {
  background: linear-gradient(to bottom, rgba(45,15,90,0.95), transparent);
}
body.light-theme #screen-avatar .screen-header .screen-title,
body.light-theme #screen-avatar .screen-header button { color: #fff; }
body.light-theme #screen-avatar .screen-footer {
  background: linear-gradient(to top, rgba(45,15,90,0.98) 60%, transparent);
}
/* Titles/labels white — but NOT the name input nor the tabs bar */
body.light-theme #screen-avatar .panel-label {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* Unselected tabs: dark purple in light mode */
body.light-theme #screen-avatar .av-tab:not(.active) { color: #4c1d95 !important; }

/* Name input and tabs bar keep their own style */
body.light-theme #screen-avatar .av-name-input {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}
body.light-theme #screen-avatar .av-name-input::placeholder { color: rgba(255,255,255,0.45); }

/* Cards & panels */
body.light-theme .menu-panel {
  background: rgba(245,242,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(124,58,237,0.15);
}
/* Menu light mode — tout en violet foncé */
body.light-theme .menu-panel * { color: #2e1065 !important; }
body.light-theme .mp-logout-btn,
body.light-theme .mp-logout-btn * { color: #dc2626 !important; }

/* Menu light mode overrides */
body.light-theme .mp-hero {
  background: linear-gradient(135deg, rgba(124,58,237,0.1) 0%, rgba(96,165,250,0.05) 100%);
  border-bottom-color: rgba(124,58,237,0.12);
}
body.light-theme .menu-player-name { color: #1e1b4b; }
body.light-theme .menu-player-sub { color: #7c3aed; }
body.light-theme .mp-clock-card {
  background: rgba(124,58,237,0.07);
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 4px 20px rgba(124,58,237,0.1);
}
body.light-theme .menu-clock { color: #1e1b4b; text-shadow: none; }
body.light-theme .menu-date { color: #4c1d95; }
body.light-theme .menu-castle-msg { color: #7c3aed; }
body.light-theme .menu-nav-item { color: #3b0764; }
body.light-theme .mni-icon-wrap { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.15); }
body.light-theme .menu-nav-item:hover { background: rgba(124,58,237,0.07); color: #1e1b4b; }
body.light-theme .menu-nav-item:hover .mni-icon-wrap { background: rgba(124,58,237,0.18); border-color: rgba(124,58,237,0.3); }
body.light-theme .menu-nav-item.active { background: rgba(124,58,237,0.12); color: #1e1b4b; }
body.light-theme .menu-nav-item.active .mni-icon-wrap { background: rgba(124,58,237,0.2); border-color: rgba(124,58,237,0.4); }
body.light-theme .menu-footer { border-top-color: rgba(124,58,237,0.12); }
body.light-theme .mp-close-btn,
body.light-theme .mp-expand-btn { color: #4c1d95; border-color: rgba(124,58,237,0.2); background: rgba(255,255,255,0.8); }
body.light-theme .mp-close-btn:hover,
body.light-theme .mp-expand-btn:hover { background: rgba(124,58,237,0.1); color: #1e1b4b; }
body.light-theme .mp-theme-pill { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.18); color: #4c1d95; }
body.light-theme .mp-theme-pill:hover { background: rgba(124,58,237,0.14); color: #1e1b4b; }
body.light-theme .mp-logout-btn { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); }
body.light-theme .mp-logout-btn:hover { background: rgba(239,68,68,0.12); }

/* Quest cards */
body.light-theme .quest-card {
  background: rgba(255,255,255,0.88);
  border-color: rgba(124,58,237,0.16);
  box-shadow: 0 2px 14px rgba(124,58,237,0.08);
  border-radius: 22px;
}
body.light-theme .quest-card.in-basket {
  background: rgba(255,255,255,0.96);
  border-color: rgba(124,58,237,0.4);
  box-shadow: 0 4px 20px rgba(124,58,237,0.14);
}
body.light-theme .qcard-name,
body.light-theme .qcard-name-text { color: #1e1b4b !important; }
body.light-theme .qcard-time,
body.light-theme .qcard-coins,
body.light-theme .qcard-energy { background: rgba(124,58,237,0.08); color: #1e1b4b; }
body.light-theme .qcard-coins { color: #92400e; }
body.light-theme .qcard-energy { color: #4c1d95; }
body.light-theme .qcard-edit-hint { color: rgba(76,29,149,0.4); }
body.light-theme .time-num-input { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.35); color: #1e1b4b; }
body.light-theme .time-unit { color: #7c3aed; }
body.light-theme .qcard-no-time-toggle { color: #4c1d95; background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.3); }
body.light-theme .qcard-no-time-cb { border-color: rgba(124,58,237,0.5); }

/* Path nodes */
body.light-theme .path-node { background: rgba(255,255,255,0.85); border-color: rgba(124,58,237,0.2); box-shadow: 0 2px 12px rgba(124,58,237,0.07); }
body.light-theme .path-node.completed { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.35); }
body.light-theme .path-node.current   { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.45); }
body.light-theme .path-node.locked    { background: rgba(255,255,255,0.5); }
body.light-theme .path-node-title     { color: #1e1b4b; }
body.light-theme .path-node-meta      { color: #4c1d95; }
body.light-theme .path-connector      { background: rgba(124,58,237,0.2); }
body.light-theme .path-connector.completed { background: rgba(16,185,129,0.4); }
body.light-theme .path-node-start     { color: #4c1d95; border-color: rgba(124,58,237,0.3); background: rgba(255,255,255,0.7); }

/* Quest active & complete screens */
body.light-theme .quest-active-card   { background: rgba(255,255,255,0.88); border-color: rgba(124,58,237,0.2); }
body.light-theme .qa-badge {
  color: #2e1065 !important;
  border-color: rgba(46,16,101,0.3);
  background: rgba(46,16,101,0.06);
  box-shadow: none;
}
body.light-theme .qa-title {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #2e1065 !important;
  color: #2e1065 !important;
  filter: none !important;
}
body.light-theme .qa-detail {
  color: #2e1065 !important;
  -webkit-text-fill-color: #2e1065 !important;
  background: rgba(46,16,101,0.05);
  border-color: rgba(46,16,101,0.12);
}
body.light-theme .qa-timer {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #f472b6 !important;
  color: #f472b6 !important;
  filter: none !important;
}
body.light-theme .btn-timer {
  color: #2e1065 !important;
  -webkit-text-fill-color: #2e1065 !important;
  border-color: rgba(46,16,101,0.3);
  background: rgba(46,16,101,0.06);
}
body.light-theme .btn-timer:hover {
  color: #2e1065 !important;
  border-color: rgba(46,16,101,0.5);
  background: rgba(46,16,101,0.11);
}
body.light-theme .qa-tip { color: #4c1d95; background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.2); }

/* ── Journey map screen: full light mode ── */
body.light-theme .qa-journey-screen {
  background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 50%, #ede9fe 100%);
}
body.light-theme .qa-journey-header {
  background: transparent;
}
body.light-theme .qa-jh-coins {
  color: #6d28d9;
}
body.light-theme .qa-journey-timer {
  color: #2e1065 !important;
  -webkit-text-fill-color: #2e1065 !important;
  text-shadow: 0 2px 24px rgba(109,40,217,0.15);
}
body.light-theme .qa-journey-timer.urgent {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
  text-shadow: 0 2px 20px rgba(220,38,38,0.2);
}
body.light-theme .qa-journey-quest-name {
  color: rgba(46,16,101,0.6);
}
/* Track / path */
body.light-theme .qa-track-bg {
  width: 1.5px;
  background: rgba(124,58,237,0.18);
  border-radius: 2px;
}
body.light-theme .qa-track-bg::before,
body.light-theme .qa-track-bg::after {
  display: none;
}
body.light-theme .qa-track-gold {
  width: 1.5px;
  background: linear-gradient(to top, rgba(124,58,237,0.5) 0%, rgba(167,139,250,0.3) 100%);
  box-shadow: none;
}
/* Milestones → minimal empty ring */
body.light-theme .qa-milestone {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(124,58,237,0.3);
  box-shadow: none;
  filter: none;
  clip-path: none;
}
body.light-theme .qa-milestone.hit {
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.6);
  box-shadow: 0 0 8px rgba(124,58,237,0.25);
  transform: translateX(-50%) scale(1.1);
}
body.light-theme .qa-milestone-msg { color: #6d28d9; }
/* Start node → small, discreet */
body.light-theme .qa-start-circle {
  width: 28px; height: 28px;
  background: rgba(124,58,237,0.12);
  border: 2px solid rgba(124,58,237,0.35);
  box-shadow: none;
  color: #6d28d9;
}
body.light-theme .qa-start-label { color: rgba(76,29,149,0.5); }
/* Trophée circle — solid dark purple */
body.light-theme .qa-goal-circle {
  background: #2e1065;
  border: none;
  box-shadow: 0 4px 20px rgba(46,16,101,0.3);
  color: rgba(255,255,255,0.9);
}
/* Goal label (above trophée) */
body.light-theme .qa-goal-label { color: rgba(146,64,14,0.8); }
/* Buttons */
body.light-theme .qa-btn-start {
  background: #3b0764;
  border: none;
  color: rgba(255,255,255,0.95) !important;
  box-shadow:
    0 6px 28px rgba(59,7,100,0.3),
    0 1px 0 rgba(255,255,255,0.15) inset,
    0 -2px 0 rgba(0,0,0,0.15) inset;
}
body.light-theme .qa-btn-start:hover {
  background: #4c1d95;
  box-shadow: 0 8px 32px rgba(59,7,100,0.4), 0 1px 0 rgba(255,255,255,0.15) inset;
}
body.light-theme .qa-btn-start.running {
  background: rgba(245,243,255,0.9);
  border: 1.5px solid rgba(109,40,217,0.25);
  color: #4c1d95 !important;
  box-shadow: 0 2px 12px rgba(109,40,217,0.1);
}
body.light-theme .qa-btn-done {
  background: rgba(245,243,255,0.85);
  border: 1.5px solid rgba(109,40,217,0.3);
  color: #4c1d95;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(109,40,217,0.08);
}
body.light-theme .qa-btn-done:hover {
  background: rgba(109,40,217,0.12);
  border-color: rgba(109,40,217,0.45);
}
/* Buttons */
body.light-theme .btn-back,
body.light-theme .btn-menu            { background: rgba(255,255,255,0.85); border-color: rgba(124,58,237,0.25); color: #1e1b4b; }
body.light-theme .btn-exit-game       { color: #4c1d95; }
body.light-theme .btn-skip-quest,
body.light-theme .btn-abandon-quest,
body.light-theme .btn-complete-quest,
body.light-theme .gcc-btn-yes,
body.light-theme .gcc-btn-no          { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
body.light-theme .btn-primary         { color: #ffffff !important; }

body.light-theme .shop-left           { background: rgba(255,255,255,0.5); border-right-color: rgba(124,58,237,0.15); }
body.light-theme .shop-clock-wrap     { background: rgba(255,255,255,0.7); border-color: rgba(124,58,237,0.15); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); }
body.light-theme .shop-clock          { color: #1e1b4b; }
body.light-theme .shop-avail-time     { color: #4c1d95; }
body.light-theme .shop-theme-toggle   { background: rgba(255,255,255,0.6); border-color: rgba(124,58,237,0.2); }
body.light-theme .shop-theme-toggle:hover { background: rgba(255,255,255,0.8); }
body.light-theme .shop-left-stat      { background: rgba(255,255,255,0.7); border-color: rgba(124,58,237,0.2); color: #1e1b4b; }
body.light-theme .shop-basket-label   { color: #6d28d9; }
body.light-theme .shop-basket-btn     { background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%) !important; border: none !important; box-shadow: 0 4px 24px rgba(217,70,239,0.5) !important; }
body.light-theme .shop-basket-btn:hover { transform: translateY(-1px); }
body.light-theme .shop-basket-btn *,
body.light-theme .shop-basket-btn .sbb-count,
body.light-theme .shop-basket-btn .sbb-label,
body.light-theme .shop-basket-btn .sbb-stat-label,
body.light-theme .shop-basket-btn svg { color: #ffffff !important; stroke: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
body.light-theme .sbb-count           { color: #1e1b4b; }
body.light-theme .sbb-svg             { color: #6d28d9; }
body.light-theme .sbb-label           { color: #4c1d95; }
body.light-theme .shop-tab            { background: rgba(255,255,255,0.55); border-color: rgba(124,58,237,0.14); color: rgba(76,29,149,0.45) !important; }
body.light-theme .shop-tab:hover      { background: rgba(255,255,255,0.85); border-color: rgba(124,58,237,0.28); color: rgba(76,29,149,0.8) !important; }
body.light-theme .shop-tab.active     {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 45%, #9333ea 100%);
  border-color: transparent;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.4),
    0 4px 20px rgba(124,58,237,0.45),
    0 8px 36px rgba(109,40,217,0.22),
    inset 0 1px 0 rgba(255,255,255,0.3);
}
body.light-theme .shop-tab.active .shop-tab-icon,
body.light-theme .shop-tab.active .shop-tab-label { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }

body.light-theme #screen-quest-shop .rayon-title { color: #2e1065 !important; -webkit-text-fill-color: #2e1065 !important; background: none !important; }
body.light-theme .rayon-title         { color: #2e1065 !important; -webkit-text-fill-color: #2e1065 !important; background: none !important; }
body.light-theme .prep-info-btn       { color: #7c3aed; }
body.light-theme .prep-info-popup     { background: rgba(255,255,255,0.95); color: #1e1b4b; border-color: rgba(124,58,237,0.2); }
body.light-theme .agenda-add-form     { background: rgba(255,255,255,0.55); border-color: rgba(0,0,0,0.1); box-shadow: 0 8px 32px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8); }
body.light-theme .aaf-subject         { background: rgba(0,0,0,0.04); color: #1e1b4b; }
body.light-theme .aaf-subject:focus   { background: rgba(124,58,237,0.06); }
body.light-theme .aaf-ios-card        { background: rgba(0,0,0,0.04); }
body.light-theme .aaf-ios-row-sep     { border-bottom-color: rgba(0,0,0,0.08); }
body.light-theme .aaf-ios-lbl         { color: #4c1d95; }
body.light-theme .aaf-ios-inp         { color: #1e1b4b; }
body.light-theme .aaf-hm-sep          { color: #9ca3af; }
body.light-theme .aaf-type-btn        { background: rgba(0,0,0,0.04); color: #9ca3af; border-color: rgba(0,0,0,0.08); }
body.light-theme .aaf-type-btn:hover  { background: rgba(0,0,0,0.07); color: #4c1d95; border-color: rgba(0,0,0,0.15); }
body.light-theme .aaf-type-btn.active { background: rgba(0,0,0,0.09); border-color: rgba(0,0,0,0.2); color: #1e1b4b; box-shadow: 0 2px 12px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.7); }
body.light-theme .btn-agenda-add-confirm { background: #7c3aed; color: #fff; -webkit-text-fill-color: #fff; box-shadow: 0 4px 14px rgba(124,58,237,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
body.light-theme .btn-agenda-add-confirm:hover { background: #6d28d9; }
body.light-theme .btn-agenda-add-cancel { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #6b7280; }
body.light-theme .btn-agenda-add-cancel:hover { background: rgba(0,0,0,0.08); color: #374151; }
body.light-theme .history-btn         { background: rgba(255,255,255,0.75); border-color: rgba(124,58,237,0.25); color: #4c1d95; }
body.light-theme .history-btn:not(:disabled):hover { background: rgba(124,58,237,0.12); color: #1e1b4b; }

/* Summary bar */
body.light-theme .shop-summary-bar    { background: rgba(255,255,255,0.35) !important; border-bottom: 1px solid rgba(0,0,0,0.07) !important; }
body.light-theme .ssb-item            { color: rgba(30,27,75,0.6); }
body.light-theme .ssb-item.ssb-gold   { color: #92600a; }
body.light-theme .ssb-item.ssb-over   { color: #dc2626 !important; }

/* Checkbox */
body.light-theme .qcard-checkbox      { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.35); }
body.light-theme .qcard-checkbox.checked { background: var(--purple); border-color: var(--purple-l); color: white; }

/* Rayon categories & add buttons */
body.light-theme .sac-add-btn,
body.light-theme .qac-add-btn         { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.35); color: #4c1d95; }
body.light-theme .shop-cat-tab        { color: #4c1d95; border-color: rgba(124,58,237,0.2); background: rgba(255,255,255,0.7); }
body.light-theme .shop-cat-tab.active { background: var(--purple); color: white; }

/* Plan / receipt — handled per-screen above */
body.light-theme .plan-body           { background: transparent; }

/* Toast stays dark */
body.light-theme .toast { background: rgba(30,27,75,0.92); color: #f5f2ff; }

/* Scrollbars */
body.light-theme .scrollable::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.25); }
body.light-theme .scrollable::-webkit-scrollbar-track { background: rgba(124,58,237,0.05); }


/* ════════════════════════════════════════════════════════════
   PREMIUM POLISH — Global upgrades
════════════════════════════════════════════════════════════ */

/* ── Screen transitions more fluid ── */
.screen {
  transition: opacity 0.38s cubic-bezier(0.4,0,0.2,1), transform 0.38s cubic-bezier(0.4,0,0.2,1);
}
.screen.active { transform: translateY(0) scale(1); }

/* ── Shop category tabs ── */
.shop-cat-tab {
  border-radius: 14px !important;
  padding: 8px 14px !important;
  transition: all 0.22s cubic-bezier(0.4,0,0.2,1) !important;
  border: 1px solid rgba(96,165,250,0.2) !important;
  background: rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.shop-cat-tab.active {
  background: linear-gradient(135deg, rgba(124,58,237,0.55), rgba(217,70,239,0.3)) !important;
  border-color: rgba(96,165,250,0.6) !important;
  box-shadow: 0 0 16px rgba(124,58,237,0.35), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}

/* ── Rayon title row ── */
.rayon-title {
  font-size: 0.75rem !important;
  letter-spacing: 0.16em !important;
  color: var(--purple-d) !important;
  -webkit-text-fill-color: var(--purple-d) !important;
  background: none !important;
}

/* ── Toast premium ── */
.toast {
  backdrop-filter: blur(20px) !important;
  background: rgba(15,10,35,0.92) !important;
  border: 1px solid rgba(96,165,250,0.3) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(124,58,237,0.2) !important;
  border-radius: 16px !important;
}

/* ── Shop left panel avatar area ── */
.shop-main-avatar {
  filter: drop-shadow(0 8px 24px rgba(124,58,237,0.35));
}
.shop-avatar-ebar-row {
  position: absolute;
  top: 13px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; align-items: center; gap: 5px;
  width: 110px;
}
.shop-avatar-ebar-track {
  flex: 1; height: 5px; border-radius: 4px;
  background: rgba(255,255,255,0.15); overflow: hidden;
}
.shop-avatar-energy-bar {
  height: 100%; border-radius: 4px;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.5);
  transition: width 0.4s ease, background 0.3s;
}
.shop-avatar-energy-label {
  font-size: 0.62rem; font-weight: 700;
  color: #4ade80; min-width: 20px; text-align: right; flex-shrink: 0;
  transition: color 0.3s;
}

/* ── Life bar upgrade ── */
.qp-life-bar {
  height: 7px !important;
  background: rgba(255,255,255,0.08) !important;
  border-radius: 4px !important;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
.qp-life-fill {
  background: linear-gradient(90deg, #ef4444, #f97316, #fbbf24) !important;
  box-shadow: 0 0 8px rgba(249,115,22,0.5);
}

/* ── Coins display glow ── */
.qp-stat { text-shadow: 0 0 10px rgba(245,158,11,0.5); }

/* ── Path node icons ── */
.path-node-icon {
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 8px rgba(0,0,0,0.3) !important;
}
.path-node.current .path-node-icon {
  background: linear-gradient(135deg, rgba(124,58,237,0.5), rgba(217,70,239,0.3)) !important;
  box-shadow: 0 0 12px rgba(124,58,237,0.4), inset 0 1px 0 rgba(255,255,255,0.15) !important;
}
.path-node.completed .path-node-icon {
  background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(6,182,212,0.2)) !important;
  box-shadow: 0 0 10px rgba(16,185,129,0.25), inset 0 1px 0 rgba(255,255,255,0.1) !important;
}

/* ── Quest path header bar ── */
.qp-header-bar {
  background: linear-gradient(to bottom, rgba(7,9,26,0.98), transparent) !important;
  backdrop-filter: blur(12px) !important;
}

/* ── Shop summary bar ── */
.shop-summary-bar {
  border-radius: 0 !important;
  background: rgba(255,255,255,0.06) !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* ── Shop basket button ── */
.shop-basket-btn {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.13) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
  transition: all 0.2s !important;
}
.shop-basket-btn:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
  transform: none;
}

/* ── Add quest button at bottom of rayons ── */
.sac-add-btn, .qac-add-btn {
  border-radius: var(--r-lg) !important;
  border: 1.5px dashed rgba(96,165,250,0.3) !important;
  background: rgba(124,58,237,0.05) !important;
  transition: all 0.22s !important;
}
.sac-add-btn:hover, .qac-add-btn:hover {
  border-style: solid !important;
  border-color: rgba(96,165,250,0.55) !important;
  background: rgba(124,58,237,0.12) !important;
  box-shadow: 0 0 16px rgba(124,58,237,0.15) !important;
}

/* ── Quest complete screen rewards ── */
.qc-reward-chip {
  border-radius: var(--r-lg) !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(124,58,237,0.1)) !important;
  border: 1px solid rgba(96,165,250,0.25) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

/* ── Plan receipt blocks ── */
.plan-block-item {
  border-radius: var(--r-lg) !important;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(124,58,237,0.07)) !important;
  border: 1px solid rgba(96,165,250,0.2) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  transition: all 0.2s !important;
}
.plan-block-item:hover {
  border-color: rgba(96,165,250,0.4) !important;
  box-shadow: 0 4px 16px rgba(124,58,237,0.15), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

/* ── Scrollbar refined ── */
.scrollable::-webkit-scrollbar { width: 3px !important; }
.scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--purple-l), var(--purple-d)) !important;
  border-radius: 2px !important;
}

/* ════════════════════════════════════════════════════════════
   PLAN DU JOUR — DARK MODE : PARCHEMIN MAGIQUE PREMIUM
════════════════════════════════════════════════════════════ */

body:not(.light-theme) #screen-daily-plan {
  background:
    /* Nébuleuse violet — haut gauche */
    radial-gradient(ellipse 65% 50% at 15% 15%, rgba(99,102,241,0.28) 0%, transparent 60%),
    /* Nébuleuse cyan — haut droit */
    radial-gradient(ellipse 50% 40% at 80% 10%, rgba(6,182,212,0.16) 0%, transparent 55%),
    /* Accent rose — bas droite */
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(236,72,153,0.14) 0%, transparent 50%),
    /* Accent or subtil — bas gauche */
    radial-gradient(ellipse 35% 30% at 10% 85%, rgba(245,158,11,0.08) 0%, transparent 55%),
    linear-gradient(170deg, #03050e 0%, #060820 50%, #03050e 100%);
}
body:not(.light-theme) #screen-daily-plan::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 42px 35px,  rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(1px 1px at 130px 88px, rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px 1px at 220px 52px, rgba(255,255,255,0.7)  0%, transparent 100%),
    radial-gradient(1px 1px at 310px 140px,rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 68px 175px, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 190px 210px,rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 275px 190px,rgba(255,255,255,0.7)  0%, transparent 100%),
    radial-gradient(1px 1px at 350px 70px, rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px 1px at 20px 270px, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 155px 300px,rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(1px 1px at 330px 290px,rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 88px 390px, rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px 1px at 245px 410px,rgba(255,255,255,0.7)  0%, transparent 100%),
    radial-gradient(1px 1px at 370px 370px,rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 110px 455px,rgba(139,92,246,0.9) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 290px 500px,rgba(6,182,212,0.85) 0%, transparent 100%),
    radial-gradient(1px 1px at 60px 520px, rgba(255,255,255,0.5)  0%, transparent 100%),
    radial-gradient(1px 1px at 180px 550px,rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px 1px at 340px 480px,rgba(255,255,255,0.55) 0%, transparent 100%);
  animation: stars-twinkle 6s ease-in-out infinite alternate;
}
@keyframes stars-twinkle {
  0%   { opacity: 0.6; }
  30%  { opacity: 1; }
  60%  { opacity: 0.75; }
  100% { opacity: 0.9; }
}
body:not(.light-theme) #screen-daily-plan .plan-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: visible;
  position: relative;
  align-items: stretch;
}
body:not(.light-theme) #screen-daily-plan .plan-body > * {
  max-width: none;
  width: auto;
}

/* ════════════════════════════════════════════════════════
   SPACE ROUTE — PLAN DE LA MISSION
   ════════════════════════════════════════════════════════ */

/* ── HUD spatial ── */
.space-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 4px;
  flex-shrink: 0;
  gap: 12px;
  position: relative;
  z-index: 2;
}

/* ── Chrono F1 ── */
.plan-f1-chrono {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  background:
    repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%)
      0 0 / 16px 16px,
    rgba(20,5,10,0.85);
  border: 1px solid rgba(239,68,68,0.5);
  border-radius: 8px;
  padding: 6px 14px 7px;
  box-shadow: 0 0 20px rgba(239,68,68,0.25), 0 0 50px rgba(239,68,68,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.plan-f1-chrono::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ef4444, #f97316);
  box-shadow: 0 0 8px #ef4444;
}
.plan-f1-chrono-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.38rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(252,165,165,0.7);
  text-transform: uppercase;
  padding-left: 2px;
}
.plan-f1-chrono-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1;
  padding-left: 2px;
  text-shadow: 0 0 16px rgba(239,68,68,0.7), 0 0 40px rgba(239,68,68,0.35);
  animation: chrono-glow 2s ease-in-out infinite;
}
@keyframes chrono-glow {
  0%, 100% { text-shadow: 0 0 14px rgba(239,68,68,0.6), 0 0 35px rgba(239,68,68,0.25); }
  50%       { text-shadow: 0 0 24px rgba(239,68,68,0.9), 0 0 60px rgba(239,68,68,0.4), 0 0 90px rgba(249,115,22,0.2); }
}

/* ── Podium récompense ── */
.plan-podium {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  background:
    repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%)
      0 0 / 16px 16px,
    rgba(12,10,5,0.85);
  border: 1px solid rgba(245,158,11,0.5);
  border-radius: 8px;
  padding: 6px 14px 7px;
  box-shadow: 0 0 20px rgba(245,158,11,0.25), 0 0 50px rgba(245,158,11,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.plan-podium::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
  box-shadow: 0 0 8px #f59e0b;
}
.plan-podium-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.38rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(253,230,138,0.7);
  text-transform: uppercase;
}
.plan-podium-body {
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-podium-coins {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.plan-podium-diamond {
  font-size: 0.9rem;
  color: #fcd34d;
  text-shadow: 0 0 10px rgba(252,211,77,0.8);
  animation: chrono-glow-gold 2s ease-in-out infinite;
}
@keyframes chrono-glow-gold {
  0%, 100% { text-shadow: 0 0 10px rgba(252,211,77,0.6); }
  50%       { text-shadow: 0 0 20px rgba(252,211,77,1), 0 0 40px rgba(245,158,11,0.5); }
}
.plan-podium-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 16px rgba(245,158,11,0.7), 0 0 40px rgba(245,158,11,0.35);
  animation: chrono-glow-gold 2s ease-in-out 0.5s infinite;
}
.space-hud-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
/* Scan sweep sur chaque chip */
.space-hud-chip::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  animation: hud-chip-scan 4s ease-in-out infinite;
  border-radius: 20px;
}
@keyframes hud-chip-scan {
  0%   { left: -80%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { left: 140%; opacity: 0.7; }
  51%  { opacity: 0; left: -80%; }
  100% { left: -80%; opacity: 0; }
}
.hud-purple {
  background: rgba(109,40,217,0.25);
  border: 1px solid rgba(139,92,246,0.6);
  color: #c4b5fd;
  box-shadow:
    0 0 20px rgba(109,40,217,0.45),
    0 0 40px rgba(109,40,217,0.15),
    inset 0 1px 0 rgba(167,139,250,0.2);
  animation: hud-purple-pulse 3s ease-in-out infinite;
}
@keyframes hud-purple-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(109,40,217,0.45), inset 0 1px 0 rgba(167,139,250,0.2); }
  50%       { box-shadow: 0 0 30px rgba(139,92,246,0.65), 0 0 60px rgba(109,40,217,0.2), inset 0 1px 0 rgba(167,139,250,0.3); }
}
.hud-gold {
  background: rgba(161,98,7,0.25);
  border: 1px solid rgba(245,158,11,0.6);
  color: #fde68a;
  box-shadow:
    0 0 20px rgba(161,98,7,0.45),
    0 0 40px rgba(161,98,7,0.15),
    inset 0 1px 0 rgba(253,230,138,0.2);
  animation: hud-gold-pulse 3s ease-in-out 1s infinite;
}
@keyframes hud-gold-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(161,98,7,0.45), inset 0 1px 0 rgba(253,230,138,0.2); }
  50%       { box-shadow: 0 0 32px rgba(245,158,11,0.7), 0 0 60px rgba(161,98,7,0.2), inset 0 1px 0 rgba(253,230,138,0.3); }
}
.hud-chip-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
}
.space-hud-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.hud-date-lbl {
  font-size: 0.45rem;
  font-family: 'Orbitron', sans-serif;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Dialogue dans le plan spatial ── */
#screen-daily-plan .plan-dialogue {
  margin: 2px 12px 0;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* ══════════════════════════════════════════════════════════
   ARENA — route + classement F1 côte à côte
══════════════════════════════════════════════════════════ */
.plan-arena {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex: 1;
  min-height: 220px;
  padding: 0 6%;
  align-items: stretch;
  overflow: hidden;
  justify-content: center;
}

/* ── Route spatiale (wrapper) ── */
.space-route-wrap {
  flex: 0 0 55%;
  position: relative;
  overflow: visible;
  /* Nebula background derrière la route */
  background:
    radial-gradient(ellipse 80% 50% at 50% 48%, rgba(139,92,246,0.08) 0%, transparent 75%),
    radial-gradient(ellipse 45% 45% at 20% 60%, rgba(6,182,212,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 35%, rgba(236,72,153,0.04) 0%, transparent 70%);
}

/* ══════════════════════════════════════════════════════════
   CLASSEMENT — style F1 / Mario Kart
══════════════════════════════════════════════════════════ */
.plan-standings {
  flex: 1;
  min-width: 0;
  height: fit-content;
  align-self: center;
  background:
    /* Quadrillage drapeau F1 — cases alternées transparentes */
    repeating-conic-gradient(rgba(255,255,255,0.045) 0% 25%, transparent 0% 50%)
      0 0 / 32px 32px,
    /* Fond sombre premium */
    linear-gradient(160deg, rgba(8,6,28,0.97) 0%, rgba(14,8,35,0.94) 100%);
  border: 1px solid rgba(139,92,246,0.35);
  border-top: 2px solid transparent;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 40px rgba(139,92,246,0.15),
    0 0 80px rgba(139,92,246,0.06),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 0 40px rgba(139,92,246,0.04);
  /* Rainbow top edge via background-clip trick */
  background-clip: padding-box;
  position: relative;
}
.plan-standings::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    #8b5cf6, #3b82f6, #06b6d4, #10b981, #f59e0b, #ec4899, #8b5cf6);
  background-size: 200% 100%;
  animation: pst-rainbow-sweep 3s linear infinite;
  border-radius: 14px 14px 0 0;
  z-index: 2;
}
@keyframes pst-rainbow-sweep {
  from { background-position: 0% 0%; }
  to   { background-position: 200% 0%; }
}

/* ── Header ── */
.pst-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px 8px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  /* Fond opaque — couvre le quadrillage en dessous */
  background: linear-gradient(90deg,
    rgba(18,10,42,0.98) 0%,
    rgba(22,14,50,0.98) 50%,
    rgba(12,8,32,0.98) 100%);
  border-bottom: 1px solid transparent;
}
/* Accent gauche coloré */
.pst-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #8b5cf6, #06b6d4);
  border-radius: 0 2px 2px 0;
}
/* Ligne lumineuse en bas */
.pst-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(139,92,246,0) 0%, rgba(139,92,246,0.7) 25%,
    rgba(6,182,212,0.7) 75%, rgba(6,182,212,0) 100%);
}
.pst-flag-icon {
  font-size: 12px;
  flex-shrink: 0;
  line-height: 1;
}
.pst-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(196,181,253,0.95);
  font-weight: 800;
  flex: 1;
  text-transform: uppercase;
}
.pst-header-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: pst-dot-blink 1.6s ease-in-out infinite;
}
@keyframes pst-dot-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22d3ee; }
  50%       { opacity: 0.25; box-shadow: 0 0 2px #22d3ee; }
}

/* ── Liste ── */
.pst-list {
  flex: none;
  height: auto;
  max-height: 476px; /* 7 blocs × 68px (badge 40px + padding 28px), scroll au-delà */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 3px 0;
  scrollbar-width: none;
}
.pst-list::-webkit-scrollbar { display: none; }

/* ── Ligne pilote ── */
.pst-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 14px 10px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pst-row:last-child { border-bottom: none; }
.pst-row:hover {
  background: rgba(139,92,246,0.14);
  transform: translateX(2px);
}

/* Badge position (bouclier) */
.pst-pos-badge {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px; font-weight: 900;
  flex-shrink: 0;
  border: 1.5px solid;
  transition: transform 0.15s, box-shadow 0.15s;
  transform: skewX(-8deg);
  position: relative;
  overflow: hidden;
  text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}
/* Bande basse style casque F1 */
.pst-pos-badge::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: currentColor;
  opacity: 0.45;
}

/* Barre couleur équipe (livraison F1) */
.pst-bar {
  width: 5px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
  transition: width 0.2s ease;
  animation: pst-bar-shimmer 2.5s ease-in-out infinite alternate;
  position: relative;
  overflow: hidden;
}
.pst-bar::after {
  content: '';
  position: absolute;
  top: -100%; left: 0; right: 0;
  height: 40%;
  background: rgba(255,255,255,0.45);
  border-radius: 2px;
  animation: pst-bar-sweep 2.5s ease-in-out infinite;
}
@keyframes pst-bar-shimmer {
  from { filter: brightness(1); }
  to   { filter: brightness(1.7) blur(0.3px); }
}
@keyframes pst-bar-sweep {
  0%   { top: -40%; opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 0.8; }
  100% { top: 140%; opacity: 0; }
}

/* Zone info */
.pst-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pst-name {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: 'Orbitron', sans-serif;
}
.pst-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pst-cat-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  line-height: 1;
}
.pst-time {
  font-size: 8px;
  color: rgba(255,255,255,0.35);
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
}

/* Badge pièces (droite) */
.pst-butterfly-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.35);
  flex-shrink: 0;
  vertical-align: middle;
}
.pst-butterfly-circle--lg {
  width: 24px; height: 24px;
}
.pst-butterfly-circle--hd {
  width: 22px; height: 22px;
}

.pst-coins-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #f6c90e;
  background: rgba(246,201,14,0.1);
  border: 1px solid rgba(246,201,14,0.25);
  border-radius: 8px;
  padding: 3px 6px 3px 3px;
  flex-shrink: 0;
  line-height: 1.3;
  transition: box-shadow 0.15s;
}

/* Badge "EN PISTE" quand sélectionné */
.pst-active-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
  animation: pst-tag-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes pst-tag-pulse {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

/* ── Footer totaux (temps + pièces) ── */
.pst-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 11px;
  flex-shrink: 0;
  /* Couvre le quadrillage — fond opaque propre */
  background: linear-gradient(90deg,
    rgba(10,6,30,0.99) 0%,
    rgba(16,10,40,0.99) 50%,
    rgba(10,6,30,0.99) 100%);
}
.pst-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 8px; right: 8px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(139,92,246,0.6) 20%,
    rgba(6,182,212,0.6) 50%,
    rgba(236,72,153,0.5) 80%,
    transparent 100%);
}
.pst-footer-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255,255,255,0.4), 0 0 24px rgba(139,92,246,0.3);
}
.pst-footer-coins {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  color: #ffe033;
  text-shadow: 0 0 10px rgba(255,224,51,0.7), 0 0 24px rgba(255,180,0,0.4);
}

/* ══════════════════════════════════════════════
   CINÉMATIQUE D'INTRODUCTION — plein écran
══════════════════════════════════════════════ */
.plan-cinematic-wrap {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(3, 1, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: all;
}
.cin-card-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.cin-skip-btn {
  all: unset;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #ec4899;
  text-shadow: 0 0 8px #ec4899, 0 0 20px #ec489980, 0 0 40px #ec489940;
  cursor: pointer;
  padding: 8px 20px;
  border: 1px solid rgba(236,72,153,0.2);
  border-radius: 20px;
  background: rgba(236,72,153,0.05);
  opacity: 0.82;
  transition: opacity 0.15s, text-shadow 0.15s, border-color 0.15s, background 0.15s;
  pointer-events: all;
}
.cin-skip-btn:hover {
  opacity: 1;
  background: rgba(236,72,153,0.1);
  border-color: rgba(236,72,153,0.4);
  text-shadow: 0 0 12px #ec4899, 0 0 30px #ec489990, 0 0 60px #ec489960;
}

/* ══ CARTE CINÉMATIQUE — COSMIQUE PREMIUM ══ */
.cin-card {
  position: relative;
  width: 68%;
  max-width: 310px;
  border-radius: 12px;
  padding: 2px;              /* espace pour le border animé */
  overflow: visible;
  /* Border animé = faux border via background */
  background: conic-gradient(
    from 0deg,
    #8b5cf6, #3b82f6, #06b6d4, #10b981, #f59e0b, #ec4899, #8b5cf6
  );
  animation: cin-card-in 0.45s cubic-bezier(0.34,1.56,0.64,1) both,
             cin-border-spin 3s linear infinite;
  box-shadow: 0 0 60px rgba(139,92,246,0.5), 0 0 120px rgba(6,182,212,0.3);
}
@keyframes cin-border-spin {
  to { filter: hue-rotate(360deg); }
}

/* Corps intérieur */
.cin-card-inner {
  position: relative;
  padding: 24px 28px 22px 22px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(139,92,246,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(6,182,212,0.12) 0%, transparent 65%),
    linear-gradient(135deg, rgba(8,5,28,0.99) 0%, rgba(12,6,35,0.99) 100%);
  border-radius: 10px;
  overflow: hidden;
}

/* Barre livery gauche — animée */
.cin-livery {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  animation: cin-livery-pulse 1.5s ease-in-out infinite alternate;
}
@keyframes cin-livery-pulse {
  from { opacity: 0.8; filter: brightness(1); }
  to   { opacity: 1;   filter: brightness(1.8) blur(0.5px); }
}

/* Marques de coin style cockpit */
.cin-corner {
  position: absolute;
  width: 12px; height: 12px;
  border-color: rgba(255,255,255,0.35);
  border-style: solid;
  border-width: 0;
}
.cin-corner-tl { top: 8px; left: 14px; border-top-width: 1.5px; border-left-width: 1.5px; }
.cin-corner-tr { top: 8px; right: 8px;  border-top-width: 1.5px; border-right-width: 1.5px; }
.cin-corner-bl { bottom: 8px; left: 14px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.cin-corner-br { bottom: 8px; right: 8px;  border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* Numéro style F1 — énorme */
.cin-pos {
  font-family: 'Orbitron', sans-serif;
  font-size: 80px;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  transform: skewX(-10deg);
  display: block;
  margin-left: 10px;
  position: relative;
}
/* Halo derrière le numéro */
.cin-pos-halo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.5;
  animation: cin-halo-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes cin-halo-pulse {
  from { transform: translate(-50%,-50%) scale(0.9); opacity: 0.35; }
  to   { transform: translate(-50%,-50%) scale(1.3); opacity: 0.65; }
}

/* Titre — grand et dominant */
.cin-name {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 12px;
  margin-left: 10px;
  line-height: 1.3;
  text-shadow: 0 0 30px rgba(255,255,255,0.6), 0 2px 8px rgba(0,0,0,0.8);
}

/* Ligne séparatrice lumineuse */
.cin-divider {
  height: 1px;
  margin: 10px 10px 0;
  opacity: 0.4;
  animation: cin-divider-in 0.4s ease-out 0.2s both;
}
@keyframes cin-divider-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Scan premium */
@keyframes cin-scan-sweep {
  0%   { top: -5%; opacity: 0.8; }
  100% { top: 110%; opacity: 0; }
}
@keyframes cin-card-in {
  0%   { transform: translateX(110vw) scale(0.85); opacity: 0; }
  55%  { transform: translateX(-18px)  scale(1.04); opacity: 1; }
  75%  { transform: translateX(8px)   scale(0.98); }
  100% { transform: translateX(0)     scale(1);    opacity: 1; }
}
.cin-card--exit {
  animation: cin-card-out 0.42s cubic-bezier(0.55,0,1,0.45) both !important;
}
@keyframes cin-card-out {
  0%   { transform: translateX(0) scale(1); opacity: 1; }
  100% { transform: translateX(60px) scale(0.05); opacity: 0; }
}

/* Étoiles scintillantes autour de la carte */
.cin-star {
  position: absolute;
  pointer-events: none;
  font-style: normal;
  animation: cin-star-burst 0.9s ease-out both;
}
@keyframes cin-star-burst {
  0%   { transform: scale(0) rotate(0deg);   opacity: 1; }
  40%  { transform: scale(1.4) rotate(45deg); opacity: 1; }
  100% { transform: scale(0.3) rotate(90deg); opacity: 0; }
}

/* Scan line premium sur la carte */
.cin-scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent, rgba(255,255,255,0.5) 40%,
    rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.5) 60%,
    transparent);
  animation: cin-scan-sweep 0.8s ease-in-out 0.3s both;
  pointer-events: none;
}
@keyframes cin-scan-sweep {
  0%   { top: 0%; opacity: 1; }
  100% { top: 100%; opacity: 0.2; }
}

/* Drapeau doré — plante depuis le haut */
@keyframes flag-plant {
  0%   { transform: translateY(-30px); opacity: 0; }
  60%  { transform: translateY(4px);   opacity: 1; }
  80%  { transform: translateY(-2px); }
  100% { transform: translateY(0);     opacity: 1; }
}
.ck-flag {
  animation: flag-plant 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}
/* Pennant qui ondule — subtil */
@keyframes ck-flag-wave {
  0%, 100% { transform: skewX(0deg) scaleX(1); }
  50%       { transform: skewX(3deg) scaleX(1.04); }
}
.ck-flag polygon {
  animation: ck-flag-wave 2.8s ease-in-out infinite;
  transform-origin: 0 -26px;
}

.space-road-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  position: absolute;
  inset: 0;
}

/* ── Particules de course — sparks qui filent sur le circuit ── */
@keyframes road-spark-race {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -101.4; }
}
.road-spark--1 {
  animation: road-spark-race 2.6s linear infinite;
  filter: drop-shadow(0 0 5px white) drop-shadow(0 0 14px #a78bfa) drop-shadow(0 0 24px #8b5cf6);
}
.road-spark--2 {
  animation: road-spark-race 2.6s linear 0.87s infinite;
  filter: drop-shadow(0 0 5px #8b5cf6) drop-shadow(0 0 14px #3b82f6);
}
.road-spark--3 {
  animation: road-spark-race 2.6s linear 1.73s infinite;
  filter: drop-shadow(0 0 5px #06b6d4) drop-shadow(0 0 12px #10b981);
}

/* ── Dimme toute la route quand un checkpoint est sélectionné ── */
#space-road-svg.route-dimmed > path,
#space-road-svg.route-dimmed .space-start-marker,
#space-road-svg.route-dimmed .space-finish-marker {
  opacity: 0.08 !important;
  transition: opacity 0.3s ease;
}
#space-road-svg > path,
#space-road-svg .space-start-marker,
#space-road-svg .space-finish-marker {
  transition: opacity 0.3s ease;
}

/* ── Animation holographique de la route ── */
.road-holo {
  animation: holo-shift 5s linear infinite;
}
@keyframes holo-shift {
  0%   { filter: hue-rotate(0deg)   brightness(1.1); opacity: 0.72; }
  25%  { filter: hue-rotate(90deg)  brightness(1.3); opacity: 0.85; }
  50%  { filter: hue-rotate(180deg) brightness(1.2); opacity: 0.72; }
  75%  { filter: hue-rotate(270deg) brightness(1.35); opacity: 0.88; }
  100% { filter: hue-rotate(360deg) brightness(1.1); opacity: 0.72; }
}

/* ── Faisceau glissant sur la ligne d'accent du panneau ── */
.card-border-anim {
  animation: card-beam-run 1.8s linear infinite;
}
@keyframes card-beam-run {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -120; }
}

/* ── Pulsation départ ── */
.start-pulse {
  animation: start-pulse 2.5s ease-in-out infinite;
}
@keyframes start-pulse {
  0%, 100% { opacity: 0.4; r: 20; }
  50%       { opacity: 0.8; r: 25; }
}
/* Étoile départ — pulse scale */
.star-start {
  animation: star-start-pulse 2s ease-in-out infinite;
  transform-origin: 0 0;
}
@keyframes star-start-pulse {
  0%, 100% { transform: scale(1);    filter: brightness(1)   drop-shadow(0 0 4px #a78bfa); }
  50%       { transform: scale(1.18); filter: brightness(1.6) drop-shadow(0 0 12px #06b6d4); }
}

/* ── Étoile arrivée — rotation lente + glow ── */
.finish-pulse-outer {
  animation: finish-pulse-outer 2.2s ease-in-out infinite;
}
@keyframes finish-pulse-outer {
  0%, 100% { opacity: 0.3; r: 22; }
  50%       { opacity: 0.6; r: 28; }
}
.star-finish {
  animation: star-finish-spin 10s linear infinite;
  transform-origin: 0 0;
}
@keyframes star-finish-spin {
  from { transform: rotate(0deg)   scale(1);    filter: brightness(1)   drop-shadow(0 0 6px #ec4899); }
  50%  { transform: rotate(180deg) scale(1.15); filter: brightness(1.7) drop-shadow(0 0 14px #8b5cf6); }
  to   { transform: rotate(360deg) scale(1);    filter: brightness(1)   drop-shadow(0 0 6px #ec4899); }
}

/* ══════════════════════════════════════════════
   CHECKPOINTS — animations F1
══════════════════════════════════════════════ */
.space-ck {
  cursor: pointer;
  transition: opacity 0.3s ease;
}

/* Idle : transition douce à l'apparition */
.space-ck {
  transition: opacity 0.3s ease;
}

/* Aura pulsée — subtile, lente, premium */
.ck-aura {
  animation: ck-aura-pulse 3.8s ease-in-out infinite;
}
@keyframes ck-aura-pulse {
  0%   { r: 5;  opacity: 0.40; }
  60%  { r: 11; opacity: 0; }
  100% { r: 5;  opacity: 0.40; }
}
/* Deuxième aura — très discrète */
.ck-aura2 {
  animation: ck-aura-pulse2 3.8s ease-in-out 1.9s infinite;
}
@keyframes ck-aura-pulse2 {
  0%   { r: 5;  opacity: 0.18; }
  60%  { r: 14; opacity: 0; }
  100% { r: 5;  opacity: 0.18; }
}

/* Anneaux d'expansion quand sélectionné */
@keyframes ck-ring-out {
  0%   { r: 6;  stroke-width: 1.5; opacity: 0.9; }
  100% { r: 26; stroke-width: 0.2; opacity: 0; }
}
.ck-sel-ring1 { animation: ck-ring-out 1.1s ease-out infinite; }
.ck-sel-ring2 { animation: ck-ring-out 1.1s ease-out 0.4s infinite; }
.ck-sel-ring3 { animation: ck-ring-out 1.1s ease-out 0.8s infinite; }

/* Badge numéro F1 — pulse idle */
@keyframes ck-num-glow {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 1; filter: drop-shadow(0 0 3px currentColor); }
}
.ck-num-badge { animation: ck-num-glow 2s ease-in-out infinite; }

/* Badge numéro sélectionné */
@keyframes ck-num-selected {
  0%, 100% { filter: drop-shadow(0 0 4px white) brightness(1.4); }
  50%       { filter: drop-shadow(0 0 12px white) brightness(2.2); }
}
.ck-num-badge--sel { animation: ck-num-selected 0.7s ease-in-out infinite; }

/* ══════════════════════════════════════════════
   CLASSEMENT — animations F1
══════════════════════════════════════════════ */

/* ═══ ENTRÉE IMPACTANTE — 1 bloc à la fois ═══ */
@keyframes pst-row-impact {
  0%   { opacity: 0; transform: translateX(120px) scaleX(0.7); filter: brightness(0); }
  25%  { opacity: 1; filter: brightness(4);  transform: translateX(-10px) scaleX(1.03); }
  45%  { filter: brightness(2);  transform: translateX(4px)  scaleX(0.99); }
  65%  { filter: brightness(1.3); transform: translateX(-2px) scaleX(1.005); }
  100% { opacity: 1; filter: brightness(1);  transform: translateX(0)  scaleX(1); }
}

/* Flash blanc qui balaie la ligne à l'entrée */
@keyframes pst-row-flash {
  0%   { opacity: 0.9; transform: translateX(-100%); }
  100% { opacity: 0;   transform: translateX(200%); }
}

.pst-row {
  animation: pst-row-impact 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}
.pst-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,0.35) 45%,
    rgba(255,255,255,0.55) 50%, rgba(255,255,255,0.35) 55%,
    transparent 100%);
  animation: pst-row-flash 0.45s ease-out both;
  pointer-events: none;
}

/* ── Après cinématique : plus d'animation d'entrée au clic ── */
#pst-list.pst-ready .pst-row {
  animation: none !important;
}
#pst-list.pst-ready .pst-row::after {
  animation: none !important;
  opacity: 0 !important;
}

/* Délais dramatiques — chaque entrée se sent */
.pst-row:nth-child(1) { animation-delay: 0.15s; }
.pst-row:nth-child(1)::after { animation-delay: 0.15s; }
.pst-row:nth-child(2) { animation-delay: 0.55s; }
.pst-row:nth-child(2)::after { animation-delay: 0.55s; }
.pst-row:nth-child(3) { animation-delay: 0.95s; }
.pst-row:nth-child(3)::after { animation-delay: 0.95s; }
.pst-row:nth-child(4) { animation-delay: 1.35s; }
.pst-row:nth-child(4)::after { animation-delay: 1.35s; }
.pst-row:nth-child(5) { animation-delay: 1.75s; }
.pst-row:nth-child(5)::after { animation-delay: 1.75s; }
.pst-row:nth-child(6) { animation-delay: 2.15s; }
.pst-row:nth-child(6)::after { animation-delay: 2.15s; }
.pst-row:nth-child(7) { animation-delay: 2.55s; }
.pst-row:nth-child(7)::after { animation-delay: 2.55s; }

/* ── Transitions fluides sur toutes les lignes ── */
.pst-row {
  transition: opacity 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

/* ── Quand un row est actif : les autres s'estompent ── */
#pst-list.pst-has-active .pst-row:not(.pst-row--active) {
  opacity: 0.3;
  filter: blur(0.3px);
}
#pst-list.pst-has-active .pst-row--active {
  opacity: 1;
  filter: none;
  transform: translateX(3px);
}

/* ── Style de la ligne active (CSS pur, pas d'inline styles) ── */
.pst-row--active {
  background: color-mix(in srgb, var(--row-col, #8b5cf6) 12%, transparent) !important;
  box-shadow: inset 3px 0 0 var(--row-col, #8b5cf6) !important;
}
.pst-row--active .pst-name {
  color: #fff !important;
  text-shadow: 0 0 12px color-mix(in srgb, var(--row-col, #8b5cf6) 80%, transparent);
}
.pst-row--active .pst-bar {
  width: 6px !important;
}
.pst-row--active .pst-coins-badge {
  box-shadow: 0 0 8px rgba(246,201,14,0.5) !important;
  border-color: rgba(246,201,14,0.5) !important;
}

/* ── Rings checkpoint SVG — cachés par défaut, visibles si .ck-selected ── */
.space-ck .ck-sel-ring1,
.space-ck .ck-sel-ring2,
.space-ck .ck-sel-ring3 { opacity: 0; transition: opacity 0.2s; }
.space-ck.ck-selected .ck-sel-ring1 { opacity: 0.70; }
.space-ck.ck-selected .ck-sel-ring2 { opacity: 0.35; }
.space-ck.ck-selected .ck-sel-ring3 { opacity: 0.15; }

/* Badge position sélectionné */
@keyframes pst-badge-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 8px currentColor; }
  50%       { transform: scale(1.18); box-shadow: 0 0 18px currentColor; }
}
.pst-pos-badge--active {
  animation: pst-badge-pulse 0.9s ease-in-out infinite;
}

/* Coins brillent quand actif */
@keyframes pst-coins-shine {
  0%, 100% { box-shadow: 0 0 6px rgba(246,201,14,0.4); }
  50%       { box-shadow: 0 0 16px rgba(246,201,14,0.9); }
}
.pst-coins-badge--active {
  animation: pst-coins-shine 1s ease-in-out infinite;
}

/* ══════════════════════════════════════════════
   HINT INTERACTION
══════════════════════════════════════════════ */
.plan-interaction-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.38rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(167,139,250,0.55);
  flex-shrink: 0;
  animation: hint-breathe 3s ease-in-out infinite;
}
.plan-hint-icon {
  color: rgba(167,139,250,0.6);
  display: flex; align-items: center;
}
.plan-hint-sep {
  color: rgba(167,139,250,0.3);
}
@keyframes hint-breathe {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
/* Cache le hint quand une sélection est active */
.plan-interaction-hint.hint-hidden {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ══════════════════════════════════════════════
   STATS BAR (bas de l'arena)
══════════════════════════════════════════════ */
.plan-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  flex-shrink: 0;
  gap: 10px;
}
.plan-stats-left {
  display: flex;
  gap: 6px;
  align-items: center;
}
.plan-stats-pills {
  display: flex;
  gap: 8px;
  align-items: center;
}
.plan-stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  border: 1px solid;
}
.plan-stat-pill--quests {
  color: rgba(167,139,250,0.9);
  background: rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.3);
}
.plan-stat-pill--time {
  color: rgba(252,165,165,0.9);
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.25);
}
.plan-stat-pill--coins {
  color: rgba(253,230,138,0.9);
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.25);
}

/* ── État vide ── */
.space-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 20px;
  letter-spacing: 0.05em;
}

/* ── History row (undo/redo) ── */
#screen-daily-plan .plan-history-row {
  flex-shrink: 0;
  padding: 4px 14px 6px;
  position: relative;
  z-index: 2;
}

/* ════ Cartes flottantes horloge & bourse ════ */
.plan-float-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  justify-self: center;
}
.plan-float-left  { grid-column: 1; }
.plan-float-right { grid-column: 3; }

/* ── Horloge (gauche) ── */
.pfc-clock-face {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 2.5px solid rgba(139,92,246,0.75);
  background: radial-gradient(circle at 35% 30%, #2a1060 0%, #120830 70%);
  box-shadow:
    0 0 0 4px rgba(109,40,217,0.12),
    0 0 28px rgba(109,40,217,0.65),
    inset 0 0 24px rgba(109,40,217,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
/* tick marks */
.pfc-ticks { position: absolute; inset: 0; }
.pfc-ticks i {
  position: absolute;
  width: 2px; height: 7px;
  background: rgba(167,139,250,0.5);
  border-radius: 1px;
  top: 5px; left: calc(50% - 1px);
  transform-origin: 1px 37px;
  transform: rotate(var(--r));
}
.pfc-ticks i:nth-child(3n+1) { height: 10px; background: rgba(167,139,250,0.85); }
/* hands */
.pfc-hand {
  position: absolute; bottom: 50%; left: 50%;
  transform-origin: bottom center;
  border-radius: 2px;
}
.pfc-hour {
  width: 3px; height: 22px;
  margin-left: -1.5px;
  background: linear-gradient(to top, rgba(167,139,250,0.95), rgba(167,139,250,0.4));
  transform: rotate(135deg);
}
.pfc-minute {
  width: 2px; height: 30px;
  margin-left: -1px;
  background: linear-gradient(to top, #fff, rgba(255,255,255,0.3));
  transform: rotate(210deg);
}
.pfc-center-dot {
  position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: #a78bfa;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(167,139,250,0.9);
  z-index: 2;
}

/* ── Bourse (droite) ── */
.pfc-purse-face {
  width: 80px; height: 88px;
  display: flex; align-items: center; justify-content: center;
  filter:
    drop-shadow(0 0 12px rgba(236,72,153,0.6))
    drop-shadow(0 0 28px rgba(190,24,93,0.35));
}
.pfc-purse-svg { width: 88px; height: 100px; }

/* ── Valeurs & labels ── */
.pfc-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem; font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.2;
}
.pfc-value--purple {
  color: #c4b5fd;
  text-shadow: 0 0 12px rgba(139,92,246,0.8);
}
.pfc-value--pink {
  color: #f9a8d4;
  text-shadow: 0 0 12px rgba(236,72,153,0.8);
}
.pfc-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.3rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* Base layout for parchment wrapper (both themes) */
#screen-daily-plan .plan-parchment {
  display: flex; flex-direction: column; gap: 14px;
  width: 100%; max-width: 560px; flex: 1;
}
/* Light mode: premium frosted card */
body.light-theme #screen-daily-plan .plan-parchment {
  display: flex; flex-direction: column; gap: 12px; flex: 1;
  padding: 16px 14px 14px;
  border-radius: 20px;
  border: 1px solid rgba(124,58,237,0.18);
  background:
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 16 L2 2 L16 2' stroke='rgba(124,58,237,0.35)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L20 2 L20 16' stroke='rgba(124,58,237,0.35)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6 L2 20 L16 20' stroke='rgba(124,58,237,0.35)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 20 L20 20 L20 6' stroke='rgba(124,58,237,0.35)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #ffffff 0%, #f5f3ff 50%, #ede9fe 100%);
  background-position: 8px 8px, calc(100% - 8px) 8px, 8px calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 22px 22px, 22px 22px, 22px 22px, 22px 22px, 100% 100%;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.08),
    0 0 40px rgba(124,58,237,0.1),
    0 20px 60px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

/* ── The magic parchment scroll card ── */
body:not(.light-theme) #screen-daily-plan .plan-parchment {
  grid-column: 2;
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 14px 14px;
  border-radius: 18px;
  border: 1.5px solid rgba(34,211,238,0.35);
  position: relative;
  overflow: hidden;
  /* 4-corner L-bracket ornaments + diamond grid + base */
  background-image:
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 16 L2 2 L16 2' stroke='rgba(34,211,238,0.6)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2 L20 2 L20 16' stroke='rgba(34,211,238,0.6)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6 L2 20 L16 20' stroke='rgba(34,211,238,0.6)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 20 L20 20 L20 6' stroke='rgba(34,211,238,0.6)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"),
    repeating-linear-gradient(45deg,  rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 12px),
    linear-gradient(175deg, #111030 0%, #16143a 45%, #0e0c2a 100%);
  background-position:
    8px 8px,
    calc(100% - 8px) 8px,
    8px calc(100% - 8px),
    calc(100% - 8px) calc(100% - 8px),
    0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, no-repeat;
  background-size: 22px 22px, 22px 22px, 22px 22px, 22px 22px, auto, auto, 100% 100%;
  box-shadow:
    0 0 0 1px rgba(34,211,238,0.12),
    0 0 0 4px rgba(34,211,238,0.05),
    0 0 30px rgba(34,211,238,0.18),
    0 0 60px rgba(99,102,241,0.12),
    0 24px 80px rgba(0,0,0,0.9),
    inset 0 1px 0 rgba(255,255,255,0.09),
    inset 0 0 60px rgba(99,102,241,0.06);
}

/* Shimmer sweep across parchment */
body:not(.light-theme) #screen-daily-plan .plan-parchment::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    108deg,
    transparent 20%,
    rgba(255,255,255,0.02) 42%,
    rgba(255,255,255,0.04) 50%,
    rgba(255,255,255,0.02) 58%,
    transparent 80%
  );
  pointer-events: none; z-index: 0;
}
/* All children above shimmer */
body:not(.light-theme) #screen-daily-plan .plan-parchment > * {
  position: relative; z-index: 1;
}

/* ── Scissors cut line ── */
.plan-parchment-cut {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.plan-parchment-cut::before,
.plan-parchment-cut::after {
  content: '';
  flex: 1;
  border-bottom: 1px dashed rgba(96,165,250,0.28);
}
body.light-theme #screen-daily-plan .plan-parchment-cut { display: none; }
body:not(.light-theme) #screen-daily-plan .plan-parchment-cut { color: rgba(96,165,250,0.55); }

/* ── Receipt header ── */
body:not(.light-theme) #screen-daily-plan .plan-header-bar {
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  padding-bottom: 14px;
}
body:not(.light-theme) #screen-daily-plan .plan-receipt-tag {
  color: rgba(96,165,250,0.9);
  letter-spacing: 0.22em;
  font-size: 0.52rem;
}

/* ── Quest blocks: glass receipt lines with white glow ── */
body:not(.light-theme) #screen-daily-plan .plan-block {
  background: linear-gradient(135deg, rgba(255,255,255,0.065) 0%, rgba(124,58,237,0.07) 100%);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 0 18px rgba(255,255,255,0.08),
    0 0 36px rgba(96,165,250,0.07),
    0 6px 28px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.09),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  position: relative; overflow: hidden;
}
body:not(.light-theme) #screen-daily-plan .plan-block::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(108deg,
    transparent 30%, rgba(255,255,255,0.03) 48%,
    rgba(255,255,255,0.055) 50%, rgba(255,255,255,0.03) 52%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body:not(.light-theme) #screen-daily-plan .plan-block + .plan-block::after {
  content: '';
  position: absolute;
  top: -7px; left: 12%; width: 76%;
  border-top: 1px dashed rgba(255,255,255,0.06);
  pointer-events: none;
}
body:not(.light-theme) #screen-daily-plan .plan-block > * { position: relative; z-index: 1; }

body:not(.light-theme) #screen-daily-plan .pb-num   { color: rgba(96,165,250,0.55); font-size: 0.5rem; opacity: 1; letter-spacing: 0.12em; }
body:not(.light-theme) #screen-daily-plan .pb-name  { color: rgba(255,255,255,0.95); font-size: 1rem; }
body:not(.light-theme) #screen-daily-plan .pb-meta  { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
body:not(.light-theme) #screen-daily-plan .pb-time-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}
body:not(.light-theme) #screen-daily-plan .pb-time-input:focus {
  background: rgba(124,58,237,0.15);
  border-color: rgba(96,165,250,0.5);
  box-shadow: 0 0 10px rgba(96,165,250,0.2);
}
body:not(.light-theme) #screen-daily-plan .plan-block.drag-over {
  border-color: rgba(96,165,250,0.6);
  box-shadow: 0 0 0 1px rgba(96,165,250,0.4), 0 0 24px rgba(96,165,250,0.3), 0 6px 28px rgba(0,0,0,0.5);
  background: rgba(124,58,237,0.12);
}

/* ── Totals bar: double dashed receipt total ── */
body:not(.light-theme) #screen-daily-plan .plan-totals-bar {
  background: linear-gradient(135deg, rgba(124,58,237,0.1) 0%, rgba(96,165,250,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px dashed rgba(255,255,255,0.15);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 0 20px rgba(96,165,250,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
body:not(.light-theme) #screen-daily-plan .plan-total-stat      { color: rgba(255,255,255,0.8); }
body:not(.light-theme) #screen-daily-plan .plan-total-stat.gold { color: var(--gold); text-shadow: 0 0 12px rgba(245,158,11,0.4); }

/* ── History buttons ── */
body:not(.light-theme) #screen-daily-plan .history-btn {
  background: rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.3);
  color: rgba(167,139,250,0.7);
  box-shadow: 0 0 12px rgba(139,92,246,0.1);
  transition: all 0.18s ease;
}
body:not(.light-theme) #screen-daily-plan .history-btn:hover:not(:disabled) {
  background: rgba(96,165,250,0.18);
  border-color: rgba(96,165,250,0.5);
  color: rgba(255,255,255,0.95);
  box-shadow: 0 0 18px rgba(96,165,250,0.3);
  transform: scale(1.08);
}
body:not(.light-theme) #screen-daily-plan .plan-hint { color: rgba(255,255,255,0.3); font-size: 0.7rem; }

/* ── Parchment bottom seal ── */
.plan-parchment-seal {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding-top: 2px;
}
.plan-parchment-seal-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.42rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
body.light-theme #screen-daily-plan .plan-parchment-seal { display: flex; color: rgba(76,29,149,0.5); }
body.light-theme #screen-daily-plan .plan-parchment-seal svg { filter: drop-shadow(0 0 3px rgba(124,58,237,0.2)); }
body:not(.light-theme) #screen-daily-plan .plan-parchment-seal { color: rgba(255,255,255,0.75); }
body:not(.light-theme) #screen-daily-plan .plan-parchment-seal svg { filter: drop-shadow(0 0 4px rgba(255,255,255,0.2)); }

/* ── Révisions Galaxie dans le plan du jour ── */
.plan-galaxy-revisions {
  margin-top: 14px;
  border-radius: 16px;
  background: rgba(12,6,32,0.85);
  border: 1px solid rgba(139,92,246,0.22);
  overflow: hidden;
}
.plan-galaxy-revisions:empty { display: none; }
.pgr-header {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(139,92,246,0.12);
}
.pgr-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(167,139,250,0.8);
  text-transform: uppercase; flex: 1;
}
.pgr-count {
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem; font-weight: 700;
  color: #E879F9; background: rgba(192,38,211,0.18);
  border: 1px solid rgba(192,38,211,0.35);
  border-radius: 8px; padding: 1px 7px;
}
.pgr-rows { display: flex; flex-direction: column; gap: 0; }
.pgr-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.pgr-row:last-child { border-bottom: none; }
.pgr-row:hover { background: rgba(139,92,246,0.1); }
.pgr-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pgr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pgr-chap {
  font-family: 'Rajdhani', sans-serif; font-size: 0.82rem; font-weight: 700;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pgr-subj {
  font-family: 'Rajdhani', sans-serif; font-size: 0.65rem; color: rgba(255,255,255,0.35);
}
.pgr-badge {
  font-family: 'Orbitron', sans-serif; font-size: 0.5rem; font-weight: 700;
  flex-shrink: 0; letter-spacing: 0.06em;
}

/* ── Btn back/menu refined icon look ── */
.btn-exit-game {
  width: 40px; height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(160%);
  transition: all 0.18s cubic-bezier(0.34,1.56,0.64,1);
  display: grid; place-items: center;
  cursor: pointer;
}
.btn-exit-game:hover {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.38);
  color: #fca5a5;
  transform: scale(1.07);
}
.btn-exit-game:active {
  transform: scale(0.93);
  background: rgba(239,68,68,0.28);
}

/* Explore mode (opened from Apprentissage Actif) */
.qa-hud-bar.qa-explore-mode #qa-timer,
.qa-hud-bar.qa-explore-mode .qa-hud-coins,
.qa-hud-bar.qa-explore-mode #btn-timer,
.qa-hud-bar.qa-explore-mode .qa-hud-btn-done { display: none !important; }

.btn-explore-back {
  width: auto !important; padding: 0 14px !important;
  gap: 6px; display: flex !important; align-items: center;
  font-family: 'Nunito', sans-serif; font-size: 0.8rem; font-weight: 800;
  color: #c4b5fd !important; letter-spacing: 0.03em;
  background: rgba(109,40,217,0.2) !important;
  border-color: rgba(139,92,246,0.4) !important;
}
.btn-explore-back:hover {
  background: rgba(109,40,217,0.35) !important;
  border-color: rgba(167,139,250,0.6) !important;
  color: #ede9fe !important;
  transform: scale(1.05) !important;
}


/* ════════════════════════════════════════════════════════════
   TRÉSOR — DARK MODE PREMIUM
════════════════════════════════════════════════════════════ */

/* Stars icon: visible by default */
.treasure-stars-icon {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

/* Burst entrance animation */
.treasure-burst-svg {
  animation: treasure-burst-in 0.9s 0.2s both cubic-bezier(0.34,1.56,0.64,1);
  filter: drop-shadow(0 0 18px rgba(245,158,11,0.55)) drop-shadow(0 0 40px rgba(245,158,11,0.25));
}
@keyframes treasure-burst-in {
  from { transform: scale(0.2) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);    opacity: 1; }
}

/* "Trésor Débloqué !" — white in dark mode */
body:not(.light-theme) .treasure-title {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: unset !important;
  color: #ffffff !important;
  filter: none !important;
  text-shadow:
    0 0 28px rgba(255,255,255,0.18),
    0 2px 8px rgba(0,0,0,0.4);
}

/* Gold glow on the chest glow — stays for stars */
body:not(.light-theme) .chest-glow {
  background: radial-gradient(circle, rgba(245,158,11,0.35) 0%, rgba(96,165,250,0.15) 50%, transparent 70%);
  animation: pulse-ring 2.4s ease-in-out infinite;
}

/* Philosophy quote */
body:not(.light-theme) .treasure-philosophy {
  color: rgba(96,165,250,0.85);
}

/* Stats row: same as qc-coin-card */
body:not(.light-theme) .treasure-stats-row {
  background: linear-gradient(145deg, rgba(60,35,5,0.92) 0%, rgba(40,22,2,0.96) 100%) !important;
  border: 1.5px solid rgba(251,191,36,0.45) !important;
  border-radius: 20px !important;
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.12),
    0 0 50px rgba(245,158,11,0.20),
    0 8px 32px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,220,80,0.18) !important;
  gap: 28px !important;
  padding: 20px 36px !important;
}

@keyframes stats-slide-up {
  from { transform: translateY(30px) scale(0.9); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* Shimmer sweep across the card */
body:not(.light-theme) .treasure-stats-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255,255,255,0.05) 45%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0.05) 55%,
    transparent 75%
  );
  animation: treasure-shimmer 3.5s 1.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes treasure-shimmer {
  0%   { transform: translateX(-100%); }
  40%  { transform: translateX(200%); }
  100% { transform: translateX(200%); }
}

/* Individual stat blocks: game badge style */
body:not(.light-theme) .treasure-stat {
  flex: 1;
  padding: 18px 16px !important;
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  /* Staggered pop-in */
}
body:not(.light-theme) .treasure-stat:first-child {
  animation: stat-pop 0.5s 0.7s both cubic-bezier(0.34,1.56,0.64,1);
  border-right: 1px solid rgba(255,255,255,0.07);
}
body:not(.light-theme) .treasure-stat:last-child {
  animation: stat-pop 0.5s 0.88s both cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes stat-pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Stat value: gold with glow */
body:not(.light-theme) .ts-icon-coin {
  color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(245,158,11,0.55));
}
body:not(.light-theme) .ts-icon-sword {
  color: #a78bfa;
  filter: drop-shadow(0 0 8px rgba(96,165,250,0.6));
}
body:not(.light-theme) .ts-val {
  font-size: 2rem !important;
  color: var(--gold) !important;
  text-shadow:
    0 0 16px rgba(245,158,11,0.6),
    0 0 32px rgba(245,158,11,0.25);
  letter-spacing: -0.02em;
}

/* Stat label: silver */
body:not(.light-theme) .ts-label {
  color: rgba(255,255,255,0.45);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Congrats text */
body:not(.light-theme) .treasure-congrats {
  color: rgba(255,255,255,0.95);
  animation: fade-in-up 0.5s 0.35s both ease-out;
}

/* Persona message */
body:not(.light-theme) .treasure-persona-msg {
  color: rgba(255,255,255,0.5);
  animation: fade-in-up 0.5s 0.45s both ease-out;
}

@keyframes fade-in-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Trésor: light mode ── */
body.light-theme #screen-treasure {
  background:
    radial-gradient(ellipse 80% 55% at 50% 18%, rgba(109,40,217,0.14) 0%, transparent 65%),
    linear-gradient(160deg, #ffffff 0%, #f5f3ff 55%, #ede9fe 100%);
}
body.light-theme .chest-glow {
  background: radial-gradient(circle, rgba(245,158,11,0.22) 0%, rgba(109,40,217,0.1) 50%, transparent 70%);
  animation: pulse-ring 2.4s ease-in-out infinite;
}
body.light-theme .treasure-burst-svg {
  filter: drop-shadow(0 0 14px rgba(245,158,11,0.5)) drop-shadow(0 0 28px rgba(109,40,217,0.2));
}
body.light-theme .treasure-title {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #2e1065 !important;
  color: #2e1065 !important;
  filter: none !important;
  text-shadow: 0 2px 20px rgba(109,40,217,0.12);
}
body.light-theme .treasure-congrats { color: #1e1b4b; font-weight: 800; }
body.light-theme .treasure-persona-msg { color: rgba(46,16,101,0.55); }
body.light-theme .treasure-philosophy { color: rgba(109,40,217,0.65); }
/* Stats card — même structure glass que dark mode */
body.light-theme .treasure-stats-row {
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(245,243,255,0.75) 100%) !important;
  border: 1px solid rgba(124,58,237,0.16) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(28px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(160%) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.7),
    0 0 24px rgba(109,40,217,0.08),
    0 8px 32px rgba(109,40,217,0.1),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
  gap: 0 !important;
  padding: 0 !important;
  position: relative; overflow: hidden;
}
body.light-theme .treasure-stat:first-child {
  border-right: 1px solid rgba(124,58,237,0.1);
}
body.light-theme .ts-icon-coin {
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(245,158,11,0.4));
}
body.light-theme .ts-icon-sword {
  color: #7c3aed;
  filter: drop-shadow(0 0 6px rgba(124,58,237,0.3));
}
body.light-theme .ts-val {
  color: #2e1065 !important;
  text-shadow: none;
}
body.light-theme .ts-label { color: rgba(76,29,149,0.45); }

/* ════════════════════════════════════════════════════════════
   GAME CONFIRM MODALS (skip / exit)
════════════════════════════════════════════════════════════ */
.game-confirm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,6,25,0.75);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.game-confirm-overlay.hidden { display: none; }
.game-confirm-card {
  background: linear-gradient(145deg, rgba(30,16,60,0.97), rgba(20,10,45,0.97));
  border: 1px solid rgba(96,165,250,0.3);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 360px; width: 100%;
  box-shadow: 0 0 0 1px rgba(96,165,250,0.1), 0 24px 64px rgba(0,0,0,0.6), 0 0 40px rgba(124,58,237,0.15);
  text-align: center;
  animation: slideUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.gcc-icon { font-size: 2.2rem; margin-bottom: 12px; }
.gcc-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 800;
  color: var(--text); margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.gcc-msg {
  font-size: 0.82rem; color: var(--text2);
  line-height: 1.6; margin-bottom: 24px;
}
.gcc-msg strong { color: var(--text); }
.gcc-actions { display: flex; flex-direction: column; gap: 10px; }
.gcc-btn {
  width: 100%; padding: 13px 20px;
  border-radius: 14px; border: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s;
}
.gcc-btn-yes {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(217,70,239,0.35), 0 4px 24px rgba(217,70,239,0.5), 0 0 10px rgba(6,182,212,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}
.gcc-btn-yes:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(216,180,254,0.5), 0 0 40px rgba(196,132,252,0.6); }
.gcc-btn-no {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(217,70,239,0.35), 0 4px 24px rgba(217,70,239,0.4), 0 0 10px rgba(6,182,212,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
}
.gcc-btn-no:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(96,165,250,0.5), 0 0 40px rgba(139,92,246,0.65); }
.gcc-btn-cancel {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 0.65rem;
  box-shadow: 0 0 0 1px rgba(91,33,182,0.4), 0 4px 16px rgba(59,7,100,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}
.gcc-btn-cancel:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(109,40,217,0.5), 0 0 28px rgba(76,29,149,0.55); }

/* ── Quit dialog: 2 boutons simplifiés ── */
.gcc-quit-card .gcc-quit-icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  margin: 0 auto 16px;
  color: rgba(196,181,253,0.9);
}
.gcc-btn-stay {
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(217,70,239,0.35), 0 4px 24px rgba(217,70,239,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
}
.gcc-btn-stay:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(216,180,254,0.5), 0 0 40px rgba(196,132,252,0.6); }
.gcc-btn-quit {
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.25) !important;
  color: #f87171;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 13px 20px; border-radius: 14px; width: 100%;
  cursor: pointer; transition: all 0.2s;
  font-family: 'Orbitron', sans-serif;
}
.gcc-btn-quit:hover {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.55) !important;
  box-shadow: 0 0 20px rgba(239,68,68,0.2);
  transform: translateY(-1px);
}

/* ── Écran résultats sortie ── */
.gcc-results-card { max-width: 340px; }
.ger-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(217,70,239,0.25);
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(217,70,239,0.15);
}
.ger-progress-wrap {
  margin: 0 0 14px;
}
.ger-progress-label {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: rgba(255,255,255,0.55);
  margin-bottom: 6px; letter-spacing: 0.04em;
}
.ger-progress-bar {
  height: 7px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(124,58,237,0.2);
  overflow: hidden;
}
.ger-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #7c3aed 0%, #d946ef 50%, #06b6d4 100%);
  box-shadow: 0 0 10px rgba(217,70,239,0.6);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.ger-cats {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
}
.ger-cat-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem;
}
.ger-cat-label { color: rgba(196,181,253,0.8); }
.ger-cat-count {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  color: #c4b5fd;
}
.ger-coins-row {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; font-size: 0.75rem; font-weight: 600;
  color: #fbbf24;
}

/* ── Catchup section labels ── */
.catchup-label-game {
  color: #c4b5fd;
  border-left: 2px solid rgba(96,165,250,0.5);
  padding-left: 8px;
}
.catchup-label-agenda {
  color: #fca5a5;
  border-left: 2px solid rgba(239,68,68,0.4);
  padding-left: 8px;
}
.catchup-section-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text3); margin: 12px 2px 8px;
  cursor: pointer; user-select: none;
}
.catchup-section-label svg { flex-shrink: 0; }
.cs-chevron {
  width: 14px; height: 14px; flex-shrink: 0;
  transition: transform 0.2s ease;
}
.cs-label-text { flex: 1; }
.catchup-select-all {
  margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: transparent;
  border: 1.5px solid rgba(139,92,246,0.4);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  color: #a78bfa;
}
.catchup-select-all:hover { border-color: rgba(139,92,246,0.8); }
.catchup-select-all.active {
  background: rgba(139,92,246,0.25);
  border-color: #a78bfa;
}
.catchup-select-all svg { width: 11px; height: 11px; }

/* Light theme overrides */
/* ════ SHOP SCREEN — "Générer mon plan" + "+ Ajouter" glass override ════ */
#screen-quest-shop .shop-right-footer .btn-primary {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.18) !important;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
#screen-quest-shop .shop-right-footer .btn-primary:hover {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.32) !important;
  box-shadow: 0 6px 28px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.22) !important;
  transform: none;
}
body.light-theme #screen-quest-shop .shop-right-footer .btn-primary {
  background: rgba(30,27,75,0.1) !important;
  border-color: rgba(30,27,75,0.18) !important;
  color: #1e1b4b !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.7) !important;
}
/* "+ Ajouter" rayon button glass */
#screen-quest-shop .agenda-add-btn, #screen-quest-shop [onclick*="agendaForm"], #screen-quest-shop .rayon-ajouter-btn {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}

body.light-theme .game-confirm-card { background: rgba(255,255,255,0.96); border-color: rgba(124,58,237,0.2); }
body.light-theme .gcc-title { color: #1e1b4b; }
body.light-theme .gcc-msg { color: #4c1d95; }
body.light-theme .gcc-msg strong { color: #1e1b4b; }
body.light-theme .gcc-btn-cancel { color: #6b7280; border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.04); }
body.light-theme .agenda-past-banner { background: rgba(254,226,226,0.6); border-color: rgba(239,68,68,0.25); }
body.light-theme .apb-title { color: #b91c1c; }
body.light-theme .apb-sub { color: rgba(30,27,75,0.5); }
body.light-theme .apb-sub strong { color: #b91c1c; }
body.light-theme .agenda-editable-item { background: rgba(255,255,255,0.55); border-color: rgba(0,0,0,0.08); }
body.light-theme .agenda-editable-item:hover { background: rgba(255,255,255,0.75); }
body.light-theme .agenda-editable-item.selected { border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.07); }
body.light-theme .agenda-editable-item.missed   { border-color: rgba(239,68,68,0.3); background: rgba(254,226,226,0.4); }
body.light-theme .aei-time { color: rgba(30,27,75,0.4); }
body.light-theme .ahf-missed { color: #b91c1c; background: rgba(239,68,68,0.07); border-color: rgba(239,68,68,0.2); }
/* Light theme — new accordion agenda items */
body.light-theme .agenda-editable-item.aei-upcoming { border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.07); }
body.light-theme .agenda-editable-item.aei-overdue  { border-color: rgba(239,68,68,0.45);  background: rgba(239,68,68,0.07); }
body.light-theme .agenda-editable-item.aei-selected { border-color: rgba(139,92,246,0.5);  background: rgba(139,92,246,0.09); }
body.light-theme .aei-subject-text { color: #1e1b4b; }
body.light-theme .aei-compact-time { color: rgba(30,27,75,0.45); }
body.light-theme .aei-upcoming .aei-compact-time { color: rgba(22,101,52,0.75); }
body.light-theme .aei-overdue  .aei-compact-time { color: rgba(153,27,27,0.75); }
body.light-theme .aei-chevron  { stroke: rgba(30,27,75,0.3); }

/* ════════════════════════════════════════════════════════
   SHOP SCREEN LAYOUT REDESIGN — bottom bar + basket
════════════════════════════════════════════════════════ */

/* Title override for shop screen */
body:not(.light-theme) #screen-quest-shop .screen-title {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: unset !important;
  color: #ffffff !important;
}
body.light-theme #screen-quest-shop .screen-title { -webkit-text-fill-color: #2e1065 !important; color: #2e1065 !important; }

/* ── Alerte cockpit : réserve critique ── */
.shop-blocked-msg {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 11px 12px;
  margin-bottom: 9px;
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.55);
  border-radius: 6px;
  overflow: hidden;
  animation: sbm-pulse 2s ease-in-out infinite;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
/* Ligne de scan animée */
.sbm-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(239,68,68,0.04) 3px,
    rgba(239,68,68,0.04) 4px
  );
  pointer-events: none;
  z-index: 0;
}
.sbm-scanline::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(239,68,68,0.08), transparent);
  animation: sbm-scan 2.4s linear infinite;
  top: -40%;
}
/* Coins coupés décoratifs */
.sbm-corner {
  position: absolute;
  width: 8px; height: 8px;
  border-color: rgba(239,68,68,0.80);
  border-style: solid;
  z-index: 1;
}
.sbm-tl { top: 3px; left: 3px;  border-width: 1.5px 0 0 1.5px; }
.sbm-tr { top: 3px; right: 3px; border-width: 1.5px 1.5px 0 0; }
.sbm-bl { bottom: 3px; left: 3px;  border-width: 0 0 1.5px 1.5px; }
.sbm-br { bottom: 3px; right: 3px; border-width: 0 1.5px 1.5px 0; }
/* Icône */
.sbm-icon {
  position: relative; z-index: 2;
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.50);
  border-radius: 4px;
  animation: sbm-icon-flash 1.2s ease-in-out infinite;
}
.sbm-icon svg { width: 16px; height: 16px; stroke: #f87171; }
/* Texte */
.sbm-text {
  position: relative; z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sbm-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(248,113,113,0.70);
  text-transform: uppercase;
  animation: sbm-blink 1.2s step-end infinite;
}
.sbm-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f87171;
  text-shadow: 0 0 10px rgba(248,113,113,0.55);
}
.sbm-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(248,113,113,0.65);
  letter-spacing: 0.01em;
}
@keyframes sbm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0), inset 0 0 0 0 rgba(239,68,68,0); }
  50%       { box-shadow: 0 0 16px rgba(239,68,68,0.28), inset 0 0 8px rgba(239,68,68,0.06); }
}
@keyframes sbm-scan {
  0%   { top: -40%; }
  100% { top: 140%; }
}
@keyframes sbm-icon-flash {
  0%, 60%, 100% { opacity: 1; }
  30%           { opacity: 0.4; }
}
@keyframes sbm-blink {
  0%, 49% { opacity: 1; }
  50%, 99% { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   CENTRE DE MISSION — COCKPIT COSMIQUE (.qs-*)
   Deep space, neon HUD, étoiles, futuriste premium
═══════════════════════════════════════════════════════════════ */
/* Variables cockpit */
.qs-root {
  --qs-bg:       #020410;
  --qs-indigo:   #6366f1;
  --qs-cyan:     #22d3ee;
  --qs-purple:   #60a5fa;
  --qs-blue:     #3b82f6;
  --qs-green:    #4ade80;
  --qs-glass:    rgba(8,10,28,0.82);
  --qs-border:   rgba(99,102,241,0.35);
  --qs-glow:     rgba(99,102,241,0.18);
  --qs-text:     #e2e8f0;
  --qs-dim:      rgba(148,163,184,0.55);
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: stretch;
  overflow: hidden;
  /* ═══ CIEL ÉTOILÉ POÉTIQUE — plein écran ═══ */
  background:
    /* Voie lactée bleue — grand arc centre */
    radial-gradient(ellipse 90% 70% at 45% 55%, rgba(30,55,170,0.70) 0%, rgba(18,38,130,0.40) 40%, transparent 72%),
    /* Nébuleuse teal lumineuse — haut droite, comme une aurore */
    radial-gradient(ellipse 65% 50% at 85% 20%, rgba(0,200,220,0.50) 0%, rgba(0,155,185,0.22) 48%, transparent 74%),
    /* Touche rose-corail chaude — bas droite */
    radial-gradient(ellipse 55% 45% at 88% 85%, rgba(220,80,150,0.38) 0%, rgba(180,50,120,0.16) 50%, transparent 72%),
    /* Nébuleuse violette douce — gauche */
    radial-gradient(ellipse 50% 60% at 5% 50%, rgba(120,45,210,0.45) 0%, rgba(90,25,170,0.20) 50%, transparent 76%),
    /* Lueur ambrée chaude en bas — horizon céleste */
    radial-gradient(ellipse 80% 30% at 50% 100%, rgba(200,130,50,0.28) 0%, rgba(160,90,30,0.12) 55%, transparent 80%),
    /* Cœur galactique rose-or — centre */
    radial-gradient(ellipse 30% 25% at 52% 42%, rgba(255,200,120,0.18) 0%, transparent 65%),
    /* Base — nuit profonde chaude, pas froide */
    #020310;
  color: var(--qs-text);
}
/* ── Canvas starfield ── */
.qs-dust-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

/* Cockpit frame — invisible, full screen space */
.qs-cockpit-frame,
.qs-cf-top, .qs-cf-left, .qs-cf-right, .qs-cf-bottom,
.qs-cf-edge-left, .qs-cf-edge-right, .qs-cf-glow-bottom {
  display: none;
}

/* ════════════════════════════════════════════════════════════
   PANNEAU GAUCHE — CARGAISON DE MISSION
════════════════════════════════════════════════════════════ */

/* Couleurs par rubrique */
:root {
  --lp-revision:  #a78bfa;   /* violet doux */
  --lp-mandatory: #22d3ee;   /* cyan cristal */
  --lp-vitality:  #34d399;   /* émeraude */
  --lp-catchup:   #a78bfa;   /* violet — unifié */
  --lp-prep:      #c4b5fd;   /* violet clair — unifié */
  --lp-active:    #a78bfa;   /* défaut = revision */
}

.qs-left-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 270px;
  z-index: 10;
  display: flex; flex-direction: column;
  background: rgba(4,5,18,0.82);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--lp-active);
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.04),
    4px 0 40px rgba(0,0,0,0.5),
    0 0 30px color-mix(in srgb, var(--lp-active) 15%, transparent);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

/* Couleurs actives du panneau selon la rubrique ouverte */
.qs-left-panel[data-active="revision"]  { --lp-active: var(--lp-revision); }
.qs-left-panel[data-active="mandatory"] { --lp-active: var(--lp-mandatory); }
.qs-left-panel[data-active="vitality"]  { --lp-active: var(--lp-vitality); }
.qs-left-panel[data-active="catchup"]   { --lp-active: var(--lp-catchup); }
.qs-left-panel[data-active="prep"]      { --lp-active: var(--lp-prep); }

/* Barre colorée en haut du panneau */
.qs-left-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--lp-active);
  box-shadow: 0 0 12px var(--lp-active), 0 0 24px color-mix(in srgb, var(--lp-active) 50%, transparent);
  transition: background 0.4s ease, box-shadow 0.4s ease;
  z-index: 1;
}

/* En-tête titre */
.qs-lp-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.qs-lp-header-icon { color: var(--lp-active); opacity: 0.8; transition: color 0.4s; }
.qs-lp-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(220,215,255,0.85);
}

/* Corps scrollable */
.qs-lp-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 6px 0 8px;
}
.qs-lp-body::-webkit-scrollbar { width: 3px; }
.qs-lp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* Section accordéon */
.qs-lp-section {
  --sec-color: #a78bfa;
  margin: 3px 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.3s ease;
}
.qs-lp-section[data-color="revision"]  { --sec-color: var(--lp-revision); }
.qs-lp-section[data-color="mandatory"] { --sec-color: var(--lp-mandatory); }
.qs-lp-section[data-color="vitality"]  { --sec-color: var(--lp-vitality); }
.qs-lp-section[data-color="catchup"]   { --sec-color: var(--lp-catchup); }
.qs-lp-section[data-color="prep"]      { --sec-color: var(--lp-prep); }

.qs-lp-section.open {
  border-color: color-mix(in srgb, var(--sec-color) 45%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--sec-color) 12%, transparent);
}

/* Header de section */
.qs-lp-sec-header {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: none; cursor: pointer;
  color: rgba(200,195,230,0.7);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em;
  text-align: left;
  transition: background 0.2s, color 0.3s;
}
.qs-lp-sec-header svg:first-child { flex-shrink: 0; color: var(--sec-color); opacity: 0.7; transition: opacity 0.3s; }
.qs-lp-sec-header span { flex: 1; }
.qs-lp-section.open .qs-lp-sec-header {
  background: color-mix(in srgb, var(--sec-color) 8%, rgba(5,6,20,0.9));
  color: var(--sec-color);
}
.qs-lp-section.open .qs-lp-sec-header svg:first-child { opacity: 1; }
.qs-lp-sec-header:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Chevron animé */
.qs-lp-chevron {
  flex-shrink: 0; opacity: 0.45;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}
.qs-lp-section.open .qs-lp-chevron { transform: rotate(180deg); opacity: 0.8; }

/* Corps de section — contenu rendu par JS */
.qs-lp-sec-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
  background: rgba(3,4,14,0.6);
}
.qs-lp-section.open .qs-lp-sec-body {
  max-height: 600px;
}

/* Réduction des marges des éléments rendus par JS à l'intérieur du panneau */
.qs-lp-sec-body .rev-container { gap: 5px !important; padding: 6px 8px 10px !important; }
.qs-lp-sec-body .rev-subject {
  width: 100% !important; max-width: none !important;
  margin: 0 !important;
  border-radius: 6px !important;
  clip-path: none !important;
}
.qs-lp-sec-body .rev-add-subj-wrap { padding: 4px 8px 8px !important; }
.qs-lp-sec-body .rev-forge-btn { width: 100% !important; max-width: none !important; font-size: 0.6rem !important; }
.qs-lp-sec-body .qswipe-wrap { width: 100% !important; max-width: none !important; margin: 2px 8px !important; }
.qs-lp-sec-body .agenda-list { padding: 4px 8px !important; }
.qs-lp-sec-body .agenda-block { margin-bottom: 4px !important; }
.qs-lp-sec-body .rev-sep-ornament { display: none !important; }

/* Footer avec bouton lancer */
.qs-lp-footer {
  padding: 10px 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.qs-lp-launch-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px;
  border: none; border-radius: 8px; cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--lp-active) 70%, #1a1a3e) 0%,
    color-mix(in srgb, var(--lp-active) 40%, #080820) 100%);
  box-shadow: 0 0 20px color-mix(in srgb, var(--lp-active) 35%, transparent);
  transition: all 0.3s ease;
}
.qs-lp-launch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 32px color-mix(in srgb, var(--lp-active) 55%, transparent);
}

/* ════════════════════════════════════════════════════════════
   TICKET DE QUÊTE — style reçu d'aventurier, flottant dans l'espace
════════════════════════════════════════════════════════════ */
.qs-ticket {
  position: absolute;
  left: calc(270px + (100% - 270px) / 2);
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc((100% - 270px) * 0.82);
  max-width: 780px;
  height: 88vh;
  z-index: 10;
  display: flex; flex-direction: column;
  background: rgba(4,5,18,0.82);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(100,120,220,0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 12px 50px rgba(0,0,0,0.60),
    0 0 80px rgba(80,80,255,0.08);
  animation: qs-ticket-in 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes qs-ticket-in {
  from { opacity:0; transform: translate(-50%,-46%) scale(0.94); }
  to   { opacity:1; transform: translate(-50%,-50%) scale(1); }
}
/* Ligne lumineuse en haut */
.qs-ticket::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(120,100,255,0.5) 15%,
    rgba(180,120,255,0.9) 50%,
    rgba(100,180,255,0.5) 85%, transparent 100%);
  z-index: 2;
}

/* ── Zone haute : badge + titres ── */
.qs-ticket-top {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 20px 12px; gap: 10px;
  text-align: center;
}
.qs-ticket-badge {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(120,100,255,0.12);
  border: 1px solid rgba(160,130,255,0.35);
  box-shadow: 0 0 16px rgba(120,100,255,0.25);
  color: rgba(180,160,255,0.85);
}
.qs-ticket-main-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(220,215,255,0.95);
}
.qs-ticket-sub-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 400; letter-spacing: 0.14em;
  color: rgba(160,155,210,0.60);
}

/* ── Date ── */
.qs-ticket-date-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 4px 16px 2px;
  color: rgba(180,175,220,0.75);
  font-size: 0.72rem; letter-spacing: 0.06em;
}
.qs-ticket-date-row svg { opacity: 0.55; }
.qs-ticket-date { font-weight: 600; }
.qs-ticket-receipt-label {
  text-align: center;
  font-size: 0.52rem; letter-spacing: 0.12em;
  color: rgba(140,135,185,0.40);
  padding: 2px 0 10px;
}

/* ── Séparateur perforé ── */
.qs-ticket-perf {
  margin: 0 12px;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 4px,
    rgba(150,140,220,0.25) 4px, rgba(150,140,220,0.25) 8px
  );
  position: relative;
}
/* Petits cercles aux extrémités */
.qs-ticket-perf::before,
.qs-ticket-perf::after {
  content: '';
  position: absolute; top: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(4,5,18,0.95);
  border: 1px solid rgba(100,120,220,0.18);
}
.qs-ticket-perf::before { left: -16px; }
.qs-ticket-perf::after  { right: -16px; }

/* ── Zone chemin de quêtes ── */
.qs-ticket-path-wrap {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 4px 0 4px;
  position: relative;
}
.qs-ticket-path-wrap::-webkit-scrollbar { width: 3px; }
.qs-ticket-path-wrap::-webkit-scrollbar-thumb { background: rgba(100,120,255,0.2); border-radius: 2px; }

/* Ligne verticale centrale du parcours */
.qs-ticket-path-wrap::before {
  content: '';
  position: absolute;
  left: 50%; top: 20px; bottom: 20px;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(120,140,255,0.5) 8%,
    rgba(100,120,220,0.3) 50%,
    rgba(120,140,255,0.5) 92%,
    transparent 100%);
  transform: translateX(-50%);
  z-index: 0;
}

/* ARRIVÉE / DÉPART */
.qs-path-terminus {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative; z-index: 2;
  padding: 6px 0;
}
.qs-path-terminus span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(160,155,210,0.45);
}
.qs-path-terminus-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(120,140,255,0.25);
  border: 2px solid rgba(140,160,255,0.55);
  box-shadow: 0 0 10px rgba(120,140,255,0.3);
}
.qs-path-arrivee .qs-path-terminus-dot { background: rgba(100,200,255,0.25); border-color: rgba(100,200,255,0.6); box-shadow: 0 0 12px rgba(100,200,255,0.35); }
.qs-path-depart  .qs-path-terminus-dot { background: rgba(180,140,255,0.25); border-color: rgba(180,140,255,0.6); box-shadow: 0 0 12px rgba(180,140,255,0.35); }

/* État vide */
.qs-ticket-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 28px 20px;
  color: rgba(140,135,185,0.35);
  font-size: 0.63rem; line-height: 1.55; text-align: center;
  position: relative; z-index: 2;
}
.qs-ticket-empty svg { opacity: 0.22; }

/* ── Items .qs-mitem rendus par JS — nœuds du parcours ── */
#qs-mission-items {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  gap: 0; padding: 0;
}

/* Nœud : carte alternée gauche/droite */
#qs-mission-items .qs-mitem {
  position: relative;
  width: 42%;
  margin-bottom: 10px;
  padding: 13px 16px 13px 38px;
  border-radius: 14px;
  background: rgba(8,10,30,0.78);
  border: 1px solid rgba(100,120,220,0.25);
  font-size: 0.78rem;
  color: rgba(200,198,235,0.90);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(12px);
}
/* Impairs → gauche */
#qs-mission-items .qs-mitem:nth-child(odd)  { align-self: flex-start; margin-left: 12px; }
/* Pairs → droite */
#qs-mission-items .qs-mitem:nth-child(even) { align-self: flex-end;   margin-right: 12px; padding-left: 16px; padding-right: 38px; }

#qs-mission-items .qs-mitem:hover {
  background: rgba(14,16,45,0.90);
  border-color: rgba(140,160,255,0.45);
  box-shadow: 0 0 16px rgba(100,120,255,0.18);
}

/* Point de connexion sur la ligne centrale */
#qs-mission-items .qs-mitem::before {
  content: '';
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(140,160,255,0.6);
  box-shadow: 0 0 8px rgba(140,160,255,0.4);
  z-index: 3;
}
#qs-mission-items .qs-mitem:nth-child(odd)::before  { right: -22px; }
#qs-mission-items .qs-mitem:nth-child(even)::before { left:  -22px; }

/* Couleur du nœud selon catégorie */
#qs-mission-items .qs-mitem-revision::before  { background: var(--lp-revision);  box-shadow: 0 0 8px var(--lp-revision); }
#qs-mission-items .qs-mitem-mandatory::before { background: var(--lp-mandatory); box-shadow: 0 0 8px var(--lp-mandatory); }
#qs-mission-items .qs-mitem-vitality::before  { background: var(--lp-vitality);  box-shadow: 0 0 8px var(--lp-vitality); }
#qs-mission-items .qs-mitem-catchup::before   { background: var(--lp-catchup);   box-shadow: 0 0 8px var(--lp-catchup); }
#qs-mission-items .qs-mitem-prep::before      { background: var(--lp-prep);      box-shadow: 0 0 8px var(--lp-prep); }

/* Texte dans les cartes */
.qs-mitem-name { font-size: 0.78rem; font-weight: 600; color: rgba(210,208,240,0.92); line-height: 1.3; }
.qs-mitem-sub  { font-size: 0.68rem; color: rgba(150,145,200,0.60); margin-top: 3px; }
.qs-mitem-icon { display: none; }
.qs-mitem-remove {
  position: absolute; top: 6px; right: 6px;
  background: none; border: none; cursor: pointer;
  color: rgba(150,145,200,0.35); padding: 2px;
  transition: color 0.2s;
}
#qs-mission-items .qs-mitem:nth-child(even) .qs-mitem-remove { right: auto; left: 6px; }
.qs-mitem-remove:hover { color: rgba(248,113,113,0.7); }

/* ── Totaux ── */
.qs-ticket-totals {
  padding: 8px 16px;
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 0.62rem;
  color: rgba(170,165,215,0.70);
}
.qs-ticket-totals:empty { display: none; }

/* ── Footer "FIN DU REÇU" ── */
.qs-ticket-footer-label {
  text-align: center;
  font-size: 0.52rem; letter-spacing: 0.14em;
  color: rgba(130,125,180,0.35);
  padding: 6px 0 4px;
}

/* ── Bouton ON DÉCOLLE ── */
.qs-ticket-cta {
  padding: 10px 14px 16px;
}
.qs-ticket-launch {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 16px;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 50%, #2563eb 100%);
  box-shadow: 0 0 28px rgba(99,102,241,0.50), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative; overflow: hidden;
}
.qs-ticket-launch::before {
  content: '';
  position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: qs-ticket-shimmer 2.8s ease-in-out infinite;
}
@keyframes qs-ticket-shimmer {
  0%   { left: -80%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}
.qs-ticket-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(99,102,241,0.65), inset 0 1px 0 rgba(255,255,255,0.2);
}
.qs-ticket-launch:active { transform: scale(0.97); }

/* ════════════════════════════════════════════════════════════
   QUEST SHOP — LAYOUT 3 COLONNES
════════════════════════════════════════════════════════════ */

.qs-3col-layout {
  position: absolute; inset: 0;
  display: flex; flex-direction: row;
  z-index: 5;
  overflow: hidden;
}

/* ── Colonne gauche 25% — Révision ── */
.qs-col3 { display: flex; flex-direction: column; overflow: hidden; }

.qs-col3-left {
  width: 25%; flex-shrink: 0;
  position: relative !important;
  top: auto !important; left: auto !important; bottom: auto !important;
  background: rgba(14,18,50,0.68);
  border-right: 1px solid rgba(167,139,250,0.32);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}

.qs-col3-right {
  width: 25%; flex-shrink: 0;
  background: rgba(14,18,50,0.68);
  border-left: 1px solid rgba(100,120,220,0.28);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}

/* ── Colonne centrale 50% — grille 2×2 ── */
.qs-col3-center {
  flex: 1;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  padding: 12px 10px;
  overflow: hidden;
  align-items: stretch;
}

/* ── Bloc unifié Calendrier + Détail du jour (top row, pleine largeur) ── */
.qs-cal-day-block {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; flex-direction: row;
  background: rgba(20,24,65,0.55);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  min-height: 0;
}

/* Calendrier — côté gauche du bloc unifié */
.qs-cal-day-block .qs-embedded-cal {
  flex: 0 0 42%;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(139,92,246,0.18);
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  backdrop-filter: none;
}

/* Panneau détail du jour — côté droit du bloc unifié */
.qs-day-detail-panel {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
}

.qs-center-top-right-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; letter-spacing: 0.14em;
  color: rgba(180,175,240,0.18);
  text-transform: uppercase;
  text-align: center; padding: 12px;
  margin: auto;
}

.qs-embedded-cal-panel {
  flex: 1; overflow-y: auto;
}
.qs-embedded-cal-panel::-webkit-scrollbar { width: 3px; }
.qs-embedded-cal-panel::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.22); border-radius: 2px; }

/* Agenda embarqué — s'adapte au quadrant haut-gauche */
.qs-agenda-embedded {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
/* Masque le header "PLANIFICATION" (titre redondant dans le quadrant) */
.qs-agenda-embedded .rayon-header { display: none !important; }

/* Boutons + Ajouter / Importer */
.qs-agenda-embedded .agenda-top-actions {
  padding: 3px 6px 2px !important;
  gap: 4px !important;
  flex-shrink: 0;
}
.qs-agenda-embedded .btn-add-agenda,
.qs-agenda-embedded .btn-import-ics {
  font-size: 0.52rem !important;
  padding: 3px 7px !important;
}

/* Calendrier mensuel compact */
.qs-agenda-embedded .agenda-cal-wrap {
  flex-shrink: 0;
  padding: 0 4px 2px !important;
}
.qs-agenda-embedded .agenda-cal-grid { gap: 0px !important; }
.qs-agenda-embedded .cal-cell {
  font-size: 0.60rem !important;
  min-height: 26px !important;
  padding: 3px 2px !important;
}
.qs-agenda-embedded .cal-day-hdr { font-size: 0.48rem !important; padding-bottom: 2px !important; }
.qs-agenda-embedded .cal-month-label { font-size: 0.60rem !important; }
.qs-agenda-embedded .cal-nav-btn { width: 16px !important; height: 16px !important; font-size: 0.65rem !important; }
.qs-agenda-embedded .cal-month-nav { padding: 3px 4px !important; }

/* Vue vue-toggle (Mois / Semaine / Jour) */
.qs-agenda-embedded .cal-view-toggle { padding: 2px 4px 3px !important; gap: 2px !important; }
.qs-agenda-embedded .cvt-btn { font-size: 0.46rem !important; padding: 2px 5px !important; }

/* Liste des événements du jour */
.qs-agenda-embedded .agenda-list {
  flex: 1; overflow-y: auto; min-height: 0;
  padding: 0 4px !important;
}
.qs-agenda-embedded .agenda-list::-webkit-scrollbar { width: 3px; }
.qs-agenda-embedded .agenda-list::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.2); border-radius: 2px; }
.qs-agenda-embedded .agenda-editable-item { margin: 2px 4px !important; }
.qs-agenda-embedded .aei-subject-text { font-size: 0.72rem !important; }
.qs-agenda-embedded .aei-compact-time { font-size: 0.6rem !important; }

/* Formulaire d'ajout compact */
.qs-agenda-embedded .agenda-add-form { padding: 6px 8px !important; }
.qs-agenda-embedded .aaf-subject { font-size: 0.7rem !important; padding: 5px 8px !important; }

/* Révisions Galaxie */
.qs-agenda-embedded .agenda-galaxy-reviews { padding: 4px 8px !important; }
.qs-agenda-embedded .agr-item { padding: 4px 6px !important; }
.qs-agenda-embedded .agenda-empty-hint { font-size: 0.62rem !important; padding: 8px 10px !important; }

/* Bannière passé */
.qs-agenda-embedded .agenda-past-banner { padding: 5px 8px !important; font-size: 0.62rem !important; }

/* ── Calendrier embarqué : mêmes états, légèrement plus discrets ── */
.qs-agenda-embedded .cal-cell.cal-day-past,
.qs-agenda-embedded .cal-cell.cal-day-missed {
  color: rgba(255,255,255,0.15) !important;
  font-weight: 400 !important;
}
.qs-agenda-embedded .cal-cell:not(.cal-has-items):not(.cal-today):not(.cal-selected) {
  color: rgba(255,255,255,0.20);
}
/* Appliquer aussi dans vue semaine */
.qs-agenda-embedded .cwh-day.cal-day-past .cwh-dnum {
  color: rgba(255,255,255,0.20) !important;
}
.qs-agenda-embedded .cwh-day.cal-day-missed .cwh-dnum {
  color: rgba(255,255,255,0.20) !important;
}

/* ── Tous les points → vert ── */
.qs-agenda-embedded .cal-dot,
.qs-agenda-embedded .cal-dot.cal-dot-past,
.qs-agenda-embedded .cal-dot.cal-dot-missed,
.qs-agenda-embedded .cal-dot.cal-dot-done,
.qs-agenda-embedded .cal-dot.cal-dot-future {
  background: #4ade80 !important;
  box-shadow: 0 0 4px rgba(74,222,128,0.6) !important;
}
.qs-agenda-embedded .cal-galaxy-dot {
  background: #4ade80 !important;
  box-shadow: 0 0 3px rgba(74,222,128,0.5) !important;
}
/* Maintien de la visibilité sur jour sélectionné */
.qs-agenda-embedded .cal-cell.cal-selected .cal-dot { background: #fff !important; box-shadow: none !important; }

/* ── Masquer la liste événements depuis le panel calendrier (elle s'affiche dans qs-day-detail) ── */
.qs-agenda-embedded .agenda-list,
.qs-agenda-embedded .agenda-galaxy-reviews,
.qs-agenda-embedded .agenda-past-banner,
.qs-agenda-embedded .agenda-hint-footer {
  display: none !important;
}

/* ── Panneau détail du jour (côté droit du bloc unifié) ── */
.qs-day-detail-panel {
  background: transparent;
}
#qs-day-detail {
  display: flex; flex-direction: column;
  overflow: hidden;
  height: 100%;
}
#qs-day-detail::-webkit-scrollbar { width: 3px; }
#qs-day-detail::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.22); border-radius: 2px; }

.qs-day-detail-header {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px 7px;
  border-bottom: 1px solid rgba(139,92,246,0.14);
  flex-shrink: 0;
}
.qs-day-detail-date {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
  flex: 1;
}
.qs-day-detail-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 600; letter-spacing: 0.08em;
  color: #ffffff;
  opacity: 0.75;
  flex-shrink: 0;
}
.qs-day-detail-body {
  flex: 1; overflow-y: auto; padding: 6px 8px 10px;
  display: flex; flex-direction: column; gap: 5px;
}
.qs-day-detail-body::-webkit-scrollbar { width: 3px; }
.qs-day-detail-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.18); border-radius: 2px; }

.qs-day-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(10,8,30,0.55);
  border: 1px solid rgba(139,92,246,0.12);
}
.qs-day-item-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,0.45);
}
.qs-day-item-dot.past    { background: rgba(255,255,255,0.25); box-shadow: none; }
.qs-day-item-dot.missed  { background: #f87171; box-shadow: 0 0 5px rgba(248,113,113,0.5); }
.qs-day-item-dot.done    { background: #60a5fa; box-shadow: 0 0 5px rgba(96,165,250,0.5); }
.qs-day-item-dot.galaxy  { background: var(--dot-color, #a78bfa); box-shadow: 0 0 5px var(--dot-color, rgba(167,139,250,0.5)); }

.qs-day-item-info { flex: 1; min-width: 0; }
.qs-day-item-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  color: rgba(220,215,255,0.90);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs-day-item-meta {
  font-size: 0.62rem; color: rgba(160,155,210,0.55);
  margin-top: 2px;
}
.qs-day-item-check {
  flex-shrink: 0; margin-top: 2px;
  width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid rgba(74,222,128,0.5);
  background: rgba(74,222,128,0.12);
  display: flex; align-items: center; justify-content: center;
  color: #4ade80; font-size: 0.6rem;
}
.qs-day-item-check.unchecked {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: transparent;
}

.qs-day-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; gap: 8px;
  color: rgba(160,155,210,0.30);
  font-size: 0.65rem; text-align: center;
  padding: 20px;
}
.qs-day-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 700; letter-spacing: 0.14em;
  color: rgba(160,155,210,0.35);
  text-transform: uppercase;
  padding: 4px 2px 2px;
}

/* ── Bloc bas unifié RATTRAPAGE + PRÉPARATION ── */
.qs-bottom-block {
  grid-column: 1 / -1; grid-row: 2;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 13px;
  background: rgba(20,24,65,0.55);
  border: 1px solid rgba(139,92,246,0.25);
  backdrop-filter: blur(14px);
}

/* Les deux corps côte à côte */
.qs-bottom-block {
  flex-direction: row !important;
}
.qs-mini-win-body {
  flex: 1; overflow-y: auto;
  padding: 6px 8px;
  display: flex; flex-direction: column; gap: 5px;
  min-width: 0;
}
.qs-mini-win-body::-webkit-scrollbar { width: 3px; }
.qs-mini-win-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.20); border-radius: 2px; }
.qs-bottom-divider {
  width: 1px; flex-shrink: 0;
  background: rgba(139,92,246,0.18);
  margin: 8px 0;
}

/* Items generiques dans le corps */
.qs-mini-win-body .rayon-header { display: none !important; }
.qs-mini-win-body .rev-sep-ornament { display: none !important; }
.qs-mini-win-body .shelf-add-custom-card { display: none !important; }

/* ── Quest-card redesigné — compact, arrondi, sans décoration lourde ── */
.qs-mini-win-body .quest-card {
  background: rgba(139,92,246,0.07) !important;
  background-image: none !important;
  border: 1px solid rgba(139,92,246,0.22) !important;
  border-radius: 9px !important;
  padding: 7px 10px !important;
  gap: 8px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  transition: background 0.15s, border-color 0.15s !important;
  clip-path: none !important;
}
.qs-mini-win-body .quest-card::before { display: none !important; }
.qs-mini-win-body .quest-card:hover {
  background: rgba(139,92,246,0.13) !important;
  border-color: rgba(139,92,246,0.40) !important;
  transform: none !important;
  box-shadow: none !important;
}
.qs-mini-win-body .quest-card.in-basket {
  background: rgba(74,222,128,0.08) !important;
  border-color: rgba(74,222,128,0.35) !important;
}

/* Checkbox compact */
.qs-mini-win-body .qcard-checkbox {
  width: 20px !important; height: 20px !important;
  border-radius: 6px !important;
  flex-shrink: 0;
}
.qs-mini-win-body .qcard-checkbox svg { width: 12px !important; height: 12px !important; }

/* Texte compact */
.qs-mini-win-body .qcard-name {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  margin-bottom: 2px !important;
}
.qs-mini-win-body .qcard-edit-hint { display: none !important; }
.qs-mini-win-body .qcard-meta {
  gap: 6px !important;
}
.qs-mini-win-body .qcard-time,
.qs-mini-win-body .qcard-coins,
.qs-mini-win-body .qcard-date-chip {
  font-size: 0.58rem !important;
}
.qs-mini-win-body .qcard-time-edit { display: none !important; }

/* Wrapper swipe sans marge */
.qs-mini-win-body .qswipe-wrap { margin: 0 !important; }

/* Sections catchup → blocs arrondis */
.qs-mini-win-body .catchup-section {
  background: rgba(30,26,70,0.55);
  border: 1px solid rgba(139,92,246,0.20);
  border-radius: 10px;
  overflow: hidden;
  gap: 0;
  flex-shrink: 0;
}
.qs-mini-win-body .catchup-section-label {
  background: rgba(139,92,246,0.09);
  border-bottom: 1px solid rgba(139,92,246,0.14);
  border-left: none !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  color: rgba(200,195,255,0.75) !important;
  font-size: 0.56rem !important;
}
.qs-mini-win-body .cs-body {
  padding: 5px 7px !important;
  display: flex; flex-direction: column; gap: 4px;
}
.qs-mini-win-body .catchup-empty {
  font-size: 0.65rem; color: rgba(180,175,240,0.28);
  text-align: center; padding: 14px 8px;
}

/* Items prep */
.qs-mini-win-body .prep-drag-item {
  background: transparent;
  border: none;
  padding: 0;
}
.qs-mini-win-body .prep-drag-item > .rev-drag-handle { display: none !important; }
.qs-mini-win-body .prep-list { gap: 4px !important; }

/* ════ Révision — colonne gauche : cartes pleines largeur et arrondies ════ */
.qs-col3-left #shop-body-revision .rev-container {
  gap: 6px !important;
  padding: 6px 8px 12px !important;
  align-items: stretch !important;   /* pleine largeur */
}
.qs-col3-left #shop-body-revision .rev-subject {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  align-self: stretch !important;
  clip-path: none !important;        /* supprime les coins coupés */
  border-radius: 10px !important;    /* coins arrondis */
  /* Conserve le background/border issu de la couleur du thème */
}
.qs-col3-left #shop-body-revision .rev-subject-header {
  padding: 9px 10px !important;
}
.qs-col3-left #shop-body-revision .rev-subj-name {
  text-align: left !important;
  font-size: 0.7rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qs-col3-left #shop-body-revision .rev-sep-ornament { display: none !important; }
.qs-col3-left #shop-body-revision .rev-progress-wrap { margin: 2px 8px 4px !important; font-size: 0.6rem !important; }

/* Bouton + Ajouter une matière — pleine largeur */
.qs-col3-left #shop-body-revision .rev-add-subj-wrap {
  padding: 4px 8px 8px !important;
  align-items: stretch !important;
}
.qs-col3-left #shop-body-revision .rev-forge-btn {
  width: 100% !important;
  max-width: none !important;
  clip-path: none !important;
  border-radius: 8px !important;
  font-size: 0.62rem !important;
  padding: 10px !important;
}

/* Chapitres dans les cartes */
.qs-col3-left #shop-body-revision .rev-chap-row { font-size: 0.68rem !important; }
.qs-col3-left #shop-body-revision .rev-chap-name { font-size: 0.68rem !important; }

/* ── Colonne droite — blocs de parcours lisibles (plus de zigzag dans 25%) ── */
.qs-col3-right #qs-mission-items .qs-mitem {
  width: calc(100% - 24px) !important;
  align-self: stretch !important;
  margin-left: 12px !important;
  margin-right: 12px !important;
  padding: 10px 14px !important;
}
.qs-col3-right #qs-mission-items .qs-mitem:nth-child(even) {
  align-self: stretch !important;
  margin-right: 12px !important;
  padding-left: 14px !important; padding-right: 14px !important;
}
.qs-col3-right #qs-mission-items .qs-mitem::before {
  display: none !important;
}
.qs-col3-right .qs-mitem-name {
  white-space: normal !important;
  word-break: break-word;
  font-size: 0.72rem !important;
}
/* Ligne centrale du parcours — masquée dans la col droite (trop étroit pour le zigzag) */
.qs-col3-right .qs-ticket-path-wrap::before {
  display: none !important;
}

/* Colonne droite fond plus clair */
.qs-col3-right .qs-ticket-date-row { color: rgba(200,195,240,0.80); }
.qs-col3-right .qs-ticket-receipt-label { color: rgba(160,155,210,0.50); }
.qs-col3-right .qs-ticket-footer-label { color: rgba(160,155,210,0.45); }

/* ── COCKPIT HEADER ── */
.qs-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 8px;
  background: rgba(2,4,16,0.92);
  border-bottom: 1px solid rgba(99,102,241,0.4);
  box-shadow: 0 0 30px rgba(99,102,241,0.12), inset 0 -1px 0 rgba(99,102,241,0.15);
  flex-shrink: 0;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  /* Simple fade-in on screen activation */
  animation: qs-fadein 0.5s ease both;
}
@keyframes qs-fadein { from { opacity: 0; } to { opacity: 1; } }

.qs-back-btn {
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.35);
  border-radius: 8px; color: var(--qs-indigo); padding: 7px 10px; cursor: pointer;
  flex-shrink: 0; transition: background 0.2s, box-shadow 0.2s;
}
.qs-back-btn:hover { background: rgba(99,102,241,0.2); box-shadow: 0 0 12px rgba(99,102,241,0.3); }

.qs-header-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qs-hud-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--qs-indigo);
  text-shadow: 0 0 12px rgba(99,102,241,0.7);
}
.qs-hud-pulse-row { display: flex; align-items: center; gap: 6px; }
.qs-pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--qs-green);
  box-shadow: 0 0 6px var(--qs-green);
  animation: qs-dot-blink 1.8s ease-in-out infinite;
}
@keyframes qs-dot-blink {
  0%,100% { opacity: 1; box-shadow: 0 0 6px var(--qs-green); }
  50%     { opacity: 0.35; box-shadow: none; }
}
.qs-hud-status { font-size: 0.58rem; color: rgba(74,222,128,0.65); letter-spacing: 0.12em; text-transform: uppercase; }

.qs-header-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.qs-energy-hud {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(74,222,128,0.28);
  border-radius: 6px; padding: 4px 8px;
}
.qs-energy-lbl { font-size: 0.58rem; color: rgba(74,222,128,0.6); letter-spacing: 0.1em; font-weight: 700; }
.qs-ebar-track { width: 48px; height: 4px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
.qs-ebar-fill { height: 100%; background: var(--qs-green); border-radius: 2px; transition: width 0.5s ease, background 0.3s; box-shadow: 0 0 6px var(--qs-green); }
.qs-ebar-val { font-size: 0.65rem; color: var(--qs-green); font-weight: 700; min-width: 20px; }
.qs-hist-btn {
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.25);
  color: rgba(99,102,241,0.7); border-radius: 6px; padding: 5px 7px; cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.qs-hist-btn:not(:disabled):hover { background: rgba(99,102,241,0.18); color: var(--qs-indigo); box-shadow: 0 0 10px rgba(99,102,241,0.25); }
.qs-hist-btn:disabled { opacity: 0.2; cursor: default; }

/* ── SPLIT ── */
.qs-split {
  flex: 1 1 0;
  display: flex; overflow: hidden;
  position: relative; z-index: 2;
  min-height: 0;
  /* Force children to fill the full height */
  align-items: stretch;
}

/* ── PANEL LABEL (section headers) ── */
.qs-panel-label {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px 5px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(99,102,241,0.7);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(99,102,241,0.15);
}
.qs-panel-label svg { opacity: 0.6; }

/* ── LEFT — Browser (path + all cats) ── */
.qs-browser {
  flex: 0 0 60%; display: flex; flex-direction: row; min-width: 0;
  height: 100%; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(99,102,241,0.06) 0%, transparent 40%),
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(99,102,241,0.05) 28px, rgba(99,102,241,0.05) 29px),
    rgba(3,4,18,0.97);
}

/* ── Quest Path column ── */
.qs-path-col {
  flex: 0 0 64px; width: 64px;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 12px;
  border-right: 1px solid rgba(99,102,241,0.18);
  background: rgba(2,3,14,0.7);
  overflow: hidden;
  position: relative;
}
.qs-path-label {
  font-size: 0.42rem; font-weight: 800; letter-spacing: 0.18em;
  color: rgba(99,102,241,0.5); text-transform: uppercase;
  margin-bottom: 10px; flex-shrink: 0;
}
.qs-path-nodes {
  flex: 1; width: 100%; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center;
  gap: 0; padding: 0 6px;
}
.qs-path-nodes::-webkit-scrollbar { display: none; }

/* Empty state */
.qs-path-empty-node {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding-top: 12px;
}
.qs-path-dot-empty {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px dashed rgba(99,102,241,0.35);
  animation: qs-dot-blink 2s ease-in-out infinite;
}
.qs-path-empty-txt {
  font-size: 0.38rem; color: rgba(99,102,241,0.3);
  text-align: center; line-height: 1.4;
  writing-mode: vertical-lr; transform: rotate(180deg);
  letter-spacing: 0.1em;
}

/* Quest path nodes */
.qs-path-node {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; position: relative; padding: 4px 0;
}
.qs-path-node-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem; font-weight: 800;
  border: 2px solid;
  position: relative; z-index: 1;
  flex-shrink: 0;
  transition: box-shadow 0.2s;
}
.qs-path-node-name {
  font-size: 0.38rem; color: rgba(200,210,240,0.7);
  text-align: center; margin-top: 3px;
  max-width: 52px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; line-height: 1.2;
}
.qs-path-connector {
  width: 2px; height: 14px;
  background: linear-gradient(to bottom, var(--c, #6366f1), transparent);
  margin: 0 auto;
  opacity: 0.6;
}

/* Node colors per category */
.qs-path-node.cat-revision .qs-path-node-dot   { border-color: #8B5CF6; background: rgba(139,92,246,0.15); color: #c4b5fd; box-shadow: 0 0 10px rgba(139,92,246,0.4); }
.qs-path-node.cat-mandatory .qs-path-node-dot  { border-color: #22D3EE; background: rgba(34,211,238,0.15); color: #67e8f9; box-shadow: 0 0 10px rgba(34,211,238,0.4); }
.qs-path-node.cat-vitality .qs-path-node-dot   { border-color: #4ade80; background: rgba(74,222,128,0.15); color: #86efac; box-shadow: 0 0 10px rgba(74,222,128,0.4); }
.qs-path-node.cat-catchup .qs-path-node-dot    { border-color: #34D399; background: rgba(52,211,153,0.15); color: #6ee7b7; box-shadow: 0 0 10px rgba(52,211,153,0.4); }
.qs-path-node.cat-prep .qs-path-node-dot       { border-color: #F59E0B; background: rgba(245,158,11,0.15); color: #fde68a; box-shadow: 0 0 10px rgba(245,158,11,0.4); }

@keyframes qs-node-in {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);    opacity: 1; }
}
.qs-path-node-dot { animation: qs-node-in 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }

/* ── All categories scrollable column ── */
.qs-all-cats {
  flex: 1; min-width: 0;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  gap: 0; padding: 8px 0 20px;
}
.qs-all-cats::-webkit-scrollbar { width: 3px; }
.qs-all-cats::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 2px; }

/* Category blocks — Twitch panel style */
.qs-cat-block {
  flex-shrink: 0;
  margin: 0 12px 10px;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  overflow: hidden;
  border: 1.5px solid rgba(99,102,241,0.4);
  background: rgba(8,6,26,0.92);
}
.qs-cat-header {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px 6px;
  font-size: 0.55rem; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(99,102,241,0.85);
  border-bottom: 1px solid rgba(99,102,241,0.15);
  background: rgba(6,4,20,0.8);
  font-family: 'Orbitron', sans-serif;
}
.qs-cat-icon { width: 10px; height: 10px; flex-shrink: 0; }

/* Per-category accent colors */
.qs-cat-revision  { border-color: rgba(139,92,246,0.5); }
.qs-cat-revision .qs-cat-header  { color: #c4b5fd; border-bottom-color: rgba(139,92,246,0.2); }
.qs-cat-revision  { filter: drop-shadow(0 0 6px rgba(139,92,246,0.2)); }

.qs-cat-mandatory { border-color: rgba(34,211,238,0.5); }
.qs-cat-mandatory .qs-cat-header { color: #67e8f9; border-bottom-color: rgba(34,211,238,0.2); }
.qs-cat-mandatory { filter: drop-shadow(0 0 6px rgba(34,211,238,0.2)); }

.qs-cat-vitality  { border-color: rgba(74,222,128,0.5); }
.qs-cat-vitality .qs-cat-header  { color: #86efac; border-bottom-color: rgba(74,222,128,0.2); }
.qs-cat-vitality  { filter: drop-shadow(0 0 6px rgba(74,222,128,0.2)); }

.qs-cat-catchup   { border-color: rgba(52,211,153,0.5); }
.qs-cat-catchup .qs-cat-header   { color: #6ee7b7; border-bottom-color: rgba(52,211,153,0.2); }
.qs-cat-catchup   { filter: drop-shadow(0 0 6px rgba(52,211,153,0.2)); }

.qs-cat-prep      { border-color: rgba(245,158,11,0.5); }
.qs-cat-prep .qs-cat-header      { color: #fde68a; border-bottom-color: rgba(245,158,11,0.2); }
.qs-cat-prep      { filter: drop-shadow(0 0 6px rgba(245,158,11,0.2)); }

/* Override quest card margins inside cat blocks */
.qs-cat-block .qswipe-wrap,
.qs-cat-block .rev-subject {
  width: auto !important; max-width: none !important;
  margin: 4px 8px !important; align-self: auto !important;
}
.qs-cat-block .rev-container { padding: 4px 0 8px !important; gap: 4px !important; }
.qs-cat-block .rev-add-subj-wrap { padding: 4px 8px !important; }
.qs-cat-block .rev-forge-btn { width: 100% !important; max-width: none !important; padding: 9px !important; font-size: 0.65rem !important; }
.qs-cat-block .qs-panel-inner { padding: 4px 0 8px !important; }
.qs-root.qs-entering .qs-browser {
  animation: qs-browser-in 0.7s cubic-bezier(0.22,1,0.36,1);
}
@keyframes qs-browser-in {
  from { transform: translateX(-28px); }
  to   { transform: translateX(0); }
}

/* Tabs (navigation buttons) */
.qs-tabs {
  position: relative;
  display: flex; gap: 0; flex-shrink: 0;
  background: rgba(2,4,16,0.7);
  border-bottom: 1px solid rgba(99,102,241,0.2);
  padding: 0 8px;
}
.qs-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 11px;
  background: transparent; border: none;
  color: rgba(148,163,184,0.35); cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  font-size: 0;
  position: relative; z-index: 1;
}
.qs-tab-icon { width: 17px; height: 17px; flex-shrink: 0; transition: filter 0.25s, transform 0.25s; }
.qs-tab-label {
  font-size: 0.5rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800;
  display: none; font-family: 'Orbitron', sans-serif;
}
.qs-tab-active .qs-tab-label { display: block; }
.qs-tab-active {
  font-size: inherit; color: #fff;
  background: rgba(99,102,241,0.1);
  box-shadow: inset 0 -2px 0 rgba(99,102,241,0.6);
}
.qs-tab:hover:not(.qs-tab-active) { color: rgba(148,163,184,0.7); background: rgba(99,102,241,0.05); }
.qs-tab:hover .qs-tab-icon { transform: scale(1.15); }

/* Colored accent per tab — stronger glow */
.qs-tab-revision.qs-tab-active  { color: #c4b5fd; background: rgba(139,92,246,0.12); box-shadow: inset 0 -2px 0 #8B5CF6; }
.qs-tab-revision.qs-tab-active .qs-tab-icon { filter: drop-shadow(0 0 6px #8B5CF6) brightness(1.3); }
.qs-tab-mandatory.qs-tab-active  { color: #67e8f9; background: rgba(34,211,238,0.1); box-shadow: inset 0 -2px 0 #22D3EE; }
.qs-tab-mandatory.qs-tab-active .qs-tab-icon { filter: drop-shadow(0 0 6px #22D3EE) brightness(1.3); }
.qs-tab-vitality.qs-tab-active   { color: #86efac; background: rgba(74,222,128,0.1); box-shadow: inset 0 -2px 0 #4ade80; }
.qs-tab-vitality.qs-tab-active .qs-tab-icon  { filter: drop-shadow(0 0 6px #4ade80) brightness(1.3); }
.qs-tab-catchup.qs-tab-active    { color: #6ee7b7; background: rgba(52,211,153,0.1); box-shadow: inset 0 -2px 0 #34D399; }
.qs-tab-catchup.qs-tab-active .qs-tab-icon  { filter: drop-shadow(0 0 6px #34D399) brightness(1.3); }
.qs-tab-prep.qs-tab-active       { color: #fde68a; background: rgba(245,158,11,0.1); box-shadow: inset 0 -2px 0 #F59E0B; }
.qs-tab-prep.qs-tab-active .qs-tab-icon     { filter: drop-shadow(0 0 6px #F59E0B) brightness(1.3); }

/* Sliding indicator bar */
.qs-tab-indicator {
  position: absolute; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--qs-indigo), var(--qs-cyan), transparent);
  box-shadow: 0 0 10px var(--qs-indigo);
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s cubic-bezier(0.4,0,0.2,1);
  border-radius: 2px; z-index: 2;
}

/* Panels */
.qs-panels-wrap { flex: 1 1 0; overflow: hidden; position: relative; min-height: 0; height: 0; }
.qs-panel {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  opacity: 0; pointer-events: none; transform: translateX(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.qs-panel-active { opacity: 1; pointer-events: auto; transform: translateX(0); }
.qs-panel-exit   { opacity: 0; pointer-events: none; transform: translateX(-14px); transition: opacity 0.2s ease, transform 0.2s ease; }
.qs-panel::-webkit-scrollbar { width: 3px; }
.qs-panel::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 2px; }
.qs-panel-inner { padding: 10px 12px 20px; }

/* ── SEPARATOR BEAM ── */
.qs-beam-sep {
  flex: 0 0 1px; width: 1px; align-self: stretch;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(99,102,241,0.5) 15%,
    rgba(34,211,238,0.6) 50%,
    rgba(99,102,241,0.5) 85%,
    transparent 100%);
  box-shadow: 0 0 8px rgba(99,102,241,0.25);
}

/* ── RIGHT — Manifeste de vol ── */
.qs-mission {
  flex: 0 0 40%; display: flex; flex-direction: column; min-width: 0;
  height: 100%; overflow: hidden;
  background:
    linear-gradient(160deg, rgba(96,165,250,0.06) 0%, transparent 40%),
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(96,165,250,0.04) 28px, rgba(96,165,250,0.04) 29px),
    rgba(4,3,20,0.98);
}
.qs-root.qs-entering .qs-mission {
  animation: qs-mission-in 0.7s cubic-bezier(0.22,1,0.36,1) 0.08s;
}
@keyframes qs-mission-in {
  from { transform: translateX(28px); }
  to   { transform: translateX(0); }
}

.qs-manifest-count {
  margin-left: auto;
  background: var(--qs-indigo); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
  box-shadow: 0 0 10px rgba(99,102,241,0.5);
  min-width: 18px; text-align: center;
}

.qs-scroll-body {
  flex: 1 1 0; display: flex; flex-direction: column; overflow: hidden;
  padding: 10px 12px 10px; gap: 8px; min-height: 0; height: 0;
}

.qs-mission-items { flex: 1 1 0; overflow-y: auto; overflow-x: hidden; min-height: 0; height: 0; }
.qs-mission-items::-webkit-scrollbar { width: 3px; }
.qs-mission-items::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.3); border-radius: 2px; }

/* Empty state */
.qs-mission-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; height: 100%; min-height: 100px; padding: 24px;
}
.qs-empty-icon { width: 40px; height: 40px; opacity: 0.18; stroke: var(--qs-indigo); }
.qs-mission-empty-text {
  font-size: 0.7rem; color: rgba(148,163,184,0.35); text-align: center;
  line-height: 1.7; letter-spacing: 0.04em;
}

/* Mission items */
.qs-mitem {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; margin-bottom: 5px;
  background: rgba(6,7,26,0.85);
  border: 1px solid rgba(99,102,241,0.2);
  border-left: 3px solid var(--qs-indigo);
  border-radius: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.4), inset 0 0 8px rgba(99,102,241,0.03);
  animation: qs-item-in 0.32s cubic-bezier(0.34,1.56,0.64,1) both;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.qs-mitem:hover {
  border-color: rgba(99,102,241,0.45);
  box-shadow: 0 0 14px rgba(99,102,241,0.18), inset 0 0 8px rgba(99,102,241,0.05);
}
@keyframes qs-item-in {
  from { opacity: 0; transform: translateX(18px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.qs-mitem-revision  { border-left-color: #8B5CF6; box-shadow: 0 1px 8px rgba(0,0,0,0.4), -2px 0 8px rgba(139,92,246,0.12); }
.qs-mitem-mandatory,.qs-mitem-agenda { border-left-color: var(--qs-cyan); box-shadow: 0 1px 8px rgba(0,0,0,0.4), -2px 0 8px rgba(34,211,238,0.12); }
.qs-mitem-vitality  { border-left-color: var(--qs-green); box-shadow: 0 1px 8px rgba(0,0,0,0.4), -2px 0 8px rgba(74,222,128,0.12); }
.qs-mitem-catchup   { border-left-color: #34D399; box-shadow: 0 1px 8px rgba(0,0,0,0.4), -2px 0 8px rgba(52,211,153,0.12); }
.qs-mitem-prep      { border-left-color: #F59E0B; box-shadow: 0 1px 8px rgba(0,0,0,0.4), -2px 0 8px rgba(245,158,11,0.12); }

/* mitem-icon is now an inline SVG */
.qs-mitem-icon { flex-shrink: 0; width: 14px; height: 14px; opacity: 0.55; display: block; }
.qs-mitem svg.qs-mitem-icon { flex-shrink: 0; }
.qs-mitem-info { flex: 1; min-width: 0; }
.qs-mitem-name {
  font-size: 0.72rem; color: var(--qs-text); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs-mitem-sub { font-size: 0.6rem; color: var(--qs-dim); margin-top: 1px; }
.qs-mitem-remove {
  background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.15);
  color: rgba(248,113,113,0.5); border-radius: 5px; padding: 3px 6px; cursor: pointer;
  font-size: 0.6rem; flex-shrink: 0; transition: background 0.2s, color 0.2s; line-height: 1;
}
.qs-mitem-remove:hover { background: rgba(248,113,113,0.2); color: #f87171; }

/* Totals */
.qs-mission-totals {
  flex-shrink: 0; display: flex; gap: 5px; flex-wrap: wrap;
  padding: 6px 0; border-top: 1px solid rgba(99,102,241,0.15);
}
.qs-total-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3);
  border-radius: 4px; padding: 3px 8px;
  font-size: 0.62rem; color: rgba(196,181,253,0.85);
  font-family: 'Orbitron', sans-serif;
  font-weight: 600; letter-spacing: 0.05em;
  box-shadow: 0 0 6px rgba(99,102,241,0.15);
}

/* ── LAUNCH BUTTON — ON DÉCOLLE ── */
.qs-launch-btn {
  flex-shrink: 0; position: relative; overflow: hidden; width: 100%; padding: 15px;
  background: linear-gradient(135deg, #312e81 0%, #4338ca 40%, #6366f1 70%, #818cf8 100%);
  border: 1px solid rgba(129,140,248,0.55);
  border-radius: 10px; cursor: pointer;
  font-size: 0.88rem; font-weight: 800;
  color: #fff; letter-spacing: 0.12em; text-transform: uppercase;
  text-shadow: 0 0 20px rgba(129,140,248,0.8);
  box-shadow: 0 4px 24px rgba(99,102,241,0.45), 0 0 0 0 rgba(99,102,241,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  animation: qs-launch-pulse 2.8s ease-in-out infinite;
}
@keyframes qs-launch-pulse {
  0%,100% { box-shadow: 0 4px 24px rgba(99,102,241,0.45), inset 0 1px 0 rgba(255,255,255,0.12); }
  50%     { box-shadow: 0 6px 36px rgba(99,102,241,0.7), 0 0 0 4px rgba(99,102,241,0.12), inset 0 1px 0 rgba(255,255,255,0.12); }
}
.qs-launch-btn:disabled { filter: grayscale(0.8) brightness(0.45); cursor: not-allowed; animation: none; }
.qs-launch-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(99,102,241,0.65), 0 0 0 3px rgba(129,140,248,0.25), inset 0 1px 0 rgba(255,255,255,0.18);
}
.qs-launch-btn:not(:disabled):active { transform: scale(0.97); }

/* Exhaust flame at bottom */
.qs-launch-exhaust {
  position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 6px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(129,140,248,0.6) 0%, transparent 70%);
  filter: blur(3px);
  animation: qs-exhaust 1.4s ease-in-out infinite;
}
@keyframes qs-exhaust {
  0%,100% { opacity: 0.6; width: 50%; }
  50%     { opacity: 1;   width: 70%; }
}
/* Shine sweep */
.qs-launch-shine {
  position: absolute; top: 0; left: -80%; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  border-radius: inherit; pointer-events: none;
  animation: qs-shine-sweep 2.4s ease-in-out infinite;
}
@keyframes qs-shine-sweep { 0%{left:-80%;} 55%,100%{left:130%;} }
.qs-launch-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}

/* Tab entry pop animation (additive — tab is visible even without it) */
@keyframes qs-tab-pop {
  0%  { opacity: 0.2; transform: translateY(10px) scale(0.8); }
  70% { transform: translateY(-2px) scale(1.06); }
  100%{ opacity: 1;   transform: translateY(0)   scale(1); }
}
.qs-tab.qs-anim-pop { animation: qs-tab-pop 0.42s cubic-bezier(0.34,1.56,0.64,1) both; }

/* ══════════════════════════════════════════════════════════
   COCKPIT CONTENT OVERRIDES — Quest cards, titles, calendar
   All content INSIDE .qs-root gets the HUD/terminal treatment
══════════════════════════════════════════════════════════ */

/* ── Rayon section spacing (16px margins everywhere) ── */
.qs-root .rayon-title-row,
.qs-root .rayon-title:not(.qswipe-wrap .rayon-title) {
  margin-left: 16px !important; margin-right: 16px !important;
}
.qs-root .rayon-ajouter-btn,
.qs-root .agenda-add-btn,
.qs-root .btn-add-agenda,
.qs-root .btn-import-ics,
.qs-root .agenda-top-actions {
  margin-left: 16px !important; margin-right: 16px !important;
}
.qs-root .agenda-list { padding: 0 16px !important; }
/* Agenda blocks — cut corner */
.qs-root .agenda-block {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)) !important;
  border-radius: 0 !important; margin-bottom: 7px !important;
}

/* ── Rayon titles ── */
.qs-root .rayon-title {
  font-family: 'Orbitron', 'Syne', sans-serif !important;
  font-size: 0.6rem !important; font-weight: 700 !important;
  letter-spacing: 0.22em !important; text-transform: uppercase !important;
  color: rgba(99,102,241,0.85) !important;
  -webkit-text-fill-color: rgba(99,102,241,0.85) !important;
  border-left: 2px solid #6366f1 !important;
  border-bottom: none !important;
  padding: 3px 0 3px 8px !important;
  margin-bottom: 8px !important;
  background: none !important;
  text-shadow: 0 0 12px rgba(99,102,241,0.7) !important;
}
.qs-root #qs-panel-0 .rayon-title, .qs-root [id="shop-body-revision"] .rayon-title { border-left-color: #8B5CF6 !important; color: #c4b5fd !important; -webkit-text-fill-color: #c4b5fd !important; text-shadow: 0 0 12px rgba(139,92,246,0.7) !important; }
.qs-root #qs-panel-1 .rayon-title, .qs-root [id="shop-body-mandatory"] .rayon-title { border-left-color: #22D3EE !important; color: #67e8f9 !important; -webkit-text-fill-color: #67e8f9 !important; text-shadow: 0 0 12px rgba(34,211,238,0.6) !important; }
.qs-root #qs-panel-2 .rayon-title, .qs-root [id="shop-body-vitality"] .rayon-title { border-left-color: #4ade80 !important; color: #86efac !important; -webkit-text-fill-color: #86efac !important; text-shadow: 0 0 12px rgba(74,222,128,0.6) !important; }
.qs-root #qs-panel-3 .rayon-title, .qs-root [id="shop-body-catchup"] .rayon-title { border-left-color: #34D399 !important; color: #6ee7b7 !important; -webkit-text-fill-color: #6ee7b7 !important; text-shadow: 0 0 12px rgba(52,211,153,0.6) !important; }
.qs-root #qs-panel-4 .rayon-title, .qs-root [id="shop-body-prep"] .rayon-title { border-left-color: #F59E0B !important; color: #fde68a !important; -webkit-text-fill-color: #fde68a !important; text-shadow: 0 0 12px rgba(245,158,11,0.6) !important; }

/* ══ COCKPIT GAMING PANELS — Twitch-style cut-corner blocks ══ */

/* Panel inner spacing */
.qs-root .qs-panel-inner { padding: 8px 0 24px !important; }

/* Sticky "Ajouter une matière" button */
.qs-root .rev-add-subj-wrap {
  padding: 8px 16px !important;
  background: rgba(3,4,18,0.98) !important;
  box-sizing: border-box !important; width: 100% !important;
}
.qs-root .rev-forge-btn {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)) !important;
  border-radius: 0 !important;
  padding: 13px !important; font-size: 0.75rem !important;
}

/* ── qswipe-wrap = gradient border layer ── */
.qs-root .qswipe-wrap {
  position: relative !important;
  background: linear-gradient(135deg, rgba(99,102,241,0.75) 0%, rgba(96,165,250,0.6) 50%, rgba(34,211,238,0.55) 100%) !important;
  padding: 1.5px !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)) !important;
  border-radius: 0 !important;
  overflow: visible !important;
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.35));
  width: 50% !important;
  max-width: 240px !important;
  margin: 0 auto 5px !important;
  align-self: center !important;
}
/* Category-specific border colors */
.qs-root #qs-panel-0 .qswipe-wrap { background: linear-gradient(135deg, rgba(139,92,246,0.8), rgba(99,102,241,0.6)) !important; filter: drop-shadow(0 0 9px rgba(139,92,246,0.45)); }
.qs-root #qs-panel-1 .qswipe-wrap { background: linear-gradient(135deg, rgba(34,211,238,0.8), rgba(6,182,212,0.6)) !important; filter: drop-shadow(0 0 9px rgba(34,211,238,0.4)); }
.qs-root #qs-panel-2 .qswipe-wrap { background: linear-gradient(135deg, rgba(74,222,128,0.8), rgba(52,211,153,0.6)) !important; filter: drop-shadow(0 0 9px rgba(74,222,128,0.4)); }
.qs-root #qs-panel-3 .qswipe-wrap { background: linear-gradient(135deg, rgba(52,211,153,0.8), rgba(16,185,129,0.6)) !important; filter: drop-shadow(0 0 9px rgba(52,211,153,0.4)); }
.qs-root #qs-panel-4 .qswipe-wrap { background: linear-gradient(135deg, rgba(245,158,11,0.8), rgba(251,191,36,0.5)) !important; filter: drop-shadow(0 0 9px rgba(245,158,11,0.4)); }

/* ── Quest card = dark inner ── */
.qs-root .quest-card {
  clip-path: polygon(0 0, calc(100% - 12.5px) 0, 100% 12.5px, 100% 100%, 12.5px 100%, 0 calc(100% - 12.5px)) !important;
  background: linear-gradient(135deg, rgba(16,11,42,0.97) 0%, rgba(7,5,24,0.99) 100%) !important;
  background-image: none !important;
  border: none !important; border-left: none !important;
  border-radius: 0 !important;
  padding: 11px 44px 11px 14px !important;
  margin: 0 !important;
  box-shadow: none !important;
  transition: background 0.18s !important;
}
.qs-root .quest-card::before { display: none !important; }
.qs-root .quest-card:hover {
  background: linear-gradient(135deg, rgba(24,16,60,0.99) 0%, rgba(10,7,32,1) 100%) !important;
  transform: none !important;
}
.qs-root .qswipe-wrap:hover { filter: drop-shadow(0 0 14px rgba(99,102,241,0.6)) !important; }
.qs-root #qs-panel-0 .qswipe-wrap:hover { filter: drop-shadow(0 0 14px rgba(139,92,246,0.65)) !important; }
.qs-root #qs-panel-1 .qswipe-wrap:hover { filter: drop-shadow(0 0 14px rgba(34,211,238,0.6)) !important; }
.qs-root #qs-panel-2 .qswipe-wrap:hover { filter: drop-shadow(0 0 14px rgba(74,222,128,0.6)) !important; }
.qs-root #qs-panel-3 .qswipe-wrap:hover { filter: drop-shadow(0 0 14px rgba(52,211,153,0.6)) !important; }
.qs-root #qs-panel-4 .qswipe-wrap:hover { filter: drop-shadow(0 0 14px rgba(245,158,11,0.6)) !important; }

/* Selected state */
.qs-root .quest-card.in-basket {
  background: linear-gradient(135deg, rgba(4,22,16,0.97) 0%, rgba(2,14,10,0.99) 100%) !important;
}
.qs-root .qswipe-wrap:has(.quest-card.in-basket) {
  background: linear-gradient(135deg, rgba(74,222,128,0.8), rgba(52,211,153,0.6)) !important;
  filter: drop-shadow(0 0 12px rgba(74,222,128,0.5)) !important;
}

/* ── Rev container — compact gap ── */
.qs-root .rev-container {
  gap: 6px !important;
  padding: 4px 0 16px !important;
  align-items: center !important;
}

/* ── Rev subjects — 72% width, centered ── */
.qs-root .rev-subject {
  width: 50% !important;
  max-width: 240px !important;
  margin: 0 auto !important;
  align-self: center !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)) !important;
  background: linear-gradient(135deg, rgba(14,10,42,0.97) 0%, rgba(6,4,22,0.99) 100%) !important;
  border: 1.5px solid rgba(99,102,241,0.55) !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.3));
}
.qs-root .rev-subject:hover {
  border-color: rgba(99,102,241,0.9) !important;
  filter: drop-shadow(0 0 14px rgba(99,102,241,0.55));
}

/* ── Center subject name ── */
.qs-root .rev-subject-header {
  padding: 10px 12px !important;
  gap: 8px !important;
}
.qs-root .rev-subj-name {
  text-align: center !important;
  font-size: 11px !important;
}

/* ── Suppress the ✦ diamond separators ── */
.qs-root .rev-sep-ornament { display: none !important; }

/* ── Forge button — cut corners, centered, narrow ── */
.qs-root .rev-add-subj-wrap {
  padding: 6px 0 4px !important;
  background: transparent !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
}
.qs-root .rev-forge-btn {
  width: 50% !important;
  max-width: 240px !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)) !important;
  border-radius: 0 !important;
  padding: 12px !important; font-size: 0.72rem !important;
}

/* ── Header progress bar ── */
.qs-root .rev-progress-wrap { margin: 4px 0 6px !important; }

/* Quest card text */
.qs-root .qcard-title, .qs-root .quest-card .quest-name, .qs-root .quest-card [class*="title"] {
  color: #e2e8f0 !important; -webkit-text-fill-color: #e2e8f0 !important;
  font-size: 0.78rem !important; font-weight: 600 !important;
}
.qs-root .qcard-sub, .qs-root .quest-card [class*="sub"], .qs-root .quest-card [class*="time"],
.qs-root .quest-card [class*="duration"], .qs-root .quest-card small {
  color: rgba(148,163,184,0.6) !important; -webkit-text-fill-color: rgba(148,163,184,0.6) !important;
  font-size: 0.65rem !important;
}
/* Checkbox / select button inside card */
.qs-root .quest-card .qcard-check, .qs-root .quest-card [class*="check"], .qs-root .quest-card [class*="select"] {
  border-color: rgba(99,102,241,0.4) !important;
}
.qs-root .quest-card .qcard-check.checked, .qs-root .quest-card [class*="check"].checked {
  background: #6366f1 !important; border-color: #6366f1 !important;
  box-shadow: 0 0 10px rgba(99,102,241,0.5) !important;
}

/* ── Swipe buttons (add/remove) inside cards ── */
.qs-root .qswipe-action-right { background: linear-gradient(90deg, #6366f1, #8B5CF6) !important; }
.qs-root .qswipe-action-left  { background: linear-gradient(90deg, #f43f5e, #fb7185) !important; }

/* ── Agenda / calendar inside cockpit ── */
.qs-root .agenda-block {
  background: rgba(6,8,24,0.92) !important;
  border-color: rgba(34,211,238,0.35) !important;
}
.qs-root .agenda-block:hover { border-color: rgba(34,211,238,0.65) !important; }
.qs-root .agenda-block.selected { border-color: rgba(74,222,128,0.55) !important; background: rgba(0,20,15,0.85) !important; }
.qs-root .agenda-block.missed { border-color: rgba(248,113,113,0.4) !important; }
.qs-root .agenda-time-bar { background: linear-gradient(to bottom, #22D3EE, #6366f1) !important; }
.qs-root .agenda-hour { color: #22D3EE !important; -webkit-text-fill-color: #22D3EE !important; }
.qs-root .agenda-subject { color: #e2e8f0 !important; -webkit-text-fill-color: #e2e8f0 !important; }
.qs-root .agenda-date-label { color: rgba(99,102,241,0.8) !important; -webkit-text-fill-color: rgba(99,102,241,0.8) !important; }

/* Monthly calendar nodes */
.qs-root .month-day, .qs-root .cal-day, .qs-root [class*="month-day"], .qs-root [class*="cal-day"] {
  background: rgba(6,8,24,0.7) !important;
  border-color: rgba(99,102,241,0.15) !important;
  color: #e2e8f0 !important; -webkit-text-fill-color: #e2e8f0 !important;
}
.qs-root .month-day.today, .qs-root [class*="today"] {
  background: rgba(99,102,241,0.2) !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 12px rgba(99,102,241,0.4) !important;
  color: #c4b5fd !important; -webkit-text-fill-color: #c4b5fd !important;
}
.qs-root .month-day.has-quest, .qs-root [class*="has-quest"], .qs-root [class*="has-event"] {
  border-color: rgba(34,211,238,0.4) !important;
}

/* Generic text inside panels */
.qs-root .qs-panel-inner, .qs-root .qs-panel-inner * {
  scrollbar-color: rgba(99,102,241,0.3) transparent;
}

/* Prep / vitality cards — override background */
.qs-root .prep-card, .qs-root [class*="prep-"], .qs-root .vitality-card, .qs-root [class*="vitality-"] {
  background: rgba(6,8,24,0.85) !important;
  border-color: rgba(99,102,241,0.2) !important;
  border-radius: 6px !important;
  color: #e2e8f0 !important;
}

/* Buttons inside panels (+ Ajouter etc.) */
.qs-root .rayon-ajouter-btn, .qs-root .agenda-add-btn, .qs-root [onclick*="agendaForm"] {
  background: rgba(99,102,241,0.1) !important;
  border: 1px solid rgba(99,102,241,0.35) !important;
  color: #c4b5fd !important; -webkit-text-fill-color: #c4b5fd !important;
  border-radius: 6px !important;
  font-size: 0.7rem !important;
  box-shadow: none !important;
}
.qs-root .rayon-ajouter-btn:hover, .qs-root .agenda-add-btn:hover {
  background: rgba(99,102,241,0.22) !important;
  box-shadow: 0 0 12px rgba(99,102,241,0.25) !important;
}

/* Energy block message */

/* Light theme — keep space feel but brighter */
body.light-theme .qs-root {
  background:
    radial-gradient(ellipse 55% 45% at 15% 40%, rgba(99,102,241,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 60%, rgba(96,165,250,0.07) 0%, transparent 60%),
    #0c0e1f;
}
body.light-theme .qs-header { background: rgba(8,10,28,0.95); }
body.light-theme .qs-browser { background: rgba(6,8,22,0.8); }
body.light-theme .qs-mission { background: rgba(5,7,22,0.95); }

/* ───────────────────────────────────────────────────────────
   BOUTON GÉNÉRER MON PLAN (.shop-gen-btn)
   Dégradé violet 3 tons, police Cinzel, fort glow.
   Shimmer animé via ::before (left-shimmer 2.2s).
   Surbrillance interne via ::after (gradient to bottom).
   ─────────────────────────────────────────────────────────── */
/* Bottom bar */
#screen-quest-shop {
  display: flex; flex-direction: column;
}
.shop-bottom-bar {
  padding: 10px 16px 14px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.shop-gen-btn {
  width: 100%;
  white-space: nowrap;
  padding: 18px !important;
  font-size: 0.82rem !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%) !important;
  border: none !important;
  border-radius: var(--r-lg) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 4px 20px rgba(217,70,239,0.4),
    0 0 14px rgba(6,182,212,0.2),
    0 1px 0 rgba(0,0,0,0.3) !important;
  position: relative; overflow: hidden;
  transition: transform 100ms ease, box-shadow 100ms ease;
}
.shop-gen-btn::before {
  content: ''; position: absolute; top: 0; left: -75%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: left-shimmer 2.2s ease-in-out infinite;
  animation-delay: 0.6s;
  pointer-events: none; border-radius: inherit;
}
.shop-gen-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent 50%);
  border-radius: inherit; pointer-events: none;
}
.shop-gen-btn:active { transform: scale(0.97) !important; filter: brightness(0.93); }
body.light-theme .shop-bottom-bar { background: rgba(255,255,255,0.45); border-top-color: rgba(0,0,0,0.07); }

/* Basket button redesign */
.sbb-header {
  display: flex; align-items: center; gap: 8px;
  padding: 22px 12px 6px; /* top padding leaves room for PANIER label */
}
.sbb-icon { display: flex; align-items: center; color: rgba(255,255,255,0.55); flex-shrink: 0; }
.sbb-icon svg { width: 18px; height: 18px; }
.sbb-count-wrap { display: flex; align-items: baseline; gap: 4px; flex: 1; }
.sbb-count { font-family: 'Orbitron', sans-serif; font-size: 1.05rem; font-weight: 900; color: rgba(255,255,255,0.92); line-height: 1; }
.sbb-label { font-family: 'Inter', sans-serif; font-size: 0.55rem; font-weight: 600; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.08em; }
.sbb-chevron { width: 14px; height: 14px; color: rgba(255,255,255,0.3); flex-shrink: 0; }
.sbb-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sbb-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px 8px;
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
}
.sbb-stat + .sbb-stat { border-left: 1px solid rgba(255,255,255,0.07); }
.sbb-stat svg { opacity: 0.7; flex-shrink: 0; }
.sbb-stat span { font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.sbb-stat-label { font-size: 0.42rem !important; font-weight: 500 !important; color: rgba(255,255,255,0.25) !important; text-transform: uppercase; letter-spacing: 0.06em; }
.sbb-stat-coins { color: #f6c90e; }
.sbb-stat-coins svg { opacity: 1; }
.sbb-stat-energy { color: #a78bfa; }
.sbb-stat-gain { color: #4ade80; }
.sbb-stat-gain svg { opacity: 1; }
.sbb-stat-time { color: rgba(255,255,255,0.5); }
.sbb-time-over { color: #f87171 !important; }

body.light-theme .sbb-icon { color: rgba(30,27,75,0.4); }
body.light-theme .sbb-count { color: #1e1b4b; }
body.light-theme .sbb-label { color: rgba(30,27,75,0.3); }
body.light-theme .sbb-chevron { color: rgba(30,27,75,0.25); }
body.light-theme .sbb-stats { border-top-color: rgba(0,0,0,0.06); }
body.light-theme .sbb-stat { color: rgba(30,27,75,0.55); }
body.light-theme .sbb-stat + .sbb-stat { border-left-color: rgba(0,0,0,0.07); }
body.light-theme .sbb-stat-coins { color: #92600a; }
body.light-theme .sbb-stat-label { color: rgba(30,27,75,0.3) !important; }

/* ════════════════════════════════════════════════════════════
   DARK MODE — ALL TITLES WHITE
════════════════════════════════════════════════════════════ */
body:not(.light-theme) .screen-title {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: unset !important;
  color: #ffffff !important;
}
body:not(.light-theme) .rayon-title,
body:not(.light-theme) .rayon-title * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
}
body:not(.light-theme) .catchup-section-label,
body:not(.light-theme) .cs-label-text {
  color: rgba(255,255,255,0.9) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.9) !important;
}
body:not(.light-theme) .rayon-subtitle {
  color: rgba(255,255,255,0.5) !important;
}

/* Dark mode — selected date number white */
body:not(.light-theme) .cal-cell.cal-selected,
body:not(.light-theme) .cal-cell.cal-selected * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Light mode — calendar iOS style */
body.light-theme .agenda-cal-wrap {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.07);
}
body.light-theme .cal-month-label { color: #1e1b4b; }
body.light-theme .cal-nav-btn { color: rgba(30,27,75,0.4); }
body.light-theme .cal-nav-btn:hover:not(:disabled) { color: #1e1b4b; }
body.light-theme .cal-day-hdr { color: rgba(30,27,75,0.35); }
body.light-theme .cal-cell { color: rgba(30,27,75,0.75); }
body.light-theme .cal-cell:hover { background: rgba(124,58,237,0.08); color: #4c1d95; }
body.light-theme .cal-cell.cal-today { color: #6d28d9; border-color: rgba(109,40,217,0.6); }
body.light-theme .cal-cell.cal-selected { background: #7c3aed; color: #fff; border: none; }
body.light-theme .cal-cell.cal-day-past { color: rgba(30,27,75,0.3); }
body.light-theme .cal-cell.cal-has-items { color: #1e1b4b; font-weight: 600; }

/* Light mode — shop avatar XP bar more visible */
body.light-theme .shop-avatar-xp {
  background: rgba(76,29,149,0.08);
  border-color: rgba(76,29,149,0.2);
}
body.light-theme .shop-avatar-xp-label {
  color: #4c1d95;
}
body.light-theme .shop-avatar-xp-bar {
  background: rgba(76,29,149,0.15);
}
body.light-theme .shop-avatar-xp-fill {
  background: linear-gradient(90deg, #4c1d95, #7c3aed);
}

/* ════════════════════════════════════════════════════════════
   BLOCK GLOW — dark=white / light=purple
════════════════════════════════════════════════════════════ */
body:not(.light-theme) .quest-card,
body:not(.light-theme) .shelf-card,
body:not(.light-theme) .agenda-editable-item,
body:not(.light-theme) .incomplete-card,
body:not(.light-theme) .catchup-missed-card {
  box-shadow: 0 0 10px rgba(255,255,255,0.07), 0 2px 8px rgba(255,255,255,0.04);
}
body:not(.light-theme) .vitality-card {
  box-shadow: 0 0 14px rgba(255,255,255,0.18), 0 2px 10px rgba(255,255,255,0.1);
}
body:not(.light-theme) .quest-card:hover,
body:not(.light-theme) .shelf-card:hover,
body:not(.light-theme) .agenda-editable-item:hover {
  box-shadow: 0 0 18px rgba(255,255,255,0.13), 0 4px 16px rgba(255,255,255,0.07);
}
body:not(.light-theme) .vitality-card:hover {
  box-shadow: 0 0 22px rgba(255,255,255,0.28), 0 4px 16px rgba(255,255,255,0.14);
}
body:not(.light-theme) .quest-card.in-basket,
body:not(.light-theme) .vitality-card.in-basket {
  box-shadow: 0 0 16px rgba(255,255,255,0.15), 0 4px 12px rgba(255,255,255,0.08);
}

body.light-theme .quest-card,
body.light-theme .shelf-card,
body.light-theme .agenda-editable-item,
body.light-theme .incomplete-card,
body.light-theme .catchup-missed-card {
  box-shadow: 0 0 10px rgba(124,58,237,0.15), 0 2px 8px rgba(124,58,237,0.08);
}
body.light-theme .vitality-card {
  box-shadow: 0 0 14px rgba(124,58,237,0.3), 0 2px 10px rgba(124,58,237,0.18);
}
body.light-theme .quest-card:hover,
body.light-theme .shelf-card:hover,
body.light-theme .agenda-editable-item:hover {
  box-shadow: 0 0 18px rgba(124,58,237,0.25), 0 4px 16px rgba(124,58,237,0.12);
}
body.light-theme .vitality-card:hover {
  box-shadow: 0 0 22px rgba(124,58,237,0.45), 0 4px 16px rgba(124,58,237,0.25);
}
body.light-theme .quest-card.in-basket,
body.light-theme .vitality-card.in-basket {
  box-shadow: 0 0 16px rgba(124,58,237,0.3), 0 4px 12px rgba(124,58,237,0.15);
}

/* Agenda blocks glow — dark=white / light=purple */
body:not(.light-theme) .agenda-block,
body:not(.light-theme) .agenda-editable-item {
  box-shadow: 0 0 10px rgba(255,255,255,0.07), 0 2px 8px rgba(255,255,255,0.04);
}
body:not(.light-theme) .agenda-block:hover,
body:not(.light-theme) .agenda-editable-item:hover {
  box-shadow: 0 0 18px rgba(255,255,255,0.13), 0 4px 16px rgba(255,255,255,0.07);
}

body.light-theme .agenda-block,
body.light-theme .agenda-editable-item {
  box-shadow: 0 0 10px rgba(124,58,237,0.15), 0 2px 8px rgba(124,58,237,0.08);
}
body.light-theme .agenda-block:hover,
body.light-theme .agenda-editable-item:hover {
  box-shadow: 0 0 18px rgba(124,58,237,0.25), 0 4px 16px rgba(124,58,237,0.12);
}

/* ═══════════════════════ BOTTOM NAVIGATION BAR — Apple Premium ══════════════════════ */
.bottom-nav-wrap {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  width: calc(100% - 20px);
  max-width: 415px;
  transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.25s ease;
}
.bottom-nav-wrap.hidden {
  transform: translateX(-50%) translateY(130px);
  opacity: 0;
  pointer-events: none;
}

/* Main pill */
.bottom-nav {
  display: flex; align-items: center; justify-content: space-around;
  width: 100%;
  background: radial-gradient(
    ellipse at 50% 0%,
    #7A2BC2 0%,
    #2A1650 35%,
    #0F0828 70%,
    #050212 100%
  );
  backdrop-filter: blur(12px) saturate(1.6);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  border: 1px solid rgba(122,43,194,0.25);
  border-radius: 28px 28px 22px 22px;
  padding: 10px 6px 8px;
  box-shadow:
    0 0 18px rgba(122,43,194,0.45),
    0 8px 32px rgba(0,0,0,0.7),
    inset 0 0 20px rgba(10,5,30,0.6);
}

/* Tabs */
.bn-tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 2px 6px 2px;
  color: rgba(255,255,255,0.45);
  transition: color 0.25s ease;
  min-width: 56px;
  -webkit-tap-highlight-color: transparent;
}

/* Golden glow circle behind active icon */
.bn-icon-bg {
  position: absolute;
  top: -2px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
  pointer-events: none;
}
.bn-tab.active .bn-icon-bg {
  background: transparent;
  box-shadow: none;
}

/* Icon */
.bn-icon {
  width: 24px; height: 24px;
  position: relative; z-index: 1; flex-shrink: 0;
  transition: all 0.25s ease;
  stroke: rgba(255,255,255,0.45);
}
.bn-tab.active .bn-icon {
  stroke: #e8c96a;
  filter: drop-shadow(0 0 6px rgba(220,185,80,0.7)) drop-shadow(0 0 2px rgba(255,220,100,0.5));
  transform: scale(1.08);
}

/* Label */
.bn-label {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.02em;
  position: relative; z-index: 1;
  color: rgba(255,255,255,0.4);
  transition: color 0.25s ease;
}
.bn-tab.active .bn-label {
  color: #e8c96a;
  font-weight: 700;
}

/* Active dot */
.bn-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  position: relative; z-index: 1;
}
.bn-tab.active .bn-dot {
  background: #d4a843;
  box-shadow: 0 0 6px rgba(212,168,67,0.7);
}

/* Collapse tab — encoche en dessous */
.bn-collapse-btn {
  width: 44px; height: 16px;
  background: rgba(22,18,32,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: none;
  border-radius: 0 0 12px 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.3);
  transition: color 0.2s, background 0.2s;
}
.bn-collapse-btn svg { width: 11px; height: 11px; }
.bn-collapse-btn:hover { color: rgba(212,175,80,0.7); background: rgba(40,32,60,0.8); }

/* Reveal button (arrow up when nav is hidden) */
.bn-reveal-btn {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  width: 44px; height: 24px;
  background: rgba(22,18,32,0.82);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(212,175,80,0.7);
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  transition: all 0.22s ease;
}
.bn-reveal-btn svg { width: 14px; height: 14px; }
.bn-reveal-btn:hover { color: #e8c96a; background: rgba(40,32,60,0.9); box-shadow: 0 0 12px rgba(212,175,80,0.3); }
.bn-reveal-btn.hidden { display: none; }

.screen.with-bottom-nav { padding-bottom: 90px; }

/* Light theme */
body.light-theme .bottom-nav {
  background: rgba(245,243,255,0.82);
  border-color: rgba(180,160,200,0.3);
  box-shadow: 0 12px 40px rgba(80,40,160,0.18), 0 2px 0 rgba(255,255,255,0.9) inset;
}
body.light-theme .bn-tab { color: rgba(30,16,80,0.35); }
body.light-theme .bn-icon { stroke: rgba(30,16,80,0.35); }
body.light-theme .bn-label { color: rgba(30,16,80,0.35); }
body.light-theme .bn-tab.active .bn-icon { stroke: #9a6f10; filter: drop-shadow(0 0 5px rgba(154,111,16,0.5)); }
body.light-theme .bn-tab.active .bn-label { color: #9a6f10; }
body.light-theme .bn-tab.active .bn-dot { background: #b07f18; }
body.light-theme .bn-tab.active .bn-icon-bg {
  background: transparent;
  box-shadow: none;
}
body.light-theme .bn-collapse-btn { background: rgba(245,243,255,0.82); border-color: rgba(180,160,200,0.25); color: rgba(30,16,80,0.3); }
body.light-theme .bn-reveal-btn { background: rgba(245,243,255,0.9); border-color: rgba(180,160,200,0.3); color: rgba(154,111,16,0.8); }

/* ════════════════════════════════════════════════════════════
   SCREEN — LA SALLE
════════════════════════════════════════════════════════════ */
#screen-salle {
  background: linear-gradient(to top, #08071A 0%, #0F0D28 100%);
  display: flex; flex-direction: column;
  overflow: hidden; position: relative;
}

/* ── Shared: les deux vues partagent le plein écran ── */
.sv { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.sv.hidden { display: none; }

/* ══════ VUE 1 : LISTE SERVEURS ══════ */
.sv-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}
.sv-nav-back-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 12px; cursor: pointer;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.sv-nav-back-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.55); box-shadow: 0 0 18px rgba(255,255,255,0.28), inset 0 1px 0 rgba(255,255,255,0.2); }
.sv-title { flex: 1; }
.sv-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: .08em;
}
.sv-create-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(127,119,221,0.14);
  border: 1px solid rgba(127,119,221,0.35);
  border-radius: 20px;
  color: rgba(255,255,255,0.75);
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.sv-create-btn:active { background: rgba(127,119,221,0.25); }

/* Tabs */
.sv-tabs {
  display: flex; gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sv-tab {
  padding: 10px 16px;
  background: none; border: none;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.sv-tab.active { color: #fff; border-bottom-color: #7F77DD; }

/* Scrollable list area */
.sv-scroll {
  flex: 1; overflow-y: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.sv-scroll::-webkit-scrollbar { display: none; }
.sv-scroll.hidden { display: none; }

/* Section label */
.sv-section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: .18em;
  color: rgba(255,255,255,0.22);
  padding: 4px 0 8px;
}

/* Server card */
.sv-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(127,119,221,0.05);
  border: 1px solid rgba(127,119,221,0.1);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.sv-card:active { background: rgba(127,119,221,0.12); }
.sv-card-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(127,119,221,0.18);
  border: 1px solid rgba(127,119,221,0.25);
  display: grid; place-items: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}
.sv-card-body { flex: 1; min-width: 0; }
.sv-card-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.88);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 3px;
}
.sv-card-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  display: flex; align-items: center; gap: 3px;
}
.sv-online-badge {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  flex-shrink: 0;
}
.sv-type-badge {
  font-family: 'Inter', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: .08em;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}
.sv-type-badge.public  { background: rgba(29,158,117,0.14); color: #1D9E75; }
.sv-type-badge.prive   { background: rgba(216,90,48,0.12); color: #F0997B; }
.sv-type-badge.promo   { background: rgba(127,119,221,0.14); color: #A9A3F0; }
.sv-card-arrow {
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* Abonnés */
.sv-invite-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 12px;
}
.sv-invite-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.55);
}
.sv-invite-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  background: rgba(127,119,221,0.12);
  border: 1px solid rgba(127,119,221,0.3);
  border-radius: 16px;
  color: rgba(255,255,255,0.65);
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
}
.sv-abonne-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sv-abonne-avatar {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.sv-abonne-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid #0F0D28;
}
.sv-abonne-dot.online  { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.7); }
.sv-abonne-dot.offline { background: rgba(255,255,255,0.2); }
.sv-abonne-info { flex: 1; min-width: 0; }
.sv-abonne-name {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.8);
}
.sv-abonne-quete {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 4px;
  margin-top: 1px;
}

/* ══════ VUE 2 : SALLE DE CLASSE ══════ */
.sv-room-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}
.sv-back-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.28);
  display: grid; place-items: center;
  cursor: pointer;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.sv-back-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 0 18px rgba(255,255,255,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
}
.sv-room-info { flex: 1; min-width: 0; }
.sv-room-name {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: .05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-room-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

/* Quest timer bar */
.sv-quest-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 0 16px 0;
  padding: 8px 12px;
  background: rgba(127,119,221,0.1);
  border: 1px solid rgba(127,119,221,0.25);
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}
.sv-quest-bar.hidden { display: none; }
.sv-quest-bar-name { flex: 1; font-size: 12px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-quest-bar-timer { font-family: 'Orbitron', sans-serif; font-size: 12px; font-weight: 700; color: #7F77DD; }
.sv-quest-bar-back {
  padding: 4px 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  color: white;
  border: none; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}

/* Blackboard */
.salle-board-wrap {
  margin: 10px 16px 0;
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.salle-board {
  width: 100%;
  background: #0D1117;
  border: 2px solid rgba(127,119,221,0.3);
  border-radius: 8px;
  padding: 11px 20px;
  text-align: center;
  font-family: 'Syne', 'Orbitron', sans-serif;
  font-size: 16px; font-weight: 700;
  letter-spacing: .2em;
  color: rgba(255,255,255,0.88);
  text-transform: uppercase;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}
.salle-board-glow {
  width: 50%; height: 6px;
  background: radial-gradient(ellipse, rgba(127,119,221,0.2) 0%, transparent 70%);
  margin-top: 2px; filter: blur(5px);
}

/* Stats */
.salle-stats {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 20px 0;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  flex-shrink: 0; flex-wrap: wrap;
}
.salle-dot { opacity: 0.2; }

/* Classroom room */
.salle-room {
  flex: 1; position: relative;
  margin: 8px 12px 0;
  overflow: hidden; min-height: 0;
}
.salle-window {
  position: absolute; top: 8px;
  width: 34px; height: 50px;
  background: rgba(127,119,221,0.04);
  border: 1px solid rgba(127,119,221,0.1);
  border-radius: 4px 4px 0 0;
}
.salle-window::before {
  content: ''; position: absolute;
  top: 0; bottom: 0; left: 50%; width: 1px;
  background: rgba(127,119,221,0.1); transform: translateX(-50%);
}
.salle-window::after {
  content: ''; position: absolute;
  left: 0; right: 0; top: 50%; height: 1px;
  background: rgba(127,119,221,0.1); transform: translateY(-50%);
}
.salle-window-left  { left: 0; }
.salle-window-right { right: 0; }
.salle-floor {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: rgba(255,255,255,0.04);
}

/* Tables grid */
.salle-tables {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 8px 44px;
  height: 100%; align-content: center;
  box-sizing: border-box;
}
.salle-table {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.salle-table-surface {
  position: relative;
  width: 78px; height: 44px;
  background: rgba(127,119,221,0.08);
  border: 1px solid rgba(127,119,221,0.15);
  border-radius: 8px;
}
.salle-table.empty .salle-table-surface {
  opacity: 0.28; border-style: dashed;
}
.salle-empty-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.12);
}

/* Avatar + online dot */
.salle-avatar-wrap { position: relative; margin-bottom: 1px; }
.salle-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700; color: white;
  transition: opacity .3s;
}
.salle-avatar.pause { opacity: 0.5; }
/* Green online dot (Discord-style) — always shown for actif/termine */
.salle-online-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid #0F0D28;
}
.salle-online-dot.green  { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.75); }
.salle-online-dot.yellow { background: #EF9F27; box-shadow: 0 0 5px rgba(239,159,39,0.6); }
.salle-online-dot.grey   { background: rgba(255,255,255,0.25); }
.salle-avatar.flash-done { animation: salle-flash-gold 1.2s ease both; }
@keyframes salle-flash-gold {
  0%,100% { box-shadow: 0 0 0 2px rgba(239,159,39,0.4); }
  35%     { box-shadow: 0 0 0 7px rgba(239,159,39,0.9), 0 0 24px rgba(239,159,39,0.7); }
}
.salle-avatar.user-self {
  box-shadow: 0 0 0 2px rgba(239,159,39,0.9), 0 0 14px rgba(239,159,39,0.35) !important;
}
.salle-status-ico {
  position: absolute; top: -3px; right: -4px;
  color: rgba(255,255,255,0.8);
  filter: drop-shadow(0 0 3px rgba(0,0,0,0.9));
}
.salle-pseudo {
  font-family: 'Inter', sans-serif;
  font-size: 9px; color: rgba(255,255,255,0.42);
  letter-spacing: .04em; text-align: center;
  max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Activity feed */
.salle-feed {
  height: 40px; flex-shrink: 0;
  background: rgba(0,0,0,0.28);
  border-top: 1px solid rgba(127,119,221,0.08);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0 16px;
}
.salle-feed-msg {
  font-family: 'Inter', sans-serif;
  font-size: 11px; color: rgba(255,255,255,0.55);
  font-style: italic; text-align: center;
  opacity: 0; transform: translateX(40px);
  transition: opacity .32s ease, transform .32s ease;
  pointer-events: none;
}
.salle-feed-msg.salle-slide-in { opacity: 1; transform: translateX(0); }

/* Join/leave button */
.salle-btn-wrap { padding: 8px 16px 10px; flex-shrink: 0; }
.salle-join-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%); color: white; border: none; border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: .02em;
  transition: background .22s, color .22s;
}
.salle-join-btn.leaving {
  background: rgba(216,90,48,0.1); color: #F0997B;
  border: 1px solid rgba(216,90,48,0.28);
}

/* Modals */
.salle-modal {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; backdrop-filter: blur(5px);
}
.salle-modal.hidden { display: none; }
.salle-modal-box {
  background: #12102E;
  border: 1px solid rgba(127,119,221,0.3);
  border-radius: 16px; padding: 24px 20px 20px;
  width: 260px; max-width: 90vw;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  position: relative;
}
.salle-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none;
  color: rgba(255,255,255,0.4); font-size: 22px; cursor: pointer; line-height: 1;
}
.salle-modal-title {
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 700;
  color: rgba(255,255,255,0.88); text-align: center;
}

/* Form elements */
.sv-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(127,119,221,0.3);
  border-radius: 8px; padding: 10px 12px;
  color: white; font-family: 'Inter', sans-serif;
  font-size: 14px; outline: none;
}
.sv-input::placeholder { color: rgba(255,255,255,0.25); }
.sv-mono { font-family: 'Orbitron', sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.sv-type-wrap { display: flex; gap: 8px; width: 100%; }
.sv-type-opt {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; cursor: pointer;
  color: rgba(255,255,255,0.45);
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  transition: all .18s;
}
.sv-type-opt.active {
  background: rgba(127,119,221,0.18);
  border-color: rgba(127,119,221,0.5); color: #fff;
}
.sv-code-wrap { width: 100%; }
.sv-code-wrap.hidden { display: none; }
.sv-btn-primary {
  width: 100%; padding: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  color: white; border: none; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer;
}
.sv-tab-hint {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: rgba(255,255,255,0.32);
  text-align: center; padding: 10px 0 14px; font-style: italic;
}
.sv-tab-join-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px;
  background: rgba(127,119,221,0.1);
  border: 1px dashed rgba(127,119,221,0.3);
  border-radius: 12px; margin-top: 6px;
  color: rgba(255,255,255,0.55);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .18s;
}
.sv-tab-join-btn:active { background: rgba(127,119,221,0.2); }
.sv-share-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(127,119,221,0.1);
  border: 1px solid rgba(127,119,221,0.25);
  display: grid; place-items: center;
  cursor: pointer; color: rgba(255,255,255,0.55); flex-shrink: 0;
  transition: background .18s;
}
.sv-share-btn:active { background: rgba(127,119,221,0.25); }

/* Amis tab */
.sv-amis-toprow {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px;
}
.sv-groupe-avatars {
  display: flex; flex-direction: row-reverse;
  margin-right: -4px;
}
.sv-groupe-avatar {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 700; color: white;
  border: 2px solid #0F0D28;
  margin-right: -6px;
  flex-shrink: 0;
}
.sv-amis-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 32px 20px;
  text-align: center;
}
.sv-amis-empty p {
  font-family: 'Inter', sans-serif;
  font-size: 13px; color: rgba(255,255,255,0.3);
  line-height: 1.6; margin: 0;
}
.sv-amis-empty.hidden { display: none; }

/* ═══════════════════════ CHAT PANEL ═══════════════════════ */
.sv-chat-fab {
  position: absolute; bottom: 76px; right: 16px;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; z-index: 20;
  box-shadow: 0 4px 16px rgba(217,70,239,0.4), 0 0 10px rgba(6,182,212,0.2);
  transition: transform .18s, box-shadow .18s;
}
.sv-chat-fab:active { transform: scale(0.92); }
.sv-chat-fab.hidden { display: none; }
.sv-chat-fab-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #ef4444; color: #fff;
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #0F0D28;
}
.sv-chat-fab-badge.hidden { display: none; }

.sv-chat-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(14,12,34,0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(127,119,221,0.2);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  max-height: 65vh; z-index: 30;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  animation: chat-slide-up 0.28s cubic-bezier(0.4,0,0.2,1);
}
.sv-chat-panel.hidden { display: none; }
@keyframes chat-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.sv-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(127,119,221,0.12);
  flex-shrink: 0;
}
.sv-chat-header-left {
  display: flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,0.55);
}
.sv-chat-title {
  font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 1px; color: rgba(255,255,255,0.7);
}
.sv-chat-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); cursor: pointer;
  transition: background .15s;
}
.sv-chat-close:active { background: rgba(255,255,255,0.12); }

.sv-chat-messages {
  flex: 1; overflow-y: auto; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 120px;
}
.sv-chat-messages::-webkit-scrollbar { width: 3px; }
.sv-chat-messages::-webkit-scrollbar-thumb { background: rgba(127,119,221,0.3); border-radius: 2px; }

.sv-chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.sv-chat-msg.mine { flex-direction: row-reverse; }
.sv-chat-msg-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 700; color: #fff;
}
.sv-chat-bubble {
  max-width: 72%; padding: 8px 11px;
  border-radius: 14px 14px 14px 4px;
  background: rgba(127,119,221,0.12);
  border: 1px solid rgba(127,119,221,0.15);
}
.sv-chat-msg.mine .sv-chat-bubble {
  border-radius: 14px 14px 4px 14px;
  background: rgba(127,119,221,0.28);
  border-color: rgba(127,119,221,0.35);
}
.sv-chat-bubble-name {
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 600;
  color: rgba(127,119,221,0.8); margin-bottom: 3px;
}
.sv-chat-msg.mine .sv-chat-bubble-name { display: none; }
.sv-chat-bubble-text {
  font-family: 'Inter', sans-serif; font-size: 12px; color: rgba(255,255,255,0.85);
  line-height: 1.45; word-break: break-word; white-space: pre-wrap;
}
.sv-chat-bubble-file {
  display: flex; align-items: center; gap: 6px; margin-top: 5px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.05); border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.sv-chat-bubble-file-name {
  font-family: 'Inter', sans-serif; font-size: 11px; color: rgba(255,255,255,0.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px;
}
.sv-chat-time {
  font-family: 'Inter', sans-serif; font-size: 9px;
  color: rgba(255,255,255,0.2); flex-shrink: 0; padding-bottom: 2px;
}
.sv-chat-system {
  text-align: center;
  font-family: 'Inter', sans-serif; font-size: 10px;
  color: rgba(255,255,255,0.2); padding: 4px 0;
  font-style: italic;
}

.sv-chat-input-row {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(127,119,221,0.1);
  flex-shrink: 0;
}
.sv-chat-attach-btn {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: rgba(127,119,221,0.1); border: 1px solid rgba(127,119,221,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.45); cursor: pointer; transition: background .15s;
}
.sv-chat-attach-btn:active { background: rgba(127,119,221,0.25); }
.sv-chat-input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(127,119,221,0.2); border-radius: 14px;
  padding: 8px 12px; color: #fff; resize: none; overflow-y: hidden;
  font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.4;
  outline: none; min-height: 34px; max-height: 80px;
  transition: border-color .15s;
}
.sv-chat-input::placeholder { color: rgba(255,255,255,0.2); }
.sv-chat-input:focus { border-color: rgba(127,119,221,0.45); }
.sv-chat-send-btn {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; transition: transform .15s, opacity .15s;
}
.sv-chat-send-btn:active { transform: scale(0.9); }

/* ═══════════════════════════════════════════════════════════
   RÉVISION RPG — Design "game inventory" fantastique
   ───────────────────────────────────────────────────────────
   Structure CSS :
     .rev-progress-*      → barre de progression horizontale
     .rev-subject         → carte matière (couleur dynamique via inline style)
     .rev-subject-header  → en-tête cliquable (collapse/expand)
     .rev-subj-*          → éléments du header (checkbox, nom, badge, chevron)
     .rev-theme-badge     → badge "ARCANE / NATURE / FEU…"
     .rev-sep-ornament    → séparateur ✦ entre header et chapitres
     .rev-chapters        → zone chapitres (s'ouvre/ferme via max-height)
     .rev-chap-row        → ligne chapitre individuelle (mini-carte)
     .rev-chap-main       → contenu interne de la ligne (flex nowrap)
     .rev-chap-dur        → badge durée cliquable (révèle les champs H/MIN)
     .rev-chap-edit-area  → zone H/MIN dépliable (max-height 0 → 44px)
     .rev-add-chap-btn    → bouton "+ AJOUTER UN CHAPITRE" en pointillés
     .rev-forge-btn       → bouton principal "FORGER UNE NOUVELLE MATIERE"
     .rev-swipe-*         → swipe-to-delete (fond rouge, contenu au-dessus)
     .rev-empty-*         → état vide (ornement ✦, Cinzel, Rajdhani)
   ══════════════════════════════════════════════════════════ */
.rev-container { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 12px; }

/* Progress bar */
.rev-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 16px;
}
.rev-progress-left {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.rev-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.rev-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7F77DD, #c084fc);
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px #7F77DD, 0 0 20px rgba(127,119,221,0.4);
}
.rev-progress-right {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px; font-weight: 700;
  color: rgba(168,139,250,0.8);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Subject block */
.rev-subject {
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0;
}
.rev-subject-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 10px;
  user-select: none;
}
/* Bloc droit : nom + chevron + meta */
.rev-subj-name-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rev-subj-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  cursor: pointer;
}
.rev-subj-name-row .rev-subj-name {
  flex: 1;
  min-width: 0;
}
.rev-subj-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}
.rev-subj-cb {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(127,119,221,0.5);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  padding: 0;
  transition: border-color 0.15s, background 0.15s;
}
.rev-subj-cb svg { width: 13px; height: 13px; }
.rev-subj-cb.checked { color: #fff; }
.rev-subj-cb.partial { color: #fff; }

.rev-subj-name {
  flex: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.rev-subj-name:hover { opacity: 0.8; }
.rev-subj-count {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid;
  flex-shrink: 0;
}
.rev-theme-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rev-subj-chevron {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  padding: 0;
  transition: transform 0.22s;
}
.rev-subj-chevron.open { transform: rotate(180deg); }
.rev-subj-chevron svg { width: 14px; height: 14px; }
.rev-subj-menu {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.25);
  font-size: 18px; line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
}
.rev-subj-menu:hover { color: rgba(255,255,255,0.7); }
.rev-subj-menu-panel {
  display: flex; gap: 8px;
  padding: 8px 14px 10px;
}
.rev-subj-menu-panel.hidden { display: none; }
.rev-subj-menu-panel button {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rev-subj-menu-panel button:hover { background: rgba(255,255,255,0.1); color: #fff; }
.rev-subj-menu-panel button:last-child:hover { background: rgba(216,90,48,0.15); border-color: rgba(216,90,48,0.3); color: #F0997B; }

/* Separator ornament */
.rev-sep-ornament {
  position: relative;
  border-top: 1px solid;
  margin: 0 16px;
  text-align: center;
  line-height: 0;
}
.rev-sep-ornament span {
  display: inline-block;
  padding: 0 8px;
  font-size: 9px;
  position: relative;
  top: -5px;
}

/* Swipe-to-delete (revision) */
.rev-swipe-wrap {
  position: relative;
  overflow: hidden;
}
.rev-swipe-del {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 56px;
  background: #dc2626;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.rev-swipe-del:hover { background: #b91c1c; }
.rev-swipe-del:active { background: #991b1b; }
.rev-swipe-del svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 3; }
.rev-swipe-content {
  position: relative;
  z-index: 1;
  background: #0E0C25; /* opaque — cache la poubelle rouge jusqu'au swipe */
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
/* État coché : fond teinté mais TOUJOURS opaque */
.rev-chap-row.rev-chap-sel.rev-swipe-content {
  background: #131040 !important;
}

/* Chapters panel */
.rev-chapters {
  background: rgba(0,0,0,0.3);
  overflow: hidden;
  max-height: 2000px;
  transition: max-height 0.28s ease;
  padding: 8px 0;
}
.rev-chapters.rev-collapsed { max-height: 0; padding: 0; }

/* Chapter row */
.rev-chap-row {
  display: flex;
  flex-direction: column;
  margin: 4px 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rev-chap-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 11px 14px;
}
.rev-chap-dur {
  display: none; /* masqué — remplacé par la zone d'édition dépliable */
}
.rev-chap-edit-area {
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease, padding 200ms ease;
  padding: 0 20px;
}
.rev-chap-row.rev-chap-editing .rev-chap-edit-area {
  max-height: 44px;
  padding: 0 20px 10px;
}
.rev-chap-cb {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 2px solid rgba(127,119,221,0.4);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  padding: 0;
  transition: border-color 0.15s, background 0.15s;
}
.rev-chap-cb svg { width: 11px; height: 11px; }
.rev-chap-name {
  flex: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.85);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.rev-chap-name:hover { color: #fff; }
.rev-chap-time {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.rev-chap-del {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: #ef4444;
  padding: 0;
  opacity: 0.55;
  transition: opacity 0.15s;
}

/* ── Badge de maîtrise du chapitre (% de révisions) ── */
.rev-chap-mastery {
  flex-shrink: 0;
  font-family: 'Satoshi', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--mc, rgba(255,255,255,0.3));
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 2px 7px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: default;
}
.rev-chap-del:hover { opacity: 1; }
.rev-chap-del svg { width: 13px; height: 13px; stroke: #ef4444; stroke-width: 3; }

/* Add chapter button inside subject */
.rev-add-chap-wrap { padding: 0; }
.rev-add-chap-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: calc(100% - 20px);
  margin: 4px 10px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  white-space: nowrap;
  text-transform: uppercase;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.rev-add-chap-btn:hover {
  transform: translateY(-2px);
}

/* Forge button (add subject) — style identique au btn-primary */
.rev-add-subj-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding-bottom: 8px;
  margin-bottom: 0;
}
.rev-forge-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none;
  border-radius: 99px;
  padding: 18px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-align: center;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 4px 20px rgba(217,70,239,0.4),
    0 0 14px rgba(6,182,212,0.2);
  position: relative; overflow: hidden;
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease;
}
.rev-forge-btn::before {
  content: ''; position: absolute; top: 0; left: -75%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: left-shimmer 3s ease-in-out infinite;
  pointer-events: none; border-radius: inherit;
}
.rev-forge-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent 50%);
  border-radius: inherit; pointer-events: none;
}
.rev-forge-btn:hover { filter: brightness(1.08); }
.rev-forge-btn:active { transform: scale(0.97); filter: brightness(0.93); }

/* Import button — premium dark glass with gold accent */
.rev-import-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(145deg, rgba(18,10,40,0.85) 0%, rgba(30,16,60,0.9) 100%);
  border: 1.5px solid transparent;
  border-radius: 99px;
  padding: 16px 24px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(220,195,255,0.85);
  text-align: center;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform 120ms ease, box-shadow 120ms ease, color 120ms ease;
  background-clip: padding-box;
  box-shadow:
    0 0 0 1.5px rgba(180,130,255,0.35),
    0 4px 24px rgba(124,58,237,0.18),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
.rev-import-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(200,160,255,0.06) 50%, transparent 70%);
  animation: left-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
.rev-import-btn:hover {
  color: rgba(255,230,255,1);
  box-shadow:
    0 0 0 1.5px rgba(200,160,255,0.6),
    0 6px 32px rgba(124,58,237,0.3),
    inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.rev-import-btn:active { transform: scale(0.97); }

/* Rayon header — RPG title for RÉVISION */
.rayon-title-row .rayon-title[data-rayon="RÉVISION"],
.rayon-rev-title {
  font-family: 'Cinzel', serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.2em;
  color: #A89FF0;
}

/* Inline input (shared for subject + chapter) */
.rev-inline-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(127,119,221,0.08);
  border: 1px solid rgba(127,119,221,0.25);
  border-radius: 10px;
  margin-top: 6px;
}
.rev-inline-input.hidden { display: none; }
.rev-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #fff);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  min-width: 0;
}
.rev-input::placeholder { color: rgba(255,255,255,0.3); }
.rev-input-ok, .rev-input-cancel {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.rev-input-ok { background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%); color: #fff; }
.rev-input-ok:hover { filter: brightness(1.1); color: #fff; }
.rev-input-cancel { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }
.rev-input-cancel:hover { background: rgba(248,113,113,0.2); color: #f87171; }

/* Drag handles */
.rev-drag-handle {
  cursor: grab; color: rgba(255,255,255,0.2);
  font-size: 14px; padding: 0 2px; flex-shrink: 0;
  user-select: none;
}
.rev-drag-handle:active { cursor: grabbing; }
.rev-dragging { opacity: 0.4; }
.rev-drag-over {
  border-top: 2px solid var(--purple-l) !important;
}

/* Préparation drag wrapper */
.prep-drag-item { display: flex; align-items: center; gap: 4px; }
.prep-drag-item > .quest-card { flex: 1; min-width: 0; }

/* Inline name edit input */
.rev-name-input {
  background: rgba(127,119,221,0.12);
  border: 1px solid rgba(127,119,221,0.4);
  border-radius: 6px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  outline: none;
  width: 100%;
  min-width: 80px;
}
.rev-chap-name .rev-name-input {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
}
.rev-subj-name { cursor: pointer; }
.rev-subj-name:hover { opacity: 0.75; }
.rev-chap-name { cursor: pointer; flex: 1; }
.rev-chap-name:hover { color: var(--purple-l); }

/* Empty state */
.rev-empty-state {
  padding: 48px 24px;
  text-align: center;
}
.rev-empty-ornament {
  font-size: 20px;
  color: rgba(127,119,221,0.2);
  letter-spacing: 12px;
  margin-bottom: 20px;
}
.rev-empty-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 16px; font-weight: 700;
  color: rgba(255,255,255,0.3);
}
.rev-empty-sub {
  font-family: 'Inter', sans-serif;
  font-size: 13px; color: rgba(255,255,255,0.2);
  line-height: 1.6; margin-top: 10px;
  max-width: 260px; margin-left: auto; margin-right: auto;
}

/* Light theme overrides */
body.light-theme .rev-subj-name { color: #fff; }
body.light-theme .rev-chap-name { color: rgba(255,255,255,0.85); }
body.light-theme .rev-swipe-content { background: #08071A; }
body.light-theme .rev-forge-btn { color: #A89FF0; }

/* ─── Swipe-to-delete (quest shop / agenda — event delegation) ─── */
.qswipe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  /* Definitive iOS Safari clip fix — clip-path is hardware-accelerated and always respected */
  clip-path: inset(0 round 18px);
  transform: translateZ(0); /* force GPU layer so clip-path applies */
  -webkit-transform: translateZ(0);
}
.qswipe-del {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 82px;
  background: #dc2626;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  border-radius: 0 18px 18px 0;
  /* HIDDEN by default — only revealed when user actively swipes (JS adds .qswipe-swiping) */
  visibility: hidden;
  pointer-events: none;
}
.qswipe-wrap.qswipe-swiping .qswipe-del {
  visibility: visible;
  pointer-events: all;
}
.qswipe-del:hover { background: #b91c1c; }
.qswipe-del:active { background: #991b1b; }
.qswipe-del svg { width: 18px; height: 18px; stroke: #fff; flex-shrink: 0; }
.qswipe-content {
  position: relative;
  z-index: 1;
  background: #100d28;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  border-radius: 18px;
}
.qswipe-content.agenda-editable-item {
  background: #0e0b24; /* base; overridden by color state classes below */
}
.qswipe-content.agenda-editable-item.aei-upcoming {
  background: rgba(34,197,94,0.07) !important;
}
.qswipe-content.agenda-editable-item.aei-overdue {
  background: rgba(239,68,68,0.07) !important;
}
.qswipe-content.agenda-editable-item.aei-selected {
  background: rgba(139,92,246,0.10) !important;
}
.qswipe-content.agenda-editable-item.aei-today {
  background: #0e0b24 !important;
}
body.light-theme .qswipe-content { background: #f5f3ff; }
body.light-theme .qswipe-content.agenda-editable-item { background: #ede9fe; }
body.light-theme .qswipe-content.agenda-editable-item.aei-upcoming { background: rgba(34,197,94,0.10) !important; }
body.light-theme .qswipe-content.agenda-editable-item.aei-overdue  { background: rgba(239,68,68,0.10) !important; }
body.light-theme .qswipe-content.agenda-editable-item.aei-selected { background: rgba(139,92,246,0.12) !important; }
body.light-theme .qswipe-content.agenda-editable-item.aei-today    { background: #f0eeff !important; }
body.light-theme .rev-add-chap-btn:hover { color: #6c5ce7; }
body.light-theme .rev-inline-input { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.2); }
body.light-theme .rev-input { color: #1e1030; }
body.light-theme .rev-input::placeholder { color: rgba(30,16,48,0.35); }

/* ═══════════════════════ VITALITÉ — NOUVEAU SYSTÈME ═══════════════════ */

/* Barre d'énergie */
.vit-energy-block {
  background: rgba(29,158,117,0.1);
  border: 1px solid rgba(29,158,117,0.25);
  border-radius: 14px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 4px;
}
.vit-energy-header {
  display: flex; align-items: center; justify-content: space-between;
}
.vit-energy-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  color: #1D9E75;
  letter-spacing: 0.3px;
}
.vit-energy-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px; font-weight: 700;
  color: #1D9E75;
}
.vit-ebar-track {
  height: 8px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.vit-ebar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #1D9E75, #5DCAA5);
  transition: width 0.4s ease;
  position: relative; overflow: hidden;
}
.vit-ebar-fill::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: bar-shimmer 3s ease-in-out infinite;
}
@keyframes bar-shimmer {
  0%   { left: -100%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}
.vit-sage-msg {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-style: italic;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

/* ═══════════════════════ VITALITÉ — GALAXIE ════════════════════════ */

/* Barre énergie compacte */
.vit-energy-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 14px;
}
.vit-strip-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35); flex-shrink: 0;
}
.vit-strip-track {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px; overflow: hidden;
}
.vit-strip-fill {
  height: 100%;
  background: linear-gradient(90deg, #7F77DD, #d946ef, #06b6d4);
  border-radius: 2px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(217,70,239,0.5);
}
.vit-strip-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px; font-weight: 700;
  color: #d946ef; flex-shrink: 0;
}
.vit-strip-max { font-size: 9px; color: rgba(255,255,255,0.3); }

/* Grille galaxie */
.vit-galaxy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 10px;
  padding: 8px 4px 16px;
  position: relative;
}

/* Planète */
.vit-planet {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; position: relative;
  user-select: none;
  animation: vit-float 4s ease-in-out infinite;
}
.vit-planet:nth-child(2) { animation-delay: 0.6s; }
.vit-planet:nth-child(3) { animation-delay: 1.2s; }
.vit-planet:nth-child(4) { animation-delay: 1.8s; }
.vit-planet:nth-child(5) { animation-delay: 2.4s; }
.vit-planet:nth-child(6) { animation-delay: 3.0s; }
.vit-planet:nth-child(7) { animation-delay: 0.9s; }

@keyframes vit-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* Halo extérieur */
.vit-planet-halo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -68%);
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--planet-glow, rgba(127,119,221,0.3));
  filter: blur(20px);
  opacity: 0.35;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.vit-planet-active .vit-planet-halo {
  opacity: 0.7;
  transform: translate(-50%, -68%) scale(1.3);
}

/* Orbe */
.vit-planet-orb {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--planet-bg, rgba(127,119,221,0.1));
  border: 2px solid var(--planet-color, #7F77DD);
  box-shadow:
    0 0 18px var(--planet-glow, rgba(127,119,221,0.4)),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -2px 8px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.vit-planet:active .vit-planet-orb { transform: scale(0.93); }
.vit-planet-active .vit-planet-orb {
  box-shadow:
    0 0 30px var(--planet-glow, rgba(127,119,221,0.6)),
    0 0 60px var(--planet-glow, rgba(127,119,221,0.2)),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 8px rgba(0,0,0,0.2);
  filter: brightness(1.2);
}

/* Icône */
.vit-planet-icon {
  color: var(--planet-color, #7F77DD);
  display: flex; align-items: center; justify-content: center;
}
.vit-planet-icon svg { width: 26px; height: 26px; stroke: var(--planet-color, #7F77DD); }
.vit-planet-active .vit-planet-icon svg { filter: drop-shadow(0 0 6px var(--planet-color)); }

/* Check overlay */
.vit-planet-check {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
}
.vit-planet-check svg { width: 26px; height: 26px; stroke: var(--planet-color); filter: drop-shadow(0 0 4px var(--planet-color)); }

/* Nom */
.vit-planet-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  text-align: center;
  transition: color 0.2s;
}
.vit-planet-active .vit-planet-label {
  color: var(--planet-color);
  text-shadow: 0 0 10px var(--planet-glow);
}

/* Badge énergie blanc */
.vit-planet-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: 'Orbitron', sans-serif;
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}
.vit-planet-badge svg { width: 10px; height: 10px; fill: rgba(255,255,255,0.65); }

/* Flash au clic */
.vit-planet.vit-flash .vit-planet-orb { animation: vit-planet-flash 0.5s ease; }
@keyframes vit-planet-flash {
  0%   { transform: scale(1.15); filter: brightness(1.8); }
  100% { transform: scale(1);    filter: brightness(1.2); }
}

/* Light theme */
body.light-theme .vit-planet-label { color: rgba(0,0,0,0.4); }
body.light-theme .vit-planet-active .vit-planet-label { color: var(--planet-color); }

/* ═══════════════════════ MICRO-INTERACTIONS ════════════════════════ */

/* Flash vert quand on coche une quête */
@keyframes quest-check-flash {
  0%   { box-shadow: 0 0 0 0 rgba(29,158,117,0.5), inset 0 0 24px rgba(29,158,117,0.25); }
  60%  { box-shadow: 0 0 0 6px rgba(29,158,117,0), inset 0 0 0 rgba(29,158,117,0); }
  100% { box-shadow: none; }
}
.quest-card.quest-check-anim { animation: quest-check-flash 0.35s ease forwards; }

/* Scale pièces quand on gagne */
@keyframes coin-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.coin-pop-anim { animation: coin-pop 0.22s ease; }

/* Stagger entrée des cartes du plan */
@keyframes plan-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plan-card-stagger { animation: plan-card-in 0.3s ease both; }

/* Boutons secondaires */
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(127,119,221,0.3);
  color: #A89FF0;
  border-radius: var(--r-lg);
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-secondary:hover {
  border-color: rgba(127,119,221,0.6);
  background: rgba(127,119,221,0.1);
  color: var(--text);
}

/* Boutons destructifs */
.btn-destructive {
  background: rgba(216,90,48,0.08);
  border: 1px solid rgba(216,90,48,0.2);
  color: rgba(216,90,48,0.8);
  transition: all 0.15s ease;
}
.btn-destructive:hover {
  background: rgba(216,90,48,0.18);
  border-color: rgba(216,90,48,0.45);
  color: #E8633A;
}

/* ════════════════════════════════════════════════════════════
   AVATAR SECTION — Basket popup
════════════════════════════════════════════════════════════ */
.bpc-avatar-section {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(127,119,221,0.04);
}
.bpc-av-figure { flex-shrink: 0; width: 72px; height: 128px; }
.bpc-av-figure svg { width: 100%; height: 100%; }
.bpc-av-info { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.bpc-av-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 700;
  color: var(--text); text-transform: uppercase; letter-spacing: 0.06em;
}
.bpc-av-level-row { display: flex; align-items: center; gap: 6px; }
.bpc-av-level-lbl { font-size: 0.6rem; color: var(--text3); white-space: nowrap; }
.bpc-av-xp-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.1); }
.bpc-av-xp-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7c3aed, #60a5fa); transition: width 0.4s; }
.bpc-av-ebar-row { display: flex; align-items: center; gap: 5px; }
.bpc-av-ebar-track { flex: 1; height: 5px; border-radius: 5px; background: rgba(255,255,255,0.1); }
.bpc-av-ebar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #4ade80, #22c55e); transition: width 0.4s; }
.bpc-av-ebar-val { font-size: 0.65rem; font-weight: 700; color: #4ade80; }
.bpc-av-stat-row { display: flex; gap: 7px; }
.bpc-av-stat {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 4px 9px;
  font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.9);
}

body.light-theme .bpc-avatar-section { background: rgba(124,58,237,0.04); border-color: rgba(124,58,237,0.1); }
body.light-theme .bpc-av-stat { background: rgba(255,255,255,0.7); border-color: rgba(124,58,237,0.15); color: #1e1b4b; }
body.light-theme .bpc-av-ebar-track, body.light-theme .bpc-av-xp-bar { background: rgba(0,0,0,0.07); }

/* ─── Energy exhaustion banner ─── */
/* energy-block-banner shares .shop-blocked-msg cockpit style */
.energy-block-banner { margin: 6px 10px 8px; }
.qcard-checkbox.energy-blocked { opacity: 0.35; pointer-events: none; }

/* ─── Draggable basket popup ─── */
.basket-popup-card {
  touch-action: none;
  user-select: none;
}
.bpc-drag-zone {
  height: 28px; cursor: grab; display: flex; align-items: center; justify-content: center;
  margin: -10px -18px 0; padding: 0 18px;
  flex-shrink: 0;
}
.bpc-drag-zone:active { cursor: grabbing; }
.bpc-drag-knob {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════
   AGENDA TOP ACTIONS
═══════════════════════════════════════ */
.agenda-top-actions {
  display: flex; gap: 10px; margin-bottom: 2px;
}
.agenda-top-actions .btn-add-agenda-top { flex: 1; margin-bottom: 0 !important; }
.btn-import-ics {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 18px;
  background: rgba(127,119,221,0.12);
  border: 1px solid rgba(127,119,221,0.3);
  border-radius: 14px;
  color: var(--purple-l);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.btn-import-ics:hover { background: rgba(127,119,221,0.22); border-color: rgba(127,119,221,0.5); }
.btn-import-ics svg { width: 15px; height: 15px; stroke: var(--purple-l); flex-shrink: 0; }
body.light-theme .btn-import-ics { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.25); color: #5b21b6; }
body.light-theme .btn-import-ics svg { stroke: #5b21b6; }

/* ═══════════════════════════════════════
   ICS IMPORT MODAL
═══════════════════════════════════════ */
.ics-import-overlay {
  position: absolute; inset: 0;
  background: rgba(8,7,26,0.75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  z-index: 960;
  display: flex; align-items: flex-end; justify-content: center;
}
.ics-import-overlay.hidden { display: none; }
.ics-import-card {
  width: 100%; max-height: 88vh;
  background: #110e2a;
  border: 1px solid rgba(127,119,221,0.2); border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 0 20px 32px;
  display: flex; flex-direction: column; gap: 0;
  overflow-y: auto;
  animation: slide-up 0.3s ease;
  color: #ffffff !important;
}
.ics-import-card,
.ics-import-card * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ════ Nouvelle modale d'import (ics2) — scopée pour ne rien casser ════ */
#ics-import-overlay .ics2-head { display:flex; align-items:center; gap:13px; padding:4px 0 0; }
#ics-import-overlay .ics2-ic {
  width:40px; height:40px; border-radius:12px; flex:none; display:grid; place-items:center;
  background:rgba(167,139,250,.14); border:1px solid rgba(167,139,250,.3); color:#c4b5fd !important;
}
#ics-import-overlay .ics2-ic svg { width:20px; height:20px; }
#ics-import-overlay .ics2-title {
  flex:1; font-family:"Clash Display",sans-serif; font-weight:600; font-size:20px;
  color:#fff !important; -webkit-text-fill-color:#fff !important; text-transform:none;
}
#ics-import-overlay .ics2-close {
  width:36px; height:36px; border-radius:50%; flex:none; display:grid; place-items:center; cursor:pointer;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.10); color:#b3a9d6 !important; transition:.15s;
}
#ics-import-overlay .ics2-close:hover { color:#fff !important; background:rgba(255,255,255,.1); }
#ics-import-overlay .ics2-rule { height:1px; background:rgba(255,255,255,.07); margin:18px 0 20px; }

#ics-import-overlay .ics2-drop {
  border:1.5px dashed rgba(196,181,253,.4); border-radius:18px; padding:30px 20px; text-align:center; cursor:pointer;
  background:rgba(167,139,250,.05); transition:.18s;
}
#ics-import-overlay .ics2-drop:hover,
#ics-import-overlay .ics2-drop.over { background:rgba(167,139,250,.1); border-color:#c4b5fd; }
#ics-import-overlay .ics2-big {
  width:52px; height:52px; border-radius:15px; margin:0 auto 14px; display:grid; place-items:center;
  background:linear-gradient(150deg,rgba(167,139,250,.25),rgba(214,90,214,.18)); border:1px solid rgba(196,181,253,.35); color:#c4b5fd !important;
}
#ics-import-overlay .ics2-big svg { width:26px; height:26px; }
#ics-import-overlay .ics2-t { font-weight:600; font-size:15.5px; color:#fff !important; -webkit-text-fill-color:#fff !important; }
#ics-import-overlay .ics2-s { font-size:13px; color:#b3a9d6 !important; -webkit-text-fill-color:#b3a9d6 !important; margin-top:5px; }
#ics-import-overlay .ics2-tag {
  display:inline-block; margin-top:12px; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:#7d749e !important; -webkit-text-fill-color:#7d749e !important;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); padding:4px 10px; border-radius:20px;
}
#ics-import-overlay .ics2-chosen { display:none; align-items:center; gap:12px; justify-content:center; }
#ics-import-overlay .ics2-chosen.show { display:flex; }
#ics-import-overlay .ics2-fi {
  width:40px; height:40px; border-radius:11px; flex:none; display:grid; place-items:center;
  background:rgba(84,214,160,.14); border:1px solid rgba(84,214,160,.4); color:#54d6a0 !important;
}
#ics-import-overlay .ics2-fi svg { width:20px; height:20px; }
#ics-import-overlay .ics2-nm { font-weight:600; color:#fff !important; -webkit-text-fill-color:#fff !important; font-size:14.5px; text-align:left; }
#ics-import-overlay .ics2-nm small { display:block; color:#b3a9d6 !important; -webkit-text-fill-color:#b3a9d6 !important; font-weight:500; font-size:12px; margin-top:2px; }

#ics-import-overlay .ics2-or { display:flex; align-items:center; gap:14px; margin:22px 2px; }
#ics-import-overlay .ics2-or::before,
#ics-import-overlay .ics2-or::after { content:""; flex:1; height:1px; background:rgba(255,255,255,.07); }
#ics-import-overlay .ics2-or span { font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#7d749e !important; -webkit-text-fill-color:#7d749e !important; }

#ics-import-overlay .ics2-urlrow { display:flex; gap:12px; }
#ics-import-overlay .ics2-urlinput {
  flex:1; min-width:0; padding:15px 18px; border-radius:14px; font-family:"Satoshi",sans-serif; font-size:15px;
  color:#fff !important; -webkit-text-fill-color:#fff !important;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.10); outline:none; transition:.15s;
}
#ics-import-overlay .ics2-urlinput::placeholder { color:#7d749e !important; -webkit-text-fill-color:#7d749e !important; }
#ics-import-overlay .ics2-urlinput:focus { border-color:rgba(196,181,253,.5); background:rgba(255,255,255,.06); }
#ics-import-overlay .ics2-charger {
  display:flex; align-items:center; gap:9px; padding:14px 24px; border-radius:14px; cursor:pointer; border:none; flex:none;
  color:#fff !important; -webkit-text-fill-color:#fff !important; font-family:"Clash Display",sans-serif; font-weight:600; font-size:15px;
  background:linear-gradient(105deg,#6d5dfc,#d65ad6); box-shadow:0 12px 30px -10px rgba(150,70,230,.8); transition:.18s;
}
#ics-import-overlay .ics2-charger:hover { transform:translateY(-1px); }
#ics-import-overlay .ics2-charger svg { width:17px; height:17px; }

#ics-import-overlay .ics2-help { margin-top:16px; display:flex; gap:10px; align-items:flex-start; padding:13px 15px; border-radius:13px; background:rgba(90,214,224,.06); border:1px solid rgba(90,214,224,.18); }
#ics-import-overlay .ics2-help svg { width:16px; height:16px; color:#5ad6e0 !important; flex:none; margin-top:1px; }
#ics-import-overlay .ics2-help p { font-size:12.5px; line-height:1.5; color:#b3a9d6 !important; -webkit-text-fill-color:#b3a9d6 !important; }
#ics-import-overlay .ics2-help b { color:#f3f0ff !important; -webkit-text-fill-color:#f3f0ff !important; font-weight:600; }
.ics-import-handle {
  display: flex; justify-content: center;
  padding: 12px 0 8px;
  flex-shrink: 0;
}
.ics-import-knob {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,0.2);
}
.ics-import-header {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 16px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.88rem; font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.ics-import-header svg { width: 20px; height: 20px; stroke: var(--purple-l); flex-shrink: 0; }
.ics-import-header span { flex: 1; }
.ics-import-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s;
}
.ics-import-close svg { width: 14px; height: 14px; stroke: #fff; }
.ics-import-close:hover { background: rgba(255,255,255,0.2); }
.ics-tabs {
  display: flex; gap: 8px;
  padding: 16px 0 0; flex-shrink: 0;
}
.ics-tab {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: rgba(255,255,255,0.7) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.7) !important;
  font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.ics-tab svg { width: 15px; height: 15px; flex-shrink: 0; stroke: currentColor; }
.ics-tab.active {
  background: rgba(127,119,221,0.25);
  border-color: rgba(127,119,221,0.6);
  color: #c4bfff !important;
  -webkit-text-fill-color: #c4bfff !important;
}
.ics-panel { padding-top: 16px; }
.ics-panel.hidden { display: none; }
.ics-drop-zone {
  border: 1.5px dashed rgba(127,119,221,0.35);
  border-radius: 20px;
  padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  cursor: pointer; text-align: center;
  transition: all 0.25s;
  background: rgba(127,119,221,0.04);
  position: relative; overflow: hidden;
}
.ics-drop-zone::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(127,119,221,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.ics-drop-zone:hover, .ics-drop-zone.drag-over {
  border-color: rgba(127,119,221,0.7);
  background: rgba(127,119,221,0.09);
  transform: scale(1.01);
}
.ics-drop-zone.drag-over { border-style: solid; }
.ics-drop-zone svg { width: 44px; height: 44px; stroke: #A89FF0; opacity: 0.9; }
.ics-drop-text { font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 600; color: rgba(255,255,255,0.75); line-height: 1.5; }
.ics-drop-text strong { color: #A89FF0; font-weight: 700; }
.ics-drop-text small { font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 400; color: rgba(255,255,255,0.35); }
.ics-url-form { display: flex; gap: 8px; }
.ics-url-input {
  flex: 1; padding: 11px 14px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px; color: #fff; font-family: 'Inter', sans-serif; font-size: 0.8rem;
}
.ics-url-input::placeholder { color: rgba(255,255,255,0.3); }
.ics-url-input:focus { outline: none; border-color: rgba(127,119,221,0.6); }
.ics-fetch-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  border: none; border-radius: 12px; color: #fff; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  white-space: nowrap; transition: opacity 0.15s;
}
.ics-fetch-btn:hover { opacity: 0.85; }
.ics-fetch-btn svg { width: 14px; height: 14px; stroke: #fff; }
.ics-status { font-family: 'Inter', sans-serif; font-size: 0.78rem; padding: 12px 14px; border-radius: 12px; margin-top: 14px; line-height: 1.5; }
.ics-status-loading { background: rgba(127,119,221,0.1); border: 1px solid rgba(127,119,221,0.3); color: var(--purple-l); }
.ics-status-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
/* Preview */
.ics-preview { margin-top: 16px; }
.ics-preview.hidden { display: none; }
.ics-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.ics-preview-header > span { font-family: 'Inter', sans-serif; font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.ics-future-only { display: flex; align-items: center; gap: 6px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 0.72rem; color: rgba(255,255,255,0.5); }
.ics-preview-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.ics-preview-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.ics-preview-item input[type="checkbox"] { flex-shrink: 0; margin-top: 2px; accent-color: #60a5fa; }
.ics-ev-info { flex: 1; }
.ics-ev-name { font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; color: #fff; }
.ics-ev-meta { font-family: 'Inter', sans-serif; font-size: 0.68rem; color: rgba(255,255,255,0.5); margin-top: 3px; }
.ics-empty { font-family: 'Inter', sans-serif; font-size: 0.78rem; color: rgba(255,255,255,0.4); text-align: center; padding: 20px 0; }
.ics-import-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ics-confirm-btn { margin-top: 0 !important; font-size: 0.78rem !important; }
.ics-rev-import-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, #1A1640, #2A2060);
  border: 1.5px solid rgba(127,119,221,0.5);
  border-radius: var(--r-lg);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  color: #A89FF0; cursor: pointer;
  box-shadow: 0 0 16px rgba(127,119,221,0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ics-rev-import-btn:hover { border-color: #7F77DD; box-shadow: 0 0 24px rgba(127,119,221,0.3); }
.ics-cancel-btn {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-family: 'Inter', sans-serif; font-size: 0.75rem; cursor: pointer; padding: 6px;
  text-decoration: underline;
}
/* Écran confirmation matières Révision */
.ics-rev-confirm { display: flex; flex-direction: column; gap: 10px; }
.ics-rev-title {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Orbitron', sans-serif; font-size: 0.78rem; font-weight: 700;
  color: #A89FF0; letter-spacing: 0.06em;
}
.ics-rev-sub { font-family: 'Inter', sans-serif; font-size: 0.72rem; color: rgba(255,255,255,0.4); margin: 0; }
.ics-rev-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.ics-rev-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(127,119,221,0.07);
  border: 1px solid rgba(127,119,221,0.15);
  border-radius: 10px;
  transition: background 0.15s;
}
.ics-rev-item:hover { background: rgba(127,119,221,0.14); }
.ics-rev-item input[type="checkbox"] { accent-color: #7F77DD; width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.ics-rev-name {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.85); padding: 0;
}
.ics-rev-name:focus {
  border-bottom: 1px solid rgba(127,119,221,0.6);
  color: #fff;
}
.ics-rev-merge-btn {
  background: none; border: 1px solid rgba(127,119,221,0.25); border-radius: 6px;
  color: rgba(127,119,221,0.55); font-size: 13px; padding: 2px 7px; cursor: pointer;
  flex-shrink: 0; transition: all 0.15s; line-height: 1.4;
}
.ics-rev-merge-btn:hover, .ics-rev-item.merge-sel .ics-rev-merge-btn {
  background: rgba(127,119,221,0.2); border-color: #7F77DD; color: #A89FF0;
}
.ics-rev-item.merge-sel {
  background: rgba(127,119,221,0.18);
  border-color: rgba(127,119,221,0.5);
  box-shadow: 0 0 0 1px rgba(127,119,221,0.3);
}
/* Barre de fusion */
.ics-merge-bar {
  display: none; align-items: center; gap: 8px;
  padding: 8px 10px; margin-top: 6px;
  background: rgba(127,119,221,0.12);
  border: 1px solid rgba(127,119,221,0.35);
  border-radius: 10px;
}
.ics-merge-bar.visible { display: flex; }
.ics-merge-count {
  font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 600;
  color: rgba(168,159,240,0.8); white-space: nowrap; flex-shrink: 0;
}
.ics-merge-input {
  flex: 1; background: rgba(0,0,0,0.25); border: 1px solid rgba(127,119,221,0.3);
  border-radius: 6px; color: #fff; font-family: 'Rajdhani', sans-serif;
  font-size: 13px; font-weight: 600; padding: 5px 8px; outline: none;
}
.ics-merge-input:focus { border-color: #7F77DD; }
.ics-merge-confirm {
  background: linear-gradient(135deg, #7c3aed, #d946ef);
  border: none; border-radius: 6px; color: #fff;
  font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700;
  padding: 5px 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.ics-merge-cancel {
  background: none; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
  color: rgba(255,255,255,0.4); font-size: 13px; padding: 4px 8px;
  cursor: pointer; flex-shrink: 0; transition: all 0.15s;
}
.ics-merge-cancel:hover { border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.7); }

/* ════════════════════════════════════════════════════════════
   QUIZ — single-select + skip button
════════════════════════════════════════════════════════════ */
.quiz-skip-link {
  background: none; border: none;
  color: var(--text3); font-family: 'Inter', sans-serif;
  font-size: 0.75rem; cursor: pointer;
  text-decoration: underline; padding: 4px 0;
  align-self: center; opacity: 0.7;
  transition: opacity 0.15s;
}
.quiz-skip-link:hover { opacity: 1; }

/* SVG icon in result hero */
.result-profile-icon-svg {
  width: 56px; height: 56px;
  background: rgba(124,58,237,0.2);
  border: 1.5px solid rgba(96,165,250,0.4);
  border-radius: 16px;
  display: grid; place-items: center;
  color: var(--purple-l);
}
.result-profile-icon-svg svg { width: 30px; height: 30px; }
.result-profile-tagline {
  font-size: 0.8rem; color: var(--neon);
  font-style: italic; margin: 0;
}

/* pbr-icon as SVG */
.pbr-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  flex-shrink: 0; color: var(--purple-l);
}
.pbr-icon svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════════════════════════
   MENU — orange dot notification on Personas nav button
════════════════════════════════════════════════════════════ */
.menu-nav-item.menu-nav-dot::after {
  content: '';
  position: absolute; top: 8px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 6px rgba(249,115,22,0.8);
  animation: dot-pulse 1.8s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.75); }
}

/* ════════════════════════════════════════════════════════════
   MENU — Personas flip cards
════════════════════════════════════════════════════════════ */
.menu-persona-active-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(217,70,239,0.1); border: 1px solid rgba(217,70,239,0.3);
  border-radius: var(--r-sm); padding: 10px 12px;
}
.mpab-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  color: var(--neon);
  display: grid; place-items: center;
}
.mpab-icon svg { width: 18px; height: 18px; }
.menu-persona-active-banner strong {
  font-size: 0.82rem; color: var(--neon);
}
.mpab-tag { font-size: 0.72rem; color: var(--text3); }

.menu-personas-no-quiz {
  background: rgba(249,115,22,0.08); border: 1px solid rgba(249,115,22,0.25);
  border-radius: var(--r-sm); padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.menu-personas-no-quiz p {
  font-size: 0.78rem; color: var(--text2);
  margin: 0; text-align: center;
}

.pfc-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pfc-wrap {
  perspective: 900px; height: 170px; cursor: pointer;
}
.pfc-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.pfc-wrap.pfc-flipped .pfc-inner { transform: rotateY(180deg); }

.pfc-face, .pfc-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column;
  background: var(--card-bg); border: 1px solid var(--card-border);
  overflow: hidden;
}
.pfc-mine .pfc-face, .pfc-mine .pfc-back {
  border-color: rgba(217,70,239,0.5);
  background: rgba(217,70,239,0.07);
  box-shadow: 0 0 12px rgba(217,70,239,0.12);
}
.pfc-back { transform: rotateY(180deg); justify-content: flex-start; gap: 6px; }

.pfc-icon {
  width: 34px; height: 34px;
  background: rgba(124,58,237,0.2); border: 1px solid rgba(96,165,250,0.3);
  border-radius: 10px; display: grid; place-items: center;
  color: var(--purple-l); flex-shrink: 0;
}
.pfc-icon svg { width: 18px; height: 18px; }
.pfc-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.6rem; font-weight: 700;
  color: var(--text); margin-top: 6px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pfc-tagline {
  font-size: 0.68rem; color: var(--text2);
  line-height: 1.4; flex: 1;
  margin-top: 4px;
}
.pfc-you-badge {
  font-family: 'Orbitron', sans-serif; font-size: 0.5rem; font-weight: 700;
  color: var(--neon); background: rgba(217,70,239,0.2);
  border: 1px solid rgba(217,70,239,0.4); border-radius: 4px;
  padding: 2px 5px; letter-spacing: 0.05em;
  align-self: flex-start;
}
.pfc-hint {
  font-size: 0.58rem; color: var(--text3); text-align: center;
  margin-top: auto; padding-top: 4px;
  opacity: 0.6;
}

.pfc-back-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.58rem; font-weight: 700;
  color: var(--purple-l); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 4px;
}
.pfc-section-label {
  font-size: 0.58rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.pfc-back-text {
  font-size: 0.65rem; color: var(--text2); line-height: 1.4;
  margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.pfc-tags {
  display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto;
}
.pfc-tag {
  font-size: 0.55rem; color: var(--purple-l);
  background: rgba(124,58,237,0.15); border: 1px solid rgba(96,165,250,0.2);
  border-radius: 4px; padding: 2px 5px;
}

/* btn-retake-quiz with icon */
.btn-retake-quiz {
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ════════════════════════════════════════════════════════════
   QUEST PATH — Conquest RPG (Clash × Candy Crush × Zelda)
════════════════════════════════════════════════════════════ */


/* War zone dividers — clean pill style */
.qp-war-divider {
  position:absolute; left:0; right:0; pointer-events:none; z-index:3;
  display:flex; align-items:center; padding:0 12px;
}
.qp-wd-line {
  flex:1; height:1px;
  background:linear-gradient(90deg, transparent 0%, var(--wdc) 50%, transparent 100%);
  opacity:.3;
}
.qp-wd-banner {
  display:flex; align-items:center; gap:5px;
  padding:4px 14px; margin:0 10px;
  border:1px solid var(--wdc); border-radius:20px;
  background:rgba(4,2,14,.88); backdrop-filter:blur(8px);
  font-family:'Orbitron',sans-serif; font-size:.38rem; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:var(--wdc);
  box-shadow:0 0 12px rgba(0,0,0,.6);
  white-space:nowrap;
}
.qp-wd-banner svg { width:8px; height:8px; flex-shrink:0; opacity:.85; }

/* Vignette */
.qp-vignette {
  position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse at center,transparent 35%,rgba(3,2,15,.65) 100%);
}

/* Fog of war */
.qp-fog-war {
  position:absolute; left:0; right:0; top:0;
  pointer-events:none; z-index:4;
}

/* 3-star Candy Crush completion */
.qpn-stars {
  display:flex; gap:3px; margin-bottom:2px;
  animation:stars-appear .5s cubic-bezier(.34,1.56,.64,1) both;
}
.qpn-stars svg { width:12px; height:12px; }
@keyframes stars-appear {
  from { transform:scale(0) rotate(-20deg); opacity:0; }
  to   { transform:scale(1) rotate(0deg);  opacity:1; }
}

/* Conquest rays (Clash/Zelda magic circle) behind active node */
.qpn-rays {
  position:absolute; width:110px; height:110px;
  left:50%; top:50%; transform:translate(-50%,-50%);
  border-radius:50%; pointer-events:none; z-index:-1;
  background:conic-gradient(
    transparent 0deg, rgba(251,191,36,.12) 15deg, transparent 30deg,
    transparent 60deg, rgba(251,191,36,.12) 75deg, transparent 90deg,
    transparent 120deg, rgba(251,191,36,.12) 135deg, transparent 150deg,
    transparent 180deg, rgba(251,191,36,.12) 195deg, transparent 210deg,
    transparent 240deg, rgba(251,191,36,.12) 255deg, transparent 270deg,
    transparent 300deg, rgba(251,191,36,.12) 315deg, transparent 330deg,
    transparent 360deg
  );
  animation:rays-spin 12s linear infinite;
}
@keyframes rays-spin { to { transform:translate(-50%,-50%) rotate(360deg); } }

/* Conquest flag above avatar */
.qpn-flag-wrap {
  display:flex; flex-direction:column; align-items:center;
  position:absolute; top:-36px; left:50%;
  transform:translateX(16px);
  pointer-events:none; z-index:10;
}
.qpn-flagpole {
  width:2px; height:22px;
  background:linear-gradient(to bottom,#fbbf24,#78350f);
  border-radius:1px;
}
.qpn-flagwave {
  position:absolute; top:0; left:2px;
  width:18px; height:10px;
  background:linear-gradient(135deg,#8b5cf6,#6d28d9);
  border-radius:0 3px 3px 0;
  transform-origin:left center;
  animation:flag-wave .9s ease-in-out infinite alternate;
  box-shadow:0 1px 4px rgba(0,0,0,.4);
}
@keyframes flag-wave {
  from { transform:skewY(-4deg) scaleX(.95); }
  to   { transform:skewY(4deg)  scaleX(1.05); }
}

/* ── Trophy (replaces chest) ── */
.qpn-chest-wrap { display:flex; flex-direction:column; align-items:center; gap:5px; }
.qpn-chest { position:relative; display:grid; place-items:center; width:60px; height:60px; overflow:visible; }
.qpn-chest svg { width:60px; height:60px; display:block; overflow:visible; }

/* ALL stages = blazing gold — trophy is always luminous */
.qpn-chest { z-index: 200; }
.qpn-chest.s0,
.qpn-chest.s1,
.qpn-chest.s2,
.qpn-chest.s3 { animation: trophy-shine 2s ease-in-out infinite; }
.qpn-chest.s4  { animation: trophy-blaze 1s ease-in-out infinite; cursor:pointer; }

@keyframes trophy-shine {
  0%,100% {
    filter: drop-shadow(0 0 12px rgba(253,224,71,.9))
            drop-shadow(0 0 24px rgba(251,191,36,.7))
            brightness(1.15);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(253,224,71,1))
            drop-shadow(0 0 40px rgba(251,191,36,.9))
            brightness(1.4);
  }
}
@keyframes trophy-blaze {
  0%,100% {
    filter: drop-shadow(0 0 24px rgba(253,224,71,1))
            drop-shadow(0 0 50px rgba(251,191,36,1))
            brightness(1.5) saturate(1.8);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(253,224,71,1))
            drop-shadow(0 0 70px rgba(251,191,36,1))
            brightness(1.8) saturate(2.2);
    transform: scale(1.08);
  }
}
/* Progress count under chest */
.qpn-progress { font-family:'Orbitron',sans-serif; font-size:.38rem; font-weight:700; letter-spacing:.06em; margin-top:-2px; color:rgba(255,255,255,.25); }
.qpn-progress.lit { color:#fbbf24; text-shadow:0 0 8px rgba(251,191,36,.5); }

/* Campfire flame — flicker on the flame group only */
.qp-flame-group {
  transform-origin:50% 95%;
  animation:campfire-flicker .4s ease-in-out infinite alternate;
}
@keyframes campfire-flicker {
  from { transform:scaleX(1)   scaleY(1);   filter:brightness(1); }
  to   { transform:scaleX(.84) scaleY(1.14);filter:brightness(1.35); }
}
/* Sparks rising */
.qp-spark { transform-box:fill-box; transform-origin:center; }
.qp-s1 { animation:spark-rise 1.3s ease-out infinite 0s; }
.qp-s2 { animation:spark-rise 1.0s ease-out infinite .5s; }
.qp-s3 { animation:spark-rise 1.6s ease-out infinite .95s; }
.qp-s4 { animation:spark-rise 1.1s ease-out infinite .25s; }
@keyframes spark-rise {
  0%   { transform:translate(0,0)     scale(1);   opacity:.95; }
  60%  { transform:translate(0,-9px)  scale(.7);  opacity:.6; }
  100% { transform:translate(0,-15px) scale(.1);  opacity:0; }
}

/* Camp de Base outer glow pulse */
.qp-base-orb {
  width:62px; height:62px; border-radius:50%;
  background:radial-gradient(circle at 38% 38%, rgba(124,58,237,.55), rgba(46,16,101,.85));
  border:3px solid rgba(139,92,246,.75);
  box-shadow:0 0 22px rgba(88,28,235,.55),0 0 44px rgba(88,28,235,.2),inset 0 0 14px rgba(88,28,235,.3);
  outline:2px solid rgba(139,92,246,.22); outline-offset:5px;
  display:grid; place-items:center; cursor:default;
  animation:base-pulse 3s ease-in-out infinite;
}
@keyframes base-pulse {
  0%,100%{ box-shadow:0 0 22px rgba(88,28,235,.55),0 0 44px rgba(88,28,235,.2),inset 0 0 14px rgba(88,28,235,.3); }
  50%    { box-shadow:0 0 32px rgba(88,28,235,.8), 0 0 60px rgba(88,28,235,.35),inset 0 0 20px rgba(88,28,235,.4); }
}
.qp-base-label {
  font-family:'Orbitron',sans-serif; font-size:.46rem; font-weight:800;
  letter-spacing:.12em; text-transform:uppercase;
  color:#a78bfa; text-shadow:0 0 10px rgba(139,92,246,.7);
  margin-top:2px;
}

/* Stone road path (base under gold) */
.qpmap-path-road {
  fill:none; stroke:rgba(30,20,60,.8);
  stroke-linecap:round;
  vector-effect:non-scaling-stroke;
}

/* Rotating decorative gems */
.qp-gem-deco {
  position:absolute; font-size:.9rem; color:rgba(96,165,250,.3);
  animation:gem-spin 9s linear infinite; pointer-events:none;
}
@keyframes gem-spin { to { transform:rotate(360deg); } }

/* Sage message bubble */
.qp-sage {
  position:absolute; left:50%; transform:translateX(-50%);
  background:rgba(28,14,56,.9);
  border:1px solid rgba(96,165,250,.35);
  border-radius:14px; padding:7px 13px;
  max-width:78%; backdrop-filter:blur(8px);
  box-shadow:0 4px 20px rgba(124,58,237,.3);
  animation:sage-float 4s ease-in-out infinite;
  pointer-events:none; z-index:8;
}
/* no bottom arrow — sage is pinned at top */
.qp-sage::after { display:none; }
.qp-sage-text {
  font-family:'Inter',sans-serif; font-size:.58rem; font-weight:500;
  color:rgba(255,255,255,.88); text-align:center; line-height:1.45;
  margin:0;
}
@keyframes sage-float {
  0%,100%{ transform:translateX(-50%) translateY(0); }
  50%    { transform:translateX(-50%) translateY(-5px); }
}


/* Quest number badge */
.qpn-badge {
  position:absolute; top:-5px; right:-5px;
  width:17px; height:17px; border-radius:50%;
  background:rgba(20,10,46,.97);
  border:1.5px solid rgba(96,165,250,.5);
  font-family:'Orbitron',sans-serif;
  font-size:.36rem; font-weight:800;
  color:rgba(96,165,250,.9);
  display:grid; place-items:center;
  z-index:3; pointer-events:none;
  box-shadow:0 0 6px rgba(124,58,237,.4);
}
.qpn-active .qpn-badge { border-color:#fbbf24; color:#fbbf24; box-shadow:0 0 8px rgba(251,191,36,.5); }
.qpn-done   .qpn-badge { border-color:rgba(251,191,36,.4); color:rgba(251,191,36,.55); }

/* Shine sweep on completed node */
.qpn-done .qpn-circle::before {
  content:''; position:absolute; inset:0; border-radius:50%;
  background:linear-gradient(115deg,transparent 20%,rgba(255,255,255,.22) 50%,transparent 80%);
  background-size:300% 100%;
  animation:node-shine 3.5s ease-in-out infinite;
  z-index:3; pointer-events:none;
}
@keyframes node-shine {
  0%,100%{ background-position:130% 0; opacity:0; }
  10%    { opacity:1; }
  60%    { background-position:-100% 0; opacity:0; }
}

/* Active node name glow */
.qpn-active .qpn-name { text-shadow:0 0 14px rgba(251,191,36,.6); }

/* Coin preview under future node */
.qpn-preview {
  font-family:'Inter',sans-serif; font-size:.48rem; font-weight:600;
  color:rgba(255,255,255,.18);
  display:flex; align-items:center; gap:2px;
  margin-top:-2px;
}
.qpn-preview svg { width:8px; height:8px; }

/* Progress count below treasure */
.qpn-progress {
  font-family:'Orbitron',sans-serif; font-size:.38rem; font-weight:700;
  letter-spacing:.06em; margin-top:-2px;
  color:rgba(255,255,255,.25);
}
.qpn-progress.lit { color:#fbbf24; text-shadow:0 0 8px rgba(251,191,36,.5); }

/* Start orb — larger */
.qpmap-start-orb { width:46px; height:46px; }
.qpmap-start-orb svg { width:20px; height:20px; }

/* Zone icon */
.qp-zone-icon { display:inline-flex; align-items:center; vertical-align:middle; margin-right:4px; }
.qp-zone-icon svg { width:8px; height:8px; }

/* Path shimmer on completed segments */
.qpmap-path-shimmer {
  fill:none; stroke:rgba(255,255,255,.28);
  stroke-width:6; stroke-linecap:round;
  stroke-dasharray:10 24;
  animation:shimmer-run 1.4s linear infinite;
  vector-effect:non-scaling-stroke;
}
@keyframes shimmer-run { to { stroke-dashoffset:-34; } }

/* Golden particle */
.qp-particle {
  position:absolute; pointer-events:none; z-index:50;
  width:7px; height:7px; border-radius:50%;
  background:radial-gradient(circle,#fef08a,#f59e0b);
  box-shadow:0 0 6px rgba(251,191,36,.8);
  animation:particle-fly var(--dur,0.9s) ease-out forwards;
}
@keyframes particle-fly {
  0%  { transform:translate(0,0) scale(1); opacity:1; }
  100%{ transform:translate(var(--tx,0px),var(--ty,-70px)) scale(0); opacity:0; }
}

/* ════════════════════════════════════════════════════════════
   QUEST PATH v2 — Clean RPG (dark space, 2 colors max)
════════════════════════════════════════════════════════════ */

/* Twinkle stars */
.qp2-twinkle {
  color: rgba(127,119,221,0.25);
  font-size: 10px;
  animation: qp2-twinkle 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes qp2-twinkle {
  0%,100% { opacity:0.1; transform:scale(1); }
  50%     { opacity:0.4; transform:scale(1.2); }
}

/* Shimmer on done segments — white, well-spaced */
.qp2-shimmer {
  stroke-dasharray: 8 90;
  stroke-dashoffset: 0;
  animation: qp2-shimmer-run 4s linear infinite;
}
@keyframes qp2-shimmer-run {
  to { stroke-dashoffset: -196; }
}

/* Active segment — white well-spaced dashes */
.qp2-active-seg {
  stroke-dasharray: 5 22;
  animation: qp2-active-dash 2s linear infinite;
}
@keyframes qp2-active-dash {
  to { stroke-dashoffset: -54; }
}

/* ── Traveling ray: glow halo + crisp streak ── */
.qp2-ray-glow {
  stroke-dasharray: 22 210;
  stroke-linecap: round;
  animation: qp2-ray-run 5s linear infinite;
}
.qp2-ray-core {
  stroke-dasharray: 8 224;
  stroke-linecap: round;
  stroke-dashoffset: -7;
  animation: qp2-ray-run 5s linear infinite;
}
@keyframes qp2-ray-run {
  to { stroke-dashoffset: -464; }
}

/* Treasure node */
.qp2-tresor {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  pointer-events: auto;
  z-index: 10;
  transition: opacity 0.6s;
}
.qp2-tresor-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(239,159,39,0.75);
}
.qp2-tresor-count {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  font-family: 'Inter', sans-serif;
}

/* Camp de base */
.qp2-camp {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  pointer-events: none;
  z-index: 5;
}
.qp2-camp-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

/* ── Anchor star (camp & trésor shared) ───────────────────── */
.qp2-anchor-star {
  position: relative;
  width: 62px; height: 62px;
  display: grid; place-items: center;
}
.qp2-anchor-aura {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  animation: qp2-anchor-pulse 3.2s ease-in-out infinite;
}
.qp2-star-white .qp2-anchor-aura {
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, transparent 68%);
}
.qp2-star-gold .qp2-anchor-aura {
  background: radial-gradient(circle, rgba(239,159,39,0.28) 0%, transparent 68%);
}
.qp2-anchor-ring1, .qp2-anchor-ring2 {
  position: absolute;
  border-radius: 50%;
  border-style: solid;
  border-width: 1px;
}
.qp2-anchor-ring1 {
  inset: 6px;
}
.qp2-anchor-ring2 {
  inset: 16px;
}
.qp2-star-white .qp2-anchor-ring1 { border-color: rgba(255,255,255,0.20); }
.qp2-star-white .qp2-anchor-ring2 { border-color: rgba(255,255,255,0.40); }
.qp2-star-gold  .qp2-anchor-ring1 { border-color: rgba(239,159,39,0.30); }
.qp2-star-gold  .qp2-anchor-ring2 { border-color: rgba(239,159,39,0.60); }
.qp2-anchor-core {
  position: relative;
  z-index: 1;
  font-size: 22px;
  line-height: 1;
  animation: qp2-anchor-pulse 3.2s ease-in-out infinite;
}
.qp2-star-white .qp2-anchor-core {
  color: #fff;
  text-shadow: 0 0 8px rgba(255,255,255,0.95), 0 0 22px rgba(255,255,255,0.55);
}
.qp2-star-gold .qp2-anchor-core {
  color: #EF9F27;
  text-shadow: 0 0 10px rgba(239,159,39,0.95), 0 0 26px rgba(239,159,39,0.6);
}
.qp2-tresor.done .qp2-star-gold .qp2-anchor-core {
  text-shadow: 0 0 14px rgba(239,159,39,1), 0 0 36px rgba(239,159,39,0.8), 0 0 60px rgba(239,159,39,0.4);
}
@keyframes qp2-anchor-pulse {
  0%,100% { opacity: 0.75; transform: scale(1); }
  50%     { opacity: 1;    transform: scale(1.12); }
}

/* Quest nodes */
.qp2-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  pointer-events: none;
  z-index: 5;
  animation: qp2-fadein 0.4s ease both;
}
@keyframes qp2-fadein {
  from { opacity:0; transform:translate(-50%,-50%) scale(0.85); }
  to   { opacity:1; transform:translate(-50%,-50%) scale(1); }
}
.qp2-node.active, .qp2-node.done { pointer-events: auto; }

.qp2-node-outer {
  position: relative;
  border-radius: 50%;
  border: 2px solid var(--nc, #7F77DD);
  display: grid; place-items: center;
  box-sizing: border-box;
  transition: box-shadow 0.3s;
}

/* ── Done node: crystalline solid fill ── */
.qp2-node.done .qp2-node-outer {
  background: color-mix(in srgb, var(--nc,#7F77DD) 28%, rgba(8,5,26,0.75)) !important;
  border: 2px solid var(--nc, #7F77DD) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--nc,#7F77DD) 35%, transparent),
    0 0 14px color-mix(in srgb, var(--nc,#7F77DD) 55%, transparent),
    0 0 32px color-mix(in srgb, var(--nc,#7F77DD) 22%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(0,0,0,0.3);
}
.qp2-node.done .qp2-node-inner {
  background: color-mix(in srgb, var(--nc,#7F77DD) 40%, rgba(0,0,0,0.5)) !important;
  backdrop-filter: none !important;
}

/* ── Active node: frosted glass, strong aura ── */
.qp2-node.active .qp2-node-outer {
  border: 2px solid rgba(255,255,255,0.32) !important;
  background: rgba(255,255,255,0.09) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--nc,#8B5CF6) 55%, transparent),
    0 0 0 5px color-mix(in srgb, var(--nc,#8B5CF6) 22%, transparent),
    0 0 0 9px color-mix(in srgb, var(--nc,#8B5CF6) 10%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 0 28px color-mix(in srgb, var(--nc,#8B5CF6) 45%, transparent) !important;
  animation: qp2-node-pulse 2.2s ease-in-out infinite !important;
}
.qp2-node.active .qp2-node-inner {
  background: transparent !important;
  backdrop-filter: none !important;
}

/* ── Future node ── */
.qp2-node.future .qp2-node-outer {
  background: rgba(255,255,255,0.05) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px dashed rgba(255,255,255,0.18) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--nc,#8B5CF6) 20%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.08);
  opacity: 0.5;
}
.qp2-node.future .qp2-node-inner {
  background: transparent !important;
}

@keyframes qp2-node-pulse {
  0%,100% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--nc,#8B5CF6) 55%, transparent),
      0 0 0 5px color-mix(in srgb, var(--nc,#8B5CF6) 18%, transparent),
      0 0 0 9px color-mix(in srgb, var(--nc,#8B5CF6) 8%, transparent),
      inset 0 1px 0 rgba(255,255,255,0.22),
      0 0 28px color-mix(in srgb, var(--nc,#8B5CF6) 45%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 2px color-mix(in srgb, var(--nc,#8B5CF6) 70%, transparent),
      0 0 0 7px color-mix(in srgb, var(--nc,#8B5CF6) 25%, transparent),
      0 0 0 13px color-mix(in srgb, var(--nc,#8B5CF6) 10%, transparent),
      inset 0 1px 0 rgba(255,255,255,0.28),
      0 0 44px color-mix(in srgb, var(--nc,#8B5CF6) 65%, transparent);
  }
}

.qp2-node-inner {
  border-radius: 50%;
  display: grid; place-items: center;
}

/* ── Orbit rings (active node) — placed inside qp2-node-outer with overflow:visible ── */
.qp2-orb-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1.5px solid transparent;
  pointer-events: none;
  box-sizing: border-box;
  transform-origin: center center;
}
.qp2-orb-ring-1 {
  border-top-color: rgba(139,92,246,0.82);
  border-right-color: rgba(139,92,246,0.22);
  animation: qp2-orbit-cw 2.0s linear infinite;
}
.qp2-orb-ring-2 {
  border-bottom-color: rgba(236,72,153,0.68);
  border-left-color: rgba(236,72,153,0.18);
  animation: qp2-orbit-ccw 3.2s linear infinite;
}
.qp2-orb-ring-3 {
  border-right-color: rgba(6,182,212,0.48);
  border-top-color: rgba(6,182,212,0.12);
  animation: qp2-orbit-cw 5.0s linear infinite;
}
@keyframes qp2-orbit-cw  { from { transform: translate(-50%,-50%) rotate(0deg);    } to { transform: translate(-50%,-50%) rotate(360deg);  } }
@keyframes qp2-orbit-ccw { from { transform: translate(-50%,-50%) rotate(0deg);    } to { transform: translate(-50%,-50%) rotate(-360deg); } }

/* ── Orbit comet dots ── */
.qp2-orb-dot {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--nc, #8B5CF6);
  box-shadow: 0 0 8px 2px var(--nc, #8B5CF6);
  pointer-events: none;
  top: 50%; left: 50%;
}
.qp2-orb-dot-1 { animation: qp2-orb-dot-cw 2.0s linear infinite; }
.qp2-orb-dot-2 { animation: qp2-orb-dot-ccw 3.2s linear infinite; background: #EC4899; box-shadow: 0 0 8px 2px #EC4899; }

@keyframes qp2-orb-dot-cw {
  from { transform: translate(-50%,-50%) rotate(0deg)    translateX(var(--r1,34px)); }
  to   { transform: translate(-50%,-50%) rotate(360deg)  translateX(var(--r1,34px)); }
}
@keyframes qp2-orb-dot-ccw {
  from { transform: translate(-50%,-50%) rotate(0deg)    translateX(var(--r2,42px)); }
  to   { transform: translate(-50%,-50%) rotate(-360deg) translateX(var(--r2,42px)); }
}

.qp2-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--nc, #7F77DD) 0%, color-mix(in srgb, var(--nc,#7F77DD) 60%, #000) 100%);
  color: #fff;
  font-size: 10px; font-weight: 900;
  font-family: 'Orbitron', sans-serif;
  font-style: italic;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,0.25);
  box-shadow:
    0 0 10px color-mix(in srgb, var(--nc,#7F77DD) 55%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.2);
  letter-spacing: -0.5px;
  transform: skewX(-6deg);
}

.qp2-node-name {
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.82);
  text-align: center; max-width: 115px;
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0,0,0,0.95), 0 0 20px rgba(0,0,0,0.7);
}
.qp2-node.active .qp2-node-name {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 12px color-mix(in srgb, var(--nc,#8B5CF6) 60%, transparent), 0 1px 8px rgba(0,0,0,0.9);
}
.qp2-node.done .qp2-node-name {
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.qp2-lancer {
  position: relative; overflow: hidden;
  /* Prend la couleur du chemin (var --nc héritée du nœud) */
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--nc,#7C3AED) 72%, #000) 0%,
    var(--nc,#7C3AED) 55%,
    color-mix(in srgb, var(--nc,#7C3AED) 78%, #fff) 100%);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px; font-weight: 700;
  border-radius: 24px;
  padding: 9px 22px;
  cursor: pointer;
  pointer-events: auto;
  letter-spacing: 2px;
  border: 1px solid rgba(255,255,255,0.18);
  outline: none;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--nc,#7C3AED) 45%, transparent),
    0 0 18px color-mix(in srgb, var(--nc,#7C3AED) 62%, transparent),
    0 0 40px color-mix(in srgb, var(--nc,#7C3AED) 30%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.22);
  transition: box-shadow 0.25s, transform 0.15s;
}
.qp2-lancer::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(108deg, transparent 20%, rgba(255,255,255,0.28) 50%, transparent 80%);
  background-size: 200% 100%;
  background-position: -200% center;
  animation: qp2-lancer-shimmer 2.8s ease-in-out infinite;
}
@keyframes qp2-lancer-shimmer {
  0%, 25%  { background-position: -200% center; }
  65%, 100% { background-position: 250% center; }
}
.qp2-lancer:hover {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--nc,#7C3AED) 60%, transparent),
    0 0 26px color-mix(in srgb, var(--nc,#7C3AED) 85%, transparent),
    0 0 55px color-mix(in srgb, var(--nc,#7C3AED) 42%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.28);
  transform: translateY(-1px);
}
.qp2-lancer:active { opacity: 0.88; transform: translateY(0); }

.qp2-stars {
  font-size: 12px;
  color: #fbbf24;
  margin-bottom: -2px;
  line-height: 1;
  letter-spacing: 1px;
  filter: drop-shadow(0 0 5px rgba(251,191,36,0.8));
}

.qp2-aura {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

/* Avatar above active node */
.qp2-avatar {
  position: absolute;
  width: 36px;
  height: 52px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 6;
  animation: qp2-float 3s ease-in-out infinite;
  overflow: visible;
}
.qp2-avatar > div {
  width: 36px !important;
  height: 52px !important;
}
.qp2-avatar img {
  width: 36px !important;
  height: 52px !important;
  object-fit: contain !important;
}
@keyframes qp2-float {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(-3px); }
}
.qp2-avatar-shadow {
  position: absolute;
  width: 24px; height: 6px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  filter: blur(4px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}

/* Sage messages */
.qp2-sage {
  position: absolute;
  max-width: 105px;
  background-color: rgba(6, 5, 18, 0.9);
  background-image: repeating-conic-gradient(rgba(255,255,255,0.08) 0% 25%, rgba(0,0,0,0.0) 0% 50%);
  background-size: 8px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-top: 2px solid rgba(255,255,255,0.28);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  line-height: 1.45;
  letter-spacing: 0.3px;
  z-index: 4;
  animation: qp2-fadein 0.6s ease both;
  transform: translateY(-50%) skewX(-3deg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  text-shadow: none;
}
.qp2-sage.left  { right: calc(70% + 10px); }
.qp2-sage.right { left: calc(70% + 10px); }


/* ── Background drifting butterflies ─────────────────────────── */
@keyframes qp-bf-drift-A {
  0%   { transform: translate(0px,   0px)   rotate(-6deg)  scale(1);    }
  18%  { transform: translate(22px, -28px)  rotate(5deg)   scale(1.06); }
  40%  { transform: translate(12px, -55px)  rotate(-10deg) scale(0.96); }
  65%  { transform: translate(-18px,-32px)  rotate(8deg)   scale(1.04); }
  84%  { transform: translate(-8px,  -8px)  rotate(-3deg)  scale(0.98); }
  100% { transform: translate(0px,   0px)   rotate(-6deg)  scale(1);    }
}
@keyframes qp-bf-drift-B {
  0%   { transform: translate(0px,   0px)   rotate(4deg)   scale(1);    }
  22%  { transform: translate(-20px,-22px)  rotate(-8deg)  scale(1.05); }
  48%  { transform: translate(-35px,-45px)  rotate(6deg)   scale(0.94); }
  70%  { transform: translate(-15px,-20px)  rotate(-5deg)  scale(1.03); }
  100% { transform: translate(0px,   0px)   rotate(4deg)   scale(1);    }
}
@keyframes qp-bf-wing {
  0%,100% { transform: scaleX(1);    opacity: 1;   }
  50%     { transform: scaleX(0.12); opacity: 0.65; }
}
.qp-bg-bf {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 0 10px var(--c,#8B5CF6)) drop-shadow(0 0 22px var(--c,#8B5CF6));
  opacity: var(--op, 0.38);
  animation: var(--drift, qp-bf-drift-A) var(--dur,20s) cubic-bezier(0.45, 0, 0.55, 1) infinite var(--dly,0s);
  z-index: 1;
}
.qp-bg-bf .qp-wL {
  transform-origin: 12px 12px;
  animation: qp-bf-wing var(--flap,0.75s) cubic-bezier(0.45, 0, 0.55, 1) infinite var(--dly,0s);
}
.qp-bg-bf .qp-wR {
  transform-origin: 12px 12px;
  animation: qp-bf-wing var(--flap,0.75s) cubic-bezier(0.45, 0, 0.55, 1) infinite reverse;
  animation-delay: var(--dly,0s);
}

/* Node butterfly wing animation */
@keyframes qp-node-wing {
  0%,100% { transform: scaleX(1);   }
  50%     { transform: scaleX(0.18); }
}
.qp2-node:not(.done) .qp-nwL {
  transform-origin: 12px 12px;
  animation: qp-node-wing 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.qp2-node:not(.done) .qp-nwR {
  transform-origin: 12px 12px;
  animation: qp-node-wing 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite reverse;
}
.qp2-node.active:not(.done) .qp-nwL,
.qp2-node.active:not(.done) .qp-nwR {
  animation-duration: 0.9s;
}
/* Zone pas encore parcourue : papillons figés (ailes immobiles, ouvertes) */
.qp2-node.future .qp-nwL,
.qp2-node.future .qp-nwR {
  animation: none !important;
  transform: scaleX(1) !important;
}

/* Butterfly path particles (trail) */
.qp-path-bf {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%,-50%) rotate(var(--rot,0deg));
  opacity: var(--op, 0.55);
  filter: drop-shadow(0 0 5px var(--c,#EF9F27));
  animation: qp2-fadein 0.5s ease both, qp-path-bf-twinkle 2.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: var(--dly,0s), var(--dly,0s);
}
@keyframes qp-path-bf-twinkle {
  0%,100% { opacity: var(--op,0.55); transform: translate(-50%,-50%) rotate(var(--rot,0deg)) scale(1); }
  50%     { opacity: calc(var(--op,0.55) * 0.35); transform: translate(-50%,-50%) rotate(var(--rot,0deg)) scale(0.7); }
}

/* ═══════════════════════════════════════════════
   FLASH CARDS — DESIGN AMÉLIORÉ
═══════════════════════════════════════════════ */

.screen-flashcards {
  position: relative;
  min-height: 100vh;
  padding: 0 24px 42px;
  color: #fff;
  background:
    radial-gradient(circle at 50% -2%, rgba(128, 72, 255, 0.24), transparent 26%),
    radial-gradient(circle at 85% 100%, rgba(0, 140, 255, 0.08), transparent 20%),
    linear-gradient(90deg, #04010d 0%, #09031a 38%, #070214 68%, #020109 100%);
  overflow-x: hidden;
  box-sizing: border-box;
}


/* largeur utile plus confortable */
.screen-flashcards .fc-header,
.screen-flashcards .fc-subject-bar,
.screen-flashcards .fc-progress-wrap,
.screen-flashcards .fc-arena,
.screen-flashcards .fc-hint,
.screen-flashcards .fc-rating,
.screen-flashcards .fc-end {
  width: min(980px, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.fc-header {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.fc-pdf-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(109,40,217,0.3);
  background: rgba(109,40,217,0.1);
  color: #a78bfa;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.fc-pdf-btn:hover { background: rgba(109,40,217,0.22); border-color: rgba(139,92,246,0.6); }

.fc-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.fc-back-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 0 18px rgba(255,255,255,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
}

.fc-back-btn svg {
  width: 20px;
  height: 20px;
}

.fc-title {
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #dcbcff;
  line-height: 1;
}

.fc-session-xp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 187, 82, 0.30);
  background:
    linear-gradient(180deg, rgba(255, 187, 82, 0.10), rgba(255, 187, 82, 0.05));
  color: #ffd66f;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.02);
}

.fc-session-xp svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Onglets */
.fc-subject-bar {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 24px;
  scrollbar-width: none;
}

.fc-subject-bar::-webkit-scrollbar {
  display: none;
}

.fc-subj-pill {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.92);
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.fc-subj-pill.active {
  background: rgba(167,139,250,0.12);
  box-shadow:
    0 0 0 1px rgba(167,139,250,0.24) inset,
    0 10px 24px rgba(124,58,237,0.14);
}

/* Arena */
.fc-arena {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}


.fc-browse-mode {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Bloc matière */
.fc-browse-subj {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fc-browse-subj-header {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.fc-browse-subj-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.fc-browse-subj-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.fc-browse-subj-count {
  justify-self: end;
  font-size: 13px;
  color: rgba(255,255,255,0.62);
  white-space: nowrap;
}

.fc-browse-play-all {
  justify-self: end;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(167,139,250,0.26);
  background: rgba(88, 28, 255, 0.08);
  color: #b99cff;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    0 8px 22px rgba(0,0,0,0.14),
    inset 0 0 0 1px rgba(255,255,255,0.02);
}

/* Grille des cartes */
.fc-browse-chaps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.fc-chap-card {
  min-height: 160px;
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 76% 20%, rgba(110, 55, 255, 0.10), transparent 40%),
    linear-gradient(180deg, rgba(11, 8, 30, 0.97), rgba(5, 4, 17, 0.99));
  box-shadow:
    0 14px 36px rgba(0,0,0,0.28),
    inset 0 0 0 1px rgba(255,255,255,0.02);
  display: flex;
  flex-direction: row;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.fc-chap-card:hover {
  transform: translateY(-3px);
  border-color: var(--urg-color, rgba(167,139,250,0.30));
  box-shadow:
    0 20px 48px rgba(0,0,0,0.34),
    0 0 0 1px var(--urg-color, rgba(167,139,250,0.20));
}

/* Colored left strip */
.fc-chap-urg-strip {
  flex: 0 0 4px;
  min-width: 4px;
  border-radius: 20px 0 0 20px;
  opacity: 0.85;
}

/* Inner content area */
.fc-chap-card-inner {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 14px;
  gap: 8px;
}

.fc-chap-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Urgency badge */
.fc-chap-urg-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.3;
}

/* Card count badge */
.fc-chap-count-badge {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.fc-chap-count-empty {
  color: rgba(255,255,255,0.28) !important;
}

.fc-chap-card-name {
  flex: 1 1 0;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mastery progress bar */
.fc-chap-mastery-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 2px;
}

.fc-chap-mastery-fill {
  height: 100%;
  border-radius: 99px;
  opacity: 0.75;
  transition: width 0.5s ease;
}

/* état vide */
.fc-empty {
  padding: 34px 20px;
  border-radius: 22px;
  border: 1px dashed rgba(255,255,255,0.10);
  text-align: center;
  background: rgba(255,255,255,0.03);
}

.fc-empty-icon {
  font-size: 30px;
  margin-bottom: 8px;
}

.fc-empty-text {
  color: rgba(255,255,255,0.68);
  line-height: 1.5;
}

/* Progress / jeu */
.fc-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.fc-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.fc-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.fc-progress-label {
  min-width: 58px;
  text-align: right;
  font-size: 12px;
  color: rgba(255,255,255,0.68);
  font-weight: 700;
}

/* Carte play */
.fc-card-scene {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 10px;
}

.fc-card {
  position: relative;
  width: min(100%, 620px);
  min-height: 340px;
  margin-left: auto;
  margin-right: auto;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.fc-card.flipped {
  transform: rotateY(180deg);
}

.fc-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 30px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 70% 20%, rgba(110, 55, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(12, 8, 30, 0.95), rgba(5, 4, 17, 0.98));
  box-shadow:
    0 18px 40px rgba(0,0,0,0.24),
    inset 0 0 0 1px rgba(255,255,255,0.02);
}

.fc-card-back {
  transform: rotateY(180deg);
}

.fc-card-subj-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 700;
}

.fc-card-subj-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.fc-card-chap-name {
  margin-top: 24px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.fc-card-hint-text {
  margin-top: 18px;
  text-align: center;
  color: rgba(255,255,255,0.58);
  font-size: 14px;
}

.fc-card-urgency {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.fc-urg-critical { color: #F87171; }
.fc-urg-new      { color: #A78BFA; }
.fc-urg-today    { color: #67E8F9; }
.fc-urg-soon     { color: #86EFAC; }

.fc-back-notes {
  margin-top: 18px;
  white-space: pre-wrap;
  line-height: 1.65;
  color: rgba(255,255,255,0.92);
  font-size: 15px;
}

.fc-back-info {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
}

.fc-back-row-icon {
  width: 18px;
  text-align: center;
}

.fc-back-jdates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.fc-back-jdate {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.72);
}

.fc-back-jdate.today-hl {
  background: rgba(167,139,250,0.18);
  color: #d6beff;
}

.fc-back-jdate.past {
  opacity: 0.55;
}

/* Hint / rating */
.fc-hint {
  text-align: center;
  color: rgba(255,255,255,0.68);
  margin-top: 16px;
  font-size: 13px;
}

.fc-rating {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.fc-btn-retry,
.fc-btn-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 16px;
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.fc-btn-retry {
  background: rgba(248,113,113,0.12);
  color: #ff9b9b;
}

.fc-btn-ok {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
}

.fc-btn-retry svg,
.fc-btn-ok svg {
  width: 16px;
  height: 16px;
}

/* Fin */
.fc-end {
  margin-top: 22px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  text-align: center;
}

.fc-end-emoji {
  font-size: 38px;
  margin-bottom: 8px;
}

.fc-end-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}

.fc-end-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.fc-end-stat {
  min-width: 92px;
}

.fc-end-stat-val {
  font-size: 22px;
  font-weight: 800;
}

.fc-end-stat-lbl {
  font-size: 12px;
  color: rgba(255,255,255,0.62);
}

.fc-end-btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  margin: 4px;
}

.fc-end-btn-home {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ===== FLASH CARDS : colle en haut de l'écran ===== */

html, body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
}

#screen-flashcards,
#screen-flashcards.screen,
#screen-flashcards.screen-flashcards {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;

  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;

  margin: 0 !important;
  padding: 0 24px 42px !important;

  display: block !important;
  overflow-y: auto !important;

  transform: none !important;
}

/* annule un centrage hérité d'une classe générique .screen */
#screen-flashcards.screen {
  justify-content: flex-start !important;
  align-items: stretch !important;
}

/* le header doit commencer tout de suite */
#screen-flashcards .fc-header {
  margin-top: 0 !important;
  padding-top: 24px !important;
}

/* au cas où un premier enfant crée un décalage */
#screen-flashcards > *:first-child {
  margin-top: 0 !important;
}

/* ===== TITRES CHAPITRES (cards) ===== */
.fc-chap-card-name {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  color: rgba(255,255,255,0.9) !important;
}

/* ===== NOM MATIÈRE (PHARMACOLOGIE) ===== */
.fc-browse-subj-name {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

/* ===== BOUTONS (TOUT JOUER / PILLS) ===== */
.fc-browse-play-all,
.fc-subj-pill {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
}

/* ===== PETITS TEXTES (JAMAIS RÉVISÉ etc) ===== */
.fc-chap-urg-lbl {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
}

/* ===== STAR DUST BACKGROUND ===== */
.fc-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* étoiles */
.fc-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(167,139,250,0.8);
  box-shadow: 0 0 6px rgba(167,139,250,0.8);
  animation: fc-fall linear infinite;
}

/* animation chute */
@keyframes fc-fall {
  from {
    transform: translateY(-10vh);
    opacity: 0;
  }
  10% { opacity: 1; }
  to {
    transform: translateY(110vh);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════
   NOTES — Gamifiées
═══════════════════════════════════════════════════════════════ */

/* ─ Screen base ─ */
.screen-notes {
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 0%, rgba(109,40,217,0.22) 0%, rgba(5,2,18,1) 55%);
  overflow: hidden;
}

/* Ambient particles */
.notes-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.notes-particle {
  position: absolute;
  border-radius: 50%;
  animation: fc-float linear infinite;
  opacity: 0;
}
/* reuses fc-float keyframes */

/* ─ Header ─ */
.notes-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  flex-shrink: 0;
}
.notes-back-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.notes-back-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 0 18px rgba(255,255,255,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
}
.notes-search-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
}
.notes-header-center {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.notes-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, #A78BFA, #EC4899, #67E8F9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.notes-count {
  font-size: 10px;
  color: rgba(167,139,250,0.5);
  font-weight: 600;
}

/* ─ Search bar ─ */
.notes-search-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 10px;
  flex-shrink: 0;
}
.notes-search-bar.hidden { display: none; }
.notes-search-icon { color: rgba(255,255,255,0.35); flex-shrink: 0; }
.notes-search-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fff;
  font-family: 'Inter', sans-serif;
}
.notes-search-input:focus { outline: none; border-color: rgba(167,139,250,0.45); }
.notes-search-input::placeholder { color: rgba(255,255,255,0.25); }

/* ─ Sort bar ─ */
.notes-sort-bar {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 7px;
  padding: 0 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.notes-sort-bar::-webkit-scrollbar { display: none; }
.notes-sort-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.notes-sort-pill svg { flex-shrink: 0; }
.notes-sort-pill.active {
  border-color: rgba(167,139,250,0.5);
  background: rgba(139,92,246,0.15);
  color: #A78BFA;
}

/* ─ Grid ─ */
.notes-grid {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 14px 100px;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}
.notes-grid::-webkit-scrollbar { display: none; }
.notes-grid-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  text-align: center;
}
.notes-grid-empty-icon { color: rgba(167,139,250,0.3); }
.notes-grid-empty-text { font-size: 14px; color: rgba(255,255,255,0.35); line-height: 1.5; }
.notes-grid-empty-sub  { font-size: 12px; color: rgba(167,139,250,0.4); }

/* ─ Note card ─ */
.note-card {
  position: relative;
  border-radius: 12px 12px 14px 14px;
  padding: 13px 13px 14px 16px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34,1.1,0.64,1), box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
}
.note-card:active { transform: scale(0.97); }

/* Left colored strip */
.note-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3.5px;
  border-radius: 12px 0 0 12px;
  background: var(--nc);
}
/* Subtle parchment grain overlay */
.note-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.6;
}

/* Type colours — cosmic palette */
.note-card.type-note    { --nc:#8B5CF6; background: linear-gradient(155deg, rgba(30,10,55,0.96), rgba(18,5,35,0.98)); border: 1px solid rgba(139,92,246,0.15); box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(139,92,246,0.1); }
.note-card.type-fiche   { --nc:#EC4899; background: linear-gradient(155deg, rgba(40,8,28,0.96), rgba(26,4,18,0.98)); border: 1px solid rgba(236,72,153,0.15); box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(236,72,153,0.08); }
.note-card.type-formule { --nc:#22D3EE; background: linear-gradient(155deg, rgba(4,18,32,0.96), rgba(2,10,22,0.98)); border: 1px solid rgba(34,211,238,0.12); box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(34,211,238,0.07); }
.note-card.type-resume  { --nc:#F59E0B; background: linear-gradient(155deg, rgba(30,18,4,0.96), rgba(18,10,2,0.98)); border: 1px solid rgba(245,158,11,0.14); box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(245,158,11,0.08); }
.note-card.type-todo    { --nc:#4ADE80; background: linear-gradient(155deg, rgba(5,22,10,0.96), rgba(3,13,6,0.98)); border: 1px solid rgba(74,222,128,0.12); box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(74,222,128,0.07); }

/* Pinned glow */
.note-card.pinned { box-shadow: 0 0 0 1.5px var(--nc), 0 10px 32px rgba(0,0,0,0.65); border-color: transparent; }

/* Card content */
.nc-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nc-type-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid;
}
.nc-type-badge {
  display: flex; align-items: center; gap: 4px;
}
.note-card.type-note    .nc-type-badge { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.28); color: #A78BFA; }
.note-card.type-fiche   .nc-type-badge { background: rgba(236,72,153,0.12); border-color: rgba(236,72,153,0.25); color: #F9A8D4; }
.note-card.type-formule .nc-type-badge { background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.22); color: #67E8F9; }
.note-card.type-resume  .nc-type-badge { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.25); color: #FCD34D; }
.note-card.type-todo    .nc-type-badge { background: rgba(74,222,128,0.1); border-color: rgba(74,222,128,0.2); color: #86EFAC; }

.nc-pin {
  margin-left: auto;
  display: flex;
  align-items: center;
  color: var(--nc);
  opacity: 0.85;
  flex-shrink: 0;
}
.nc-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  line-height: 1.35;
  word-break: break-word;
}
.nc-preview {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  line-height: 1.45;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.nc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.nc-date {
  font-size: 9px;
  color: rgba(255,255,255,0.22);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nc-subj-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* Wide card (pinned notes take full width) */
.note-card.wide { grid-column: 1 / -1; }

/* ─ FAB ─ */
.notes-fab {
  position: absolute;
  bottom: 80px;
  right: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #7C3AED, #DB2777);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(109,40,217,0.5), 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.18s cubic-bezier(0.34,1.2,0.64,1), box-shadow 0.18s;
}
.notes-fab:active { transform: scale(0.95); box-shadow: 0 4px 14px rgba(109,40,217,0.35); }

/* ─ Note Editor Overlay ─ */
.note-editor-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: transparent;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  transition: background 0.25s;
}
.note-editor-overlay.hidden { display: none; }
.note-editor-overlay.open { background: rgba(4,2,10,0.5); pointer-events: all; }

.note-editor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 96%;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.34,1.1,0.64,1);
}
.note-editor-overlay.open .note-editor { transform: translateY(0); }

/* Editor background per type */
.note-editor.type-note    { background: linear-gradient(180deg, #100828 0%, #080418 100%); border-top: 2px solid rgba(139,92,246,0.4); }
.note-editor.type-fiche   { background: linear-gradient(180deg, #1a0516 0%, #0f0310 100%); border-top: 2px solid rgba(236,72,153,0.4); }
.note-editor.type-formule { background: linear-gradient(180deg, #021018 0%, #020810 100%); border-top: 2px solid rgba(34,211,238,0.35); }
.note-editor.type-resume  { background: linear-gradient(180deg, #140e02 0%, #0c0801 100%); border-top: 2px solid rgba(245,158,11,0.35); }
.note-editor.type-todo    { background: linear-gradient(180deg, #030e06 0%, #020904 100%); border-top: 2px solid rgba(74,222,128,0.3); }

/* Editor header */
.ne-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.ne-back-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.28);
  display: flex; align-items: center; justify-content: center;
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.ne-back-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 0 18px rgba(255,255,255,0.28), inset 0 1px 0 rgba(255,255,255,0.2);
}
/* Type pills inline in header */
.ne-type-pills {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ne-type-pills::-webkit-scrollbar { display: none; }
.ne-type-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.ne-type-pill.active { color: #fff; }
.ne-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.ne-pin-btn, .ne-delete-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.45);
  transition: all 0.15s;
}
.ne-pin-btn.pinned { background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.4); color: #A78BFA; }
.ne-delete-btn { color: rgba(248,113,113,0.45); }
.ne-delete-btn:active { background: rgba(248,113,113,0.1); }

/* Subject row */
.ne-subject-row {
  padding: 6px 16px 0;
  flex-shrink: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ne-subject-row::-webkit-scrollbar { display: none; }
.ne-subj-pill {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1.5px solid;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}
.ne-subj-pill.active { opacity: 1; }
.ne-subj-pill:not(.active) { opacity: 0.35; }

/* Title */
.ne-title {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px 6px;
  font-size: 20px;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  font-family: 'Inter', sans-serif;
  background: transparent;
  border: none;
  letter-spacing: 0.01em;
  line-height: 1.3;
  flex-shrink: 0;
}
.ne-title:focus { outline: none; }
.ne-title::placeholder { color: rgba(255,255,255,0.18); }

/* Scroll area */
.ne-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Content editable */
.ne-content {
  min-height: 200px;
  padding: 10px 18px 20px;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.8);
  font-family: 'Inter', sans-serif;
  outline: none;
  word-break: break-word;
}
.ne-content:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,0.18);
  pointer-events: none;
  white-space: pre-line;
  display: block;
}
/* Formatting styles inside editor */
.ne-content h1 {
  font-size: 20px; font-weight: 800;
  margin: 14px 0 6px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  background: linear-gradient(90deg, #A78BFA, #C4B5FD);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.note-editor.type-fiche   .ne-content h1 { background: linear-gradient(90deg, #EC4899, #F9A8D4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.note-editor.type-formule .ne-content h1 { background: linear-gradient(90deg, #22D3EE, #67E8F9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.note-editor.type-resume  .ne-content h1 { background: linear-gradient(90deg, #F59E0B, #FCD34D); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.note-editor.type-todo    .ne-content h1 { background: linear-gradient(90deg, #4ADE80, #86EFAC); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ne-content h2 {
  font-size: 15px; font-weight: 700;
  color: rgba(255,255,255,0.8);
  margin: 12px 0 4px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 4px;
}
.ne-content ul, .ne-content ol {
  padding-left: 20px;
  margin: 6px 0;
}
.ne-content li { margin: 3px 0; }
.ne-content hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 14px 0;
}
/* Checkbox items */
.ne-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0;
}
.ne-checkbox-item input[type=checkbox] {
  margin-top: 3px;
  accent-color: #8B5CF6;
  width: 15px; height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}
.ne-checkbox-item label {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.ne-checkbox-item.checked label {
  text-decoration: line-through;
  color: rgba(255,255,255,0.3);
}

/* Toolbar */
.ne-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.07);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.ne-toolbar::-webkit-scrollbar { display: none; }
.ne-tool {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ne-tool:active, .ne-tool:hover { background: rgba(255,255,255,0.12); color: #fff; }
.ne-tool-sep {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  margin: 0 3px;
}
.ne-tool-bold   { font-weight: 900; font-style: normal; }
.ne-tool-italic { font-style: italic; font-weight: 700; }
.ne-tool-under  { text-decoration: underline; }
.ne-tool-highlight { color: #A78BFA; }
.ne-tool-highlight:hover, .ne-tool-highlight:active { color: #C4B5FD; background: rgba(139,92,246,0.18) !important; }

/* Status bar */
.ne-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px 10px;
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.ne-autosave {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(139,92,246,0.6);
}

/* Handle */
.ne-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.13);
  margin: 10px auto 2px;
  flex-shrink: 0;
}

/* Menu notes accent */
.menu-nav-notes .mni-icon-wrap {
  background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(236,72,153,0.18));
  border-color: rgba(167,139,250,0.3);
}

/* ═══════════════════════════════════════════════
   FLASH CARDS — poussière d’étoiles en fond
═══════════════════════════════════════════════ */

#screen-flashcards,
.screen-flashcards {
  position: relative;
  overflow: hidden;
}

/* Le contenu passe au-dessus */
#screen-flashcards > *,
.screen-flashcards > * {
  position: relative;
  z-index: 1;
}

/* Couche 1 */
#screen-flashcards::before,
.screen-flashcards::before {
  content: "";
  position: absolute;
  inset: -20% 0 0 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.9) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(167,139,250,0.8) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(103,232,249,0.7) 0 1px, transparent 1.8px);
  background-size: 140px 140px, 220px 220px, 180px 180px;
  background-position: 10px 20px, 80px 120px, 40px 70px;
  animation: fcStarFall1 18s linear infinite;
}

/* Couche 2 */
#screen-flashcards::after,
.screen-flashcards::after {
  content: "";
  position: absolute;
  inset: -30% 0 0 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.8) 0 0.8px, transparent 1.4px),
    radial-gradient(circle, rgba(216,180,255,0.7) 0 0.9px, transparent 1.6px);
  background-size: 260px 260px, 320px 320px;
  background-position: 30px 40px, 140px 180px;
  animation: fcStarFall2 26s linear infinite;
}

@keyframes fcStarFall1 {
  from {
    transform: translateY(-12%);
  }
  to {
    transform: translateY(12%);
  }
}

@keyframes fcStarFall2 {
  from {
    transform: translateY(-18%);
  }
  to {
    transform: translateY(18%);
  }
}

/* ═══════════════════════════════════════
   FLASH CARDS — CHAPTER MODAL PREMIUM
═══════════════════════════════════════ */

#fc-chap-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 16px !important;
  background: rgba(5, 4, 20, 0.68) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;

  animation: fcModalFadeIn 0.22s ease !important;
}

#fc-chap-modal.hidden {
  display: none !important;
}

#fc-chap-modal .fc-chap-modal-card {
  width: min(420px, calc(100vw - 24px)) !important;
  max-width: 420px !important;
  min-width: 0 !important;

  position: relative !important;
  margin: 0 !important;
  padding: 22px 18px 18px !important;
  border-radius: 24px !important;

  background:
    radial-gradient(circle at top, rgba(167, 139, 250, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(18, 10, 44, 0.96) 0%, rgba(8, 5, 22, 0.98) 100%) !important;
  background-color: #0c071f !important;

  border: 1px solid rgba(167, 139, 250, 0.22) !important;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.58),
    0 0 28px rgba(124, 58, 237, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.04) !important;

  color: #ffffff !important;
  text-align: left !important;
  overflow: hidden !important;

  animation: fcModalPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* halo doux */
#fc-chap-modal .fc-chap-modal-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(217,70,239,0.12), rgba(103,232,249,0.08));
  filter: blur(18px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

#fc-chap-modal .fc-chap-modal-card > * {
  position: relative;
  z-index: 1;
}

#fc-chap-modal-subj,
#fc-chap-modal-subj * {
  margin: 0 0 8px 0 !important;
  color: rgba(255,255,255,0.62) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.62) !important;

  font-family: 'Orbitron', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.10em !important;
  text-transform: uppercase !important;
}

#fc-chap-modal-name,
#fc-chap-modal-name * {
  margin: 0 0 10px 0 !important;

  font-size: 21px !important;
  font-weight: 800 !important;
  line-height: 1.16 !important;

  background: linear-gradient(90deg, #ffffff, #d7c2ff) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

#fc-chap-modal-status,
#fc-chap-modal-status * {
  margin: 0 0 16px 0 !important;

  color: #c8afff !important;
  -webkit-text-fill-color: #c8afff !important;

  font-size: 14px !important;
  line-height: 1.4 !important;
}

#fc-chap-modal .fc-chap-modal-btns {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin: 0 !important;
}

#fc-chap-modal .fc-chap-modal-btn {
  min-height: 42px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  font-family: 'Orbitron', sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;

  cursor: pointer !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}

#fc-chap-modal .fc-chap-modal-btn:hover {
  transform: translateY(-1px) !important;
}

#fc-chap-modal .fc-chap-edit-btn {
  flex: 1 1 160px !important;

  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;

  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

#fc-chap-modal .fc-chap-edit-btn:hover {
  background: rgba(255,255,255,0.10) !important;
}

#fc-chap-modal .fc-chap-play-btn {
  flex: 1 1 160px !important;

  background: linear-gradient(135deg, #7c3aed, #d946ef) !important;
  border: 1px solid rgba(167,139,250,0.42) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;

  box-shadow:
    0 0 18px rgba(124,58,237,0.30),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

#fc-chap-modal .fc-chap-play-btn:hover {
  box-shadow:
    0 0 28px rgba(124,58,237,0.42),
    0 0 52px rgba(217,70,239,0.16),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

#fc-chap-modal .fc-chap-play-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

#fc-chap-modal .fc-chap-modal-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;

  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  border: none !important;

  display: grid !important;
  place-items: center !important;

  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.88) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.88) !important;

  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: background 0.18s ease, transform 0.18s ease !important;
}

#fc-chap-modal .fc-chap-modal-close:hover {
  background: rgba(255,255,255,0.12) !important;
  transform: scale(1.04) !important;
}

@keyframes fcModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fcModalPopIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ═══════════════════════════════════════
   FLASH CARDS — EDITOR RESET FINAL
═══════════════════════════════════════ */

#fc-editor-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  overflow-y: auto !important;
  background:
    radial-gradient(circle at top, rgba(120,70,255,0.12), transparent 30%),
    linear-gradient(180deg, #05030f 0%, #09041d 100%) !important;
  color: #fff !important;
}

#fc-editor-overlay.hidden {
  display: none !important;
}

#fc-editor-overlay .fc-editor-shell {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#fc-editor-overlay .fc-editor-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 40px 1fr auto !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 16px !important;
  background: rgba(7, 4, 20, 0.82) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

#fc-editor-overlay .fc-editor-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  font-family: 'Orbitron', sans-serif !important;
  letter-spacing: 0.04em !important;
  text-align: center !important;
}

#fc-editor-overlay .fc-editor-back,
#fc-editor-overlay .fc-editor-save,
#fc-editor-overlay .fc-editor-add-btn {
  border: none !important;
  cursor: pointer !important;
}

#fc-editor-overlay .fc-editor-back {
  width: 38px !important;
  height: 38px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.08) !important;
  color: #fff !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
}

#fc-editor-overlay .fc-editor-back svg {
  width: 17px !important;
  height: 17px !important;
}

#fc-editor-overlay .fc-editor-save {
  padding: 9px 13px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  color: #fff !important;
  font-weight: 800 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 10px !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
}

#fc-editor-overlay .fc-editor-body {
  width: 100% !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

#fc-editor-overlay .fc-editor-label {
  font-size: 11px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,0.6) !important;
  margin-bottom: 8px !important;
  font-family: 'Orbitron', sans-serif !important;
}

#fc-editor-overlay .fc-editor-front-wrap {
  margin-bottom: 16px !important;
}

#fc-editor-overlay .fc-editor-front-display {
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  background: rgba(167,139,250,0.09) !important;
  border: 1px solid rgba(167,139,250,0.22) !important;
  color: #dbc9ff !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

#fc-editor-cards-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 14px !important;
}

#fc-editor-overlay .fc-editor-card-item {
  border-radius: 18px !important;
  background: rgba(255,255,255,0.035) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  overflow: hidden !important;
}

#fc-editor-overlay .fc-editor-card-box {
  padding: 14px !important;
}

#fc-editor-overlay .fc-editor-card-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 10px !important;
}

#fc-editor-overlay .fc-editor-card-field {
  margin-bottom: 10px !important;
}

#fc-editor-overlay .fc-editor-card-front,
#fc-editor-overlay .fc-editor-card-back {
  width: 100% !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  background: rgba(255,255,255,0.05) !important;
  color: white !important;
  padding: 11px 12px !important;
  outline: none !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  box-sizing: border-box !important;
}

#fc-editor-overlay .fc-editor-card-front::placeholder,
#fc-editor-overlay .fc-editor-card-back::placeholder {
  color: rgba(255,255,255,0.35) !important;
}

#fc-editor-overlay .fc-editor-card-back {
  min-height: 100px !important;
  resize: vertical !important;
}

#fc-editor-overlay .fc-editor-card-item .fc-editor-back {
  width: auto !important;
  height: auto !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,0.07) !important;
  font-size: 12px !important;
}

#fc-editor-overlay .fc-editor-add-wrap {
  margin-top: 14px !important;
  display: flex !important;
  justify-content: flex-start !important;
}

#fc-editor-overlay .fc-editor-add-btn {
  padding: 11px 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  color: white !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR DESKTOP — base styles (hidden on mobile)
══════════════════════════════════════════════════════════ */

/* ── Elements hidden on mobile, shown on desktop ── */
.mp-nav-divider       { display: none; }
.mp-hero-extra        { display: none; }
.sidebar-toggle-btn   { display: none !important; }

/* ── Section label ── */
.mp-section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(196,181,253,0.75);
  padding: 10px 16px 6px;
  display: flex; align-items: center; gap: 8px;
}
.mp-section-label::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(139,92,246,0.8);
}

/* ── XP / Currency (hidden on mobile) ── */
.mp-xp-wrap { display: flex; flex-direction: column; gap: 5px; }
.mp-xp-meta {
  display: flex; align-items: center; justify-content: space-between;
}
.mp-level-chip {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.56rem; font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold); background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 6px; padding: 2px 7px;
}
.mp-xp-text {
  font-size: 0.65rem; font-weight: 500;
  color: var(--text3); letter-spacing: 0.02em;
}
.mp-xp-bar-bg {
  height: 5px; border-radius: 99px;
  background: rgba(255,255,255,0.07);
  overflow: hidden; position: relative;
}
.mp-xp-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--purple-d) 0%, var(--purple) 60%, var(--purple-l) 100%);
  box-shadow: 0 0 8px rgba(139,92,246,0.6);
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.mp-xp-fill::after {
  content: ''; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: #c4b5fd;
  box-shadow: 0 0 10px rgba(196,181,253,0.9);
}
.mp-currency-row {
  display: flex; gap: 8px; margin-top: 6px;
}
.mp-currency-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 7px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 99px;
  font-size: 0.75rem; font-weight: 700; color: var(--gold);
  transition: background 0.15s, border-color 0.15s;
}
.mp-currency-pill svg { width: 13px; height: 13px; stroke: var(--gold); flex-shrink: 0; }
.mp-gem-pill { color: var(--neon-cyan); }
.mp-gem-pill svg { stroke: var(--neon-cyan); }

/* ══════════════════════════════════════════════════════════
   DESKTOP WEBSITE LAYOUT  (≥ 900 px)
   Premium gamified right sidebar
══════════════════════════════════════════════════════════ */
@keyframes sidebarPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1;    }
}
@keyframes xpShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ── RIGHT SIDEBAR — overlay ────────────────────────────── */
  #menu-panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 290px; height: 100vh;
    overflow-y: auto; overflow-x: hidden;
    z-index: 50;
    transform: none; /* override mobile slide-out transform */
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    /* Cosmic deep background */
    background:
      radial-gradient(ellipse 160% 35% at 50% 0%,   rgba(124,58,237,0.16) 0%, transparent 55%),
      radial-gradient(ellipse 120% 25% at 50% 100%,  rgba(6,182,212,0.07)  0%, transparent 55%),
      radial-gradient(ellipse 80%  50% at 100% 50%,  rgba(217,70,239,0.05) 0%, transparent 60%),
      linear-gradient(180deg, #050312 0%, #08051e 50%, #050312 100%);
    border-left: none;
    box-shadow: -1px 0 0 rgba(96,165,250,0.12), -24px 0 80px rgba(0,0,0,0.5);
  }

  /* Animated gradient border on the left edge */
  #menu-panel::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(180deg,
      transparent 0%,
      rgba(139,92,246,0.4) 15%,
      rgba(96,165,250,0.9) 40%,
      rgba(192,38,211,0.7) 60%,
      rgba(139,92,246,0.4) 85%,
      transparent 100%);
    animation: sidebarPulse 5s ease-in-out infinite;
    pointer-events: none; z-index: 1;
  }

  /* Custom scrollbar */
  #menu-panel::-webkit-scrollbar { width: 3px; }
  #menu-panel::-webkit-scrollbar-track { background: transparent; }
  #menu-panel::-webkit-scrollbar-thumb {
    background: rgba(139,92,246,0.35); border-radius: 2px;
  }

  /* ── Screens stop at sidebar edge — avoid z-index overlap ──── */
  .screen { right: 290px; }
  .screen.with-bottom-nav { padding-bottom: 0 !important; }

  /* ── Bottom nav — hidden on desktop ──────────────────────── */
  #bottom-nav-wrap, #bn-reveal-btn { display: none !important; }

  /* ── Sidebar toggle visible on desktop ───────────────────── */
  .sidebar-toggle-btn { display: flex; }

  /* ── Overlay — hidden (sidebar is permanent) ─────────────── */
  #menu-overlay { display: none !important; }

  /* ── Hide mobile-only controls ───────────────────────────── */
  .mp-close-btn, .mp-expand-btn, #menu-expand-btn { display: none !important; }
  .menu-panel.expanded { width: 290px !important; }

  /* ── Hide home topbar avatar button (sidebar replaces it) ── */
  .home-menu-avatar-btn { display: none !important; }

  /* ── Sidebar: let entire panel scroll as one unit ───────── */
  #menu-panel .menu-section-content {
    flex: 0 0 auto;
    overflow-y: visible;
    min-height: 0;
  }

  /* ══ TOPBAR — theme toggle centred ═══ */
  .mp-topbar {
    justify-content: center;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(139,92,246,0.1);
    position: relative;
  }
  .mp-theme-pill {
    border-radius: 99px;
    padding: 6px 16px;
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.2);
    gap: 10px;
    transition: background 0.18s, box-shadow 0.18s;
  }
  .mp-theme-pill:hover {
    background: rgba(139,92,246,0.18);
    box-shadow: 0 0 14px rgba(139,92,246,0.25);
  }

  /* ══ HERO ════════════════════════════════════════════════ */
  .mp-hero {
    padding: 28px 18px 14px;   /* top ≥ 22px pour laisser passer l'arc SVG */
    background:
      radial-gradient(ellipse 100% 100% at 0% 50%, rgba(124,58,237,0.15) 0%, transparent 65%),
      linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(6,182,212,0.04) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative; overflow: visible; gap: 12px;  /* visible pour l'arc SVG */
  }
  /* Subtle radial glow behind avatar */
  .mp-hero::after {
    content: '';
    position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
    pointer-events: none;
  }
  .menu-avatar-mini-wrap { width: 68px; height: 78px; position: relative; z-index: 1; }
  .menu-avatar-mini      { width: 68px; height: 68px; }
  .menu-player-name {
    font-size: 1rem; font-weight: 800; letter-spacing: 0.01em;
    text-shadow: 0 0 18px rgba(96,165,250,0.5);
  }
  .menu-player-sub {
    font-size: 0.69rem; color: rgba(167,139,250,0.75); letter-spacing: 0.02em;
  }

  /* ══ XP + CURRENCY — visible on desktop ═════════════════ */
  .mp-hero-extra {
    display: block;
    padding: 12px 18px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    background: rgba(0,0,0,0.12);
  }
  .mp-xp-fill::after { /* shimmer sweep on fill */
    content: '';
    position: absolute; inset: 0; border-radius: 99px;
    background: linear-gradient(90deg,
      transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    background-size: 60px 100%;
    animation: xpShimmer 2.4s ease-in-out infinite;
    pointer-events: none;
  }
  .mp-currency-pill:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.14);
  }

  /* ══ CLOCK CARD ══════════════════════════════════════════ */
  .mp-clock-card {
    margin: 14px 14px 10px;
    padding: 16px 18px 13px;
    background:
      radial-gradient(ellipse 120% 80% at 100% 0%, rgba(139,92,246,0.1) 0%, transparent 60%),
      linear-gradient(135deg, rgba(8,4,22,0.95) 0%, rgba(14,8,38,0.95) 100%);
    border: 1px solid rgba(139,92,246,0.22);
    border-radius: 18px;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.4),
      inset 0 1px 0 rgba(255,255,255,0.07),
      0 0 0 1px rgba(139,92,246,0.08);
    position: relative; overflow: visible;
  }
  /* Corner glow top-right */
  .mp-clock-card::before {
    content: '';
    position: absolute; top: -20px; right: -20px;
    width: 70px; height: 70px; border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);
    pointer-events: none;
  }
  .menu-clock {
    font-size: 2.2rem; font-weight: 900; letter-spacing: 0.1em;
    color: #fff;
    text-shadow:
      0 0 20px rgba(96,165,250,0.8),
      0 0 50px rgba(124,58,237,0.4),
      0 0 80px rgba(124,58,237,0.15);
  }
  .menu-date {
    font-size: 0.64rem; letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
  }
  .menu-castle-msg {
    font-size: 0.72rem; color: rgba(196,181,253,0.92);
    line-height: 1.5; text-align: center;
  }

  /* ══ DIVIDER ═════════════════════════════════════════════ */
  .mp-nav-divider {
    display: block; height: 1px; margin: 8px 14px 4px;
    background: linear-gradient(90deg,
      transparent 0%, rgba(139,92,246,0.25) 30%,
      rgba(192,38,211,0.2) 70%, transparent 100%);
  }

  /* ══ SECONDARY NAV (menu-nav) ════════════════════════════ */
  .menu-nav { padding: 4px 10px; }
  .menu-nav-item {
    height: 40px; padding: 0 12px; border-radius: 11px;
    /* Override global button Orbitron / uppercase */
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem; font-weight: 500;
    text-transform: none; letter-spacing: 0.01em;
    position: relative; overflow: hidden;
    transition: background 0.14s, color 0.14s;
  }
  .menu-nav-item .mni-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem; font-weight: 500;
    text-transform: none; letter-spacing: 0.01em;
  }
  .menu-nav-item::after {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
    width: 3px; height: 50%; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
  }
  .menu-nav-item:hover::after,
  .menu-nav-item.active::after { transform: translateY(-50%) scaleY(1); }
  .menu-nav-item:hover {
    background: rgba(255,255,255,0.05); color: #f0ebff;
  }
  .menu-nav-item:hover .mni-icon-wrap {
    background: rgba(124,58,237,0.18); border-color: rgba(96,165,250,0.22);
  }
  .menu-nav-item.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.20) 0%, rgba(96,165,250,0.05) 100%);
    color: #ddd6fe;
    box-shadow: inset 0 1px 0 rgba(96,165,250,0.12), 0 0 0 1px rgba(124,58,237,0.15);
  }
  .menu-nav-item.active .mni-icon-wrap {
    background: rgba(124,58,237,0.4); border-color: rgba(96,165,250,0.5);
    box-shadow: 0 0 12px rgba(124,58,237,0.4);
  }
  .mni-icon-wrap { width: 30px; height: 30px; border-radius: 8px; }
  .mni-icon-wrap svg { width: 14px; height: 14px; }
  /* Chevron subtle on desktop */
  .mni-chevron { width: 12px; height: 12px; opacity: 0.2; }
  .menu-nav-item:hover .mni-chevron { opacity: 0.5; transform: translateX(2px); }
  .menu-nav-item.active .mni-chevron { opacity: 0.7; }

  /* ══ SECTION CONTENT (sub-panels) ═══════════════════════ */
  .menu-section-content { padding: 12px 14px; }

  /* ══ FOOTER ══════════════════════════════════════════════ */
  .menu-footer {
    padding: 10px 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
  }
  .mp-logout-btn {
    border-radius: 12px; padding: 10px 14px;
    font-size: 0.8rem;
    background: rgba(239,68,68,0.06);
    border-color: rgba(239,68,68,0.18);
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  }
  .mp-logout-btn:hover {
    background: rgba(239,68,68,0.14);
    border-color: rgba(239,68,68,0.45);
    box-shadow: 0 0 16px rgba(239,68,68,0.15);
  }

  /* ══ LIGHT THEME OVERRIDES ═══════════════════════════════ */
  body.light-theme #menu-panel {
    background:
      radial-gradient(ellipse 160% 35% at 50% 0%, rgba(124,58,237,0.08) 0%, transparent 55%),
      linear-gradient(180deg, #f4f1ff 0%, #ede8ff 50%, #f4f1ff 100%);
    box-shadow: -1px 0 0 rgba(124,58,237,0.12), -24px 0 60px rgba(0,0,0,0.1);
  }
  body.light-theme #menu-panel::before {
    background: linear-gradient(180deg,
      transparent 0%, rgba(124,58,237,0.3) 20%,
      rgba(124,58,237,0.6) 50%, rgba(124,58,237,0.3) 80%, transparent 100%);
  }
  body.light-theme .mp-section-label::before { background: #7c3aed; }
  body.light-theme .menu-nav-item::after {
    background: linear-gradient(180deg, #7c3aed 0%, #4c1d95 100%);
  }

  /* ══ SIDEBAR TOGGLE BUTTON ═══════════════════════════════ */
  /* Hidden on mobile; positioned on left edge of sidebar */
  .sidebar-toggle-btn {
    display: flex; align-items: center; justify-content: center;
    position: absolute;
    top: 50%; right: 290px;
    transform: translateY(-50%);
    width: 22px; height: 52px;
    background: rgba(10,6,28,0.95);
    border: 1px solid rgba(139,92,246,0.28);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: rgba(167,139,250,0.8);
    cursor: pointer;
    z-index: 60;
    transition: right 0.32s cubic-bezier(0.4,0,0.2,1),
                background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: -4px 0 16px rgba(0,0,0,0.35);
  }
  .sidebar-toggle-btn:hover {
    background: rgba(124,58,237,0.18);
    color: #c4b5fd;
    box-shadow: -6px 0 20px rgba(124,58,237,0.25);
  }
  .sidebar-toggle-btn svg {
    width: 13px; height: 13px;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    flex-shrink: 0;
  }

  /* ── Collapsed state ── */
  #menu-panel.sb-collapsed {
    transform: translateX(100%) !important;
  }
  .sidebar-toggle-btn.sb-collapsed {
    right: 0;
    border-radius: 10px 0 0 10px;
    border-right: none;
    border-left: 1px solid rgba(139,92,246,0.28);
  }
  .sidebar-toggle-btn.sb-collapsed svg {
    transform: scaleX(-1);   /* flips arrow: < becomes > */
  }

  /* Screens expand to fill full width when sidebar is collapsed */
  #app:has(#menu-panel.sb-collapsed) .screen {
    right: 0;
    transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
  }
  /* Normal transition when sidebar is visible */
  .screen {
    transition: opacity var(--transition), transform var(--transition),
                right 0.32s cubic-bezier(0.4,0,0.2,1);
  }

  body.light-theme .sidebar-toggle-btn {
    background: rgba(245,242,255,0.97);
    border-color: rgba(124,58,237,0.2);
    color: #7c3aed;
  }
  body.light-theme .sidebar-toggle-btn:hover {
    background: rgba(124,58,237,0.1);
    box-shadow: -6px 0 16px rgba(124,58,237,0.15);
  }

  /* ══ SIDEBAR TOGGLE — VISIBLE & PREMIUM ═════════════════ */
  @keyframes sbTogglePulse {
    0%,100% { box-shadow: -6px 0 24px rgba(124,58,237,0.45), 0 0 0 0 rgba(96,165,250,0); }
    50%      { box-shadow: -6px 0 36px rgba(96,165,250,0.75), 0 0 0 3px rgba(96,165,250,0.15); }
  }
  .sidebar-toggle-btn {
    width: 28px; height: 84px;
    background: linear-gradient(180deg,
      rgba(124,58,237,0.22) 0%,
      rgba(96,165,250,0.35) 50%,
      rgba(124,58,237,0.22) 100%);
    border: 1px solid rgba(96,165,250,0.55);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #bfdbfe;
    box-shadow: -6px 0 24px rgba(124,58,237,0.45);
    animation: sbTogglePulse 3s ease-in-out infinite;
  }
  .sidebar-toggle-btn:hover {
    background: linear-gradient(180deg,
      rgba(124,58,237,0.4) 0%,
      rgba(96,165,250,0.6) 50%,
      rgba(124,58,237,0.4) 100%);
    color: #fff;
    box-shadow: -8px 0 36px rgba(96,165,250,0.7);
    animation: none;
  }
  .sidebar-toggle-btn svg {
    width: 18px; height: 18px;
    stroke-width: 3;
  }
  .sidebar-toggle-btn.sb-collapsed {
    right: 0;
    border-radius: 12px 0 0 12px;
    border-left: 1px solid rgba(96,165,250,0.55);
    border-right: none;
  }
  body.light-theme .sidebar-toggle-btn {
    background: linear-gradient(180deg,
      rgba(124,58,237,0.12) 0%,
      rgba(124,58,237,0.22) 50%,
      rgba(124,58,237,0.12) 100%);
    border-color: rgba(124,58,237,0.45);
    color: #6d28d9;
    box-shadow: -4px 0 16px rgba(124,58,237,0.2);
  }

  /* ══ DESKTOP TYPOGRAPHY & LAYOUT REFINEMENTS ═══════════ */

  /* Screen headers — tighter on desktop */
  .screen-header {
    padding: 12px 20px 10px;
  }
  .screen-title {
    font-size: 0.95rem;
    letter-spacing: 0.14em;
  }

  /* Mission screen (quest-shop) — compact tabs */
  .shop-right-topbar {
    padding: 6px 10px 0;
  }
  .shop-tabs-bar {
    gap: 4px;
    padding: 6px 10px 8px;
  }
  .shop-tab {
    padding: 6px 5px;
    border-radius: 10px;
    gap: 2px;
    min-height: 44px;
  }
  .shop-tab-icon { width: 14px; height: 14px; }
  .shop-tab-icon svg { width: 14px; height: 14px; }
  .shop-tab-label {
    font-size: 6px;
  }
  /* Summary / progress bar under tabs */
  .shop-summary-bar, .rev-summary-bar {
    padding: 6px 14px 4px;
  }

  /* Revision subject rows — tighter */
  .rev-subject-header {
    padding: 11px 14px;
  }
  .rev-subj-name {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  /* Screen general content — comfortable max-width */
  .shop-right-body, .quest-shop-body {
    padding: 6px 14px 10px;
  }

  /* shop-gen-btn — tighter on desktop */
  .shop-gen-btn {
    padding: 14px !important;
    font-size: 0.76rem !important;
  }
  .shop-bottom-bar {
    padding: 8px 14px 12px;
  }

/* btn-back & btn-menu sizing */
.btn-back, .btn-menu {
  width: 32px; height: 32px;
  font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════
   SCREEN BATTLE — Mode Combat Flash Cards
══════════════════════════════════════════════════════════ */

@keyframes btPulseGlow {
  0%,100% { opacity:.5; transform:scale(1); }
  50%      { opacity:1;  transform:scale(1.12); }
}
@keyframes btShake {
  0%,100% { transform:translateX(0); }
  20%     { transform:translateX(-8px); }
  40%     { transform:translateX(8px); }
  60%     { transform:translateX(-5px); }
  80%     { transform:translateX(5px); }
}
@keyframes btBounce {
  0%,100% { transform:translateY(0) scale(1); }
  40%     { transform:translateY(-10px) scale(1.08); }
  70%     { transform:translateY(-4px) scale(1.03); }
}
@keyframes btTrophyPop {
  0%   { transform:translateX(-50%) scale(1); }
  40%  { transform:translateX(-50%) scale(1.35) rotate(-8deg); }
  70%  { transform:translateX(-50%) scale(1.1) rotate(4deg); }
  100% { transform:translateX(-50%) scale(1) rotate(0deg); }
}

/* ══════════════════════════════════════════════════════════
   BATTLE MODE — complete redesign
══════════════════════════════════════════════════════════ */

.bt-root { background: var(--bg); position: relative; }

/* ── Setup overlay ─────────────────────────────────────── */

/* ── Setup ──────────────────────────────────────────────── */
.bt-setup-overlay {
  position:absolute; inset:0; z-index:10;
  display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(124,58,237,.18) 0%, transparent 55%),
    var(--bg);
}
.bt-setup-card {
  width: min(340px,92%);
  background: rgba(10,7,26,.97);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 24px;
  padding: 28px 22px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 0 70px rgba(124,58,237,.2), 0 24px 64px rgba(0,0,0,.55);
}
.bt-setup-title-row {
  display: flex; align-items: center; gap: 10px;
  color: rgba(96,165,250,.6);
}
.bt-setup-title {
  font-family:'Orbitron',sans-serif; font-size: 1rem; font-weight: 900;
  letter-spacing: .15em; color: #fff;
  text-shadow: 0 0 20px rgba(96,165,250,.8);
}
.bt-setup-subtitle { font-size: .8rem; color: var(--text2); text-align: center; margin-top: -4px; }
.bt-setup-section {
  font-family:'Orbitron',sans-serif; font-size: .58rem; font-weight: 700;
  letter-spacing: .18em; color: var(--text3); text-transform: uppercase; align-self: flex-start;
}
.bt-setup-divider {
  width: 100%; height: 1px; background: rgba(255,255,255,.06); margin: 2px 0;
}
.bt-setup-vs-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; gap: 12px;
}
.bt-setup-fighter-col {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1;
}
.bt-setup-vs-badge {
  font-family:'Orbitron',sans-serif; font-size: 1.4rem; font-weight: 900;
  color: rgba(255,255,255,.25); flex-shrink: 0;
  text-shadow: 0 0 16px rgba(239,68,68,.4);
}
.bt-setup-avatar-ring, .bt-setup-monster-ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid rgba(124,58,237,.45);
  display: grid; place-items: center; position: relative;
  box-shadow: 0 0 20px rgba(124,58,237,.25);
  background: rgba(124,58,237,.07);
  overflow: hidden;
}
.bt-setup-monster-ring { border-color: rgba(239,68,68,.45); box-shadow: 0 0 20px rgba(239,68,68,.2); background: rgba(239,68,68,.07); }
.bt-setup-avatar-inner { width: 68px; height: 68px; }
.bt-setup-avatar-glow {
  position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.22) 0%, transparent 70%);
  pointer-events: none;
}
.bt-setup-avatar-glow-red { background: radial-gradient(circle, rgba(239,68,68,.2) 0%, transparent 70%); }
.bt-setup-fname {
  font-family:'Orbitron',sans-serif; font-size: .6rem; font-weight: 800;
  letter-spacing: .18em; color: var(--text3); text-transform: uppercase;
}
.bt-setup-fname-enemy { color: rgba(239,68,68,.6); }
.bt-setup-durations {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
}
.bt-dur-input {
  width: 80px; padding: 10px 14px; border-radius: 12px;
  background: rgba(124,58,237,.1); border: 1px solid rgba(139,92,246,.45);
  color: #fff; font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 700;
  text-align: center; outline: none;
  box-shadow: 0 0 12px rgba(124,58,237,.2);
  transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield;
  appearance: textfield;
}
.bt-dur-input::-webkit-inner-spin-button,
.bt-dur-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bt-dur-input:focus {
  border-color: rgba(96,165,250,.8); box-shadow: 0 0 18px rgba(124,58,237,.35);
}
.bt-dur-unit {
  font-family: 'Orbitron', sans-serif; font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; color: var(--text3); text-transform: uppercase;
}
.bt-setup-start {
  width: 100%; padding: 13px; border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #60a5fa 60%, #c026d3 100%);
  border: none; color: #fff; font-family:'Orbitron',sans-serif;
  font-size: .78rem; font-weight: 800; letter-spacing: .12em;
  cursor: pointer; margin-top: 2px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 0 24px rgba(124,58,237,.4);
  transition: filter .2s, box-shadow .2s;
}
.bt-setup-start:hover { filter:brightness(1.1); box-shadow:0 0 36px rgba(124,58,237,.6); }
.bt-setup-cancel {
  background: transparent; border: none; color: var(--text3);
  font-size: .76rem; cursor: pointer; padding: 2px 8px; transition: color .15s;
}
.bt-setup-cancel:hover { color: var(--text2); }

/* ── Fight wrapper ──────────────────────────────────────── */
.bt-fight-wrap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 120% 35% at 50% 0%,  rgba(239,68,68,.08)   0%, transparent 50%),
    radial-gradient(ellipse 80%  30% at 50% 100%, rgba(124,58,237,.12)  0%, transparent 50%),
    var(--bg);
}

/* ── Header ─────────────────────────────────────────────── */
.bt-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px 10px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.bt-quit-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--text2); cursor: pointer; display: grid; place-items: center;
  flex-shrink: 0; font-size: .8rem; transition: background .15s;
}
.bt-quit-btn:hover { background:rgba(239,68,68,.15); color:#f87171; }
.bt-header-mid {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
}
.bt-subject-name {
  font-family:'Orbitron',sans-serif; font-size: .65rem; font-weight: 700;
  letter-spacing: .1em; color: var(--purple-l); text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.bt-score-row { display: flex; align-items: center; gap: 6px; font-size: .72rem; }
.bt-score-good { color: #4ade80; font-weight: 700; }
.bt-score-bad  { color: #f87171; font-weight: 700; }
.bt-score-sep  { color: var(--text3); }
.bt-timer-col {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0;
}
.bt-timer {
  font-family:'Orbitron',sans-serif; font-size: .85rem; font-weight: 800;
  letter-spacing: .08em; color: #fff;
}
.bt-timer.bt-timer-low { color: #f87171; animation: btPulseGlow .8s ease-in-out infinite; }
.bt-timer-bar-bg {
  width: 56px; height: 3px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden;
}
.bt-timer-bar {
  height: 100%; width: 100%; background: linear-gradient(90deg,#7c3aed,#60a5fa);
  border-radius: 99px; transition: width 1s linear;
}

/* ── Fight body (path + question) ───────────────────────── */
.bt-fight-body {
  flex: 1; display: flex; gap: 0; overflow: hidden; min-height: 0;
}

/* ══════════════════════════════════════════════════════════
   VERTICAL PATH PANEL
══════════════════════════════════════════════════════════ */
.bt-vpath-panel {
  flex: 0 0 160px; width: 160px;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 8px 10px;
  border-right: 1px solid rgba(255,255,255,.05);
  gap: 6px; overflow: hidden;
}

/* Monster section (top) */
.bt-vpath-enemy-top {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  position: relative;
}
.bt-vpath-enemy-glow {
  position: absolute; inset: -8px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(239,68,68,.18) 0%, transparent 70%);
  animation: btPulseGlow 2.5s ease-in-out infinite;
}
#bt-monster-fig {
  position: relative; z-index: 1; filter: drop-shadow(0 0 10px rgba(239,68,68,.45));
}

/* Player section (bottom) */
.bt-vpath-player-bottom {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
}
.bt-vpath-player-glow {
  position: absolute; inset: -12px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(124,58,237,.22) 0%, transparent 70%);
  animation: btPulseGlow 3s ease-in-out infinite;
}
.bt-vpath-label {
  font-family:'Orbitron',sans-serif; font-size: .52rem; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase; position: relative; z-index: 1;
}
.bt-vpath-label-enemy  { color: rgba(239,68,68,.7); }
.bt-vpath-label-player { color: rgba(124,58,237,.8); }
.bt-vpath-card-count {
  font-family:'Orbitron',sans-serif; font-size: .5rem; font-weight: 700;
  color: var(--text3); letter-spacing: .1em; position: relative; z-index: 1;
}

/* ── The vertical track ─────────────────────────────────── */
.bt-vtrack {
  flex: 1;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  width: 80px;
  min-height: 0;
  overflow: visible;
}

/* Glowing vertical line */
.bt-vtrack-line {
  position: absolute; left: 50%; top: 4px; bottom: 4px;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom,
    rgba(239,68,68,.55) 0%,
    rgba(239,68,68,.3) 40%,
    rgba(255,215,0,.5) 50%,
    rgba(124,58,237,.3) 60%,
    rgba(124,58,237,.55) 100%
  );
  box-shadow: 0 0 8px rgba(255,255,255,.1);
  z-index: 1;
}

/* Track nodes */
.bt-vnode {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  flex-shrink: 0; position: relative; z-index: 2;
}
.bt-vnode-enemy { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.1); }
.bt-vnode-player { border-color: rgba(124,58,237,.3); background: rgba(124,58,237,.1); }
.bt-vnode-base-enemy {
  width: 12px; height: 12px;
  background: rgba(239,68,68,.2); border: 2px solid rgba(239,68,68,.55);
  box-shadow: 0 0 8px rgba(239,68,68,.3);
}
.bt-vnode-base-player {
  width: 12px; height: 12px;
  background: rgba(124,58,237,.2); border: 2px solid rgba(124,58,237,.55);
  box-shadow: 0 0 8px rgba(124,58,237,.3);
}
.bt-vnode-trophy {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,200,0,.12);
  border: 2px solid rgba(255,200,0,.5);
  box-shadow: 0 0 18px rgba(255,200,0,.35), inset 0 0 8px rgba(255,200,0,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
  flex-shrink: 0;
  animation: btTrophyGlow 3s ease-in-out infinite;
}
@keyframes btTrophyGlow {
  0%,100% { box-shadow: 0 0 16px rgba(255,200,0,.3); }
  50% { box-shadow: 0 0 28px rgba(255,200,0,.55); }
}

/* ── Moveable avatar dots on track ─────────────────────── */
.bt-vdot {
  position: absolute; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  z-index: 10;
  transition: top .5s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.bt-vdot-player {
  border: 2px solid rgba(124,58,237,.85);
  background: rgba(10,5,25,.9);
  box-shadow: 0 0 16px rgba(124,58,237,.5), inset 0 0 12px rgba(124,58,237,.12);
}
.bt-vdot-monster {
  border: 2px solid rgba(239,68,68,.85);
  background: rgba(22,5,5,.9);
  box-shadow: 0 0 16px rgba(239,68,68,.5), inset 0 0 12px rgba(239,68,68,.12);
}
.bt-vdot.bt-attack   { animation: btBounceV .35s ease-out; }
.bt-vdot.bt-recoil   { animation: btShake   .3s ease-out; }

/* Player avatar inside dot */
#bt-player-avatar { width: 42px !important; height: 42px !important; }
#bt-player-avatar > div { width: 100% !important; height: 100% !important; }
#bt-player-avatar img, #bt-player-avatar svg { width: 100%; height: 100%; object-fit: contain; }

/* ── Question zone ──────────────────────────────────────── */
.bt-question-zone {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: 10px 14px 14px; gap: 9px; overflow: hidden;
}

/* Flip card */
.bt-flip-card { flex-shrink: 0; height: 120px; perspective: 900px; }
.bt-flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.bt-flip-inner.flipped { transform: rotateX(180deg); }
.bt-flip-front, .bt-flip-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 18px; padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  box-shadow: 0 4px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
}
.bt-flip-front {
  background: rgba(13,9,34,.92);
  border: 1px solid rgba(139,92,246,.25);
}
.bt-flip-back {
  background: rgba(8,22,14,.92);
  border: 1px solid rgba(74,222,128,.2);
  transform: rotateX(180deg);
  align-items: center; justify-content: center;
}
.bt-card-eyebrow {
  display: flex; align-items: center; gap: 5px;
  font-family:'Orbitron',sans-serif; font-size: .5rem; font-weight: 800;
  letter-spacing: .18em; color: rgba(96,165,250,.6); text-transform: uppercase;
}
.bt-card-back-icon { font-size: 1.8rem; line-height: 1; }
.bt-card-back-label {
  font-family:'Orbitron',sans-serif; font-size: .58rem; font-weight: 700;
  letter-spacing: .14em; color: rgba(74,222,128,.6);
}
.bt-question-text {
  font-size: .88rem; font-weight: 500; color: var(--text); line-height: 1.5;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical;
}

/* Reveal button */
.bt-reveal-btn {
  flex-shrink: 0; padding: 11px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(96,165,250,.1));
  border: 1px solid rgba(139,92,246,.38);
  color: #c4b5fd; font-size: .82rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, box-shadow .15s;
}
.bt-reveal-btn:hover { background:rgba(124,58,237,.38); box-shadow:0 0 14px rgba(124,58,237,.28); }

/* MCQ */
.bt-mcq { display: flex; flex-direction: column; gap: 7px; flex: 1; overflow: hidden; min-height: 0; }
.bt-mcq-eyebrow {
  font-family:'Orbitron',sans-serif; font-size: .5rem; font-weight: 700;
  letter-spacing: .16em; color: var(--text3); text-transform: uppercase; flex-shrink: 0;
}
.bt-mcq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; min-height: 0; }
.bt-mcq-btn {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  color: var(--text); text-align: left;
  font-family:'Inter',sans-serif; font-size: .8rem; font-weight: 500; line-height: 1.4;
  transition: background .14s, border-color .14s, box-shadow .14s;
  word-break: break-word;
}
.bt-mcq-btn:hover:not(:disabled) {
  background: rgba(124,58,237,.18); border-color: rgba(96,165,250,.35);
  box-shadow: 0 0 12px rgba(124,58,237,.18);
}
.bt-mcq-letter {
  font-family:'Orbitron',sans-serif; font-size: .6rem; font-weight: 800;
  color: var(--purple-l); flex-shrink: 0; margin-top: 1px;
}
.bt-mcq-text { flex: 1; }
.bt-mcq-btn.bt-mcq-correct {
  background: rgba(74,222,128,.18) !important; border-color: rgba(74,222,128,.6) !important;
  box-shadow: 0 0 14px rgba(74,222,128,.22) !important; color: #4ade80 !important;
}
.bt-mcq-btn.bt-mcq-wrong {
  background: rgba(239,68,68,.18) !important; border-color: rgba(239,68,68,.6) !important;
  box-shadow: 0 0 14px rgba(239,68,68,.22) !important; color: #f87171 !important;
}
.bt-mcq-btn:disabled { cursor: default; }

/* ── End overlay ────────────────────────────────────────── */
.bt-end-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.75); backdrop-filter: blur(16px);
}
.bt-end-card {
  width: min(310px,88%);
  background: rgba(9,6,25,.97);
  border: 1px solid rgba(139,92,246,.32);
  border-radius: 26px; padding: 30px 22px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 0 80px rgba(124,58,237,.22), 0 30px 80px rgba(0,0,0,.6);
  position: relative; overflow: hidden;
}
.bt-end-rays {
  position: absolute; inset: 0; pointer-events: none;
  background: conic-gradient(from 0deg at 50% 0%, rgba(96,165,250,.06) 0deg, transparent 60deg, rgba(96,165,250,.06) 120deg, transparent 180deg, rgba(96,165,250,.04) 240deg, transparent 300deg, rgba(96,165,250,.06) 360deg);
}
.bt-end-emoji { font-size: 3.2rem; line-height: 1; position: relative; }
.bt-end-title {
  font-family:'Orbitron',sans-serif; font-size: 1.2rem; font-weight: 900;
  letter-spacing: .14em; color: #fff;
  text-shadow: 0 0 24px rgba(96,165,250,.8); position: relative;
}
.bt-end-sub { font-size: .78rem; color: var(--text2); text-align: center; position: relative; }
.bt-end-stats {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 12px 20px; width: 100%;
  display: flex; justify-content: space-around;
  font-size: .78rem; color: var(--text2); position: relative;
}
.bt-end-stats span { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.bt-end-stats strong { font-size: 1.1rem; font-weight: 800; color: #fff; }
.bt-end-actions { display: flex; gap: 10px; width: 100%; margin-top: 4px; position: relative; }
.bt-end-replay {
  flex: 1; padding: 12px; border-radius: 13px;
  background: linear-gradient(135deg,#7c3aed,#60a5fa);
  border: none; color: #fff; font-family:'Orbitron',sans-serif;
  font-size: .68rem; font-weight: 800; letter-spacing: .1em;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 0 20px rgba(124,58,237,.35); transition: filter .2s;
}
.bt-end-replay:hover { filter: brightness(1.15); }
.bt-end-quit {
  padding: 12px 16px; border-radius: 13px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--text2); font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.bt-end-quit:hover { background: rgba(255,255,255,.1); }

/* ── Vertical bounce animation ──────────────────────────── */
@keyframes btBounceV {
  0%   { transform: translate(-50%,-50%) translateY(0); }
  40%  { transform: translate(-50%,-50%) translateY(-10px) scale(1.1); }
  100% { transform: translate(-50%,-50%) translateY(0) scale(1); }
}

/* ─── Battle button in flashcard browse ─────────────── */
.fc-browse-battle-btn {
  padding: 4px 11px 4px 9px; border-radius: 20px; font-size: .65rem; font-weight: 700;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.22);
  color: rgba(248,113,113,.75); cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: background .15s, border-color .18s, color .15s, box-shadow .18s;
  white-space: nowrap; flex-shrink: 0; letter-spacing: .05em;
}
.fc-browse-battle-btn:hover {
  background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.45);
  color: #f87171; box-shadow: 0 0 12px rgba(239,68,68,.2);
}


/* ══════════════════════════════════════════════════════════
   QUEST ACTIVE — 3-PANEL DESKTOP WORKSPACE
══════════════════════════════════════════════════════════ */

/* ── 3-column workspace layout ── */
.qa-col-quest {
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.qa-col-quest::-webkit-scrollbar { width: 3px; }
.qa-col-quest::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }

/* Screen is full-height container for the workspace */
#screen-quest-active.qa-journey-screen {
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
}

/* ── Mode VALIDATION d'un événement de planification (pas de carte mentale) ── */
#screen-quest-active.qa-mode-validate .qa-workspace { display:none !important; }
#screen-quest-active.qa-mode-validate #qa-timer,
#screen-quest-active.qa-mode-validate #btn-timer,
#screen-quest-active.qa-mode-validate .qa-hud-btn-done { display:none !important; }
.qa-event-validate { flex:1; display:flex; align-items:center; justify-content:center; padding:24px; position:relative; z-index:3; }
.qa-event-validate.hidden { display:none !important; }
.qav-evt-card {
  width:100%; max-width:440px; text-align:center;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.10);
  border-radius:24px; padding:38px 34px;
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  box-shadow:0 30px 80px -30px rgba(0,0,0,.6);
}
.qav-evt-icon {
  width:72px; height:72px; margin:0 auto 18px; border-radius:20px;
  display:flex; align-items:center; justify-content:center;
  color:#a78bfa; background:rgba(167,139,250,.14); border:1px solid rgba(167,139,250,.3);
}
.qav-evt-tag {
  font-family:"Satoshi",sans-serif; font-size:11px; font-weight:700; letter-spacing:.16em;
  text-transform:uppercase; color:rgba(167,139,250,.85); margin-bottom:10px;
}
.qav-evt-name { font-family:"Clash Display",sans-serif; font-weight:600; font-size:24px; color:#fff; margin:0 0 12px; line-height:1.2; }
.qav-evt-sub { font-family:"Satoshi",sans-serif; font-size:14px; color:rgba(255,255,255,.55); line-height:1.5; margin:0 0 26px; }
.qav-evt-actions { display:flex; flex-direction:column; gap:11px; }
.qav-evt-done {
  display:flex; align-items:center; justify-content:center; gap:9px;
  padding:15px; border:none; border-radius:14px; cursor:pointer;
  font-family:"Clash Display",sans-serif; font-weight:600; font-size:16px; color:#fff;
  background:linear-gradient(105deg,#34d399,#22c55e);
  box-shadow:0 14px 34px -12px rgba(34,197,94,.7);
  transition:.2s cubic-bezier(.2,.8,.2,1);
}
.qav-evt-done:hover { transform:translateY(-2px); box-shadow:0 20px 44px -12px rgba(34,197,94,.9); }
.qav-evt-missed {
  padding:12px; border:1px solid rgba(245,162,61,.35); border-radius:14px; cursor:pointer;
  font-family:"Satoshi",sans-serif; font-weight:600; font-size:14px; color:#f5a23d;
  background:rgba(245,162,61,.08); transition:.18s;
}
.qav-evt-missed:hover { background:rgba(245,162,61,.16); border-color:rgba(245,162,61,.55); }

/* ── Notification globale de fin d'événement ── */
.event-notif-overlay {
  position:fixed; inset:0; z-index:9000;
  display:flex; align-items:center; justify-content:center; padding:24px;
  background:rgba(8,6,20,.55); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  animation:eventNotifIn .25s ease;
}
.event-notif-overlay.hidden { display:none !important; }
@keyframes eventNotifIn { from { opacity:0; } to { opacity:1; } }
.event-notif-card { position:relative; animation:eventNotifPop .3s cubic-bezier(.2,.8,.2,1); }
@keyframes eventNotifPop { from { opacity:0; transform:translateY(12px) scale(.97); } to { opacity:1; transform:none; } }
.event-notif-close {
  position:absolute; top:14px; right:14px; width:30px; height:30px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:9px;
  color:rgba(255,255,255,.45); cursor:pointer; transition:.15s;
}
.event-notif-close:hover { color:#fff; background:rgba(255,255,255,.1); }

/* ── Boutons flottants néon (musique + plein écran), coin bas-gauche ──
   Anneau dégradé via padding-box / border-box (fond sombre + bordure dégradée). */
.music-toggle, .fs-toggle {
  position: fixed; bottom: 18px; z-index: 9500;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer; color: #B7A4FF; border: 2px solid transparent;
  background: linear-gradient(rgba(20,14,44,0.72), rgba(20,14,44,0.72)) padding-box,
              linear-gradient(135deg,#7C5CFF,#EC4FD0) border-box;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.10);
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s, color .2s;
}
.music-toggle { left: 18px; }
.fs-toggle    { left: 82px; }
.music-toggle svg, .fs-toggle svg { width: 22px; height: 22px; position: relative; z-index: 1; }
.music-toggle:hover, .fs-toggle:hover {
  color: #fff; transform: translateY(-2px);
  box-shadow: 0 0 22px -4px rgba(190,72,200,.8);
}
.music-toggle:active, .fs-toggle:active { transform: scale(.94); }

/* État actif : halo + anneau qui pulse (musique en lecture / plein écran activé) */
.music-toggle:not(.muted), body.is-fullscreen .fs-toggle {
  color: #fff;
  box-shadow: 0 0 26px -2px rgba(190,72,200,.9), inset 0 0 10px rgba(124,92,255,.6);
}
/* Anneau pulsé : uniquement sur la musique en lecture (pas en plein écran continu) */
.music-toggle:not(.muted)::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(236,79,208,.45);
  animation: nb-ring 1.6s ease-out infinite;
}
@keyframes nb-ring { 0%{transform:scale(.9);opacity:.8} 100%{transform:scale(1.25);opacity:0} }

/* Icônes centrées */
.nb-note, .nb-eq, .fs-toggle .fs-enter-icon, .fs-toggle .fs-exit-icon { display: grid; place-items: center; }

/* Musique : note statique (coupée) ↔ égaliseur animé (en lecture) */
.music-toggle .nb-note { display: none; }
.music-toggle.muted { color: #7d749e; }
.music-toggle.muted .nb-note { display: grid; }
.music-toggle.muted .nb-eq  { display: none; }
.nb-eq { gap: 3px; align-items: flex-end; height: 16px; color: inherit; }
.music-toggle:not(.muted) .nb-eq { display: flex; }
.nb-eq i {
  width: 3px; height: 100%; border-radius: 2px; background: currentColor;
  transform-origin: bottom; animation: nb-eq .9s ease-in-out infinite;
}
.nb-eq i:nth-child(2){ animation-delay:.15s }
.nb-eq i:nth-child(3){ animation-delay:.3s }
.nb-eq i:nth-child(4){ animation-delay:.45s }
@keyframes nb-eq { 0%,100%{transform:scaleY(.32)} 50%{transform:scaleY(1)} }

/* Plein écran : icône entrer ↔ sortir */
.fs-toggle .fs-exit-icon { display: none; }
body.is-fullscreen .fs-toggle .fs-enter-icon { display: none; }
body.is-fullscreen .fs-toggle .fs-exit-icon  { display: grid; }

/* Sur l'écran compagnon : aligné avec la barre du bas */
body:has(#screen-quest-companion.active) .music-toggle{
  left: 16px; bottom: calc(12px + env(safe-area-inset-bottom));
}
body:has(#screen-quest-companion.active) .fs-toggle{
  left: 80px; bottom: calc(12px + env(safe-area-inset-bottom));
}

@media (prefers-reduced-motion: reduce) {
  .nb-eq i, .music-toggle:not(.muted)::after { animation: none; }
}

/* Compact the journey timer */
.qa-journey-timer { font-size: 2.6rem; }
.qa-journey-header { padding: 16px 16px 8px; }
.qa-journey-controls { padding: 8px 14px 18px; gap: 7px; }
.qa-btn-start { padding: 12px; font-size: 0.72rem; }
.qa-btn-done { font-size: 0.54rem; padding: 9px; }

/* ── HUD barre quête compacte ── */
@keyframes hud-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes hud-pulse-glow {
  0%, 100% { text-shadow: 0 0 12px rgba(167,139,250,0.6), 0 0 30px rgba(139,92,246,0.3); }
  50%       { text-shadow: 0 0 20px rgba(251,191,36,0.8), 0 0 50px rgba(251,191,36,0.3); }
}
/* ── HUD bar — multicolor premium ── */
@keyframes hud-aurora {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes hud-rainbow-line {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}
.qa-hud-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  height: 56px;
  position: relative;
  flex-shrink: 0; z-index: 10;
  background: linear-gradient(105deg,
    #0d0220 0%, #120535 15%,
    #0a1540 30%, #071230 45%,
    #160830 60%, #0d0525 75%,
    #120318 100%);
  backdrop-filter: blur(24px) saturate(2);
  overflow: hidden;
  box-shadow:
    0 3px 30px rgba(100,50,255,0.2),
    0 1px 0 rgba(120,80,255,0.12) inset;
}
/* Animated aurora overlay */
.qa-hud-bar::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(99,102,241,0.18) 0%,
    rgba(139,92,246,0.14) 15%,
    rgba(217,70,239,0.16) 28%,
    rgba(236,72,153,0.18) 40%,
    rgba(251,113,133,0.12) 52%,
    rgba(251,191,36,0.10) 62%,
    rgba(52,211,153,0.13) 75%,
    rgba(56,189,248,0.15) 87%,
    rgba(99,102,241,0.18) 100%);
  background-size: 300% 100%;
  animation: hud-aurora 8s ease-in-out infinite;
  pointer-events: none;
}
/* Rainbow bottom line — removed */
.qa-hud-bar::after { display: none; }

/* ── RÉVISION badge ── */
.qa-hud-badge {
  font-family: 'Orbitron', sans-serif; font-size: 9px; font-weight: 900;
  letter-spacing: 0.2em; padding: 6px 14px; border-radius: 8px;
  position: relative;
  background: linear-gradient(135deg,
    rgba(99,102,241,0.35) 0%,
    rgba(139,92,246,0.4) 40%,
    rgba(217,70,239,0.35) 100%);
  color: #fff;
  text-shadow: 0 0 12px rgba(167,139,250,1), 0 0 24px rgba(217,70,239,0.6);
  border: 1px solid rgba(167,139,250,0.5);
  box-shadow:
    0 0 16px rgba(139,92,246,0.5),
    0 0 32px rgba(217,70,239,0.25),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.15);
  overflow: hidden;
}
.qa-hud-badge::before {
  content: '';
  position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  animation: badge-shine 3s ease-in-out infinite;
}
@keyframes badge-shine {
  0%   { left: -60%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

/* ── Timer ── */
.qa-hud-timer {
  font-family: 'Orbitron', sans-serif; font-size: 2rem; font-weight: 900;
  letter-spacing: 0.06em; min-width: 100px;
  background: linear-gradient(90deg, #a5f3fc 0%, #c4b5fd 40%, #f9a8d4 80%, #fde68a 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(167,139,250,0.55));
}

/* ── Separators ── */
.qa-hud-sep {
  width: 1px; height: 28px; flex-shrink: 0;
  background: linear-gradient(180deg,
    transparent, rgba(167,139,250,0.4) 30%,
    rgba(236,72,153,0.4) 70%, transparent);
}

/* ── Title (breadcrumb) ── */
.qa-hud-title {
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.9); flex: 1; letter-spacing: 0.01em;
  text-shadow: 0 0 20px rgba(167,139,250,0.3);
}

/* ── Coins ── */
.qa-hud-coins {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Orbitron', sans-serif; font-size: 13px; font-weight: 800;
  color: #c4b5fd;
  text-shadow: 0 0 12px rgba(139,92,246,0.6);
  padding: 6px 14px; border-radius: 20px;
  background: rgba(109,40,217,0.18);
  border: 1px solid rgba(139,92,246,0.3);
  box-shadow:
    0 0 14px rgba(109,40,217,0.2),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}

/* ── Démarrer button ── */
.qa-hud-btn-start {
  padding: 11px 28px; border-radius: 28px; border: none; cursor: pointer;
  position: relative; overflow: hidden;
  background: linear-gradient(120deg,
    #6366f1 0%, #8b5cf6 25%, #d946ef 55%, #ec4899 80%, #f97316 100%);
  background-size: 250% 250%;
  animation: hud-aurora 4s ease infinite;
  color: #fff; font-family: 'Orbitron', sans-serif; font-size: 11px;
  font-weight: 900; letter-spacing: 0.14em;
  box-shadow:
    0 0 22px rgba(139,92,246,0.5),
    0 0 40px rgba(217,70,239,0.25),
    0 4px 20px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  transition: transform .15s, box-shadow .15s;
}
.qa-hud-btn-start::before {
  content: '';
  position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  animation: badge-shine 3s ease-in-out infinite;
}
.qa-hud-btn-start:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 0 40px rgba(139,92,246,0.7),
    0 0 60px rgba(217,70,239,0.35),
    0 8px 25px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.3);
}
.qa-hud-btn-done {
  padding: 11px 22px; border-radius: 28px; cursor: pointer;
  position: relative; overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  background-clip: padding-box;
  color: rgba(200,220,255,0.85);
  font-family: 'Orbitron', sans-serif; font-size: 10px;
  font-weight: 700; letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.3),
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 2px 12px rgba(0,0,0,0.3);
  transition: all .2s;
}
.qa-hud-btn-done::after {
  content: '';
  position: absolute; inset: 0; border-radius: 28px;
  background: linear-gradient(120deg,
    rgba(99,102,241,0.08), rgba(52,211,153,0.06), rgba(56,189,248,0.08));
  pointer-events: none;
}
.qa-hud-btn-done:hover {
  background: rgba(52,211,153,0.1);
  box-shadow:
    0 0 0 1px rgba(52,211,153,0.55),
    0 0 20px rgba(52,211,153,0.3),
    inset 0 1px 0 rgba(52,211,153,0.15);
  color: #6ee7b7;
  text-shadow: 0 0 10px rgba(52,211,153,0.6);
  transform: translateY(-1px);
}

/* Center panel — Flash Cards */
.qa-col-fc {
  display: flex; flex-direction: column;
  flex: 1 1 100% !important;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 35% at 50% 0%, rgba(124,58,237,0.12) 0%, transparent 55%),
    linear-gradient(180deg, #050312 0%, #08051e 100%);
}

/* Right panel — La Salle */
.qa-col-salle {
  display: flex; flex-direction: column;
  min-width: 0;
  overflow-y: auto; overflow-x: hidden;
  background: rgba(4,3,26,0.6);
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.qa-col-salle::-webkit-scrollbar { width: 3px; }
.qa-col-salle::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }

/* All inner content must not overflow its panel */
.qa-col-quest *,
.qa-col-fc *,
.qa-col-salle * {
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Panel shared header ── */
.qa-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}
.qa-panel-header svg { color: rgba(167,139,250,0.7); flex-shrink: 0; }
.qa-panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(167,139,250,0.85);
  white-space: nowrap;
}

/* ── FC panel subject pills ── */
.qa-fc-subj-bar {
  display: flex; gap: 6px; overflow-x: auto; flex: 1;
  scrollbar-width: none; padding-left: 8px;
}
.qa-fc-subj-bar::-webkit-scrollbar { display: none; }
.qa-fc-subj-pill {
  flex-shrink: 0; padding: 4px 12px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s;
}
.qa-fc-subj-pill.active {
  background: rgba(124,58,237,0.2);
  border-color: rgba(96,165,250,0.4);
  color: #c4b5fd;
}

/* ── FC panel progress bar ── */
.qa-fc-progress {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 6px; flex-shrink: 0;
}
.qa-fc-prog-bg {
  flex: 1; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.qa-fc-prog-fill {
  height: 100%; width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  transition: width 0.3s;
}
#qa-fc-prog-lbl {
  font-size: 0.65rem; color: rgba(255,255,255,0.55); font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}

/* ── FC panel area (browse + play) ── */
.qa-fc-area {
  flex: 1; overflow-y: auto; padding: 10px 12px 14px;
  scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.25) transparent;
  position: relative;
}
.qa-fc-area::-webkit-scrollbar { width: 3px; }
.qa-fc-area::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }

/* Play mode: center card vertically */
.qa-fc-area.playing {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden; padding: 0;
}
.qa-fc-area.playing > * { position: relative; z-index: 1; }
.qa-fc-area.playing .qa-fc-card-scene { width: 100%; }

/* Starfield canvas — behind everything */
.qa-fc-stars-canvas {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.55;
}

/* Sparkle particles burst on flip */
.qa-fc-spark {
  position: fixed; pointer-events: none; z-index: 9999;
  border-radius: 50%;
  animation: qa-sparkle var(--dur, 0.75s) ease-out forwards;
}
@keyframes qa-sparkle {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  60%  { opacity: 0.8; }
  100% { transform: translate(var(--tx),var(--ty)) scale(0); opacity: 0; }
}

/* Solo back button inside area */
.qa-fc-solo-play-back {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.3);
  border-radius: 8px; padding: 5px 10px; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 0.5rem; font-weight: 700;
  color: #a78bfa; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 5px;
  transition: background 0.15s;
}
.qa-fc-solo-play-back:hover { background: rgba(139,92,246,0.28); }

/* Browse grid in panel */
.qa-fc-browse { display: flex; flex-direction: column; gap: 16px; }
.qa-fc-subj-block { display: flex; flex-direction: column; gap: 10px; }
.qa-fc-subj-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.qa-fc-chaps-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.qa-fc-chap-card {
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.14s, background 0.14s, transform 0.14s;
}
.qa-fc-chap-card:hover {
  background: rgba(124,58,237,0.12); border-color: rgba(96,165,250,0.25);
  transform: translateY(-1px);
}
.qa-fc-chap-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 700;
  color: #fff; letter-spacing: 0.04em; line-height: 1.35;
}
.qa-fc-chap-meta {
  font-size: 0.6rem; color: rgba(255,255,255,0.5);
}
.qa-fc-play-all {
  width: 100%; padding: 8px; border-radius: 8px; cursor: pointer;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(96,165,250,0.3);
  color: #c4b5fd; font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em;
  transition: background 0.14s, box-shadow 0.14s;
}
.qa-fc-play-all:hover { background: rgba(124,58,237,0.25); box-shadow: 0 0 10px rgba(124,58,237,0.3); }

/* Play card in panel — premium gamified */
.qa-fc-card-scene {
  display: flex; justify-content: center;
  padding: 10px 10px 4px;
  perspective: 1200px;
}
/* Flipper container — must have explicit height so faces can be absolute */
.qa-fc-flipper {
  width: 100%; max-width: 460px;
  height: 260px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
/* hover glow via box-shadow on faces — avoids filter which would flatten preserve-3d */
.qa-fc-flipper:hover .qa-fc-face-front {
  box-shadow: 0 0 0 1px rgba(139,92,246,0.25), 0 12px 40px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(167,139,250,0.15), 0 0 28px rgba(109,40,217,0.45);
}
.qa-fc-flipper:hover .qa-fc-face-back {
  box-shadow: 0 0 0 1px rgba(52,211,153,0.25), 0 12px 40px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(110,231,183,0.12), 0 0 28px rgba(52,211,153,0.3);
}

/* Both faces: absolute, full size, fully opaque background — critical to hide opposite face */
.qa-fc-face {
  position: absolute; inset: 0;
  border-radius: 20px; padding: 18px 20px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
}
/* Safety: force-hide inactive face so recto never bleeds through the back */
.qa-fc-face-back { visibility: hidden; transition: visibility 0s linear 0.25s; }
.qa-fc-flipper.flipped .qa-fc-face-back { visibility: visible; transition: visibility 0s; }
.qa-fc-flipper.flipped .qa-fc-face-front { visibility: hidden; transition: visibility 0s linear 0.25s; }

/* RECTO — deep purple, fully opaque */
.qa-fc-face-front {
  background: #0d0820;
  border: 1px solid rgba(139,92,246,0.35);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.1), 0 12px 40px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(167,139,250,0.15);
}
/* Subtle grid pattern on recto */
.qa-fc-face-front::before {
  content: '';
  position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background-image:
    linear-gradient(rgba(139,92,246,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
/* Purple glow blobs */
.qa-fc-face-front::after {
  content: '';
  position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(139,92,246,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 15% 85%, rgba(109,40,217,0.14) 0%, transparent 45%);
}

/* VERSO — deep dark green, fully opaque */
.qa-fc-face-back {
  transform: rotateY(180deg);
  background: #050f0a;
  border: 1px solid rgba(52,211,153,0.3);
  box-shadow: 0 0 0 1px rgba(52,211,153,0.07), 0 12px 40px rgba(0,0,0,0.6),
              inset 0 1px 0 rgba(110,231,183,0.12);
}
.qa-fc-face-back::after {
  content: '';
  position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(16,185,129,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 85%, rgba(6,182,212,0.1) 0%, transparent 45%);
}

.qa-fc-badge {
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; opacity: 0.6;
  position: relative; z-index: 1;
  flex-shrink: 0;
}
.qa-fc-front-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem; font-weight: 700; line-height: 1.5;
  color: #ede9fe; flex: 1;
  text-shadow: 0 0 18px rgba(139,92,246,0.45);
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; text-align: center;
}

/* Verso mind-map tree */
.qa-fc-back-tree {
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
  overflow: auto; position: relative; z-index: 1;
  padding: 2px 4px 4px;
  scrollbar-width: thin; scrollbar-color: rgba(52,211,153,0.2) transparent;
}
.qa-fc-back-tree::-webkit-scrollbar { width: 3px; height: 3px; }
.qa-fc-back-tree::-webkit-scrollbar-thumb { background: rgba(52,211,153,0.3); border-radius: 2px; }

/* Verso structured lines (fallback / non-tree cards) */
.qa-fc-back-lines {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
  position: relative; z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(52,211,153,0.2) transparent;
}
.qa-fc-back-line {
  font-size: 0.88rem; line-height: 1.55;
  color: rgba(209,250,229,0.92);
  font-family: 'Inter', sans-serif;
}
.qa-fc-back-indent {
  font-size: 0.82rem; color: rgba(167,243,208,0.7);
  padding-left: 4px;
}

/* Hint + rating */
.qa-fc-hint {
  text-align: center; color: rgba(255,255,255,0.4); font-size: 0.68rem;
  padding: 4px 14px 8px; flex-shrink: 0;
  letter-spacing: 0.05em;
}
.qa-fc-rating {
  display: flex; gap: 10px; padding: 8px 14px 16px; flex-shrink: 0;
}
.qa-fc-btn-retry, .qa-fc-btn-ok {
  flex: 1; padding: 11px 8px; border-radius: 12px; border: none;
  font-size: 0.68rem; font-weight: 800; cursor: pointer;
  font-family: 'Orbitron', sans-serif; letter-spacing: 0.05em;
  transition: all 0.18s ease; position: relative; overflow: hidden;
}
.qa-fc-btn-retry {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(248,113,113,0.1);
}
.qa-fc-btn-retry:hover {
  background: rgba(248,113,113,0.2);
  box-shadow: 0 0 20px rgba(248,113,113,0.25);
  color: #fecaca;
}
.qa-fc-btn-ok {
  background: linear-gradient(135deg, #7c3aed, #60a5fa, #ec4899);
  color: #fff;
  box-shadow: 0 0 16px rgba(124,58,237,0.4), 0 4px 12px rgba(0,0,0,0.3);
  border: 1px solid rgba(167,139,250,0.3);
}
.qa-fc-btn-ok:hover {
  box-shadow: 0 0 26px rgba(124,58,237,0.6), 0 4px 16px rgba(0,0,0,0.4);
  filter: brightness(1.1);
}
.qa-fc-btn-ok::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent 60%);
  pointer-events: none;
}

/* ── Salle panel ── */
.qa-salle-tabs-bar {
  display: flex; gap: 4px; padding: 8px 10px 6px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.qa-salle-tab {
  flex: 1; padding: 5px 6px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55); font-size: 0.65rem; font-weight: 600;
  cursor: pointer; transition: background 0.14s, color 0.14s;
  font-family: 'Inter', sans-serif;
}
.qa-salle-tab.active {
  background: rgba(124,58,237,0.2); border-color: rgba(96,165,250,0.35);
  color: #c4b5fd;
}
.qa-salle-list {
  flex: 1; overflow-y: auto; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.qa-sv-card {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  transition: background 0.13s, border-color 0.13s;
}
.qa-sv-card:hover { background: rgba(124,58,237,0.12); border-color: rgba(96,165,250,0.2); }
.qa-sv-abbr {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #60a5fa);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif; font-size: 0.58rem; font-weight: 800; color: #fff;
}
.qa-sv-body { flex: 1; min-width: 0; }
.qa-sv-name {
  font-size: 0.72rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qa-sv-meta { font-size: 0.6rem; color: rgba(255,255,255,0.45); margin-top: 2px; }
.qa-sv-badge {
  font-size: 0.52rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; flex-shrink: 0;
}
.qa-sv-badge.public { background: rgba(52,211,153,0.15); color: #34d399; }
.qa-sv-badge.promo  { background: rgba(96,165,250,0.15); color: #c4b5fd; }
.qa-sv-badge.prive  { background: rgba(245,158,11,0.15); color: #fbbf24; }
.qa-salle-footer {
  padding: 10px 10px 16px; flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.qa-salle-open-btn {
  width: 100%; padding: 9px; border-radius: 10px; cursor: pointer;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(96,165,250,0.25);
  color: #c4b5fd; font-size: 0.65rem; font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: background 0.14s;
}
.qa-salle-open-btn:hover { background: rgba(124,58,237,0.25); }
.qa-salle-empty {
  text-align: center; padding: 24px 12px;
  color: rgba(255,255,255,0.35); font-size: 0.72rem; line-height: 1.6;
}

/* ── Salle embarquée dans le panneau (vue liste / vue room) ── */
#qa-salle-view-list { width: 100%; }
#qa-salle-view-room {
  width: 100%;
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
}

/* Room topbar */
.qa-sr-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.qa-sr-back {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; cursor: pointer; color: rgba(196,181,253,0.8);
  transition: background 0.12s;
}
.qa-sr-back:hover { background: rgba(124,58,237,0.2); }
.qa-sr-info { flex: 1; min-width: 0; }
.qa-sr-name {
  display: block; font-size: 0.75rem; font-weight: 700;
  color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qa-sr-count { font-size: 0.62rem; color: rgba(255,255,255,0.4); }

/* Tableau noir mini */
.qa-sr-board-wrap {
  padding: 8px 10px 4px;
  flex-shrink: 0;
}
.qa-sr-board {
  background: #1a1430;
  border: 2px solid rgba(109,40,217,0.5);
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em;
  color: rgba(216,180,254,0.85);
  box-shadow: 0 0 10px rgba(109,40,217,0.25);
}

/* Stats */
.qa-sr-stats {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  font-size: 0.62rem; color: rgba(255,255,255,0.45);
}
.qa-sr-dot { color: rgba(255,255,255,0.2); }

/* Mini scène salle — vraies tables + avatars */
.qa-sr-scene {
  position: relative;
  flex: 1;
  min-height: 120px;
  margin: 4px 6px;
  background: linear-gradient(180deg, rgba(10,6,28,0.7) 0%, rgba(6,3,18,0.95) 100%);
  border-radius: 8px;
  border: 1px solid rgba(109,40,217,0.18);
  overflow: hidden;
}
.qa-sr-window {
  position: absolute; top: 6px;
  width: 14px; height: 18px;
  background: rgba(127,119,221,0.06);
  border: 1px solid rgba(127,119,221,0.12);
  border-radius: 2px 2px 0 0;
}
.qa-sr-window-l { left: 8px; }
.qa-sr-window-r { right: 8px; }
.qa-sr-floor {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 10px;
  background: rgba(109,40,217,0.1);
  border-top: 1px solid rgba(139,92,246,0.15);
}
/* Grid of mini student tables */
.qa-sr-tables {
  position: absolute; inset: 20px 20px 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-content: center;
}

/* Each student table in the mini panel */
.qsr-table {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.qsr-avatar-wrap {
  position: relative;
}
.qsr-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 7px; font-weight: 700; color: white;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.3s;
}
.qsr-avatar.pause { opacity: 0.45; }
.qsr-online-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 6px; height: 6px; border-radius: 50%;
  border: 1.5px solid #06031c;
}
.qsr-online-dot.green  { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.8); }
.qsr-online-dot.yellow { background: #EF9F27; box-shadow: 0 0 3px rgba(239,159,39,0.7); }
.qsr-online-dot.grey   { background: rgba(255,255,255,0.22); }
.qsr-status-ico {
  position: absolute; top: -2px; right: -3px;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.9));
}
.qsr-surface {
  width: 34px; height: 18px;
  background: rgba(127,119,221,0.1);
  border: 1px solid rgba(127,119,221,0.18);
  border-radius: 4px;
}
.qsr-pseudo {
  font-family: 'Inter', sans-serif;
  font-size: 7px; color: rgba(255,255,255,0.38);
  letter-spacing: 0.03em; text-align: center;
  max-width: 38px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Feed */
.qa-sr-feed { padding: 4px 10px; min-height: 22px; }
.qa-sr-feed-msg {
  font-size: 0.62rem; color: rgba(196,181,253,0.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Bouton rejoindre */
.qa-sr-btn-wrap { padding: 6px 10px 10px; }
.qa-sr-join-btn {
  width: 100%; padding: 7px;
  border-radius: 7px; border: 1px solid rgba(139,92,246,0.4);
  background: rgba(88,28,235,0.18); color: #c4b5fd;
  font-size: 0.7rem; font-weight: 600; cursor: pointer;
  transition: background 0.13s;
}
.qa-sr-join-btn:hover { background: rgba(109,40,217,0.32); }
.qa-sr-join-btn.leaving {
  background: rgba(220,38,38,0.15);
  border-color: rgba(252,165,165,0.3);
  color: rgba(252,165,165,0.85);
}

/* ══════════════════════════════════════════════════════════
   QUEST ACTIVE — MODULABLE WORKSPACE (drag + resize)
══════════════════════════════════════════════════════════ */

/* Workspace container — flex row, fills the screen */
.qa-workspace {
  display: flex;
  flex-direction: row;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Each panel — flex-basis driven by data-flex via JS inline style */
.qa-col {
  display: flex;
  flex-direction: column;
  min-width: 44px;   /* collapsed minimum — still shows drag handle */
  overflow: hidden;
  position: relative;
  transition: flex-basis 0.05s linear;
}

/* When a panel is very narrow (< 80px), hide its inner content gracefully */
.qa-col.qa-col--collapsed > *:not(.qa-drag-handle) {
  opacity: 0;
  pointer-events: none;
}

/* ── Drag handle (top of each panel) ── */
.qa-drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  flex-shrink: 0;
  cursor: grab;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s;
  position: relative;
  z-index: 1;
}
.qa-drag-handle:hover {
  background: rgba(139,92,246,0.12);
  border-bottom-color: rgba(139,92,246,0.25);
}
.qa-drag-handle:active { cursor: grabbing; }

/* Drag dots — 6-dot grip pattern */
.qa-drag-dots {
  display: flex;
  flex-wrap: wrap;
  width: 10px;
  gap: 2px;
}
.qa-drag-dots::before,
.qa-drag-dots::after {
  content: '';
  display: block;
  width: 10px;
  height: 4px;
  background-image: radial-gradient(circle, rgba(139,92,246,0.55) 1.5px, transparent 1.5px);
  background-size: 4px 4px;
  background-repeat: repeat-x;
}

/* Panel icon inside drag handle */
.qa-panel-icon {
  font-size: 0.8rem;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Panel label shown in drag handle (optional, hidden when panel is narrow) */
.qa-panel-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(167,139,250,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  max-width: 80px;
}

/* ── Resize bar between panels ── */
.qa-resize-bar {
  flex: 0 0 5px;
  min-width: 5px;
  max-width: 5px;
  background: rgba(255,255,255,0.04);
  cursor: col-resize;
  position: relative;
  z-index: 10;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qa-resize-bar::after {
  content: '';
  width: 1px;
  height: 40px;
  border-radius: 1px;
  background: rgba(139,92,246,0.3);
  transition: background 0.15s, height 0.15s;
}
.qa-resize-bar:hover,
.qa-resize-bar.qa-resize-bar--active {
  background: rgba(139,92,246,0.15);
}
.qa-resize-bar:hover::after,
.qa-resize-bar.qa-resize-bar--active::after {
  background: rgba(167,139,250,0.75);
  height: 60px;
}

/* Dragging ghost style — panel being dragged */
.qa-col.qa-col--dragging {
  opacity: 0.45;
  outline: 2px dashed rgba(139,92,246,0.6);
}

/* Drop target highlight */
.qa-col.qa-col--drop-target {
  outline: 2px solid rgba(167,139,250,0.55);
  background: rgba(139,92,246,0.07);
}

/* Prevent text selection during resize */
body.qa-resizing * {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: col-resize !important;
}

/* Inner content wrappers fill the panel after the drag handle */
#qa-col-fc,
#qa-col-salle {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.qa-workspace {
  flex-direction: row;
}
.qa-col {
  height: 100%;
}

/* ══════════════════════════════════════════════════════════
   APPRENTISSAGE ACTIF — Intercalaires (tabs)
══════════════════════════════════════════════════════════ */

/* ── Tab bar — modern pill row ── */
.aa-tabs-bar {
  display: flex; flex-direction: row; gap: 4px; flex-shrink: 0;
  justify-content: center;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(109,40,217,0.1);
  background: rgba(255,255,255,0.92);
  overflow-x: auto; scrollbar-width: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.aa-tabs-bar::-webkit-scrollbar { display: none; }

.aa-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(109,40,217,0.4);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em;
  cursor: pointer; white-space: nowrap;
  transition: all 0.18s ease; position: relative;
}

.aa-tab[data-tab="mindmap"]:hover { background: rgba(109,40,217,0.08); color: rgba(109,40,217,0.75); border-color: rgba(109,40,217,0.15); }
.aa-tab[data-tab="mindmap"].active {
  background: rgba(109,40,217,0.12);
  border-color: rgba(109,40,217,0.35); color: #5b21b6;
  box-shadow: 0 1px 8px rgba(109,40,217,0.12);
  text-shadow: none;
}
.aa-tab[data-tab="mindmap"].active::after { display: none; }

.aa-tab[data-tab="flashcards"]:hover { background: rgba(6,182,212,0.08); color: rgba(6,182,212,0.8); border-color: rgba(6,182,212,0.15); }
.aa-tab[data-tab="flashcards"].active {
  background: rgba(6,182,212,0.1);
  border-color: rgba(6,182,212,0.35); color: #0e7490;
  box-shadow: 0 1px 8px rgba(6,182,212,0.1);
  text-shadow: none;
}
.aa-tab[data-tab="flashcards"].active::after { display: none; }

.aa-tab[data-tab="exam1h"]:hover { background: rgba(217,119,6,0.08); color: rgba(217,119,6,0.8); border-color: rgba(217,119,6,0.15); }
.aa-tab[data-tab="exam1h"].active {
  background: rgba(217,119,6,0.1);
  border-color: rgba(217,119,6,0.35); color: #92400e;
  box-shadow: 0 1px 8px rgba(217,119,6,0.1);
  text-shadow: none;
}
.aa-tab[data-tab="exam1h"].active::after { display: none; }

.aa-tab[data-tab="constellation"]:hover { background: rgba(192,38,211,0.08); color: rgba(192,38,211,0.8); border-color: rgba(192,38,211,0.15); }
.aa-tab[data-tab="constellation"].active {
  background: rgba(192,38,211,0.1);
  border-color: rgba(192,38,211,0.35); color: #86198f;
  box-shadow: 0 1px 8px rgba(192,38,211,0.1);
  text-shadow: none;
}
.aa-tab[data-tab="constellation"].active::after { display: none; }

.aa-tab svg { flex-shrink: 0; }

/* ── Solo mode (from screen-apprentissage, no quest) ── */
.qa-workspace.qa-solo-mode .qa-col-quest,
.qa-workspace.qa-solo-mode .qa-col-salle,
.qa-workspace.qa-solo-mode #qa-resize-1,
.qa-workspace.qa-solo-mode #qa-resize-2 {
  display: none !important;
}
.qa-workspace.qa-solo-mode .qa-col-fc {
  flex: 1 1 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
.aa-solo-back-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(139,92,246,0.25);
  border-bottom: none;
  background: rgba(109,40,217,0.15);
  color: #a78bfa;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem; font-weight: 700; letter-spacing: 0.06em;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.aa-solo-back-btn:hover { background: rgba(109,40,217,0.28); color: #c4b5fd; }
.aa-solo-back-btn svg { opacity: 0.8; }

/* ── Flash cards solo back ── */
.qa-fc-solo-back {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; margin: 6px 10px 0;
  border-radius: 8px; border: 1px solid rgba(139,92,246,0.25);
  background: rgba(109,40,217,0.1); color: #a78bfa;
  font-size: 0.62rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
}
.qa-fc-solo-back:hover { background: rgba(109,40,217,0.22); color: #c4b5fd; }

/* ── Panes ── */
.aa-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.aa-pane.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE
══════════════════════════════════════════════════════════ */

/* Subject selector bar */
.aa-mm-subj-bar {
  display: none;
}
.aa-mm-subj-bar::-webkit-scrollbar { display: none; }

.aa-mm-subj-pill {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 99px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s;
}
.aa-mm-subj-pill.active {
  background: rgba(124,58,237,0.22);
  border-color: rgba(96,165,250,0.45);
  color: #c4b5fd;
}

/* Toolbar */
.aa-mm-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  flex-shrink: 0;
  background: linear-gradient(90deg,
    rgba(8,4,24,0.96) 0%,
    rgba(12,6,32,0.96) 50%,
    rgba(8,4,24,0.96) 100%);
  border-bottom: 1px solid rgba(124,58,237,0.12);
  flex-wrap: nowrap;
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(167,139,250,0.06), 0 4px 16px rgba(0,0,0,0.3);
}

/* Toggle button */
.aa-mm-toolbar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 6px; cursor: pointer;
  color: rgba(167,139,250,0.8);
  transition: background 0.13s, transform 0.2s;
}
.aa-mm-toolbar-toggle:hover { background: rgba(124,58,237,0.3); }
.aa-mm-toolbar-toggle .aa-mm-toggle-icon {
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.aa-mm-toolbar-toggle.rotated .aa-mm-toggle-icon { transform: rotate(-90deg); }

/* Groups wrapper — collapses */
.aa-mm-toolbar-groups {
  display: flex; align-items: center; gap: 6px;
  overflow: hidden;
  max-width: 2000px;
  transition: max-width 0.3s cubic-bezier(.4,0,.2,1), opacity 0.25s;
  opacity: 1;
  flex-shrink: 1;
  min-width: 0;
}
.aa-mm-toolbar-groups.collapsed {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
}

/* Each group — pill container */
.aa-mm-tgroup {
  display: flex; align-items: center; gap: 3px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 3px 5px;
}

/* Remove labels entirely — they clutter */
.aa-mm-tool-label { display: none; }

/* Buttons — flat, clean, icon-only */
.aa-mm-shape-btn, .aa-mm-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 26px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(167,139,250,0.55);
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
  flex-shrink: 0;
}
.aa-mm-shape-btn:hover, .aa-mm-tool-btn:hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(139,92,246,0.35);
  color: #c4b5fd;
}
.aa-mm-shape-btn.active {
  background: rgba(124,58,237,0.32);
  border-color: rgba(139,92,246,0.65);
  color: #e9d5ff;
  box-shadow: 0 0 10px rgba(124,58,237,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Separators — subtle dot instead of line */
.aa-mm-toolbar-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(167,139,250,0.2);
  flex-shrink: 0;
  margin: 0 3px;
  align-self: center;
}

.aa-mm-tool-btn { width: 28px; }

/* Action buttons (right side) — slightly more visible */
.aa-mm-hist-btn {
  width: 28px !important;
  height: 26px !important;
  background: rgba(88,28,235,0.15) !important;
  border: 1px solid rgba(139,92,246,0.4) !important;
  color: rgba(196,181,253,0.9) !important;
  box-shadow: none;
  transition: all 0.12s !important;
  border-radius: 7px !important;
}
.aa-mm-hist-btn:hover {
  background: rgba(109,40,217,0.3) !important;
  border-color: rgba(192,132,252,0.65) !important;
  box-shadow: 0 0 12px rgba(139,92,246,0.4) !important;
  color: #ede9fe !important;
}
.aa-mm-hist-btn:active {
  transform: scale(0.9) !important;
}

/* ══════════════════════════════════════
   SAGE — Interface de session guidée
══════════════════════════════════════ */
.sage-upload-screen {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(30,10,70,0.97), rgba(4,2,15,0.99));
}
.sage-upload-card {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 40px; max-width: 420px; text-align: center;
}
.sage-upload-avatar { border-radius: 50%; }
.sage-upload-bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 16px; padding: 16px 22px;
  color: rgba(255,255,255,0.85); font-family: 'Inter', sans-serif;
  font-size: 15px; line-height: 1.6;
  box-shadow: 0 0 30px rgba(139,92,246,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
}
.sage-upload-bubble::before {
  content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  border: 8px solid transparent; border-bottom-color: rgba(167,139,250,0.3);
  border-top: none;
}
.sage-upload-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 28px; cursor: pointer;
  background: linear-gradient(135deg, #6d28d9, #7c3aed, #a855f7);
  color: #fff; font-family: 'Orbitron', sans-serif; font-size: 11px;
  font-weight: 900; letter-spacing: 0.1em;
  box-shadow: 0 0 25px rgba(139,92,246,0.5), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform .15s, box-shadow .15s;
}
.sage-upload-btn:hover { transform: translateY(-2px); box-shadow: 0 0 35px rgba(139,92,246,0.7); }
.sage-demo-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15); border-radius: 20px;
  padding: 8px 20px; color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif; font-size: 13px; cursor: pointer;
  transition: all .2s;
}
.sage-demo-btn:hover { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.3); }

/* Generating overlay — petit HUD flottant */
.sage-generating {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 22px; border-radius: 20px;
  background: rgba(10,6,30,0.92); backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,0.35);
  box-shadow: 0 0 30px rgba(109,40,217,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
  min-width: 320px;
}
.sage-gen-avatar { border-radius: 50%; flex-shrink: 0; }
.sage-gen-bubble {
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: rgba(255,255,255,0.85); flex: 1; line-height: 1.4;
}
.sage-gen-track {
  width: 120px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,0.08); flex-shrink: 0;
}
.sage-gen-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  transition: width 0.5s ease;
  width: 0%;
}
.sage-gen-label {
  font-family: 'Orbitron', sans-serif; font-size: 9px;
  color: rgba(167,139,250,0.7); letter-spacing: 0.1em; white-space: nowrap;
}

/* Canvas area */
.aa-mm-canvas-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  cursor: default;
  background-color: #1f2937;
  background-image: radial-gradient(circle, rgba(209,213,219,0.12) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.aa-mm-canvas-wrap::before { display: none; }
.aa-mm-canvas-wrap::after  { display: none; }
.mm-galaxy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.aa-mm-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.aa-mm-nodes-layer {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  z-index: 2;
}

/* Mindmap node */
.mm-node {
  position: absolute;
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
}
.mm-node-body {
  display: block;
  white-space: nowrap;
  padding: 10px 20px;
  min-width: 80px;
  min-height: 38px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e1b4b;
  background: #ffffff;
  border: 1.5px solid rgba(109,40,217,0.4);
  box-shadow: 0 2px 12px rgba(109,40,217,0.10), 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.12s;
  outline: none;
  text-align: center;
  cursor: text;
  box-sizing: border-box;
  letter-spacing: 0.01em;
}
.mm-node-body:hover {
  box-shadow: 0 4px 18px rgba(109,40,217,0.18), 0 1px 4px rgba(0,0,0,0.1);
}
.mm-node-body[contenteditable="true"]:focus {
  border-color: rgba(192,38,211,0.7);
  box-shadow: 0 0 0 3px rgba(192,38,211,0.12);
}
.mm-node-body.shape-rect   { border-radius: 10px; }
.mm-node-body.shape-circle { border-radius: 50%; min-width: 80px; min-height: 80px; }
.mm-node-body.shape-oval   { border-radius: 100px; }

/* Node linked to a source slide */
.mm-node[data-source-page] .mm-node-body {
  cursor: pointer;
  position: relative;
}
/* Page badge — below the node, in empty space, fully clickable */
.mm-page-badge {
  position: absolute;
  bottom: -18px;
  right: 6px;
  font-size: 9px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: rgba(167,139,250,1);
  background: rgba(8,4,24,0.88);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 20px;
  padding: 2px 6px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  user-select: none;
}
.mm-page-badge:hover {
  background: rgba(109,40,217,0.95);
  border-color: rgba(167,139,250,0.7);
  transform: translateY(-1px);
}

/* Root node (first per subject) special style */
.mm-node.mm-root .mm-node-body {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 60%, #a855f7 100%);
  border-color: #a855f7;
  border-width: 2px;
  border-radius: 22px;
  box-shadow:
    0 0 0 5px rgba(139,92,246,0.22),
    0 0 0 10px rgba(139,92,246,0.08),
    0 6px 28px rgba(109,40,217,0.45);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05em;
  letter-spacing: 0.01em;
  min-width: 120px;
  text-align: center;
  padding: 10px 22px;
}
/* Pulsing outer ring on root node */
.mm-node.mm-root::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 28px;
  border: 2px solid rgba(167,139,250,0.45);
  animation: mm-root-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes mm-root-pulse {
  0%,100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}

/* Anchor points */
.mm-anchor {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(139,92,246,0.9);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 0 6px rgba(139,92,246,0.8);
  cursor: crosshair;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.mm-node:hover .mm-anchor { opacity: 1; pointer-events: all; }
.mm-anchor.mm-anchor-visible { opacity: 1 !important; pointer-events: all !important; }

/* Edge (SVG path) */
.mm-edge {
  stroke: rgba(109,40,217,0.50);
  stroke-width: 1.2;
  fill: none;
  marker-end: url(#mm-arrow);
  filter: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mm-edge-draft {
  stroke: rgba(192,38,211,0.7);
  stroke-width: 1.5;
  stroke-dasharray: 5 3;
  fill: none;
}

/* Selected node highlight */
.mm-node.mm-selected .mm-node-body {
  border-color: rgba(192,38,211,0.85);
  box-shadow: 0 0 0 3px rgba(192,38,211,0.18);
}

/* ══════════════════════════════════════════════════════════
   1H AVANT L'EXAM
══════════════════════════════════════════════════════════ */

.aa-ex-subj-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px 6px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.aa-ex-subj-bar::-webkit-scrollbar { display: none; }
.aa-ex-subj-pill {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 99px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s;
}
.aa-ex-subj-pill.active {
  background: rgba(124,58,237,0.22);
  border-color: rgba(96,165,250,0.45);
  color: #c4b5fd;
}

.aa-ex-sections {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.aa-ex-sections::-webkit-scrollbar { width: 3px; }
.aa-ex-sections::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }

.aa-ex-section {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.aa-ex-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  flex-shrink: 0;
}
.aa-ex-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.aa-ex-section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.aa-ex-textarea {
  flex: 1;
  min-height: 90px;
  padding: 8px 14px 12px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: rgba(255,255,255,0.85);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  line-height: 1.65;
  scrollbar-width: none;
}
.aa-ex-textarea::placeholder { color: rgba(255,255,255,0.25); }
.aa-ex-textarea:focus { background: rgba(255,255,255,0.02); }

/* Section colors */
.aa-ex-important {
  background: rgba(239,68,68,0.04);
  border-left: 3px solid rgba(239,68,68,0.55);
}
.aa-ex-important .aa-ex-dot { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.6); }
.aa-ex-important .aa-ex-section-title { color: rgba(248,113,113,0.9); }

.aa-ex-less {
  background: rgba(245,158,11,0.04);
  border-left: 3px solid rgba(245,158,11,0.45);
}
.aa-ex-less .aa-ex-dot { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.6); }
.aa-ex-less .aa-ex-section-title { color: rgba(251,191,36,0.9); }

.aa-ex-mastered {
  background: rgba(16,185,129,0.04);
  border-left: 3px solid rgba(16,185,129,0.45);
}
.aa-ex-mastered .aa-ex-dot { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.6); }
.aa-ex-mastered .aa-ex-section-title { color: rgba(52,211,153,0.9); }

.aa-ex-weak {
  background: rgba(99,102,241,0.04);
  border-left: 3px solid rgba(99,102,241,0.45);
}
.aa-ex-weak .aa-ex-dot { background: #6366f1; box-shadow: 0 0 6px rgba(99,102,241,0.6); }
.aa-ex-weak .aa-ex-section-title { color: rgba(129,140,248,0.9); }

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Resize handles
══════════════════════════════════════════════════════════ */

.mm-resize-handle {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 2px;
  background: rgba(96,165,250,0.75);
  border: 1px solid rgba(255,255,255,0.5);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.mm-node:hover .mm-resize-handle { opacity: 1; pointer-events: all; }
.mm-node.mm-selected .mm-resize-handle { opacity: 1; pointer-events: all; }
.mm-rh-nw { top: -5px;  left: -5px;  cursor: nw-resize; }
.mm-rh-ne { top: -5px;  right: -5px; cursor: ne-resize; }
.mm-rh-se { bottom: -5px; right: -5px; cursor: se-resize; }
.mm-rh-sw { bottom: -5px; left: -5px;  cursor: sw-resize; }

/* Drag handle — diamond top-right */
/* mm-drag-handle removed — drag now initiated by hold+move on any node */
.mm-node .mm-node-body { cursor: grab; }
.mm-node .mm-node-body:active { cursor: grabbing; }

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Table nodes (premium redesign)
══════════════════════════════════════════════════════════ */

/* ── Multi-map navigation bar ── */
/* ── Multi-map navigation bar — floating premium pill ── */
.mm-nav-bar {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;

  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;

  background: #ffffff;
  border: 1.5px solid rgba(109,40,217,0.18);
  border-radius: 100px;
  box-shadow:
    0 4px 20px rgba(109,40,217,0.10),
    0 1px 6px rgba(0,0,0,0.06),
    0 0 0 1px rgba(255,255,255,0.6) inset;

  max-width: calc(100% - 240px);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.mm-nav-bar::-webkit-scrollbar { display: none; }

/* When nav bar is present, push toolbar and import button below it */
.mm-canvas-panel.has-nav-bar .mm-tools-sidebar {
  top: 58px;
}
.mm-canvas-panel.has-nav-bar .mm-btn-import-cours {
  top: 10px;
}

/* Nav item wrapper (button + delete ×) */
.mm-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.mm-nav-del {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(220,38,38,0.85);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
  transition: background 0.15s, transform 0.15s;
}
.mm-nav-item:hover .mm-nav-del {
  display: flex;
}
.mm-nav-del:hover {
  background: rgba(185,28,28,1);
  transform: scale(1.15);
}

.mm-nav-sep {
  color: rgba(109,40,217,0.3);
  font-size: 11px;
  padding: 0 2px;
  user-select: none;
  flex-shrink: 0;
}

.mm-nav-btn {
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid rgba(109,40,217,0.15);
  background: transparent;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.mm-nav-btn.active {
  background: rgba(109,40,217,0.12);
  color: #4c1d95;
  border-color: rgba(109,40,217,0.4);
  font-weight: 700;
}
.mm-nav-btn:hover:not(.active) {
  background: rgba(109,40,217,0.06);
  color: #5b21b6;
  border-color: rgba(109,40,217,0.25);
}
/* Overview tile "→" badge */
.mm-part-arrow {
  position: absolute;
  top: -8px; right: -8px;
  width: 20px; height: 20px;
  background: rgba(124,58,237,0.9);
  border-radius: 50%;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  pointer-events: none;
  z-index: 2;
}

/* Outer wrapper */
.mmt-outer {
  background: #ffffff;
  border: 1.5px solid rgba(109,40,217,0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(109,40,217,0.12), 0 1px 4px rgba(0,0,0,0.06);
  min-width: 180px;
  font-family: 'Inter', sans-serif;
}

/* Title bar — poignée de déplacement du tableau */
.mmt-title {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(109,40,217,0.9) 0%, rgba(124,58,237,0.85) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: grab;
}
.mmt-title:active { cursor: grabbing; }
.mmt-title-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ede9fe;
  letter-spacing: 0.04em;
  outline: none;
  flex: 1;
  min-width: 40px;
  cursor: grab;
}
.mmt-title-text:focus { color: #fff; cursor: text; }

/* Table */
.mmt-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.68rem;
}

/* Header cells */
.mmt-th {
  position: relative;
  padding: 6px 10px;
  background: rgba(109,40,217,0.06);
  border: 1px solid rgba(109,40,217,0.12);
  border-top: none;
  color: #5b21b6;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  min-width: 60px;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mmt-th:focus {
  background: rgba(109,40,217,0.1);
  color: #4c1d95;
}

/* Body cells */
.mmt-td {
  padding: 7px 10px;
  border: 1px solid rgba(109,40,217,0.1);
  color: #1e1b4b;
  font-size: 0.68rem;
  font-weight: 400;
  min-width: 60px;
  outline: none;
  vertical-align: top;
  transition: background 0.1s;
  line-height: 1.4;
}
.mmt-td:focus {
  background: rgba(109,40,217,0.04);
  border-color: rgba(109,40,217,0.3);
  box-shadow: inset 0 0 0 2px rgba(109,40,217,0.12);
}
.mmt-td-sel {
  background: rgba(109,40,217,0.08) !important;
  border-color: rgba(109,40,217,0.3) !important;
}

/* Col resize handle */
.mmt-col-resizer {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  z-index: 5;
}
.mmt-col-resizer:hover { background: rgba(109,40,217,0.4); }

/* Footer controls */
.mmt-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(109,40,217,0.03);
  border-top: 1px solid rgba(109,40,217,0.1);
}

/* Color swatches */
.mmt-swatches {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mmt-swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  padding: 0;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}
.mmt-swatch:hover { transform: scale(1.25); box-shadow: 0 0 0 1.5px rgba(0,0,0,0.2); }
.mmt-swatch-clear {
  background: #f3f4f6 !important;
  color: #9ca3af;
  font-size: 8px !important;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-color: #d1d5db !important;
}

/* Structure buttons */
.mmt-btns {
  display: flex;
  align-items: center;
  gap: 3px;
}
.mmt-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(109,40,217,0.18);
  background: transparent;
  color: rgba(109,40,217,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  letter-spacing: 0;
  text-transform: none;
}
.mmt-btn:hover {
  background: rgba(109,40,217,0.08);
  color: #5b21b6;
  border-color: rgba(109,40,217,0.3);
}
.mmt-btn:nth-child(3),
.mmt-btn:nth-child(4) {
  color: rgba(220,38,38,0.5);
  border-color: rgba(220,38,38,0.15);
}
.mmt-btn:nth-child(3):hover,
.mmt-btn:nth-child(4):hover {
  background: rgba(220,38,38,0.06);
  color: #dc2626;
  border-color: rgba(220,38,38,0.25);
}

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE & 1H EXAM — Context banner + Manual nav
══════════════════════════════════════════════════════════ */

.aa-context-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(96,165,250,0.22);
  border-radius: 8px;
  flex-shrink: 0;
}
.aa-cb-subj {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(196,181,253,0.85);
}
.aa-cb-sep {
  color: rgba(139,92,246,0.5);
  font-size: 0.8rem;
}
.aa-cb-chap {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(233,213,255,0.9);
}
.aa-mm-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.aa-mm-subj-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.aa-mm-chap-pill {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 99px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.13s, border-color 0.13s;
}
.aa-mm-chap-pill.active {
  background: rgba(124,58,237,0.18);
  border-color: rgba(96,165,250,0.4);
  color: #c4b5fd;
}
.aa-mm-chap-pill:hover {
  background: rgba(124,58,237,0.12);
  border-color: rgba(96,165,250,0.25);
}
.aa-empty-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: rgba(139,92,246,0.4);
  font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   1H AVANT L'EXAM — 2×2 Grid layout
══════════════════════════════════════════════════════════ */

#aa-ex-sections.aa-ex-sections {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  flex: 1;
  gap: 0;
}
#aa-ex-sections .aa-ex-section {
  overflow: hidden;
  border-bottom: none;
  border-right: 1px solid rgba(255,255,255,0.05);
}
#aa-ex-sections .aa-ex-section:nth-child(2),
#aa-ex-sections .aa-ex-section:nth-child(4) {
  border-right: none;
}
#aa-ex-sections .aa-ex-section:nth-child(1),
#aa-ex-sections .aa-ex-section:nth-child(2) {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
#aa-ex-sections .aa-ex-textarea {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR — Apprentissage Actif tree
══════════════════════════════════════════════════════════ */

.aa-sb-container {
  padding: 8px 0;
  width: 100%;
}
.aa-sb-tree {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aa-sb-subj {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.aa-sb-subj-header {
  padding: 6px 12px 5px 10px;
  margin-bottom: 4px;
  border-radius: 0 6px 6px 0;
  background: rgba(255,255,255,0.03);
}
.aa-sb-subj-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.aa-sb-chaps {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 0 14px;
}
.aa-sb-chap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.04);
  background: rgba(255,255,255,0.02);
  transition: background 0.12s;
}
.aa-sb-chap:hover { background: rgba(255,255,255,0.04); }
.aa-sb-chap-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(240,238,248,0.78);
  line-height: 1.3;
}
.aa-sb-chap-tools {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.aa-sb-tool-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(139,92,246,0.25);
  background: rgba(88,28,235,0.1);
  color: rgba(196,181,253,0.75);
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.aa-sb-tool-btn:hover {
  background: rgba(88,28,235,0.22);
  border-color: rgba(96,165,250,0.45);
  color: #c4b5fd;
}
.aa-sb-no-chap, .aa-sb-empty {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: rgba(139,92,246,0.35);
  font-style: italic;
  padding: 4px 12px;
}

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Mega toolbar additions
══════════════════════════════════════════════════════════ */

/* Scrollable toolbar */
.aa-mm-toolbar {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
}
.aa-mm-toolbar::-webkit-scrollbar { display: none; }

/* Color swatches — compact circles */
.aa-mm-color-swatch, .aa-mm-tcolor-swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.1);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  padding: 0;
}
.aa-mm-color-swatch:hover, .aa-mm-tcolor-swatch:hover {
  transform: scale(1.3);
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
}
.aa-mm-color-swatch.active, .aa-mm-tcolor-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(139,92,246,0.8);
  transform: scale(1.2);
}
.aa-mm-swatch-clear {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  display: flex; align-items: center; justify-content: center;
}

/* Highlight swatches */
.aa-mm-hl-swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.08);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s, border-color 0.12s;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.aa-mm-hl-swatch:hover { transform: scale(1.25); border-color: rgba(255,255,255,0.4); }
.aa-mm-hl-swatch.active { border-color: rgba(255,255,255,0.9); box-shadow: 0 0 0 2px rgba(139,92,246,0.7); }
.aa-mm-hl-none { background: rgba(255,255,255,0.04); }

/* Edge style buttons */
.aa-mm-edge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 5px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(167,139,250,0.5);
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}
.aa-mm-edge-btn:hover {
  background: rgba(124,58,237,0.2);
  border-color: rgba(139,92,246,0.35);
  color: #c4b5fd;
}
.aa-mm-edge-btn.active {
  background: rgba(124,58,237,0.32);
  border-color: rgba(139,92,246,0.65);
  color: #e9d5ff;
  box-shadow: 0 0 10px rgba(124,58,237,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Delete selected — red tint on hover */
.aa-mm-delete-btn:hover {
  background: rgba(220,38,38,0.2) !important;
  border-color: rgba(239,68,68,0.5) !important;
  color: #fca5a5 !important;
}

/* Clear all — orange tint on hover */
.aa-mm-clearall-btn:hover {
  background: rgba(217,119,6,0.18) !important;
  border-color: rgba(245,158,11,0.45) !important;
  color: #fcd34d !important;
}

/* Diamond shape */
.mm-node-body.shape-diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  min-width: 90px;
  min-height: 90px;
  padding: 22px 14px;
  border-radius: 0;
}

/* Text-only (no border/bg) */
.mm-node-body.shape-none {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 4px 8px;
}
.mm-node.mm-selected .mm-node-body.shape-none {
  border-color: rgba(192,38,211,0.5) !important;
  border-style: dashed !important;
}

/* Selected edge */
.mm-edge.mm-edge-selected {
  stroke: rgba(192,38,211,0.85);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(192,38,211,0.6));
}

/* ── Node double-click popup ── */
.mm-node-popup {
  position: absolute;
  bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(10,5,28,0.97);
  border: 1px solid rgba(139,92,246,0.45);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.7), 0 0 0 1px rgba(139,92,246,0.12);
  z-index: 200;
  white-space: nowrap;
}
.mm-np-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px; border: none; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 0.56rem; font-weight: 700;
  letter-spacing: 0.06em; transition: all 0.15s;
}
.mm-np-fc {
  background: rgba(124,58,237,0.3); color: #c4b5fd;
  border: 1px solid rgba(124,58,237,0.4);
}
.mm-np-fc:hover { background: rgba(124,58,237,0.55); color: #fff; }
.mm-np-h1 {
  background: rgba(245,158,11,0.2); color: #fcd34d;
  border: 1px solid rgba(245,158,11,0.35);
}
.mm-np-h1:hover { background: rgba(245,158,11,0.4); color: #fff; }
.mm-np-important { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.35); }
.mm-np-important:hover { background: rgba(239,68,68,0.4); color: #fff; }
.mm-np-less { background: rgba(234,179,8,0.2); color: #fde68a; border: 1px solid rgba(234,179,8,0.35); }
.mm-np-less:hover { background: rgba(234,179,8,0.4); color: #fff; }
.mm-np-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.3); font-size: 0.7rem; padding: 2px 4px;
  transition: color 0.15s;
}
.mm-np-close:hover { color: rgba(255,255,255,0.8); }

/* ── FC build mode node highlights ── */
.mm-fc-recto { outline: 2px solid #fb923c !important; outline-offset: 2px; }
.mm-fc-verso { outline: 2px solid #4ade80 !important; outline-offset: 2px; }

/* ── FC build panel ── */
#mm-fc-build-panel {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(8,4,22,0.97);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 14px; padding: 12px 14px;
  min-width: 320px; max-width: 480px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(139,92,246,0.08);
  z-index: 150;
  display: flex; flex-direction: column; gap: 8px;
}
.mm-fcb-header {
  display: flex; align-items: center; justify-content: space-between;
}
.mm-fcb-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.6rem; font-weight: 800;
  color: #a78bfa; letter-spacing: 0.1em;
}
.mm-fcb-cancel {
  background: none; border: none; cursor: pointer;
  font-size: 0.6rem; color: rgba(255,255,255,0.35);
  transition: color 0.15s;
}
.mm-fcb-cancel:hover { color: #f87171; }
.mm-fcb-row {
  display: flex; align-items: flex-start; gap: 8px;
}
.mm-fcb-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.48rem; font-weight: 800;
  letter-spacing: 0.1em; padding: 2px 6px; border-radius: 5px; flex-shrink: 0;
}
.mm-fcb-recto { background: rgba(251,146,60,0.25); color: #fb923c; }
.mm-fcb-verso { background: rgba(74,222,128,0.2); color: #4ade80; }
.mm-fcb-text {
  font-size: 0.72rem; color: rgba(255,255,255,0.85); line-height: 1.4;
  flex: 1;
}
/* Phase toggle tabs */
.mm-fcb-phase-tabs {
  display: flex; gap: 4px;
}
.mm-fcb-phase-btn {
  flex: 1; padding: 4px 8px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04); cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 0.5rem; font-weight: 700;
  color: rgba(255,255,255,0.4); letter-spacing: 0.08em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mm-fcb-phase-btn:hover { color: rgba(255,255,255,0.7); }
.mm-fcb-phase-active-recto {
  background: rgba(139,92,246,0.2); border-color: rgba(139,92,246,0.5);
  color: #c4b5fd;
}
.mm-fcb-phase-active-verso {
  background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4);
  color: #6ee7b7;
}
.mm-fcb-count {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.15); font-size: 0.55rem; font-weight: 900;
  margin-left: 3px; vertical-align: middle;
}
.mm-fcb-hint {
  font-size: 0.58rem; color: rgba(255,255,255,0.3); font-style: italic;
  margin: -2px 0;
}
.mm-fcb-chips-list { display: flex; flex-wrap: wrap; align-items: center; }
.mm-fcb-chip {
  display: inline-block;
  background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.25);
  border-radius: 5px; padding: 1px 6px; margin: 1px 2px;
  font-size: 0.68rem; color: #86efac;
}
.mm-fcb-chip-recto {
  background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.35);
  color: #c4b5fd;
}
.mm-fcb-create {
  margin-top: 2px; padding: 7px 14px; border-radius: 9px; border: none;
  background: linear-gradient(135deg, rgba(124,58,237,0.7), rgba(192,38,211,0.6));
  color: #fff; font-family: 'Orbitron', sans-serif; font-size: 0.58rem;
  font-weight: 700; letter-spacing: 0.08em; cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.mm-fcb-create:hover { transform: translateY(-1px); opacity: 0.92; }
.mm-fcb-create.mm-fcb-disabled { opacity: 0.35; cursor: not-allowed; }

/* H-1 popup variant */
.mm-h1-popup { flex-direction: column; align-items: stretch; min-width: 180px; }

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Nav arrows (prev/next subj & chap)
══════════════════════════════════════════════════════════ */

.aa-mm-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(139,92,246,0.28);
  background: rgba(88,28,235,0.12);
  color: rgba(196,181,253,0.75);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  padding: 0;
}
.aa-mm-nav-arrow:hover {
  background: rgba(88,28,235,0.28);
  border-color: rgba(96,165,250,0.55);
  color: #bfdbfe;
}
.aa-mm-nav-disabled {
  width: 20px; height: 20px;
  flex-shrink: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   APPRENTISSAGE ACTIF — Page dédiée premium
═══════════════════════════════════════════════════════════════ */

#screen-apprentissage {
  display: flex;
  flex-direction: column;
  background: #06041a;
  overflow: hidden;
}

/* Fond animé */
.saa-bg-particles {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}
.saa-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(139,92,246,0.8);
  animation: saaPFloat linear infinite;
}
@keyframes saaPFloat {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-80px) scale(0.5); opacity: 0; }
}
.saa-bg-glow {
  position: absolute; top: -40%; left: 30%; right: 10%;
  height: 60%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(109,40,217,0.18) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
  animation: saaBgGlowPulse 6s ease-in-out infinite;
}
@keyframes saaBgGlowPulse {
  0%,100% { opacity: 0.8; transform: scale(1); }
  50%     { opacity: 1.2; transform: scale(1.08); }
}

/* Header */
.saa-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.saa-back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 10px; cursor: pointer;
  color: rgba(196,181,253,0.9);
  transition: background 0.15s, box-shadow 0.15s;
}
.saa-back-btn:hover { background: rgba(124,58,237,0.3); box-shadow: 0 0 10px rgba(139,92,246,0.3); }
.saa-header-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.saa-header-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 800; letter-spacing: 0.2em;
  color: #fbbf24;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 20px; padding: 2px 10px;
}
.saa-header-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem; font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #c4b5fd, #818cf8, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin: 0;
}
.saa-header-xp {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(109,40,217,0.18);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 10px; padding: 4px 10px;
}
.saa-xp-val { font-family: 'Orbitron', sans-serif; font-size: 0.85rem; font-weight: 900; color: #a78bfa; }
.saa-xp-label { font-size: 0.5rem; color: rgba(167,139,250,0.5); letter-spacing: 0.1em; }

/* Onglets intercalaires */
.saa-tabs {
  position: relative; z-index: 2;
  display: flex; gap: 0;
  padding: 10px 14px 0;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(139,92,246,0.12);
}
.saa-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px 10px;
  border-radius: 10px 10px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.4);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
}
/* Mindmap tab — violet neon */
.saa-tab[data-saa-tab="mindmap"]:hover { background: rgba(124,58,237,0.12); color: rgba(196,181,253,0.8); }
.saa-tab[data-saa-tab="mindmap"].active {
  background: rgba(109,40,217,0.22);
  border-color: rgba(139,92,246,0.4);
  color: #ddd6fe;
  box-shadow: 0 -4px 16px rgba(109,40,217,0.35), inset 0 1px 0 rgba(167,139,250,0.2);
}
.saa-tab[data-saa-tab="mindmap"].active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #7c3aed, #c4b5fd, #7c3aed);
  background-size: 200%;
  animation: saaTabLine 2.5s linear infinite;
}
/* Flashcards tab — cyan neon */
.saa-tab[data-saa-tab="flashcards"]:hover { background: rgba(6,182,212,0.1); color: rgba(103,232,249,0.8); }
.saa-tab[data-saa-tab="flashcards"].active {
  background: rgba(6,182,212,0.16);
  border-color: rgba(34,211,238,0.4);
  color: #a5f3fc;
  box-shadow: 0 -4px 16px rgba(6,182,212,0.3), inset 0 1px 0 rgba(103,232,249,0.2);
}
.saa-tab[data-saa-tab="flashcards"].active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #06b6d4, #67e8f9, #06b6d4);
  background-size: 200%;
  animation: saaTabLine 2.5s linear infinite;
}
/* Exam1h tab — amber neon */
.saa-tab[data-saa-tab="exam1h"]:hover { background: rgba(245,158,11,0.1); color: rgba(253,211,77,0.8); }
.saa-tab[data-saa-tab="exam1h"].active {
  background: rgba(245,158,11,0.16);
  border-color: rgba(251,191,36,0.4);
  color: #fde68a;
  box-shadow: 0 -4px 16px rgba(245,158,11,0.3), inset 0 1px 0 rgba(253,211,77,0.2);
}
.saa-tab[data-saa-tab="exam1h"].active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #f59e0b, #fde68a, #f59e0b);
  background-size: 200%;
  animation: saaTabLine 2.5s linear infinite;
}
@keyframes saaTabLine {
  0% { background-position: 0% } 100% { background-position: 200% }
}
.saa-tab-count {
  background: rgba(139,92,246,0.3);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 10px; padding: 0 6px;
  font-size: 0.55rem; font-family: 'Inter', sans-serif;
  font-weight: 700; color: rgba(216,180,254,0.9);
  min-width: 18px; text-align: center;
}
.saa-tab[data-saa-tab="flashcards"].active .saa-tab-count {
  background: rgba(6,182,212,0.4); border-color: rgba(34,211,238,0.5);
  color: #a5f3fc;
}
.saa-tab[data-saa-tab="exam1h"].active .saa-tab-count {
  background: rgba(245,158,11,0.4); border-color: rgba(251,191,36,0.5);
  color: #fde68a;
}
.saa-tab.active .saa-tab-count {
  background: rgba(139,92,246,0.5);
  color: #ede9fe;
}

/* Body scrollable */
.saa-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 16px 14px 30px;
  position: relative; z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}
.saa-body::-webkit-scrollbar { width: 4px; }
.saa-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 2px; }

/* Empty state */
.saa-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center;
  min-height: 60vh;
  color: rgba(255,255,255,0.4); font-size: 0.8rem; line-height: 1.6;
}

/* Subject block */
.saa-subject-block { margin-bottom: 24px; }
.saa-subj-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 0 2px;
}
.saa-subj-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.saa-subj-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  flex: 1;
}
.saa-subj-badge {
  font-size: 0.6rem; color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 2px 8px;
}

/* Chapter card grid */
.saa-chap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.saa-chap-empty {
  font-size: 0.7rem; color: rgba(255,255,255,0.25);
  padding: 12px; text-align: center;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 10px;
}

/* Chapter card */
.saa-chap-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: rgba(10,6,30,0.75);
  border: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s;
}
.saa-chap-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--card-col, rgba(139,92,246,0.5));
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 16px color-mix(in srgb, var(--card-col, #7c3aed) 30%, transparent);
  background: rgba(20,10,50,0.9);
}
.saa-chap-card:active { transform: scale(0.97); }

/* Glow overlay on hover */
.saa-card-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--card-col,#7c3aed) 20%, transparent), transparent 70%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.saa-chap-card:hover .saa-card-glow { opacity: 1; }

.saa-card-top {
  display: flex; align-items: center; gap: 5px;
  position: relative; z-index: 1;
}
.saa-card-status-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.dot-active { background: #4ade80; box-shadow: 0 0 5px #4ade8099; }
.dot-empty  { background: rgba(255,255,255,0.2); }
.saa-card-status-lbl {
  font-size: 0.55rem; color: rgba(255,255,255,0.35); letter-spacing: 0.06em;
}
.saa-card-started .saa-card-status-lbl { color: rgba(74,222,128,0.7); }

.saa-card-icon {
  position: relative; z-index: 1;
  font-size: 1.4rem; line-height: 1;
  color: var(--card-col, rgba(139,92,246,0.6));
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  margin: 4px 0 2px;
  text-shadow: 0 0 12px var(--card-col, rgba(139,92,246,0.5));
  transition: text-shadow 0.2s;
}
.saa-chap-card:hover .saa-card-icon { text-shadow: 0 0 20px var(--card-col, rgba(139,92,246,0.8)); }
.saa-card-started .saa-card-icon { color: var(--card-col, #4ade80); }

.saa-card-name {
  position: relative; z-index: 1;
  font-size: 0.7rem; font-weight: 700;
  color: rgba(255,255,255,0.85);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.saa-card-num {
  position: relative; z-index: 1;
  font-size: 0.58rem; color: rgba(255,255,255,0.25);
  font-family: 'Orbitron', sans-serif; letter-spacing: 0.06em;
}

/* ── « Mes cours » : bandeau rediffusion + chapitres verrouillés ── */
.saa-redif-hint {
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 9px 13px;
  margin: 0 0 14px;
}
.dot-locked { background: rgba(255,255,255,0.18); box-shadow: none; }
.saa-card-locked {
  cursor: pointer;
  opacity: 0.6;
  background: rgba(8,5,22,0.7);
  border-color: rgba(255,255,255,0.05);
}
.saa-card-locked:hover {
  transform: translateY(-2px);
  opacity: 0.82;
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  background: rgba(14,8,34,0.85);
}
.saa-card-locked .saa-card-icon {
  color: rgba(255,255,255,0.4);
  text-shadow: none;
  font-size: 1.15rem;
}
.saa-card-locked:hover .saa-card-icon { text-shadow: none; }
.saa-card-locked .saa-card-status-lbl { color: rgba(255,255,255,0.3); }
.saa-card-locked .saa-card-name { color: rgba(255,255,255,0.55); }
.saa-card-locked .saa-card-num { color: rgba(255,255,255,0.3); }

/* ════════════════════════════════════════════════════════════
   « MES COURS » — bibliothèque / rediffusion (fidèle à la maquette)
════════════════════════════════════════════════════════════ */
.mc-root {
  position: fixed; inset: 0;
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  background-color: #0B0817;
  background-image:
    radial-gradient(1200px 820px at 55% 16%, rgba(126,82,226,0.34), transparent 60%),
    radial-gradient(860px 640px at 90% 66%, rgba(120,74,212,0.12), transparent 60%),
    radial-gradient(760px 660px at 6% 94%, rgba(168,72,188,0.10), transparent 62%);
  background-attachment: fixed; background-repeat: no-repeat;
  font-family: 'Outfit',system-ui,sans-serif; color: #F2EFFF;
  -webkit-font-smoothing: antialiased;
  --mc-violet-lt:#B7A4FF; --mc-muted:#9C95C4; --mc-muted-2:#6B6494; --mc-line:rgba(170,150,255,0.13);
}
/* Conteneur centré (= .wrap) ; padding-haut généreux pour faire respirer la page */
.mc-wrap {
  position: relative; z-index: 1;
  max-width: none; margin: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 34px) calc(env(safe-area-inset-right, 0px) + 30px) 80px calc(env(safe-area-inset-left, 0px) + 30px);
}
/* Champ d'étoiles */
.mc-stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.mc-stars i { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.6); animation: mc-tw 5s ease-in-out infinite; }
@keyframes mc-tw { 0%,100%{opacity:.12} 50%{opacity:.7} }

/* ── En-tête (= .hbar) ── */
.mc-header { position: relative; display: flex; align-items: center; min-height: 60px; margin-bottom: 30px; }
.mc-header-left { display: flex; align-items: center; gap: 13px; position: relative; z-index: 2; }
.mc-back {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.045); border: 1px solid var(--mc-line); color: var(--mc-violet-lt); transition: .18s;
}
.mc-back:hover { background: rgba(255,255,255,.08); color: #fff; }
.mc-back svg { width: 20px; height: 20px; }
.mc-datepill {
  display: flex; align-items: center; gap: 11px; height: 52px; padding: 0 22px; border-radius: 999px;
  background: rgba(255,255,255,.045); border: 1px solid var(--mc-line);
  font-family: 'Outfit',sans-serif; font-size: 16px; font-weight: 500; color: #EDE9FB;
}
.mc-datepill svg { width: 18px; height: 18px; color: var(--mc-violet-lt); flex-shrink: 0; }
.mc-datepill .mc-d { color: #EDE9FB; white-space: nowrap; }
.mc-datepill .mc-sep { color: var(--mc-muted-2); }
.mc-datepill .mc-h { color: var(--mc-muted); white-space: nowrap; }

/* Titre : centré sur TOUTE la largeur de la page (indépendant du conteneur calé à gauche),
   aligné verticalement avec la ligne du bouton retour. Police/couleur héritées du groupe
   commun des titres d'en-tête (.t1). En MAJUSCULES. */
.mc-htitle {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 34px); left: 0; right: 0;
  height: 60px; line-height: 60px; text-align: center; margin: 0; pointer-events: none; z-index: 2;
}
.mc-root .mc-htitle { text-transform: uppercase !important; }
@media (max-width: 760px) {
  .mc-htitle { position: static; height: auto; line-height: 1.3; text-align: center; margin: 0; padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 0; }
  .mc-wrap { padding-top: 12px; }
}

/* ── Filtres (= .filters / .pill) ── */
.mc-filters { display: flex; gap: 9px; flex-wrap: wrap; margin: 38px 0 4px; }
.mc-pill {
  font-family: 'Outfit',sans-serif; font-weight: 600; font-size: 14px; color: #B7AEDB;
  background: linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.10); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  padding: 11px 20px; border-radius: 999px; cursor: pointer; transition: .18s;
  display: flex; align-items: center; gap: 10px;
}
.mc-pill:hover { color: #fff; border-color: rgba(183,164,255,.4); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.09),0 10px 22px -14px rgba(124,92,255,.7); }
.mc-pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc,#8B5CF6); box-shadow: 0 0 10px var(--pc,#8B5CF6); flex-shrink: 0; }
.mc-pill.active {
  color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.18); border-color: transparent; transform: translateY(-1px);
  background: linear-gradient(110deg,var(--g1,#7C5CFF),var(--g2,#EC4FD0));
  box-shadow: 0 16px 36px -10px var(--glow,#B44FD0),0 0 22px -6px var(--glow,#7C5CFF),inset 0 1px 0 rgba(255,255,255,.4);
}
.mc-pill.active .mc-pill-dot { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.85); }

/* ── Sections matière (= .subject) ── */
.mc-subject { margin-top: 42px; }
.mc-subj-head { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.mc-subj-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c,#9C7BFF); box-shadow: 0 0 15px var(--c,#9C7BFF); flex-shrink: 0; }
.mc-subj-name { font-family: 'Outfit',sans-serif; font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.3px; white-space: nowrap; }
.mc-subj-rule { flex: 1; height: 1px; background: linear-gradient(90deg,var(--mc-line),transparent); }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 18px; align-items: stretch; }
.mc-chap-empty { color: rgba(255,255,255,0.4); font-size: 14px; padding: 6px 2px; }

/* ── Carte (= .card) ── */
.mc-card {
  position: relative; display: flex; flex-direction: column; min-height: 178px; text-align: left;
  border: 1px solid rgba(255,255,255,.16); border-radius: 20px; padding: 20px; cursor: pointer; overflow: hidden;
  color: #fff; font: inherit; width: 100%;
  background: linear-gradient(140deg,var(--g1),var(--g2));
  box-shadow: 0 20px 44px -16px var(--glow), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s, border-color .18s;
}
.mc-wash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(210px 130px at 28% -16%, rgba(255,255,255,.26), transparent 70%); transition: opacity .2s; }
.mc-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.28); box-shadow: 0 30px 58px -16px var(--glow), inset 0 1px 0 rgba(255,255,255,.42); }
.mc-card:hover .mc-wash { opacity: 1.15; }
.mc-card:active { transform: translateY(-1px); }
/* Atterrissage après « J'ai terminé » : on attire l'œil sur le chapitre concerné. */
.mc-card.mc-focus { animation: mc-focus-pulse 2.4s ease-out 1; border-color: rgba(196,181,253,.9); }
@keyframes mc-focus-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(190,72,200,.0), 0 20px 44px -16px var(--glow), inset 0 1px 0 rgba(255,255,255,.35); }
  18%  { box-shadow: 0 0 0 4px rgba(196,181,253,.55), 0 0 34px -2px rgba(190,72,200,.85), inset 0 1px 0 rgba(255,255,255,.42); }
  100% { box-shadow: 0 0 0 0 rgba(190,72,200,.0), 0 20px 44px -16px var(--glow), inset 0 1px 0 rgba(255,255,255,.35); }
}

.mc-card-top { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.mc-card-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.28); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.mc-card-ic svg { width: 22px; height: 22px; }
.mc-play { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; color: var(--g2); background: #fff; box-shadow: 0 6px 16px -4px rgba(0,0,0,.32); transition: .18s; }
.mc-play svg { width: 23px; height: 23px; margin-left: 2px; }
.mc-card:hover .mc-play { transform: scale(1.08); box-shadow: 0 8px 18px -4px rgba(0,0,0,.35); }
.mc-tag { position: relative; display: block; font-family: 'Outfit',sans-serif; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.92); margin-bottom: 6px; }
.mc-name { position: relative; font-family: 'Outfit',sans-serif; font-size: 18px; font-weight: 700; margin: 0; line-height: 1.25; letter-spacing: -.2px; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.2); }
.mc-foot { position: relative; display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.mc-prog { flex: 1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.28); overflow: hidden; }
.mc-prog-bar { display: block; height: 6px; border-radius: 6px; background: #fff; box-shadow: 0 0 10px -1px rgba(255,255,255,.7); }
.mc-pct { font-family: 'Outfit',sans-serif; font-size: 13px; font-weight: 700; color: #fff; flex: 0 0 auto; }

/* Verrouillée (= .card.locked) */
.mc-locked { background: linear-gradient(158deg,#191331,#130E26); box-shadow: 0 14px 32px -28px rgba(124,92,255,.5), inset 0 1px 0 rgba(255,255,255,.04); }
.mc-locked .mc-wash { opacity: .22; }
.mc-locked .mc-card-ic { background: rgba(255,255,255,.05); border: 1px solid var(--mc-line); color: var(--mc-muted); box-shadow: none; }
.mc-locked .mc-tag { color: var(--mc-muted-2); }
.mc-locked .mc-name { color: #C7C0E6; }
.mc-locked:hover { transform: translateY(-3px); border-color: color-mix(in srgb,var(--c) 34%,transparent); box-shadow: 0 22px 44px -26px color-mix(in srgb,var(--c) 60%,transparent); }
.mc-locked:hover .mc-card-ic { color: #fff; }
.mc-lockpill { display: inline-flex; align-items: center; gap: 7px; font-family: 'Outfit',sans-serif; font-size: 12.5px; font-weight: 600; color: var(--cl,#C9B8FF); background: color-mix(in srgb,var(--c) 14%,transparent); border: 1px solid color-mix(in srgb,var(--c) 30%,transparent); padding: 6px 13px; border-radius: 999px; }
.mc-lockpill svg { width: 12px; height: 12px; }

/* État vide */
.mc-empty { text-align: center; color: rgba(255,255,255,0.6); padding: 60px 24px; }
.mc-empty-ic { font-size: 40px; margin-bottom: 12px; }
.mc-empty p { font-size: 15px; line-height: 1.6; }
.mc-empty strong { color: #c6b4ff; }

@media (prefers-reduced-motion: reduce) {
  .mc-stars i { animation: none; }
  .mc-card, .mc-pill, .mc-back, .mc-play { transition: none; }
}

/* ── Écran « Jeux de révision » : maquette isolée en iframe (plein écran) ── */
.jr-screen { padding: 0; }
.jr-frame { flex: 1 1 auto; width: 100%; min-height: 0; height: 100%; border: 0; display: block; background: transparent; }

/* ════════════════════════════════════════════════════════════
   MONSTRE DE L'OUBLI — Game Screen
════════════════════════════════════════════════════════════ */

.mg-root {
  position: fixed; inset: 0;
  background: #04020e;
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 100;
}
.mg-shake-wrap { width: 100%; height: 100%; display: flex; flex-direction: column; }
@keyframes mg-shake {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  15%  { transform: translate(-6px, 4px) rotate(-0.4deg); }
  30%  { transform: translate(6px,-4px) rotate(0.4deg); }
  45%  { transform: translate(-4px, 6px) rotate(-0.3deg); }
  60%  { transform: translate(4px,-6px) rotate(0.3deg); }
  75%  { transform: translate(-3px, 3px) rotate(-0.2deg); }
}
.mg-shake-wrap.shaking { animation: mg-shake 0.5s ease-in-out; }

/* Strong seismic shake for node-fall sequence */
@keyframes mg-shake-strong {
  0%,100% { transform: translate(0,0) rotate(0); }
  7%   { transform: translate(-12px,  7px) rotate(-0.7deg); }
  14%  { transform: translate( 12px, -9px) rotate( 0.7deg); }
  21%  { transform: translate(-10px, 12px) rotate(-0.9deg); }
  28%  { transform: translate( 10px, -8px) rotate( 0.9deg); }
  35%  { transform: translate(-15px,  5px) rotate(-1.1deg); }
  42%  { transform: translate( 15px, -7px) rotate( 1.1deg); }
  50%  { transform: translate(-8px,  10px) rotate(-0.6deg); }
  58%  { transform: translate( 8px, -12px) rotate( 0.6deg); }
  65%  { transform: translate(-10px,  5px) rotate(-0.5deg); }
  72%  { transform: translate( 10px,  -5px) rotate(0.5deg); }
  80%  { transform: translate(-5px,   3px) rotate(-0.3deg); }
  90%  { transform: translate( 4px,  -2px) rotate( 0.2deg); }
}
.mg-shake-wrap.shaking-strong { animation: mg-shake-strong 1.1s ease-in-out forwards; }

/* Zone navigation banner */
.mg-zone-banner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 50; pointer-events: none;
  font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 900;
  color: #bfdbfe; letter-spacing: 0.15em;
  background: rgba(80,0,180,0.85); border: 2px solid rgba(167,139,250,0.9);
  padding: 10px 28px; border-radius: 12px;
  box-shadow: 0 0 30px rgba(139,0,255,0.7);
  animation: mg-banner-pop 0.4s cubic-bezier(0.2,0,0.1,1.4) forwards,
             mg-banner-fade 0.4s ease 1.8s forwards;
  text-align: center;
}
@keyframes mg-banner-pop {
  0% { transform: translate(-50%,-50%) scale(0.3); opacity: 0; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
@keyframes mg-banner-fade { to { opacity: 0; } }

/* Hide tray before fall sequence */
.mg-tray-section.mg-tray-hidden { display: none !important; }

/* ── Intro overlay ───────────────────────────────────────── */
/* ── Intro overlay ── */
@keyframes mg-intro-nebula-pulse {
  0%,100% { transform: scale(1) rotate(0deg); opacity: 0.55; }
  50%      { transform: scale(1.22) rotate(6deg); opacity: 1; }
}
@keyframes mg-intro-glow-pulse {
  0%,100% { filter: drop-shadow(0 0 40px rgba(168,85,247,0.9)) drop-shadow(0 0 80px rgba(168,85,247,0.35)); }
  50%      { filter: drop-shadow(0 0 65px rgba(216,180,254,1)) drop-shadow(0 0 130px rgba(168,85,247,0.65)) drop-shadow(0 0 12px rgba(253,230,138,0.35)); }
}
@keyframes mg-intro-monster-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  38%      { transform: translateY(-14px) rotate(0.5deg); }
  70%      { transform: translateY(-7px) rotate(-0.3deg); }
}
@keyframes mg-intro-floor-pulse {
  0%   { transform: translateX(-50%) scaleX(1);   opacity: 0.65; }
  100% { transform: translateX(-50%) scaleX(1.35); opacity: 1; }
}
@keyframes mg-intro-title-sweep {
  0%,100% { background-position: 0% 0%; }
  50%      { background-position: 100% 0%; }
}
@keyframes mg-intro-flash {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes mg-intro-spark-fly {
  0%   { transform: translate(0,0) scale(1.2); opacity: 1; }
  100% { transform: translate(var(--sdx), var(--sdy)) scale(0); opacity: 0; }
}
.mg-intro-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden;
  background:
    radial-gradient(ellipse at 32% 22%, rgba(124,58,237,0.28) 0%, transparent 52%),
    radial-gradient(ellipse at 72% 75%, rgba(59,130,246,0.16) 0%, transparent 46%),
    radial-gradient(ellipse at 50% 60%, rgba(88,28,235,0.55) 0%, rgba(3,7,18,0.99) 72%);
}
.mg-intro-overlay::before {
  content: ''; position: absolute; width: 80vw; height: 80vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,40,217,0.18) 0%, transparent 65%);
  animation: mg-intro-nebula-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
.mg-intro-bg {
  position: absolute; inset: 0; z-index: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(139,0,255,0.018) 2px, rgba(139,0,255,0.018) 4px
  );
}
.mg-intro-floor-glow {
  position: absolute; bottom: 28%; left: 50%; transform: translateX(-50%);
  width: 300px; height: 50px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(139,92,246,0.55) 0%, transparent 70%);
  filter: blur(16px); opacity: 0; transition: opacity 0.45s;
  pointer-events: none; z-index: 1;
}
.mg-intro-floor-glow.lit {
  opacity: 1;
  animation: mg-intro-floor-pulse 1.6s ease-in-out infinite alternate;
}
.mg-intro-monster-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  transform: translateY(120%); transition: transform 0s; z-index: 2;
}
.mg-intro-monster-wrap.risen {
  animation: mg-monster-rise 0.9s cubic-bezier(0.22,1,0.36,1) forwards;
}
.mg-intro-monster-wrap.floating {
  animation: mg-intro-monster-float 3.8s ease-in-out infinite;
}
@keyframes mg-monster-rise {
  from { transform: translateY(120%) scale(0.8); }
  to   { transform: translateY(0) scale(1); }
}
.mg-intro-monster-aura {
  position: absolute; width: 290px; height: 290px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.28) 0%, rgba(88,28,235,0.08) 55%, transparent 72%);
  animation: mg-bp-aura-pulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
.mg-intro-monster-img {
  width: 250px; height: auto; position: relative; z-index: 1;
}
.mg-intro-monster-img.landed {
  animation: mg-intro-glow-pulse 2.6s ease-in-out infinite;
}
.mg-intro-shockwave {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: transparent; pointer-events: none;
}
.mg-intro-shockwave.sw1 { border: 3px solid rgba(180,0,255,0.85); }
.mg-intro-shockwave.sw2 { border: 2px solid rgba(253,230,138,0.65); }
.mg-intro-shockwave.sw3 { border: 1.5px solid rgba(196,181,253,0.45); }
@keyframes mg-shockwave  { 0% { transform: scale(1);  opacity: 1; } 100% { transform: scale(44); opacity: 0; } }
@keyframes mg-shockwave2 { 0% { transform: scale(1);  opacity: 0.75; } 100% { transform: scale(36); opacity: 0; } }
.mg-intro-shockwave.pulse1 { animation: mg-shockwave  0.7s ease-out forwards; }
.mg-intro-shockwave.pulse2 { animation: mg-shockwave2 0.85s ease-out 0.14s forwards; }
.mg-intro-shockwave.pulse3 { animation: mg-shockwave2 1.05s ease-out 0.3s forwards; }
.mg-intro-impact-flash {
  position: absolute; inset: 0; background: rgba(196,181,253,0.14);
  animation: mg-intro-flash 0.3s ease-out forwards;
  pointer-events: none; z-index: 10;
}
.mg-intro-spark {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--spark-color, #c4b5fd);
  box-shadow: 0 0 7px var(--spark-color, #c4b5fd);
  animation: mg-intro-spark-fly var(--dur, 0.8s) ease-out var(--delay, 0s) forwards;
  pointer-events: none; z-index: 3;
}
.mg-intro-text {
  margin-top: 34px; text-align: center; z-index: 2;
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.65s, transform 0.65s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(92vw, 640px);
}
.mg-intro-text.visible { opacity: 1; transform: translateY(0); }
.mg-intro-title {
  font-family: 'Orbitron', sans-serif; font-size: clamp(1.3rem,4.5vw,2.1rem); font-weight: 900;
  letter-spacing: 0.15em;
  background: linear-gradient(90deg, #c4b5fd 0%, #fff 28%, #fde68a 50%, #fff 72%, #c4b5fd 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: mg-intro-title-sweep 3.2s ease-in-out infinite;
  text-align: center; width: 100%;
}
.mg-intro-sub {
  font-family: 'Orbitron', sans-serif; font-size: clamp(0.8rem,1.8vw,1rem); font-weight: 700;
  color: rgba(200,150,255,0.95); letter-spacing: 0.1em;
  text-shadow: 0 0 28px rgba(167,139,250,0.85), 0 0 12px rgba(196,181,253,0.5);
  text-align: center; white-space: nowrap;
  animation: mg-bp-ray-pulse 2.2s ease-in-out infinite alternate;
}

/* ── Header HP bars ──────────────────────────────────────── */
.mg-header {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 16px; flex-shrink: 0;
  background: rgba(0,0,0,0.45);
  border-bottom: 1px solid rgba(139,0,255,0.18);
  backdrop-filter: blur(8px);
}
/* HP bars hidden — focus on progress bar only */
.mg-combatant { display: none; }
.mg-center-hud { flex: unset; }
.mg-combatant-monster { flex-direction: row-reverse; }
.mg-c-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(139,92,246,0.5); flex-shrink: 0; }
.mg-c-monster-mini { width: 38px; height: 38px; flex-shrink: 0; }
.mg-c-monster-mini img { width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(220,0,80,0.6)); }
.mg-c-info { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mg-c-info-right { align-items: flex-end; }
.mg-c-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.5rem; font-weight: 800;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.6);
}
.mg-hp-track {
  width: 100%; height: 8px; background: rgba(255,255,255,0.08);
  border-radius: 99px; overflow: hidden;
}
.mg-hp-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.mg-hp-fill-player {
  background: linear-gradient(90deg, #4ade80, #22c55e);
  box-shadow: 0 0 8px rgba(74,222,128,0.6);
}
.mg-hp-fill-monster {
  background: linear-gradient(90deg, #f87171, #dc2626);
  box-shadow: 0 0 8px rgba(248,113,113,0.6);
}
.mg-hp-val {
  font-family: 'Orbitron', sans-serif; font-size: 0.52rem; font-weight: 700;
  color: rgba(255,255,255,0.5);
}
@keyframes mg-hp-flash {
  0%,100% { opacity: 1; } 40% { opacity: 0.2; }
}
.mg-hp-fill.dmg-flash { animation: mg-hp-flash 0.35s ease; }

/* Center HUD */
.mg-center-hud { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.mg-pdf-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.12);
  color: #c4b5fd;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s;
}
.mg-pdf-btn:hover { background: rgba(139,92,246,0.25); }

/* ── Notebook button ─────────────────────────────────────── */
.mg-notebook-btn {
  display: flex; align-items: center; gap: 5px; position: relative;
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(250,204,21,0.35);
  background: rgba(250,204,21,0.08);
  color: #fde68a;
  font-family: 'Orbitron', sans-serif; font-size: 0.52rem;
  font-weight: 700; letter-spacing: 0.08em;
  cursor: pointer; transition: background 0.15s;
}
.mg-notebook-btn:hover, .mg-notebook-btn.has-notes { background: rgba(250,204,21,0.18); }
.mg-notebook-badge {
  position: absolute; top: -5px; right: -5px;
  background: #facc15; color: #1a1030;
  font-size: 0.45rem; font-weight: 900;
  border-radius: 999px; min-width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Notebook panel ──────────────────────────────────────── */
.mg-notebook-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(360px, 92vw);
  background: rgba(8,5,30,0.97);
  border-left: 1px solid rgba(250,204,21,0.2);
  display: flex; flex-direction: column;
  z-index: 400;
  animation: mg-slide-in-right 0.22s ease;
}
@keyframes mg-slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.mg-nb-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(250,204,21,0.15);
  color: #fde68a;
  font-family: 'Orbitron', sans-serif; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
}
.mg-nb-close {
  margin-left: auto; background: none; border: none;
  color: rgba(253,230,138,0.5); font-size: 0.85rem; cursor: pointer;
}
.mg-nb-close:hover { color: #fde68a; }
.mg-nb-body { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.mg-nb-empty { display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 48px 24px; color: rgba(167,139,250,0.4); font-size: 0.75rem; text-align: center; line-height: 1.6; }
.mg-nb-chapter { border: 1px solid rgba(250,204,21,0.15); border-radius: 10px; overflow: hidden; }
.mg-nb-chap-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; cursor: pointer;
  background: rgba(250,204,21,0.06);
  color: #fde68a; font-size: 0.68rem; font-weight: 700;
  list-style: none; user-select: none;
}
.mg-nb-chap-title::-webkit-details-marker { display: none; }
.mg-nb-chap-count {
  background: rgba(250,204,21,0.2); color: #fde68a;
  border-radius: 999px; font-size: 0.55rem; font-weight: 900;
  padding: 1px 7px;
}
.mg-nb-entries { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; }
.mg-nb-entry {
  position: relative;
  background: rgba(139,92,246,0.07);
  border: 1px solid rgba(139,92,246,0.18);
  border-radius: 8px; padding: 10px 32px 10px 10px;
}
.mg-nb-entry-front { font-size: 0.68rem; color: rgba(196,181,253,0.7); margin-bottom: 4px; }
.mg-nb-entry-back  { font-size: 0.75rem; color: #e9d5ff; font-weight: 600; }
.mg-nb-entry-expl  { font-size: 0.65rem; color: rgba(167,139,250,0.7); margin-top: 5px; font-style: italic; line-height: 1.4; }
.mg-nb-del {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none;
  color: rgba(239,68,68,0.4); font-size: 0.7rem; cursor: pointer;
  transition: color 0.15s;
}
.mg-nb-del:hover { color: #ef4444; }


/* ── Pin button on chat messages ────────────────────────── */
.mg-chat-msg.monster { position: relative; padding-right: 28px; }
.mg-chat-pin-btn {
  position: absolute; top: 6px; right: 6px;
  background: none; border: none;
  color: rgba(250,204,21,0.35); cursor: pointer;
  padding: 2px; border-radius: 4px; transition: color 0.15s;
}
.mg-chat-pin-btn:hover { color: #facc15; }
.mg-chat-pin-btn:disabled { color: rgba(52,211,153,0.6); cursor: default; }
.mg-wave-badge {
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem; font-weight: 900;
  color: #bfdbfe; letter-spacing: 0.15em;
  background: rgba(139,0,255,0.2); border: 1px solid rgba(139,0,255,0.4);
  padding: 3px 10px; border-radius: 99px;
}
.mg-combo-display { display: flex; flex-direction: column; align-items: center; }
.mg-combo-x {
  font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 900;
  color: #fbbf24; text-shadow: 0 0 16px rgba(251,191,36,0.8);
}
.mg-combo-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.42rem; letter-spacing: 0.2em;
  color: rgba(251,191,36,0.7);
}
@keyframes mg-combo-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.mg-combo-display.pop { animation: mg-combo-pop 0.35s cubic-bezier(0.2,0,0.1,1.4); }

/* ── Arena ───────────────────────────────────────────────── */
/* ── Premium AI loading overlay ── */
@keyframes mg-load-ring-spin {
  100% { transform: rotate(360deg); }
}
@keyframes mg-load-ring-pulse {
  0%,100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
@keyframes mg-load-dot-bounce {
  0%,80%,100% { transform: translateY(0); opacity: 0.4; }
  40%          { transform: translateY(-10px); opacity: 1; }
}
@keyframes mg-load-glow-breathe {
  0%,100% { filter: drop-shadow(0 0 30px rgba(168,85,247,0.8)) drop-shadow(0 0 60px rgba(168,85,247,0.3)); }
  50%      { filter: drop-shadow(0 0 55px rgba(216,180,254,1)) drop-shadow(0 0 110px rgba(168,85,247,0.6)); }
}
@keyframes mg-load-count-pop {
  0%   { transform: scale(0.4) rotate(-8deg); opacity: 0; }
  65%  { transform: scale(1.12) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.mg-loading-overlay {
  position: fixed; inset: 0; z-index: 250;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(124,58,237,0.22) 0%, transparent 52%),
    radial-gradient(ellipse at 70% 70%, rgba(59,130,246,0.16) 0%, transparent 46%),
    radial-gradient(ellipse at 50% 55%, rgba(88,28,235,0.52) 0%, rgba(3,7,18,0.98) 72%);
  animation: mg-fade-in 0.5s ease forwards;
}
.mg-loading-monster-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  animation: mg-intro-monster-float 3.5s ease-in-out infinite;
}
.mg-loading-ring {
  position: absolute; width: 160px; height: 160px; border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(167,139,250,0.9);
  border-right-color: rgba(253,230,138,0.5);
  animation: mg-load-ring-spin 1.8s linear infinite;
}
.mg-loading-ring2 {
  position: absolute; width: 130px; height: 130px; border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(147,197,253,0.7);
  border-left-color: rgba(249,168,212,0.4);
  animation: mg-load-ring-spin 2.6s linear infinite reverse;
}
.mg-loading-aura {
  position: absolute; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.22) 0%, transparent 70%);
  animation: mg-load-ring-pulse 2.2s ease-in-out infinite;
}
.mg-loading-monster-img {
  width: 100px; height: auto; position: relative; z-index: 1;
  animation: mg-load-glow-breathe 2.4s ease-in-out infinite;
}
.mg-loading-text-block {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mg-loading-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: linear-gradient(90deg, #c4b5fd 0%, #fff 40%, #fde68a 60%, #c4b5fd 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: mg-intro-title-sweep 2.8s ease-in-out infinite;
}
.mg-loading-nodes-hint {
  font-family: 'Nunito', sans-serif; font-size: 0.72rem;
  color: rgba(196,181,253,0.6); letter-spacing: 0.06em;
}
.mg-loading-dots {
  display: flex; gap: 8px; align-items: center;
}
.mg-loading-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: #a78bfa;
  animation: mg-load-dot-bounce 1.4s ease-in-out infinite;
}
.mg-loading-dots span:nth-child(2) { animation-delay: 0.18s; background: #93c5fd; }
.mg-loading-dots span:nth-child(3) { animation-delay: 0.36s; background: #fde68a; }
/* Loading progress bar */
.mg-loading-progress-wrap {
  width: min(280px, 80vw); display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.mg-loading-progress-track {
  width: 100%; height: 6px; border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(139,92,246,0.3);
  overflow: hidden;
}
.mg-loading-progress-fill {
  height: 100%; border-radius: 10px; width: 0%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #fde68a);
  background-size: 200% 100%;
  transition: width 0.4s ease;
  animation: mg-bp-go-shimmer 1.8s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(167,139,250,0.6);
}
.mg-loading-progress-pct {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 700;
  color: rgba(196,181,253,0.7); letter-spacing: 0.1em;
}
/* Count reveal */
.mg-loading-count-reveal {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: mg-load-count-pop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-loading-count-num {
  font-family: 'Orbitron', sans-serif; font-size: 3.5rem; font-weight: 900;
  background: linear-gradient(135deg, #c4b5fd, #fde68a);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none; line-height: 1;
}
.mg-loading-count-label {
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800;
  color: rgba(255,255,255,0.85); letter-spacing: 0.08em;
}
.mg-loading-count-sub {
  font-family: 'Orbitron', sans-serif; font-size: 0.6rem;
  color: rgba(196,181,253,0.6); letter-spacing: 0.2em; text-transform: uppercase;
}

.mg-arena {
  flex: 1; overflow: hidden; position: relative;
  min-height: 0;
}

/* Mind map display — full-width viewport with camera pan/zoom */
.mg-map-wrap {
  position: absolute; inset: 0; overflow: hidden;
  background: transparent;
}
/* Permanent game background butterflies */
.mg-bg-butterflies {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  overflow: hidden;
}
.mg-stars-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
/* The "world" holds all nodes at full scale; CSS transform = camera */
.mg-world {
  position: absolute; top: 0; left: 0;
  transform-origin: 0 0;
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.mg-map-svg {
  position: absolute; top: 0; left: 0;
  pointer-events: none; overflow: visible;
}
.mg-map-nodes { position: absolute; top: 0; left: 0; }

/* Monster floating overlay */
.mg-monster-overlay {
  position: absolute; bottom: 0; right: 0;
  width: 140px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 10px; z-index: 10; pointer-events: none;
}
.mg-monster-overlay .mg-monster-aura {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 90%, rgba(220,0,80,0.22) 0%, transparent 70%);
}
.mg-monster-overlay .mg-monster-speech {
  pointer-events: none;
  position: absolute; bottom: 100%; right: 10px;
  background: rgba(30,0,15,0.92); border: 1px solid rgba(220,0,80,0.45);
  border-radius: 8px; padding: 6px 10px;
  font-family: 'Inter', sans-serif; font-size: 0.7rem; color: #fca5a5;
  white-space: normal; max-width: 160px; text-align: center;
  margin-bottom: 6px;
}

/* Regular node in game */
.mg-node {
  position: absolute;
  border-radius: 10px; padding: 6px 12px;
  font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600;
  color: #ffffff; cursor: default;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex; align-items: center; justify-content: center;
  text-align: center; white-space: pre-wrap;
  background: rgba(88,28,235,0.82);
  border: 2px solid rgba(167,139,250,0.9);
  box-shadow: 0 0 14px rgba(139,92,246,0.55), inset 0 1px 0 rgba(255,255,255,0.15);
  user-select: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.mg-node.just-placed {
  animation: mg-node-place 0.45s cubic-bezier(0.2,0,0.1,1.4) forwards;
}
@keyframes mg-node-place {
  0%   { transform: scale(0.3) rotate(-8deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Ghost slot (missing node) */
.mg-ghost {
  position: absolute;
  border-radius: 10px; padding: 6px 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(120,0,255,0.18);
  border: 2.5px dashed rgba(200,100,255,0.85);
  cursor: default;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.mg-ghost.drag-over {
  background: rgba(139,0,255,0.38);
  border-color: #c084fc;
  transform: scale(1.06);
  box-shadow: 0 0 28px rgba(180,0,255,0.7);
}
@keyframes mg-ghost-pulse {
  0%,100% { box-shadow: 0 0 10px rgba(180,0,255,0.5); border-color: rgba(200,100,255,0.7); }
  50%     { box-shadow: 0 0 26px rgba(200,80,255,0.95); border-color: rgba(220,140,255,1); }
}
.mg-ghost { animation: mg-ghost-pulse 1.8s ease-in-out infinite; }
.mg-ghost-icon {
  font-size: 1.2rem; opacity: 0.9;
  font-family: 'Orbitron', sans-serif; color: rgba(220,160,255,0.95);
  text-shadow: 0 0 8px rgba(200,100,255,0.8);
}
@keyframes mg-ghost-wrong {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.mg-ghost.wrong-shake { animation: mg-ghost-wrong 0.4s ease; }

/* Monster panel */
/* .mg-monster-panel replaced by .mg-monster-overlay (see above) */
.mg-monster-aura {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 80%, rgba(220,0,80,0.15) 0%, transparent 70%);
}
.mg-monster-full {
  width: 110px; height: auto; position: relative;
  filter: drop-shadow(0 0 20px rgba(220,0,80,0.5));
  transform-origin: center bottom;
  transition: filter 0.2s;
}
@keyframes mg-monster-idle {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50%     { transform: translateY(-5px) rotate(1deg); }
}
.mg-monster-full { animation: mg-monster-idle 3s ease-in-out infinite; }
@keyframes mg-monster-hit {
  0%,100% { transform: translateX(0) rotate(0); filter: drop-shadow(0 0 20px rgba(220,0,80,0.5)); }
  25%  { transform: translateX(-12px) rotate(-5deg); filter: drop-shadow(0 0 30px rgba(255,50,50,1)) brightness(1.8); }
  50%  { transform: translateX(10px) rotate(4deg); }
  75%  { transform: translateX(-6px) rotate(-2deg); }
}
.mg-monster-full.hit { animation: mg-monster-hit 0.5s ease forwards; }
@keyframes mg-monster-laugh {
  0%,100% { transform: scale(1) rotate(0); }
  30%  { transform: scale(1.12) rotate(3deg); }
  60%  { transform: scale(1.12) rotate(-3deg); }
}
.mg-monster-full.laugh { animation: mg-monster-laugh 0.5s ease forwards; }
@keyframes mg-monster-die {
  0%   { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 20px rgba(220,0,80,0.5)); }
  30%  { transform: scale(1.4) rotate(10deg); filter: brightness(3) drop-shadow(0 0 60px rgba(255,100,0,1)); }
  60%  { transform: scale(0.3) rotate(-20deg); opacity: 0.5; }
  100% { transform: scale(0) rotate(30deg); opacity: 0; }
}
.mg-monster-full.dying { animation: mg-monster-die 1.2s ease forwards; }

.mg-monster-speech {
  position: absolute; top: 8px; left: -65px;
  background: rgba(30,0,15,0.9); border: 1px solid rgba(220,0,80,0.4);
  border-radius: 8px; padding: 5px 9px;
  font-family: 'Inter', sans-serif; font-size: 0.65rem; color: #fca5a5;
  white-space: nowrap; max-width: 140px; white-space: normal;
}

/* ── Node tray ───────────────────────────────────────────── */
.mg-tray-section {
  flex-shrink: 0; padding: 8px 14px 10px;
  background: rgba(0,0,0,0.45);
  border-top: 1px solid rgba(139,0,255,0.2);
}
.mg-tray-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.45rem;
  color: rgba(200,150,255,0.5); letter-spacing: 0.14em;
  margin-bottom: 6px; text-align: center;
}
.mg-tray {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center;
  min-height: 44px;
}
.mg-tray-node {
  padding: 8px 16px; border-radius: 10px; cursor: grab;
  font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 700;
  color: #ffffff; white-space: nowrap;
  background: linear-gradient(135deg, rgba(109,40,217,0.92), rgba(168,0,120,0.85));
  border: 2px solid rgba(216,180,254,0.9);
  box-shadow: 0 0 18px rgba(139,0,255,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  user-select: none; touch-action: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.mg-tray-node:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 22px rgba(180,0,255,0.55); }
.mg-tray-node:active { cursor: grabbing; transform: scale(0.96); }
.mg-tray-node.dragging { opacity: 0.35; }
@keyframes mg-node-bounce-back {
  0%  { transform: scale(1); }
  40% { transform: scale(1.15) rotate(3deg); }
  70% { transform: scale(0.92) rotate(-2deg); }
  100%{ transform: scale(1) rotate(0); }
}
.mg-tray-node.bounce { animation: mg-node-bounce-back 0.4s ease; }

/* ── Flash feedback ──────────────────────────────────────── */
.mg-flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 300;
  opacity: 0; transition: opacity 0.1s;
}
.mg-flash.correct { background: rgba(74,222,128,0.18); opacity: 1; }
.mg-flash.wrong   { background: rgba(248,113,113,0.22); opacity: 1; }

/* ── End overlays ────────────────────────────────────────── */
/* ══════════════════════════════════════════════════
   VICTORY SCREEN — Premium
══════════════════════════════════════════════════ */
.mg-end-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: center; justify-content: center;
}
.mg-victory { background: radial-gradient(ellipse at 50% 40%, rgba(10,0,35,0.97) 0%, rgba(0,0,5,0.98) 100%); }
.mg-defeat  { background: radial-gradient(ellipse at 50% 40%, rgba(25,0,5,0.97) 0%, rgba(0,0,0,0.98) 100%); }

/* Starfield canvas behind victory content */
.mg-victory-stars {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
}
/* Rotating rays */
.mg-victory-rays {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: conic-gradient(from 0deg,
    transparent 0%, rgba(139,92,246,0.06) 4%, transparent 8%,
    transparent 46%, rgba(74,222,128,0.05) 50%, transparent 54%,
    transparent 71%, rgba(251,191,36,0.04) 75%, transparent 79%);
  animation: mg-rays-spin 14s linear infinite;
}
@keyframes mg-rays-spin { to { transform: rotate(360deg); } }

/* Main victory card */
.mg-victory-card {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  width: min(440px, 92vw);
  background: linear-gradient(160deg, rgba(30,5,70,0.96), rgba(8,0,22,0.98));
  border: 1.5px solid rgba(167,139,250,0.5);
  border-radius: 24px; padding: 32px 28px 24px;
  box-shadow: 0 0 80px rgba(139,0,255,0.35), 0 0 200px rgba(139,0,255,0.12), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: mg-card-enter 0.6s cubic-bezier(0.2,0,0.1,1.4) forwards;
}
@keyframes mg-card-enter {
  0%   { transform: scale(0.4) translateY(60px); opacity: 0; }
  100% { transform: scale(1)   translateY(0);    opacity: 1; }
}
.mg-victory-burst {
  position: absolute; inset: -40px; pointer-events: none; z-index: -1;
  border-radius: 50%; background: radial-gradient(ellipse, rgba(139,92,246,0.18) 0%, transparent 70%);
  animation: mg-burst-pulse 2s ease-in-out infinite;
}
@keyframes mg-burst-pulse {
  0%,100% { transform: scale(1);   opacity: 0.7; }
  50%     { transform: scale(1.15); opacity: 1;   }
}
.mg-victory-icon {
  font-size: 3.5rem; line-height: 1;
  animation: mg-icon-pop 0.5s cubic-bezier(0.2,0,0.1,1.5) 0.3s both;
  filter: drop-shadow(0 0 20px rgba(251,191,36,0.8));
}
@keyframes mg-icon-pop {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.mg-victory-title {
  font-family: 'Orbitron', sans-serif; font-size: 1.3rem; font-weight: 900;
  letter-spacing: 0.14em; color: #86efac;
  text-shadow: 0 0 30px rgba(74,222,128,0.9), 0 0 60px rgba(74,222,128,0.4);
  margin-top: 10px;
  animation: mg-title-slide 0.5s ease 0.5s both;
}
@keyframes mg-title-slide {
  0% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Stars rating */
.mg-victory-stars-row {
  display: flex; gap: 8px; margin: 14px 0 6px;
}
.mg-vstar {
  font-size: 2rem; color: rgba(255,255,255,0.15);
  transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
  display: inline-block;
}
.mg-vstar.lit {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251,191,36,1), 0 0 40px rgba(251,191,36,0.6);
  transform: scale(1.2);
}
@keyframes mg-star-pop {
  0% { transform: scale(0) rotate(-30deg); }
  60% { transform: scale(1.4) rotate(5deg); }
  100% { transform: scale(1.2) rotate(0); }
}
.mg-vstar.lit { animation: mg-star-pop 0.4s cubic-bezier(0.2,0,0.1,1.4) forwards; }

/* Stats */
.mg-victory-stats {
  display: flex; gap: 16px; margin: 12px 0 4px;
  animation: mg-title-slide 0.4s ease 0.8s both;
}
.mg-vstat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 8px 14px;
}
.mg-vstat-val {
  font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 900; color: #fff;
}
.mg-vstat-lbl {
  font-family: 'Inter', sans-serif; font-size: 0.55rem; color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* Rewards row */
.mg-victory-rewards {
  display: flex; gap: 10px; margin: 10px 0 0;
  animation: mg-title-slide 0.4s ease 1s both;
}
.mg-vreward {
  display: flex; align-items: center; gap: 5px;
  background: rgba(139,92,246,0.18); border: 1px solid rgba(167,139,250,0.4);
  border-radius: 8px; padding: 6px 14px;
  font-family: 'Orbitron', sans-serif; font-size: 0.6rem; font-weight: 800; color: #c4b5fd;
}
.mg-vreward-count {
  font-size: 0.85rem; color: #fbbf24;
  font-family: 'Orbitron', sans-serif; font-weight: 900;
}

/* Navigation buttons */
.mg-victory-nav, .mg-defeat-nav {
  display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 20px;
}
.mg-vnav-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 14px; border: none; cursor: pointer;
  width: 100%; text-align: left;
  transition: transform 0.15s cubic-bezier(0.2,0,0.1,1.4), box-shadow 0.15s;
  animation: mg-title-slide 0.4s ease var(--delay,1.2s) both;
}
.mg-vnav-btn:hover { transform: translateY(-3px) scale(1.02); }
.mg-vnav-btn:active { transform: scale(0.97); }
.mg-vnav-icon { font-size: 1.5rem; flex-shrink: 0; }
.mg-vnav-text { display: flex; flex-direction: column; gap: 1px; }
.mg-vnav-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.7rem; font-weight: 800;
  color: #fff; letter-spacing: 0.06em;
}
.mg-vnav-sub {
  font-family: 'Inter', sans-serif; font-size: 0.6rem; color: rgba(255,255,255,0.5);
}
.mg-vnav-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #059669 100%);
  box-shadow: 0 4px 20px rgba(124,58,237,0.45);
  --delay: 1.1s;
}
.mg-vnav-secondary {
  background: rgba(139,92,246,0.18); border: 1.5px solid rgba(139,92,246,0.35);
  --delay: 1.25s;
}
.mg-vnav-trophy {
  background: linear-gradient(135deg, #92400e 0%, #d97706 60%, #fbbf24 100%);
  box-shadow: 0 4px 24px rgba(217,119,6,0.55);
  --delay: 1.1s;
}

/* Defeat card */
.mg-defeat-card {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(400px, 90vw); text-align: center;
  background: linear-gradient(160deg, rgba(40,0,15,0.97), rgba(8,0,5,0.98));
  border: 1.5px solid rgba(248,113,113,0.35);
  border-radius: 24px; padding: 32px 28px 24px;
  box-shadow: 0 0 60px rgba(220,0,80,0.25);
  animation: mg-card-enter 0.5s cubic-bezier(0.2,0,0.1,1.4) forwards;
}
.mg-defeat-icon { font-size: 3.5rem; }
.mg-defeat-title {
  font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 900;
  color: #fca5a5; letter-spacing: 0.1em;
  text-shadow: 0 0 25px rgba(248,113,113,0.7);
}
.mg-defeat-sub { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.mg-defeat-tip {
  background: rgba(255,255,255,0.05); border-radius: 8px; padding: 8px 14px;
  font-size: 0.72rem; color: rgba(200,150,255,0.8); font-style: italic;
  max-width: 300px;
}

/* ══════════════════════════════════════════════════
   GAMEPLAY FEEDBACK — floating damage, snap particles
══════════════════════════════════════════════════ */
.mg-dmg-float {
  position: absolute; pointer-events: none; z-index: 50;
  font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1rem;
  color: #fbbf24; text-shadow: 0 0 12px rgba(251,191,36,0.9);
  animation: mg-dmg-rise 0.9s ease forwards;
  white-space: nowrap;
}
.mg-dmg-float.combo {
  font-size: 1.15rem; color: #f472b6;
  text-shadow: 0 0 14px rgba(244,114,182,0.9);
}
@keyframes mg-dmg-rise {
  0%   { transform: translateY(0)    scale(0.5); opacity: 0; }
  15%  { transform: translateY(-8px) scale(1.1); opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(-60px) scale(0.85); opacity: 0; }
}

@keyframes mg-snap-burst {
  0%   { transform: translate(0,0) scale(1);   opacity: 1; }
  100% { transform: translate(var(--tx),var(--ty)) scale(0); opacity: 0; }
}

/* Monster rage mode (HP < 50%) */
.mg-monster-overlay.rage .mg-monster-full {
  filter: drop-shadow(0 0 30px rgba(255,30,0,0.95)) hue-rotate(-15deg) saturate(1.5) !important;
  animation: mg-monster-idle 1.6s ease-in-out infinite !important;
}
.mg-monster-overlay.rage::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at 50% 80%, rgba(255,0,50,0.3) 0%, transparent 70%);
  animation: mg-burst-pulse 1s ease-in-out infinite;
}

/* Zone progress dots (in center HUD) */
.mg-zone-dots {
  display: flex; gap: 5px; align-items: center; justify-content: center;
  margin-top: 2px;
}
.mg-zone-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(139,92,246,0.4);
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.mg-zone-dot.done {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,0.8);
  transform: scale(1.2);
}
.mg-zone-dot.current {
  background: #a78bfa;
  box-shadow: 0 0 10px rgba(167,139,250,0.9);
  transform: scale(1.35);
  animation: mg-burst-pulse 0.8s ease-in-out infinite;
}


/* ══════════════════════════════════════════════════════════
   MONSTER GAME — PREMIUM OVERLAY & CARD DESIGN
══════════════════════════════════════════════════════════ */
.mg-question-overlay,
.mg-flashcard-overlay {
  position: fixed; inset: 0; z-index: 500;
  background:
    radial-gradient(ellipse 80% 55% at 50% 15%, rgba(88,28,235,0.32) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 15% 90%, rgba(6,182,212,0.14) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 88% 65%, rgba(217,70,239,0.13) 0%, transparent 50%),
    rgba(4,3,18,0.97);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 148px 16px 40px; gap: 16px;
  animation: mg-fade-in 0.4s ease forwards;
  overflow-y: auto; overflow-x: hidden;
}
.mg-question-overlay.hidden,
.mg-flashcard-overlay.hidden,
.mg-open-q-overlay.hidden { display: none; }

/* ── Open / exam-style question overlay ─────────────────── */
.mg-open-q-overlay {
  position: fixed; inset: 0; z-index: 500;
  background:
    radial-gradient(ellipse 80% 55% at 50% 15%, rgba(88,28,235,0.32) 0%, transparent 60%),
    radial-gradient(ellipse 45% 35% at 88% 65%, rgba(217,70,239,0.13) 0%, transparent 50%),
    rgba(4,3,18,0.97);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 148px 16px 60px; gap: 16px;
  animation: mg-fade-in 0.4s ease forwards;
  overflow-y: auto; overflow-x: hidden;
}
.mg-oq-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px; border-radius: 50px;
  background: rgba(124,58,237,0.2); border: 1px solid rgba(139,92,246,0.45);
  font-family: 'Orbitron', sans-serif; font-size: 0.65rem; font-weight: 700;
  color: #a78bfa; letter-spacing: 0.12em; text-transform: uppercase;
}
.mg-oq-question {
  max-width: 680px; width: 100%;
  background: rgba(255,255,255,0.04); border: 1.5px solid rgba(139,92,246,0.4);
  border-radius: 18px; padding: 24px 28px;
  font-family: 'Nunito', sans-serif; font-size: 1.05rem; font-weight: 700;
  color: #f0eef8; line-height: 1.6; text-align: center;
  backdrop-filter: blur(10px);
}
.mg-oq-reveal-btn {
  margin-top: 4px; padding: 14px 40px; border-radius: 50px; cursor: pointer; border: none;
  background: linear-gradient(90deg, #7c3aed 0%, #c026d3 100%);
  color: #fff; font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 800;
  box-shadow: 0 4px 20px rgba(192,38,211,0.45);
  transition: filter 0.15s, transform 0.13s;
}
.mg-oq-reveal-btn:hover { filter: brightness(1.12); transform: translateY(-2px); }
.mg-oq-answer-wrap {
  max-width: 680px; width: 100%;
  background: rgba(10,6,30,0.7); border: 1.5px solid rgba(52,211,153,0.4);
  border-radius: 18px; padding: 22px 26px;
  backdrop-filter: blur(10px);
  animation: mg-fade-in 0.35s ease forwards;
}
.mg-oq-answer-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.65rem; font-weight: 700;
  color: #6ee7b7; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px;
}
.mg-oq-answer-text {
  font-family: 'Nunito', sans-serif; font-size: 0.92rem; color: #e0f2fe; line-height: 1.7;
}
.mg-oq-keypoints {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(139,92,246,0.25);
}
.mg-oq-kp-label {
  font-size: 0.75rem; font-weight: 700; color: #a78bfa; margin-bottom: 8px;
  font-family: 'Nunito', sans-serif;
}
.mg-oq-kp-item {
  font-family: 'Nunito', sans-serif; font-size: 0.85rem; color: #c4b5fd;
  line-height: 1.6; margin-bottom: 4px;
}
.mg-oq-self-row {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: 4px; animation: mg-fade-in 0.3s ease forwards;
}
.mg-oq-self-label {
  font-family: 'Nunito', sans-serif; font-size: 0.85rem; color: rgba(196,181,253,0.7);
  font-weight: 600;
}
.mg-oq-self-btn {
  width: 100%; max-width: 360px; padding: 13px 28px;
  border-radius: 50px; border: none; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: 0.92rem; font-weight: 800;
  transition: filter 0.15s, transform 0.13s;
}
.mg-oq-self-btn.yes {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
  color: #fff; box-shadow: 0 4px 18px rgba(16,185,129,0.4);
}
.mg-oq-self-btn.no {
  background: rgba(239,68,68,0.15); border: 1.5px solid rgba(239,68,68,0.45);
  color: #fca5a5;
}
.mg-oq-self-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* ── Butterfly particles ─────────────────────────────────── */
.mg-overlay-butterflies {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.mg-butterfly {
  position: absolute; opacity: 0;
  animation: mg-bf-float var(--dur,4s) ease-in-out var(--delay,0s) infinite;
  display: flex; align-items: center; justify-content: center;
}
@keyframes mg-bf-float {
  0%   { opacity:0; transform:translate(0,0) rotate(-15deg) scale(0.6); }
  12%  { opacity:0.85; }
  50%  { opacity:0.65; transform:translate(var(--dx,25px),-70px) rotate(20deg) scale(1.05); }
  88%  { opacity:0.3; }
  100% { opacity:0; transform:translate(var(--dx2,-15px),-150px) rotate(-8deg) scale(0.5); }
}

/* ── Overlay starfield canvas ───────────────────────────── */
canvas.mg-ov-stars {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}

/* ── Overlay node label (selected node pill) ─────────────── */
.mg-ov-node-label {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 503; white-space: nowrap; max-width: calc(100% - 32px);
  overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(135deg,
    rgba(10,5,30,0.88) 0%,
    rgba(30,10,60,0.88) 100%);
  border: 2px solid transparent;
  border-radius: 50px; padding: 8px 24px;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.15em; color: #fff; text-transform: uppercase;
  backdrop-filter: blur(10px);
  background-clip: padding-box;
  box-shadow:
    0 0 0 2px rgba(139,92,246,0.8),
    0 0 28px rgba(139,92,246,0.7),
    0 0 12px rgba(6,182,212,0.5),
    0 0 8px rgba(217,70,239,0.4),
    inset 0 1px 0 rgba(255,255,255,0.18);
  text-shadow:
    0 0 12px rgba(196,181,253,0.9),
    0 0 28px rgba(139,92,246,0.6);
  animation: mg-node-label-glow 3s ease-in-out infinite;
}
@keyframes mg-node-label-glow {
  0%,100% { box-shadow: 0 0 0 2px rgba(139,92,246,0.8), 0 0 28px rgba(139,92,246,0.7), 0 0 12px rgba(6,182,212,0.5), 0 0 8px rgba(217,70,239,0.4), inset 0 1px 0 rgba(255,255,255,0.18); }
  50%      { box-shadow: 0 0 0 2px rgba(167,139,250,1),  0 0 44px rgba(139,92,246,1),   0 0 20px rgba(6,182,212,0.8), 0 0 14px rgba(217,70,239,0.7), inset 0 1px 0 rgba(255,255,255,0.28); }
}

/* ── Overlay progress bar — juste sous le pill du nœud ───── */
.mg-ov-progress {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  z-index: 503; width: min(400px, calc(100% - 40px));
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: rgba(4,3,18,0.65);
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 14px; padding: 8px 14px 7px;
  backdrop-filter: blur(8px);
}
.mg-ov-progress-bar {
  width: 100%; height: 7px; border-radius: 99px;
  background: rgba(139,92,246,0.18); overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(139,92,246,0.3);
}
.mg-ov-progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 35%, #22d3ee 65%, #e879f9 100%);
  transition: width 0.55s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 10px rgba(139,92,246,0.85), 0 0 5px rgba(34,211,238,0.65);
}
.mg-ov-progress-text {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.75); text-transform: uppercase;
}

/* ── Card shell ──────────────────────────────────────────── */
.mg-question-card,
.mg-flashcard-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 680px;
  background: linear-gradient(150deg, rgba(22,14,52,0.98) 0%, rgba(9,7,30,0.98) 100%);
  border-radius: 20px; padding: 16px 18px;
  border-top: 3px solid transparent;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.45),
    0 0 40px rgba(88,28,235,0.35),
    inset 0 1px 0 rgba(255,255,255,0.09),
    inset 0 -1px 0 rgba(0,0,0,0.4);
  animation: mg-card-enter 0.55s cubic-bezier(0.34,1.56,0.64,1) forwards;
  cursor: pointer;
}
/* ── Flashcard = fuchsia, Cas clinique = cyan ── */
.mg-flashcard-overlay .mg-flashcard-wrap {
  border-top-color: #e879f9;
  box-shadow: 0 0 0 1px rgba(232,121,249,0.35), 0 0 32px rgba(217,70,239,0.18), 0 8px 32px rgba(0,0,0,0.55);
}
.mg-flashcard-overlay .mg-flashcard-wrap::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 48px;
  background: linear-gradient(180deg, rgba(217,70,239,0.10) 0%, transparent 100%);
  border-radius: 20px 20px 0 0; pointer-events: none;
}
.mg-question-overlay .mg-question-card {
  border-top-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34,211,238,0.3), 0 0 32px rgba(6,182,212,0.14), 0 8px 32px rgba(0,0,0,0.55);
}
.mg-question-overlay .mg-question-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 48px;
  background: linear-gradient(180deg, rgba(6,182,212,0.09) 0%, transparent 100%);
  border-radius: 20px 20px 0 0; pointer-events: none;
}
/* shimmer top edge */
.mg-question-card::before, .mg-flashcard-wrap::before {
  content:''; position:absolute; top:0; left:18%; right:18%; height:1px;
  background:linear-gradient(90deg,transparent,rgba(196,181,253,0.55),rgba(139,92,246,1),rgba(196,181,253,0.55),transparent);
  border-radius:0 0 4px 4px;
}

/* ── Monster header row ──────────────────────────────────── */
.mg-question-monster-row { display:flex; align-items:center; gap:12px; }
.mg-question-monster-img {
  width:44px; height:44px; object-fit:contain; flex-shrink:0;
  filter:drop-shadow(0 0 10px rgba(139,92,246,0.8));
  animation:mg-monster-idle 2.5s ease-in-out infinite;
}

/* ── Type badge ──────────────────────────────────────────── */
.mg-question-type-badge {
  font-family:'Orbitron',sans-serif; font-size:0.6rem;
  font-weight:800; letter-spacing:0.16em; text-transform:uppercase;
  border-radius:99px; padding:5px 14px; display:inline-flex; align-items:center; gap:5px;
  background:linear-gradient(135deg,rgba(217,70,239,0.18),rgba(139,92,246,0.15));
  border:1px solid rgba(217,70,239,0.45); color:#e879f9;
  box-shadow:0 0 14px rgba(217,70,239,0.2);
}
.mg-question-type-badge[data-mode="clinique"] {
  background:linear-gradient(135deg,rgba(6,182,212,0.18),rgba(14,165,233,0.12));
  border-color:rgba(6,182,212,0.5); color:#67e8f9;
  box-shadow:0 0 14px rgba(6,182,212,0.2);
}
.mg-question-type-badge[data-mode="flashcard"] {
  background:linear-gradient(135deg,rgba(245,158,11,0.18),rgba(251,191,36,0.12));
  border-color:rgba(245,158,11,0.5); color:#fcd34d;
  box-shadow:0 0 14px rgba(245,158,11,0.2);
}

/* ── Node name badge (shown during game) ─────────────────── */
.mg-node-name-badge {
  font-family:'Nunito',sans-serif; font-size:0.75rem; font-weight:700;
  color:rgba(196,181,253,0.9);
  background:rgba(88,28,235,0.12);
  border:1px solid rgba(139,92,246,0.28);
  border-radius:99px; padding:3px 14px; text-align:center;
  max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* ── Scenario (cas clinique context) ─────────────────────── */
.mg-question-scenario {
  font-size:0.88rem; color:rgba(165,243,252,0.88);
  line-height:1.65; font-family:'Nunito',sans-serif;
  background:rgba(6,182,212,0.07);
  border-left:3px solid rgba(6,182,212,0.55);
  border-radius:0 12px 12px 0; padding:10px 14px;
  display:flex; flex-direction:column; gap:10px;
}
.mg-question-scenario.hidden { display:none; }
.mg-scenario-text { font-style:italic; }

/* ── Reference values table ──────────────────────────────── */
.mg-ref-table {
  width:100%; border-collapse:collapse; font-style:normal;
  font-size:0.78rem; font-family:'Nunito',sans-serif;
  border-radius:10px; overflow:hidden;
}
.mg-ref-table thead tr {
  background:rgba(6,182,212,0.18);
}
.mg-ref-table thead th {
  padding:5px 10px; text-align:left; font-weight:700;
  color:rgba(103,232,249,0.9); font-size:0.72rem;
  letter-spacing:0.04em; text-transform:uppercase;
  border-bottom:1px solid rgba(6,182,212,0.3);
}
.mg-ref-table tbody tr {
  border-bottom:1px solid rgba(6,182,212,0.12);
}
.mg-ref-table tbody tr:last-child { border-bottom:none; }
.mg-ref-table td {
  padding:5px 10px; vertical-align:top;
  color:rgba(224,242,254,0.85);
}
.mg-ref-name  { font-weight:700; color:#67e8f9; white-space:nowrap; }
.mg-ref-val   { color:rgba(165,243,252,0.7); white-space:nowrap; }
.mg-ref-normal {
  color:#4ade80; font-weight:600; white-space:nowrap;
}
.mg-ref-def   { color:rgba(203,213,225,0.75); font-style:italic; }

/* ── Bouton ✕ (cercle violet solide, haut-gauche) ───────────*/
.mg-exit-btn {
  position: fixed; top: 16px; left: 16px; z-index: 520;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: rgba(100,50,200,0.55);
  border: none;
  border-radius: 16px;
  color: rgba(220,210,255,0.9);
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s, transform 0.13s;
}
.mg-exit-btn:hover {
  background: rgba(110,60,210,0.7);
  transform: scale(1.06);
}
.mg-exit-btn svg { flex-shrink: 0; }

/* ── Exit overlay modal ──────────────────────────────────── */
.mg-exit-modal {
  position: fixed; inset: 0; z-index: 610;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(109,40,217,0.28) 0%, transparent 65%),
    rgba(2,1,14,0.88);
  backdrop-filter: blur(24px) saturate(160%);
}
.mg-exit-modal.hidden { display: none; }

@keyframes mg-exit-modal-enter {
  from { opacity: 0; transform: scale(0.86) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes mg-border-sweep {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes mg-btn-shimmer {
  0%      { left: -110%; }
  55%,100%{ left:  130%; }
}
@keyframes mg-danger-breathe {
  0%,100%{ box-shadow: 0 0 10px rgba(220,38,38,0.2), inset 0 1px 0 rgba(255,100,80,0.1); }
  50%    { box-shadow: 0 0 28px rgba(220,38,38,0.55), inset 0 1px 0 rgba(255,100,80,0.15); }
}
@keyframes mg-icon-pulse {
  0%,100%{ box-shadow: 0 0 14px rgba(139,92,246,0.4), 0 0 0 0 rgba(139,92,246,0.3); }
  50%    { box-shadow: 0 0 28px rgba(139,92,246,0.7), 0 0 0 6px rgba(139,92,246,0); }
}

.mg-exit-modal-box {
  position: relative;
  background: linear-gradient(160deg, rgba(22,8,58,0.97) 0%, rgba(7,3,22,0.99) 100%);
  border-radius: 28px;
  padding: 36px 24px 28px;
  width: min(88vw, 370px);
  display: flex; flex-direction: column; gap: 13px;
  overflow: hidden;
  box-shadow:
    0 0 0 1.5px rgba(139,92,246,0.5),
    0 0 0 3px   rgba(139,92,246,0.12),
    0 0  60px rgba(109,40,217,0.55),
    0 0 120px rgba(88,28,235,0.2),
    0 40px 80px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.12);
  animation: mg-exit-modal-enter 0.38s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* Barre lumineuse animée en haut */
.mg-exit-modal-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, #7c3aed 20%, #c026d3 40%, #06b6d4 60%, #a78bfa 80%, transparent 100%);
  background-size: 200% 100%;
  animation: mg-border-sweep 3s linear infinite;
}

/* Lueur radiale intérieure */
.mg-exit-modal-box::after {
  content: '';
  position: absolute; inset: 0; border-radius: 28px;
  background: radial-gradient(ellipse 90% 45% at 50% 0%, rgba(139,92,246,0.16) 0%, transparent 65%);
  pointer-events: none;
}

/* Cercle ! */
.mg-exit-modal-icon-wrap {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1.5px solid rgba(139,92,246,0.6);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 4px;
  background: rgba(88,28,235,0.15);
  animation: mg-icon-pulse 2.8s ease-in-out infinite;
}

/* Titre */
.mg-exit-modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.28rem; font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #d8b4fe 50%, #a78bfa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center; letter-spacing: 0.01em; margin-bottom: 2px;
}

/* Sous-titre */
.mg-exit-modal-sub {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem; color: rgba(196,181,253,0.58);
  text-align: center; margin: -4px 0 6px; line-height: 1.5;
}

/* Base boutons */
.mg-exit-opt {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 17px 22px;
  border: none; border-radius: 50px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem; font-weight: 900;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s, transform 0.13s, box-shadow 0.2s;
}
.mg-exit-opt:hover { filter: brightness(1.18); transform: scale(1.025); }

/* Shimmer sweep sur tous les boutons primaires */
.mg-exit-opt::after {
  content: '';
  position: absolute; top: 0; left: -110%; width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  animation: mg-btn-shimmer 2.8s ease-in-out infinite;
}

/* Variante primaire — dégradé violet→fuchsia */
.mg-exit-opt-primary {
  background: linear-gradient(90deg, #7c3aed 0%, #c026d3 100%);
  box-shadow:
    0 4px 20px rgba(192,38,211,0.45),
    0 2px 6px  rgba(124,58,237,0.4),
    inset 0 1px 0 rgba(255,255,255,0.18);
}
.mg-exit-opt-primary:hover {
  box-shadow:
    0 8px 32px rgba(192,38,211,0.65),
    0 4px 12px rgba(124,58,237,0.5);
}

/* Variante danger — bordeaux pulsant */
.mg-exit-opt-danger {
  background: rgba(100,12,12,0.5);
  border: 1.5px solid rgba(220,60,40,0.55);
  color: #ff8070;
  animation: mg-danger-breathe 3s ease-in-out infinite;
}
.mg-exit-opt-danger::after { display: none; }
.mg-exit-opt-danger:hover {
  background: rgba(160,20,20,0.68);
  border-color: rgba(248,113,113,0.8);
  filter: brightness(1.12);
  animation: none;
  box-shadow: 0 6px 24px rgba(220,38,38,0.5);
}

/* Bouton Annuler */
.mg-exit-cancel {
  width: 100%; padding: 13px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 50px;
  color: rgba(148,163,184,0.45);
  font-family: 'Nunito', sans-serif;
  font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mg-exit-cancel:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(203,213,225,0.7);
  border-color: rgba(148,163,184,0.3);
}
.mg-exit-cancel:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(203,213,225,0.75);
}

.mg-exit-row { display: flex; gap: 10px; }

/* ── Question text ───────────────────────────────────────── */
.mg-question-text {
  font-size:1.05rem; font-weight:800; color:#f0ebff;
  line-height:1.55; font-family:'Nunito',sans-serif; text-transform:none;
}

/* ── Two-column layout inside overlays ───────────────────── */
.mg-ov-content-row {
  display: flex; flex-direction: row; align-items: flex-start;
  flex-wrap: wrap;
  gap: 22px; width: 100%; max-width: 1100px;
  padding-top: 0;
}
.mg-ov-card-col {
  flex: 1; min-width: 280px; max-width: 620px;
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
}

/* ── Options — fuchsia uniforme ──────────────────────────── */
.mg-question-options { display:flex; flex-direction:column; gap:9px; }
.mg-q-option {
  display:flex; align-items:center; gap:12px;
  border-radius:14px; padding:13px 16px;
  font-size:0.9rem; text-align:left; cursor:pointer;
  font-family:'Nunito',sans-serif; font-weight:600;
  text-transform:none; line-height:1.55;
  transition:all 0.22s cubic-bezier(0.4,0,0.2,1);
  position:relative; overflow:hidden;
  border-left:3px solid #e879f9;
  border-top:1px solid rgba(232,121,249,0.35);
  border-right:1px solid rgba(232,121,249,0.35);
  border-bottom:1px solid rgba(232,121,249,0.35);
  background:linear-gradient(135deg,rgba(217,70,239,0.16) 0%,rgba(168,85,247,0.08) 100%);
  color:#fae8ff;
  box-shadow:0 2px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}
.mg-q-option::before {
  content:''; position:absolute; top:0; left:10%; right:10%; height:1px;
  background:linear-gradient(90deg,transparent,rgba(232,121,249,0.55),transparent);
  border-radius:0 0 2px 2px;
}
.mg-q-option:hover:not(:disabled) {
  background:linear-gradient(135deg,rgba(217,70,239,0.28) 0%,rgba(168,85,247,0.16) 100%);
  border-left-color:#f0abfc; border-top-color:rgba(232,121,249,0.6);
  border-right-color:rgba(232,121,249,0.6); border-bottom-color:rgba(232,121,249,0.6);
  transform:translateX(4px);
  box-shadow:0 4px 20px rgba(217,70,239,0.35),inset 0 1px 0 rgba(255,255,255,0.08);
}
.mg-q-option:disabled { cursor:default; transform:none !important; }
.mg-q-letter {
  flex-shrink:0; width:26px; height:26px; border-radius:7px;
  background:rgba(217,70,239,0.35); border:1px solid rgba(232,121,249,0.6);
  font-family:'Orbitron',sans-serif; font-size:0.72rem; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  align-self:flex-start; margin-top:2px;
  color:#f0abfc; box-shadow:0 0 8px rgba(217,70,239,0.5);
}
.mg-q-option.correct {
  background:linear-gradient(135deg,rgba(16,185,129,0.22) 0%,rgba(5,150,105,0.12) 100%) !important;
  border-left-color:#4ade80 !important; border-top-color:rgba(74,222,128,0.65) !important;
  border-right-color:rgba(74,222,128,0.65) !important; border-bottom-color:rgba(74,222,128,0.65) !important;
  color:#6ee7b7 !important;
  box-shadow:0 0 24px rgba(16,185,129,0.35), inset 0 1px 0 rgba(74,222,128,0.15) !important;
}
.mg-q-option.correct .mg-q-letter { background:rgba(16,185,129,0.4) !important; border-color:rgba(74,222,128,0.75) !important; color:#4ade80 !important; box-shadow:0 0 10px rgba(74,222,128,0.7) !important; }
.mg-q-option.wrong {
  background:linear-gradient(135deg,rgba(239,68,68,0.2) 0%,rgba(185,28,28,0.1) 100%) !important;
  border-left-color:#f87171 !important; border-top-color:rgba(248,113,113,0.65) !important;
  border-right-color:rgba(248,113,113,0.65) !important; border-bottom-color:rgba(248,113,113,0.65) !important;
  color:#fca5a5 !important;
  animation:mg-wrong-shake 0.4s ease forwards;
}
.mg-q-option.wrong .mg-q-letter { background:rgba(239,68,68,0.35) !important; border-color:rgba(248,113,113,0.7) !important; color:#f87171 !important; }

/* Old explanation div — masqué, remplacé par le chat */
.mg-question-explanation { display:none !important; }

/* ══ Chat panel — discussion jeu ══════════════════════════ */
.mg-game-chat {
  flex: 0 0 300px; width: 300px; min-width: 260px;
  height: calc(100vh - 148px); max-height: 700px;
  background: linear-gradient(150deg, rgba(14,8,36,0.98) 0%, rgba(6,4,18,0.98) 100%);
  border: 1px solid rgba(139,92,246,0.35); border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 0 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(139,92,246,0.12),
              inset 0 1px 0 rgba(255,255,255,0.06);
  position: sticky; top: 96px;
  animation: mg-card-enter 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-chat-header {
  padding: 12px 14px; flex-shrink: 0;
  border-bottom: 1px solid rgba(139,92,246,0.2);
  display: flex; align-items: center; gap: 10px;
  background: rgba(139,92,246,0.06);
}
.mg-chat-header-img {
  width: 30px; height: 30px; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.7)) drop-shadow(0 0 4px rgba(139,92,246,0.5));
}
.mg-chat-header-info { display: flex; flex-direction: column; gap: 1px; }
.mg-chat-header-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem;
  font-weight: 800; letter-spacing: 0.1em; color: #c4b5fd;
}
.mg-chat-header-status {
  font-size: 0.6rem; color: rgba(196,181,253,0.45); font-family: 'Nunito', sans-serif;
}
.mg-chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 10px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.mg-chat-messages::-webkit-scrollbar { width: 3px; }
.mg-chat-messages::-webkit-scrollbar-track { background: transparent; }
.mg-chat-messages::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.35); border-radius: 99px; }
.mg-chat-msg {
  max-width: 88%; padding: 9px 12px; border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 0.8rem;
  font-weight: 500; line-height: 1.55;
  animation: mg-chat-msg-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes mg-chat-msg-in {
  from { opacity:0; transform:translateY(8px) scale(0.95); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.mg-chat-msg.monster {
  align-self: flex-start;
  background: linear-gradient(135deg,rgba(99,102,241,0.2),rgba(67,56,202,0.12));
  border: 1px solid rgba(99,102,241,0.4); border-radius: 4px 14px 14px 14px;
  color: #c7d2fe;
}
.mg-chat-msg.player {
  align-self: flex-end;
  background: linear-gradient(135deg,rgba(139,92,246,0.25),rgba(88,28,235,0.15));
  border: 1px solid rgba(139,92,246,0.4); border-radius: 14px 4px 14px 14px;
  color: #e9d5ff;
}
.mg-chat-msg.typing {
  align-self: flex-start;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.28);
  border-radius: 4px 14px 14px 14px; padding: 10px 16px;
  display: flex; gap: 4px; align-items: center;
}
.mg-chat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(167,139,250,0.8);
  animation: mg-chat-typing 1.2s ease-in-out infinite;
}
.mg-chat-dot:nth-child(2) { animation-delay: 0.2s; }
.mg-chat-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes mg-chat-typing {
  0%,60%,100% { transform:translateY(0); opacity:0.5; }
  30%          { transform:translateY(-5px); opacity:1; }
}
.mg-chat-msg.section-sep {
  align-self: center; background: none; border: none; padding: 2px 0;
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem;
  letter-spacing: 0.14em; color: rgba(196,181,253,0.3); text-transform: uppercase;
}

/* ── Chat question input ─────────────────────────────────── */
.mg-chat-input-zone {
  flex-shrink: 0; padding: 10px 10px 12px;
  border-top: 1px solid rgba(99,102,241,0.2);
  background: rgba(99,102,241,0.04);
  display: flex; gap: 8px; align-items: flex-end;
}
.mg-chat-input {
  flex: 1; min-height: 34px; max-height: 80px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(99,102,241,0.35);
  border-radius: 12px; padding: 8px 11px; resize: none; outline: none;
  font-family: 'Nunito', sans-serif; font-size: 0.78rem; font-weight: 500;
  color: #e9d5ff; line-height: 1.4;
  transition: border-color 0.2s;
}
.mg-chat-input::placeholder { color: rgba(196,181,253,0.35); }
.mg-chat-input:focus { border-color: rgba(139,92,246,0.7); }
.mg-chat-send-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg,rgba(99,102,241,0.55),rgba(139,92,246,0.45));
  border: 1px solid rgba(139,92,246,0.5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #c4b5fd; transition: all 0.18s;
}
.mg-chat-send-btn:hover { background: linear-gradient(135deg,rgba(99,102,241,0.8),rgba(139,92,246,0.7)); color: #fff; }
.mg-chat-send-btn:disabled { opacity: 0.35; cursor: default; }

/* Old explanation styles — neutralised */
.mg-exp-monster-img, .mg-exp-text { display: none; }
.mg-question-explanation.hidden { display:none !important; }

/* ── Explanation — monstre parle (kept for reference, overridden above) */
.mg-question-explanation-old {
  display:flex; align-items:flex-start; gap:12px;
  font-size:0.9rem; line-height:1.65; font-family:'Nunito',sans-serif;
  text-transform:none; font-weight:500;
  background:linear-gradient(135deg,rgba(220,0,80,0.1) 0%,rgba(88,28,235,0.09) 100%);
  border-radius:16px; padding:14px 16px;
  border-left:3px solid rgba(220,0,80,0.65);
  box-shadow:0 0 24px rgba(220,0,80,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
  color:rgba(253,164,175,0.95);
  animation:mg-card-enter 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-exp-monster-img {
  width:44px; height:44px; object-fit:contain; flex-shrink:0;
  filter:drop-shadow(0 0 10px rgba(220,0,80,0.5));
  animation:mg-monster-idle 3s ease-in-out infinite;
}
.mg-exp-text { flex:1; }
.mg-question-explanation.hidden { display:none; }

/* ══ Node + Type Picker Overlay ═══════════════════════════ */
.mg-picker-overlay {
  position: fixed; inset: 0; z-index: 499;
  background:
    radial-gradient(ellipse 80% 55% at 50% 15%, rgba(88,28,235,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 55% 40% at 15% 90%, rgba(6,182,212,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 88% 65%, rgba(217,70,239,0.12) 0%, transparent 50%),
    rgba(4,3,18,0.97);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 22px;
  padding: 70px 16px 90px;
  animation: mg-fade-in 0.35s ease forwards;
  overflow-y: auto; overflow-x: hidden;
}
.mg-picker-overlay.hidden { display: none; }

/* Monster row + speech */
.mg-picker-monster-row {
  display: flex; align-items: flex-end; gap: 18px;
  max-width: 700px; width: 100%;
}
.mg-picker-monster-img {
  width: 80px; height: auto; flex-shrink: 0;
  filter: drop-shadow(0 0 20px rgba(99,102,241,0.75)) drop-shadow(0 0 8px rgba(139,92,246,0.5));
  animation: mg-monster-idle 3s ease-in-out infinite;
}
.mg-picker-speech {
  background: #fff;
  border: none;
  border-radius: 18px 18px 18px 4px;
  padding: 14px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem; font-weight: 700; color: #3b0764;
  line-height: 1.45;
  box-shadow: 0 4px 24px rgba(139,92,246,0.28);
}
.mg-picker-speech strong { color: #6d28d9; }

.mg-picker-section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem; font-weight: 900;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 18px rgba(167,139,250,0.95),
    0 0 40px rgba(139,92,246,0.6),
    0 0 8px rgba(255,255,255,0.4);
  padding: 6px 0 2px;
}

/* ── Node grid ─────────────────────────────────────────── */
.mg-node-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px; width: 100%; max-width: 700px;
}
@keyframes mg-holo-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes mg-gold-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.mg-node-pick-card {
  position: relative;
  background: rgba(8,5,25,0.78);
  border-radius: 16px;
  padding: 18px 14px 16px; cursor: pointer; text-align: center;
  font-family: 'Nunito', sans-serif; font-size: 0.88rem; font-weight: 700;
  color: #fff; line-height: 1.45;
  backdrop-filter: blur(14px);
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow:
    0 2px 16px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: mg-card-enter 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: calc(var(--i, 0) * 0.06s);
  overflow: hidden;
  border: 1.5px solid transparent;
}

/* Holographic animated border */
.mg-node-pick-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    #7c3aed, #06b6d4, #ec4899, #22c55e, #f59e0b, #a78bfa, #06b6d4, #7c3aed
  );
  background-size: 400% 400%;
  animation: mg-holo-shift 5s ease infinite;
  animation-delay: calc(var(--i, 0) * -0.7s);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0.8;
  pointer-events: none;
}

/* Holographic color wash overlay */
.mg-node-pick-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 14px;
  background: linear-gradient(
    125deg,
    rgba(124,58,237,0.18) 0%,
    rgba(6,182,212,0.15) 20%,
    rgba(236,72,153,0.13) 40%,
    rgba(34,197,94,0.11) 60%,
    rgba(245,158,11,0.13) 80%,
    rgba(167,139,250,0.18) 100%
  );
  background-size: 300% 300%;
  animation: mg-holo-shift 7s ease infinite;
  animation-delay: calc(var(--i, 0) * -1.1s);
  pointer-events: none;
  mix-blend-mode: screen;
}

.mg-node-pick-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow:
    0 14px 40px rgba(100,60,240,0.3),
    0 0 0 1px rgba(167,139,250,0.4),
    inset 0 1px 0 rgba(255,255,255,0.22);
  filter: brightness(1.18) saturate(1.2);
}
.mg-node-pick-card:hover::before { opacity: 1; }

/* Bloc Mystère — gold vitré uniquement */
.mg-node-pick-card.mystery {
  color: #fde68a;
}
.mg-node-pick-card.mystery::before {
  background: linear-gradient(
    135deg,
    #b45309, #fcd34d, #f59e0b, #fef3c7, #f59e0b, #fcd34d, #b45309
  );
  background-size: 400% 400%;
  animation: mg-gold-shift 4s ease infinite;
  opacity: 0.9;
}
.mg-node-pick-card.mystery::after {
  background: linear-gradient(
    125deg,
    rgba(180,120,0,0.22) 0%,
    rgba(253,211,77,0.18) 35%,
    rgba(245,158,11,0.22) 65%,
    rgba(254,243,199,0.15) 100%
  );
  background-size: 300% 300%;
  animation: mg-gold-shift 6s ease infinite;
}
.mg-node-pick-card.mystery:hover {
  filter: brightness(1.2) saturate(1.15);
  box-shadow: 0 12px 40px rgba(245,158,11,0.4), inset 0 1px 0 rgba(255,220,80,0.3);
}

.mg-node-pick-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
}
.mg-node-pick-card.mystery .mg-node-pick-icon {
  background: rgba(251,191,36,0.2);
  border-color: rgba(251,191,36,0.45);
  font-family: 'Orbitron', sans-serif; font-size: 1.1rem; font-weight: 900; color: #fde68a;
}

/* ── Type picker ─────────────────────────────────────────── */
.mg-type-pick-row {
  display: grid;
  grid-template-columns: repeat(var(--type-count, 4), 1fr);
  gap: 14px;
  width: 100%; max-width: 960px;
}
@media (max-width: 640px) {
  .mg-type-pick-row { grid-template-columns: repeat(2, 1fr); }
}
.mg-type-pick-card {
  min-width: 0; max-width: none;
  background: linear-gradient(150deg, rgba(22,14,52,0.98) 0%, rgba(9,7,30,0.98) 100%);
  border: 1px solid rgba(139,92,246,0.38); border-radius: 22px;
  padding: 26px 18px 22px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: all 0.22s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.07);
  animation: mg-card-enter 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: calc(var(--i, 0) * 0.07s);
}
.mg-type-pick-card:hover { transform: translateY(-5px) scale(1.04); }
.mg-type-pick-card.tc {
  border-color: rgba(34,211,238,0.42); border-left: 3px solid #22d3ee;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(34,211,238,0.12);
}
.mg-type-pick-card.tc:hover { box-shadow: 0 12px 38px rgba(6,182,212,0.38), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(6,182,212,0.1), rgba(9,7,30,0.98)); }
.mg-type-pick-card.tf {
  border-color: rgba(167,139,250,0.42); border-left: 3px solid #a78bfa;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(139,92,246,0.12);
}
.mg-type-pick-card.tf:hover { box-shadow: 0 12px 38px rgba(139,92,246,0.38), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(109,40,217,0.1), rgba(9,7,30,0.98)); }
.mg-type-pick-card.tm {
  border-color: rgba(232,121,249,0.38); border-left: 3px solid #e879f9; border-style: solid;
  border-left-style: solid;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(217,70,239,0.12);
}
.mg-type-pick-card.tm:hover { box-shadow: 0 12px 38px rgba(217,70,239,0.38), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(217,70,239,0.1), rgba(9,7,30,0.98)); }
.mg-type-pick-icon-wrap {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.mg-type-pick-card.tc .mg-type-pick-icon-wrap { background: rgba(6,182,212,0.18); border: 1px solid rgba(34,211,238,0.4); }
.mg-type-pick-card.tf .mg-type-pick-icon-wrap { background: rgba(139,92,246,0.18); border: 1px solid rgba(167,139,250,0.4); }
.mg-type-pick-card.tm .mg-type-pick-icon-wrap { background: rgba(217,70,239,0.18); border: 1px solid rgba(232,121,249,0.4); }
.mg-type-pick-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
}
.mg-type-pick-card.tc .mg-type-pick-label { color: #67e8f9; }
.mg-type-pick-card.tf .mg-type-pick-label { color: #c4b5fd; }
.mg-type-pick-card.tm .mg-type-pick-label { color: #f0abfc; }
.mg-type-pick-desc {
  font-family: 'Nunito', sans-serif; font-size: 0.8rem; font-weight: 500;
  line-height: 1.5; color: rgba(255,255,255,0.55);
}
.mg-type-back-btn {
  background: none; border: 1px solid rgba(139,92,246,0.3); border-radius: 50px;
  color: rgba(196,181,253,0.55); font-family: 'Nunito', sans-serif;
  font-size: 0.78rem; font-weight: 600; padding: 8px 20px; cursor: pointer;
  transition: all 0.18s;
}
.mg-type-back-btn:hover { border-color: rgba(167,139,250,0.65); color: #c4b5fd; }

/* ── Annales upload ──────────────────────────────────────── */
.mg-annales-wrap {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px;
}
.mg-annales-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 50px; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: 0.78rem; font-weight: 700;
  border: 1.5px dashed rgba(139,92,246,0.45);
  color: rgba(196,181,253,0.65);
  background: rgba(88,28,235,0.08);
  transition: all 0.18s;
}
.mg-annales-btn:hover {
  border-color: rgba(139,92,246,0.7);
  color: #c4b5fd;
  background: rgba(88,28,235,0.15);
}
.mg-annales-btn.loaded {
  border-style: solid;
  border-color: rgba(52,211,153,0.6);
  color: #6ee7b7;
  background: rgba(16,185,129,0.1);
}
.mg-annales-clear {
  background: none; border: none; color: rgba(196,181,253,0.4);
  font-size: 0.85rem; cursor: pointer; padding: 4px 6px;
  transition: color 0.15s;
}
.mg-annales-clear:hover { color: rgba(239,68,68,0.7); }

/* ── Done node card ──────────────────────────────────────── */
.mg-node-pick-card.mg-node-done {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.7);
  cursor: default;
}
.mg-node-pick-card.mg-node-done::before,
.mg-node-pick-card.mg-node-done::after { animation: none; opacity: 0.3; }

.mg-node-pick-card.mg-node-full-map {
  border-color: rgba(250,204,21,0.5);
  background: linear-gradient(135deg, rgba(250,204,21,0.08) 0%, rgba(167,139,250,0.08) 100%);
  grid-column: 1 / -1;
}
.mg-node-pick-card.mg-node-full-map::before {
  background: conic-gradient(from 0deg, #facc15, #a78bfa, #34d399, #facc15);
}
.mg-node-pick-card.mg-node-full-map .mg-node-pick-icon {
  color: #facc15;
}

/* ── Node score overlay ──────────────────────────────────── */
.mg-node-score-ov {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(4,3,18,0.96);
  display: flex; align-items: center; justify-content: center;
  animation: mg-fade-in 0.4s ease forwards;
}
.mg-node-score-ov.hidden { display: none; }
.mg-ns-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  max-width: 420px; width: 90%; text-align: center;
  padding: 40px 32px; border-radius: 28px;
  background: rgba(18,12,48,0.9);
  border: 1.5px solid rgba(139,92,246,0.4);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(88,28,235,0.3);
}
.mg-ns-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.85rem; font-weight: 900;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #a78bfa;
}
.mg-ns-subtitle {
  font-family: 'Nunito', sans-serif; font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #d8b4fe 50%, #a78bfa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mg-ns-stats {
  display: flex; gap: 20px; justify-content: center;
}
.mg-ns-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mg-ns-val {
  font-family: 'Orbitron', sans-serif; font-size: 2rem; font-weight: 900;
}
.mg-ns-stat.correct .mg-ns-val { color: #6ee7b7; }
.mg-ns-stat.wrong   .mg-ns-val { color: #fca5a5; }
.mg-ns-stat.pct     .mg-ns-val { color: #fde68a; }
.mg-ns-lbl {
  font-family: 'Nunito', sans-serif; font-size: 0.72rem; font-weight: 700;
  color: rgba(196,181,253,0.5); text-transform: uppercase; letter-spacing: 0.1em;
}
.mg-ns-rewards {
  display: flex; gap: 16px;
  font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 700;
  color: rgba(196,181,253,0.7);
}
.mg-ns-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.mg-ns-btn {
  width: 100%; padding: 14px 28px; border-radius: 50px; border: none;
  cursor: pointer; font-family: 'Nunito', sans-serif;
  font-size: 0.95rem; font-weight: 800;
  transition: filter 0.15s, transform 0.13s;
}
.mg-ns-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.mg-ns-btn.primary {
  background: linear-gradient(90deg, #7c3aed 0%, #c026d3 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(192,38,211,0.4);
}
.mg-ns-btn.secondary {
  background: rgba(139,92,246,0.12);
  border: 1.5px solid rgba(139,92,246,0.35);
  color: rgba(196,181,253,0.8);
}

/* ── Mystery type ceremony spinner ──────────────────────── */
.mg-mystery-type-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 3px solid rgba(232,121,249,0.18);
  border-top-color: #e879f9;
  animation: mg-load-ring-spin 0.9s linear infinite;
}

/* ── Continue button ─────────────────────────────────────── */
.mg-question-continue,
.mg-flashcard-continue {
  background:linear-gradient(135deg,#7c3aed 0%,#4f46e5 50%,#0891b2 100%);
  color:#fff; border:none; border-radius:50px;
  padding:13px 36px; font-family:'Orbitron',sans-serif;
  font-size:0.72rem; font-weight:800; letter-spacing:0.14em; text-transform:uppercase;
  cursor:pointer; align-self:center;
  box-shadow:0 0 28px rgba(124,58,237,0.6), 0 4px 16px rgba(0,0,0,0.35);
  transition:transform 0.15s, box-shadow 0.15s, filter 0.15s;
  position:relative; overflow:hidden;
}
.mg-question-continue::before,.mg-flashcard-continue::before {
  content:''; position:absolute; top:0; left:-75%; width:40%; height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.22),transparent);
  animation:left-shimmer 2.8s ease-in-out infinite;
}
.mg-question-continue:hover,.mg-flashcard-continue:hover {
  transform:scale(1.05); filter:brightness(1.12);
  box-shadow:0 0 42px rgba(124,58,237,0.8), 0 6px 20px rgba(0,0,0,0.4);
}
.mg-question-continue.hidden,.mg-flashcard-continue.hidden { display:none; }

/* ══ Flash card premium flip ═══════════════════════════════ */
.mg-flashcard-scene { perspective:1000px; cursor:pointer; position: relative; }

/* ── Coins de la carte (carnet + étoile) ─────────────────── */
.mg-fc-corner-btn {
  position: absolute; z-index: 10;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.mg-fc-notebook-btn {
  top: 8px; left: 8px;
  background: rgba(167,139,250,0.12);
  color: rgba(196,181,253,0.6);
}
.mg-fc-notebook-btn:hover { background: rgba(167,139,250,0.25); color: #c4b5fd; }
.mg-fc-star-btn {
  top: 8px; right: 8px;
  background: rgba(250,204,21,0.1);
  color: rgba(250,204,21,0.5);
}
.mg-fc-star-btn:hover { background: rgba(250,204,21,0.22); color: #facc15; transform: scale(1.15); }
.mg-fc-star-btn.pinned { color: #facc15; background: rgba(250,204,21,0.2); }
.mg-fc-star-btn.pinned svg { fill: #facc15; }
.mg-flashcard-inner {
  position:relative; width:100%; min-height:110px;
  transform-style:preserve-3d;
  transition:transform 0.65s cubic-bezier(0.34,1,0.64,1);
}
.mg-flashcard-inner.flipped { transform:rotateY(180deg); }
.mg-flashcard-face {
  position:absolute; inset:0;
  backface-visibility:hidden; -webkit-backface-visibility:hidden;
  border-radius:18px; padding:18px 20px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; font-family:'Nunito',sans-serif; font-size:0.97rem;
  font-weight:700; line-height:1.45; min-height:110px;
  text-transform:none; overflow:hidden;
}
.mg-flashcard-front {
  background:linear-gradient(145deg,rgba(88,28,235,0.22) 0%,rgba(20,12,50,0.97) 100%);
  border:1px solid rgba(139,92,246,0.55); color:#e8e4ff;
  box-shadow:inset 0 1px 0 rgba(196,181,253,0.15), 0 0 32px rgba(88,28,235,0.22);
}
.mg-flashcard-front::after {
  content:'?'; position:absolute; bottom:10px; right:14px;
  font-family:'Orbitron',sans-serif; font-size:1.6rem; font-weight:900;
  color:rgba(139,92,246,0.16); pointer-events:none;
}
.mg-flashcard-back {
  background:linear-gradient(145deg,rgba(6,182,212,0.22) 0%,rgba(8,20,45,0.97) 100%);
  border:1px solid rgba(45,212,191,0.55); color:#a7f3d0; transform:rotateY(180deg);
  box-shadow:inset 0 1px 0 rgba(165,243,252,0.1), 0 0 32px rgba(6,182,212,0.18);
  font-size:0.9rem; line-height:1.5;
}
.mg-flashcard-back::after {
  content:'✓'; position:absolute; bottom:10px; right:14px;
  font-size:1.2rem; color:rgba(45,212,191,0.28); pointer-events:none;
}
/* ── Back in "pending" state: shows big ? until option selected ── */
.mg-flashcard-back.mg-fc-back-pending {
  font-family:'Orbitron',sans-serif !important;
  font-size:3rem !important; font-weight:900 !important;
  color:rgba(45,212,191,0.75) !important;
  text-shadow:0 0 24px rgba(45,212,191,0.9), 0 0 50px rgba(6,182,212,0.45) !important;
  animation:mg-hint-pulse 1.3s ease-in-out infinite !important;
}
.mg-flashcard-back.mg-fc-back-pending::after { display:none !important; }
/* ── Back revealed after answering ── */
@keyframes mg-fc-back-reveal {
  0%   { opacity:0; transform:rotateY(180deg) scale(0.85); filter:blur(4px); }
  100% { opacity:1; transform:rotateY(180deg) scale(1);    filter:blur(0); }
}
.mg-flashcard-back.mg-fc-back-revealed {
  animation:mg-fc-back-reveal 0.45s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-flashcard-hint {
  text-align:center; font-size:0.72rem; color:rgba(196,181,253,0.65);
  letter-spacing:0.1em; font-family:'Orbitron',sans-serif;
  animation:mg-hint-pulse 2s ease-in-out infinite;
}
@keyframes mg-hint-pulse { 0%,100%{opacity:0.45} 50%{opacity:1} }
.mg-flashcard-hint.hidden { display:none; }

/* ══ Flash card MCQ grid (4 options after flip) — legacy block removed, see below ══ */

/* ── Session score display ────────────────────────────────── */
.mg-session-score {
  font-family:'Orbitron',sans-serif; font-size:0.72rem; font-weight:800;
  color:#fde68a; letter-spacing:0.1em; text-align:center; margin-top:2px;
  text-shadow:0 0 10px rgba(253,230,138,0.6);
}

/* ── Flash card MCQ grid (4 options after flip) ─────────── */
.mg-fc-mcq-grid {
  width: 100%; max-width: 680px; z-index: 1;
  display: flex; flex-direction: column;
  gap: 9px;
  animation: mg-card-enter 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
/* ── Base button shell ─────────────────────────────────── */
.mg-fc-mcq-btn {
  border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-align: left; width: 100%;
  transition: filter 0.18s, transform 0.12s, box-shadow 0.18s;
  border-left-width: 3px; border-style: solid;
  box-shadow: 0 2px 14px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative; overflow: visible;
  text-transform: none;
}
/* Shimmer top edge */
.mg-fc-mcq-btn::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  border-radius: 0 0 2px 2px;
  opacity: 0.55;
}

/* ── Letter badge base ─────────────────────────────────── */
.mg-fc-mcq-letter {
  flex-shrink: 0; width: 26px; height: 26px;
  border-radius: 7px; border: 1px solid;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0; align-self: flex-start; margin-top: 2px;
}

/* ── A / B / C / D — fuchsia uniforme ─────────────────── */
.mg-fc-mcq-btn:nth-child(1),
.mg-fc-mcq-btn:nth-child(2),
.mg-fc-mcq-btn:nth-child(3),
.mg-fc-mcq-btn:nth-child(4) {
  background: linear-gradient(135deg, rgba(217,70,239,0.18) 0%, rgba(168,85,247,0.08) 100%);
  border-color: rgba(232,121,249,0.38); border-left-color: #e879f9;
}
.mg-fc-mcq-btn:nth-child(1)::before,
.mg-fc-mcq-btn:nth-child(2)::before,
.mg-fc-mcq-btn:nth-child(3)::before,
.mg-fc-mcq-btn:nth-child(4)::before { background: linear-gradient(90deg,transparent,rgba(232,121,249,0.6),transparent); }

.mg-fc-mcq-btn:nth-child(1) .mg-fc-mcq-letter,
.mg-fc-mcq-btn:nth-child(2) .mg-fc-mcq-letter,
.mg-fc-mcq-btn:nth-child(3) .mg-fc-mcq-letter,
.mg-fc-mcq-btn:nth-child(4) .mg-fc-mcq-letter {
  background: rgba(217,70,239,0.42); border: 1px solid rgba(232,121,249,0.65);
  color: #f0abfc; box-shadow: 0 0 10px rgba(217,70,239,0.55);
}
.mg-fc-mcq-btn:nth-child(1) .mg-fc-mcq-text,
.mg-fc-mcq-btn:nth-child(2) .mg-fc-mcq-text,
.mg-fc-mcq-btn:nth-child(3) .mg-fc-mcq-text,
.mg-fc-mcq-btn:nth-child(4) .mg-fc-mcq-text { color: #fae8ff; }

.mg-fc-mcq-btn:nth-child(1):hover:not(:disabled),
.mg-fc-mcq-btn:nth-child(2):hover:not(:disabled),
.mg-fc-mcq-btn:nth-child(3):hover:not(:disabled),
.mg-fc-mcq-btn:nth-child(4):hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(217,70,239,0.32) 0%, rgba(168,85,247,0.18) 100%);
  border-color: rgba(232,121,249,0.8); transform: scale(1.02);
  box-shadow: 0 4px 22px rgba(217,70,239,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

.mg-fc-mcq-btn:disabled { cursor: default; transform: none !important; }
.mg-fc-mcq-text {
  font-family: 'Nunito', sans-serif; font-size: 0.9rem;
  font-weight: 600; line-height: 1.6; text-transform: none;
  word-break: break-word; letter-spacing: 0.01em;
  white-space: normal; overflow: visible;
}

/* ── Proposition cards (4 choix sur le verso) ───────────── */
.mg-fc-props-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  padding: 4px;
}
.mg-fc-prop-card {
  background: linear-gradient(135deg, rgba(217,70,239,0.15) 0%, rgba(168,85,247,0.08) 100%);
  border: 1.5px solid rgba(232,121,249,0.38);
  border-left: 3px solid #e879f9;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #e879f9;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  line-height: 1.3;
  animation: mg-card-enter 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-fc-prop-card:hover {
  background: linear-gradient(135deg, rgba(217,70,239,0.28) 0%, rgba(168,85,247,0.16) 100%);
  border-color: rgba(232,121,249,0.7);
  transform: scale(1.04);
}
.mg-fc-prop-correct {
  background: linear-gradient(135deg, rgba(22,163,74,0.28) 0%, rgba(34,197,94,0.14) 100%) !important;
  border-color: rgba(74,222,128,0.65) !important;
  border-left-color: #4ade80 !important;
  color: #4ade80 !important;
}
.mg-fc-prop-wrong {
  background: linear-gradient(135deg, rgba(220,38,38,0.28) 0%, rgba(239,68,68,0.14) 100%) !important;
  border-color: rgba(248,113,113,0.65) !important;
  border-left-color: #f87171 !important;
  color: #f87171 !important;
}

/* ── Self-eval buttons (Je savais / Je ne savais pas) ─────── */
.mg-fc-eval-row {
  display: flex; gap: 14px; width: 100%; max-width: 680px;
  animation: mg-card-enter 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-fc-eval-btn {
  flex: 1; padding: 16px 12px;
  border-radius: 14px; border: 1.5px solid;
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800;
  cursor: pointer; letter-spacing: 0.02em; text-transform: none;
  transition: transform 0.15s, box-shadow 0.18s, background 0.18s;
}
.mg-fc-eval-btn:hover:not(:disabled) { transform: scale(1.04); }
.mg-fc-eval-btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.mg-fc-eval-knew {
  background: linear-gradient(135deg, rgba(22,163,74,0.28) 0%, rgba(16,185,129,0.12) 100%);
  border-color: rgba(74,222,128,0.55); color: #4ade80;
  box-shadow: 0 2px 18px rgba(22,163,74,0.25);
}
.mg-fc-eval-knew:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(22,163,74,0.45) 0%, rgba(16,185,129,0.22) 100%);
  box-shadow: 0 4px 28px rgba(74,222,128,0.4);
}
.mg-fc-eval-didnt {
  background: linear-gradient(135deg, rgba(220,38,38,0.25) 0%, rgba(239,68,68,0.1) 100%);
  border-color: rgba(248,113,113,0.5); color: #f87171;
  box-shadow: 0 2px 18px rgba(220,38,38,0.2);
}
.mg-fc-eval-didnt:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(220,38,38,0.4) 0%, rgba(239,68,68,0.2) 100%);
  box-shadow: 0 4px 28px rgba(248,113,113,0.38);
}

/* ── Correct / Wrong overrides (applied on top of color theme) ── */
.mg-fc-mcq-btn.fc-mcq-correct {
  background: linear-gradient(135deg, rgba(74,222,128,0.22) 0%, rgba(16,185,129,0.12) 100%) !important;
  border-color: rgba(74,222,128,0.8) !important; border-left-color: #4ade80 !important;
  box-shadow: 0 0 22px rgba(74,222,128,0.3), inset 0 1px 0 rgba(74,222,128,0.12) !important;
}
.mg-fc-mcq-btn.fc-mcq-correct .mg-fc-mcq-text { color: #4ade80 !important; }
.mg-fc-mcq-btn.fc-mcq-correct .mg-fc-mcq-letter {
  background: rgba(74,222,128,0.45) !important; border-color: rgba(74,222,128,0.75) !important;
  color: #4ade80 !important; box-shadow: 0 0 10px rgba(74,222,128,0.6) !important;
}
.mg-fc-mcq-btn.fc-mcq-wrong {
  background: linear-gradient(135deg, rgba(248,113,113,0.2) 0%, rgba(239,68,68,0.1) 100%) !important;
  border-color: rgba(248,113,113,0.8) !important; border-left-color: #f87171 !important;
}
.mg-fc-mcq-btn.fc-mcq-wrong .mg-fc-mcq-text { color: #f87171 !important; }
.mg-fc-mcq-btn.fc-mcq-wrong .mg-fc-mcq-letter {
  background: rgba(248,113,113,0.4) !important; border-color: rgba(248,113,113,0.7) !important;
  color: #f87171 !important;
}

/* ── Session score display ────────────────────────────────── */
.mg-session-score {
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700;
  color: #fde68a; letter-spacing: 0.08em; text-align: center; margin-top: 2px;
  text-shadow: 0 0 8px rgba(253,230,138,0.5);
}

/* ── Drop zone nodes (parent nodes that accept card drops) ── */
.mg-node.mg-drop-zone {
  cursor: crosshair;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.mg-node.mg-drop-zone.drag-over {
  box-shadow: 0 0 0 3px rgba(167,139,250,1), 0 0 28px rgba(139,92,246,0.8) !important;
  transform: scale(1.06);
  z-index: 10;
}
.mg-node.mg-drop-zone.mg-has-pending {
  box-shadow: 0 0 0 2px rgba(167,139,250,0.7), 0 0 18px rgba(139,92,246,0.5);
  animation: mg-drop-zone-pulse 1.6s ease-in-out infinite;
}
@keyframes mg-drop-zone-pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(167,139,250,0.7), 0 0 18px rgba(139,92,246,0.4); }
  50%      { box-shadow: 0 0 0 3px rgba(167,139,250,1),   0 0 30px rgba(139,92,246,0.8); }
}
.mg-node.wrong-shake {
  animation: mg-wrong-shake 0.4s ease forwards;
}
@keyframes mg-wrong-shake {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-6px,0); }
  40% { transform: translate(6px,0); }
  60% { transform: translate(-4px,0); }
  80% { transform: translate(4px,0); }
}

/* ── Overview box-pick ceremony ── */
@keyframes mg-bp-nebula {
  0%,100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50%      { transform: scale(1.18) rotate(8deg); opacity: 1; }
}
.mg-box-pick {
  position: absolute; inset: 0; z-index: 200;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(168,85,247,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 70%, rgba(59,130,246,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(88,28,235,0.55) 0%, rgba(3,7,18,0.99) 75%);
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  animation: mg-fade-in 0.6s ease forwards;
}
.mg-box-pick::before {
  content: ''; position: absolute; inset: -20%; width: 140%; height: 140%;
  background: radial-gradient(ellipse at 60% 40%, rgba(139,92,246,0.12) 0%, transparent 60%);
  animation: mg-bp-nebula 7s ease-in-out infinite;
  pointer-events: none; z-index: 0;
}
.mg-bp-stars {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.mg-bp-title {
  position: relative; z-index: 1;
  font-family: 'Orbitron', sans-serif; font-size: clamp(0.9rem,3.5vw,1.6rem); font-weight: 900;
  color: #c4b5fd; letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 22px; line-height: 1.7;
  text-shadow: 0 0 30px rgba(139,92,246,1), 0 0 70px rgba(139,92,246,0.5), 0 2px 0 rgba(0,0,0,0.6);
}
@keyframes mg-bp-word-pop {
  0%   { transform: scale(0.2) rotate(-15deg) translateY(20px); opacity: 0; filter: blur(4px); }
  65%  { transform: scale(1.2) rotate(2deg) translateY(0); opacity: 1; filter: blur(0); }
  100% { transform: scale(1) rotate(0deg) translateY(0); opacity: 1; filter: blur(0); }
}
.mg-bp-title-word {
  display: inline-block;
  animation: mg-bp-word-pop 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}
.mg-bp-title-word:last-child {
  color: #fde68a;
  text-shadow: 0 0 28px rgba(253,230,138,0.95), 0 0 10px rgba(251,191,36,0.7), 0 2px 0 rgba(0,0,0,0.5);
}
.mg-bp-stage {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 32px; width: 100%; padding: 0 16px;
}
.mg-bp-cards-wrap {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; max-width: 360px;
}
@keyframes mg-bp-card-slide-in {
  0%   { transform: translateY(60px) scale(0.6) rotate(-5deg); opacity: 0; filter: blur(3px); }
  70%  { transform: translateY(-4px) scale(1.05) rotate(0.5deg); opacity: 1; filter: blur(0); }
  100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; filter: blur(0); }
}
.mg-bp-card {
  padding: 7px 16px; border-radius: 50px;
  background: linear-gradient(135deg, rgba(109,40,217,0.35) 0%, rgba(79,70,229,0.25) 100%);
  border: 1.5px solid rgba(167,139,250,0.55);
  font-family: 'Nunito', sans-serif; font-size: 0.76rem; font-weight: 800;
  color: #ede9fe; white-space: nowrap;
  box-shadow: 0 0 16px rgba(139,92,246,0.35), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -1px 0 rgba(0,0,0,0.2);
  opacity: 0; will-change: transform, opacity;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.mg-bp-card.mg-bp-card-entering {
  animation: mg-bp-card-slide-in 0.55s cubic-bezier(0.34,1.56,0.64,1) both;
}
.mg-bp-box-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.mg-bp-box-aura {
  width: 180px; height: 24px; border-radius: 50%;
  background: rgba(139,92,246,0.25); filter: blur(14px);
  transition: background 0.5s, filter 0.5s;
  margin-bottom: -6px;
}
.mg-bp-box-aura.charged {
  background: rgba(167,139,250,0.85);
  filter: blur(22px);
  animation: mg-bp-box-aura-pulse 0.35s ease-in-out infinite alternate;
}
@keyframes mg-bp-box-aura-pulse {
  0%   { transform: scaleX(1);   opacity: 0.75; }
  100% { transform: scaleX(1.6); opacity: 1; }
}
.mg-bp-box {
  position: relative; width: 170px; height: 126px; perspective: 600px;
}
.mg-bp-box-lid {
  position: absolute; top: -44px; left: -4px; right: -4px; height: 46px;
  background: linear-gradient(145deg, #1e0749 0%, #5b21b6 40%, #7c3aed 70%, #a855f7 88%, #c084fc 100%);
  border: 2px solid rgba(216,180,254,0.85);
  border-radius: 14px 14px 2px 2px; z-index: 2;
  transform-origin: 50% 100%;
  transition: transform 0.65s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow:
    0 0 40px rgba(168,85,247,0.9),
    0 0 80px rgba(139,92,246,0.4),
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -2px 0 rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mg-bp-box-lid::before {
  content: ''; position: absolute; left: 10%; right: 10%; top: 8px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  border-radius: 2px;
}
@keyframes mg-bp-chest-seam {
  0%,100% { opacity: 0.35; transform: scaleX(0.95); }
  50%      { opacity: 0.9;  transform: scaleX(1); }
}
.mg-bp-box-body {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #120630 0%, #2d1b69 55%, #3730a3 100%);
  border: 2px solid rgba(139,92,246,0.75);
  border-top: none;
  border-radius: 0 0 16px 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 60px rgba(139,92,246,0.5),
    inset 0 0 30px rgba(88,28,235,0.35),
    inset 0 -2px 8px rgba(0,0,0,0.45);
  overflow: hidden;
}
.mg-bp-box-seam {
  position: absolute; top: 0; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(196,181,253,0.6) 30%, rgba(216,180,254,0.9) 50%, rgba(196,181,253,0.6) 70%, transparent);
  border-radius: 1px;
  animation: mg-bp-chest-seam 1.8s ease-in-out infinite;
  filter: blur(0.5px);
}
.mg-bp-box-lock {
  display: flex; align-items: center; justify-content: center;
  animation: mg-monster-idle 2.2s ease-in-out infinite;
  opacity: 0.85;
}
.mg-bp-box.box-open .mg-bp-box-lid { transform: rotateX(-160deg); }
@keyframes mg-box-shake {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  8%  { transform: translate(-12px,7px) rotate(-5deg); }
  16% { transform: translate(14px,-8px) rotate(5deg); }
  24% { transform: translate(-10px,6px) rotate(-4deg); }
  32% { transform: translate(13px,-7px) rotate(4deg); }
  40% { transform: translate(-11px,9px) rotate(-5deg); }
  48% { transform: translate(10px,-6px) rotate(4deg); }
  56% { transform: translate(-12px,7px) rotate(-4deg); }
  64% { transform: translate(11px,-8px) rotate(4deg); }
  72% { transform: translate(-7px,6px) rotate(-3deg); }
  80% { transform: translate(9px,-5px) rotate(3deg); }
  90% { transform: translate(-4px,3px) rotate(-2deg); }
}
.mg-bp-box.shaking-box { animation: mg-box-shake 0.65s ease-in-out 3 forwards; }
.mg-bp-monster-row {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 14px;
  padding: 0 20px 20px; width: 100%; max-width: 400px; justify-content: center;
}
.mg-bp-monster-wrap {
  position: relative; display: flex; flex-direction: column;
  align-items: center; flex-shrink: 0;
}
.mg-bp-monster-aura {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%);
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.38) 0%, transparent 70%);
  animation: mg-bp-aura-pulse 2.2s ease-in-out infinite;
  transition: background 0.6s; pointer-events: none;
}
.mg-bp-monster-aura.excited {
  background: radial-gradient(circle, rgba(245,158,11,0.45) 0%, rgba(168,85,247,0.18) 60%, transparent 100%);
}
.mg-bp-monster-aura.evil {
  background: radial-gradient(circle, rgba(239,68,68,0.5) 0%, rgba(139,92,246,0.22) 65%, transparent 100%);
}
@keyframes mg-bp-aura-pulse {
  0%,100% { transform: translate(-50%,-55%) scale(1);   opacity: 0.75; }
  50%      { transform: translate(-50%,-55%) scale(1.4); opacity: 1; }
}
.mg-bp-monster-img {
  width: 96px; height: 96px; object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(139,92,246,0.75)) drop-shadow(0 0 6px rgba(0,0,0,0.6));
  animation: mg-monster-idle 2.5s ease-in-out infinite;
  position: relative; z-index: 1;
}
.mg-bp-monster-floor {
  width: 72px; height: 10px; border-radius: 50%;
  background: rgba(139,92,246,0.45);
  filter: blur(7px);
  margin-top: -4px; flex-shrink: 0;
  animation: mg-bp-aura-pulse 2.5s ease-in-out infinite;
}
@keyframes mg-bp-speech-pop {
  0%   { transform: scale(0.6) translateY(10px) translateX(-5px); opacity: 0; filter: blur(3px); }
  70%  { transform: scale(1.05) translateY(-2px) translateX(0); opacity: 1; filter: blur(0); }
  100% { transform: scale(1) translateY(0) translateX(0); opacity: 1; filter: blur(0); }
}
.mg-bp-speech {
  background: linear-gradient(135deg, rgba(109,40,217,0.38) 0%, rgba(79,70,229,0.28) 100%);
  border: 1.5px solid rgba(167,139,250,0.65);
  border-radius: 16px 16px 16px 6px; padding: 13px 18px;
  font-size: 0.86rem; color: #ede9fe; font-family: 'Nunito', sans-serif;
  font-weight: 700; font-style: italic; line-height: 1.55;
  backdrop-filter: blur(16px); max-width: 230px;
  box-shadow: 0 0 30px rgba(109,40,217,0.38), 0 4px 20px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.14);
  animation: mg-bp-speech-pop 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.35s both;
  align-self: flex-end; margin-bottom: 14px;
}
/* Particles */
.mg-bp-particle {
  position: fixed; width: 7px; height: 7px; border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  animation: mg-bp-particle-fly 0.7s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}
.mg-bp-particle-big { width: 9px; height: 9px; animation-duration: 0.9s; }
@keyframes mg-bp-particle-fly {
  0%   { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}
/* Butterfly explosion */
.mg-bf-explode {
  position: absolute; inset: 0; pointer-events: none; z-index: 400;
  display: flex; align-items: center; justify-content: center;
}
.mg-bf-explode-bf {
  position: absolute; line-height: 0;
  animation: mg-bf-boom var(--dur, 1.1s) cubic-bezier(0.2,0.8,0.4,1) var(--delay, 0s) both;
}
@keyframes mg-bf-boom {
  0%   { transform: translate(0,0) scale(0.2) rotate(0deg); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--rot,120deg)); opacity: 0; }
}
/* Reveal overlay */
@keyframes mg-bp-bg-breathe {
  0%,100% { opacity: 0.5; transform: scale(0.92); }
  50%      { opacity: 1;   transform: scale(1.12); }
}
.mg-bp-reveal {
  position: absolute; inset: 0; z-index: 300;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(168,85,247,0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 72% 70%, rgba(59,130,246,0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(30,10,60,0.98) 0%, rgba(3,7,18,0.99) 80%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; animation: mg-fade-in 0.45s ease forwards;
  overflow: hidden;
}
.mg-bp-reveal::after {
  content: ''; position: absolute; width: 70vw; height: 70vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,40,217,0.22) 0%, transparent 65%);
  animation: mg-bp-bg-breathe 3.5s ease-in-out infinite;
  pointer-events: none; z-index: 0;
}
.mg-bp-reveal.hidden { display: none; }
/* Ambient butterflies in reveal */
.mg-bp-reveal-bf {
  position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden;
}
.mg-bp-reveal-bf-item {
  position: absolute; line-height: 0;
  animation: mg-bp-rbf-float var(--dur, 5s) cubic-bezier(0.45, 0, 0.55, 1) var(--delay, 0s) infinite;
  opacity: 0.7;
}
.mg-bp-reveal-bf-item svg { animation: mg-bf-wing-flap 0.55s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
@keyframes mg-bf-wing-flap {
  0%   { transform: scaleX(1); }
  100% { transform: scaleX(0.55); }
}
@keyframes mg-bp-rbf-float {
  0%   { transform: translate(0,0) rotate(-12deg); opacity: 0.3; }
  25%  { opacity: 0.75; }
  60%  { transform: translate(var(--dx, 24px), var(--dy, -36px)) rotate(18deg); opacity: 0.65; }
  100% { transform: translate(0,0) rotate(-12deg); opacity: 0.3; }
}
/* Light rays behind the reveal card */
.mg-bp-rays {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  pointer-events: none; z-index: 1;
}
.mg-bp-ray {
  position: absolute; width: 2px; height: 58vh;
  background: linear-gradient(to top, rgba(139,92,246,0), rgba(167,139,250,0.45) 42%, rgba(216,180,254,0.12));
  transform-origin: 50% 100%; border-radius: 3px;
  animation: mg-bp-ray-spin 10s linear infinite, mg-bp-ray-pulse 2.2s ease-in-out infinite alternate;
}
.mg-bp-ray.gold {
  background: linear-gradient(to top, rgba(251,191,36,0), rgba(253,230,138,0.35) 42%, rgba(255,255,255,0.1));
  animation: mg-bp-ray-spin-rev 13s linear infinite, mg-bp-ray-pulse 1.8s ease-in-out infinite alternate;
}
@keyframes mg-bp-ray-spin     { 100% { transform: rotate(360deg); } }
@keyframes mg-bp-ray-spin-rev { 100% { transform: rotate(-360deg); } }
@keyframes mg-bp-ray-pulse {
  0%   { opacity: 0.2; width: 1.5px; }
  100% { opacity: 0.9; width: 2.5px; }
}
/* Card */
@keyframes mg-bp-reveal-card-in {
  0%   { transform: scale(0.2) rotate(-15deg) translateY(30px); opacity: 0; filter: blur(10px); }
  55%  { transform: scale(1.1) rotate(1.5deg) translateY(-5px); opacity: 1; filter: blur(0); }
  100% { transform: scale(1) rotate(0deg) translateY(0); opacity: 1; filter: blur(0); }
}
@keyframes mg-bp-card-float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  35%      { transform: translateY(-10px) rotate(0.4deg); }
  70%      { transform: translateY(-5px) rotate(-0.2deg); }
}
@keyframes mg-bp-corona {
  0%,100% { box-shadow: 0 0 22px rgba(139,92,246,0.35), 0 0 70px rgba(139,92,246,0.1); border-color: rgba(196,181,253,0.25); }
  50%      { box-shadow: 0 0 55px rgba(139,92,246,0.75), 0 0 110px rgba(139,92,246,0.3), 0 0 5px rgba(216,180,254,0.5); border-color: rgba(216,180,254,0.7); }
}
.mg-bp-reveal-inner {
  position: relative; z-index: 2;
  border-radius: 26px; padding: 36px 46px; max-width: 310px; width: 88%;
  text-align: center;
  background: linear-gradient(160deg, rgba(40,15,70,0.94) 0%, rgba(15,3,40,0.97) 100%);
  border: 2px solid rgba(216,180,254,0.55);
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.15),
    0 0 60px rgba(139,92,246,0.55),
    0 0 120px rgba(139,92,246,0.2),
    0 24px 70px rgba(0,0,0,0.75),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.45);
  animation: mg-bp-reveal-card-in 0.8s cubic-bezier(0.34,1.56,0.64,1) forwards,
             mg-bp-card-float 4s ease-in-out 0.95s infinite;
}
.mg-bp-reveal-inner::before {
  content: ''; position: absolute; inset: 0; border-radius: 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 55%);
  pointer-events: none;
}
.mg-bp-reveal-inner::after {
  content: ''; position: absolute; inset: -4px; border-radius: 30px;
  border: 1.5px solid transparent;
  animation: mg-bp-corona 2.5s ease-in-out 1s infinite;
  pointer-events: none; z-index: -1;
}
/* Label */
@keyframes mg-label-sweep {
  0%,100% { background-position: 0% 0%; }
  50%      { background-position: 100% 0%; }
}
.mg-bp-reveal-label {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem;
  letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(196,181,253,0.5) 0%, rgba(253,230,138,0.95) 50%, rgba(196,181,253,0.5) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: mg-label-sweep 3s ease-in-out infinite;
}
.mg-bp-reveal-title {
  font-family: 'Nunito', sans-serif; font-size: 1.55rem; font-weight: 900;
  color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,0.85), 0 0 28px rgba(139,92,246,0.5);
  line-height: 1.35;
}
/* Button */
@keyframes mg-bp-go-pulse {
  0%,100% { box-shadow: 0 0 40px rgba(109,40,217,0.8), 0 0 80px rgba(109,40,217,0.3), 0 6px 20px rgba(0,0,0,0.5); }
  50%      { box-shadow: 0 0 70px rgba(109,40,217,1), 0 0 150px rgba(109,40,217,0.5), 0 0 220px rgba(109,40,217,0.15), 0 8px 30px rgba(0,0,0,0.6); }
}
.mg-bp-go {
  position: relative; z-index: 2; overflow: hidden;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #4f46e5 100%);
  color: #fff; border: 1.5px solid rgba(196,181,253,0.45); border-radius: 50px;
  padding: 15px 48px; font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.13em;
  cursor: pointer;
  transition: transform 0.15s;
  animation: mg-bp-reveal-card-in 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.35s both,
             mg-bp-go-pulse 2.4s ease-in-out 1.5s infinite;
}
.mg-bp-go::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: mg-bp-go-shimmer 2.2s ease-in-out 1.2s infinite;
}
@keyframes mg-bp-go-shimmer {
  0%   { left: -100%; }
  100% { left: 165%; }
}
.mg-bp-go:hover { transform: scale(1.08); }
.mg-bp-go:active { transform: scale(0.96); }

/* ── Shake wrap ── */
.mg-shake-wrap {
  position: relative; width: 100%; height: 100%; overflow: hidden;
}
@keyframes mg-shaking {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  10% { transform: translate(-4px, 3px) rotate(-0.5deg); }
  20% { transform: translate(5px, -4px) rotate(0.5deg); }
  30% { transform: translate(-5px, 2px) rotate(-0.3deg); }
  40% { transform: translate(4px, -3px) rotate(0.4deg); }
  50% { transform: translate(-3px, 4px) rotate(-0.5deg); }
  60% { transform: translate(4px, 3px) rotate(0.3deg); }
  70% { transform: translate(-4px, -2px) rotate(0.5deg); }
  80% { transform: translate(3px, -4px) rotate(-0.4deg); }
  90% { transform: translate(-2px, 3px) rotate(0.2deg); }
}
@keyframes mg-shaking-strong {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  8%  { transform: translate(-9px, 7px) rotate(-1deg); }
  16% { transform: translate(11px,-9px) rotate(1.2deg); }
  24% { transform: translate(-10px,5px) rotate(-0.8deg); }
  32% { transform: translate(8px,-8px)  rotate(1deg); }
  40% { transform: translate(-7px,9px)  rotate(-1.1deg); }
  48% { transform: translate(10px,6px)  rotate(0.9deg); }
  56% { transform: translate(-8px,-5px) rotate(1.1deg); }
  64% { transform: translate(7px,-8px)  rotate(-0.8deg); }
  72% { transform: translate(-5px,7px)  rotate(0.6deg); }
  80% { transform: translate(6px,-4px)  rotate(-0.9deg); }
  90% { transform: translate(-3px,5px)  rotate(0.4deg); }
}
.mg-shake-wrap.shaking {
  animation: mg-shaking 0.35s ease forwards;
}
.mg-shake-wrap.shaking-strong {
  animation: mg-shaking-strong 0.55s ease forwards;
}

/* ── Tray hidden state ── */
.mg-tray-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(30px) !important;
  transition: opacity 0.3s, transform 0.3s;
}

/* ── Zone banner ── */
.mg-zone-banner {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  z-index: 30; background: rgba(139,92,246,0.18);
  border: 1px solid rgba(139,92,246,0.5);
  border-radius: 20px; padding: 4px 18px;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700;
  color: #c4b5fd; letter-spacing: 0.12em; text-transform: uppercase;
  backdrop-filter: blur(10px); white-space: nowrap;
  box-shadow: 0 0 18px rgba(139,92,246,0.3);
  animation: mg-banner-fade 0.4s ease forwards;
}
@keyframes mg-banner-fade {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ════════════════════════════════════════════════════════════
   QUEST SHOP — DESIGN SYSTEM UNIFIÉ v2
   Deep navy · Violet cristal · Glacé · Spectaculaire
════════════════════════════════════════════════════════════ */

/* ── Tokens locaux ── */
.qs-root {
  --qs-bg:        rgba(7,9,28,0.82);
  --qs-bg-card:   rgba(139,92,246,0.055);
  --qs-border:    rgba(139,92,246,0.17);
  --qs-border-hi: rgba(139,92,246,0.40);
  --qs-r:         14px;
  --qs-r-sm:      9px;
  --qs-text:      rgba(228,225,255,0.93);
  --qs-text2:     rgba(180,175,240,0.55);
  --qs-text3:     rgba(130,125,190,0.32);
  --qs-accent:    #a78bfa;
  --qs-glow:      0 0 22px rgba(139,92,246,0.13);
  --qs-inset:     inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ── Fond page — profond, dégradé cosmique ── */
#screen-quest-shop {
  background:
    radial-gradient(ellipse 70% 55% at 15% 0%,   rgba(99,60,240,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 100%,  rgba(56,40,200,0.10) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 50%,   rgba(139,92,246,0.05) 0%, transparent 65%),
    #07091C !important;
}

/* ── Tous les panneaux — même DNA glass ── */
.qs-col3-left,
.qs-col3-right,
.qs-cal-day-block,
.qs-bottom-block {
  background: var(--qs-bg) !important;
  border-color: var(--qs-border) !important;
  backdrop-filter: blur(22px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
  box-shadow: var(--qs-glow), var(--qs-inset) !important;
}

/* ── Séparateur vertical entre cal et detail ── */
.qs-cal-day-block .qs-embedded-cal {
  border-right-color: var(--qs-border) !important;
}

/* ── Headers — tous pareils ── */
.qs-lp-header {
  padding: 11px 14px !important;
  border-bottom: 1px solid var(--qs-border) !important;
  background: rgba(139,92,246,0.05) !important;
  flex-shrink: 0;
}
.qs-lp-title {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.53rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  color: var(--qs-accent) !important;
  text-transform: uppercase !important;
}
.qs-lp-header-icon { opacity: 0.55; }

/* ── Colonne gauche — révision ── */
.qs-col3-left #shop-body-revision .rev-container {
  gap: 6px !important;
  padding: 8px 10px 12px !important;
  align-items: stretch !important;
}
.qs-col3-left #shop-body-revision .rev-subject {
  width: auto !important; max-width: none !important;
  margin: 0 !important; align-self: stretch !important;
  clip-path: none !important;
  border-radius: 10px !important;
  border-width: 1px !important;
  box-shadow: 0 2px 14px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  transition: box-shadow 0.2s, transform 0.2s !important;
}
.qs-col3-left #shop-body-revision .rev-subject:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.07) !important;
}
.qs-col3-left #shop-body-revision .rev-subject-header { padding: 9px 11px !important; }
.qs-col3-left #shop-body-revision .rev-subj-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.72rem !important; font-weight: 700 !important;
  text-align: left !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs-col3-left #shop-body-revision .rev-sep-ornament { display: none !important; }
.qs-col3-left #shop-body-revision .rev-progress-wrap {
  margin: 0 10px 6px !important; font-size: 0.6rem !important;
}
/* Bouton ajouter matière */
.qs-col3-left .rev-forge-btn {
  width: auto !important; max-width: none !important;
  clip-path: none !important; border-radius: 9px !important;
  margin: 0 10px 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important; font-weight: 600 !important;
  letter-spacing: 0.06em !important;
}

/* ── Panneau détail jour ── */
.qs-day-detail-header {
  padding: 10px 13px !important;
  border-bottom: 1px solid var(--qs-border) !important;
  background: rgba(139,92,246,0.05) !important;
}
.qs-day-detail-date {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.52rem !important; font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  color: var(--qs-accent) !important;
}
.qs-day-detail-body { padding: 7px 9px 10px !important; gap: 4px !important; }
.qs-day-item {
  background: var(--qs-bg-card) !important;
  border-color: var(--qs-border) !important;
  border-radius: 8px !important;
  padding: 6px 9px !important;
}
.qs-day-item-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.75rem !important; font-weight: 600 !important;
  color: var(--qs-text) !important;
}
.qs-day-item-meta {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important;
  color: var(--qs-text2) !important;
}
.qs-day-section-title {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.44rem !important;
  color: var(--qs-text3) !important;
}
.qs-day-empty {
  color: var(--qs-text3) !important;
  font-family: 'Inter', sans-serif !important;
}

/* ── Bloc bas catchup/prep — quest-cards remplacées par lignes compactes ── */
.qs-mini-win-body .quest-card {
  background: var(--qs-bg-card) !important;
  background-image: none !important;
  border: none !important;
  border-left: 2px solid rgba(139,92,246,0.45) !important;
  border-radius: 0 7px 7px 0 !important;
  padding: 7px 10px 7px 11px !important;
  gap: 7px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s !important;
}
.qs-mini-win-body .quest-card::before { display: none !important; }
.qs-mini-win-body .quest-card:hover {
  background: rgba(139,92,246,0.10) !important;
  border-left-color: rgba(139,92,246,0.7) !important;
  transform: none !important; box-shadow: none !important;
}
.qs-mini-win-body .quest-card.in-basket {
  background: rgba(74,222,128,0.07) !important;
  border-left-color: rgba(74,222,128,0.55) !important;
  box-shadow: none !important;
}
/* Checkbox mini */
.qs-mini-win-body .qcard-checkbox {
  width: 18px !important; height: 18px !important;
  border-radius: 5px !important; flex-shrink: 0;
}
.qs-mini-win-body .qcard-checkbox svg { width: 11px !important; height: 11px !important; }
/* Nom + meta */
.qs-mini-win-body .qcard-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.73rem !important; font-weight: 600 !important;
  color: var(--qs-text) !important;
  margin-bottom: 1px !important; line-height: 1.3 !important;
}
.qs-mini-win-body .qcard-edit-hint { display: none !important; }
.qs-mini-win-body .qcard-meta { gap: 5px !important; }
.qs-mini-win-body .qcard-time,
.qs-mini-win-body .qcard-coins,
.qs-mini-win-body .qcard-date-chip {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.58rem !important; color: var(--qs-text2) !important;
}
.qs-mini-win-body .qcard-time-edit { display: none !important; }

/* Sections catchup */
.qs-mini-win-body .catchup-section {
  background: rgba(7,9,28,0.50) !important;
  border: 1px solid var(--qs-border) !important;
  border-radius: 10px !important;
  overflow: hidden; gap: 0; flex-shrink: 0;
}
.qs-mini-win-body .catchup-section-label {
  background: rgba(139,92,246,0.07) !important;
  border-bottom: 1px solid var(--qs-border) !important;
  border-left: none !important;
  padding: 6px 10px !important; margin: 0 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important; font-weight: 700 !important;
  color: var(--qs-text2) !important;
  letter-spacing: 0.06em !important; text-transform: uppercase !important;
}
.qs-mini-win-body .cs-body {
  padding: 4px 6px !important;
  display: flex; flex-direction: column; gap: 3px;
}
.qs-mini-win-body .catchup-empty {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.64rem !important; color: var(--qs-text3) !important;
  text-align: center; padding: 14px 8px;
}
/* Items prep */
.qs-mini-win-body .prep-drag-item { background: transparent !important; border: none !important; padding: 0 !important; }
.qs-mini-win-body .prep-drag-item > .rev-drag-handle { display: none !important; }
.qs-mini-win-body .prep-list { gap: 3px !important; }
.qs-mini-win-body .shelf-add-custom-card { display: none !important; }

/* ── Colonne droite — parcours de quête ── */
.qs-col3-right .qs-lp-header { background: rgba(139,92,246,0.05) !important; }
.qs-ticket-date-row {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.68rem !important; color: var(--qs-text2) !important;
}
.qs-ticket-receipt-label,
.qs-ticket-footer-label {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.50rem !important;
  color: var(--qs-text3) !important;
  letter-spacing: 0.10em !important;
}
#qs-mission-items .qs-mitem {
  background: var(--qs-bg-card) !important;
  border-color: var(--qs-border) !important;
  border-radius: 10px !important;
  box-shadow: var(--qs-glow) !important;
  width: calc(100% - 28px) !important;
  align-self: stretch !important;
  margin-left: 14px !important; margin-right: 14px !important;
}
#qs-mission-items .qs-mitem:nth-child(odd),
#qs-mission-items .qs-mitem:nth-child(even) {
  align-self: stretch !important;
  margin-left: 14px !important; margin-right: 14px !important;
  padding-left: 16px !important; padding-right: 16px !important;
}
#qs-mission-items .qs-mitem:hover {
  background: rgba(139,92,246,0.10) !important;
  border-color: var(--qs-border-hi) !important;
}
.qs-mitem-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.73rem !important; font-weight: 600 !important;
  color: var(--qs-text) !important;
}
.qs-mitem-sub {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important; color: var(--qs-text2) !important;
}
/* Supprimer la ligne verticale centrale — visuellement trop chargé */
.qs-ticket-path-wrap::before { display: none !important; }
#qs-mission-items .qs-mitem::before { display: none !important; }
.qs-ticket-empty {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important; color: var(--qs-text3) !important;
}
.qs-path-terminus span {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.46rem !important; color: var(--qs-text3) !important;
}
.qs-ticket-totals {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.63rem !important;
  color: var(--qs-text2) !important;
  border-top: 1px solid var(--qs-border) !important;
  padding: 8px 14px !important;
}

/* ── Bouton ON DÉCOLLE — version spectaculaire ── */
.qs-ticket-launch {
  background: linear-gradient(135deg, #4f35c8 0%, #7c3aed 45%, #5b1bd5 100%) !important;
  box-shadow:
    0 0 30px rgba(124,58,237,0.45),
    0 4px 16px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
  border: 1px solid rgba(167,139,250,0.30) !important;
  border-radius: 11px !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.62rem !important; letter-spacing: 0.16em !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
.qs-ticket-launch:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 0 48px rgba(124,58,237,0.65),
    0 8px 24px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.22) !important;
}

/* ── Scrollbars uniformes ── */
.qs-3col-layout *::-webkit-scrollbar { width: 3px; height: 3px; }
.qs-3col-layout *::-webkit-scrollbar-track { background: transparent; }
.qs-3col-layout *::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.25);
  border-radius: 2px;
}

/* ── Calendrier embarqué — typographie cohérente ── */
.qs-agenda-embedded .btn-add-agenda,
.qs-agenda-embedded .btn-import-ics {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.58rem !important; font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}
.qs-agenda-embedded .cvt-btn {
  font-family: 'Inter', sans-serif !important;
  letter-spacing: 0.06em !important;
}
.qs-agenda-embedded .cal-month-label {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.58rem !important;
  color: var(--qs-text) !important;
}

/* ── Micro-animations d'entrée des panneaux ── */
@keyframes qs-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.qs-cal-day-block  { animation: qs-panel-in 0.35s 0.05s ease both; }
.qs-bottom-block   { animation: qs-panel-in 0.35s 0.12s ease both; }
.qs-col3-left      { animation: qs-panel-in 0.35s 0.00s ease both; }
.qs-col3-right     { animation: qs-panel-in 0.35s 0.08s ease both; }


/* ════════════════════════════════════════════════════════════
   QUEST SHOP — LAYOUT 5 COLONNES (v3)
════════════════════════════════════════════════════════════ */

/* Fond page cosmique */
#screen-quest-shop {
  display: flex !important;
  flex-direction: column !important;
  background:
    radial-gradient(ellipse 65% 50% at 10% 0%,  rgba(99,60,240,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 90% 100%, rgba(56,40,200,0.12) 0%, transparent 55%),
    #07091C !important;
}

/* ── Header ── */
.qs5-header {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  height: 38px; flex-shrink: 0;
  border-bottom: 1px solid rgba(139,92,246,0.15);
  background: rgba(7,9,28,0.70);
  backdrop-filter: blur(20px);
  position: relative; z-index: 10;
}
.qs5-back {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 700; letter-spacing: 0.14em;
  color: rgba(167,139,250,0.55);
  text-transform: uppercase;
  transition: color 0.15s;
  flex-shrink: 0;
}
.qs5-back:hover { color: rgba(167,139,250,0.90); }
.qs5-title {
  flex: 1; text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 900; letter-spacing: 0.20em;
  color: rgba(228,225,255,0.92);
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(139,92,246,0.45);
}
.qs5-header-right {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.qs5-basket-badge {
  display: none;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700;
  background: rgba(139,92,246,0.25);
  border: 1px solid rgba(139,92,246,0.45);
  border-radius: 50px; padding: 3px 9px;
  color: #a78bfa;
}
.qs5-basket-badge.visible { display: inline-flex; }

/* ── Workspace 5 colonnes ── */
.qs5-workspace {
  flex: none !important;
  height: calc(100vh - 340px) !important;
  min-height: 180px !important;
  max-height: calc(100vh - 340px) !important;
  display: flex !important; flex-direction: row !important;
  overflow: hidden !important;
  gap: 7px !important;
  padding: 8px 12px 10px !important;
}

/* ══ Carrousel de fenêtres (page mission) ══ */
.qs5-carousel { position: relative; }
.qs5-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 25;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,16,46,0.80); border: 1px solid rgba(167,139,250,0.42); color: #c4b5fd;
  cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5); transition: background .15s, transform .12s, color .15s;
}
.qs5-arrow:hover { background: rgba(124,93,252,0.42); color: #fff; }
.qs5-arrow:active { transform: translateY(-50%) scale(.9); }
.qs5-arrow-prev { left: max(8px, calc(50% - 432px)); }
.qs5-arrow-next { right: max(8px, calc(50% - 432px)); }
.qs5-dots { display: flex; justify-content: center; gap: 9px; padding: 11px 0 2px; }
.qs5-dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: rgba(167,139,250,0.30); transition: background .15s, transform .15s;
}
.qs5-dot.on { background: #c4b5fd; transform: scale(1.3); }
/* mode carrousel : une seule fenêtre visible, centrée et large */
.qs5-workspace.qs5-carousel-mode { height: calc(100vh - 384px) !important; max-height: calc(100vh - 384px) !important; padding: 8px clamp(60px, 7vw, 96px) 10px !important; }
.qs5-workspace.qs5-carousel-mode > .qs5-col { display: none !important; }
.qs5-workspace.qs5-carousel-mode > .qs5-col.qs5-active {
  display: flex !important; flex: 1 1 auto !important; width: 100%; max-width: 760px; margin: 0 auto;
  animation: qs5-slide-in .34s cubic-bezier(.3,.9,.35,1);
}
@keyframes qs5-slide-in { from { opacity: 0; transform: translateX(var(--qs5-from, 42px)); } to { opacity: 1; transform: translateX(0); } }

/* ── Disposition grille 4 fenêtres (page mission) — ordre exact : PLANIFICATION, MATIÈRE, PRÉPARATION, RATTRAPAGE ── */
#screen-quest-shop .qs5-workspace > .qs5-col-mandatory { order: 1; }
#screen-quest-shop .qs5-workspace > .qs5-col-revision  { order: 2; }
#screen-quest-shop .qs5-workspace > .qs5-col-prep      { order: 3; }
#screen-quest-shop .qs5-workspace > .qs5-col-catchup   { order: 4; }

/* ── Colonne générique — carte arrondie ── */
.qs5-col {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-right: none;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  background: rgba(8,10,32,0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* neon border + glow générique (override par couleur ci-dessous) */
  border: 1px solid rgba(139,92,246,0.30);
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.10),
    0 0 18px rgba(139,92,246,0.12),
    0 4px 24px rgba(0,0,0,0.45);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.qs5-col:last-child { border-right: none; }

/* ── Header de colonne ── */
.qs5-col-hdr {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid rgba(139,92,246,0.14);
  background: transparent;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}
.qs5-col-hdr svg { opacity: 0.55; flex-shrink: 0; }
.qs5-col-title {
  flex: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.46rem; font-weight: 900; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px currentColor;
}
.qs5-info-btn {
  background: none; border: none; cursor: pointer; padding: 2px;
  color: rgba(139,92,246,0.45); flex-shrink: 0;
  transition: color 0.15s;
}
.qs5-info-btn:hover { color: rgba(139,92,246,0.85); }

/* ══ Néon couleur par colonne ══ */

/* RÉVISION — violet */
.qs5-col-revision {
  border-color: rgba(167,139,250,0.45);
  box-shadow:
    0 0 0 1px rgba(167,139,250,0.12),
    0 0 22px rgba(167,139,250,0.22),
    0 0 6px  rgba(167,139,250,0.18) inset,
    0 4px 28px rgba(0,0,0,0.50);
}
.qs5-col-revision:hover {
  border-color: rgba(167,139,250,0.70);
  box-shadow:
    0 0 0 1px rgba(167,139,250,0.18),
    0 0 32px rgba(167,139,250,0.35),
    0 0 10px rgba(167,139,250,0.22) inset,
    0 4px 28px rgba(0,0,0,0.55);
}
.qs5-col-revision .qs5-col-hdr   { border-bottom-color: rgba(167,139,250,0.22); }
.qs5-col-revision .qs5-col-title {
  color: #c4b5fd;
  text-shadow: 0 0 14px rgba(167,139,250,0.80), 0 0 4px rgba(167,139,250,0.50);
}
.qs5-col-revision .qs5-col-hdr svg { color: #a78bfa; opacity: 0.75; }

/* PLANIFICATION — cyan */
.qs5-col-mandatory {
  border-color: rgba(34,211,238,0.40);
  box-shadow:
    0 0 0 1px rgba(34,211,238,0.10),
    0 0 22px rgba(34,211,238,0.18),
    0 0 6px  rgba(34,211,238,0.14) inset,
    0 4px 28px rgba(0,0,0,0.50);
}
.qs5-col-mandatory:hover {
  border-color: rgba(34,211,238,0.65);
  box-shadow:
    0 0 0 1px rgba(34,211,238,0.16),
    0 0 32px rgba(34,211,238,0.30),
    0 0 10px rgba(34,211,238,0.18) inset,
    0 4px 28px rgba(0,0,0,0.55);
}
.qs5-col-mandatory .qs5-col-hdr   { border-bottom-color: rgba(34,211,238,0.20); }
.qs5-col-mandatory .qs5-col-title {
  color: #67e8f9;
  text-shadow: 0 0 14px rgba(34,211,238,0.80), 0 0 4px rgba(34,211,238,0.50);
}
.qs5-col-mandatory .qs5-col-hdr svg { color: #22d3ee; opacity: 0.75; }

/* VITALITÉ — vert émeraude */
.qs5-col-vitality {
  border-color: rgba(52,211,153,0.38);
  box-shadow:
    0 0 0 1px rgba(52,211,153,0.10),
    0 0 22px rgba(52,211,153,0.18),
    0 0 6px  rgba(52,211,153,0.14) inset,
    0 4px 28px rgba(0,0,0,0.50);
}
.qs5-col-vitality:hover {
  border-color: rgba(52,211,153,0.62);
  box-shadow:
    0 0 0 1px rgba(52,211,153,0.16),
    0 0 32px rgba(52,211,153,0.28),
    0 0 10px rgba(52,211,153,0.18) inset,
    0 4px 28px rgba(0,0,0,0.55);
}
.qs5-col-vitality .qs5-col-hdr   { border-bottom-color: rgba(52,211,153,0.20); }
.qs5-col-vitality .qs5-col-title {
  color: #6ee7b7;
  text-shadow: 0 0 14px rgba(52,211,153,0.80), 0 0 4px rgba(52,211,153,0.50);
}
.qs5-col-vitality .qs5-col-hdr svg { color: #34d399; opacity: 0.75; }

/* ── Vitalité : état WARN (26-50) — neon jaune complet ── */
.qs5-col-vitality.vit-col-warn {
  border-color: rgba(251,191,36,0.55) !important;
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.15),
    0 0 28px rgba(251,191,36,0.30),
    0 0 10px rgba(251,191,36,0.20) inset,
    0 4px 28px rgba(0,0,0,0.50) !important;
}
.qs5-col-vitality.vit-col-warn .qs5-col-hdr {
  border-bottom-color: rgba(251,191,36,0.22) !important;
}
.qs5-col-vitality.vit-col-warn .qs5-col-title {
  color: #fde68a !important;
  text-shadow: 0 0 14px rgba(251,191,36,0.85), 0 0 4px rgba(251,191,36,0.55) !important;
}
.qs5-col-vitality.vit-col-warn .qs5-col-hdr svg {
  color: #fbbf24 !important;
  opacity: 1 !important;
}

/* ── Vitalité : état ALERT (0-25) — neon rouge pulsant complet ── */
.qs5-col-vitality.vit-col-alert {
  animation: vit-alert-blink 1.1s ease-in-out infinite;
}
.qs5-col-vitality.vit-col-alert .qs5-col-hdr {
  border-bottom-color: rgba(248,113,113,0.25) !important;
}
.qs5-col-vitality.vit-col-alert .qs5-col-title {
  color: #f87171 !important;
  text-shadow: 0 0 14px rgba(248,113,113,0.90), 0 0 4px rgba(248,113,113,0.60) !important;
  animation: vit-alert-title 1.1s ease-in-out infinite;
}
.qs5-col-vitality.vit-col-alert .qs5-col-hdr svg {
  color: #f87171 !important;
  opacity: 1 !important;
}
@keyframes vit-alert-blink {
  0%, 100% {
    border-color: rgba(248,113,113,0.55) !important;
    box-shadow: 0 0 0 1px rgba(248,113,113,0.14), 0 0 28px rgba(248,113,113,0.32), 0 0 12px rgba(248,113,113,0.22) inset, 0 4px 28px rgba(0,0,0,0.50) !important;
  }
  50% {
    border-color: rgba(248,113,113,0.92) !important;
    box-shadow: 0 0 0 2px rgba(248,113,113,0.24), 0 0 48px rgba(248,113,113,0.55), 0 0 20px rgba(248,113,113,0.42) inset, 0 4px 28px rgba(0,0,0,0.55) !important;
  }
}
@keyframes vit-alert-title { 0%,100%{opacity:1} 50%{opacity:0.50} }

/* ══════════════════════════════════════════════════════
   MODALE AJOUT ÉVÉNEMENT — COCKPIT BLEU
══════════════════════════════════════════════════════ */
.aaf-overlay {
  position: absolute; inset: 0; z-index: 8500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,1,18,0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.24s ease; pointer-events: none;
}
.aaf-overlay.aaf-visible { opacity: 1; pointer-events: all; }

.aaf-modal {
  position: relative;
  width: min(460px, 94vw);
  background: rgba(8,3,22,0.98);
  border: 1px solid rgba(96,165,250,0.50);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  box-shadow: 0 0 50px rgba(96,165,250,0.22), 0 0 100px rgba(96,165,250,0.08), 0 30px 80px rgba(0,0,0,0.85);
  overflow: hidden;
  animation: aaf-enter 0.30s cubic-bezier(0.34,1.5,0.64,1) both;
}
@keyframes aaf-enter {
  from { transform: scale(0.88) translateY(18px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
/* Scanline */
.aaf-scanline {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(96,165,250,0.035) 3px, rgba(96,165,250,0.035) 4px);
}
.aaf-scanline::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 40%;
  background: linear-gradient(to bottom, rgba(96,165,250,0.08), transparent);
  animation: aaf-scan 3.2s linear infinite; top: -40%;
}
@keyframes aaf-scan { from{top:-40%} to{top:140%} }
/* Corner brackets */
.aaf-corner {
  position: absolute; width: 14px; height: 14px;
  border-color: rgba(96,165,250,0.85); border-style: solid; z-index: 3; pointer-events: none;
}
.aaf-tl { top:6px; left:6px;     border-width: 2px 0 0 2px; }
.aaf-tr { top:6px; right:6px;    border-width: 2px 2px 0 0; }
.aaf-bl { bottom:6px; left:6px;  border-width: 0 0 2px 2px; }
.aaf-br { bottom:6px; right:6px; border-width: 0 2px 2px 0; }
/* Header */
.aaf-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(96,165,250,0.20);
  background: linear-gradient(to bottom, rgba(96,165,250,0.08) 0%, transparent 100%);
}
.aaf-header-left { display: flex; flex-direction: column; gap: 3px; }
.aaf-hud-tag {
  font-family: 'Orbitron', sans-serif; font-size: 0.48rem; font-weight: 700;
  letter-spacing: 0.20em; color: rgba(96,165,250,0.60); text-transform: uppercase;
}
.aaf-hud-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.88rem; font-weight: 800;
  letter-spacing: 0.06em; color: rgba(186,230,255,0.95);
  text-shadow: 0 0 16px rgba(96,165,250,0.55);
}
.aaf-close-btn {
  all: unset; cursor: pointer; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid rgba(96,165,250,0.22);
  color: rgba(96,165,250,0.45); transition: all 0.15s;
}
.aaf-close-btn:hover { background: rgba(96,165,250,0.15); border-color: rgba(96,165,250,0.60); color: #60a5fa; }
/* Body */
.aaf-body {
  position: relative; z-index: 2;
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
/* Subject input */
.aaf-body .aaf-subject {
  all: unset;
  display: block; width: 100%; box-sizing: border-box;
  padding: 13px 16px;
  background: rgba(96,165,250,0.05);
  border: 1px solid rgba(96,165,250,0.28);
  border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: #eff6ff; letter-spacing: 0.01em;
  transition: border-color 0.15s, background 0.15s;
}
.aaf-body .aaf-subject::placeholder { color: rgba(96,165,250,0.35); }
.aaf-body .aaf-subject:focus { border-color: rgba(96,165,250,0.65); background: rgba(96,165,250,0.08); outline: none; }
/* iOS card rows → cockpit rows */
.aaf-body .aaf-ios-card {
  background: rgba(96,165,250,0.04);
  border: 1px solid rgba(96,165,250,0.18);
  border-radius: 10px;
  overflow: hidden;
}
.aaf-body .aaf-ios-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; gap: 12px;
}
.aaf-body .aaf-ios-row-sep { border-bottom: 1px solid rgba(96,165,250,0.12); }
.aaf-body .aaf-ios-lbl {
  font-family: 'Orbitron', sans-serif; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.12em; color: rgba(96,165,250,0.75); text-transform: uppercase;
  flex-shrink: 0;
}
.aaf-body .aaf-required { color: #60a5fa; }
.aaf-body .aaf-ios-inp {
  all: unset; text-align: right;
  font-family: 'Orbitron', sans-serif; font-size: 0.75rem; font-weight: 700;
  color: rgba(186,230,255,0.90); letter-spacing: 0.04em;
  background: transparent;
}
.aaf-body .aaf-ios-inp::placeholder { color: rgba(96,165,250,0.30); }
.aaf-body .aaf-date { width: 90px; }
.aaf-body .aaf-hm-wrap { display: flex; align-items: center; gap: 4px; }
.aaf-body .aaf-hm-inp { width: 36px; text-align: center; }
.aaf-body .aaf-hm-sep {
  color: rgba(96,165,250,0.55); font-family: 'Orbitron', sans-serif;
  font-size: 0.80rem; font-weight: 700;
}
/* Type buttons */
.aaf-body .aaf-types {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.aaf-body .aaf-type-btn {
  all: unset; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 8px;
  border: 1px solid rgba(96,165,250,0.22);
  background: rgba(96,165,250,0.04);
  font-family: 'Orbitron', sans-serif; font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.10em; color: rgba(96,165,250,0.65);
  transition: all 0.15s;
}
.aaf-body .aaf-type-btn:hover {
  background: rgba(96,165,250,0.10); border-color: rgba(96,165,250,0.50); color: #93c5fd;
}
.aaf-body .aaf-type-btn.active {
  background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.72);
  color: #bfdbfe; box-shadow: 0 0 12px rgba(96,165,250,0.28);
}
.aaf-body .aaf-type-icon svg { width: 13px; height: 13px; stroke: currentColor; }
/* Prep checkbox */
.aaf-body .aaf-prep-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 14px;
  background: rgba(96,165,250,0.04); border: 1px solid rgba(96,165,250,0.16);
  border-radius: 8px; transition: background 0.15s;
}
.aaf-body .aaf-prep-check:hover { background: rgba(96,165,250,0.09); }
.aaf-body .aaf-prep-check input[type="checkbox"] {
  accent-color: #60a5fa; width: 15px; height: 15px; cursor: pointer;
}
.aaf-body .aaf-prep-check-label {
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 500;
  color: rgba(96,165,250,0.80); letter-spacing: 0.02em;
}
/* Action buttons */
.aaf-body .aaf-actions {
  display: flex; gap: 10px;
}
.aaf-body .btn-agenda-add-confirm {
  all: unset; cursor: pointer; flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 20px; border-radius: 9px;
  background: rgba(96,165,250,0.16);
  border: 1px solid rgba(96,165,250,0.55);
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.12em; color: #bfdbfe;
  box-shadow: 0 0 18px rgba(96,165,250,0.20);
  transition: all 0.16s;
}
.aaf-body .btn-agenda-add-confirm:hover {
  background: rgba(96,165,250,0.28); border-color: rgba(96,165,250,0.88);
  box-shadow: 0 0 28px rgba(96,165,250,0.40), 0 4px 16px rgba(96,165,250,0.20);
  transform: translateY(-1px); color: #fff;
}
.aaf-body .btn-agenda-add-cancel {
  all: unset; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 600;
  color: rgba(186,220,255,0.55); transition: all 0.15s;
}
.aaf-body .btn-agenda-add-cancel:hover {
  background: rgba(255,255,255,0.07); color: rgba(186,220,255,0.90);
}

/* ════════════════════════════════════════════════════════════════════════
   ✦ MODALE « AJOUTER AU PLANNING » — refonte maquette
   Tout est scopé #agenda-add-overlay (classes génériques .input/.btn/.type/.cell…
   → aucune fuite vers le reste de l'app). Variables auto-portées sur l'overlay.
   ════════════════════════════════════════════════════════════════════════ */
#agenda-add-overlay {
  --violet:#a78bfa; --violet-bright:#c4b5fd; --indigo:#6d5dfc; --magenta:#d65ad6;
  --green:#54d6a0; --amber:#f5a23d;
  --ink:#f3f0ff; --muted:#b3a9d6; --muted-2:#7d749e;
  --surface:rgba(255,255,255,.035); --surface-2:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.09); --stroke-soft:rgba(255,255,255,.06);
  background:rgba(5,3,15,.6) !important;
  backdrop-filter:blur(6px) !important; -webkit-backdrop-filter:blur(6px) !important;
}
/* Carte : on neutralise la coque cockpit (clip-path/glow néon) → carte arrondie propre */
#agenda-add-overlay .aaf-modal {
  width:min(520px,94vw) !important;
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.02)) !important;
  border:1px solid var(--stroke) !important;
  border-radius:22px !important; clip-path:none !important;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.85) !important;
}
/* En-tête */
#agenda-add-overlay .m-head { display:flex; align-items:flex-start; gap:12px; padding:20px 22px 16px; }
#agenda-add-overlay .m-title { flex:1; display:flex; flex-direction:column; }
#agenda-add-overlay .m-title .eb { font-family:"Satoshi",sans-serif; font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--muted-2); }
#agenda-add-overlay .m-title .tt { font-family:"Clash Display",sans-serif; font-weight:600; font-size:21px; color:#fff; margin-top:3px; text-shadow:none; }
#agenda-add-overlay .iconbtn { all:unset; box-sizing:border-box; width:38px; height:38px; border-radius:12px; display:grid; place-items:center; cursor:pointer; flex:none; background:var(--surface-2); border:1px solid var(--stroke); color:var(--muted); transition:.18s; }
#agenda-add-overlay .iconbtn:hover { color:#fff; border-color:rgba(196,181,253,.4); }
/* Corps */
#agenda-add-overlay .m-body { position:relative; z-index:2; padding:4px 22px 22px; display:flex; flex-direction:column; gap:16px; max-height:78vh; overflow-y:auto; }
#agenda-add-overlay .agenda-add-form { display:flex; flex-direction:column; gap:16px; }
/* Type d'abord */
#agenda-add-overlay .field-label { font-family:"Satoshi",sans-serif; font-size:11.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-2); margin-bottom:9px; }
#agenda-add-overlay .types { display:flex; gap:8px; flex-wrap:wrap; }
#agenda-add-overlay .type { flex:1; min-width:96px; display:flex; align-items:center; justify-content:center; gap:8px; padding:12px; border-radius:12px; cursor:pointer; background:var(--surface-2); border:1px solid var(--stroke-soft); color:var(--muted); font-size:13.5px; font-weight:600; transition:.18s; }
#agenda-add-overlay .type svg { width:16px; height:16px; flex:none; }
#agenda-add-overlay .type:hover { color:#fff; border-color:rgba(196,181,253,.35); }
#agenda-add-overlay .type.on { background:linear-gradient(135deg,rgba(109,93,252,.45),rgba(214,90,214,.35)); border-color:rgba(196,181,253,.6); color:#fff; }
/* Champ nom */
#agenda-add-overlay .input { width:100%; padding:15px 16px; border-radius:13px; background:var(--surface-2); border:1px solid var(--stroke); color:#fff; font:inherit; font-size:15px; transition:.18s; }
#agenda-add-overlay .input::placeholder { color:var(--muted-2); }
#agenda-add-overlay .input:focus { outline:none; border-color:rgba(196,181,253,.5); background:rgba(167,139,250,.07); }
/* Date + heures : grille claire */
#agenda-add-overlay .row { display:grid; grid-template-columns:1fr; gap:10px; }
#agenda-add-overlay .row.times { grid-template-columns:1fr 1fr; }
#agenda-add-overlay .cell { padding:13px 15px; border-radius:13px; background:var(--surface-2); border:1px solid var(--stroke); display:flex; align-items:center; justify-content:space-between; gap:10px; transition:.18s; }
#agenda-add-overlay .cell:focus-within { border-color:rgba(196,181,253,.5); }
#agenda-add-overlay .cell .lbl { font-family:"Satoshi",sans-serif; font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted-2); flex:none; }
#agenda-add-overlay .req { color:var(--violet-bright); }
/* Vrais champs stylés comme la « valeur » de droite de la maquette */
#agenda-add-overlay .cell-inp { all:unset; box-sizing:border-box; font-family:"Clash Display",sans-serif; font-weight:500; font-size:15px; color:#fff; text-align:right; min-width:0; }
#agenda-add-overlay .cell-inp::placeholder { color:var(--muted-2); }
#agenda-add-overlay .aaf-date { width:120px; }
#agenda-add-overlay .hm { display:flex; align-items:center; gap:3px; }
#agenda-add-overlay .hm-inp { width:30px; text-align:center; -moz-appearance:textfield; }
#agenda-add-overlay .hm-inp::-webkit-outer-spin-button,
#agenda-add-overlay .hm-inp::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
#agenda-add-overlay .hm-sep { color:var(--muted-2); font-weight:600; }
/* Switch quête */
#agenda-add-overlay .switch-row { display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:13px; background:var(--surface-2); border:1px solid var(--stroke-soft); }
#agenda-add-overlay .switch-row .txt { flex:1; }
#agenda-add-overlay .switch-row .txt .t { font-size:14px; font-weight:600; color:#fff; }
#agenda-add-overlay .switch-row .txt .s { font-size:12px; color:var(--muted); margin-top:1px; }
#agenda-add-overlay .switch { width:44px; height:26px; border-radius:20px; background:rgba(255,255,255,.1); border:1px solid var(--stroke); position:relative; cursor:pointer; flex:none; transition:.2s; }
#agenda-add-overlay .switch::after { content:""; position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%; background:#fff; transition:.2s; }
#agenda-add-overlay .switch.on { background:linear-gradient(105deg,var(--indigo),var(--magenta)); border-color:transparent; }
#agenda-add-overlay .switch.on::after { left:20px; }
/* Actions */
#agenda-add-overlay .actions { display:flex; gap:10px; margin-top:2px; }
#agenda-add-overlay .btn { flex:1; display:flex; align-items:center; justify-content:center; gap:9px; padding:15px; border-radius:13px; cursor:pointer; font-family:"Clash Display",sans-serif; font-weight:600; font-size:15px; border:1px solid var(--stroke); background:var(--surface); color:var(--muted); transition:.2s; }
#agenda-add-overlay .btn:hover { color:#fff; border-color:rgba(196,181,253,.4); background:var(--surface-2); }
#agenda-add-overlay .btn svg { flex:none; }
#agenda-add-overlay .btn.primary { flex:2; border:none; color:#fff; background:linear-gradient(105deg,var(--indigo),var(--magenta)); box-shadow:0 14px 36px -12px rgba(150,70,230,.8); }
#agenda-add-overlay .btn.primary:hover { transform:translateY(-2px); box-shadow:0 20px 44px -12px rgba(150,70,230,1); }

/* ══════════════════════════════════════════════════════
   MODALE ALERTE ÉNERGIE CENTRALE
══════════════════════════════════════════════════════ */
.energy-alert-overlay {
  position: absolute;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4,2,20,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.energy-alert-overlay.eao-visible {
  opacity: 1;
  pointer-events: all;
}
.eao-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(340px, 88vw);
  padding: 32px 28px 24px;
  background: rgba(8,4,28,0.97);
  border: 1px solid rgba(248,113,113,0.60);
  border-radius: 8px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 0 60px rgba(248,113,113,0.25), 0 0 120px rgba(248,113,113,0.10);
  animation: eao-enter 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
  overflow: hidden;
  text-align: center;
}
@keyframes eao-enter {
  from { transform: scale(0.88) translateY(16px); opacity: 0; }
  to   { transform: scale(1) translateY(0);       opacity: 1; }
}
/* Scanline */
.eao-scanline {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, rgba(248,113,113,0.04) 3px, rgba(248,113,113,0.04) 4px);
}
.eao-scanline::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 35%;
  background: linear-gradient(to bottom, rgba(248,113,113,0.09), transparent);
  animation: eao-scan 2.4s linear infinite; top: -35%;
}
@keyframes eao-scan { from{top:-35%} to{top:135%} }
/* Coins */
.eao-corner {
  position: absolute; width: 10px; height: 10px;
  border-color: rgba(248,113,113,0.85); border-style: solid; z-index: 2;
}
.eao-tl { top:4px; left:4px;   border-width: 2px 0 0 2px; }
.eao-tr { top:4px; right:4px;  border-width: 2px 2px 0 0; }
.eao-bl { bottom:4px; left:4px;  border-width: 0 0 2px 2px; }
.eao-br { bottom:4px; right:4px; border-width: 0 2px 2px 0; }
/* Icône */
.eao-icon {
  position: relative; z-index: 2;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(248,113,113,0.55);
  background: rgba(248,113,113,0.10);
  display: flex; align-items: center; justify-content: center;
  animation: sbm-icon-flash 1.2s ease-in-out infinite;
  margin-bottom: 2px;
}
.eao-icon svg { width: 22px; height: 22px; stroke: #f87171; }
/* Texte */
.eao-tag {
  position: relative; z-index: 2;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.16em;
  color: rgba(248,113,113,0.60);
  animation: sbm-blink 1.2s step-end infinite;
}
.eao-title {
  position: relative; z-index: 2;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.90rem; font-weight: 800; letter-spacing: 0.06em; line-height: 1.3;
  color: #f87171;
  text-shadow: 0 0 20px rgba(248,113,113,0.65);
}
.eao-sub {
  position: relative; z-index: 2;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem; font-weight: 400; line-height: 1.5;
  color: rgba(255,200,200,0.72);
}
.eao-sub strong { color: #fde68a; font-weight: 700; }
/* Bouton Compris */
.eao-btn {
  position: relative; z-index: 2;
  margin-top: 6px;
  padding: 10px 32px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(135deg, rgba(248,113,113,0.25), rgba(248,113,113,0.15));
  border: 1px solid rgba(248,113,113,0.65);
  border-radius: 4px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.15s, box-shadow 0.15s;
}
.eao-btn:hover {
  background: linear-gradient(135deg, rgba(248,113,113,0.40), rgba(248,113,113,0.25));
  box-shadow: 0 0 16px rgba(248,113,113,0.40);
}

/* RATTRAPAGE — orange ambré */
.qs5-col-catchup {
  border-color: rgba(251,146,60,0.38);
  box-shadow:
    0 0 0 1px rgba(251,146,60,0.10),
    0 0 22px rgba(251,146,60,0.16),
    0 0 6px  rgba(251,146,60,0.12) inset,
    0 4px 28px rgba(0,0,0,0.50);
}
.qs5-col-catchup:hover {
  border-color: rgba(251,146,60,0.62);
  box-shadow:
    0 0 0 1px rgba(251,146,60,0.16),
    0 0 32px rgba(251,146,60,0.26),
    0 0 10px rgba(251,146,60,0.16) inset,
    0 4px 28px rgba(0,0,0,0.55);
}
.qs5-col-catchup .qs5-col-hdr   { border-bottom-color: rgba(251,146,60,0.22); }
.qs5-col-catchup .qs5-col-title {
  color: #fdba74;
  text-shadow: 0 0 14px rgba(251,146,60,0.80), 0 0 4px rgba(251,146,60,0.50);
}

/* PRÉPARATION — rose/fuchsia */
.qs5-col-prep {
  border-color: rgba(232,121,249,0.36);
  box-shadow:
    0 0 0 1px rgba(232,121,249,0.10),
    0 0 22px rgba(232,121,249,0.16),
    0 0 6px  rgba(232,121,249,0.12) inset,
    0 4px 28px rgba(0,0,0,0.50);
}
.qs5-col-prep:hover {
  border-color: rgba(232,121,249,0.60);
  box-shadow:
    0 0 0 1px rgba(232,121,249,0.16),
    0 0 32px rgba(232,121,249,0.26),
    0 0 10px rgba(232,121,249,0.16) inset,
    0 4px 28px rgba(0,0,0,0.55);
}
.qs5-col-prep .qs5-col-hdr   { border-bottom-color: rgba(232,121,249,0.20); }
.qs5-col-prep .qs5-col-title {
  color: #f0abfc;
  text-shadow: 0 0 14px rgba(232,121,249,0.80), 0 0 4px rgba(232,121,249,0.50);
}

/* ── Corps scrollable ── */
.qs5-col-body {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  min-height: 0;
}
.qs5-col-body::-webkit-scrollbar { width: 3px; }
.qs5-col-body::-webkit-scrollbar-track { background: transparent; }
.qs5-col-body::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.22); border-radius: 2px;
}

/* ── Masquer les rayon-headers redondants (titre déjà dans qs5-col-hdr) ── */
.qs5-col-body .rayon-header { display: none !important; }
.qs5-col-body .rev-sep-ornament { display: none !important; }

/* ── Révision — cartes full-width, arrondies ── */
.qs5-col-revision .rev-container {
  gap: 6px !important; padding: 8px 10px 12px !important;
  align-items: stretch !important;
}
.qs5-col-revision .rev-subject {
  width: auto !important; max-width: none !important;
  margin: 0 !important; align-self: stretch !important;
  clip-path: none !important; border-radius: 10px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  transition: box-shadow 0.18s, transform 0.18s !important;
}
.qs5-col-revision .rev-subject:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.07) !important;
}
.qs5-col-revision .rev-subject-header { padding: 9px 11px !important; }
.qs5-col-revision .rev-subj-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.72rem !important; font-weight: 700 !important;
  text-align: left !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qs5-col-revision .rev-forge-btn {
  width: auto !important; max-width: none !important;
  clip-path: none !important; border-radius: 9px !important;
  margin: 0 10px 10px !important;
}
.qs5-col-revision .rev-progress-wrap { margin: 0 10px 6px !important; font-size: 0.6rem !important; }

/* ── Quest cards dans catchup/prep — lignes compactes ── */
.qs5-col-catchup .quest-card,
.qs5-col-prep .quest-card {
  background: rgba(139,92,246,0.06) !important;
  background-image: none !important;
  border: none !important;
  border-left: 2px solid rgba(139,92,246,0.45) !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 7px 10px 7px 11px !important;
  gap: 7px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  transition: background 0.14s !important;
}
.qs5-col-catchup .quest-card::before,
.qs5-col-prep .quest-card::before { display: none !important; }
.qs5-col-catchup .quest-card:hover,
.qs5-col-prep .quest-card:hover {
  background: rgba(139,92,246,0.11) !important;
  transform: none !important; box-shadow: none !important;
}
.qs5-col-catchup .quest-card.in-basket,
.qs5-col-prep .quest-card.in-basket {
  background: rgba(74,222,128,0.07) !important;
  border-left-color: rgba(74,222,128,0.55) !important;
  box-shadow: none !important;
}
.qs5-col-catchup .qcard-checkbox,
.qs5-col-prep .qcard-checkbox {
  width: 18px !important; height: 18px !important; border-radius: 5px !important;
}
.qs5-col-catchup .qcard-checkbox svg,
.qs5-col-prep .qcard-checkbox svg { width: 11px !important; height: 11px !important; }
.qs5-col-catchup .qcard-name,
.qs5-col-prep .qcard-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.72rem !important; font-weight: 600 !important;
  margin-bottom: 1px !important;
}
.qs5-col-catchup .qcard-edit-hint,
.qs5-col-prep .qcard-edit-hint { display: none !important; }
.qs5-col-catchup .qcard-time,
.qs5-col-prep .qcard-time,
.qs5-col-catchup .qcard-coins,
.qs5-col-prep .qcard-coins {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.58rem !important;
}
.qs5-col-catchup .qcard-time-edit,
.qs5-col-prep .qcard-time-edit { display: none !important; }

/* Sections catchup arrondies */
.qs5-col-catchup .catchup-section,
.qs5-col-prep .catchup-section {
  background: rgba(7,9,28,0.45);
  border: 1px solid rgba(139,92,246,0.16);
  border-radius: 9px; overflow: hidden;
  gap: 0; flex-shrink: 0; margin: 6px 8px 0;
}
.qs5-col-catchup .catchup-section-label,
.qs5-col-prep .catchup-section-label {
  background: rgba(139,92,246,0.08) !important;
  border-bottom: 1px solid rgba(139,92,246,0.12) !important;
  border-left: none !important;
  padding: 6px 10px !important; margin: 0 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important; font-weight: 700 !important;
  color: rgba(196,181,253,0.70) !important;
  letter-spacing: 0.05em !important;
}
.qs5-col-catchup .cs-body,
.qs5-col-prep .cs-body {
  padding: 4px 6px !important; display: flex; flex-direction: column; gap: 3px;
}
.qs5-col-catchup .qswipe-wrap,
.qs5-col-prep .qswipe-wrap { margin: 0 !important; }
.qs5-col-catchup .shelf-add-custom-card,
.qs5-col-prep .shelf-add-custom-card { display: none !important; }
.qs5-col-catchup .prep-drag-item > .rev-drag-handle,
.qs5-col-prep .prep-drag-item > .rev-drag-handle { display: none !important; }
.qs5-col-catchup .prep-list,
.qs5-col-prep .prep-list { gap: 3px !important; padding: 6px 8px !important; }
.qs5-col-catchup .prep-drag-item,
.qs5-col-prep .prep-drag-item { background: transparent !important; border: none !important; padding: 0 !important; }

/* ── Footer ── */
.qs5-footer {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  height: 52px;
  border-top: 1px solid rgba(139,92,246,0.15);
  background: rgba(7,9,28,0.80);
  backdrop-filter: blur(20px);
}
.qs5-footer-stats {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem; color: rgba(180,175,240,0.55);
}
.qs5-stat-item { display: flex; align-items: center; gap: 5px; }
.qs5-totals { display: flex; gap: 10px; flex-wrap: wrap; }
.qs5-gen-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 36px;
  border-radius: 10px; cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 900; letter-spacing: 0.18em;
  color: #fff; text-transform: uppercase;
  background: linear-gradient(135deg, #7c3aed 0%, #d946ef 60%, #06b6d4 100%);
  box-shadow:
    0 0 28px rgba(217,70,239,0.40),
    0 0 10px rgba(6,182,212,0.20),
    0 2px 12px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.18);
  border: 1px solid rgba(217,70,239,0.30);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  position: relative; overflow: hidden;
}
.qs5-gen-btn::after {
  content: '';
  position: absolute; top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: qs5-btn-shimmer 2.8s ease infinite;
}
@keyframes qs5-btn-shimmer {
  0%   { left: -80%; }
  50%  { left: 120%; }
  100% { left: 120%; }
}
.qs5-gen-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 50px rgba(217,70,239,0.65),
    0 0 18px rgba(6,182,212,0.30),
    0 6px 20px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.qs5-gen-btn:active { transform: scale(0.97); }

/* ── Animation lancement ON DÉCOLLE ── */
.qs5-gen-btn.decolle-launching {
  animation: decolle-btn-launch 0.75s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
  pointer-events: none;
}
@keyframes decolle-btn-launch {
  0%   { transform: translateY(0) scale(1);    opacity: 1; }
  20%  { transform: translateY(-6px) scale(1.06); opacity: 1; }
  100% { transform: translateY(-120px) scale(0.2); opacity: 0; }
}

/* Overlay de noircissement */
.decolle-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: #000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.55s ease;
}
.decolle-overlay.active { opacity: 1; }

/* ─── Mission Conflict Dialog ─────────────────────────────────── */
.mcf-overlay {
  position: fixed; inset: 0; z-index: 9200;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.mcf-overlay.mcf-visible { opacity: 1; pointer-events: all; }

.mcf-modal {
  position: relative;
  width: min(440px, 92vw);
  background: #0f1117;
  border: 1px solid #f59e0b66;
  box-shadow: 0 0 0 1px #f59e0b22, 0 0 32px #f59e0b33, 0 20px 60px rgba(0,0,0,0.8);
  clip-path: polygon(18px 0%, 100% 0%, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0% 100%, 0% 18px);
  padding: 32px 28px 28px;
  text-align: center;
  overflow: hidden;
}

.mcf-scanline {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px);
  animation: aei-scanline-move 8s linear infinite;
}

.mcf-corner {
  position: absolute; width: 14px; height: 14px;
  border-color: #f59e0b; border-style: solid; z-index: 2;
}
.mcf-tl { top: 6px; left: 6px;  border-width: 2px 0 0 2px; }
.mcf-tr { top: 6px; right: 6px; border-width: 2px 2px 0 0; }
.mcf-bl { bottom: 6px; left: 6px;  border-width: 0 0 2px 2px; }
.mcf-br { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }

.mcf-icon {
  position: relative; z-index: 1;
  font-size: 2.4rem; margin-bottom: 10px;
  animation: mcf-pulse 1.8s ease-in-out infinite;
}
@keyframes mcf-pulse {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 6px #f59e0b88); }
  50%      { transform: scale(1.12); filter: drop-shadow(0 0 14px #f59e0bcc); }
}

.mcf-tag {
  position: relative; z-index: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  color: #f59e0b; text-transform: uppercase; margin-bottom: 8px;
}

.mcf-title {
  position: relative; z-index: 1;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem; font-weight: 900; letter-spacing: 0.06em;
  color: #fff; margin-bottom: 12px;
  text-shadow: 0 0 16px #f59e0b88;
}

.mcf-sub {
  position: relative; z-index: 1;
  font-size: 0.82rem; color: rgba(255,255,255,0.65);
  line-height: 1.6; margin-bottom: 24px;
}
.mcf-sub strong { color: rgba(255,255,255,0.9); }

.mcf-btns {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 10px;
}

.mcf-btn {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  border: none; cursor: pointer;
  padding: 12px 20px;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.mcf-btn:hover { transform: translateY(-2px); filter: brightness(1.15); }
.mcf-btn:active { transform: translateY(0); filter: brightness(0.95); }

.mcf-btn-continue {
  background: linear-gradient(90deg, #16a34a, #22c55e);
  color: #fff;
  box-shadow: 0 4px 16px #22c55e44;
}

.mcf-btn-abandon {
  background: linear-gradient(90deg, #b45309, #f59e0b);
  color: #0f1117;
  box-shadow: 0 4px 16px #f59e0b44;
}

/* ─── Carte de Mission Holographique ──────────────────────────── */

/* ── Trigger button holographique (footer, à gauche de ON DÉCOLLE) ── */
.mcp-trigger-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 64px;
  padding: 11px 0 9px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.42rem; font-weight: 800; letter-spacing: 0.1em;
  color: #60a5fa;
  background: rgba(96,165,250,0.08);
  border: 1px solid rgba(96,165,250,0.4);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Float animation */
  animation: mcp-float 3s ease-in-out infinite, mcp-glow-breathe 2.8s ease-in-out infinite;
}
/* Animated holo border */
.mcp-trigger-btn::before {
  content: '';
  position: absolute; inset: -1px;
  background: conic-gradient(from var(--mbt-angle, 0deg),
    #60a5fa 0%, #8b5cf6 30%, #06b6d4 60%, #d946ef 80%, #60a5fa 100%);
  border-radius: 11px; z-index: -1;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
  animation: holo-spin 3.5s linear infinite;
  opacity: 0.75;
}
.mcp-trigger-btn svg {
  filter: drop-shadow(0 0 5px rgba(96,165,250,0.9));
  transition: transform 0.18s;
}
.mcp-trigger-btn:hover {
  color: #fff;
  background: rgba(96,165,250,0.18);
  animation: none;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 0 28px rgba(96,165,250,0.55), 0 0 56px rgba(96,165,250,0.25);
}
.mcp-trigger-btn:hover svg { transform: scale(1.2); filter: drop-shadow(0 0 12px #60a5fa); }
.mcp-trigger-btn:hover::before { opacity: 1; }

@keyframes mcp-float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-5px); }
}
@keyframes mcp-glow-breathe {
  0%,100% { box-shadow: 0 0 8px rgba(96,165,250,0.25), 0 0 16px rgba(96,165,250,0.1); }
  50%      { box-shadow: 0 0 22px rgba(96,165,250,0.7), 0 0 40px rgba(96,165,250,0.35), 0 0 60px rgba(139,92,246,0.2); }
}

/* ── Overlay ── */
.mcp-overlay {
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(0,2,12,0.78);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.mcp-overlay.mcp-visible { opacity: 1; pointer-events: all; }

/* ── Holographic card ── */
.mcp-card {
  position: relative;
  width: min(94vw, 1040px);
  height: min(90vh, 700px);
  max-height: 90vh;
  background: rgba(4,8,24,0.82);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(96,165,250,0.35);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(96,165,250,0.08),
    0 0 60px rgba(96,165,250,0.22),
    0 0 120px rgba(139,92,246,0.12),
    inset 0 0 80px rgba(96,165,250,0.03);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: perspective(1200px) rotateX(-18deg) scale(0.88);
  opacity: 0;
  transition: none;
}
.mcp-overlay.mcp-visible .mcp-card {
  animation: mcp-unfold 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
}
.mcp-overlay.mcp-closing .mcp-card {
  animation: mcp-fold 0.32s ease-in forwards;
}
@keyframes mcp-unfold {
  0%   { transform: perspective(1200px) rotateX(-22deg) scale(0.86); opacity: 0; filter: brightness(2.5) blur(6px); }
  25%  { opacity: 0.9; filter: brightness(1.3) blur(1px); }
  60%  { transform: perspective(1200px) rotateX(2deg) scale(1.008); opacity: 1; filter: brightness(1.05); }
  80%  { transform: perspective(1200px) rotateX(-1deg) scale(0.997); }
  100% { transform: perspective(1200px) rotateX(0deg) scale(1); opacity: 1; filter: brightness(1); }
}
@keyframes mcp-fold {
  0%   { transform: perspective(1200px) rotateX(0deg) scale(1); opacity: 1; filter: brightness(1); }
  100% { transform: perspective(1200px) rotateX(-22deg) scale(0.86); opacity: 0; filter: brightness(2) blur(4px); }
}

/* ════════════════════════════════════════════════════════════════════════
   ✦ CARTE DE MISSION — refonte maquette (courbe générée dynamiquement)
   Tout scopé #mission-card-overlay. On garde l'overlay + l'anim d'ouverture
   (mcp-visible/mcp-closing) ; on remplace l'aspect cockpit par la carte propre.
   ════════════════════════════════════════════════════════════════════════ */
#mission-card-overlay {
  --violet:#a78bfa; --violet-bright:#c4b5fd; --indigo:#6d5dfc; --magenta:#d65ad6;
  --teal:#5ad6e0; --green:#54d6a0; --amber:#f5a23d;
  --ink:#f3f0ff; --muted:#b3a9d6; --muted-2:#7d749e;
  --surface:rgba(255,255,255,.035); --surface-2:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.09); --stroke-soft:rgba(255,255,255,.06);
  background:rgba(5,3,15,.6) !important;
  backdrop-filter:blur(6px) !important; -webkit-backdrop-filter:blur(6px) !important;
}
#mission-card-overlay .mcp-card {
  width:min(760px,94vw) !important; height:auto !important; max-height:90vh !important;
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.02)) !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  border:1px solid var(--stroke) !important; border-radius:22px !important;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.85) !important;
}
/* En-tête unifié */
#mission-card-overlay .m-head { display:flex; align-items:center; gap:12px; padding:18px 20px; border-bottom:1px solid var(--stroke-soft); }
#mission-card-overlay .hicon { width:32px; height:32px; border-radius:10px; display:grid; place-items:center; flex:none; background:rgba(167,139,250,.15); color:var(--violet-bright); }
#mission-card-overlay .m-head h3 { font-family:"Clash Display",sans-serif; font-weight:600; font-size:16px; letter-spacing:.05em; text-transform:uppercase; color:#fff; flex:1; text-shadow:none; margin:0; }
#mission-card-overlay .go { all:unset; box-sizing:border-box; display:flex; align-items:center; gap:9px; padding:11px 22px; border-radius:12px; cursor:pointer; font-family:"Clash Display",sans-serif; font-weight:600; font-size:15px; color:#fff; background:linear-gradient(105deg,var(--indigo),var(--magenta)); box-shadow:0 12px 30px -10px rgba(150,70,230,.8); position:relative; overflow:hidden; transition:.2s; }
#mission-card-overlay .go::after { content:""; position:absolute; top:0; left:-60%; width:50%; height:100%; background:linear-gradient(100deg,transparent,rgba(255,255,255,.4),transparent); transform:skewX(-18deg); animation:mcp-go-shimmer 4.5s ease-in-out infinite; }
@keyframes mcp-go-shimmer { 0%,60%{left:-60%} 80%,100%{left:130%} }
#mission-card-overlay .go:hover { transform:translateY(-1px); }
#mission-card-overlay .go svg { width:16px; height:16px; }
#mission-card-overlay .iconbtn { all:unset; box-sizing:border-box; width:38px; height:38px; border-radius:12px; display:grid; place-items:center; cursor:pointer; flex:none; background:var(--surface-2); border:1px solid var(--stroke); color:var(--muted); transition:.18s; }
#mission-card-overlay .iconbtn:hover { color:#fff; border-color:rgba(196,181,253,.4); }
/* Aperçu de la courbe */
#mission-card-overlay .preview { padding:22px; display:flex; justify-content:center; border-bottom:1px solid var(--stroke-soft); }
#mission-card-overlay .preview svg { width:100%; max-width:420px; height:120px; }
#mission-card-overlay .node-label { font-family:"Clash Display",sans-serif; font-size:8px; font-weight:600; letter-spacing:.1em; fill:var(--muted-2); text-transform:uppercase; }
/* Corps */
#mission-card-overlay .m-body { padding:14px 18px 18px; display:flex; flex-direction:column; gap:11px; max-height:42vh; overflow-y:auto; }
#mission-card-overlay .m-body::-webkit-scrollbar { width:6px; }
#mission-card-overlay .m-body::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:10px; }
/* Étape */
#mission-card-overlay .step { display:flex; align-items:center; gap:13px; padding:14px; border-radius:14px; background:var(--surface-2); border:1px solid var(--stroke-soft); transition:.18s; }
#mission-card-overlay .step:hover { border-color:rgba(196,181,253,.3); }
#mission-card-overlay .step.mcp-ms-dragging { opacity:.4; cursor:grabbing; }
#mission-card-overlay .step.mcp-ms-drag-over { border-color:rgba(196,181,253,.6); }
#mission-card-overlay .grip { color:var(--muted-2); cursor:grab; flex:none; display:grid; place-items:center; }
#mission-card-overlay .num { width:34px; height:34px; border-radius:10px; flex:none; display:grid; place-items:center; background:rgba(167,139,250,.16); color:var(--violet-bright); font-family:"Clash Display",sans-serif; font-weight:600; font-size:15px; }
#mission-card-overlay .s-main { flex:1; min-width:0; }
#mission-card-overlay .s-title { font-weight:600; font-size:15px; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#mission-card-overlay .s-sub { margin-top:3px; }
#mission-card-overlay .tag { display:inline-flex; align-items:center; font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--muted); padding:2px 8px; border-radius:20px; background:rgba(255,255,255,.06); border:1px solid var(--stroke-soft); }
#mission-card-overlay .dur { display:flex; align-items:center; gap:7px; padding:8px 13px; border-radius:30px; flex:none; background:var(--surface); border:1px solid var(--stroke); font-size:13.5px; font-weight:600; color:#fff; }
#mission-card-overlay .dur svg { width:14px; height:14px; color:var(--muted); }
/* Total */
#mission-card-overlay .total { display:flex; align-items:center; justify-content:space-between; padding:12px 15px; border-radius:13px; background:rgba(167,139,250,.06); border:1px dashed rgba(167,139,250,.25); font-size:13px; color:var(--muted); }
#mission-card-overlay .total b { color:#fff; font-weight:600; }
/* Vide */
#mission-card-overlay .mc-empty { display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; padding:30px 16px; color:var(--muted); font-size:14px; font-weight:600; }
#mission-card-overlay .mc-empty span { font-weight:400; font-size:12.5px; color:var(--muted-2); }

/* Animated hologram border */
.mcp-holo-border {
  position: absolute; inset: -1px; z-index: 0;
  border-radius: 5px; pointer-events: none;
  background: conic-gradient(from var(--holo-angle, 0deg),
    #60a5fa 0%, #8b5cf6 25%, #06b6d4 50%, #d946ef 75%, #60a5fa 100%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 1px;
  animation: holo-spin 5s linear infinite;
  opacity: 0.7;
}
@keyframes holo-spin { to { --holo-angle: 360deg; } }
@property --holo-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* Grid background */
.mcp-grid-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(rgba(96,165,250,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,165,250,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Scanlines */
.mcp-scanlines {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg,
    transparent 0px, transparent 2px,
    rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px);
  animation: aei-scanline-move 12s linear infinite;
}

/* Stars */
.mcp-stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.mcp-star {
  position: absolute; border-radius: 50%;
  background: #fff;
  animation: mcp-twinkle linear infinite;
}
@keyframes mcp-twinkle {
  0%,100% { opacity: 0.08; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.3); }
}

/* ── Header ── */
.mcp-header {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px 11px;
  border-bottom: 1px solid rgba(96,165,250,0.18);
  background: rgba(4,12,32,0.65);
  flex-shrink: 0;
}
.mcp-header-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mcp-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mcp-title-block  { display: flex; flex-direction: column; gap: 2px; }
.mcp-hud-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.18em;
  color: #60a5fa; text-transform: uppercase;
  text-shadow: 0 0 12px rgba(96,165,250,0.8);
}
.mcp-subtitle {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 500; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
}
.mcp-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.mcp-status-dot.mcp-dot-active {
  background: #4ade80;
  box-shadow: 0 0 10px #4ade8099, 0 0 20px #4ade8044;
  animation: mcf-pulse 2s ease-in-out infinite;
}
.mcp-footer-count {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}
.mcp-footer-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.5rem; font-weight: 600; letter-spacing: 0.08em;
  color: #60a5fa;
}
.mcp-close-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  color: rgba(255,255,255,0.45);
  cursor: pointer; transition: all 0.15s;
}
.mcp-close-btn:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); color: #f87171; }
.mcp-launch-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem; font-weight: 800; letter-spacing: 0.1em;
  background: linear-gradient(90deg, #7c3aed, #d946ef, #06b6d4);
  border: none; color: #fff; cursor: pointer;
  padding: 7px 14px;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: filter 0.15s, transform 0.15s;
  white-space: nowrap;
}
.mcp-launch-btn:hover { filter: brightness(1.2); transform: translateY(-1px); }

/* ── Onglets LISTE / PARCOURS ── */
.mcp-view-tabs {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(139,92,246,0.2);
  flex-shrink: 0;
  position: relative; z-index: 2;
}
.mcp-vtab {
  all: unset;
  display: flex; align-items: center; gap: 5px;
  font-family: 'Orbitron', sans-serif;
  font-size: 8px; font-weight: 700;
  letter-spacing: 0.1em;
  padding: 8px 10px 7px;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.mcp-vtab svg { opacity: 0.5; transition: opacity 0.15s; }
.mcp-vtab:hover { color: rgba(196,181,253,0.7); }
.mcp-vtab:hover svg { opacity: 0.7; }
.mcp-vtab--active { color: #c4b5fd; border-bottom-color: #8b5cf6; }
.mcp-vtab--active svg { opacity: 1; }

/* ── Vue PARCOURS ── */
.mcp-parcours-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative; z-index: 2;
  overflow: hidden;
}
.mcp-mini-route {
  padding: 8px 12px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  background: rgba(0,0,0,0.15);
}
.mcp-mini-grid {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.mcp-mini-grid::-webkit-scrollbar { display: none; }

/* ── Blocs de la mini grille (ligne unique) ── */
.mcp-ms-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: grab;
  transition: background 0.12s;
  user-select: none;
  min-height: 56px;
}
.mcp-ms-row:hover { background: rgba(139,92,246,0.07); }
.mcp-ms-row.mcp-ms-dragging { opacity: 0.35; cursor: grabbing; }
.mcp-ms-row.mcp-ms-drag-over {
  background: rgba(139,92,246,0.18);
  box-shadow: inset 0 2px 0 rgba(139,92,246,0.6);
}

/* Handle de glissement */
.mcp-ms-handle {
  font-size: 17px;
  color: rgba(255,255,255,0.22);
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: -1px;
}

.mcp-ms-badge {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px; font-weight: 900;
  flex-shrink: 0;
  transform: skewX(-6deg);
}
.mcp-ms-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mcp-ms-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.mcp-ms-cat {
  font-family: 'Orbitron', sans-serif;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ec4899 !important;
  opacity: 0.9;
}

/* Timer inline à droite */
.mcp-ms-timebtn {
  all: unset;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.mcp-ms-timebtn:hover { border-color: rgba(139,92,246,0.55); background: rgba(139,92,246,0.12); color: #fff; }
.mcp-ms-timebtn--empty { color: rgba(255,255,255,0.3); border-style: dashed; border-color: rgba(255,255,255,0.1); }

/* ── Bouton supprimer bloc (×) ────────────────────────────── */
.mcp-ms-remove {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
  opacity: 0;
}
.mcp-ms-row:hover .mcp-ms-remove { opacity: 1; }
.mcp-ms-remove:hover {
  background: transparent;
  border-color: transparent;
  color: rgba(255,255,255,0.55);
}

/* ── Path viewport — contenu fixe, zéro scroll ── */
.mcp-path-viewport {
  position: relative; z-index: 2;
  flex: 1;
  overflow: hidden;
  padding: 0;
  display: flex; flex-direction: column;
  min-height: 0;
}

/* ── Path track ── */
.mcp-path-track {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
  overflow: hidden;
}

/* ── Barre de synthèse ── */
.mcp-summary-bar {
  display: flex; align-items: center;
  padding: 7px 20px;
  background: rgba(4,8,24,0.60);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  gap: 0;
}
.mcp-sum-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px 0 0;
  color: rgba(200,196,255,0.70);
}
.mcp-sum-chip svg { flex-shrink: 0; opacity: 0.60; }
.mcp-sum-pause { color: #4ade80; }
.mcp-sum-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem; font-weight: 900; letter-spacing: 0.03em;
  color: #fff; line-height: 1;
}
.mcp-sum-lbl {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.30rem; font-weight: 600; letter-spacing: 0.12em;
  color: rgba(200,196,255,0.36); text-transform: uppercase;
  margin-top: 1px;
}
.mcp-sum-div {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.08);
  margin: 0 14px 0 0;
  flex-shrink: 0;
}
.mcp-sum-hint {
  font-size: 0.56rem; color: rgba(200,196,255,0.30);
  padding-left: 4px; font-style: italic;
}
.mcp-sum-hint strong { color: rgba(200,196,255,0.55); font-style: normal; }

/* ── Grille des cartes ── */
.mcp-grid-wrap {
  display: flex; flex-wrap: wrap;
  gap: 8px; padding: 12px 16px;
  align-content: flex-start;
  align-items: flex-start;
  flex: 1; min-height: 0;
  overflow: hidden;
}

/* ── Terminal chips (DÉPART / ARRIVÉE) ── */
.mcp-term-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.mcp-term-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid; background: rgba(255,255,255,0.04);
}
.mcp-term-chip span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.36rem; font-weight: 800; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.30);
}

/* ── Rail lines connecting nodes ── */
.mcp-rail-line {
  width: 40px; height: 2px; flex-shrink: 0;
  background: linear-gradient(90deg, rgba(96,165,250,0.25), rgba(96,165,250,0.55), rgba(96,165,250,0.25));
  position: relative;
}
.mcp-rail-line.mcp-rail-animated::after {
  content: '';
  position: absolute; top: -1px; left: -10px;
  width: 20px; height: 4px;
  background: rgba(96,165,250,0.9);
  border-radius: 2px;
  filter: blur(2px);
  animation: rail-pulse 2.5s ease-in-out infinite;
}
@keyframes rail-pulse {
  0%,100% { left: -10px; opacity: 0; }
  30%      { opacity: 1; }
  70%      { opacity: 1; }
  100%     { left: calc(100% + 10px); opacity: 0; }
}

/* ── Terminal nodes (DÉPART / ARRIVÉE) ── */
.mcp-terminal {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.mcp-terminal-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(96,165,250,0.1);
  border: 1.5px solid rgba(96,165,250,0.4);
  color: #60a5fa;
  box-shadow: 0 0 16px rgba(96,165,250,0.3);
}
.mcp-depart .mcp-terminal-icon {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.4);
  color: #4ade80;
  box-shadow: 0 0 16px rgba(74,222,128,0.3);
}
.mcp-arrivee .mcp-terminal-icon {
  background: rgba(251,191,36,0.1);
  border-color: rgba(251,191,36,0.4);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(251,191,36,0.3);
}
.mcp-terminal-lbl {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 800; letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
}

/* ── Pause nodes (insérés automatiquement) ── */
.mcp-pause-node {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: rgba(74,222,128,0.05);
  border: 1px solid rgba(74,222,128,0.16);
  border-radius: 6px;
  animation: mcp-node-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
  flex-shrink: 0;
}
.mcp-pause-icon {
  color: #4ade80; flex-shrink: 0;
  display: flex; align-items: center;
  opacity: 0.75;
}
.mcp-pause-body { flex: 1; display: flex; align-items: center; gap: 8px; }
.mcp-pause-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.42rem; font-weight: 800; letter-spacing: 0.14em;
  color: #4ade80; text-transform: uppercase;
  flex-shrink: 0;
}
.mcp-pause-hint {
  font-size: 0.58rem; color: rgba(74,222,128,0.48);
}
.mcp-pause-dur {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem; font-weight: 900;
  color: #4ade80; opacity: 0.65;
  flex-shrink: 0;
}

/* ── Quest nodes (cartes en grille) ── */
.mcp-node {
  position: relative;
  width: calc(33.33% - 6px); min-width: 150px;
  flex-grow: 1; max-width: 300px;
  background: rgba(4,10,28,0.7);
  border: 1px solid rgba(var(--nc, 96,165,250), 0.3);
  border-color: var(--nc);
  border-radius: 6px;
  overflow: hidden;
  animation: node-appear 0.4s ease both;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 1px solid rgba(255,255,255,0.06);
}
.mcp-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 20px var(--nc, rgba(96,165,250,1));
}
@keyframes node-appear {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.mcp-node-glow {
  position: absolute; inset: 0; pointer-events: none;
  border-radius: 6px;
}
.mcp-node-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px 5px;
}
.mcp-node-cat {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.42rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mcp-node-reorder { display: flex; gap: 2px; }
.mcp-ord-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.25); font-size: 0.5rem;
  padding: 1px 3px; transition: color 0.12s, transform 0.1s;
}
.mcp-ord-btn:hover:not(:disabled) { color: #60a5fa; transform: scale(1.3); }
.mcp-ord-btn:disabled { opacity: 0.1; cursor: default; }
.mcp-node-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.70rem; font-weight: 900; letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.55;
}
.mcp-node-name {
  font-size: 0.68rem; font-weight: 700; color: #fff;
  line-height: 1.25; padding: 2px 8px 5px 12px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.mcp-node-time-wrap { padding: 0; }
.mcp-node-time {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; padding: 3px 7px;
  cursor: pointer; white-space: nowrap;
  transition: all 0.12s; width: 100%; text-align: center;
}
.mcp-node-time:hover { background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.4); color: #60a5fa; }
.mcp-time-add {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 600;
  color: rgba(96,165,250,0.4);
  background: rgba(96,165,250,0.04);
  border: 1px dashed rgba(96,165,250,0.2);
  border-radius: 4px; padding: 3px 7px;
  cursor: pointer; white-space: nowrap;
  width: 100%; text-align: center;
  transition: all 0.12s;
}
.mcp-time-add:hover { color: #60a5fa; border-color: rgba(96,165,250,0.5); background: rgba(96,165,250,0.1); }
.mcp-node-dot {
  position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.6);
  z-index: 2;
}

/* ── Time editor inline — style H / MIN ── */
.mcp-time-editor {
  display: flex; align-items: center; gap: 5px;
}
.mcp-te-in {
  width: 36px; padding: 5px 4px;
  background: rgba(4,10,28,0.92);
  border: 1px solid rgba(139,92,246,0.45);
  border-radius: 7px;
  color: #fff; font-family: 'Orbitron', sans-serif; font-size: 0.6rem; font-weight: 700;
  text-align: center;
  transition: border-color 0.15s;
}
.mcp-te-in:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 2px rgba(139,92,246,0.2); }
.mcp-te-sep {
  color: rgba(255,255,255,0.5);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.mcp-te-ok {
  width: 26px; height: 26px;
  background: #16a34a; border: none; border-radius: 7px;
  color: #fff; font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
  flex-shrink: 0;
}
.mcp-te-ok:hover { background: #22c55e; }

/* ── Accent barre gauche ── */
.mcp-node-accent {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 3px; border-radius: 6px 0 0 6px;
  opacity: 0.65;
}
/* ── Node head ── */
.mcp-node-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 8px 4px 12px;
}
/* ── Node foot ── */
.mcp-node-foot {
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px 7px 12px;
  flex-wrap: wrap;
}
.mcp-node-dur {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.40rem; font-weight: 700; letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ── Empty state ── */
.mcp-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px;
  padding: 60px 40px; text-align: center;
  width: 100%; min-width: 400px;
}
.mcp-empty-icon { color: rgba(96,165,250,0.25); }
.mcp-empty-txt {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
}
.mcp-empty-sub {
  font-size: 0.72rem; color: rgba(255,255,255,0.2); line-height: 1.6;
}

/* Scrollbars homogènes */
.qs5-workspace *::-webkit-scrollbar { width: 3px; height: 3px; }
.qs5-workspace *::-webkit-scrollbar-track { background: transparent; }
.qs5-workspace *::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.22); border-radius: 2px; }


/* ════════════════════════════════════════════════════════════
   QUEST SHOP — COLONNES CARTES ARRONDIE + NÉON
════════════════════════════════════════════════════════════ */

/* Workspace : espacement clair entre les cartes */
.qs5-workspace {
  padding: 16px !important;
  gap: 10px !important;
  overflow: visible !important;
  background: transparent !important;
}

/* Colonne — carte arrondie, fond sombre, overflow clip */
.qs5-col {
  border-right: none !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

/* ══ Néon + fond par colonne ══ */

/* RÉVISION — violet */
.qs5-col-revision {
  background: rgba(10,8,30,0.80) !important;
  border: 1.5px solid rgba(167,139,250,0.85) !important;
  box-shadow:
    0 0 0   1px rgba(167,139,250,0.25),
    0 0 16px    rgba(167,139,250,0.55),
    0 0 36px    rgba(167,139,250,0.30),
    0 0 8px  rgba(167,139,250,0.22) inset,
    0 6px 28px rgba(0,0,0,0.55) !important;
}
.qs5-col-revision:hover {
  border-color: rgba(167,139,250,1.0) !important;
  box-shadow:
    0 0 0   1px rgba(167,139,250,0.40),
    0 0 22px    rgba(167,139,250,0.80),
    0 0 50px    rgba(167,139,250,0.45),
    0 0 14px rgba(167,139,250,0.35) inset,
    0 6px 28px rgba(0,0,0,0.60) !important;
}

/* PLANIFICATION — cyan */
.qs5-col-mandatory {
  background: rgba(4,16,30,0.80) !important;
  border: 1.5px solid rgba(34,211,238,0.80) !important;
  box-shadow:
    0 0 0   1px rgba(34,211,238,0.22),
    0 0 16px    rgba(34,211,238,0.50),
    0 0 36px    rgba(34,211,238,0.28),
    0 0 8px  rgba(34,211,238,0.18) inset,
    0 6px 28px rgba(0,0,0,0.55) !important;
}
.qs5-col-mandatory:hover {
  border-color: rgba(34,211,238,1.0) !important;
  box-shadow:
    0 0 0   1px rgba(34,211,238,0.38),
    0 0 22px    rgba(34,211,238,0.75),
    0 0 50px    rgba(34,211,238,0.42),
    0 0 14px rgba(34,211,238,0.30) inset,
    0 6px 28px rgba(0,0,0,0.60) !important;
}

/* VITALITÉ — vert émeraude */
.qs5-col-vitality {
  background: rgba(4,20,16,0.80) !important;
  border: 1.5px solid rgba(52,211,153,0.80) !important;
  box-shadow:
    0 0 0   1px rgba(52,211,153,0.22),
    0 0 16px    rgba(52,211,153,0.48),
    0 0 36px    rgba(52,211,153,0.26),
    0 0 8px  rgba(52,211,153,0.18) inset,
    0 6px 28px rgba(0,0,0,0.55) !important;
}
.qs5-col-vitality:hover {
  border-color: rgba(52,211,153,1.0) !important;
  box-shadow:
    0 0 0   1px rgba(52,211,153,0.38),
    0 0 22px    rgba(52,211,153,0.72),
    0 0 50px    rgba(52,211,153,0.40),
    0 0 14px rgba(52,211,153,0.30) inset,
    0 6px 28px rgba(0,0,0,0.60) !important;
}

/* RATTRAPAGE — orange ambré */
.qs5-col-catchup {
  background: rgba(18,12,4,0.80) !important;
  border: 1.5px solid rgba(251,146,60,0.80) !important;
  box-shadow:
    0 0 0   1px rgba(251,146,60,0.22),
    0 0 16px    rgba(251,146,60,0.48),
    0 0 36px    rgba(251,146,60,0.26),
    0 0 8px  rgba(251,146,60,0.18) inset,
    0 6px 28px rgba(0,0,0,0.55) !important;
}
.qs5-col-catchup:hover {
  border-color: rgba(251,146,60,1.0) !important;
  box-shadow:
    0 0 0   1px rgba(251,146,60,0.38),
    0 0 22px    rgba(251,146,60,0.72),
    0 0 50px    rgba(251,146,60,0.40),
    0 0 14px rgba(251,146,60,0.30) inset,
    0 6px 28px rgba(0,0,0,0.60) !important;
}

/* PRÉPARATION — rose/fuchsia */
.qs5-col-prep {
  background: rgba(18,6,24,0.80) !important;
  border: 1.5px solid rgba(232,121,249,0.78) !important;
  box-shadow:
    0 0 0   1px rgba(232,121,249,0.20),
    0 0 16px    rgba(232,121,249,0.46),
    0 0 36px    rgba(232,121,249,0.25),
    0 0 8px  rgba(232,121,249,0.16) inset,
    0 6px 28px rgba(0,0,0,0.55) !important;
}
.qs5-col-prep:hover {
  border-color: rgba(232,121,249,1.0) !important;
  box-shadow:
    0 0 0   1px rgba(232,121,249,0.36),
    0 0 22px    rgba(232,121,249,0.70),
    0 0 50px    rgba(232,121,249,0.38),
    0 0 14px rgba(232,121,249,0.28) inset,
    0 6px 28px rgba(0,0,0,0.60) !important;
}

/* Header de colonne : fond teinté + coins arrondis haut */
.qs5-col-revision  .qs5-col-hdr { background: rgba(167,139,250,0.10) !important; border-bottom: 1px solid rgba(167,139,250,0.32) !important; border-radius: 18px 18px 0 0 !important; }
.qs5-col-mandatory .qs5-col-hdr { background: rgba(34,211,238,0.08)  !important; border-bottom: 1px solid rgba(34,211,238,0.28)  !important; border-radius: 18px 18px 0 0 !important; }
.qs5-col-vitality  .qs5-col-hdr { background: rgba(52,211,153,0.08)  !important; border-bottom: 1px solid rgba(52,211,153,0.26)  !important; border-radius: 18px 18px 0 0 !important; }
.qs5-col-catchup   .qs5-col-hdr { background: rgba(251,146,60,0.09)  !important; border-bottom: 1px solid rgba(251,146,60,0.28)  !important; border-radius: 18px 18px 0 0 !important; }
.qs5-col-prep      .qs5-col-hdr { background: rgba(232,121,249,0.08) !important; border-bottom: 1px solid rgba(232,121,249,0.26) !important; border-radius: 18px 18px 0 0 !important; }

/* Icônes header pleine couleur */
.qs5-col-revision  .qs5-col-hdr svg { color: #a78bfa !important; opacity: 0.85 !important; }
.qs5-col-mandatory .qs5-col-hdr svg { color: #22d3ee !important; opacity: 0.85 !important; }
.qs5-col-vitality  .qs5-col-hdr svg { color: #34d399 !important; opacity: 0.85 !important; }
.qs5-col-catchup   .qs5-col-hdr svg { color: #fb923c !important; opacity: 0.85 !important; }
.qs5-col-prep      .qs5-col-hdr svg { color: #e879f9 !important; opacity: 0.85 !important; }

/* Titres : impactants, néon text-shadow, 100% opaque */
.qs5-col-title {
  font-size: 0.53rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
}
.qs5-col-revision  .qs5-col-title { color: #c4b5fd !important; text-shadow: 0 0 14px rgba(167,139,250,0.95), 0 0 5px rgba(167,139,250,0.65) !important; }
.qs5-col-mandatory .qs5-col-title { color: #67e8f9 !important; text-shadow: 0 0 14px rgba(34,211,238,0.95), 0 0 5px rgba(34,211,238,0.65) !important; }
.qs5-col-vitality  .qs5-col-title { color: #6ee7b7 !important; text-shadow: 0 0 14px rgba(52,211,153,0.95), 0 0 5px rgba(52,211,153,0.65) !important; }
.qs5-col-catchup   .qs5-col-title { color: #fdba74 !important; text-shadow: 0 0 14px rgba(251,146,60,0.95), 0 0 5px rgba(251,146,60,0.65) !important; }
.qs5-col-prep      .qs5-col-title { color: #f0abfc !important; text-shadow: 0 0 14px rgba(232,121,249,0.95), 0 0 5px rgba(232,121,249,0.65) !important; }

/* Corps — centré pour vitalité, normal pour les autres */
.qs5-col-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}
.qs5-col-vitality .qs5-col-body {
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Barre de gauche colorée sur les quest-cards (assortie au néon de la colonne) */
.qs5-col-catchup .quest-card { border-left-color: rgba(251,146,60,0.60) !important; }
.qs5-col-prep    .quest-card { border-left-color: rgba(232,121,249,0.58) !important; }

/* Sections catchup — neutralisé, voir bloc CARTES STYLE RÉVISION ci-dessous */


/* ════════════════════════════════════════════════════════════
   QS5 — SPLITTERS · DRAG REORDER · GLASS CARDS
════════════════════════════════════════════════════════════ */

/* ── Splitter de redimensionnement ── */
.qs5-splitter {
  width: 8px; flex-shrink: 0;
  cursor: col-resize;
  position: relative;
  z-index: 5;
  border-radius: 4px;
  transition: background 0.15s;
}
.qs5-splitter::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 2px; height: 36px; border-radius: 2px;
  background: rgba(139,92,246,0.18);
  transition: background 0.15s, height 0.2s, box-shadow 0.15s;
}
.qs5-splitter:hover::after,
.qs5-splitter-active::after {
  background: rgba(139,92,246,0.60) !important;
  height: 56px !important;
  box-shadow: 0 0 8px rgba(139,92,246,0.40);
}

/* ── Drag reorder — handle + états ── */
.qs5-drag-handle {
  font-size: 0.75rem; opacity: 0.28;
  cursor: grab; flex-shrink: 0;
  color: rgba(180,175,240,0.6);
  transition: opacity 0.15s;
  user-select: none;
  margin-right: 2px;
}
.qs5-col-hdr:hover .qs5-drag-handle { opacity: 0.65; }
.qs5-col-dragging {
  opacity: 0.45 !important;
  transform: scale(0.98) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.40) !important;
}
.qs5-col-drop-target {
  outline: 2px dashed rgba(139,92,246,0.55) !important;
  outline-offset: -2px;
}

/* ── CARTES STYLE RÉVISION — Rattrapage & Préparation ── */

/* Padding global du corps */
.qs5-col-catchup .qs5-col-body,
.qs5-col-prep    .qs5-col-body {
  padding: 6px 8px !important;
  gap: 0 !important;
}

/* Sections groupées : même look que rev-subject */
.qs5-col-catchup .catchup-section,
.qs5-col-prep    .catchup-section {
  background: rgba(255,255,255,0.03) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1.5px solid rgba(255,255,255,0.10) !important;
  border-radius: 16px !important;
  margin: 0 0 7px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  gap: 0 !important;
}
.qs5-col-catchup .catchup-section { border-color: rgba(251,146,60,0.28) !important; }
.qs5-col-prep    .catchup-section { border-color: rgba(232,121,249,0.26) !important; }

/* Header de section */
.qs5-col-catchup .catchup-section-label,
.qs5-col-prep    .catchup-section-label {
  background: rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  border-left: none !important;
  padding: 7px 12px !important;
  margin: 0 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.55rem !important; font-weight: 700 !important;
  letter-spacing: 0.12em !important; text-transform: uppercase !important;
}
.qs5-col-catchup .catchup-section-label { color: rgba(251,146,60,0.80) !important; }
.qs5-col-prep    .catchup-section-label { color: rgba(232,121,249,0.80) !important; }

/* Corps de section */
.qs5-col-catchup .cs-body,
.qs5-col-prep    .cs-body {
  padding: 6px 8px !important;
  display: flex; flex-direction: column; gap: 5px !important;
}

/* ── Cards individuelles : même style que rev-subject ── */
.qs5-col-catchup .quest-card,
.qs5-col-prep    .quest-card {
  /* Supprimer tout le style quest-card par défaut */
  background-color: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  /* Style révision */
  border-radius: 14px !important;
  border: 1.5px solid !important;
  padding: 9px 11px !important;
  gap: 9px !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s !important;
}
/* Couleur de fond + bordure assortie au néon de la colonne */
.qs5-col-catchup .quest-card {
  background-color: rgba(251,146,60,0.06) !important;
  border-color: rgba(251,146,60,0.32) !important;
}
.qs5-col-prep .quest-card {
  background-color: rgba(232,121,249,0.06) !important;
  border-color: rgba(232,121,249,0.30) !important;
}
/* Hover */
.qs5-col-catchup .quest-card:hover {
  background-color: rgba(251,146,60,0.12) !important;
  border-color: rgba(251,146,60,0.58) !important;
  box-shadow: 0 0 12px rgba(251,146,60,0.18) !important;
  transform: none !important;
}
.qs5-col-prep .quest-card:hover {
  background-color: rgba(232,121,249,0.10) !important;
  border-color: rgba(232,121,249,0.55) !important;
  box-shadow: 0 0 12px rgba(232,121,249,0.16) !important;
  transform: none !important;
}
/* Dans le panier */
.qs5-col-catchup .quest-card.in-basket,
.qs5-col-prep    .quest-card.in-basket {
  background-color: rgba(74,222,128,0.07) !important;
  border-color: rgba(74,222,128,0.35) !important;
  box-shadow: 0 0 10px rgba(74,222,128,0.12) !important;
}
/* Supprimer le ::before (coins SVG) */
.qs5-col-catchup .quest-card::before,
.qs5-col-prep    .quest-card::before { display: none !important; }

/* Checkbox — style révision */
.qs5-col-catchup .qcard-checkbox {
  width: 20px !important; height: 20px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border-color: rgba(251,146,60,0.50) !important;
}
.qs5-col-prep .qcard-checkbox {
  width: 20px !important; height: 20px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border-color: rgba(232,121,249,0.48) !important;
}
.qs5-col-catchup .qcard-checkbox svg,
.qs5-col-prep    .qcard-checkbox svg { width: 12px !important; height: 12px !important; }

/* Nom — lisible, Inter, compact */
.qs5-col-catchup .qcard-name,
.qs5-col-prep    .qcard-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.73rem !important; font-weight: 600 !important;
  color: rgba(240,237,255,0.95) !important;
  margin-bottom: 2px !important; line-height: 1.35 !important;
  white-space: normal !important;
}
.qs5-col-catchup .qcard-edit-hint,
.qs5-col-prep    .qcard-edit-hint { display: none !important; }

/* Méta (temps, coins, date) */
.qs5-col-catchup .qcard-meta,
.qs5-col-prep    .qcard-meta { gap: 6px !important; }
.qs5-col-catchup .qcard-time,
.qs5-col-catchup .qcard-coins,
.qs5-col-catchup .qcard-date-chip {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important;
  color: rgba(251,146,60,0.65) !important;
}
.qs5-col-prep .qcard-time,
.qs5-col-prep .qcard-coins,
.qs5-col-prep .qcard-date-chip {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important;
  color: rgba(232,121,249,0.65) !important;
}
.qs5-col-catchup .qcard-time-edit,
.qs5-col-prep    .qcard-time-edit { display: none !important; }

/* Wrapper swipe */
.qs5-col-catchup .qswipe-wrap,
.qs5-col-prep    .qswipe-wrap { margin: 0 !important; }

/* Items prep */
.qs5-col-prep .prep-drag-item { background: transparent !important; border: none !important; padding: 0 !important; }
.qs5-col-prep .prep-drag-item > .rev-drag-handle { display: none !important; }
.qs5-col-prep .prep-list { gap: 5px !important; padding: 6px 8px !important; }
.qs5-col-prep .shelf-add-custom-card { display: none !important; }


/* ════════════════════════════════════════════════════════════
   QS5 — TITRES VISIBLES · DOUBLONS SUPPRIMÉS · HEADER FIX
════════════════════════════════════════════════════════════ */

/* ── Supprimer les titres dupliqués dans le corps des colonnes ── */
.qs5-col-body .rayon-title-row,
.qs5-col-body .rayon-header,
.qs5-col-body .rayon-title { display: none !important; }

/* ── Titre principal — blanc, grand, centré ── */
.qs5-title {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.22em !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 32px rgba(255,255,255,0.30), 0 0 60px rgba(139,92,246,0.40) !important;
  white-space: nowrap !important;
  pointer-events: none;
}

/* ── Horloge live dans le header ── */
.qs5-clock-chip {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 10px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #ffffff !important;
  white-space: nowrap !important;
}
.qs5-clock-chip svg { opacity: 0.7; flex-shrink: 0; stroke: #ffffff; }

/* ── Chip date dans le header ── */
.qs5-date-chip {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 10px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 8px !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: #ffffff !important;
  letter-spacing: 0.02em !important;
  white-space: nowrap !important;
}
.qs5-date-chip svg { opacity: 0.7; flex-shrink: 0; stroke: #ffffff; }


/* ── Groupe gauche header ── */
.qs5-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* ── Conteneur latéral undo/redo — absolu à gauche, ne perturbe pas le centrage ── */
.qs5-hist-side {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  position: absolute !important;
  left: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* ── Boutons historique undo/redo — HUD néon ── */
.qs5-hist-btn {
  all: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 28px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;

  background: rgba(139,92,246,0.12) !important;
  border: 1px solid rgba(139,92,246,0.35) !important;
  color: rgba(167,139,250,0.80) !important;
  box-shadow: 0 0 8px rgba(139,92,246,0.15), inset 0 1px 0 rgba(255,255,255,0.08) !important;

  transition: background 0.18s, border-color 0.18s, color 0.18s,
              box-shadow 0.18s, transform 0.12s !important;
}

/* Reflet en haut */
.qs5-hist-btn::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: 15% !important; right: 15% !important; height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(167,139,250,0.40), transparent) !important;
}

.qs5-hist-btn svg {
  flex-shrink: 0 !important;
  transition: filter 0.18s, transform 0.12s !important;
}

/* État ACTIF (pas disabled) — clairement visible et cliquable */
.qs5-hist-btn:not(:disabled) {
  background: rgba(139,92,246,0.20) !important;
  border-color: rgba(167,139,250,0.55) !important;
  color: #c4b5fd !important;
  box-shadow:
    0 0 10px rgba(139,92,246,0.30),
    0 0 20px rgba(139,92,246,0.10),
    inset 0 1px 0 rgba(255,255,255,0.12) !important;
  cursor: pointer !important;
}
.qs5-hist-btn:not(:disabled) svg {
  filter: drop-shadow(0 0 4px rgba(167,139,250,0.75)) !important;
}

.qs5-hist-btn:not(:disabled):hover {
  background: rgba(139,92,246,0.32) !important;
  border-color: rgba(167,139,250,0.85) !important;
  box-shadow:
    0 0 16px rgba(139,92,246,0.55),
    0 0 32px rgba(139,92,246,0.20),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
  transform: translateY(-2px) !important;
}
.qs5-hist-btn:not(:disabled):hover svg {
  filter: drop-shadow(0 0 7px rgba(167,139,250,1.0)) !important;
  transform: scale(1.18) !important;
}
.qs5-hist-btn:not(:disabled):active {
  transform: scale(0.91) !important;
  background: rgba(139,92,246,0.40) !important;
}

/* État INACTIF — fantomatique, clairement non-cliquable */
.qs5-hist-btn:disabled {
  opacity: 0.22 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.5) !important;
}

/* ── Bouton retour — design neon blanc unifié ── */
.qs5-back {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important; height: 38px !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.28) !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  gap: 0 !important;
  padding: 0 !important;
  box-shadow: 0 0 10px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.15) !important;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s !important;
}
.qs5-back:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.55) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(255,255,255,0.28), 0 0 36px rgba(255,255,255,0.10), inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* ── Titres des colonnes — plus grands, plus visibles ── */
.qs5-col-title {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.20em !important;
  text-transform: uppercase !important;
}
.qs5-col-revision  .qs5-col-title { color: #a78bfa !important; text-shadow: 0 0 14px rgba(167,139,250,0.50) !important; }
.qs5-col-mandatory .qs5-col-title { color: #22d3ee !important; text-shadow: 0 0 14px rgba(34,211,238,0.45) !important; }
.qs5-col-vitality  .qs5-col-title { color: #34d399 !important; text-shadow: 0 0 14px rgba(52,211,153,0.45) !important; }
.qs5-col-catchup   .qs5-col-title { color: #c4b5fd !important; text-shadow: 0 0 14px rgba(196,181,253,0.45) !important; }
.qs5-col-prep      .qs5-col-title { color: #f0abfc !important; text-shadow: 0 0 14px rgba(240,171,252,0.45) !important; }

/* Icônes dans les headers — assorties */
.qs5-col-revision  .qs5-col-hdr > svg { color: #a78bfa !important; opacity: 0.90 !important; }
.qs5-col-mandatory .qs5-col-hdr > svg { color: #22d3ee !important; opacity: 0.90 !important; }
.qs5-col-vitality  .qs5-col-hdr > svg { color: #34d399 !important; opacity: 0.90 !important; }
.qs5-col-catchup   .qs5-col-hdr > svg { color: #c4b5fd !important; opacity: 0.90 !important; }
.qs5-col-prep      .qs5-col-hdr > svg { color: #f0abfc !important; opacity: 0.90 !important; }

/* Ligne de séparation sous header — couleur assortie */
.qs5-col-revision  .qs5-col-hdr { border-bottom-color: rgba(167,139,250,0.35) !important; }
.qs5-col-mandatory .qs5-col-hdr { border-bottom-color: rgba(34,211,238,0.30)  !important; }
.qs5-col-vitality  .qs5-col-hdr { border-bottom-color: rgba(52,211,153,0.30)  !important; }
.qs5-col-catchup   .qs5-col-hdr { border-bottom-color: rgba(196,181,253,0.30) !important; }
.qs5-col-prep      .qs5-col-hdr { border-bottom-color: rgba(240,171,252,0.30) !important; }


/* ════════════════════════════════════════════════════════════
   REFONTE PREMIUM — HIÉRARCHIE · LISIBILITÉ · GAMIFICATION
════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────
   1. TYPOGRAPHIE UNIFIÉE — Inter partout sauf labels
────────────────────────────────────────────────────────── */
.qs5-col-body * {
  font-family: 'Inter', sans-serif !important;
}
/* Seulement les labels de catégorie gardent Orbitron */
.qs5-col-title,
.qs5-col-body .catchup-section-label,
.qs5-col-body .qs-day-detail-date { font-family: 'Orbitron', sans-serif !important; }

/* ──────────────────────────────────────────────────────────
   2. RÉVISION — noms complets + hiérarchie claire
────────────────────────────────────────────────────────── */
.qs5-col-revision .rev-container {
  gap: 7px !important;
  padding: 10px 10px 14px !important;
  align-items: stretch !important;
}
/* Carte matière */
.qs5-col-revision .rev-subject {
  width: auto !important; max-width: none !important;
  margin: 0 !important; align-self: stretch !important;
  clip-path: none !important;
  border-radius: 12px !important;
  border-width: 1px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.06) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
.qs5-col-revision .rev-subject:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
/* Header de matière */
.qs5-col-revision .rev-subject-header {
  padding: 10px 12px 9px !important;
  gap: 8px !important;
}
/* Nom COMPLET — plus de troncature */
.qs5-col-revision .rev-subj-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.3 !important;
  color: rgba(228,225,255,0.95) !important;
}
/* Badge chapitres — couleur selon état */
.qs5-col-revision .rev-subj-chap-count {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 2px 7px !important;
  min-width: 36px !important;
  text-align: center !important;
}
/* Barre de progression — proéminente et animée */
.qs5-col-revision .rev-progress-wrap {
  margin: 0 12px 8px !important;
  gap: 6px !important;
  align-items: center !important;
}
.qs5-col-revision .rev-progress-left,
.qs5-col-revision .rev-progress-right {
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  color: rgba(200,195,255,0.70) !important;
  white-space: nowrap !important;
}
.qs5-col-revision .rev-progress-track {
  height: 5px !important;
  border-radius: 3px !important;
  background: rgba(255,255,255,0.08) !important;
  overflow: hidden !important;
}
.qs5-col-revision .rev-progress-fill {
  height: 100% !important;
  border-radius: 3px !important;
  background: linear-gradient(90deg, #7c3aed, #a78bfa) !important;
  box-shadow: 0 0 8px rgba(167,139,250,0.60) !important;
  transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1) !important;
}
/* Chapitres — taille lisible */
.qs5-col-revision .rev-chap-row {
  font-size: 0.73rem !important;
  padding: 5px 10px !important;
}
.qs5-col-revision .rev-chap-name {
  font-size: 0.73rem !important;
  font-weight: 500 !important;
  color: rgba(210,205,255,0.85) !important;
}
.qs5-col-revision .rev-chap-dur {
  font-size: 0.60rem !important;
  font-weight: 600 !important;
}
/* Bouton delete chapitre — caché jusqu'au hover */
.qs5-col-revision .rev-chap-del {
  opacity: 0 !important;
  transition: opacity 0.15s !important;
}
.qs5-col-revision .rev-chap-row:hover .rev-chap-del {
  opacity: 1 !important;
}
/* Menu ··· matière — caché jusqu'au hover */
.qs5-col-revision .rev-subj-menu-btn,
.qs5-col-revision .rev-subject-menu-btn {
  opacity: 0 !important;
  transition: opacity 0.15s !important;
}
.qs5-col-revision .rev-subject-header:hover .rev-subj-menu-btn,
.qs5-col-revision .rev-subject-header:hover .rev-subject-menu-btn {
  opacity: 1 !important;
}
/* Bouton ajouter matière — discret, centré */
.qs5-col-revision .rev-add-subj-wrap {
  padding: 4px 10px 12px !important;
  align-items: stretch !important;
}
.qs5-col-revision .rev-forge-btn {
  width: 100% !important; max-width: none !important;
  clip-path: none !important; border-radius: 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.68rem !important; font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
  padding: 10px 14px !important;
}
.qs5-col-revision .rev-sep-ornament { display: none !important; }

/* ──────────────────────────────────────────────────────────
   3. RÉCOMPENSES VISIBLES — coins, énergie
────────────────────────────────────────────────────────── */
.qs5-col-catchup .qcard-coins,
.qs5-col-prep    .qcard-coins {
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  color: #fbbf24 !important;
  background: rgba(251,191,36,0.12) !important;
  border: 1px solid rgba(251,191,36,0.25) !important;
  border-radius: 5px !important;
  padding: 1px 6px !important;
}

/* ──────────────────────────────────────────────────────────
   4. BOUTON GÉNÉRER — action primaire dominante
────────────────────────────────────────────────────────── */
.qs5-gen-btn {
  max-width: 480px !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

/* ──────────────────────────────────────────────────────────
   5. ACTIONS SECONDAIRES — disparaissent jusqu'au hover
────────────────────────────────────────────────────────── */
.qs5-info-btn {
  opacity: 0 !important;
  transition: opacity 0.15s !important;
}
.qs5-col-hdr:hover .qs5-info-btn {
  opacity: 1 !important;
}
.qs5-drag-handle {
  opacity: 0 !important;
  transition: opacity 0.15s !important;
}
.qs5-col:hover .qs5-drag-handle {
  opacity: 0.45 !important;
}
.qs5-col-hdr:hover .qs5-drag-handle {
  opacity: 0.75 !important;
}

/* ──────────────────────────────────────────────────────────
   6. BARRE DE PROGRESSION GLOBALE — visible et fière
────────────────────────────────────────────────────────── */
.qs5-col-revision .rev-progress-wrap {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 2px 0 !important;
  background: rgba(139,92,246,0.06) !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  border: 1px solid rgba(139,92,246,0.12) !important;
  margin: 0 10px 10px !important;
}

/* ──────────────────────────────────────────────────────────
   7. FOOTER — stats lisibles
────────────────────────────────────────────────────────── */
.qs5-footer-stats {
  font-size: 0.68rem !important;
  font-family: 'Inter', sans-serif !important;
  color: rgba(200,195,255,0.65) !important;
}
#qs-ticket-date {
  font-weight: 600 !important;
  color: rgba(220,215,255,0.80) !important;
}
#qs-mission-totals {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.68rem !important;
}

/* ──────────────────────────────────────────────────────────
   8. VITALITÉ — cartes centrées et lisibles
────────────────────────────────────────────────────────── */
.qs5-col-vitality .qs5-col-body {
  padding: 10px 8px !important;
}
.qs5-col-vitality .vitality-grid {
  gap: 8px !important;
}
.qs5-col-vitality .vitality-card,
.qs5-col-vitality .vit-card {
  border-radius: 12px !important;
  font-family: 'Inter', sans-serif !important;
}

/* ──────────────────────────────────────────────────────────
   9. PLANIFICATION — agenda lisible
────────────────────────────────────────────────────────── */
.qs5-col-mandatory .cal-month-label {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.72rem !important; font-weight: 700 !important;
}
.qs5-col-mandatory .cal-cell {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.70rem !important;
}
.qs5-col-mandatory .btn-add-agenda,
.qs5-col-mandatory .btn-import-ics {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.65rem !important; font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}
.qs5-col-mandatory .cvt-btn {
  font-family: 'Inter', sans-serif !important;
  text-transform: none !important;
  font-size: 0.62rem !important; font-weight: 600 !important;
}


/* ════════════════════════════════════════════════════════════
   QS5 — SPLITTER INTÉGRÉ · ESPACEMENT RÉDUIT · NOMS VISIBLES
════════════════════════════════════════════════════════════ */

/* Espacement entre colonnes */
.qs5-workspace {
  gap: 10px !important;
  padding: 16px !important;
  overflow: visible !important;
}

/* Splitter positionné à l'extrémité droite de la colonne */
.qs5-splitter {
  position: absolute !important;
  top: 0 !important; right: -3px !important;
  width: 6px !important; height: 100% !important;
  cursor: col-resize !important;
  z-index: 10 !important;
  background: transparent !important;
}
.qs5-splitter::after {
  content: '' !important;
  position: absolute !important;
  top: 10% !important; bottom: 10% !important;
  left: 50% !important;
  width: 2px !important;
  transform: translateX(-50%) !important;
  background: rgba(139,92,246,0.22) !important;
  border-radius: 2px !important;
  transition: background 0.15s, box-shadow 0.15s !important;
}
.qs5-splitter:hover::after,
.qs5-splitter-active::after {
  background: rgba(139,92,246,0.70) !important;
  box-shadow: 0 0 8px rgba(139,92,246,0.50) !important;
}

/* Colonnes : pas de gap interne entre elles */
.qs5-col {
  border-right: 1px solid rgba(139,92,246,0.12) !important;
}
.qs5-col:last-child { border-right: none !important; }

/* ── Espacement réduit entre les blocs de révision ── */
.qs5-col-revision .rev-container {
  gap: 5px !important;
  padding: 8px 8px 10px !important;
}

/* ── Noms de matières — toujours visibles, jamais tronqués ── */
.qs5-col-revision .rev-subj-name,
#shop-body-revision .rev-subj-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

/* ── Noms de chapitres — toujours visibles ── */
.qs5-col-revision .rev-chap-name,
#shop-body-revision .rev-chap-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  font-size: 0.71rem !important;
  line-height: 1.3 !important;
}

/* ── Espacement réduit entre chapitres ── */
.qs5-col-revision .rev-chap-row {
  padding: 4px 10px !important;
  gap: 6px !important;
}

/* ── Espacement réduit dans catchup/prep ── */
.qs5-col-catchup .cs-body,
.qs5-col-prep    .cs-body { gap: 3px !important; padding: 4px 6px !important; }
.qs5-col-catchup .catchup-section,
.qs5-col-prep    .catchup-section { margin: 5px 7px 0 !important; }
.qs5-col-catchup .qcard-name,
.qs5-col-prep    .qcard-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
  font-size: 0.71rem !important;
  line-height: 1.3 !important;
}


/* ════════════════════════════════════════════════════════════
   QS5 — AÉRÉ · TITRES CENTRÉS · BLOCS SIMPLES
════════════════════════════════════════════════════════════ */

/* ── Espace au-dessus du titre principal ── */
.qs5-header {
  height: 56px !important;
  padding: 0 24px !important;
}
.qs5-title {
  font-size: 0.80rem !important;
  letter-spacing: 0.28em !important;
}

/* ── En-têtes de colonnes — centrés, lumineux, plus grands ── */
.qs5-col-hdr {
  justify-content: center !important;
  padding: 14px 12px 12px !important;
  gap: 8px !important;
}
.qs5-col-title {
  font-size: 0.60rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.22em !important;
  flex: unset !important;
}
/* Glow renforcé sur chaque titre */
.qs5-col-revision  .qs5-col-title { text-shadow: 0 0 20px rgba(167,139,250,0.80), 0 0 40px rgba(167,139,250,0.35) !important; }
.qs5-col-mandatory .qs5-col-title { text-shadow: 0 0 20px rgba(34,211,238,0.80),  0 0 40px rgba(34,211,238,0.35)  !important; }
.qs5-col-vitality  .qs5-col-title { text-shadow: 0 0 20px rgba(52,211,153,0.80),  0 0 40px rgba(52,211,153,0.35)  !important; }
.qs5-col-catchup   .qs5-col-title { text-shadow: 0 0 20px rgba(196,181,253,0.80), 0 0 40px rgba(196,181,253,0.35) !important; }
.qs5-col-prep      .qs5-col-title { text-shadow: 0 0 20px rgba(240,171,252,0.80), 0 0 40px rgba(240,171,252,0.35) !important; }

/* Icône header — cachée pour garder le titre centré proprement */
.qs5-col-hdr > svg { display: none !important; }

/* ── Espace entre header et contenu ── */
.qs5-col-body {
  padding-top: 10px !important;
}

/* ── Séparateur fin — neutralisé, voir bloc COLONNES CARTES ARRONDIE + NÉON ── */

/* ── Blocs catchup/prep — neutralisé, voir bloc CARTES STYLE RÉVISION ── */

/* Items prep */
.qs5-col-prep .prep-drag-item {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
.qs5-col-prep .prep-list {
  gap: 4px !important;
  padding: 6px 8px !important;
}

/* ── Header de page — fond discret, séparation fine ── */
.qs5-header {
  background: rgba(7,9,28,0.50) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

/* ── Footer — séparation fine ── */
.qs5-footer {
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  background: rgba(7,9,28,0.50) !important;
}

/* ══════════════════════════════════════════════════════════
   GALAXIE RÉVISION — interaction items + J+ éditeur
══════════════════════════════════════════════════════════ */

/* Flash highlight quand on clique sur un item galaxie */
@keyframes agr-highlight-in {
  0%   { background: rgba(167,139,250,0.35); box-shadow: 0 0 0 2px rgba(167,139,250,0.6); }
  60%  { background: rgba(167,139,250,0.20); box-shadow: 0 0 0 2px rgba(167,139,250,0.3); }
  100% { background: transparent; box-shadow: none; }
}
.agr-highlight-flash {
  animation: agr-highlight-in 1.4s ease-out forwards;
  border-radius: 8px;
}

/* J+ badge — état normal */
.agr-interval {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  color: rgba(167,139,250,0.9);
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 5px;
  padding: 2px 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.agr-interval:hover { background: rgba(167,139,250,0.25); color: #fff; }
.agr-interval.editing { opacity: 0.4; pointer-events: none; }

/* Éditeur inline J+ */
.agr-interval-editor {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10,12,40,0.97);
  border: 1px solid rgba(167,139,250,0.45);
  border-radius: 8px;
  padding: 4px 8px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(16px);
}
.agr-ie-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(167,139,250,0.8);
}
.agr-ie-input {
  width: 44px;
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 5px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  padding: 2px 4px;
  outline: none;
}
.agr-ie-input:focus { border-color: rgba(167,139,250,0.7); background: rgba(167,139,250,0.2); }
.agr-ie-ok, .agr-ie-cancel {
  width: 22px; height: 22px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.agr-ie-ok    { background: rgba(52,211,153,0.25); color: #34D399; }
.agr-ie-ok:hover { background: rgba(52,211,153,0.45); }
.agr-ie-cancel { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
.agr-ie-cancel:hover { background: rgba(255,80,80,0.25); color: #F87171; }

/* agr-item doit être position:relative pour l'éditeur absolu */
.agr-item { position: relative; }

/* ══════════════════════════════════════════════════════════
   PLANIFICATION — cacher le hint "Aucun cours ce jour"
══════════════════════════════════════════════════════════ */
.qs5-col-mandatory .agenda-empty-hint {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════
   VITALITÉ — flèche colorée visible sur bulle active
══════════════════════════════════════════════════════════ */
/* Rendre le check overlay plus visible : fond translucide + icône grande */
.vit-planet-check {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.50) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.vit-planet-check svg {
  width: 30px !important;
  height: 30px !important;
  stroke: var(--planet-color) !important;
  filter: drop-shadow(0 0 8px var(--planet-color)) drop-shadow(0 0 3px var(--planet-color)) !important;
}
/* Halo pulsant sur la bulle active */
@keyframes vit-active-pulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -68%) scale(1.3); }
  50%       { opacity: 1.0; transform: translate(-50%, -68%) scale(1.45); }
}
.vit-planet-active .vit-planet-halo {
  animation: vit-active-pulse 2s ease-in-out infinite !important;
}

/* ══════════════════════════════════════════════════════════
   QS5 — EN-TÊTES FLASHY + FOND HEADER = FOND COLONNE
══════════════════════════════════════════════════════════ */

/* Header : même fond que la colonne en dessous (fusion visuelle) */
.qs5-col-revision  .qs5-col-hdr { background: rgba(10,8,30,0.80)   !important; border-radius: 18px 18px 0 0 !important; border-bottom: 1px solid rgba(167,139,250,0.35) !important; }
.qs5-col-mandatory .qs5-col-hdr { background: rgba(4,16,30,0.80)    !important; border-radius: 18px 18px 0 0 !important; border-bottom: 1px solid rgba(34,211,238,0.30)  !important; }
.qs5-col-vitality  .qs5-col-hdr { background: rgba(4,20,16,0.80)    !important; border-radius: 18px 18px 0 0 !important; border-bottom: 1px solid rgba(52,211,153,0.28)  !important; }
.qs5-col-catchup   .qs5-col-hdr { background: rgba(18,12,4,0.80)    !important; border-radius: 18px 18px 0 0 !important; border-bottom: 1px solid rgba(251,146,60,0.30)   !important; }
.qs5-col-prep      .qs5-col-hdr { background: rgba(18,6,24,0.80)    !important; border-radius: 18px 18px 0 0 !important; border-bottom: 1px solid rgba(232,121,249,0.28)  !important; }

/* Titres : blanc pur + néon flashy ultra-lumineux */
.qs5-col-title {
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.20em !important;
  color: #ffffff !important;
}
.qs5-col-revision  .qs5-col-title {
  color: #ffffff !important;
  text-shadow:
    0 0 8px  #a78bfa,
    0 0 18px rgba(167,139,250,1.00),
    0 0 38px rgba(167,139,250,0.70),
    0 0 60px rgba(167,139,250,0.35) !important;
}
.qs5-col-mandatory .qs5-col-title {
  color: #ffffff !important;
  text-shadow:
    0 0 8px  #22d3ee,
    0 0 18px rgba(34,211,238,1.00),
    0 0 38px rgba(34,211,238,0.70),
    0 0 60px rgba(34,211,238,0.35) !important;
}
.qs5-col-vitality  .qs5-col-title {
  color: #ffffff !important;
  text-shadow:
    0 0 8px  #34d399,
    0 0 18px rgba(52,211,153,1.00),
    0 0 38px rgba(52,211,153,0.70),
    0 0 60px rgba(52,211,153,0.35) !important;
}
.qs5-col-catchup   .qs5-col-title {
  color: #ffffff !important;
  text-shadow:
    0 0 8px  #fb923c,
    0 0 18px rgba(251,146,60,1.00),
    0 0 38px rgba(251,146,60,0.70),
    0 0 60px rgba(251,146,60,0.35) !important;
}
.qs5-col-prep      .qs5-col-title {
  color: #ffffff !important;
  text-shadow:
    0 0 8px  #e879f9,
    0 0 18px rgba(232,121,249,1.00),
    0 0 38px rgba(232,121,249,0.70),
    0 0 60px rgba(232,121,249,0.35) !important;
}

/* ══════════════════════════════════════════════════════════
   QS5 — CONTENU ADAPTÉ · NOMS SUR UNE LIGNE · TOUT VISIBLE
══════════════════════════════════════════════════════════ */

/* ── RÉVISION : éléments inutiles supprimés ── */
.qs5-col-revision .rev-drag-handle,
.qs5-col-revision .rev-theme-dot,
.qs5-col-revision .rev-sep-ornament,
.qs5-col-revision .rev-chapters-sep,
.qs5-col-revision hr { display: none !important; }

/* ── RÉVISION : noms de matières en 1 ligne ── */
.qs5-col-revision .rev-subj-name {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 0.70rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

/* Réduire le padding des cartes matière */
.qs5-col-revision .rev-subject-header {
  padding: 8px 10px !important;
  gap: 7px !important;
}

/* Réduire l'espacement entre cartes */
.qs5-col-revision .rev-container {
  gap: 5px !important;
  padding: 6px 8px 8px !important;
}

/* Chapitres plus compacts */
.qs5-col-revision .rev-chap-row {
  padding: 4px 8px !important;
}
.qs5-col-revision .rev-chap-name {
  font-size: 0.68rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.qs5-col-revision .rev-chap-dur {
  font-size: 0.58rem !important;
  flex-shrink: 0 !important;
}

/* Barre de progression compacte */
.qs5-col-revision .rev-progress-wrap {
  margin: 0 8px 6px !important;
  padding: 4px 8px !important;
  font-size: 0.58rem !important;
}
.qs5-col-revision .rev-progress-left,
.qs5-col-revision .rev-progress-right {
  font-size: 0.58rem !important;
}

/* Bouton ajouter matière */
.qs5-col-revision .rev-forge-btn {
  padding: 8px 12px !important;
  font-size: 0.63rem !important;
}

/* ── PLANIFICATION : calendrier compact ── */
.qs5-col-mandatory .qs-agenda-embedded {
  overflow-y: auto !important;
}

/* Grille calendrier plus serrée */
.qs5-col-mandatory .grs-cal-panel,
.qs5-col-mandatory .cal-grid,
.qs5-col-mandatory .cal-table { font-size: 0.62rem !important; }

.qs5-col-mandatory .grs-cal-day {
  min-height: 28px !important;
  padding: 2px 1px !important;
  border-radius: 5px !important;
}
.qs5-col-mandatory .grs-cal-day-num {
  font-size: 0.65rem !important;
  line-height: 1 !important;
}
.qs5-col-mandatory .grs-cal-dow {
  font-size: 0.55rem !important;
  padding: 2px 0 3px !important;
}

/* Navigation mois */
.qs5-col-mandatory .cal-month-nav,
.qs5-col-mandatory .grs-cal-nav {
  padding: 4px 8px !important;
}
.qs5-col-mandatory .cal-month-label,
.qs5-col-mandatory .grs-cal-month-label {
  font-size: 0.65rem !important;
}

/* Boutons + Ajouter / Importer compacts */
.qs5-col-mandatory .agenda-top-actions {
  padding: 4px 8px !important;
  gap: 4px !important;
}
.qs5-col-mandatory .btn-add-agenda,
.qs5-col-mandatory .btn-import-ics {
  font-size: 0.60rem !important;
  padding: 4px 8px !important;
}

/* Items agenda compacts */
.qs5-col-mandatory .agenda-item,
.qs5-col-mandatory .agd-item {
  padding: 5px 8px !important;
  font-size: 0.66rem !important;
}

/* Révisions galaxie */
.qs5-col-mandatory .agr-header {
  font-size: 0.58rem !important;
  padding: 4px 8px 3px !important;
}
.qs5-col-mandatory .agr-item {
  padding: 4px 8px !important;
}
.qs5-col-mandatory .agr-chap {
  font-size: 0.66rem !important;
}
.qs5-col-mandatory .agr-subj {
  font-size: 0.58rem !important;
}

/* Vue Semaine/Jour — onglets */
.qs5-col-mandatory .cvt-btn {
  font-size: 0.58rem !important;
  padding: 3px 7px !important;
}

/* ── VITALITÉ : bulles adaptées ── */
.qs5-col-vitality .vit-planets-grid {
  gap: 6px !important;
  padding: 8px 6px !important;
}
.qs5-col-vitality .vit-planet-orb {
  width: 48px !important;
  height: 48px !important;
}
.qs5-col-vitality .vit-planet-label {
  font-size: 7px !important;
}
.qs5-col-vitality .vit-energy-bar {
  margin: 0 10px 6px !important;
}
.qs5-col-vitality .vit-energy-label {
  font-size: 0.58rem !important;
}

/* ══════════════════════════════════════════════════════════
   RATTRAPAGE — blocs mission compactes
══════════════════════════════════════════════════════════ */
.ctup-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 8px 12px;
}

.ctup-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(251,146,60,0.05);
  border: 1px solid rgba(251,146,60,0.22);
  transition: background 0.18s, border-color 0.18s;
}
.ctup-row:hover {
  background: rgba(251,146,60,0.10);
  border-color: rgba(251,146,60,0.45);
}
.ctup-row:hover .ctup-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
}
.ctup-row.ctup-in-basket {
  background: rgba(74,222,128,0.07);
  border-color: rgba(74,222,128,0.35);
}

/* Checkbox */
.ctup-cb {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--ctup-color, #fb923c);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.ctup-cb svg { width: 12px; height: 12px; stroke: #fff; }
.ctup-in-basket .ctup-cb { border-color: #4ade80; background: #4ade80; }

/* Infos */
.ctup-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ctup-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(240,237,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ctup-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.60rem;
  font-family: 'Inter', sans-serif;
}
.ctup-date { font-weight: 700; }
.ctup-sep  { color: rgba(255,255,255,0.25); }
.ctup-dur  { color: rgba(200,195,255,0.55); }

/* Bouton ignorer */
.ctup-dismiss {
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: none; border: none; cursor: pointer; padding: 0;
  color: rgba(255,255,255,0.20);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s;
  opacity: 0;
}
.ctup-row:hover .ctup-dismiss { opacity: 1; }
.ctup-dismiss:hover { color: rgba(248,113,113,0.80); }
.ctup-dismiss svg { width: 13px; height: 13px; }

/* État vide */
.ctup-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  color: rgba(200,195,255,0.45);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.5;
}
.ctup-empty svg { width: 32px; height: 32px; stroke: var(--ctup-color, #fb923c); opacity: 0.5; }

/* ══════════════════════════════════════════════════════════
   PRÉPARATION — timeline par date
══════════════════════════════════════════════════════════ */
.prep-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 12px;
}

/* Groupe par date */
.prep-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Header date */
.prep-date-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 3px;
  border-bottom: 1px solid rgba(232,121,249,0.15);
  margin-bottom: 2px;
}
.prep-date-lbl {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(240,237,255,0.65);
  text-transform: uppercase;
}
.prep-date-cdown {
  font-family: 'Inter', sans-serif;
  font-size: 0.60rem;
  font-weight: 700;
}

/* Cartes */
.prep-group-cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prep-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(232,121,249,0.05);
  border: 1px solid rgba(232,121,249,0.20);
  transition: background 0.18s, border-color 0.18s;
}
.prep-card:hover {
  background: rgba(232,121,249,0.10);
  border-color: var(--prep-color, rgba(232,121,249,0.50));
}
.prep-card.prep-in-basket {
  background: rgba(74,222,128,0.07);
  border-color: rgba(74,222,128,0.35);
}

/* Icône type */
.prep-card-icon {
  flex-shrink: 0;
  font-size: 1rem;
  width: 26px;
  text-align: center;
  line-height: 1;
}

/* Infos */
.prep-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prep-card-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.71rem;
  font-weight: 600;
  color: rgba(240,237,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prep-card-dur {
  font-family: 'Inter', sans-serif;
  font-size: 0.59rem;
  color: rgba(200,195,255,0.50);
}

/* Checkbox */
.prep-card-cb {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--prep-color, #e879f9);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.prep-card-cb svg { width: 12px; height: 12px; stroke: #fff; }
.prep-in-basket .prep-card-cb { background: #4ade80; border-color: #4ade80; }

/* ══════════════════════════════════════════════════════════
   BOUTON "ON DÉCOLLE" — style pill 3D centré
══════════════════════════════════════════════════════════ */

/* Footer : centrage du bouton */
.qs5-footer {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 0 20px !important;
  height: 62px !important;
  flex-shrink: 0 !important;
}
.qs5-footer-stats {
  order: 2 !important;
  font-size: 0.60rem !important;
  color: rgba(180,175,240,0.45) !important;
}
.qs5-gen-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

/* Bouton pill 3D */
.qs5-gen-btn {
  all: unset !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 0 40px !important;
  height: 46px !important;
  border-radius: 100px !important;
  cursor: pointer !important;

  /* Dégradé violet → rose */
  background: linear-gradient(135deg, #7c3aed 0%, #60a5fa 45%, #ec4899 100%) !important;

  /* Bordure sombre pill (outline) */
  outline: 3px solid rgba(0,0,0,0.55) !important;
  outline-offset: 0px !important;

  /* Effet 3D soulevé : ombre inférieure épaisse + lueur */
  box-shadow:
    0 5px 0 rgba(0,0,0,0.50),
    0 8px 22px rgba(124,58,237,0.55),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;

  /* Texte */
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.80rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.40) !important;

  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
  position: relative !important;
  overflow: hidden !important;
  min-width: 200px !important;
}

/* Brillance subtile qui passe */
.qs5-gen-btn::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: -100% !important;
  width: 55% !important; height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent) !important;
  animation: gen-shine 3s ease-in-out infinite !important;
}
@keyframes gen-shine {
  0%   { left: -100%; }
  50%  { left: 130%; }
  100% { left: 130%; }
}

/* Hover : monte légèrement */
.qs5-gen-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 7px 0 rgba(0,0,0,0.45),
    0 12px 28px rgba(96,165,250,0.65),
    inset 0 1px 0 rgba(255,255,255,0.30) !important;
}

/* Active : s'enfonce */
.qs5-gen-btn:active {
  transform: translateY(4px) !important;
  box-shadow:
    0 3px 0 rgba(0,0,0,0.50),
    0 4px 12px rgba(124,58,237,0.40),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

/* Float + golden breathe sur ON DÉCOLLE */
.qs5-gen-btn {
  animation: decolle-float 3.2s ease-in-out infinite, decolle-gold-breathe 4.5s ease-in-out infinite !important;
}
.qs5-gen-btn:hover,
.qs5-gen-btn:active {
  animation: none !important;
}
/* Bouton figé quand énergie = 0 */
.qs5-gen-btn.decolle-frozen {
  opacity: 0.13 !important;
  filter: grayscale(0.8) blur(1px) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  animation: none !important;
  transition: opacity 0.6s ease, filter 0.6s ease !important;
}
@keyframes decolle-float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-5px); }
}
/* Lueur dorée élégante — douce et lente, sans clignotement */
@keyframes decolle-gold-breathe {
  0%   {
    box-shadow:
      0 5px 0 rgba(0,0,0,0.50),
      0 8px 18px rgba(124,58,237,0.42),
      inset 0 1px 0 rgba(255,255,255,0.22);
  }
  35% {
    box-shadow:
      0 5px 0 rgba(0,0,0,0.50),
      0 9px 26px rgba(245,158,11,0.28),
      0 0  38px rgba(251,191,36,0.13),
      inset 0 1px 0 rgba(255,255,255,0.26);
  }
  65% {
    box-shadow:
      0 5px 0 rgba(0,0,0,0.50),
      0 9px 26px rgba(245,158,11,0.28),
      0 0  38px rgba(251,191,36,0.13),
      inset 0 1px 0 rgba(255,255,255,0.26);
  }
  100% {
    box-shadow:
      0 5px 0 rgba(0,0,0,0.50),
      0 8px 18px rgba(124,58,237,0.42),
      inset 0 1px 0 rgba(255,255,255,0.22);
  }
}

/* ── Particules dorées (spawned by JS) ── */
.decolle-spark {
  position: fixed;
  width: var(--sz, 3px);
  height: var(--sz, 3px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  background: radial-gradient(circle, #fffbe0 0%, #fbbf24 50%, #f59e0b 100%);
  box-shadow: 0 0 4px 1px rgba(251,191,36,0.8);
  animation: decolle-spark-fly 1.4s ease-out forwards;
}
@keyframes decolle-spark-fly {
  0%   { opacity: var(--op, 0.9); transform: translate(0,0) scale(1); }
  40%  { opacity: var(--op, 0.9); }
  100% { opacity: 0; transform: translate(var(--dx,0px), var(--dy,-30px)) scale(0.15); }
}

/* ══════════════════════════════════════════════════════════
   BOUTON CARTE — pill premium homogène avec ON DÉCOLLE
══════════════════════════════════════════════════════════ */
.mcp-trigger-btn {
  all: unset !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 0 24px !important;
  height: 46px !important;
  border-radius: 100px !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;

  /* Dégradé bleu → cyan (complémentaire de violet→rose) */
  background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 50%, #7c3aed 100%) !important;

  /* Bordure sombre pill */
  outline: 3px solid rgba(0,0,0,0.55) !important;
  outline-offset: 0px !important;

  /* Effet 3D soulevé */
  box-shadow:
    0 5px 0 rgba(0,0,0,0.50),
    0 8px 22px rgba(6,182,212,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25) !important;

  /* Texte */
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.18em !important;
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.40) !important;

  position: relative !important;
  overflow: hidden !important;

  /* Float + breathe conservés */
  animation: mcp-float 3s ease-in-out infinite, mcp-carte-breathe 2.8s ease-in-out infinite !important;
  transition: transform 0.12s ease !important;
}

/* Brillance qui passe (même effet que ON DÉCOLLE) */
.mcp-trigger-btn::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important; left: -100% !important;
  width: 55% !important; height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent) !important;
  animation: gen-shine 3.4s ease-in-out infinite !important;
  pointer-events: none !important;
}

.mcp-trigger-btn svg {
  filter: drop-shadow(0 0 6px rgba(6,182,212,0.9)) !important;
  flex-shrink: 0 !important;
  transition: transform 0.18s !important;
}

.mcp-trigger-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    0 10px 0 rgba(0,0,0,0.45),
    0 16px 36px rgba(6,182,212,0.65),
    inset 0 1px 0 rgba(255,255,255,0.30) !important;
  animation: none !important;
}
.mcp-trigger-btn:hover svg { transform: scale(1.15) !important; }

.mcp-trigger-btn:active {
  transform: translateY(4px) !important;
  box-shadow:
    0 3px 0 rgba(0,0,0,0.50),
    0 4px 12px rgba(6,182,212,0.40),
    inset 0 1px 0 rgba(255,255,255,0.18) !important;
}

@keyframes mcp-carte-breathe {
  0%,100% { box-shadow: 0 5px 0 rgba(0,0,0,0.50), 0 8px 16px rgba(6,182,212,0.30), inset 0 1px 0 rgba(255,255,255,0.20); }
  50%      { box-shadow: 0 5px 0 rgba(0,0,0,0.50), 0 8px 32px rgba(6,182,212,0.70), 0 0 48px rgba(29,78,216,0.30), inset 0 1px 0 rgba(255,255,255,0.28); }
}
/* Supprime le holo-border rotatif de l'ancienne version */
.mcp-trigger-btn::before { display: none !important; }

/* Fallback shake si Web Animation API indisponible */
@keyframes carte-impact-shake {
  0%         { transform: translateY(-5px) translateX(0) scale(1); }
  12%        { transform: translateY(-5px) translateX(-7px) scale(1.07); }
  25%        { transform: translateY(-5px) translateX(7px)  scale(1.07); }
  37%        { transform: translateY(-5px) translateX(-5px) scale(1.04); }
  50%        { transform: translateY(-5px) translateX(5px)  scale(1.04); }
  62%        { transform: translateY(-5px) translateX(-3px) scale(1.02); }
  75%        { transform: translateY(-5px) translateX(3px)  scale(1.02); }
  87%        { transform: translateY(-5px) translateX(-1px) scale(1); }
  100%       { transform: translateY(-5px) translateX(0)    scale(1); }
}
.mcp-carte-impact {
  animation: carte-impact-shake 0.52s ease-out !important;
}

/* ══════════════════════════════════════════════════════════
   TITRE PRINCIPAL — plus grand et impactant
══════════════════════════════════════════════════════════ */
.qs5-title {
  font-size: 1.05rem !important;
  letter-spacing: 0.22em !important;
  text-shadow:
    0 0 20px rgba(167,139,250,0.55),
    0 0 40px rgba(167,139,250,0.25) !important;
}

/* ══════════════════════════════════════════════════════════
   WORKSPACE — scroll horizontal, colonnes non-écrasées
══════════════════════════════════════════════════════════ */
.qs5-workspace {
  flex: 1 1 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: calc(100vh - 215px) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 6px 12px !important;
  gap: 7px !important;
  /* Scrollbar fine et discrète */
  scrollbar-width: thin !important;
  scrollbar-color: rgba(139,92,246,0.35) transparent !important;
}
.qs5-workspace::-webkit-scrollbar {
  height: 4px !important;
}
.qs5-workspace::-webkit-scrollbar-track {
  background: transparent !important;
}
.qs5-workspace::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.35) !important;
  border-radius: 2px !important;
}

/* Chaque colonne a une largeur minimale pour ne jamais disparaître */
.qs5-col {
  min-width: 155px !important;
  flex: 1 1 155px !important;
}

/* ══════════════════════════════════════════════════════════
   PRÉPARATION — picker de chapitres
══════════════════════════════════════════════════════════ */

/* Wrapper carte + picker */
.prep-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Bouton livre pour ouvrir le picker */
.prep-chap-toggle {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(200,195,255,0.50);
  font-size: 0.58rem;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  position: relative;
}
.prep-chap-toggle:hover {
  background: rgba(255,255,255,0.09);
  color: rgba(200,195,255,0.85);
  border-color: var(--prep-color, rgba(232,121,249,0.35));
}
.prep-chap-toggle.pct-open {
  background: rgba(232,121,249,0.12);
  color: var(--prep-color, #e879f9);
  border-color: var(--prep-color, rgba(232,121,249,0.50));
}
.prep-chap-toggle.pct-has {
  border-color: var(--prep-color, rgba(232,121,249,0.50));
  color: var(--prep-color, #e879f9);
}

/* Badge nombre de chapitres sélectionnés */
.pct-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--prep-color, #e879f9);
  color: #000;
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1;
}

/* Panneau picker chapitres */
.prep-chap-picker {
  background: rgba(10,8,28,0.85);
  border: 1px solid var(--prep-color, rgba(232,121,249,0.35));
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 8px 10px 10px;
  animation: prep-picker-in 0.18s ease;
}
@keyframes prep-picker-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.prep-chap-picker-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--prep-color, #e879f9);
  text-transform: uppercase;
  margin-bottom: 7px;
  opacity: 0.80;
}
.prep-chap-picker-empty {
  font-family: 'Inter', sans-serif;
  font-size: 0.60rem;
  color: rgba(200,195,255,0.40);
  font-style: italic;
  text-align: center;
  padding: 4px 0;
}
.prep-chap-subj-block {
  margin-bottom: 7px;
}
.prep-chap-subj-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.59rem;
  font-weight: 600;
  color: rgba(200,195,255,0.60);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prep-chap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.prep-chap-item {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(200,195,255,0.65);
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  white-space: nowrap;
  overflow: hidden;
  max-width: 120px;
  text-overflow: ellipsis;
}
.prep-chap-item:hover {
  background: rgba(232,121,249,0.10);
  border-color: var(--prep-color, rgba(232,121,249,0.40));
  color: rgba(240,237,255,0.90);
}
.prep-chap-item.pci-sel {
  background: rgba(232,121,249,0.18);
  border-color: var(--prep-color, #e879f9);
  color: #fff;
  font-weight: 600;
}

/* La carte doit avoir border-radius au bas=0 quand picker ouvert */
.prep-card-wrap:has(.prep-chap-picker) .prep-card {
  border-radius: 10px 10px 0 0;
}

/* ══════════════════════════════════════════════════════════
   RÉVISION — BLOCS PREMIUM v2
   Checkboxes circulaires · bordures accent colorées
   Glass morphism · glow sur sélection
══════════════════════════════════════════════════════════ */

/* ── Conteneur global : gap plus aéré ── */
#shop-body-revision .rev-container {
  gap: 8px !important;
  padding: 8px 10px 14px !important;
}

/* ── Barre de progression globale ── */
#shop-body-revision .rev-progress-wrap {
  margin: 0 0 4px !important;
  padding: 0 0 12px !important;
  gap: 10px !important;
}
#shop-body-revision .rev-progress-track {
  height: 4px !important;
  background: rgba(255,255,255,0.06) !important;
  border-radius: 4px !important;
}
#shop-body-revision .rev-progress-fill {
  background: linear-gradient(90deg, #7c3aed, #c084fc, #e879f9) !important;
  box-shadow: 0 0 8px rgba(167,139,250,0.70), 0 0 18px rgba(167,139,250,0.35) !important;
}

/* ── Carte matière : glass card avec accent gauche ── */
#shop-body-revision .rev-subject {
  border-radius: 14px !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  background: rgba(14,12,36,0.60) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 2px 16px rgba(0,0,0,0.40) !important;
  overflow: hidden !important;
  transition: box-shadow 0.22s, border-color 0.22s !important;
  position: relative !important;
}
/* Accent bar de couleur à gauche */
#shop-body-revision .rev-subject::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important; top: 0 !important; bottom: 0 !important;
  width: 3px !important;
  background: var(--subj-color, #a78bfa) !important;
  box-shadow: 0 0 8px var(--subj-color, #a78bfa) !important;
  border-radius: 2px 0 0 2px !important;
  opacity: 0.75 !important;
  transition: opacity 0.2s !important;
}
#shop-body-revision .rev-subject:hover::before {
  opacity: 1 !important;
}
#shop-body-revision .rev-subject:hover {
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.09),
    0 0 0 1px var(--subj-color, rgba(167,139,250,0.25)),
    0 4px 22px rgba(0,0,0,0.50) !important;
}

/* ── Header matière ── */
#shop-body-revision .rev-subject-header {
  padding: 11px 14px 11px 16px !important;
  gap: 10px !important;
  background: transparent !important;
}

/* ── Checkbox matière — circulaire premium ── */
#shop-body-revision .rev-subj-cb {
  width: 20px !important; height: 20px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,0.20) !important;
  background: rgba(255,255,255,0.04) !important;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s !important;
}
#shop-body-revision .rev-subj-cb.checked {
  background: var(--subj-color, #a78bfa) !important;
  border-color: var(--subj-color, #a78bfa) !important;
  box-shadow: 0 0 8px var(--subj-color, rgba(167,139,250,0.8)), 0 0 18px var(--subj-color, rgba(167,139,250,0.35)) !important;
}
#shop-body-revision .rev-subj-cb.partial {
  border-color: var(--subj-color, #a78bfa) !important;
  background: rgba(167,139,250,0.12) !important;
}
#shop-body-revision .rev-subj-cb svg {
  width: 10px !important; height: 10px !important;
}

/* ── Nom matière ── */
#shop-body-revision .rev-subj-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: rgba(235,232,255,0.92) !important;
}

/* ── Badge compteur chapitres ── */
#shop-body-revision .rev-subj-count {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important;
  font-weight: 700 !important;
  padding: 2px 8px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  letter-spacing: 0.04em !important;
}

/* ── Chevron ── */
#shop-body-revision .rev-subj-chevron svg {
  width: 13px !important; height: 13px !important;
  opacity: 0.45 !important;
}
#shop-body-revision .rev-subj-chevron:hover svg { opacity: 0.85 !important; }

/* ── Zone chapitres : conteneur 100% transparent (pas de cadre/fond enveloppe) ── */
#shop-body-revision .rev-chapters {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 0 8px !important;
}

/* ── Ligne chapitre : glass morphism + accent gauche ── */
#shop-body-revision .rev-chap-row {
  margin: 3px 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,0.13) !important;
  background: rgba(255,255,255,0.07) !important;
  overflow: hidden !important;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s !important;
  position: relative !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35) !important;
}
/* Accent gauche coloré sur chaque chapitre */
#shop-body-revision .rev-chap-row::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important; top: 20% !important; bottom: 20% !important;
  width: 2px !important;
  background: var(--subj-color, #a78bfa) !important;
  border-radius: 1px !important;
  opacity: 0 !important;
  transition: opacity 0.18s !important;
}
#shop-body-revision .rev-chap-row:hover::before { opacity: 0.55 !important; }

#shop-body-revision .rev-chap-row:hover {
  background: rgba(255,255,255,0.055) !important;
  border-color: rgba(255,255,255,0.09) !important;
}

/* Chapitre sélectionné : fond coloré + glow */
#shop-body-revision .rev-chap-row.rev-chap-sel,
#shop-body-revision .rev-chap-row.rev-chap-sel.rev-swipe-content {
  background: rgba(167,139,250,0.10) !important;
  border-color: rgba(167,139,250,0.22) !important;
  box-shadow: 0 0 0 1px rgba(167,139,250,0.10) !important;
}
#shop-body-revision .rev-chap-row.rev-chap-sel::before {
  opacity: 1 !important;
}

/* ── Contenu interne ligne ── */
#shop-body-revision .rev-chap-main {
  padding: 9px 12px 9px 14px !important;
  gap: 9px !important;
}

/* ── Checkbox chapitre — circulaire ── */
#shop-body-revision .rev-chap-cb {
  width: 18px !important; height: 18px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255,255,255,0.15) !important;
  background: rgba(255,255,255,0.03) !important;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s !important;
}
#shop-body-revision .rev-chap-cb.checked {
  background: var(--subj-color, #a78bfa) !important;
  border-color: var(--subj-color, #a78bfa) !important;
  box-shadow: 0 0 6px var(--subj-color, rgba(167,139,250,0.70)) !important;
}
#shop-body-revision .rev-chap-cb svg {
  width: 9px !important; height: 9px !important;
}

/* ── Nom chapitre ── */
#shop-body-revision .rev-chap-name {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.70rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  letter-spacing: 0.01em !important;
}
#shop-body-revision .rev-chap-row.rev-chap-sel .rev-chap-name {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ── Badge durée — glass pill ── */
/* Badge durée masqué — s'affiche uniquement via la zone d'édition dépliable */
#shop-body-revision .rev-chap-dur {
  display: none !important;
}
#shop-body-revision .rev-chap-row.rev-chap-sel .rev-chap-dur {
  border-color: rgba(167,139,250,0.40) !important;
  color: #ffffff !important;
}

/* ── Bouton + Ajouter un chapitre ── */
#shop-body-revision .rev-add-chap-btn {
  margin: 4px 10px 6px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.60rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  opacity: 0.65 !important;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s, opacity 0.18s !important;
}
#shop-body-revision .rev-add-chap-btn:hover {
  opacity: 1 !important;
  transform: translateY(-2px) !important;
}

/* ── Bouton + Ajouter une matière ── */
#shop-body-revision .rev-forge-btn {
  border-radius: 10px !important;
  padding: 12px !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.12em !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 4px 20px rgba(124,58,237,0.40) !important;
}

/* ── Séparateur ornement — masqué ── */
#shop-body-revision .rev-sep-ornament { display: none !important; }
/* ── Drag handle — masqué ── */
#shop-body-revision .rev-drag-handle { display: none !important; }
/* ── Dot couleur — masqué ── */
#shop-body-revision .rev-theme-dot { display: none !important; }

/* ══════════════════════════════════════════════════════════
   RÉVISION — CONTRASTE + CENTRAGE (polish final)
══════════════════════════════════════════════════════════ */

/* ── Barre de progression : centrée horizontalement ── */
#shop-body-revision .rev-progress-wrap {
  margin: 0 12px 6px !important;
  padding: 10px 14px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 10px !important;
  gap: 10px !important;
}
#shop-body-revision .rev-progress-left,
#shop-body-revision .rev-progress-right {
  font-size: 0.60rem !important;
  letter-spacing: 0.05em !important;
  white-space: nowrap !important;
}

/* ── Bouton ajouter matière : centré, padding équilibré ── */
#shop-body-revision .rev-add-subj-wrap {
  position: static !important;
  padding: 0 12px 10px !important;
  background: transparent !important;
  display: flex !important;
  justify-content: center !important;
}
#shop-body-revision .rev-forge-btn {
  width: 100% !important;
  max-width: none !important;
  display: block !important;
  padding: 13px 16px !important;
  font-size: 0.63rem !important;
  letter-spacing: 0.13em !important;
  border-radius: 12px !important;
  text-align: center !important;
}

/* ── Cartes matières : bien détachées du fond ── */
#shop-body-revision .rev-subject {
  /* Fond plus opaque et légèrement plus clair */
  background: rgba(20,16,50,0.82) !important;
  /* Bordure plus visible à l'état repos */
  border: 1px solid rgba(255,255,255,0.13) !important;
  /* Ombre portée plus marquée pour décoller du fond */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 4px 20px rgba(0,0,0,0.55),
    0 1px 4px rgba(0,0,0,0.40) !important;
}
#shop-body-revision .rev-subject:hover {
  border-color: rgba(255,255,255,0.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 0 1px var(--subj-color, rgba(167,139,250,0.35)),
    0 6px 28px rgba(0,0,0,0.60) !important;
}

/* Accent bar encore plus visible */
#shop-body-revision .rev-subject::before {
  opacity: 0.90 !important;
  width: 3px !important;
}

/* ── Lignes chapitres : fond plus détaché ── */
#shop-body-revision .rev-chap-row {
  background: rgba(255,255,255,0.09) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.40) !important;
}
#shop-body-revision .rev-chap-row:hover {
  background: rgba(255,255,255,0.14) !important;
  border-color: rgba(255,255,255,0.22) !important;
}
#shop-body-revision .rev-chap-row.rev-chap-sel,
#shop-body-revision .rev-chap-row.rev-chap-sel.rev-swipe-content {
  background: rgba(167,139,250,0.13) !important;
  border-color: rgba(167,139,250,0.30) !important;
  box-shadow: 0 0 0 1px rgba(167,139,250,0.12), 0 2px 10px rgba(0,0,0,0.35) !important;
}

/* Noms matières — affichage complet sans troncature */
#shop-body-revision .rev-subj-name,
.qs5-col-revision .rev-subj-name,
.qs-col3-left #shop-body-revision .rev-subj-name,
.qs-root .rev-subj-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word !important;
}

/* Tooltip nom complet — toutes les fenêtres, rendu par JS dans <body> */

/* ══════════════════════════════════════════════════════
   BARRE DE CAPACITÉ — entre titre et fenêtres
══════════════════════════════════════════════════════ */
.qs5-capbar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.qs5-capbar-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 9px 20px 13px;
  flex-shrink: 0;
  position: relative;
}
/* ══ BARRE DE CAPACITÉ ══ */
.qs5-capbar-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(680px, 78%);
  background: rgba(12,8,30,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 6px 16px 8px;
  position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.06);
}
.qs5-capbar-inner::before { display: none; }
.qs5-capbar-inner::after  { display: none; }

/* Header */
.qs5-capbar-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qs5-capbar-lbl {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.50rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(200,196,255,0.50);
  text-transform: uppercase;
  transition: color 0.4s, text-shadow 0.4s;
  flex-shrink: 0;
}
.qs5-capbar-lbl svg { transition: stroke 0.4s; }
.qs5-capbar-status { display: none; }
.qs5-capbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  margin-left: 4px;
}
.qs5-capbar-val {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #F59E0B;
  transition: color 0.4s ease, text-shadow 0.4s ease;
  text-shadow: 0 0 14px currentColor, 0 0 28px currentColor;
  line-height: 1;
  flex-shrink: 0;
}

/* Track */
.qs5-capbar-track {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.80);
}
.qs5-capbar-track::before { display: none; }

/* Fill */
.qs5-capbar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 100px;
  overflow: hidden;
  transition: width 0.55s cubic-bezier(0.34, 1.10, 0.64, 1),
              background 0.4s ease,
              box-shadow 0.4s ease;
}
.qs5-capbar-fill::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent);
  border-radius: 100px 100px 0 0;
  z-index: 2;
}
.qs5-capbar-fill::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg);
  animation: capbar-shimmer 2.8s ease-in-out infinite;
  z-index: 3;
}
@keyframes capbar-shimmer {
  0%   { left: -60%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 130%; opacity: 0; }
}
.qs5-capbar-fill.capbar-critical {
  animation: capbar-critical-pulse 1.1s ease-in-out infinite;
}
@keyframes capbar-critical-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.50; }
}

/* Ticks */
.qs5-capbar-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.qs5-capbar-tick {
  position: absolute;
  top: 10%; bottom: 10%;
  width: 1px;
  background: rgba(255,255,255,0.35);
  transform: translateX(-50%);
}

/* Labels sous le track */
.qs5-capbar-tick-labels {
  display: flex;
  justify-content: space-between;
  padding: 2px 0 0;
}
.qs5-capbar-tick-labels span {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.40rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════
   GAUGE ARC — Remplacement barre capacité (270° dashboard)
══════════════════════════════════════════════════════════ */
.qs5-capbar-inner--gauge {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1px !important;
  width: auto !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
/* Meta chips repositionnés bas-gauche du capbar-wrap */
#screen-quest-shop .qs5-capbar-wrap > .qs5-capbar-meta {
  position: absolute !important;
  bottom: 6px !important;
  left: 20px !important;
  flex: none !important;
  margin: 0 !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  max-width: 220px !important;
}
.qs5-gauge-svg {
  width: 260px;
  height: 121px;
  overflow: visible;
  display: block;
}
/* Background track */
.qs5-gauge-track {
  fill: none;
  stroke: url(#qs5-gauge-track-grad);
  stroke-width: 6.5;
  stroke-linecap: round;
}
/* Fill arc */
.qs5-gauge-arc {
  fill: none;
  stroke: #4ade80;
  stroke-width: 6.5;
  stroke-linecap: round;
  transition: stroke 0.4s ease;
}
.qs5-gauge-arc.capbar-critical {
  animation: gauge-critical-pulse 1.1s ease-in-out infinite;
}
@keyframes gauge-critical-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
/* Bezel décoratif externe */
.qs5-gauge-bezel {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 1;
  stroke-linecap: round;
  transition: stroke 0.4s ease;
}
.qs5-gauge-bezel.gauge-critical {
  animation: gauge-bezel-alert 1.1s ease-in-out infinite;
}
@keyframes gauge-bezel-alert {
  0%,100% { stroke: rgba(248,113,113,0.07); }
  50%      { stroke: rgba(248,113,113,0.45); stroke-width: 2; }
}
/* Halo hub */
.qs5-gauge-hub-glow {
  fill: #4ade80;
  opacity: 0;
  filter: blur(5px);
  transition: fill 0.4s ease, opacity 0.4s ease;
}
/* Point braise à l'extrémité de l'arc */
.qs5-gauge-tip {
  fill: #4ade80;
  transition: fill 0.4s ease, opacity 0.4s ease;
}

/* Tick marks */
.qs5-gauge-tick {
  stroke: rgba(255,255,255,0.28);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.qs5-gauge-tick--limit {
  stroke: rgba(255,255,255,0.50);
  stroke-width: 2;
}
/* Needle */
.qs5-gauge-needle-line {
  stroke: rgba(255,255,255,0.92);
  stroke-width: 2;
  stroke-linecap: round;
}
#qs5-gauge-needle {
  transition: transform 0.55s cubic-bezier(0.34,1.10,0.64,1);
}
/* Hub circles */
.qs5-gauge-hub {
  fill: rgba(20,12,45,0.85);
  stroke: rgba(255,255,255,0.22);
  stroke-width: 1;
}
.qs5-gauge-hub-inner {
  fill: rgba(255,255,255,0.80);
}
/* Value text */
.qs5-gauge-val-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 700;
  fill: #4ade80;
  letter-spacing: 0.04em;
  transition: fill 0.4s ease;
}
/* Label text */
.qs5-gauge-lbl-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 5px;
  font-weight: 600;
  fill: rgba(255,255,255,0.40);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   PRÉPARATION — PREMIUM v2
   SVG icons · glass cards · accent border · typo propre
══════════════════════════════════════════════════════════ */

/* Timeline container */
.prep-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 12px;
}

/* ── Groupe par date ── */
.prep-group2 {
  display: flex;
  flex-direction: column;
}

/* ── Header de date ── */
.prep-date-hdr2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  gap: 8px;
}
.prep-date-lbl2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(200,195,255,0.50);
}
.prep-date-cdown2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.60rem;
  font-weight: 600;
  color: var(--prep-color, #e879f9);
  background: color-mix(in srgb, var(--prep-color, #e879f9) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--prep-color, #e879f9) 30%, transparent);
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

/* ── Cartes dans un groupe ── */
.prep-group-cards2 {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 6px;
}

/* ── Carte premium ── */
.prep-card2 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18,14,44,0.72);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
/* Accent bar gauche colorée */
.prep-card2::before {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 2.5px;
  background: var(--prep-color, #e879f9);
  border-radius: 2px;
  box-shadow: 0 0 6px var(--prep-color, #e879f9);
  opacity: 0.70;
  transition: opacity 0.18s;
}
.prep-card2:hover {
  border-color: rgba(255,255,255,0.18);
}
.prep-card2:hover::before { opacity: 1; }

/* Agenda items : légèrement plus transparent */
.prep-card2.prep2-agenda {
  background: rgba(14,10,36,0.55);
  border-color: rgba(255,255,255,0.05);
}

/* Sélectionné (dans le basket) */
.prep-card2.prep2-in-basket {
  background: rgba(var(--prep-color, 232,121,249), 0.06);
  border-color: color-mix(in srgb, var(--prep-color, #e879f9) 30%, transparent);
}
.prep-card2.prep2-in-basket::before { opacity: 1; }

/* ── Icône ── */
.prep2-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
}
.prep2-icon svg {
  width: 15px; height: 15px;
  flex-shrink: 0;
}

/* ── Corps ── */
.prep2-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.prep2-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.70rem;
  font-weight: 600;
  color: rgba(235,232,255,0.90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.prep-card2.prep2-in-basket .prep2-name {
  color: #fff;
}
.prep2-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}
.prep2-type {
  font-family: 'Inter', sans-serif;
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--prep-color, #e879f9);
  opacity: 0.80;
}
.prep2-dot {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(200,195,255,0.30);
  flex-shrink: 0;
}
.prep2-dur {
  font-family: 'Inter', sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  color: rgba(180,175,240,0.55);
  white-space: nowrap;
}

/* ── Actions (boutons droite) ── */
.prep2-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Bouton chapitres */
.prep2-chap-btn {
  all: unset;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: rgba(200,195,255,0.40);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.prep2-chap-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(200,195,255,0.80);
  border-color: var(--prep-color, rgba(232,121,249,0.35));
}
.prep2-chap-btn.pct-open,
.prep2-chap-btn.pct-has {
  color: var(--prep-color, #e879f9);
  border-color: color-mix(in srgb, var(--prep-color, #e879f9) 45%, transparent);
  background: color-mix(in srgb, var(--prep-color, #e879f9) 10%, transparent);
}

/* Checkbox sélection */
.prep2-cb {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s;
  color: #fff;
}
.prep2-cb:hover {
  border-color: var(--prep-color, #e879f9);
  background: color-mix(in srgb, var(--prep-color, #e879f9) 10%, transparent);
}
.prep2-cb.prep2-cb-on {
  background: var(--prep-color, #e879f9);
  border-color: var(--prep-color, #e879f9);
  box-shadow: 0 0 8px color-mix(in srgb, var(--prep-color, #e879f9) 60%, transparent);
}

/* ══════════════════════════════════════════════════════════
   PLANIFICATION — BLOCS PREMIUM v2
   Cartes glass · badges RATTRAPAGE/PRÉPARATION · SVG icons
══════════════════════════════════════════════════════════ */

/* ── Carte principale ── */
/* ── Wrapper bloc PLANIFICATION (nouveau, base ctup-row) ── */
.aei-wrap {
  display: flex;
  flex-direction: column;
  margin: 0 0 5px;
  border-radius: 12px;
  overflow: hidden;
  /* ctup-row inside handles background/border */
}
/* Nom + icône-type sur une ligne */
.aei-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.aei-type-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.aei-type-icon svg { width: 11px; height: 11px; }
/* Chevron dans le ctup-dismiss */
.ctup-dismiss.aei-chev {
  color: rgba(200,195,255,0.30);
  transition: color 0.15s, background 0.15s, transform 0s;
  border-radius: 7px;
  width: 28px;
  height: 28px;
}
.ctup-dismiss.aei-chev:hover { color: rgba(200,195,255,0.75); background: rgba(255,255,255,0.05); }
.ctup-dismiss.aei-chev svg   { transition: transform 0.20s; }
.aei-chev.aei-chev-open svg  { transform: rotate(180deg); }
/* dest-row et expanded attachés directement au wrapper */
.aei-wrap .aei-dest-row { padding: 0 10px 8px; margin-top: -2px; }
.aei-wrap .aei-expanded { background: rgba(255,255,255,0.02); }
.aei-wrap .aei-expand-actions { padding: 7px 10px 9px; border-top: 1px solid rgba(255,255,255,0.06); }

.aei-card {
  position: relative;
  background: rgba(16,12,40,0.78);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  margin: 0 0 6px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 14px rgba(0,0,0,0.40), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.aei-card:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 4px 20px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.07);
}
/* Barre accent gauche */
.aei-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: rgba(127,119,221,0.50);
}
.aei-card.aei-upcoming::before  { background: #22c55e; box-shadow: 0 0 6px #22c55e80; }
.aei-card.aei-overdue::before   { background: #ef4444; box-shadow: 0 0 6px #ef444480; }
.aei-card.aei-selected::before  { background: #a78bfa; box-shadow: 0 0 6px #a78bfa80; }
.aei-card.aei-today::before     { background: #818cf8; box-shadow: 0 0 6px #818cf880; }

/* Teintes de fond par état */
.aei-card.aei-upcoming  { background: rgba(16,32,20,0.78); border-color: rgba(34,197,94,0.18); }
.aei-card.aei-overdue   { background: rgba(28,10,10,0.78); border-color: rgba(239,68,68,0.18); }
.aei-card.aei-selected  { background: rgba(16,10,36,0.78); border-color: rgba(167,139,250,0.22); }

/* ── Ligne principale ── */
.aei-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 10px 14px;
}

/* Icône type */
.aei-icon-wrap {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  color: rgba(200,195,255,0.65);
}
.aei-card.aei-upcoming  .aei-icon-wrap { color: rgba(134,239,172,0.80); background: rgba(34,197,94,0.08); }
.aei-card.aei-overdue   .aei-icon-wrap { color: rgba(252,165,165,0.80); background: rgba(239,68,68,0.08); }
.aei-card.aei-selected  .aei-icon-wrap { color: rgba(196,181,253,0.85); background: rgba(139,92,246,0.10); }
.aei-icon-wrap svg { width: 14px; height: 14px; }

/* Corps texte */
.aei-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}
.aei-name {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(235,232,255,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.aei-card.aei-selected .aei-name { color: #fff; }
.aei-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.aei-type-lbl {
  font-family: 'Inter', sans-serif;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(180,175,240,0.55);
  flex-shrink: 0;
}
.aei-card.aei-upcoming  .aei-type-lbl { color: rgba(134,239,172,0.70); }
.aei-card.aei-overdue   .aei-type-lbl { color: rgba(252,165,165,0.70); }
.aei-card.aei-selected  .aei-type-lbl { color: rgba(196,181,253,0.70); }
.aei-meta-dot {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(200,195,255,0.25);
  flex-shrink: 0;
}
.aei-time {
  font-family: 'Inter', sans-serif;
  font-size: 0.60rem;
  font-weight: 400;
  color: rgba(180,175,240,0.50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aei-card.aei-upcoming .aei-time { color: rgba(134,239,172,0.60); }
.aei-card.aei-overdue  .aei-time { color: rgba(252,165,165,0.60); }

/* Plan-check button */
.aei-plan-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.05);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  padding: 0;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.aei-plan-check:hover { border-color: rgba(139,92,246,0.65); background: rgba(139,92,246,0.12); }
.aei-plan-check.aei-plan-on {
  background: linear-gradient(135deg, #7c3aed, #60a5fa);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(139,92,246,0.55);
}
.aei-plan-check svg { width: 11px; height: 11px; }

/* Chevron button */
.aei-chevron-btn {
  all: unset;
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(200,195,255,0.30);
  transition: color 0.15s, background 0.15s;
}
.aei-chevron-btn:hover { color: rgba(200,195,255,0.70); background: rgba(255,255,255,0.05); }
.aei-chevron-btn.aei-chev-open svg { transform: rotate(180deg); }
.aei-chevron-btn svg { transition: transform 0.20s; }

/* ── Badges destination RATTRAPAGE / PRÉPARATION ── */
.aei-dest-row {
  display: flex;
  gap: 6px;
  padding: 0 12px 10px 14px;
}
.aei-dest-tag {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(200,195,255,0.45);
  transition: background 0.14s, border-color 0.14s, color 0.14s, box-shadow 0.14s;
  user-select: none;
}
.aei-dest-tag:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(220,216,255,0.80);
}
/* RATTRAPAGE — orange */
.aei-dest-catchup.adt-on {
  background: rgba(251,146,60,0.14);
  border-color: rgba(251,146,60,0.45);
  color: #fb923c;
  box-shadow: 0 0 8px rgba(251,146,60,0.20);
}
.aei-dest-catchup:not(.adt-on):hover {
  border-color: rgba(251,146,60,0.30);
  color: rgba(251,146,60,0.75);
}
/* PRÉPARATION — violet/rose */
.aei-dest-prep.adt-on {
  background: rgba(232,121,249,0.14);
  border-color: rgba(232,121,249,0.45);
  color: #e879f9;
  box-shadow: 0 0 8px rgba(232,121,249,0.20);
}
.aei-dest-prep:not(.adt-on):hover {
  border-color: rgba(232,121,249,0.30);
  color: rgba(232,121,249,0.75);
}
/* Coche dans le badge */
.adt-check {
  display: inline-flex;
  align-items: center;
}
.adt-check svg { width: 8px; height: 8px; stroke-width: 3.5; }

/* ── Expanded (modifier/supprimer) ── */
.aei-expanded { overflow: hidden; }
.aei-exp-hidden { display: none; }
.aei-expand-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 8px;
}

/* ── Bouton chapitres dans ctup-row (fenêtre PRÉPARATION) ── */
.ctup-chap-btn {
  all: unset;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
  color: rgba(200,195,255,0.40);
  cursor: pointer;
  position: relative;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
}
.ctup-chap-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(200,195,255,0.80);
}
.ctup-chap-btn.pct-open,
.ctup-chap-btn.pct-has {
  color: var(--prep-color, #e879f9);
  border-color: color-mix(in srgb, var(--prep-color, #e879f9) 45%, transparent);
  background: color-mix(in srgb, var(--prep-color, #e879f9) 10%, transparent);
}

/* Wrapper pour le picker sous le ctup-row */
.prep-row-wrap {
  display: flex;
  flex-direction: column;
}
.prep-row-wrap .prep-chap-picker {
  margin: -2px 10px 4px;
  border-radius: 0 0 10px 10px;
  border-top: none;
}

/* ── Chapitres sélectionnés dans le picker — fond plein coloré ── */
.prep-chap-item.pci-sel {
  background: var(--prep-color, #e879f9) !important;
  border-color: var(--prep-color, #e879f9) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 8px color-mix(in srgb, var(--prep-color, #e879f9) 55%, transparent) !important;
  opacity: 1 !important;
}
.prep-chap-item.pci-sel svg {
  flex-shrink: 0;
  stroke: #fff !important;
}

/* ══════════════════════════════════════════════════════
   MODALE PLANNING DU JOUR — cockpit HUD
══════════════════════════════════════════════════════ */
.aei-detail-overlay {
  position: absolute; inset: 0; z-index: 7500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,1,14,0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.22s ease; pointer-events: none;
}
.aei-detail-overlay.aei-det-visible { opacity: 1; pointer-events: all; }

.aei-detail-modal {
  position: relative;
  width: min(500px, 94vw);
  background: rgba(5,3,22,0.98);
  border: 1px solid rgba(96,165,250,0.40);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow:
    0 0 40px rgba(96,165,250,0.18),
    0 0 80px rgba(96,165,250,0.08),
    0 28px 70px rgba(0,0,0,0.80);
  overflow: hidden;
  animation: aei-det-enter 0.28s cubic-bezier(0.34,1.5,0.64,1) both;
}
@keyframes aei-det-enter {
  from { transform: scale(0.90) translateY(14px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Scanline overlay */
.aei-cpk-scanline {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(96,165,250,0.03) 3px, rgba(96,165,250,0.03) 4px
  );
}
.aei-cpk-scanline::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 40%;
  background: linear-gradient(to bottom, rgba(96,165,250,0.07), transparent);
  animation: aei-cpk-scan 3s linear infinite; top: -40%;
}
@keyframes aei-cpk-scan { from{top:-40%} to{top:140%} }

/* HUD Corner brackets */
.aei-cpk-corner {
  position: absolute; width: 12px; height: 12px;
  border-color: rgba(96,165,250,0.80); border-style: solid; z-index: 3; pointer-events: none;
}
.aei-cpk-tl { top:5px; left:5px;     border-width: 2px 0 0 2px; }
.aei-cpk-tr { top:5px; right:5px;    border-width: 2px 2px 0 0; }
.aei-cpk-bl { bottom:5px; left:5px;  border-width: 0 0 2px 2px; }
.aei-cpk-br { bottom:5px; right:5px; border-width: 0 2px 2px 0; }

/* Header HUD */
.aei-det-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 4px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(96,165,250,0.18);
  background: linear-gradient(to bottom, rgba(96,165,250,0.06) 0%, transparent 100%);
}
.aei-det-header-center {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.aei-det-hud-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(96,165,250,0.55); text-transform: uppercase;
}
.aei-det-date {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em;
  color: rgba(200,220,255,0.92);
  text-shadow: 0 0 12px rgba(96,165,250,0.45);
}
.aei-det-nav-btn {
  all: unset; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px; border: 1px solid rgba(96,165,250,0.20);
  color: rgba(96,165,250,0.60); cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s; flex-shrink: 0;
}
.aei-det-nav-btn:hover:not(:disabled) {
  background: rgba(96,165,250,0.12); border-color: rgba(96,165,250,0.55);
  color: #93c5fd;
}
.aei-det-nav-btn:disabled { opacity: 0.20; cursor: default; }
.aei-det-close {
  all: unset; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04); color: rgba(200,195,255,0.45);
  cursor: pointer; transition: background 0.14s, color 0.14s; flex-shrink: 0;
}
.aei-det-close:hover { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.45); color: #f87171; }

/* Body — scrollable item list */
.aei-det-body {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; overflow-y: auto; max-height: 460px;
}

/* Empty state */
.aei-det-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 40px 20px;
  color: rgba(96,165,250,0.40); letter-spacing: .05em; text-align: center;
  font-family: 'Orbitron', sans-serif; font-size: 0.60rem;
}
.aei-det-add-btn {
  all: unset; cursor: pointer;
  font-family: 'Orbitron', sans-serif; font-size: 0.58rem; letter-spacing: 0.12em;
  padding: 8px 18px; border-radius: 6px;
  border: 1px solid rgba(96,165,250,0.40); color: rgba(96,165,250,0.85);
  background: rgba(96,165,250,0.06);
  transition: background .15s, color .15s, border-color .15s;
}
.aei-det-add-btn:hover {
  background: rgba(96,165,250,0.15); border-color: rgba(96,165,250,0.70); color: #93c5fd;
}

/* Day item card */
.aei-day-item {
  display: flex; flex-direction: column; gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.aei-day-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(96,165,250,0.22); }

/* Top row: accent strip + title + meta */
.aei-day-top {
  display: flex; align-items: stretch; min-width: 0;
}
.aei-day-accent { width: 4px; flex-shrink: 0; }
.aei-day-main {
  flex: 1; padding: 11px 12px 10px; min-width: 0;
}
.aei-day-title {
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 700;
  color: #e2e8f0; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.aei-day-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: rgba(148,163,184,0.75); letter-spacing: .04em;
}
.aei-day-meta-type {
  font-family: 'Orbitron', sans-serif; font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
}
.aei-det-sep { color: rgba(200,195,255,0.25); }

/* Bottom row: action buttons */
.aei-day-btns {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-wrap: wrap;
}
.aei-day-btn {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  font-family: 'Orbitron', sans-serif; font-size: 0.50rem; font-weight: 700; letter-spacing: 0.10em;
  color: rgba(148,163,184,0.60); transition: background .14s, color .14s, border-color .14s;
  white-space: nowrap;
}
.aei-day-btn:hover { background: rgba(255,255,255,0.08); color: #e2e8f0; border-color: rgba(255,255,255,0.18); }
.aei-day-btn svg { flex-shrink: 0; }

/* Active + color states */
.aei-dib-plan   { border-color: rgba(74,222,128,0.18); color: rgba(74,222,128,0.65); }
.aei-dib-plan:hover   { background: rgba(74,222,128,0.10) !important; border-color: rgba(74,222,128,0.50) !important; color: #4ade80 !important; }
.aei-dib-plan.aei-dib-on { background: rgba(74,222,128,0.14); border-color: rgba(74,222,128,0.55); color: #4ade80; }

.aei-dib-catchup { border-color: rgba(251,146,60,0.18); color: rgba(251,146,60,0.65); }
.aei-dib-catchup:hover { background: rgba(251,146,60,0.10) !important; border-color: rgba(251,146,60,0.50) !important; color: #fb923c !important; }
.aei-dib-catchup.aei-dib-on { background: rgba(251,146,60,0.14); border-color: rgba(251,146,60,0.55); color: #fb923c; }

.aei-dib-prep   { border-color: rgba(232,121,249,0.18); color: rgba(232,121,249,0.65); }
.aei-dib-prep:hover { background: rgba(232,121,249,0.10) !important; border-color: rgba(232,121,249,0.50) !important; color: #e879f9 !important; }
.aei-dib-prep.aei-dib-on { background: rgba(232,121,249,0.14); border-color: rgba(232,121,249,0.55); color: #e879f9; }

.aei-dib-edit:hover { background: rgba(96,165,250,0.10) !important; border-color: rgba(96,165,250,0.45) !important; color: #60a5fa !important; }
.aei-dib-del:hover  { background: rgba(248,113,113,0.10) !important; border-color: rgba(248,113,113,0.45) !important; color: #f87171 !important; }

/* ═══════════════════════════════════════════════════════════
   TEXTE COMPLET AU SURVOL — toutes les colonnes du cockpit
═══════════════════════════════════════════════════════════ */

/* Rattrapage */
.ctup-row:hover .ctup-name {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
}

/* Révision (pgr = planning galaxy rows) */
.pgr-row:hover .pgr-chap,
.pgr-row:hover .pgr-subj {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
}

/* Planification / Agenda */
.agr-item:hover .agr-chap,
.agr-item:hover .agr-subj {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
}

/* Préparation */
.prep-chap-item:hover .prep-chap-name,
.prep-row-wrap:hover [class*="-name"],
.prep-row-wrap:hover [class*="-chap"] {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.35 !important;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT FIX DÉFINITIF — espace équilibré entre chaque élément
   Priorité maximale (ID + classe) — écrase tout le reste
═══════════════════════════════════════════════════════════ */
#screen-quest-shop {
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 0 0 14px !important;
}
#screen-quest-shop .qs5-workspace {
  flex: 1 1 0 !important;
  height: 0 !important;
  max-height: none !important;
  min-height: 150px !important;
  overflow: hidden !important;
}
#screen-quest-shop .qs5-footer {
  flex: none !important;
  height: 76px !important;
  border-top: none !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#screen-quest-shop .qs5-gen-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
}
#screen-quest-shop .qs5-gen-btn {
  height: 58px !important;
  font-size: 0.92rem !important;
  min-width: 230px !important;
  padding: 0 44px !important;
}
#screen-quest-shop .mcp-trigger-btn {
  height: 58px !important;
  font-size: 0.82rem !important;
  padding: 0 30px !important;
}
/* Gauge: réduire le padding de la capbar-wrap pour compenser la hauteur du SVG */
#screen-quest-shop .qs5-capbar-wrap {
  padding: 4px 20px 2px !important;
}

/* ══════════════════════════════════════════════════════════
   SPACE COCKPIT SIDEBAR REDESIGN
   Direction artistique: cockpit de vaisseau spatial, univers
   gamifié cosmique, panneaux holographiques neon
══════════════════════════════════════════════════════════ */

/* ── Animations ───────────────────────────────────────── */
@keyframes hudScanLine {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.06; }
  90%  { opacity: 0.06; }
  100% { transform: translateY(200vh); opacity: 0; }
}
@keyframes neonFlicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
  98% { opacity: 0.5; }
  99% { opacity: 1; }
}
@keyframes cyanPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(6,182,212,0.3), inset 0 1px 0 rgba(6,182,212,0.12); }
  50%       { box-shadow: 0 0 22px rgba(6,182,212,0.55), inset 0 1px 0 rgba(6,182,212,0.2); }
}
@keyframes scanDataFlow {
  0%   { background-position: 0 0; }
  100% { background-position: 0 40px; }
}
@keyframes orbitalRing {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Sidebar background: deep space + scanlines ──────── */
#menu-panel {
  background:
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 3px,
      rgba(6,182,212,0.012) 3px,
      rgba(6,182,212,0.012) 4px
    ),
    radial-gradient(ellipse 160% 35% at 50% 0%,   rgba(124,58,237,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 120% 25% at 50% 100%,  rgba(6,182,212,0.10)  0%, transparent 55%),
    radial-gradient(ellipse 80%  50% at 100% 50%,  rgba(217,70,239,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60%  40% at 0% 30%,    rgba(96,165,250,0.05) 0%, transparent 60%),
    linear-gradient(180deg, #050214 0%, #070520 40%, #060418 100%);
}

/* Animated scan sweep */
#menu-panel::after {
  content: '';
  position: absolute; left: 0; right: 0;
  top: 0; height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(6,182,212,0.04) 50%, transparent 100%);
  animation: hudScanLine 12s linear infinite;
  pointer-events: none; z-index: 0;
}

/* Glowing left border: brighter neon cyan-to-purple gradient */
#menu-panel::before {
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(6,182,212,0.6)   12%,
    rgba(139,92,246,0.95) 35%,
    rgba(6,182,212,0.8)   55%,
    rgba(192,38,211,0.85) 75%,
    rgba(139,92,246,0.5)  90%,
    transparent 100%);
  width: 1.5px;
  animation: sidebarPulse 4s ease-in-out infinite;
}

/* ── Topbar: cockpit toolbar ─────────────────────────── */
.mp-topbar {
  background: rgba(6,182,212,0.04);
  border-bottom: 1px solid rgba(6,182,212,0.15) !important;
  position: relative;
}
.mp-theme-pill {
  background: rgba(6,182,212,0.07) !important;
  border: 1px solid rgba(6,182,212,0.22) !important;
  transition: background 0.18s, box-shadow 0.18s !important;
}
.mp-theme-pill:hover {
  background: rgba(6,182,212,0.14) !important;
  box-shadow: 0 0 18px rgba(6,182,212,0.3) !important;
}
.stt-icon { color: rgba(6,182,212,0.85); }

/* ── Hero: pilot profile ─────────────────────────────── */
.mp-hero {
  background:
    radial-gradient(ellipse 130% 120% at 0% 50%, rgba(6,182,212,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 0% 50%, rgba(124,58,237,0.12) 0%, transparent 65%),
    linear-gradient(135deg, rgba(6,182,212,0.05) 0%, rgba(124,58,237,0.04) 100%) !important;
  border-bottom: 1px solid rgba(6,182,212,0.12) !important;
  padding: 24px 18px 16px !important;
}

/* Avatar: orbital ring decoration */
.menu-avatar-mini-wrap {
  position: relative;
}
.menu-avatar-mini-wrap::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: rgba(6,182,212,0.7);
  border-right-color: rgba(139,92,246,0.4);
  animation: orbitalRing 8s linear infinite;
  pointer-events: none;
}
.menu-avatar-mini-wrap::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  border-radius: 50%;
  border: 1px solid transparent;
  border-bottom-color: rgba(192,38,211,0.5);
  border-left-color: rgba(6,182,212,0.3);
  animation: orbitalRing 5s linear infinite reverse;
  pointer-events: none;
}

/* Player name in Orbitron — cockpit pilot ID */
.menu-player-name {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: #e0f2fe !important;
  text-shadow: 0 0 14px rgba(6,182,212,0.55), 0 0 30px rgba(6,182,212,0.2) !important;
  animation: neonFlicker 8s ease-in-out infinite;
}
.menu-player-sub {
  font-size: 0.63rem !important;
  color: rgba(6,182,212,0.7) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* ── XP bar: energy fuel gauge ───────────────────────── */
.mp-hero-extra {
  background: rgba(0,0,0,0.18) !important;
  border-bottom: 1px solid rgba(6,182,212,0.08) !important;
}
.mp-level-chip {
  font-family: 'Orbitron', sans-serif !important;
  background: rgba(6,182,212,0.10) !important;
  border: 1px solid rgba(6,182,212,0.35) !important;
  color: #67e8f9 !important;
  letter-spacing: 0.12em !important;
}
.mp-xp-bar-bg {
  height: 7px !important;
  background: rgba(6,182,212,0.08) !important;
  border: 1px solid rgba(6,182,212,0.15) !important;
  border-radius: 3px !important;
  overflow: hidden;
}
.mp-xp-fill {
  background: linear-gradient(90deg,
    rgba(124,58,237,0.9) 0%,
    rgba(96,165,250,0.95) 45%,
    rgba(6,182,212,1) 75%,
    rgba(103,232,249,0.9) 100%) !important;
  box-shadow: 0 0 12px rgba(6,182,212,0.7), 0 0 24px rgba(6,182,212,0.3) !important;
  border-radius: 2px !important;
}
.mp-xp-text { color: rgba(6,182,212,0.65) !important; }
.mp-currency-pill {
  background: rgba(6,182,212,0.05) !important;
  border: 1px solid rgba(6,182,212,0.15) !important;
  color: #fbbf24 !important;
}
.mp-currency-pill:hover {
  background: rgba(6,182,212,0.12) !important;
  border-color: rgba(6,182,212,0.3) !important;
  box-shadow: 0 0 10px rgba(6,182,212,0.2) !important;
}

/* ── Section labels: HUD system tags ─────────────────── */
.mp-section-label {
  color: rgba(6,182,212,0.7) !important;
  letter-spacing: 0.22em !important;
  font-size: 0.56rem !important;
  padding: 12px 16px 5px !important;
}
.mp-section-label::before {
  background: #06b6d4 !important;
  box-shadow: 0 0 8px rgba(6,182,212,0.9), 0 0 16px rgba(6,182,212,0.4) !important;
}
.mp-section-label::after {
  content: '';
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  width: 20%; height: 1px;
  background: linear-gradient(90deg, rgba(6,182,212,0.3) 0%, transparent 100%);
}

/* ── Clock card: mission computer display ────────────── */
.mp-clock-card {
  margin: 12px 14px 10px !important;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 5px,
      rgba(6,182,212,0.015) 5px, rgba(6,182,212,0.015) 6px
    ),
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(6,182,212,0.08) 0%, transparent 60%),
    linear-gradient(135deg, rgba(4,10,26,0.97) 0%, rgba(6,14,36,0.97) 100%) !important;
  border: 1px solid rgba(6,182,212,0.35) !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 0 1px rgba(6,182,212,0.08),
    0 8px 32px rgba(0,0,0,0.5),
    0 0 24px rgba(6,182,212,0.08),
    inset 0 1px 0 rgba(6,182,212,0.1) !important;
  animation: cyanPulse 5s ease-in-out infinite;
  position: relative;
  overflow: hidden !important;
}

/* HUD corner brackets */
.mp-clock-card::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border-top: 1px solid rgba(6,182,212,0.18);
  border-left: 1px solid rgba(6,182,212,0.18);
  border-right: 1px solid rgba(6,182,212,0.18);
  border-bottom: 1px solid rgba(6,182,212,0.18);
  border-radius: 10px;
  pointer-events: none;
  clip-path: polygon(
    0% 0%, 18px 0%,
    18px 2px, 2px 2px,
    2px 18px, 0% 18px,
    0% 100%, 0% 100%,
    0% calc(100% - 18px), 2px calc(100% - 18px),
    2px calc(100% - 2px), 18px calc(100% - 2px),
    18px 100%, calc(100% - 18px) 100%,
    calc(100% - 18px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 2px) calc(100% - 18px), 100% calc(100% - 18px),
    100% 0%, calc(100% - 18px) 0%,
    calc(100% - 18px) 2px, calc(100% - 2px) 2px,
    calc(100% - 2px) 18px, 100% 18px
  );
  opacity: 0.6;
}

.menu-clock {
  font-size: 2.4rem !important;
  letter-spacing: 0.14em !important;
  text-shadow:
    0 0 15px rgba(6,182,212,0.9),
    0 0 35px rgba(6,182,212,0.5),
    0 0 70px rgba(6,182,212,0.2) !important;
  color: #e0f9ff !important;
  animation: neonFlicker 12s ease-in-out infinite;
}
.menu-date {
  color: rgba(6,182,212,0.65) !important;
  letter-spacing: 0.14em !important;
  font-size: 0.6rem !important;
}
.menu-castle-msg {
  color: rgba(167,139,250,0.85) !important;
  font-style: italic;
  font-size: 0.68rem !important;
}

/* Divider: neon cyan separator */
.mp-nav-divider {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(6,182,212,0.35) 20%,
    rgba(139,92,246,0.25) 60%,
    rgba(6,182,212,0.2) 85%,
    transparent 100%) !important;
  height: 1px !important;
}

/* ── Secondary nav items: holographic panels ─────────── */
.menu-nav-item {
  border: 1px solid transparent !important;
  transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s !important;
}
.menu-nav-item:hover {
  background: rgba(6,182,212,0.06) !important;
  border-color: rgba(6,182,212,0.18) !important;
  box-shadow: 0 0 14px rgba(6,182,212,0.10), inset 0 1px 0 rgba(6,182,212,0.08) !important;
  color: #e0f9ff !important;
}
.menu-nav-item:hover .mni-icon-wrap {
  background: rgba(6,182,212,0.14) !important;
  border-color: rgba(6,182,212,0.36) !important;
  box-shadow: 0 0 10px rgba(6,182,212,0.3) !important;
}
.menu-nav-item::after {
  background: linear-gradient(180deg, #67e8f9 0%, #06b6d4 100%) !important;
}
.menu-nav-item.active {
  background: linear-gradient(135deg, rgba(6,182,212,0.10) 0%, rgba(124,58,237,0.06) 100%) !important;
  border-color: rgba(6,182,212,0.25) !important;
  box-shadow: 0 0 18px rgba(6,182,212,0.12), inset 0 1px 0 rgba(6,182,212,0.12) !important;
  color: #a5f3fc !important;
}
.menu-nav-item.active .mni-icon-wrap {
  background: rgba(6,182,212,0.2) !important;
  border-color: rgba(6,182,212,0.5) !important;
  box-shadow: 0 0 14px rgba(6,182,212,0.45) !important;
}

/* Galaxy nav: keep its special purple accent */
.menu-nav-galaxy .mni-icon-wrap {
  background: rgba(167,139,250,0.12) !important;
  border-color: rgba(167,139,250,0.25) !important;
}
.menu-nav-galaxy .mni-label { color: inherit !important; }
.menu-nav-galaxy:hover .mni-icon-wrap {
  background: rgba(167,139,250,0.22) !important;
  border-color: rgba(167,139,250,0.5) !important;
  box-shadow: 0 0 12px rgba(167,139,250,0.4) !important;
}

/* Icon wraps default: subtle neon tint */
.mni-icon-wrap {
  background: rgba(6,182,212,0.05) !important;
  border: 1px solid rgba(6,182,212,0.12) !important;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s !important;
}

/* ── Footer: red alert ejection button ───────────────── */
.menu-footer {
  border-top: 1px solid rgba(6,182,212,0.12) !important;
}
.mp-logout-btn {
  background: rgba(239,68,68,0.06) !important;
  border: 1px solid rgba(239,68,68,0.2) !important;
  border-radius: 10px !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s !important;
}
.mp-logout-btn:hover {
  background: rgba(239,68,68,0.14) !important;
  border-color: rgba(239,68,68,0.5) !important;
  box-shadow: 0 0 20px rgba(239,68,68,0.2), inset 0 1px 0 rgba(239,68,68,0.1) !important;
  color: #fca5a5 !important;
}

/* ── Sidebar toggle: cockpit handle ──────────────────── */
.sidebar-toggle-btn {
  background: linear-gradient(180deg,
    rgba(6,182,212,0.15) 0%,
    rgba(6,182,212,0.3)  50%,
    rgba(6,182,212,0.15) 100%) !important;
  border: 1px solid rgba(6,182,212,0.5) !important;
  border-right: none !important;
  color: #67e8f9 !important;
  box-shadow: -6px 0 20px rgba(6,182,212,0.35) !important;
}
.sidebar-toggle-btn:hover {
  background: linear-gradient(180deg,
    rgba(6,182,212,0.3) 0%,
    rgba(6,182,212,0.55) 50%,
    rgba(6,182,212,0.3) 100%) !important;
  color: #fff !important;
  box-shadow: -8px 0 32px rgba(6,182,212,0.6) !important;
  animation: none !important;
}
.sidebar-toggle-btn.sb-collapsed {
  border-left: 1px solid rgba(6,182,212,0.5) !important;
  border-right: none !important;
}

/* ══════════════════════════════════════════════════════════
   SPACE COCKPIT v2 — ULTRA PREMIUM UPGRADE
   Etoiles, hologrammes, glassmorphisme neon
══════════════════════════════════════════════════════════ */

/* ── REMOVE DAY/NIGHT TOGGLE ─────────────────────────── */
#menu-panel .mp-theme-pill { display: none !important; }
#menu-panel .mp-topbar {
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  border-bottom: none !important;
}

/* ── STARFIELD on sidebar background ────────────────────
   CSS box-shadow stars on a pseudo — 60 étoiles réparties
─────────────────────────────────────────────────────── */
@keyframes starTwinkle {
  0%, 100% { opacity: 0.15; }
  50%       { opacity: 0.75; }
}
@keyframes starTwinkle2 {
  0%, 100% { opacity: 0.5; }
  40%       { opacity: 0.1; }
  70%       { opacity: 0.9; }
}
@keyframes starTwinkle3 {
  0%, 100% { opacity: 0.3; }
  30%       { opacity: 0.8; }
  60%       { opacity: 0.15; }
}

/* Star layer 1: bright tiny stars */
#menu-panel > *:first-child::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; z-index: -1;
}

/* Use the #menu-panel background to embed star-dots inline */
#menu-panel {
  background:
    /* ── STAR DOTS (radial 1px) ── */
    radial-gradient(circle 1px at  8% 4%,  rgba(255,255,255,0.90) 0%, transparent 100%),
    radial-gradient(circle 1px at 21% 9%,  rgba(6,182,212,0.80)   0%, transparent 100%),
    radial-gradient(circle 1px at 35% 3%,  rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 54% 7%,  rgba(255,255,255,0.85) 0%, transparent 100%),
    radial-gradient(circle 1px at 67% 2%,  rgba(167,139,250,0.80) 0%, transparent 100%),
    radial-gradient(circle 1px at 82% 5%,  rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at 91% 11%, rgba(6,182,212,0.75)   0%, transparent 100%),
    radial-gradient(circle 1px at 12% 17%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 44% 15%, rgba(255,255,255,0.80) 0%, transparent 100%),
    radial-gradient(circle 1px at 73% 18%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(circle 2px at 29% 22%, rgba(6,182,212,0.55)   0%, transparent 100%),
    radial-gradient(circle 1px at 58% 24%, rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 88% 20%, rgba(167,139,250,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at  5% 28%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(circle 1px at 38% 31%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(circle 1px at 63% 35%, rgba(6,182,212,0.50)   0%, transparent 100%),
    radial-gradient(circle 1px at 79% 29%, rgba(255,255,255,0.80) 0%, transparent 100%),
    radial-gradient(circle 2px at 17% 38%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(circle 1px at 48% 41%, rgba(167,139,250,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 92% 44%, rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at 26% 48%, rgba(6,182,212,0.45)   0%, transparent 100%),
    radial-gradient(circle 1px at 71% 52%, rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at  9% 55%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(circle 2px at 42% 58%, rgba(6,182,212,0.65)   0%, transparent 100%),
    radial-gradient(circle 1px at 85% 61%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 31% 65%, rgba(167,139,250,0.55) 0%, transparent 100%),
    radial-gradient(circle 1px at 57% 68%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(circle 1px at 76% 72%, rgba(255,255,255,0.40) 0%, transparent 100%),
    radial-gradient(circle 1px at 14% 74%, rgba(6,182,212,0.60)   0%, transparent 100%),
    radial-gradient(circle 1px at 50% 78%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(circle 2px at 89% 75%, rgba(167,139,250,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 22% 82%, rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 65% 85%, rgba(6,182,212,0.45)   0%, transparent 100%),
    radial-gradient(circle 1px at  4% 88%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(circle 1px at 40% 91%, rgba(167,139,250,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at 78% 94%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 95% 88%, rgba(6,182,212,0.55)   0%, transparent 100%),
    /* ── NEBULA GLOW LAYERS ── */
    radial-gradient(ellipse 160% 35% at 50% 0%,   rgba(124,58,237,0.28) 0%, transparent 55%),
    radial-gradient(ellipse 100% 30% at 50% 100%,  rgba(6,182,212,0.14)  0%, transparent 55%),
    radial-gradient(ellipse 80%  50% at 100% 50%,  rgba(217,70,239,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 70%  40% at 0% 40%,    rgba(96,165,250,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 120% 20% at 30% 60%,   rgba(124,58,237,0.06) 0%, transparent 60%),
    /* ── SCANLINES ── */
    repeating-linear-gradient(
      180deg,
      transparent 0px, transparent 3px,
      rgba(6,182,212,0.013) 3px, rgba(6,182,212,0.013) 4px
    ),
    /* ── BASE ── */
    linear-gradient(180deg, #040112 0%, #060420 40%, #050318 100%) !important;
}

/* ── HERO: ultra premium cockpit pilot ───────────────── */
.mp-hero {
  padding: 22px 18px 18px !important;
  background:
    radial-gradient(ellipse 150% 120% at 0% 50%, rgba(6,182,212,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 10% 50%, rgba(124,58,237,0.14) 0%, transparent 65%),
    linear-gradient(135deg, rgba(6,182,212,0.06) 0%, rgba(124,58,237,0.04) 100%) !important;
  border-bottom: 1px solid rgba(6,182,212,0.14) !important;
  position: relative;
}

/* Horizontal scan line crossing the hero */
.mp-hero::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(6,182,212,0.03) 48%,
    rgba(6,182,212,0.06) 50%,
    rgba(6,182,212,0.03) 52%,
    transparent 100%
  );
  pointer-events: none;
}

/* Remove old ::after glow (replaced) */
.mp-hero::after { display: none; }

/* Orbital rings: thicker, more visible */
.menu-avatar-mini-wrap::before {
  top: -8px; left: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  border: 2px solid transparent;
  border-top-color: rgba(6,182,212,0.85);
  border-right-color: rgba(6,182,212,0.3);
  box-shadow: 0 0 8px rgba(6,182,212,0.4);
  animation: orbitalRing 6s linear infinite;
}
.menu-avatar-mini-wrap::after {
  top: -4px; left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border: 1.5px solid transparent;
  border-bottom-color: rgba(192,38,211,0.75);
  border-left-color: rgba(192,38,211,0.35);
  box-shadow: 0 0 6px rgba(192,38,211,0.35);
  animation: orbitalRing 4s linear infinite reverse;
}

/* Player name: holographic neon title */
.menu-player-name {
  font-size: 0.86rem !important;
  letter-spacing: 0.08em !important;
  background: linear-gradient(135deg, #e0f9ff 0%, #67e8f9 50%, #a78bfa 100%);
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
  animation: none !important;
}

/* Sub: status line with blinking dot */
.menu-player-sub {
  position: relative;
  padding-left: 14px !important;
}
.menu-player-sub::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80, 0 0 12px rgba(74,222,128,0.5);
  animation: neonFlicker 3s ease-in-out infinite;
}

/* ── XP bar: full energy gauge upgrade ───────────────── */
.mp-xp-bar-bg {
  height: 8px !important;
  border-radius: 4px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(6,182,212,0.18) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4) !important;
}
.mp-xp-fill {
  border-radius: 3px !important;
  background: linear-gradient(90deg,
    #7c3aed 0%, #6366f1 30%, #38bdf8 65%, #06b6d4 85%, #67e8f9 100%) !important;
  box-shadow:
    0 0 10px rgba(6,182,212,0.8),
    0 0 22px rgba(6,182,212,0.4),
    0 0 40px rgba(6,182,212,0.15) !important;
}
/* Shimmer override: brighter */
.mp-xp-fill::after {
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%) !important;
  background-size: 80px 100% !important;
}

/* ── Clock card: full HUD mission display ────────────── */
.mp-clock-card {
  border: 1px solid rgba(6,182,212,0.4) !important;
  border-radius: 16px !important;
  background:
    radial-gradient(ellipse 200% 60% at 50% 0%,   rgba(6,182,212,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 120% 80% at 100% 100%, rgba(124,58,237,0.08) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 4px,
      rgba(6,182,212,0.014) 4px, rgba(6,182,212,0.014) 5px
    ),
    linear-gradient(160deg, rgba(2,6,23,0.98) 0%, rgba(4,10,30,0.98) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(6,182,212,0.10),
    0 12px 40px rgba(0,0,0,0.6),
    0 0 30px rgba(6,182,212,0.10),
    inset 0 1px 0 rgba(6,182,212,0.15),
    inset 0 -1px 0 rgba(6,182,212,0.05) !important;
  animation: cyanPulse 4s ease-in-out infinite;
}

.menu-clock {
  font-size: 2.6rem !important;
  letter-spacing: 0.18em !important;
  background: linear-gradient(180deg, #ffffff 0%, #a5f3fc 50%, #67e8f9 100%);
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 14px rgba(6,182,212,0.8)) drop-shadow(0 0 30px rgba(6,182,212,0.35));
  animation: neonFlicker 15s ease-in-out infinite;
}

.menu-date {
  font-size: 0.58rem !important;
  letter-spacing: 0.18em !important;
  color: rgba(6,182,212,0.6) !important;
  text-transform: uppercase !important;
}

.menu-castle-msg {
  margin-top: 2px;
  padding: 6px 10px;
  background: rgba(6,182,212,0.05);
  border: 1px solid rgba(6,182,212,0.12);
  border-radius: 8px;
  font-size: 0.66rem !important;
  color: rgba(167,139,250,0.9) !important;
  line-height: 1.5;
}

/* ── Primary nav: holographic cockpit buttons ────────── */
.mp-primary-item {
  height: 46px !important;
  border-radius: 12px !important;
  background: rgba(6,182,212,0.03) !important;
  border: 1px solid rgba(6,182,212,0.08) !important;
  margin-bottom: 2px;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.86rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  transition: all 0.2s ease !important;
}
.mp-primary-item:hover {
  background: linear-gradient(135deg,
    rgba(6,182,212,0.10) 0%,
    rgba(6,182,212,0.04) 100%) !important;
  border-color: rgba(6,182,212,0.35) !important;
  box-shadow:
    0 0 20px rgba(6,182,212,0.15),
    inset 0 1px 0 rgba(6,182,212,0.12),
    inset 0 0 20px rgba(6,182,212,0.04) !important;
  color: #e0f9ff !important;
  transform: translateX(-2px);
}
.mp-primary-item.active {
  background: linear-gradient(135deg,
    rgba(6,182,212,0.14) 0%,
    rgba(124,58,237,0.10) 100%) !important;
  border-color: rgba(6,182,212,0.4) !important;
  box-shadow:
    0 0 24px rgba(6,182,212,0.18),
    inset 0 1px 0 rgba(6,182,212,0.18),
    inset 0 0 24px rgba(6,182,212,0.06) !important;
  color: #a5f3fc !important;
}

/* ── Secondary nav: panels ───────────────────────────── */
.menu-nav-item {
  height: 42px !important;
  border-radius: 11px !important;
  background: rgba(6,182,212,0.02) !important;
  border: 1px solid rgba(6,182,212,0.06) !important;
  margin-bottom: 2px !important;
  transition: all 0.18s ease !important;
}
.menu-nav-item:hover {
  background: linear-gradient(135deg,
    rgba(6,182,212,0.08) 0%,
    rgba(6,182,212,0.03) 100%) !important;
  border-color: rgba(6,182,212,0.28) !important;
  box-shadow:
    0 0 16px rgba(6,182,212,0.12),
    inset 0 1px 0 rgba(6,182,212,0.10) !important;
  color: #e0f9ff !important;
  transform: translateX(-2px) !important;
}
.menu-nav-item.active {
  background: linear-gradient(135deg,
    rgba(6,182,212,0.12) 0%,
    rgba(124,58,237,0.07) 100%) !important;
  border-color: rgba(6,182,212,0.32) !important;
  box-shadow:
    0 0 20px rgba(6,182,212,0.14),
    inset 0 1px 0 rgba(6,182,212,0.14) !important;
  color: #a5f3fc !important;
}

/* Icon wraps: neon glow per item type */
.mp-primary-item .mni-icon-wrap,
.menu-nav-item .mni-icon-wrap {
  background: rgba(6,182,212,0.08) !important;
  border: 1px solid rgba(6,182,212,0.18) !important;
  transition: all 0.18s ease !important;
}
.mp-primary-item:hover .mni-icon-wrap,
.menu-nav-item:hover .mni-icon-wrap {
  background: rgba(6,182,212,0.18) !important;
  border-color: rgba(6,182,212,0.5) !important;
  box-shadow: 0 0 14px rgba(6,182,212,0.45), inset 0 0 8px rgba(6,182,212,0.15) !important;
}
.mp-primary-item.active .mni-icon-wrap,
.menu-nav-item.active .mni-icon-wrap {
  background: rgba(6,182,212,0.22) !important;
  border-color: rgba(6,182,212,0.6) !important;
  box-shadow: 0 0 18px rgba(6,182,212,0.55), inset 0 0 10px rgba(6,182,212,0.18) !important;
}

/* Section labels: more techy */
.mp-section-label {
  font-size: 0.54rem !important;
  letter-spacing: 0.28em !important;
  color: rgba(6,182,212,0.55) !important;
  padding: 14px 16px 4px !important;
}

/* Footer: isolation zone */
.menu-footer {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(239,68,68,0.12) !important;
  padding: 12px 14px 22px !important;
}
.mp-logout-btn {
  background: rgba(239,68,68,0.05) !important;
  border: 1px solid rgba(239,68,68,0.18) !important;
  border-radius: 10px !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.16em !important;
  position: relative;
  overflow: hidden;
}
.mp-logout-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    transparent 0%,
    rgba(239,68,68,0.03) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.mp-logout-btn:hover::before { opacity: 1; }
.mp-logout-btn:hover {
  background: rgba(239,68,68,0.12) !important;
  border-color: rgba(239,68,68,0.55) !important;
  box-shadow:
    0 0 24px rgba(239,68,68,0.2),
    0 0 50px rgba(239,68,68,0.08),
    inset 0 1px 0 rgba(239,68,68,0.12) !important;
  color: #fca5a5 !important;
  transform: none;
}

/* ══════════════════════════════════════════════════════════
   PREP GROUP SEPARATORS — holographic time-horizon labels
══════════════════════════════════════════════════════════ */
.prep-group-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px 4px;
}
.prep-group-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--sep-color, #a78bfa) 50%,
    transparent 100%
  );
  opacity: 0.35;
}
.prep-group-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sep-color, #a78bfa);
  text-shadow: 0 0 10px var(--sep-glow, rgba(167,139,250,0.5)),
               0 0 20px var(--sep-glow, rgba(167,139,250,0.25));
  white-space: nowrap;
  padding: 2px 4px;
  border: 1px solid rgba(255,255,255,0.06);
  border-left-color: var(--sep-color);
  border-right-color: var(--sep-color);
  border-top-color: rgba(255,255,255,0.04);
  border-bottom-color: rgba(255,255,255,0.04);
  border-radius: 4px;
  background: rgba(0,0,0,0.25);
}
/* Premier séparateur : pas de padding-top (déjà géré par la liste) */
.ctup-list > .prep-group-sep:first-child {
  padding-top: 2px;
}

/* ── Séparateur navigation mensuelle ─────────────────── */
.prep-month-label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  padding: 2px 6px !important;
  white-space: nowrap;
}
.prep-month-arrow {
  all: unset;
  cursor: pointer;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font-size: 0.9rem; font-weight: 700; line-height: 1;
  color: var(--sep-color, #e879f9);
  border: 1px solid var(--sep-color, rgba(232,121,249,0.4));
  background: rgba(0,0,0,0.3);
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  flex-shrink: 0;
}
.prep-month-arrow:not(.disabled):hover {
  background: rgba(232,121,249,0.15);
  box-shadow: 0 0 10px rgba(232,121,249,0.4);
}
.prep-month-arrow.disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

/* ── Séparateur de date dans le mois ─────────────────── */
.prep-date-sep {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 2px;
}
.prep-date-sep-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(232,121,249,0.22) 50%,
    transparent 100%
  );
}
.prep-date-sep-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232,121,249,0.55);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS — STAR BURST + CARD PARTICLES
══════════════════════════════════════════════════════════ */
@keyframes starBurstFly {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
  60%  { opacity: 0.8; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}
.starburst-p { position: fixed; pointer-events: none; z-index: 99999; }

@keyframes gcfloat {
  0%   { transform: translateY(0)   scale(0.8); opacity: 0;   }
  15%  { opacity: 0.85; }
  80%  { opacity: 0.4; }
  100% { transform: translateY(-110px) scale(1.1); opacity: 0; }
}
.gcc-float-p { position: absolute; pointer-events: none; z-index: 0; }
.gcc-card-particles {
  position: absolute; inset: 0; overflow: hidden;
  border-radius: inherit; pointer-events: none; z-index: 0;
}

.gcc-animated-card { position: relative; overflow: hidden; }

/* Bordure neon tournante */
.gcc-animated-card::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(217,70,239,0.8) 60deg,
    rgba(6,182,212,0.9) 120deg,
    rgba(139,92,246,0.8) 180deg,
    transparent 240deg,
    transparent 360deg
  );
  animation: rotateBorder 3s linear infinite;
  z-index: -1;
  pointer-events: none;
}
.gcc-animated-card::after {
  content: '';
  position: absolute; inset: 1px;
  border-radius: calc(24px - 1px);
  background: linear-gradient(145deg, rgba(30,16,60,0.97), rgba(20,10,45,0.98));
  z-index: -1;
  pointer-events: none;
}
@keyframes rotateBorder {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Icône pulsante */
@keyframes iconPulseAnim {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 16px rgba(217,70,239,0.3); }
  50%       { transform: scale(1.09); box-shadow: 0 0 30px rgba(217,70,239,0.75), 0 0 55px rgba(6,182,212,0.3); }
}
.gcc-icon-pulse { animation: iconPulseAnim 2.2s ease-in-out infinite; }

/* Entrées décalées */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gcc-anim-title    { animation: fadeSlideIn 0.4s ease 0.15s both; }
.gcc-anim-msg      { animation: fadeSlideIn 0.4s ease 0.28s both; }
.gcc-anim-progress { animation: fadeSlideIn 0.4s ease 0.38s both; }
.gcc-anim-cats     { animation: fadeSlideIn 0.4s ease 0.45s both; }
.gcc-anim-actions  { animation: fadeSlideIn 0.4s ease 0.55s both; }

/* Shimmer continu sur les boutons */
@keyframes btnShimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.gcc-sparkle-btn { position: relative; overflow: hidden; }
.gcc-sparkle-btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: btnShimmer 2.4s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}

/* ═══════════════════════════════════════════════════════════
   PROGRESSION V2 — direction artistique MELEAIR
═══════════════════════════════════════════════════════════ */

.prog2-wrap {
  display: flex; flex-direction: column; gap: 28px;
  padding: 20px 80px 80px;
}

/* ── Titre de section ── */
.prog2-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.prog2-section-title::before,
.prog2-section-title::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127,119,221,0.2), transparent);
}

/* ── Panel glassmorphism MELEAIR ── */
.prog2-panel {
  position: relative;
  background: linear-gradient(145deg, rgba(38,24,80,0.92) 0%, rgba(28,18,60,0.95) 100%);
  border: 1px solid rgba(167,139,250,0.28);
  border-radius: 18px;
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(167,139,250,0.10),
    0 0 40px rgba(127,119,221,0.20),
    0 8px 40px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.10);
  overflow: hidden;
}
.prog2-panel::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 45% at 50% 0%, rgba(167,139,250,0.12), transparent 60%);
  pointer-events: none; border-radius: inherit;
}

/* ── Calendrier ── */
.prog2-cal-nav {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.prog2-cal-title {
  font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.95);
}
.prog2-nav-btn {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(127,119,221,0.08);
  border: 1px solid rgba(127,119,221,0.2);
  color: rgba(167,139,250,0.7); cursor: pointer;
  display: grid; place-items: center; font-size: 18px; font-family: inherit;
  transition: all .18s ease; letter-spacing: 0;
}
.prog2-nav-btn:hover {
  background: rgba(127,119,221,0.18);
  border-color: rgba(127,119,221,0.5);
  color: #A89FF0;
  box-shadow: 0 0 12px rgba(127,119,221,0.3);
}
.prog2-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 6px;
}
.prog2-weekdays div {
  font-family: 'Orbitron', sans-serif; font-size: 8px; font-weight: 700;
  color: rgba(255,255,255,0.18); text-align: center; padding: 6px 0;
  letter-spacing: 0.1em;
}
.prog2-days-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.prog2-day {
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s ease;
  background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.18);
  border: 1px solid transparent; font-family: 'Inter', sans-serif; padding: 0; gap: 1px;
}
.prog2-day.empty { opacity: 0; pointer-events: none; }
.prog2-day.lvl1 { background: rgba(127,119,221,0.12); border-color: rgba(127,119,221,0.25); color: rgba(255,255,255,0.6); }
.prog2-day.lvl2 { background: rgba(127,119,221,0.28); border-color: rgba(127,119,221,0.45); color: white; }
.prog2-day.lvl3 {
  background: linear-gradient(135deg, rgba(127,119,221,0.5), rgba(168,143,240,0.35));
  border-color: #A89FF0; color: white;
  box-shadow: 0 0 14px rgba(127,119,221,0.45);
}
.prog2-day.today {
  background: linear-gradient(135deg, rgba(127,119,221,0.22), rgba(167,139,250,0.12));
  border-color: rgba(167,139,250,0.6);
  color: white;
  box-shadow: 0 0 14px rgba(127,119,221,0.5), inset 0 1px 0 rgba(255,255,255,0.12);
}
.prog2-day.selected { transform: scale(1.08); box-shadow: 0 0 18px rgba(127,119,221,0.6); z-index: 2; }
.prog2-day-num { font-size: 11px; font-weight: 500; }
.prog2-day-dur { font-size: 7px; color: rgba(255,255,255,0.5); font-family: 'Orbitron', sans-serif; letter-spacing: 0; }

.prog2-day-detail {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 250ms ease, margin-top 250ms ease, opacity 250ms ease;
}
.prog2-day-detail.open {
  max-height: 400px; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(127,119,221,0.15); opacity: 1;
}
.prog2-detail-title {
  font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 700;
  color: rgba(255,255,255,0.92); margin-bottom: 14px; letter-spacing: 0.01em;
}
.prog2-session-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-bottom: 8px;
  background: rgba(127,119,221,0.07);
  border: 1px solid rgba(127,119,221,0.18);
  border-radius: 14px; border-left-width: 4px;
  transition: background .15s ease;
}
.prog2-session-row:hover { background: rgba(127,119,221,0.14); }
.prog2-session-body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.prog2-session-mat {
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.95);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prog2-session-chap {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 400;
  color: rgba(196,181,253,0.70);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prog2-session-dur {
  font-family: 'Orbitron', sans-serif;
  font-size: 14px; font-weight: 700;
  white-space: nowrap; margin-left: auto; letter-spacing: 0.02em;
}
.prog2-day-total {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.45);
  text-align: right; margin-top: 12px; letter-spacing: 0.04em;
}
.prog2-empty-day {
  font-family: 'Inter', sans-serif;
  font-size: 14px; color: rgba(255,255,255,0.3);
  text-align: center; padding: 24px; font-style: italic;
}

/* ── Radar ── */
.prog2-radar-center { display: flex; flex-direction: column; align-items: center; }
.prog2-radar-svg { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
#p2-radar-mat { max-width: 660px; }
.prog2-radar-summary {
  font-size: 11px; color: rgba(167,139,250,0.5); text-align: center;
  font-family: 'Orbitron', sans-serif; font-size: 9px; letter-spacing: 0.1em;
  margin-top: 14px; text-transform: uppercase;
}

/* ── Par matière — grille ── */
.prog2-matieres-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px;
}
.prog2-mat-card {
  position: relative;
  background: var(--card-bg, rgba(17,14,42,0.8));
  border: 1px solid rgba(127,119,221,0.15);
  border-radius: 16px; padding: 16px;
  border-top: 2px solid var(--mc, #7F77DD);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.prog2-mat-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% -20%, rgba(127,119,221,0.05), transparent 60%);
  pointer-events: none;
}
.prog2-mat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(127,119,221,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(127,119,221,0.15);
}
.prog2-mat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.prog2-mat-name {
  font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
  color: white; text-transform: uppercase; letter-spacing: 0.05em;
  flex: 1; word-break: break-word; line-height: 1.35;
}
.prog2-mat-count {
  font-family: 'Orbitron', sans-serif; font-size: 10px; font-weight: 700;
  white-space: nowrap; letter-spacing: 0;
}
.prog2-prog-track { height: 2px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.prog2-prog-fill { height: 100%; width: 0; border-radius: 2px; transition: width .9s cubic-bezier(.25,.1,.25,1); }
.prog2-mini-radar { display: block; margin: 4px auto; width: 90px; height: 90px; }
.prog2-mat-footer { display: flex; flex-direction: column; gap: 3px; }
.prog2-mat-info { font-size: 10px; color: rgba(255,255,255,0.25); }
.prog2-mat-status {
  font-size: 10px; font-weight: 600; margin-top: 6px; padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.06); letter-spacing: 0.04em;
  font-family: 'Orbitron', sans-serif;
}

/* ── Bar chart ── */
.prog2-period-bar {
  display: flex; align-items: center; gap: 3px; padding: 3px;
  background: rgba(127,119,221,0.05);
  border: 1px solid rgba(127,119,221,0.15);
  border-radius: 12px; width: fit-content; margin-bottom: 18px;
}
.prog2-period-pill {
  padding: 7px 16px; border-radius: 9px;
  background: transparent; border: none;
  color: rgba(255,255,255,0.75); font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  cursor: pointer; transition: all .2s ease; text-transform: uppercase;
}
.prog2-period-pill:hover:not(.active) { color: rgba(255,255,255,0.95); }
.prog2-period-pill.active {
  background: linear-gradient(135deg, #534AB7, #8B5CF6);
  color: white;
  box-shadow: 0 3px 14px rgba(127,119,221,0.4), 0 0 0 1px rgba(167,139,250,0.3);
}
.prog2-bar-chart { width: 100%; height: 260px; display: block; }
.prog2-chart-summary {
  font-size: 13px; color: rgba(255,255,255,0.88);
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(127,119,221,0.2);
  font-family: 'Inter', sans-serif; letter-spacing: 0;
}
.prog2-chart-summary span {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 4px;
  border-right: 1px solid rgba(127,119,221,0.15);
}
.prog2-chart-summary span:last-child { border-right: none; }
.prog2-chart-summary strong { color: rgba(167,139,250,0.9); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Historique 2-col layout ── */
.prog2-histo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.prog2-section-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.prog2-radar-arrow {
  flex-shrink: 0;
  width: 48px; height: 80px;
  display: grid; place-items: center;
  background: none; border: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
  filter: drop-shadow(0 0 8px rgba(124,58,237,0.8)) drop-shadow(0 0 18px rgba(96,165,250,0.5));
}
.prog2-radar-arrow svg { width: 32px; height: 56px; overflow: visible; }
.prog2-radar-arrow:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 14px rgba(124,58,237,1)) drop-shadow(0 0 30px rgba(236,72,153,0.7));
}
.prog2-radar-arrow:active { transform: scale(0.9); }
.prog2-radar-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 980px;
}
.prog2-radar-panel {
  flex: 1;
  min-width: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(127,119,221,0.07), transparent 65%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(96,165,250,0.05), transparent 60%),
    rgba(10, 8, 30, 0.92);
}
.prog2-radar-mat-title {
  font-family: 'Orbitron', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; text-align: center;
  background: linear-gradient(135deg, #fff 20%, #a78bfa 60%, #f472b6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(167,139,250,0.6));
  margin-bottom: 8px; padding: 4px 0;
}
.prog2-histo-cal { padding: 20px; }
.prog2-histo-detail {
  padding: 20px;
  min-height: 420px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(127,119,221,0.3) transparent;
}
.prog2-right-date-label {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; color: rgba(167,139,250,0.75);
  text-transform: uppercase; margin: 16px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(127,119,221,0.18);
}
.prog2-right-date-label:first-of-type { margin-top: 0; }
.prog2-right-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 200px;
  font-family: 'Syne', sans-serif; font-size: 12px;
  color: rgba(255,255,255,0.25); text-align: center; gap: 8px;
}
.prog2-right-empty-icon { font-size: 28px; opacity: .3; }

/* ── Calendar in histo layout ── */
.prog2-histo-cal .prog2-cal-title { font-size: 16px; }
.prog2-histo-cal .prog2-weekdays div { font-size: 10px; padding: 8px 0; }
.prog2-histo-cal .prog2-days-grid { gap: 6px; }
.prog2-histo-cal .prog2-day { border-radius: 10px; }
.prog2-histo-cal .prog2-day-num { font-size: 13px; }
.prog2-histo-cal .prog2-day-dur { font-size: 8px; }

/* ── Radar tabs ── */
.prog2-radar-tabs {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.prog2-radar-tab {
  all: unset;
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 10px 16px; height: 38px; box-sizing: border-box;
  border-radius: 100px;
  font-family: 'Orbitron', sans-serif; font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; position: relative; overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(127,119,221,0.2);
  color: rgba(255,255,255,0.35);
  transition: all .2s ease;
}
.prog2-radar-tab:hover:not(.active) {
  color: rgba(255,255,255,0.6);
  border-color: rgba(127,119,221,0.4);
  background: rgba(127,119,221,0.08);
}
.prog2-radar-tab.active {
  background:
    repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%)
      0 0 / 16px 16px,
    linear-gradient(135deg, #7c3aed 0%, #4f46e5 35%, #60a5fa 70%, #ec4899 100%);
  background-size: 16px 16px, 200% 100%;
  border: none;
  outline: 1.5px solid rgba(255,255,255,0.15);
  outline-offset: 2px;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255,255,255,0.5);
  box-shadow:
    0 4px 0 rgba(0,0,0,0.4),
    0 8px 24px rgba(124,58,237,0.55),
    0 0 40px rgba(96,165,250,0.2),
    inset 0 1px 0 rgba(255,255,255,0.25);
  animation: prog2-tab-bg-shift 4s linear infinite;
}
.prog2-radar-tab.active::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: gen-shine 2.5s ease-in-out infinite;
}
@keyframes prog2-tab-bg-shift {
  0%   { background-position: 0 0, 0% 0%; }
  50%  { background-position: 0 0, 100% 0%; }
  100% { background-position: 0 0, 0% 0%; }
}
.prog2-radar-mat-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}

/* ── Tooltip ── */
.prog2-tooltip {
  position: fixed;
  background: rgba(17,14,42,0.95);
  border: 1px solid rgba(127,119,221,0.4);
  border-radius: 10px; padding: 6px 12px;
  font-family: 'Orbitron', sans-serif; font-size: 9px; letter-spacing: 0.06em;
  color: white; pointer-events: none; opacity: 0;
  transition: opacity .1s ease; z-index: 9999; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 12px rgba(127,119,221,0.2);
  text-transform: uppercase;
}
.prog2-tooltip.show { opacity: 1; }

/* ── Empty state ── */
.prog2-empty-panel {
  padding: 40px 20px; text-align: center;
  color: rgba(167,139,250,0.35); font-size: 11px; font-style: italic;
  font-family: 'Orbitron', sans-serif; letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR REFONTE — esprit multicolor, sans bleu dominant
══════════════════════════════════════════════════════════ */

/* 1. Supprimer les anneaux orbitaux autour de l'avatar */
.menu-avatar-mini-wrap::before,
.menu-avatar-mini-wrap::after {
  display: none !important;
  animation: none !important;
}

/* 2. Fond sidebar — violet profond, sans cyan */
#menu-panel {
  background:
    radial-gradient(circle 1px at  8% 4%,  rgba(255,255,255,0.90) 0%, transparent 100%),
    radial-gradient(circle 1px at 21% 9%,  rgba(167,139,250,0.80) 0%, transparent 100%),
    radial-gradient(circle 1px at 35% 3%,  rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 54% 7%,  rgba(255,255,255,0.85) 0%, transparent 100%),
    radial-gradient(circle 1px at 67% 2%,  rgba(251,191,36,0.60)  0%, transparent 100%),
    radial-gradient(circle 1px at 82% 5%,  rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at 12% 17%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 44% 15%, rgba(255,255,255,0.80) 0%, transparent 100%),
    radial-gradient(circle 1px at 73% 18%, rgba(236,72,153,0.50)  0%, transparent 100%),
    radial-gradient(circle 2px at 29% 22%, rgba(139,92,246,0.55)  0%, transparent 100%),
    radial-gradient(circle 1px at 58% 24%, rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 88% 20%, rgba(167,139,250,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at 38% 31%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(circle 1px at 79% 29%, rgba(255,255,255,0.80) 0%, transparent 100%),
    radial-gradient(circle 2px at 17% 38%, rgba(255,255,255,0.55) 0%, transparent 100%),
    radial-gradient(circle 1px at 48% 41%, rgba(251,191,36,0.50)  0%, transparent 100%),
    radial-gradient(circle 1px at 92% 44%, rgba(255,255,255,0.60) 0%, transparent 100%),
    radial-gradient(circle 1px at 71% 52%, rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 2px at 42% 58%, rgba(139,92,246,0.55)  0%, transparent 100%),
    radial-gradient(circle 1px at 85% 61%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 31% 65%, rgba(236,72,153,0.45)  0%, transparent 100%),
    radial-gradient(circle 1px at 57% 68%, rgba(255,255,255,0.75) 0%, transparent 100%),
    radial-gradient(circle 1px at 50% 78%, rgba(255,255,255,0.65) 0%, transparent 100%),
    radial-gradient(circle 2px at 89% 75%, rgba(167,139,250,0.50) 0%, transparent 100%),
    radial-gradient(circle 1px at 22% 82%, rgba(255,255,255,0.70) 0%, transparent 100%),
    radial-gradient(circle 1px at 40% 91%, rgba(251,191,36,0.45)  0%, transparent 100%),
    radial-gradient(circle 1px at 78% 94%, rgba(255,255,255,0.50) 0%, transparent 100%),
    radial-gradient(ellipse 160% 35% at 50% 0%,   rgba(124,58,237,0.30)  0%, transparent 55%),
    radial-gradient(ellipse 100% 30% at 50% 100%,  rgba(217,70,239,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80%  50% at 100% 50%,  rgba(251,191,36,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 70%  40% at 0% 40%,    rgba(139,92,246,0.09) 0%, transparent 60%),
    linear-gradient(180deg, #040112 0%, #070320 40%, #060218 100%) !important;
}

/* Scan sweep — violet */
#menu-panel::after {
  background: linear-gradient(180deg, transparent 0%, rgba(139,92,246,0.03) 50%, transparent 100%) !important;
}

/* Bordure gauche — supprimée */
#menu-panel::before {
  display: none !important;
}

/* 3. Hero section — moins de cyan */
.mp-hero {
  background:
    radial-gradient(ellipse 140% 120% at 0% 50%, rgba(139,92,246,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 10% 50%, rgba(217,70,239,0.08) 0%, transparent 65%),
    linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(251,191,36,0.03) 100%) !important;
  border-bottom: 1px solid rgba(139,92,246,0.15) !important;
}
.mp-hero::before { display: none !important; }

/* Nom du joueur — blanc chaud + or + violet */
.menu-player-name {
  background: linear-gradient(135deg, #ffffff 0%, #fde68a 45%, #c4b5fd 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: none !important;
}
.menu-player-sub {
  color: rgba(196,181,253,0.65) !important;
}

/* 4. XP — violet */
.mp-hero-extra {
  border-bottom: 1px solid rgba(139,92,246,0.10) !important;
}
.mp-level-chip {
  background: rgba(139,92,246,0.12) !important;
  border: 1px solid rgba(139,92,246,0.35) !important;
  color: #c4b5fd !important;
}
.mp-xp-bar-bg {
  border: 1px solid rgba(139,92,246,0.18) !important;
}
.mp-xp-fill {
  background: linear-gradient(90deg,
    #8b5cf6 0%, #ec4899 40%, #f59e0b 70%, #fbbf24 100%) !important;
  box-shadow: 0 0 10px rgba(139,92,246,0.5), 0 0 22px rgba(236,72,153,0.2) !important;
}
.mp-xp-text { color: rgba(196,181,253,0.55) !important; }
.mp-currency-pill {
  background: rgba(139,92,246,0.06) !important;
  border: 1px solid rgba(139,92,246,0.18) !important;
}
.mp-currency-pill:hover {
  background: rgba(139,92,246,0.14) !important;
  border-color: rgba(139,92,246,0.35) !important;
  box-shadow: 0 0 10px rgba(139,92,246,0.2) !important;
}

/* 5. Horloge — transparent, police iOS premium */
.mp-clock-card {
  margin: 12px 14px 10px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  animation: none !important;
  position: relative;
  text-align: center;
  padding: 4px 0 !important;
}
.mp-clock-card::before { display: none !important; }
.menu-clock {
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif !important;
  font-size: 3rem !important;
  font-weight: 200 !important;
  letter-spacing: 0.04em !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: rgba(255,255,255,0.96) !important;
  filter: none !important;
  text-shadow: none !important;
  animation: none !important;
  line-height: 1 !important;
}
.menu-date {
  color: rgba(196,181,253,0.60) !important;
  letter-spacing: 0.18em !important;
  font-size: 0.58rem !important;
  margin-top: 4px !important;
}
.menu-castle-msg { display: none !important; }

/* 6. Section label — violet */
.mp-section-label {
  color: rgba(196,181,253,0.60) !important;
}
.mp-section-label::before {
  background: #a78bfa !important;
  box-shadow: 0 0 8px rgba(167,139,250,0.7), 0 0 16px rgba(167,139,250,0.3) !important;
}
.mp-section-label::after {
  background: linear-gradient(90deg, rgba(167,139,250,0.3) 0%, transparent 100%) !important;
}

/* 7. Nav items — violet au hover */
.menu-nav-item {
  background: rgba(139,92,246,0.02) !important;
  border: 1px solid rgba(139,92,246,0.06) !important;
}
.menu-nav-item:hover {
  background: linear-gradient(135deg,
    rgba(139,92,246,0.09) 0%,
    rgba(236,72,153,0.04) 100%) !important;
  border-color: rgba(167,139,250,0.28) !important;
  box-shadow: 0 0 16px rgba(139,92,246,0.10), inset 0 1px 0 rgba(139,92,246,0.10) !important;
  color: #e9d5ff !important;
}
.menu-nav-item.active {
  background: linear-gradient(135deg,
    rgba(139,92,246,0.12) 0%,
    rgba(217,70,239,0.07) 100%) !important;
  border-color: rgba(167,139,250,0.32) !important;
  color: #c4b5fd !important;
}
.mp-primary-item .mni-icon-wrap,
.menu-nav-item .mni-icon-wrap {
  background: rgba(139,92,246,0.07) !important;
  border: 1px solid rgba(139,92,246,0.15) !important;
}
.mp-primary-item:hover .mni-icon-wrap,
.menu-nav-item:hover .mni-icon-wrap {
  background: rgba(139,92,246,0.18) !important;
  border-color: rgba(167,139,250,0.45) !important;
  box-shadow: 0 0 12px rgba(139,92,246,0.35) !important;
}

/* 8. Toggle sidebar — violet */
.sidebar-toggle-btn {
  background: linear-gradient(180deg,
    rgba(139,92,246,0.12) 0%,
    rgba(139,92,246,0.25) 50%,
    rgba(139,92,246,0.12) 100%) !important;
  border: 1px solid rgba(139,92,246,0.4) !important;
  color: #c4b5fd !important;
  box-shadow: -4px 0 16px rgba(139,92,246,0.2) !important;
}

/* 9. Footer — diviseur violet */
.menu-footer {
  border-top: 1px solid rgba(139,92,246,0.12) !important;
}


/* ══════════════════════════════════════════════════════════
   SPLIT VIEW — PDF + Mind Map
══════════════════════════════════════════════════════════ */
.mm-split-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Mind map canvas takes full width now (PDF panel is fixed overlay) */
.mm-canvas-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  transition: margin 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
/* Quand le PDF est ouvert, on décale la carte mentale pour voir les deux.
   La barre d'outils (mm-tools-sidebar) est dans .mm-canvas-panel et reste centrée
   automatiquement dans la zone visible grâce à left: 50% + transform. */
body:has(#mm-pdf-panel:not(.hidden).pdf-left) .mm-canvas-panel {
  margin-left: min(42vw, 520px);
}
body:has(#mm-pdf-panel:not(.hidden):not(.pdf-left)) .mm-canvas-panel {
  margin-right: min(42vw, 520px);
}
/* Quand le PDF est ouvert : on cache uniquement le bouton "Importer mon cours".
   La barre de navigation des parties reste visible au-dessus de la barre d'outils. */
body:has(#mm-pdf-panel:not(.hidden)) .mm-btn-import-cours {
  display: none !important;
}

/* Left panel (PDF viewer) */
.mm-pdf-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(42vw, 520px);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: rgba(3,1,14,0.97);
  border-left: 1px solid rgba(124,58,237,0.25);
  box-shadow: -4px 0 32px rgba(0,0,0,0.5);
  z-index: 9500;
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.mm-pdf-panel.hidden {
  transform: translateX(calc(100% + 4px));
  pointer-events: none;
}
/* Left-side variant */
.mm-pdf-panel.pdf-left {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid rgba(124,58,237,0.25);
  box-shadow: 4px 0 32px rgba(0,0,0,0.5);
  transform: translateX(0);
}
.mm-pdf-panel.pdf-left.hidden {
  transform: translateX(calc(-100% - 4px));
}
/* En mode révision (HUD 56px en haut) : le PDF passe sous la barre */
body:has(#screen-quest-active.active) .mm-pdf-panel {
  top: 56px;
  height: calc(100dvh - 56px);
}

/* PDF panel header */
.mm-pdf-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  /* Clean white glass — clearly a header, easy to read */
  background: rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  /* Subtle top accent gradient line */
  border-top: 2px solid transparent;
  background-clip: padding-box;
  box-shadow:
    inset 0 2px 0 rgba(139,92,246,0.45),   /* violet accent top edge */
    0 2px 12px rgba(0,0,0,0.25);
  flex-shrink: 0;
}
.mm-pdf-panel-title {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;                /* bright white — clearly legible */
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
/* Side-swap + crop buttons */
.mm-pdf-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  flex-shrink: 0;
}
.mm-pdf-side-btn:hover {
  background: rgba(139,92,246,0.28);
  border-color: rgba(139,92,246,0.5);
  color: #e9d5ff;
}
.mm-pdf-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
}
.mm-pdf-close-btn:hover {
  background: rgba(220,38,38,0.25);
  border-color: rgba(220,38,38,0.4);
  color: #fca5a5;
}

/* PDF toggle tab — fixe sur le bord droit, visible quand panneau fermé */
/* Onglet flottant pour rouvrir le PDF — collé à l'extrémité gauche, style Apple premium */
.mm-pdf-toggle-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9400;
  height: 50px;
  padding: 0 18px 0 14px;
  gap: 9px;
  border: none;
  border-radius: 0 100px 100px 0;
  background:
    linear-gradient(135deg,
      rgba(124,58,237,0.95) 0%,
      rgba(139,92,246,0.92) 50%,
      rgba(167,139,250,0.9) 100%);
  box-shadow:
    0 6px 24px rgba(109,40,217,0.45),
    0 2px 8px rgba(0,0,0,0.25),
    inset 1px 0 0 rgba(255,255,255,0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform .2s cubic-bezier(0.2,0.8,0.2,1),
              box-shadow .2s ease,
              padding .2s ease;
}
.mm-pdf-toggle-tab.hidden { display: none; }
.mm-pdf-toggle-tab:hover {
  padding-right: 22px;
  box-shadow:
    0 8px 30px rgba(109,40,217,0.55),
    0 3px 10px rgba(0,0,0,0.3),
    inset 1px 0 0 rgba(255,255,255,0.25);
}
.mm-pdf-toggle-tab:active {
  transform: translateY(-50%) scale(0.96);
}
.mm-pdf-toggle-tab svg {
  width: 14px; height: 14px;
  /* Flèche pointe vers la droite (PDF est à gauche → on l'ouvre vers l'intérieur) */
  transform: rotate(180deg);
  opacity: 0.95;
}
.mm-pdf-tab-label {
  line-height: 1;
  text-transform: none;
}

/* PDF body wrapper */
.mm-pdf-body {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.mm-pdf-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}
/* PDF.js render canvas — main display, in normal flow */
.mm-pdf-render-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}
/* Selection overlay — floats on top of the canvas */
.mm-pdf-crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  cursor: crosshair;
  z-index: 10;
}
.mm-pdf-crop-overlay.hidden { display: none; }
/* Hint label */
.mm-pdf-crop-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(109,40,217,0.85);
  border-radius: 100px;
  color: #e9d5ff;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
}
.mm-pdf-crop-hint.hidden { display: none; }
/* Page navigation */
.mm-pdf-page-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.mm-pdf-page-btn {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mm-pdf-page-btn:hover {
  background: rgba(139,92,246,0.35);
  border-color: rgba(139,92,246,0.5);
  color: #fff;
}
.mm-pdf-page-info {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  min-width: 36px;
  text-align: center;
  letter-spacing: 0.01em;
}
/* Crop mode active state for button */
.mm-pdf-side-btn.active {
  background: rgba(139,92,246,0.35);
  border-color: rgba(167,139,250,0.7);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(139,92,246,0.2);
}
/* Draggable crop thumbnail */
.mm-pdf-crop-thumb {
  position: fixed;
  z-index: 9999;
  border: 2px solid #7c3aed;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  cursor: grab;
  max-width: 240px;
  max-height: 180px;
  object-fit: contain;
  background: white;
  opacity: 0.92;
}
.mm-pdf-crop-thumb:active { cursor: grabbing; }

/* ══════════════════════════════════════════════════════════
   CONSTELLATION TAB — Premium Chemical Structure Museum
══════════════════════════════════════════════════════════ */

/* Pane background */
#aa-pane-constellation {
  background: radial-gradient(ellipse at 30% 20%, rgba(30,5,60,0.98) 0%, rgba(5,1,18,0.99) 60%, #020010 100%);
  position: relative;
  overflow: hidden;
}
#aa-pane-constellation::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px),
    radial-gradient(circle, rgba(167,139,250,0.04) 1px, transparent 1px);
  background-size: 60px 60px, 120px 120px;
  background-position: 0 0, 30px 30px;
}

/* ── Top bar ── */
.cst-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(124,58,237,0.2);
  background: rgba(10,2,30,0.7);
  backdrop-filter: blur(8px);
  z-index: 2;
  position: relative;
  flex-shrink: 0;
}
.cst-subj-bar {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.cst-subj-bar::-webkit-scrollbar { display: none; }
.cst-subj-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.08);
  color: rgba(196,181,253,0.7);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.cst-subj-btn:hover { background: rgba(124,58,237,0.2); color: #c4b5fd; }
.cst-subj-btn.active {
  background: rgba(124,58,237,0.35);
  border-color: rgba(167,139,250,0.7);
  color: #e9d5ff;
  box-shadow: 0 0 10px rgba(124,58,237,0.4);
}

.cst-topbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cst-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.4);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.cst-btn-import {
  background: rgba(124,58,237,0.15);
  color: rgba(196,181,253,0.85);
  border-color: rgba(124,58,237,0.4);
}
.cst-btn-import:hover {
  background: rgba(124,58,237,0.3);
  color: #e9d5ff;
  box-shadow: 0 0 12px rgba(124,58,237,0.4);
}
.cst-btn-draw {
  background: rgba(192,38,211,0.12);
  color: rgba(240,171,252,0.85);
  border-color: rgba(192,38,211,0.35);
}
.cst-btn-draw:hover {
  background: rgba(192,38,211,0.25);
  color: #f0abfc;
  box-shadow: 0 0 12px rgba(192,38,211,0.35);
}

/* ── Gallery ── */
.cst-gallery {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  align-content: start;
  position: relative;
  z-index: 1;
}
.cst-gallery::-webkit-scrollbar { width: 5px; }
.cst-gallery::-webkit-scrollbar-track { background: transparent; }
.cst-gallery::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 3px; }

/* Empty state */
.cst-empty {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 20px;
  color: rgba(167,139,250,0.4);
  font-size: 13px;
  text-align: center;
  font-family: 'Inter', sans-serif;
}
.cst-empty p { max-width: 260px; line-height: 1.6; }

/* ── Structure card ── */
.cst-card {
  background: rgba(10,2,28,0.85);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: default;
}
.cst-card:hover {
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 20px rgba(124,58,237,0.3), 0 4px 20px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}
.cst-card-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1.4;
  background: radial-gradient(ellipse at 50% 50%, rgba(30,5,60,0.9) 0%, rgba(5,1,18,0.95) 100%);
  overflow: hidden;
}
.cst-card-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.cst-card-footer {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid rgba(124,58,237,0.15);
  background: rgba(5,1,18,0.7);
}
.cst-card-name {
  flex: 1;
  background: none;
  border: none;
  color: rgba(230,210,255,0.9);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  outline: none;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}
.cst-card-name:focus {
  background: rgba(124,58,237,0.15);
}
.cst-card-name::placeholder { color: rgba(167,139,250,0.35); }
.cst-card-actions {
  display: flex;
  gap: 4px;
}
.cst-card-action-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  border: 1px solid rgba(124,58,237,0.2);
  background: rgba(124,58,237,0.08);
  color: rgba(167,139,250,0.6);
  cursor: pointer;
  transition: all 0.15s;
}
.cst-card-action-btn:hover {
  background: rgba(124,58,237,0.25);
  color: #c4b5fd;
}
.cst-card-action-btn.delete:hover {
  background: rgba(220,38,38,0.2);
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
}

/* ── Draw modal ── */
.cst-draw-modal {
  position: absolute; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.cst-draw-modal.hidden { display: none; }
.cst-draw-backdrop {
  position: absolute; inset: 0;
  background: rgba(2,0,16,0.75);
  backdrop-filter: blur(6px);
}
.cst-draw-panel {
  position: relative; z-index: 1;
  width: 680px; max-width: 95vw;
  background: linear-gradient(145deg, rgba(15,4,40,0.97) 0%, rgba(8,2,24,0.98) 100%);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(124,58,237,0.35), 0 20px 60px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cst-draw-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(124,58,237,0.2);
  background: rgba(124,58,237,0.08);
}
.cst-draw-title {
  font-size: 13px; font-weight: 700;
  color: #c4b5fd;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
}
.cst-draw-close {
  background: none; border: none;
  color: rgba(167,139,250,0.5);
  font-size: 14px; cursor: pointer;
  padding: 3px 7px; border-radius: 5px;
  transition: all 0.13s;
}
.cst-draw-close:hover { background: rgba(220,38,38,0.2); color: #fca5a5; }

/* draw toolbar */
.cst-draw-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(124,58,237,0.12);
  background: rgba(5,1,18,0.6);
  flex-wrap: wrap;
}
.cst-atom-label {
  font-size: 10px; font-weight: 600;
  color: rgba(167,139,250,0.5);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
}
.cst-atom-btn, .cst-bond-btn {
  min-width: 28px; height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(124,58,237,0.3);
  background: rgba(124,58,237,0.08);
  color: rgba(196,181,253,0.75);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.cst-atom-btn:hover, .cst-bond-btn:hover { background: rgba(124,58,237,0.2); color: #c4b5fd; }
.cst-atom-btn.active, .cst-bond-btn.active {
  background: rgba(124,58,237,0.35);
  border-color: rgba(167,139,250,0.7);
  color: #e9d5ff;
  box-shadow: 0 0 8px rgba(124,58,237,0.4);
}
.cst-draw-sep { width: 1px; height: 18px; background: rgba(124,58,237,0.2); flex-shrink: 0; }
.cst-draw-tool-btn {
  width: 28px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(124,58,237,0.25);
  background: rgba(124,58,237,0.06);
  color: rgba(167,139,250,0.6);
  cursor: pointer;
  transition: all 0.15s;
}
.cst-draw-tool-btn:hover { background: rgba(124,58,237,0.2); color: #c4b5fd; }

/* draw canvas */
.cst-draw-canvas {
  display: block;
  background: radial-gradient(ellipse at 50% 50%, rgba(20,5,50,0.95) 0%, rgba(4,1,14,0.98) 100%);
  cursor: crosshair;
}

.cst-draw-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid rgba(124,58,237,0.15);
  background: rgba(5,1,18,0.7);
}
.cst-draw-name-input {
  flex: 1;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 8px;
  color: #e9d5ff;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  padding: 6px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cst-draw-name-input:focus {
  border-color: rgba(167,139,250,0.6);
  box-shadow: 0 0 10px rgba(124,58,237,0.25);
}
.cst-draw-name-input::placeholder { color: rgba(167,139,250,0.3); }
.cst-draw-save-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.6);
  background: rgba(124,58,237,0.3);
  color: #e9d5ff;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.cst-draw-save-btn:hover {
  background: rgba(124,58,237,0.5);
  box-shadow: 0 0 14px rgba(124,58,237,0.5);
}

/* ── Generating overlay ── */
.cst-generating {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,0,16,0.85);
  backdrop-filter: blur(8px);
}
.cst-generating.hidden { display: none; }
.cst-gen-inner {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cst-gen-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(124,58,237,0.2);
  border-top-color: rgba(167,139,250,0.9);
  border-radius: 50%;
  animation: cst-spin 0.8s linear infinite;
}
@keyframes cst-spin { to { transform: rotate(360deg); } }
.cst-gen-label {
  color: rgba(196,181,253,0.8);
  font-size: 13px; font-weight: 600;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
}

/* ── Museum panel (inside mindmap) ── */
.cst-museum-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 280px;
  background: linear-gradient(180deg, rgba(10,2,30,0.97) 0%, rgba(4,1,14,0.98) 100%);
  border-left: 1px solid rgba(124,58,237,0.3);
  display: flex; flex-direction: column;
  z-index: 20;
  box-shadow: -6px 0 30px rgba(124,58,237,0.2);
  backdrop-filter: blur(12px);
}
.cst-museum-panel.hidden { display: none; }
.cst-museum-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(124,58,237,0.2);
  background: rgba(124,58,237,0.1);
  flex-shrink: 0;
}
.cst-museum-title {
  font-size: 12px; font-weight: 700;
  color: #c4b5fd;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.06em;
}
.cst-museum-close {
  background: none; border: none;
  color: rgba(167,139,250,0.5);
  font-size: 13px; cursor: pointer;
  padding: 2px 6px; border-radius: 4px;
  transition: all 0.13s;
}
.cst-museum-close:hover { background: rgba(220,38,38,0.2); color: #fca5a5; }
.cst-museum-hint {
  font-size: 10px; color: rgba(167,139,250,0.45);
  padding: 6px 14px 0;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  flex-shrink: 0;
}
.cst-museum-grid {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}
.cst-museum-grid::-webkit-scrollbar { width: 4px; }
.cst-museum-grid::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.3); border-radius: 2px; }
.cst-museum-item {
  background: rgba(10,2,28,0.8);
  border: 1px solid rgba(124,58,237,0.22);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column;
}
.cst-museum-item:hover {
  border-color: rgba(167,139,250,0.6);
  box-shadow: 0 0 14px rgba(124,58,237,0.35);
  transform: scale(1.04);
}
.cst-museum-item-canvas {
  width: 100%; aspect-ratio: 1.3;
  display: block;
  background: rgba(5,1,18,0.9);
}
.cst-museum-item-name {
  font-size: 9px; font-weight: 600;
  color: rgba(196,181,253,0.7);
  font-family: 'Inter', sans-serif;
  padding: 4px 6px;
  text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Museum open button glow */
.cst-museum-open-btn:hover {
  background: rgba(192,38,211,0.2) !important;
  border-color: rgba(240,171,252,0.5) !important;
  color: #f0abfc !important;
  box-shadow: 0 0 10px rgba(192,38,211,0.4) !important;
}


.mm-node.mm-root { z-index: 5; }

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Floating pill toolbar
══════════════════════════════════════════════════════════ */
.mm-float-pill {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  background: rgba(8, 4, 24, 0.84);
  border: 1px solid rgba(139,92,246,0.22);
  border-radius: 100px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 4px 28px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.04);
}
.mm-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: rgba(196,181,253,0.65);
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  padding: 0;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
}
.mm-pill-btn:hover {
  background: rgba(139,92,246,0.18);
  color: #c4b5fd;
}
.mm-pill-btn:active {
  background: rgba(139,92,246,0.3);
  color: #ede9fe;
}
.mm-pill-sep {
  width: 1px;
  height: 16px;
  background: rgba(139,92,246,0.18);
  margin: 0 3px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Contextual node bar
══════════════════════════════════════════════════════════ */
.mm-ctx-bar {
  position: absolute;
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  background: rgba(6, 3, 20, 0.92);
  border: 1px solid rgba(139,92,246,0.28);
  border-radius: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 32px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.04);
  pointer-events: all;
  transition: opacity 0.15s ease, transform 0.15s ease;
  /* JS will set left/top */
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
}
.mm-ctx-bar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
}
.mm-ctx-swatch {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  padding: 0;
  flex-shrink: 0;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
}
.mm-ctx-swatch:hover {
  transform: scale(1.25);
  border-color: rgba(255,255,255,0.5);
}
.mm-ctx-swatch.active {
  border-color: white;
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
}
.mm-ctx-sep {
  width: 1px;
  height: 16px;
  background: rgba(139,92,246,0.18);
  margin: 0 3px;
  flex-shrink: 0;
}
.mm-ctx-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(196,181,253,0.6);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  padding: 0;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
}
.mm-ctx-icon-btn:hover {
  background: rgba(139,92,246,0.16);
  color: #c4b5fd;
}
.mm-ctx-shape.active {
  background: rgba(139,92,246,0.22);
  color: #c4b5fd;
  border-color: rgba(139,92,246,0.4);
}

/* ── mm-canvas-panel must be positioned for absolute children ── */
.mm-canvas-panel {
  position: relative;
}

/* ══════════════════════════════════════════════════════════
   CARTE MENTALE — Secondary tools sidebar (left vertical)
══════════════════════════════════════════════════════════ */
.mm-tools-sidebar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  padding: 5px 8px;
  background: rgba(8, 4, 24, 0.86);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 100px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 -1px 0 rgba(0,0,0,0.3) inset;
  white-space: nowrap;
  transition: left 0.3s ease, transform 0.3s ease, top 0.3s ease;
}
/* Collapsed: snap to top-right, hide all tools except the toggle */
.mm-tools-sidebar.collapsed {
  left: auto;
  right: 14px;
  transform: none;
}
.mm-tools-sidebar.collapsed .mm-tool-btn:not(.mm-tool-collapse-btn),
.mm-tools-sidebar.collapsed .mm-tool-swatch,
.mm-tools-sidebar.collapsed .mm-tools-sep {
  display: none;
}
.mm-tools-sidebar.collapsed .mm-tools-collapse-sep {
  display: none;
}
.mm-tool-collapse-btn .mm-collapse-icon-closed { display: none; }
.mm-tools-sidebar.collapsed .mm-tool-collapse-btn .mm-collapse-icon-open   { display: none; }
.mm-tools-sidebar.collapsed .mm-tool-collapse-btn .mm-collapse-icon-closed { display: flex; }
.mm-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(196,181,253,0.55);
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
  padding: 0;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
  position: relative;
}
.mm-tool-btn:hover {
  background: rgba(139,92,246,0.18);
  color: #c4b5fd;
  border-color: rgba(139,92,246,0.2);
}
.mm-tool-btn:active {
  background: rgba(139,92,246,0.3);
}
.mm-tool-shape.active {
  background: rgba(139,92,246,0.22);
  color: #c4b5fd;
  border-color: rgba(139,92,246,0.4);
}
.mm-tool-danger {
  color: rgba(252,165,165,0.5);
}
.mm-tool-danger:hover {
  background: rgba(239,68,68,0.15);
  color: rgba(252,165,165,0.9);
  border-color: rgba(239,68,68,0.25);
}
.mm-tools-sep {
  width: 1px;
  height: 18px;
  background: rgba(139,92,246,0.18);
  margin: 0 4px;
  flex-shrink: 0;
}
.mm-tool-swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  padding: 0;
  margin: 0 2px;
  font-size: 0;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}
.mm-tool-swatch:hover {
  transform: scale(1.2);
  border-color: rgba(255,255,255,0.45);
}
.mm-tool-swatch-active,
.mm-tool-swatch.active {
  border-color: white !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
  transform: scale(1.1);
}

/* ══ PDF page highlight on node click ══ */
@keyframes mm-pdf-hl {
  0%   { box-shadow: 0 0 0 3px rgba(250,204,21,0.9),  0 0 24px rgba(250,204,21,0.5);  opacity: 1; }
  40%  { box-shadow: 0 0 0 5px rgba(250,204,21,0.7),  0 0 40px rgba(250,204,21,0.35); opacity: 1; }
  100% { box-shadow: 0 0 0 3px rgba(250,204,21,0),    0 0 0   rgba(250,204,21,0);     opacity: 0; }
}
.mm-pdf-page-highlight {
  border: 3px solid rgba(250,204,21,0.85);
  background: rgba(250,204,21,0.06);
}

/* ══ Mind map generation overlay ══ */
.mm-gen-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 1, 12, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mm-gen-overlay.hidden { display: none; }

.mm-gen-card {
  position: relative;
  background: linear-gradient(160deg, rgba(20,10,54,0.98) 0%, rgba(10,5,30,0.98) 100%);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 28px;
  padding: 32px 36px 28px;
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(139,92,246,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
/* Subtle glow behind card */
.mm-gen-card::before {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Orb ── */
.mm-gen-orb-wrap {
  position: relative;
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
}
.mm-gen-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(139,92,246,0.35);
  animation: mm-orb-spin linear infinite;
}
.mm-gen-orb-ring-1 { width: 72px; height: 72px; animation-duration: 4s;  border-top-color: rgba(139,92,246,0.9); }
.mm-gen-orb-ring-2 { width: 54px; height: 54px; animation-duration: 3s;  animation-direction: reverse; border-right-color: rgba(167,139,250,0.7); }
.mm-gen-orb-ring-3 { width: 36px; height: 36px; animation-duration: 2s;  border-bottom-color: rgba(192,132,252,0.6); }
@keyframes mm-orb-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.mm-gen-orb-core {
  position: relative;
  width: 36px; height: 36px;
  background: radial-gradient(circle at 40% 35%, rgba(167,139,250,0.25), rgba(124,58,237,0.1));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #c4b5fd;
}

/* ── Title ── */
.mm-gen-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(230,220,255,0.95);
  margin-top: -8px;
}

/* ── Steps ── */
.mm-gen-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mm-gen-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(167,139,250,0.3);
  transition: color 0.35s;
  padding: 2px 0;
}
.mm-gen-step.active { color: rgba(216,180,254,0.95); }
.mm-gen-step.done   { color: rgba(134,239,172,0.75); }

.mm-gen-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 3px;
}
.mm-gen-step-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(139,92,246,0.15);
  border: 1.5px solid rgba(139,92,246,0.25);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
  flex-shrink: 0;
}
.mm-gen-step.active .mm-gen-step-dot {
  background: #7c3aed;
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(124,58,237,0.8), 0 0 20px rgba(124,58,237,0.3);
  animation: mm-dot-pulse 1.2s ease-in-out infinite;
}
.mm-gen-step.done .mm-gen-step-dot {
  background: #4ade80;
  border-color: #86efac;
  box-shadow: 0 0 8px rgba(74,222,128,0.5);
}
.mm-gen-step-line {
  width: 1.5px;
  flex: 1;
  min-height: 18px;
  background: rgba(139,92,246,0.15);
  margin: 3px 0;
}
.mm-gen-step.done + .mm-gen-step .mm-gen-step-line,
.mm-gen-step.done .mm-gen-step-line {
  background: rgba(74,222,128,0.3);
}
@keyframes mm-dot-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 0 10px rgba(124,58,237,0.8); }
  50%       { transform: scale(1.3); box-shadow: 0 0 18px rgba(124,58,237,1),   0 0 32px rgba(124,58,237,0.4); }
}

/* ── Footer: bar + pct ── */
.mm-gen-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mm-gen-bar-wrap {
  height: 5px;
  background: rgba(139,92,246,0.1);
  border-radius: 100px;
  overflow: hidden;
}
.mm-gen-bar-fill {
  position: relative;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6d28d9, #a855f7, #c084fc);
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 12px rgba(168,85,247,0.6);
  overflow: hidden;
}
.mm-gen-bar-shimmer {
  position: absolute;
  top: 0; left: -60%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: mm-shimmer 1.6s ease-in-out infinite;
}
@keyframes mm-shimmer {
  0%   { left: -60%; }
  100% { left: 120%; }
}
.mm-gen-pct {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(167,139,250,0.55);
}

/* ══ FAB PDF — bottom-right ══ */
/* ══ Bouton Apprentissage (FAB bas centre) ══ */
.mm-learn-fab {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 16px;
  background: linear-gradient(135deg, rgba(34,197,94,0.92) 0%, rgba(16,185,129,0.88) 100%);
  border: 1px solid rgba(110,231,183,0.45);
  border-radius: 100px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(16,185,129,0.35), 0 1px 0 rgba(255,255,255,0.12) inset;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  user-select: none;
}
.mm-learn-fab:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 32px rgba(16,185,129,0.5), 0 1px 0 rgba(255,255,255,0.15) inset;
}
.mm-learn-fab:active { transform: translateX(-50%) translateY(0); }
.mm-learn-fab-icon {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  flex-shrink: 0;
}
.mm-learn-fab-label { white-space: nowrap; }
.mm-learn-fab-badge {
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 7px;
  background: rgba(255,255,255,0.22);
  border-radius: 100px;
  letter-spacing: 0.06em;
}
/* Quand une session est en cours, on cache le FAB */
.mm-learn-fab.hidden { display: none; }

/* ════════════════════════════════════════════════════
   PANNEAU APPRENTISSAGE — iPhone à droite + Chat iMessage
   ════════════════════════════════════════════════════ */
.mm-learn-panel {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto; left: auto;
  width: 280px;
  height: min(580px, calc(100% - 40px));
  display: flex; flex-direction: column;
  /* Fond étoilé violet — pas du noir plat */
  background:
    radial-gradient(circle at 22% 18%, rgba(167,139,250,0.18) 0%, transparent 38%),
    radial-gradient(circle at 78% 72%, rgba(99,102,241,0.15) 0%, transparent 42%),
    radial-gradient(circle 1px at 15% 22%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 1.2px at 32% 48%, #c4a3ff 50%, transparent 51%),
    radial-gradient(circle 0.9px at 58% 18%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 1.1px at 72% 38%, #fbbf24 50%, transparent 51%),
    radial-gradient(circle 1px at 85% 62%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 1.3px at 24% 78%, #ff9cc4 50%, transparent 51%),
    radial-gradient(circle 0.8px at 64% 82%, #ffffff 50%, transparent 51%),
    radial-gradient(circle 1.1px at 90% 28%, #c4a3ff 50%, transparent 51%),
    linear-gradient(160deg, #0a0420 0%, #14082e 50%, #08051a 100%);
  border-radius: 38px;
  /* Cadre iPhone : bordure foncée fine */
  box-shadow:
    0 0 0 6px #1a1a1f,
    0 0 0 7px #2a2a30,
    0 0 0 8px rgba(255,255,255,0.04),
    0 24px 60px rgba(0,0,0,0.55),
    0 12px 28px rgba(0,0,0,0.35);
  z-index: 110;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  animation: mm-learn-in .3s cubic-bezier(0.2,0.8,0.2,1);
  overflow: hidden;
}
.mm-learn-panel.hidden { display: none; }
@keyframes mm-learn-in {
  from { opacity: 0; transform: translateY(-50%) translateX(40px) scale(0.96); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }
}
/* Dynamic Island — pilule noire au sommet */
.mm-learn-panel::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #000;
  border-radius: 100px;
  z-index: 200;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
/* Status bar iPhone — heure réelle injectée par JS */
.mm-learn-time {
  position: absolute;
  top: 11px; left: 22px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  z-index: 199;
  letter-spacing: -0.005em;
  pointer-events: none;
}

/* ── LOADING SCREEN — adapté au format iPhone ── */
.mm-learn-loading {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px 24px;   /* top padding pour laisser la place au notch */
  text-align: center;
  position: relative;
}
.mm-learn-loading.hidden { display: none; }
.mm-learn-loading-avatar-wrap {
  position: relative;
  width: 110px; height: 130px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.mm-learn-loading-avatar {
  position: relative; z-index: 5;
  width: 90px; height: 120px;
}
.mm-learn-loading-avatar img,
.mm-learn-loading-avatar svg {
  width: 100%; height: 100%; object-fit: contain;
}
.mm-learn-loading-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(110,231,183,0.5);
}
.mm-learn-loading-ring-1 { inset: 0; animation: mm-learn-ring 2.4s ease-in-out infinite; }
.mm-learn-loading-ring-2 { inset: 12px; animation: mm-learn-ring 2.4s ease-in-out infinite .35s; opacity: 0.55; }
.mm-learn-loading-ring-3 { inset: 24px; animation: mm-learn-ring 2.4s ease-in-out infinite .7s; opacity: 0.3; }
@keyframes mm-learn-ring {
  0%, 100% { transform: scale(1); opacity: var(--o, 0.5); }
  50%      { transform: scale(1.08); opacity: 0.15; }
}
.mm-learn-loading-title {
  font-size: 1.05rem; font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.mm-learn-loading-sub {
  font-size: 0.78rem;
  color: rgba(196,181,253,0.7);
  margin-bottom: 22px;
  letter-spacing: -0.005em;
}
.mm-learn-loading-steps {
  width: 100%;
  max-width: 360px;
  display: flex; flex-direction: column; gap: 9px;
  margin-bottom: 24px;
  text-align: left;
}
.mm-learn-loading-step {
  display: flex; align-items: center; gap: 11px;
  font-size: 0.82rem;
  color: rgba(180,180,200,0.55);
  transition: color .25s;
}
.mm-learn-loading-step .mm-learn-step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.mm-learn-loading-step.active {
  color: rgba(245,245,250,0.95);
}
.mm-learn-loading-step.active .mm-learn-step-dot {
  background: #34d399;
  border-color: rgba(110,231,183,0.7);
  box-shadow: 0 0 12px rgba(52,211,153,0.6);
}
.mm-learn-loading-step.done {
  color: rgba(196,181,253,0.75);
}
.mm-learn-loading-step.done .mm-learn-step-dot {
  background: rgba(52,211,153,0.4);
  border-color: rgba(110,231,183,0.4);
}
.mm-learn-loading-bar-wrap {
  width: 100%;
  max-width: 360px;
  display: flex; align-items: center; gap: 11px;
}
.mm-learn-loading-bar {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}
.mm-learn-loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  border-radius: 100px;
  box-shadow: 0 0 10px rgba(52,211,153,0.6);
  transition: width .4s cubic-bezier(0.2,0.8,0.2,1);
}
.mm-learn-loading-pct {
  font-size: 0.72rem; font-weight: 700;
  color: rgba(196,181,253,0.85);
  min-width: 36px; text-align: right;
}

/* ── CHAT SCREEN — iMessage style ────────────────────── */
.mm-learn-chat {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 0;
}
.mm-learn-chat.hidden { display: none; }

.mm-learn-chat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 42px 12px 8px 12px;   /* top padding pour le notch */
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  background: rgba(10,5,30,0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mm-learn-chat-avatar {
  width: 38px; height: 46px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.mm-learn-chat-avatar img,
.mm-learn-chat-avatar svg {
  width: 100%; height: 100%;
  object-fit: contain;
  position: absolute; inset: 0;
}
.mm-learn-chat-info {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
  flex: 1;
}
.mm-learn-chat-name {
  font-size: 0.82rem; font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}
.mm-learn-chat-status {
  font-size: 0.65rem;
  color: rgba(196,181,253,0.65);
  letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-learn-chat-status::before {
  content: '•';
  color: #34d399;
  margin-right: 4px;
  font-size: 11px;
}
.mm-learn-progress-wrap {
  display: flex; flex-direction: column; gap: 2px;
  width: 72px;
  flex-shrink: 0;
}
.mm-learn-battery {
  position: relative;
  height: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(110,231,183,0.2);
  border-radius: 100px;
  overflow: hidden;
}
.mm-learn-battery-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  border-radius: 100px;
  transition: width .4s cubic-bezier(0.2,0.8,0.2,1);
  box-shadow: 0 0 10px rgba(52,211,153,0.5);
}
.mm-learn-battery-pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.58rem; font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.mm-learn-progress-label {
  font-size: 0.6rem;
  color: rgba(196,181,253,0.6);
  letter-spacing: 0.02em;
  text-align: right;
}
.mm-learn-close {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  color: rgba(245,245,250,0.7);
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.mm-learn-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.mm-learn-close-abs {
  position: absolute;
  top: 52px; right: 16px;   /* sous le notch */
  z-index: 198;
}

/* Messages container — fond transparent pour laisser passer les étoiles */
.mm-learn-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.mm-learn-messages::-webkit-scrollbar { width: 6px; }
.mm-learn-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* Message bubble — iMessage style */
.mm-msg {
  display: flex;
  max-width: 80%;
  animation: mm-msg-pop .22s cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes mm-msg-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.mm-msg-avatar {
  align-self: flex-start;
  margin-right: auto;
}
.mm-msg-user {
  align-self: flex-end;
  margin-left: auto;
  justify-content: flex-end;
}
.mm-msg-bubble {
  padding: 8px 13px;
  border-radius: 18px;
  font-size: 0.81rem;
  line-height: 1.38;
  letter-spacing: -0.005em;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.mm-msg { max-width: 85%; }
.mm-msg-avatar .mm-msg-bubble {
  background: rgba(60,60,68,0.85);
  color: #fff;
  border-bottom-left-radius: 5px;
}
.mm-msg-user .mm-msg-bubble {
  background: linear-gradient(135deg, #007aff 0%, #0066d6 100%);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.mm-msg-avatar.mm-msg-correct  .mm-msg-bubble { background: rgba(16,185,129,0.85); }
.mm-msg-avatar.mm-msg-partial  .mm-msg-bubble { background: rgba(217,119,6,0.85); }
.mm-msg-avatar.mm-msg-wrong    .mm-msg-bubble { background: rgba(220,38,38,0.85); }
/* Bulle de "saisie" (3 points qui pulse) */
.mm-msg-typing .mm-msg-bubble {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 16px;
  background: rgba(60,60,68,0.85);
}
.mm-msg-typing-dot {
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: mm-typing 1.2s ease-in-out infinite;
}
.mm-msg-typing-dot:nth-child(2) { animation-delay: .15s; }
.mm-msg-typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes mm-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

/* Input bar — adapté à la zone "home indicator" en bas */
.mm-learn-input-bar {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 10px 24px;   /* extra bottom pour la barre "home" iPhone */
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,5,30,0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-shrink: 0;
  position: relative;
}
/* Home indicator iPhone (petite barre blanche en bas) */
.mm-learn-input-bar::after {
  content: '';
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 4px;
  background: rgba(255,255,255,0.45);
  border-radius: 100px;
  pointer-events: none;
}
.mm-learn-input-bar.hidden { display: none; }
.mm-learn-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 8px 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #fff;
  resize: none;
  outline: none;
  max-height: 80px;
  min-height: 34px;
  line-height: 1.35;
  transition: border-color .15s, background .15s;
}
.mm-learn-input::placeholder { color: rgba(180,180,200,0.5); }
.mm-learn-input:focus { border-color: rgba(0,122,255,0.5); background: rgba(255,255,255,0.08); }
.mm-learn-send {
  width: 28px; height: 28px;
  padding: 0;
  background: linear-gradient(135deg, #007aff 0%, #0066d6 100%);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, opacity .15s, background .15s;
  flex-shrink: 0;
  margin-bottom: 3px;
}
.mm-learn-send:hover { background: linear-gradient(135deg, #1a86ff 0%, #0073e6 100%); }
.mm-learn-send:active { transform: scale(0.92); }
.mm-learn-send:disabled { opacity: 0.35; cursor: not-allowed; }

/* Justify panel (sous le chat) */
.mm-learn-justify {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(15,12,32,0.6);
}
.mm-learn-justify.hidden { display: none; }
.mm-learn-justify-skip,
.mm-learn-justify-next {
  padding: 8px 16px;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background .15s, transform .12s;
}
.mm-learn-justify-skip {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(245,245,250,0.85);
}
.mm-learn-justify-skip:hover { background: rgba(255,255,255,0.14); }
.mm-learn-justify-next {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  border: none;
  color: #fff;
}
.mm-learn-justify-next:hover { background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%); }
.mm-learn-justify-skip:active, .mm-learn-justify-next:active { transform: scale(0.96); }

/* Highlight visuel du nœud "courant" pendant la session */
.mm-node.mm-learn-focus {
  filter: drop-shadow(0 0 18px rgba(110,231,183,0.7));
  z-index: 5;
}
.mm-node.mm-learn-focus .mm-node-body {
  outline: 2px solid rgba(110,231,183,0.85);
  outline-offset: 3px;
}
.mm-node.mm-learn-done .mm-node-body {
  filter: brightness(0.55);
}

.mm-fab-pdf {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 16px;
  background: linear-gradient(135deg, rgba(109,40,217,0.92) 0%, rgba(139,92,246,0.88) 100%);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 100px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(109,40,217,0.35), 0 1px 0 rgba(255,255,255,0.12) inset;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  user-select: none;
}
.mm-fab-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(109,40,217,0.45), 0 1px 0 rgba(255,255,255,0.15) inset;
}
.mm-fab-pdf:active { transform: translateY(0); }
.mm-fab-pdf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  flex-shrink: 0;
}
.mm-fab-pdf-label {
  white-space: nowrap;
}
.mm-fab-pdf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: 'Orbitron', sans-serif;
}

/* ══ Bouton importer cours — top-left ══ */
.mm-btn-import-cours {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid rgba(109,40,217,0.25);
  border-radius: 100px;
  box-shadow: 0 2px 12px rgba(109,40,217,0.10);
  color: #5b21b6;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.mm-btn-import-cours:hover {
  background: #ffffff;
  border-color: rgba(109,40,217,0.5);
  box-shadow: 0 4px 20px rgba(109,40,217,0.18);
  transform: translateY(-1px);
}
.mm-btn-import-cours:active { transform: translateY(0); }

/* ── Bouton tout effacer — bas gauche, style Apple ── */
.mm-clear-all-btn {
  position: absolute;
  bottom: 18px; left: 18px;
  right: auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(28,28,32,0.85);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(220,220,225,0.55);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  z-index: 20;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    0 4px 14px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
}
.mm-clear-all-btn:hover {
  background: rgba(40,40,46,0.92);
  color: rgba(245,245,250,0.9);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.07);
}
.mm-clear-all-btn:active { transform: translateY(0) scale(0.96); }

.mm-clear-confirm {
  position: absolute;
  bottom: 82px; left: 18px;
  display: flex; align-items: center; gap: 10px;
  background: rgba(30,30,34,0.86);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 9px 10px 9px 16px;
  font-size: 0.82rem;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  font-weight: 500;
  color: rgba(245,245,250,0.92);
  letter-spacing: -0.01em;
  z-index: 21;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  white-space: nowrap;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.45),
    0 2px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: mm-cc-in .18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes mm-cc-in { from { opacity:0; transform:translateY(6px) scale(0.98); } to { opacity:1; transform:none; } }
.mm-cc-yes, .mm-cc-no {
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  transition: background .15s ease, transform .12s ease;
}
.mm-cc-yes:active, .mm-cc-no:active { transform: scale(0.96); }
.mm-cc-yes { background: rgba(255,69,58,0.92); color: #fff; }
.mm-cc-yes:hover { background: rgba(255,82,72,1); }
.mm-cc-no  { background: rgba(255,255,255,0.10); color: rgba(245,245,250,0.95); }
.mm-cc-no:hover { background: rgba(255,255,255,0.16); }

/* Badge "Carte Mentale" — bottom-left fixe */
/* ── Mind map: structure image attachment ─────────────────── */
.mm-struct-thumb {
  position: absolute;
  bottom: -42px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 38px;
  background: rgba(10,5,30,0.95);
  border: 1.5px solid rgba(52,211,153,0.5);
  border-radius: 8px; overflow: visible; cursor: pointer;
  z-index: 9;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mm-struct-thumb > img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; display: block; }
.mm-struct-thumb:hover { border-color: #34d399; box-shadow: 0 0 12px rgba(52,211,153,0.3); }
.mm-struct-thumb-del {
  position: absolute;
  top: -7px; right: -7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(248,113,113,0.92);
  border: 1.5px solid rgba(10,5,30,0.9);
  color: #fff;
  font-size: 11px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
}
.mm-struct-thumb:hover .mm-struct-thumb-del { opacity: 1; }
.mm-struct-thumb-del:hover { transform: scale(1.2); background: #f87171; }

.mm-struct-menu {
  position: absolute;
  bottom: -140px; left: 50%; transform: translateX(-50%);
  width: 170px;
  background: rgba(10,5,30,0.97);
  border: 1.5px solid rgba(52,211,153,0.4);
  border-radius: 12px; padding: 10px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.mm-struct-menu-preview {
  width: 100%; height: 80px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px; overflow: hidden; margin-bottom: 4px;
}
.mm-struct-menu-preview img { width: 100%; height: 100%; object-fit: contain; }
.mm-struct-menu-btn {
  padding: 6px 10px; font-size: 0.75rem;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: #34d399; border-radius: 7px; cursor: pointer;
  transition: background 0.15s;
}
.mm-struct-menu-btn:hover { background: rgba(52,211,153,0.2); }
.mm-struct-menu-del { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.3); color: #f87171; }
.mm-struct-menu-del:hover { background: rgba(248,113,113,0.18); }
.mm-struct-menu-close {
  position: absolute; top: 6px; right: 8px;
  background: none; border: none; color: rgba(255,255,255,0.4);
  cursor: pointer; font-size: 0.85rem;
}

/* ── Flash Card Images — Type pick card ───────────────────── */
.mg-type-pick-card.tif {
  border-color: rgba(52,211,153,0.38); border-left: 3px solid #34d399;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(52,211,153,0.1);
}
.mg-type-pick-card.tif:hover { box-shadow: 0 12px 38px rgba(52,211,153,0.28), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(6,78,59,0.09), rgba(9,7,30,0.98)); }
.mg-type-pick-card.tif .mg-type-pick-icon-wrap { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.28); }
.mg-type-pick-card.tif .mg-type-pick-icon-wrap svg { stroke: #34d399; }
.mg-type-pick-card.tif .mg-type-pick-label { color: #6ee7b7; }

/* ── Flash Card Images — Game overlay ────────────────────── */
.mg-imgflash-ov {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(6,4,20,0.97);
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px; box-sizing: border-box;
  animation: mg-fade-in 0.35s ease forwards;
}
.mg-imgflash-inner {
  width: 100%; max-width: 680px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}

.mg-imgflash-progress {
  width: 100%; display: flex; align-items: center; gap: 12px;
}
.mg-ifp-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 4px; overflow: hidden;
}
.mg-ifp-fill { height: 100%; background: linear-gradient(90deg, #34d399, #6ee7b7); border-radius: 4px; transition: width 0.4s ease; }
.mg-ifp-label { font-size: 0.75rem; color: rgba(255,255,255,0.35); font-family: Orbitron, sans-serif; white-space: nowrap; }

.mg-imgflash-question { text-align: center; }
.mg-ifq-label { font-size: 0.78rem; color: rgba(255,255,255,0.4); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.mg-ifq-name {
  font-family: Orbitron, sans-serif; font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 900; color: #fff;
  text-shadow: 0 0 28px rgba(52,211,153,0.4);
}

.mg-imgflash-grid {
  display: grid; gap: 12px; width: 100%;
}
.mg-ifg-2 { grid-template-columns: 1fr 1fr; }
.mg-ifg-3 { grid-template-columns: 1fr 1fr 1fr; }
.mg-ifg-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 600px) { .mg-ifg-4 { grid-template-columns: 1fr 1fr 1fr 1fr; } }

.mg-imgflash-option {
  aspect-ratio: 1 / 0.75;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  padding: 10px; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.mg-imgflash-option:hover:not(:disabled) {
  border-color: rgba(52,211,153,0.5);
  box-shadow: 0 0 20px rgba(52,211,153,0.2);
  transform: translateY(-2px);
}
.mg-imgflash-option img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  pointer-events: none; user-select: none;
}
.mg-imgflash-option.correct {
  border-color: #4ade80;
  background: rgba(74,222,128,0.1);
  box-shadow: 0 0 24px rgba(74,222,128,0.35);
}
.mg-imgflash-option.wrong {
  border-color: #f87171;
  background: rgba(248,113,113,0.1);
  box-shadow: 0 0 18px rgba(248,113,113,0.25);
}
.mg-imgflash-option:disabled { cursor: default; transform: none; }

.mg-imgflash-feedback {
  font-size: 0.95rem; font-weight: 700; padding: 8px 20px;
  border-radius: 10px; text-align: center;
  animation: mg-fade-in 0.2s ease forwards;
}
.mg-imgflash-feedback.hidden { display: none; }
.mg-imgflash-feedback.ok { color: #4ade80; background: rgba(74,222,128,0.1); }
.mg-imgflash-feedback.miss { color: #f87171; background: rgba(248,113,113,0.1); }

/* Results screen */
.mg-if-results {
  justify-content: center; text-align: center; gap: 16px;
}
.mg-if-res-icon { font-size: 3rem; }
.mg-if-res-score {
  font-family: Orbitron, sans-serif; font-size: 3.5rem; font-weight: 900;
  line-height: 1; text-shadow: 0 0 40px currentColor;
}
.mg-if-res-detail { font-size: 0.9rem; color: rgba(255,255,255,0.5); }
.mg-if-res-rewards {
  display: flex; gap: 16px; justify-content: center;
  font-family: Orbitron, sans-serif; font-size: 0.75rem; font-weight: 700;
  color: #fcd34d;
}
.mg-if-res-rewards span {
  padding: 5px 14px; background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3); border-radius: 100px;
}
.mg-if-res-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.mg-imgflash-retry {
  padding: 12px 28px;
  background: linear-gradient(135deg, rgba(52,211,153,0.25), rgba(16,185,129,0.15));
  border: 1.5px solid rgba(52,211,153,0.4);
  color: #34d399; font-family: Orbitron, sans-serif; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.08em;
  border-radius: 10px; cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.mg-imgflash-retry:hover { box-shadow: 0 0 20px rgba(52,211,153,0.3); transform: translateY(-1px); }

/* ── Drill Structures — Type pick card ───────────────────── */
.mg-type-pick-card.tmd {
  border-color: rgba(16,185,129,0.42); border-left: 3px solid #10b981;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(16,185,129,0.12);
}
.mg-type-pick-card.tmd:hover { box-shadow: 0 12px 38px rgba(16,185,129,0.32), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(6,78,59,0.12), rgba(9,7,30,0.98)); }
.mg-type-pick-card.tmd .mg-type-pick-icon-wrap { background: rgba(16,185,129,0.14); border: 1px solid rgba(16,185,129,0.32); }
.mg-type-pick-card.tmd .mg-type-pick-icon-wrap svg { stroke: #10b981; }
.mg-type-pick-card.tmd .mg-type-pick-label { color: #6ee7b7; }

/* ── Drill Structures — Game overlay ─────────────────────── */
.mg-moldrill-ov {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(6,4,20,0.97);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 16px; box-sizing: border-box;
  overflow-y: auto;
  animation: mg-fade-in 0.35s ease forwards;
}
.mg-moldrill-inner {
  width: 100%; max-width: 620px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.mg-moldrill-progress { width: 100%; }
.mg-moldrill-progress-text {
  font-family: Orbitron, sans-serif; font-size: 0.72rem;
  letter-spacing: 0.1em; color: rgba(110,231,183,0.85);
  text-align: right; margin-bottom: 6px;
}
.mg-moldrill-progress-bar {
  width: 100%; height: 6px; border-radius: 3px;
  background: rgba(16,185,129,0.12); overflow: hidden;
}
.mg-moldrill-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #6ee7b7);
  transition: width 0.4s ease;
}

.mg-moldrill-card {
  width: 100%;
  background: linear-gradient(165deg, rgba(16,185,129,0.05), rgba(9,7,30,0.98));
  border: 1px solid rgba(16,185,129,0.32);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(16,185,129,0.08);
  position: relative;
}
.mg-moldrill-retry-tag {
  position: absolute; top: 12px; right: 14px;
  font-family: Orbitron, sans-serif; font-size: 0.62rem; letter-spacing: 0.14em;
  color: #fbbf24; background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.4);
  padding: 4px 10px; border-radius: 999px;
}
.mg-moldrill-prompt {
  font-size: 0.82rem; color: rgba(255,255,255,0.6);
  text-align: center; margin-bottom: 8px;
}
.mg-moldrill-name {
  font-family: Orbitron, sans-serif; font-size: 1.85rem;
  font-weight: 900; color: #fff;
  text-shadow: 0 0 24px rgba(110,231,183,0.55), 0 0 50px rgba(16,185,129,0.3);
  text-align: center; padding: 4px 0 12px;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  word-break: break-word;
}
.mg-moldrill-hint {
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  text-align: center; margin-bottom: 14px;
}

.mg-moldrill-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; width: 100%; min-height: 130px;
  border: 2px dashed rgba(16,185,129,0.4);
  border-radius: 14px;
  background: rgba(16,185,129,0.04);
  cursor: pointer; padding: 18px;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.mg-moldrill-drop:hover { background: rgba(16,185,129,0.09); border-color: rgba(16,185,129,0.6); transform: translateY(-1px); }
.mg-moldrill-drop.drag { background: rgba(16,185,129,0.16); border-color: #10b981; }
.mg-moldrill-drop.has-file { border-style: solid; border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.07); }
.mg-moldrill-drop.disabled { opacity: 0.5; pointer-events: none; }
.mg-moldrill-drop-icon { font-size: 1.6rem; }
.mg-moldrill-drop-label {
  font-family: Orbitron, sans-serif; font-size: 0.78rem;
  color: #6ee7b7; letter-spacing: 0.06em;
}
.mg-moldrill-drop-sub { font-size: 0.7rem; color: rgba(255,255,255,0.4); }

.mg-moldrill-preview {
  display: block; max-width: 100%; max-height: 280px; margin: 14px auto 0;
  border-radius: 12px;
  border: 1px solid rgba(16,185,129,0.3);
  background: #fff;
  padding: 6px;
}
.mg-moldrill-preview.hidden { display: none; }

.mg-moldrill-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  margin-top: 16px;
}
.mg-moldrill-btn-skip,
.mg-moldrill-btn-submit,
.mg-moldrill-btn-next {
  font-family: Orbitron, sans-serif; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.08em;
  padding: 11px 22px; border-radius: 10px; cursor: pointer; border: none;
  transition: box-shadow 0.18s, transform 0.12s, background 0.18s;
}
.mg-moldrill-btn-skip {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.14);
}
.mg-moldrill-btn-skip:hover { background: rgba(255,255,255,0.1); }
.mg-moldrill-btn-submit {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #052e16;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}
.mg-moldrill-btn-submit:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(16,185,129,0.5); transform: translateY(-1px); }
.mg-moldrill-btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.mg-moldrill-feedback {
  width: 100%; margin-top: 18px; padding: 16px 16px;
  border-radius: 12px; display: flex; flex-direction: column; gap: 10px;
}
.mg-moldrill-feedback.hidden { display: none; }
.mg-moldrill-feedback.ok {
  background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.35);
  color: #d1fae5;
}
.mg-moldrill-feedback.miss {
  background: rgba(248,113,113,0.08); border: 1px solid rgba(248,113,113,0.35);
  color: #fee2e2;
}
.mg-md-fb-head {
  font-family: Orbitron, sans-serif; font-size: 0.92rem; font-weight: 800;
  letter-spacing: 0.06em;
}
.mg-moldrill-feedback.ok .mg-md-fb-head { color: #4ade80; }
.mg-moldrill-feedback.miss .mg-md-fb-head { color: #f87171; }
.mg-md-fb-body { font-size: 0.86rem; line-height: 1.5; color: rgba(255,255,255,0.85); }
.mg-md-fb-hint {
  font-size: 0.82rem; line-height: 1.5; color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.04); border-left: 2px solid rgba(110,231,183,0.5);
  padding: 8px 12px; border-radius: 6px;
}
.mg-md-fb-correct {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-top: 4px;
}
.mg-md-fb-correct-label {
  font-family: Orbitron, sans-serif; font-size: 0.7rem;
  letter-spacing: 0.12em; color: rgba(110,231,183,0.85);
}
.mg-md-fb-correct img {
  max-width: 220px; max-height: 200px;
  background: #fff; padding: 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
}
.mg-md-fb-requeue {
  font-size: 0.78rem; color: rgba(251,191,36,0.85);
  text-align: center; padding-top: 4px;
}

.mg-md-fb-props {
  margin-top: 6px; padding: 14px 14px;
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(167,139,250,0.28);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.mg-md-fb-props-title {
  font-family: Orbitron, sans-serif; font-size: 0.74rem;
  letter-spacing: 0.12em; color: #c4b5fd;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(167,139,250,0.18);
}
.mg-md-fb-prop {
  display: grid; grid-template-columns: 110px 1fr; gap: 10px;
  font-size: 0.82rem; line-height: 1.45;
}
.mg-md-fb-prop-k {
  font-family: Orbitron, sans-serif; font-size: 0.66rem;
  letter-spacing: 0.08em; color: rgba(196,181,253,0.85);
  text-transform: uppercase; padding-top: 2px;
}
.mg-md-fb-prop-v { color: rgba(255,255,255,0.88); }
.mg-md-fb-prop-warn {
  background: rgba(251,191,36,0.08);
  border-left: 2px solid rgba(251,191,36,0.6);
  padding: 6px 10px; border-radius: 4px;
}
.mg-md-fb-prop-warn .mg-md-fb-prop-k { color: #fbbf24; }
@media (max-width: 540px) {
  .mg-md-fb-prop { grid-template-columns: 1fr; gap: 2px; }
  .mg-md-fb-prop-k { padding-top: 0; }
}
.mg-moldrill-btn-next {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.4);
  align-self: stretch; margin-top: 6px;
}
.mg-moldrill-btn-next:hover { box-shadow: 0 8px 22px rgba(168,85,247,0.55); transform: translateY(-1px); }

.mg-moldrill-quit {
  background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 0.78rem; cursor: pointer; padding: 6px 12px;
  margin-top: 8px;
}
.mg-moldrill-quit:hover { color: rgba(255,255,255,0.7); }

/* Results */
.mg-md-results {
  align-items: center; text-align: center; padding: 30px 20px;
  background: linear-gradient(165deg, rgba(16,185,129,0.06), rgba(9,7,30,0.98));
  border: 1px solid rgba(16,185,129,0.25); border-radius: 18px;
}
.mg-md-results-icon { font-size: 3rem; }
.mg-md-results-title {
  font-family: Orbitron, sans-serif; font-size: 1.5rem; font-weight: 900;
  color: #6ee7b7; letter-spacing: 0.06em;
}
.mg-md-results-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px;
  width: 100%; max-width: 360px; margin: 6px 0;
  font-size: 0.88rem; color: rgba(255,255,255,0.85);
}
.mg-md-results-stats > div { padding: 8px 10px; background: rgba(16,185,129,0.06); border-radius: 8px; }
.mg-md-results-reward {
  font-family: Orbitron, sans-serif; font-size: 0.82rem;
  color: #fbbf24; letter-spacing: 0.08em; padding: 6px 14px;
  background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3);
  border-radius: 999px;
}
.mg-md-results-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* ── Drill input tabs (Photo / PDF crop / Draw) ──────────── */
.mg-md-tabs {
  display: flex; gap: 6px; margin: 14px 0 12px;
  background: rgba(0,0,0,0.3); padding: 4px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.06);
}
.mg-md-tab {
  flex: 1; padding: 9px 6px; background: transparent; border: none; cursor: pointer;
  font-family: Orbitron, sans-serif; font-size: 0.7rem; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55); border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.mg-md-tab:hover { color: rgba(255,255,255,0.9); }
.mg-md-tab.active { background: rgba(16,185,129,0.18); color: #6ee7b7; box-shadow: 0 2px 10px rgba(16,185,129,0.18); }
.mg-md-pane { display: none; }
.mg-md-pane.active { display: block; }

.mg-md-launch-btn {
  width: 100%; min-height: 130px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 18px;
  background: rgba(16,185,129,0.05);
  border: 2px dashed rgba(16,185,129,0.4);
  border-radius: 12px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.mg-md-launch-btn:hover { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.6); transform: translateY(-1px); }
.mg-md-launch-icon { font-size: 1.6rem; }
.mg-md-launch-label { font-family: Orbitron, sans-serif; font-size: 0.78rem; color: #6ee7b7; letter-spacing: 0.05em; }
.mg-md-launch-sub { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

.mg-md-source-badge {
  margin: 10px auto 0; display: inline-block;
  font-family: Orbitron, sans-serif; font-size: 0.66rem;
  letter-spacing: 0.1em;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(110,231,183,0.12);
  color: #6ee7b7;
  border: 1px solid rgba(110,231,183,0.3);
  text-transform: uppercase;
}
.mg-md-source-badge.hidden { display: none; }

/* ── PDF cropper modal ───────────────────────────────────── */
.mg-pdfcrop-ov {
  position: fixed; inset: 0; z-index: 9950;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: mg-fade-in 0.25s ease forwards;
}
.mg-pdfcrop-inner {
  width: 100%; max-width: 1100px; height: 92vh;
  background: #0a0a14;
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mg-pdfcrop-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(16,185,129,0.08);
  border-bottom: 1px solid rgba(16,185,129,0.18);
}
.mg-pdfcrop-title { font-family: Orbitron, sans-serif; font-size: 0.92rem; color: #fff; letter-spacing: 0.04em; }
.mg-pdfcrop-title strong { color: #6ee7b7; }
.mg-pdfcrop-close {
  background: rgba(255,255,255,0.08); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.mg-pdfcrop-close:hover { background: rgba(255,255,255,0.18); }

.mg-pdfcrop-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 18px; background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mg-pc-btn {
  background: rgba(16,185,129,0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16,185,129,0.32);
  padding: 7px 14px; border-radius: 8px;
  font-family: Orbitron, sans-serif; font-size: 0.7rem;
  letter-spacing: 0.05em; cursor: pointer;
  transition: background 0.15s;
}
.mg-pc-btn:hover { background: rgba(16,185,129,0.22); }
.mg-pc-btn-load {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #052e16; border: none; font-weight: 700;
}
.mg-pc-btn-zoom { padding: 7px 11px; min-width: 36px; }
.mg-pc-pageinfo { display: flex; align-items: center; gap: 8px; }
.mg-pc-pageinfo.hidden { display: none; }
.mg-pc-pageinfo span { font-family: Orbitron, sans-serif; font-size: 0.78rem; color: rgba(255,255,255,0.85); padding: 0 6px; }

.mg-pdfcrop-stage {
  flex: 1; overflow: auto;
  background: #1a1a26;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; position: relative;
}
.mg-pc-empty {
  align-self: center; color: rgba(255,255,255,0.5);
  text-align: center; line-height: 1.6;
  font-family: Orbitron, sans-serif; font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.mg-pc-hint { font-size: 0.72rem; color: rgba(255,255,255,0.35); }
#mg-pc-canvas {
  cursor: crosshair;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
  border-radius: 4px;
  position: relative;
}
#mg-pc-canvas.hidden { display: none; }
.mg-pc-selection {
  position: absolute;
  border: 2px solid #34d399;
  background: rgba(52,211,153,0.18);
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.4);
}
.mg-pc-selection.hidden { display: none; }

.mg-pdfcrop-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 14px 18px;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mg-pc-btn-cancel {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 9px 18px; border-radius: 8px; cursor: pointer;
  font-family: Orbitron, sans-serif; font-size: 0.74rem; letter-spacing: 0.06em;
}
.mg-pc-btn-cancel:hover { background: rgba(255,255,255,0.12); }
.mg-pc-btn-validate {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #052e16; border: none;
  padding: 9px 22px; border-radius: 8px; cursor: pointer;
  font-family: Orbitron, sans-serif; font-size: 0.74rem; letter-spacing: 0.06em;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}
.mg-pc-btn-validate:hover:not(:disabled) { box-shadow: 0 8px 22px rgba(16,185,129,0.5); }
.mg-pc-btn-validate:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ── JSME sketcher modal ─────────────────────────────────── */
.mg-sketch-ov {
  position: fixed; inset: 0; z-index: 9950;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: mg-fade-in 0.25s ease forwards;
}
.mg-sketch-inner {
  width: 100%; max-width: 920px;
  background: #0a0a14;
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mg-sketch-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(16,185,129,0.08);
  border-bottom: 1px solid rgba(16,185,129,0.18);
}
.mg-sketch-title { font-family: Orbitron, sans-serif; font-size: 0.92rem; color: #fff; letter-spacing: 0.04em; }
.mg-sketch-title strong { color: #6ee7b7; }
.mg-sketch-close {
  background: rgba(255,255,255,0.08); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.mg-sketch-close:hover { background: rgba(255,255,255,0.18); }

.mg-sketch-stage {
  background: #fff;
  min-height: 540px;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  position: relative;
}
.mg-sketch-loading {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: Orbitron, sans-serif; font-size: 0.8rem;
  color: rgba(0,0,0,0.6); letter-spacing: 0.05em;
}
.mg-sketch-loading.hidden { display: none; }
.mg-sketch-jsme { width: 100%; }
.mg-sketch-jsme.hidden { display: none; }

.mg-sketch-tip {
  font-size: 0.78rem; color: rgba(255,255,255,0.6);
  padding: 10px 18px;
  background: rgba(110,231,183,0.06);
  border-top: 1px solid rgba(110,231,183,0.18);
  border-bottom: 1px solid rgba(110,231,183,0.18);
  line-height: 1.45;
}
.mg-sketch-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  padding: 14px 18px;
  background: rgba(0,0,0,0.4);
}

/* ── Copie 20/20 — Type pick card ────────────────────────── */
.mg-type-pick-card.tpa {
  border-color: rgba(251,191,36,0.45); border-left: 3px solid #fbbf24;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(251,191,36,0.14);
}
.mg-type-pick-card.tpa:hover { box-shadow: 0 12px 38px rgba(251,191,36,0.36), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(120,53,15,0.15), rgba(9,7,30,0.98)); }
.mg-type-pick-card.tpa .mg-type-pick-icon-wrap { background: rgba(251,191,36,0.16); border: 1px solid rgba(251,191,36,0.38); }
.mg-type-pick-card.tpa .mg-type-pick-icon-wrap svg { stroke: #fbbf24; fill: rgba(251,191,36,0.15); }
.mg-type-pick-card.tpa .mg-type-pick-label { color: #fcd34d; }

/* ── Copie 20/20 — Overlay ───────────────────────────────── */
.mg-perfect-ov {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(6,4,20,0.97);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 16px; box-sizing: border-box;
  overflow-y: auto;
  animation: mg-fade-in 0.35s ease forwards;
}
.mg-perfect-inner {
  width: 100%; max-width: 760px; position: relative;
  background: linear-gradient(165deg, rgba(251,191,36,0.04), rgba(9,7,30,0.98));
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.55);
  display: flex; flex-direction: column; gap: 16px;
}
.mg-perfect-quit {
  position: absolute; top: 12px; right: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 1rem;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mg-perfect-quit:hover { background: rgba(255,255,255,0.12); color: #fff; }

.mg-perfect-header {
  display: flex; align-items: center; gap: 14px;
  padding-right: 36px;
}
.mg-perfect-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 12px rgba(251,191,36,0.6));
}
.mg-perfect-title {
  font-family: Orbitron, sans-serif; font-size: 1.45rem; font-weight: 900;
  color: #fcd34d; letter-spacing: 0.06em;
  text-shadow: 0 0 18px rgba(251,191,36,0.5);
}
.mg-perfect-sub {
  font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-top: 2px;
}
.mg-perfect-sub strong { color: #fcd34d; }

.mg-perfect-tabs {
  display: flex; gap: 6px;
  background: rgba(255,255,255,0.04);
  padding: 4px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}
.mg-pa-tab {
  flex: 1; padding: 10px; background: transparent; border: none; cursor: pointer;
  font-family: Orbitron, sans-serif; font-size: 0.74rem; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.mg-pa-tab:hover { color: rgba(255,255,255,0.85); }
.mg-pa-tab.active {
  background: rgba(251,191,36,0.16);
  color: #fcd34d;
  box-shadow: 0 2px 10px rgba(251,191,36,0.18);
}

.mg-pa-pane { display: none; }
.mg-pa-pane.active { display: block; }

#mg-pa-text {
  width: 100%; min-height: 140px;
  background: rgba(0,0,0,0.4);
  color: #fff; font-size: 0.92rem; line-height: 1.5;
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}
#mg-pa-text:focus { outline: none; border-color: rgba(251,191,36,0.6); box-shadow: 0 0 0 3px rgba(251,191,36,0.12); }

.mg-pa-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 130px;
  border: 2px dashed rgba(251,191,36,0.4);
  border-radius: 12px;
  background: rgba(251,191,36,0.04);
  cursor: pointer; padding: 18px;
  transition: background 0.18s, border-color 0.18s;
}
.mg-pa-drop:hover { background: rgba(251,191,36,0.09); border-color: rgba(251,191,36,0.6); }
.mg-pa-drop.drag { background: rgba(251,191,36,0.16); border-color: #fbbf24; }
.mg-pa-drop.has-file { border-style: solid; border-color: rgba(251,191,36,0.55); background: rgba(251,191,36,0.08); }
.mg-pa-drop-icon { font-size: 1.6rem; }
.mg-pa-drop-label {
  font-family: Orbitron, sans-serif; font-size: 0.78rem;
  color: #fcd34d; letter-spacing: 0.05em;
}
.mg-pa-drop-sub { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

.mg-pa-preview {
  display: block; max-width: 100%; max-height: 280px; margin: 12px auto 0;
  border-radius: 10px; padding: 6px;
  border: 1px solid rgba(251,191,36,0.3);
  background: #fff;
}
.mg-pa-preview.hidden { display: none; }

.mg-pa-pdf-status {
  margin-top: 10px; padding: 10px 14px;
  background: rgba(0,0,0,0.3); border-radius: 8px;
  border-left: 3px solid #fbbf24;
  font-size: 0.85rem; color: rgba(255,255,255,0.85);
}
.mg-pa-pdf-status.hidden { display: none; }

.mg-perfect-submit {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #422006; border: none; cursor: pointer;
  font-family: Orbitron, sans-serif; font-weight: 800;
  font-size: 0.9rem; letter-spacing: 0.08em;
  padding: 14px 20px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(251,191,36,0.4);
  transition: box-shadow 0.18s, transform 0.12s;
}
.mg-perfect-submit:hover:not(:disabled) { box-shadow: 0 12px 32px rgba(251,191,36,0.55); transform: translateY(-1px); }
.mg-perfect-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.mg-perfect-result {
  margin-top: 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 14px;
  padding: 18px 18px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.mg-perfect-result.hidden { display: none; }

.mg-pa-loading {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 30px 10px;
  font-family: Orbitron, sans-serif; font-size: 0.78rem;
  color: rgba(252,211,77,0.85); letter-spacing: 0.08em;
  text-align: center;
}
.mg-pa-spinner {
  width: 38px; height: 38px;
  border: 3px solid rgba(251,191,36,0.15);
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: mg-pa-spin 0.85s linear infinite;
}
@keyframes mg-pa-spin { to { transform: rotate(360deg); } }

.mg-pa-error {
  padding: 14px;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.35);
  color: #fecaca; border-radius: 10px;
  font-size: 0.86rem;
}

.mg-pa-result-head {
  display: flex; flex-direction: column; gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mg-pa-result-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 10px;
  font-size: 0.85rem;
}
.mg-pa-result-k {
  font-family: Orbitron, sans-serif; font-size: 0.66rem;
  letter-spacing: 0.1em; color: rgba(252,211,77,0.85);
  text-transform: uppercase; padding-top: 2px;
}
.mg-pa-result-v { color: rgba(255,255,255,0.88); line-height: 1.45; }

.mg-pa-answer-banner {
  font-family: Orbitron, sans-serif; font-size: 0.78rem;
  letter-spacing: 0.1em; color: #fcd34d;
  padding: 10px 14px;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.32);
  border-radius: 8px;
}

.mg-pa-answer {
  font-family: 'Inter', 'Georgia', serif; font-size: 0.96rem;
  line-height: 1.65; color: rgba(255,255,255,0.94);
  padding: 18px 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border-left: 3px solid #fbbf24;
}
.mg-pa-answer h2 { font-family: Orbitron, sans-serif; font-size: 1.1rem; color: #fcd34d; margin: 16px 0 8px; letter-spacing: 0.04em; }
.mg-pa-answer h3 { font-family: Orbitron, sans-serif; font-size: 0.95rem; color: #fcd34d; margin: 14px 0 6px; letter-spacing: 0.04em; }
.mg-pa-answer h4 { font-size: 0.92rem; color: rgba(252,211,77,0.85); margin: 12px 0 4px; font-weight: 700; }
.mg-pa-answer p { margin: 8px 0; }
.mg-pa-answer ul, .mg-pa-answer ol { margin: 8px 0 8px 22px; padding: 0; }
.mg-pa-answer li { margin: 4px 0; }
.mg-pa-answer strong { color: #fcd34d; font-weight: 700; }
.mg-pa-answer em { color: rgba(255,255,255,0.78); }

.mg-pa-keypoints {
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 10px;
  padding: 14px 18px;
}
.mg-pa-kp-title {
  font-family: Orbitron, sans-serif; font-size: 0.82rem;
  color: #4ade80; letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.mg-pa-keypoints ul { margin: 0 0 0 18px; padding: 0; }
.mg-pa-keypoints li { color: rgba(255,255,255,0.92); line-height: 1.55; margin: 4px 0; font-size: 0.88rem; }

.mg-pa-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}
.mg-pa-copy {
  background: rgba(251,191,36,0.16);
  color: #fcd34d;
  border: 1px solid rgba(251,191,36,0.4);
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: Orbitron, sans-serif;
  font-size: 0.74rem; letter-spacing: 0.08em;
  transition: background 0.15s;
}
.mg-pa-copy:hover { background: rgba(251,191,36,0.26); }

@media (max-width: 600px) {
  .mg-pa-result-row { grid-template-columns: 1fr; gap: 2px; }
  .mg-pa-result-k { padding-top: 0; }
  .mg-perfect-header { flex-direction: column; text-align: center; gap: 8px; padding-right: 0; padding-top: 22px; }
}

/* ── Exam annales step ────────────────────────────────────── */
.mg-eas-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; width: 100%; max-width: 520px; padding: 20px 16px;
  box-sizing: border-box;
}
.mg-eas-monster {
  display: flex; align-items: flex-start; gap: 16px; width: 100%;
}
.mg-eas-annales-zone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%;
}
.mg-eas-upload-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 28px;
  background: rgba(8,5,25,0.8);
  border: 2px dashed rgba(245,158,11,0.5);
  border-radius: 14px; cursor: pointer;
  color: rgba(245,158,11,0.85);
  font-family: Orbitron, sans-serif; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.08em;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.mg-eas-upload-btn:hover { border-color: #f59e0b; color: #fcd34d; background: rgba(245,158,11,0.06); }
.mg-eas-upload-btn.loaded {
  border-style: solid; border-color: rgba(74,222,128,0.6);
  color: #4ade80; background: rgba(74,222,128,0.06);
}
.mg-eas-clear-btn {
  background: none; border: none; color: rgba(248,113,113,0.6);
  font-size: 0.75rem; cursor: pointer; text-decoration: underline;
  padding: 0;
}
.mg-eas-clear-btn:hover { color: #f87171; }
.mg-eas-hint { font-size: 0.75rem; color: rgba(255,255,255,0.35); text-align: center; }
.mg-eas-page-range {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 12px;
}
.mg-eas-page-label { font-size: 0.68rem; color: rgba(196,181,253,0.7); font-family: Orbitron, sans-serif; letter-spacing: 0.08em; }
.mg-eas-page-inputs { display: flex; align-items: center; gap: 8px; }
.mg-eas-page-input {
  width: 52px; padding: 6px 8px; text-align: center;
  background: rgba(15,10,40,0.8);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 8px; color: #e9d5ff;
  font-size: 0.85rem; font-weight: 700;
}
.mg-eas-page-input:focus { outline: none; border-color: rgba(167,139,250,0.7); }
.mg-eas-page-sep { color: rgba(167,139,250,0.5); font-size: 0.9rem; }
.mg-eas-page-total { font-size: 0.68rem; color: rgba(167,139,250,0.4); }
.mg-eas-go-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 40px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #fff; font-family: Orbitron, sans-serif; font-size: 0.88rem;
  font-weight: 800; letter-spacing: 0.1em;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 0 28px rgba(245,158,11,0.45);
  transition: box-shadow 0.2s, transform 0.15s;
}
.mg-eas-go-btn:hover { box-shadow: 0 0 44px rgba(245,158,11,0.7); transform: translateY(-2px); }
.mg-eas-direct-btn {
  background: linear-gradient(135deg, #1d4ed8, #6366f1) !important;
  box-shadow: 0 0 28px rgba(99,102,241,0.45) !important;
}
.mg-eas-direct-btn:hover { box-shadow: 0 0 44px rgba(99,102,241,0.7) !important; }
.mg-eas-secondary-btn {
  background: linear-gradient(135deg, #78350f, #b45309) !important;
  box-shadow: 0 0 18px rgba(180,83,9,0.3) !important;
  font-size: 0.76rem !important; padding: 11px 28px !important;
}
.mg-eas-back-btn {
  background: none; border: none; color: rgba(255,255,255,0.3);
  font-size: 0.78rem; cursor: pointer; padding: 0;
}
.mg-eas-back-btn:hover { color: rgba(255,255,255,0.6); }

/* ── Exam Mode — Type pick card ───────────────────────────── */
.mg-type-pick-card.te {
  border-color: rgba(251,191,36,0.32); border-left: 3px solid #fbbf24;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(245,158,11,0.1);
}
.mg-type-pick-card.te:hover { box-shadow: 0 12px 38px rgba(245,158,11,0.28), inset 0 1px 0 rgba(255,255,255,0.1); background: linear-gradient(150deg, rgba(120,53,15,0.09), rgba(9,7,30,0.98)); }
.mg-type-pick-card.te .mg-type-pick-icon-wrap { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.28); }
.mg-type-pick-card.te .mg-type-pick-icon-wrap svg { stroke: #fbbf24; }
.mg-type-pick-card.te .mg-type-pick-label { color: #fde68a; }

/* ── Exam loading overlay ─────────────────────────────────── */
/* ══ Premium loading overlay ═════════════════════════════ */
.mg-exam-loading-ov {
  position: fixed; inset: 0; z-index: 9900;
  background: radial-gradient(ellipse at 40% 40%, #0d0823 0%, #060414 60%, #020210 100%);
  display: flex; align-items: center; justify-content: center;
  animation: mg-fade-in 0.35s ease;
  overflow: hidden;
}
.mg-elov-stars {
  position: absolute; inset: 0; pointer-events: none;
}
.mg-elov-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center; padding: 40px 32px;
}
.mg-elov-monster-wrap {
  position: relative; display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.mg-elov-aura {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  animation: mg-elov-pulse 2.4s ease-in-out infinite;
}
.mg-elov-gold .mg-elov-aura {
  background: radial-gradient(circle, rgba(245,158,11,0.22) 0%, transparent 70%);
  box-shadow: 0 0 60px rgba(245,158,11,0.15), 0 0 120px rgba(245,158,11,0.08);
}
.mg-elov-blue .mg-elov-aura {
  background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 70%);
  box-shadow: 0 0 60px rgba(99,102,241,0.15), 0 0 120px rgba(99,102,241,0.08);
}
@keyframes mg-elov-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.12); opacity: 1; }
}
.mg-elov-monster {
  width: 140px; height: auto;
  filter: drop-shadow(0 0 30px rgba(139,92,246,0.5));
  animation: mg-elov-float 3s ease-in-out infinite;
}
@keyframes mg-elov-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.mg-elov-title {
  font-family: Orbitron, sans-serif; font-size: 1.05rem; font-weight: 900;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.mg-elov-gold .mg-elov-title { color: #fcd34d; text-shadow: 0 0 20px rgba(245,158,11,0.6); }
.mg-elov-blue .mg-elov-title { color: #a5b4fc; text-shadow: 0 0 20px rgba(99,102,241,0.6); }

.mg-elov-step {
  font-size: 0.82rem; color: rgba(255,255,255,0.5);
  min-height: 1.2em; transition: opacity 0.2s ease;
}
.mg-elov-bar-wrap {
  width: 260px; height: 3px;
  background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden;
}
.mg-elov-bar-fill {
  height: 100%; width: 0;
  border-radius: 99px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px currentColor;
}
.mg-elov-gold .mg-elov-bar-fill { background: linear-gradient(90deg, #b45309, #fcd34d); color: #fcd34d; }
.mg-elov-blue .mg-elov-bar-fill { background: linear-gradient(90deg, #4338ca, #a5b4fc); color: #a5b4fc; }

.mg-elov-dots { display: flex; gap: 6px; }
.mg-elov-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  animation: mg-elov-dot 1.2s ease-in-out infinite;
}
.mg-elov-dots span:nth-child(2) { animation-delay: 0.2s; }
.mg-elov-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes mg-elov-dot {
  0%, 80%, 100% { transform: scale(1);   background: rgba(255,255,255,0.2); }
  40%            { transform: scale(1.5); background: rgba(255,255,255,0.6); }
}

/* ── Exam Paper ───────────────────────────────────────────── */
.mg-exam-paper-ov {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(6,4,20,0.95);
  overflow-y: auto;
  padding: 24px 16px 60px;
  box-sizing: border-box;
}

/* ── Chat monstre flottant dans l'exam ── */
.mg-exam-chat-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9900;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: 2px solid rgba(196,181,253,0.5);
  box-shadow: 0 0 24px rgba(124,58,237,0.6), 0 4px 16px rgba(0,0,0,0.4);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.mg-exam-chat-fab img {
  width: 30px; height: 30px; object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(196,181,253,0.8));
}
.mg-exam-chat-fab-label {
  font-size: 0.48rem; font-weight: 800; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85); font-family: 'Orbitron', sans-serif;
  line-height: 1;
}
.mg-exam-chat-fab:hover { transform: scale(1.08); box-shadow: 0 0 32px rgba(124,58,237,0.8), 0 4px 20px rgba(0,0,0,0.5); }
.mg-exam-chat-fab.active { background: linear-gradient(135deg, #4f46e5, #7c3aed); }

.mg-exam-chat-panel {
  position: fixed; bottom: 100px; right: 20px; z-index: 9901;
  width: 320px; height: 480px;
  background: linear-gradient(150deg, rgba(14,8,36,0.98) 0%, rgba(6,4,18,0.98) 100%);
  border: 1px solid rgba(139,92,246,0.4); border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(139,92,246,0.15);
  animation: mg-card-enter 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.mg-exam-chat-panel.hidden { display: none; }
.mg-exam-chat-panel .mg-game-chat {
  flex: 1; width: 100%; height: 100%;
  border: none; border-radius: 0; position: static;
  box-shadow: none; animation: none;
}
.mg-exam-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 0;
}

/* ── Pages PDF du sujet ──────────────────────────────────── */
.mg-exam-pages-section {
  margin: 16px 0; padding: 16px;
  background: rgba(15,10,40,0.6);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px;
}
.mg-exam-pages-label {
  font-family: Orbitron, sans-serif; font-size: 0.6rem; font-weight: 700;
  color: rgba(165,180,252,0.6); letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.mg-exam-pages-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.mg-exam-page-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: transform 0.15s;
}
.mg-exam-page-thumb:hover { transform: scale(1.04); }
.mg-exam-page-thumb img {
  width: 90px; height: auto; border-radius: 6px;
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.mg-exam-page-thumb span { font-size: 0.6rem; color: rgba(165,180,252,0.5); }
.mg-exam-page-zoomed {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
}
.mg-exam-page-zoomed img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 10px; box-shadow: 0 0 60px rgba(99,102,241,0.3);
}
.mg-exam-page-zoomed button {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 1.5rem; cursor: pointer;
}

/* ── Énoncé général ──────────────────────────────────────── */
.mg-exam-enonce-general {
  margin: 0 0 20px; padding: 18px 20px;
  background: rgba(120,53,15,0.12);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 12px;
}
.mg-exam-eg-label {
  font-family: Orbitron, sans-serif; font-size: 0.6rem; font-weight: 700;
  color: #f59e0b; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 10px;
}
.mg-exam-eg-body {
  font-size: 0.88rem; color: rgba(255,255,255,0.85);
  line-height: 1.7; white-space: pre-wrap;
}
.mg-exam-header {
  background: rgba(120,53,15,0.18);
  border: 1.5px solid rgba(245,158,11,0.3);
  border-radius: 16px 16px 0 0;
  padding: 22px 28px 18px;
  border-bottom: none;
}
.mg-exam-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mg-exam-badge {
  font-family: Orbitron, sans-serif; font-size: 0.65rem; font-weight: 900;
  letter-spacing: 0.18em; color: #f59e0b;
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.35);
  padding: 4px 12px; border-radius: 100px;
}
.mg-exam-meta { display: flex; gap: 18px; font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.mg-exam-title {
  font-family: Orbitron, sans-serif; font-size: 1.05rem; font-weight: 800;
  color: #fcd34d; margin: 0 0 8px;
}
.mg-exam-consigne { font-size: 0.75rem; color: rgba(255,255,255,0.35); font-style: italic; }

.mg-exam-body {
  background: rgba(8,5,25,0.7);
  border: 1.5px solid rgba(245,158,11,0.25);
  border-top: none; border-bottom: none;
  padding: 0 28px;
}
.mg-exam-question {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mg-exam-question:last-child { border-bottom: none; }
.mg-exam-q-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.mg-exam-q-num {
  font-family: Orbitron, sans-serif; font-size: 0.75rem; font-weight: 700;
  color: #f59e0b; letter-spacing: 0.1em;
}
.mg-exam-q-pts { font-size: 0.78rem; color: rgba(245,158,11,0.6); }
.mg-exam-q-enonce {
  font-size: 0.93rem; color: rgba(255,255,255,0.88);
  line-height: 1.55; margin-bottom: 14px;
  white-space: pre-wrap;
}
.mg-exam-pts { font-size: 0.78rem; color: rgba(245,158,11,0.6); font-style: italic; }
.mg-exam-sub-q { margin-bottom: 14px; }
.mg-exam-sub-label { font-size: 0.88rem; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.mg-exam-textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(255,255,255,0.88);
  font-size: 0.9rem; font-family: inherit;
  padding: 12px 14px; line-height: 1.55;
  resize: vertical; min-height: 90px;
  transition: border-color 0.2s;
}
.mg-exam-textarea:focus {
  outline: none; border-color: rgba(245,158,11,0.5);
  background: rgba(245,158,11,0.04);
}
.mg-exam-textarea::placeholder { color: rgba(255,255,255,0.2); }

.mg-exam-footer {
  background: rgba(8,5,25,0.7);
  border: 1.5px solid rgba(245,158,11,0.25);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 0 0 16px 16px;
  padding: 22px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mg-exam-submit-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: #fff; font-family: Orbitron, sans-serif; font-size: 0.88rem;
  font-weight: 800; letter-spacing: 0.1em;
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 0 24px rgba(245,158,11,0.4);
  transition: box-shadow 0.2s, transform 0.15s;
}
.mg-exam-submit-btn:hover { box-shadow: 0 0 40px rgba(245,158,11,0.65); transform: translateY(-2px); }
.mg-exam-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.mg-exam-submit-note { font-size: 0.72rem; color: rgba(255,255,255,0.3); text-align: center; }

/* ── Exam Results ─────────────────────────────────────────── */
.mg-exam-results-ov {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(6,4,20,0.97);
  overflow-y: auto;
  padding: 24px 16px 80px;
  box-sizing: border-box;
  animation: mg-fade-in 0.4s ease forwards;
}
.mg-er-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }

.mg-er-hero {
  display: flex; align-items: center; gap: 24px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 24px 28px;
}
.mg-er-note-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.mg-er-note-circle {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid var(--note-color, #a78bfa);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 28px color-mix(in srgb, var(--note-color, #a78bfa) 40%, transparent);
}
.mg-er-note-val { font-family: Orbitron, sans-serif; font-size: 1.6rem; font-weight: 900; color: #fff; line-height: 1; }
.mg-er-note-sur { font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.mg-er-note-pct { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.mg-er-hero-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mg-er-mention { font-family: Orbitron, sans-serif; font-size: 0.95rem; font-weight: 900; letter-spacing: 0.12em; }
.mg-er-reco { font-size: 0.85rem; color: rgba(255,255,255,0.65); line-height: 1.5; }

.mg-er-bilan {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 560px) { .mg-er-bilan { grid-template-columns: 1fr; } }
.mg-er-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.mg-er-section-title { font-family: Orbitron, sans-serif; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 4px; }

.mg-er-fort, .mg-er-faible {
  display: flex; align-items: flex-start; gap: 10px; font-size: 0.83rem;
}
.mg-er-fort-icon { color: #4ade80; font-size: 0.9rem; flex-shrink: 0; margin-top: 2px; }
.mg-er-faible-icon { color: #fb923c; font-size: 0.9rem; flex-shrink: 0; margin-top: 2px; }
.mg-er-fort strong, .mg-er-faible strong { color: rgba(255,255,255,0.85); }
.mg-er-fort span, .mg-er-faible span { color: rgba(255,255,255,0.5); }
.mg-er-revoir { color: rgba(251,146,60,0.7); font-size: 0.78rem; }

.mg-er-detail-title {
  font-family: Orbitron, sans-serif; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.35); text-transform: uppercase;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mg-er-corrections { display: flex; flex-direction: column; gap: 12px; }
.mg-er-question {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.mg-er-q-header { display: flex; align-items: center; justify-content: space-between; }
.mg-er-q-label { font-family: Orbitron, sans-serif; font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.55); letter-spacing: 0.1em; }
.mg-er-q-score { font-family: Orbitron, sans-serif; font-size: 0.88rem; font-weight: 900; }
.mg-er-score-bar { height: 3px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.mg-er-score-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

.mg-er-elems { display: flex; flex-direction: column; gap: 5px; }
.mg-er-elem { display: flex; align-items: flex-start; gap: 8px; font-size: 0.82rem; padding: 5px 8px; border-radius: 7px; }
.mg-er-elem.ok { background: rgba(74,222,128,0.06); color: rgba(255,255,255,0.75); }
.mg-er-elem.miss { background: rgba(248,113,113,0.06); color: rgba(255,255,255,0.55); }
.mg-er-elem-icon { font-size: 0.78rem; flex-shrink: 0; margin-top: 1px; }
.mg-er-elem.ok .mg-er-elem-icon { color: #4ade80; }
.mg-er-elem.miss .mg-er-elem-icon { color: #f87171; }
.mg-er-elem-just { font-size: 0.75rem; color: rgba(248,113,113,0.6); margin-left: 4px; }

.mg-er-errs { display: flex; flex-direction: column; gap: 5px; }
.mg-er-err {
  font-size: 0.8rem; color: rgba(255,255,255,0.55);
  padding: 6px 10px; background: rgba(248,113,113,0.05);
  border-left: 2px solid rgba(248,113,113,0.3); border-radius: 0 7px 7px 0;
}
.mg-er-err-type {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #f87171; background: rgba(248,113,113,0.1); padding: 1px 6px; border-radius: 4px; margin-right: 6px;
}
.mg-er-corr { color: rgba(167,139,250,0.7); font-style: normal; }
.mg-er-comment {
  font-size: 0.82rem; color: rgba(255,255,255,0.5); font-style: italic;
  padding: 8px 12px; background: rgba(167,139,250,0.05);
  border-left: 2px solid rgba(167,139,250,0.25); border-radius: 0 7px 7px 0;
}

.mg-er-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  padding-top: 8px;
}
.mg-er-btn-picker {
  padding: 12px 28px;
  background: transparent;
  border: 1.5px solid rgba(167,139,250,0.4);
  color: #a78bfa; font-family: Orbitron, sans-serif; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.08em;
  border-radius: 10px; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mg-er-btn-picker:hover { border-color: #a78bfa; box-shadow: 0 0 16px rgba(167,139,250,0.25); }
.mg-er-btn-end {
  padding: 12px 28px;
  background: linear-gradient(135deg, rgba(109,40,217,0.5), rgba(167,139,250,0.3));
  border: 1.5px solid rgba(167,139,250,0.4);
  color: #fff; font-family: Orbitron, sans-serif; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.08em;
  border-radius: 10px; cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.mg-er-btn-end:hover { box-shadow: 0 0 20px rgba(167,139,250,0.3); transform: translateY(-1px); }

/* Badge "Carte Mentale" — bottom-left fixe */
/* Cercle de progression d'apprentissage — sous le badge "Carte Mentale" */
.mm-progress-ring {
  position: absolute;
  top: 56px;
  right: 14px;
  z-index: 100;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.mm-progress-ring svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.mm-progress-track {
  stroke: rgba(255,255,255,0.08);
  stroke-width: 5;
}
.mm-progress-fill {
  stroke: url(#mm-progress-gradient);
  stroke: #34d399;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset .5s cubic-bezier(0.2,0.8,0.2,1);
  filter: drop-shadow(0 0 6px rgba(52,211,153,0.55));
}
.mm-progress-text {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.mm-progress-pct {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.mm-progress-label {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 0.52rem; font-weight: 500;
  color: rgba(196,181,253,0.7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

.mm-badge-label {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1.5px solid rgba(109,40,217,0.3);
  border-radius: 100px;
  box-shadow: 0 2px 12px rgba(109,40,217,0.12);
  color: #5b21b6;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

/* ════════════════════════════════════════════════════════════
   MASQUE : Vitalité + Compteur Capacité
   (retire .qs5-hide-vitality si tu veux les ré-afficher)
════════════════════════════════════════════════════════════ */
#screen-quest-shop .qs5-capbar-row,
#screen-quest-shop .qs5-col-vitality {
  display: none !important;
}
/* Le workspace remonte pour combler l'espace libéré par le compteur */
#screen-quest-shop .qs5-workspace {
  height: calc(100vh - 220px) !important;
  max-height: calc(100vh - 220px) !important;
}

/* ════════════════════════════════════════════════════════════
   LIQUID GLASS — Centre de mission
   Colonnes + boutons (header, planif, footer)
════════════════════════════════════════════════════════════ */

/* ── Les 4 colonnes ── */
#screen-quest-shop .qs5-col {
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0.03) 50%,
      rgba(255,255,255,0.08) 100%) !important;
  backdrop-filter: blur(22px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
}
/* Reflet supérieur intérieur sur chaque colonne (préserve le glow néon des règles existantes) */
#screen-quest-shop .qs5-col-revision,
#screen-quest-shop .qs5-col-mandatory,
#screen-quest-shop .qs5-col-catchup,
#screen-quest-shop .qs5-col-prep {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 0 22px var(--col-glow, rgba(167,139,250,0.22)),
    0 4px 28px rgba(0,0,0,0.40) !important;
}
#screen-quest-shop .qs5-col-revision   { --col-glow: rgba(167,139,250,0.28); }
#screen-quest-shop .qs5-col-mandatory  { --col-glow: rgba(34,211,238,0.24); }
#screen-quest-shop .qs5-col-catchup    { --col-glow: rgba(251,146,60,0.26); }
#screen-quest-shop .qs5-col-prep       { --col-glow: rgba(232,121,249,0.26); }

/* ── Header : bouton retour + chips date/horloge ── */
#screen-quest-shop .qs5-back {
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.04) 50%,
      rgba(255,255,255,0.10) 100%) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 4px 14px rgba(0,0,0,0.22) !important;
  color: #ffffff !important;
}
#screen-quest-shop .qs5-back:hover {
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.22) 0%,
      rgba(255,255,255,0.08) 50%,
      rgba(255,255,255,0.18) 100%) !important;
  color: #ffffff !important;
}
#screen-quest-shop .qs5-date-chip,
#screen-quest-shop .qs5-clock-chip {
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.04) 50%,
      rgba(255,255,255,0.10) 100%) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 3px 12px rgba(0,0,0,0.20) !important;
  border-radius: 999px !important;
}

/* ── Bouton "+ AJOUTER UNE MATIÈRE" (violet) ── */
#screen-quest-shop .rev-forge-btn {
  background:
    linear-gradient(135deg,
      rgba(167,139,250,0.30) 0%,
      rgba(124,58,237,0.22) 50%,
      rgba(232,121,249,0.28) 100%) !important;
  border: 1px solid rgba(255,255,255,0.26) !important;
  backdrop-filter: blur(22px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    0 8px 26px rgba(167,139,250,0.30),
    0 3px 10px rgba(0,0,0,0.20) !important;
}
#screen-quest-shop .rev-forge-btn::before,
#screen-quest-shop .rev-forge-btn::after { display: none !important; }

/* ── Planification : + Ajouter / Importer + onglets MOIS/SEMAINE/JOUR + nav cal ── */
#screen-quest-shop .btn-add-agenda,
#screen-quest-shop .btn-add-agenda-top,
#screen-quest-shop .btn-import-ics,
#screen-quest-shop .cal-view-btn,
#screen-quest-shop .cal-nav-btn {
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.04) 50%,
      rgba(255,255,255,0.10) 100%) !important;
  border: 1px solid rgba(255,255,255,0.20) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 3px 12px rgba(0,0,0,0.18) !important;
  color: #ffffff !important;
}
#screen-quest-shop .cal-view-btn.active {
  background:
    linear-gradient(135deg,
      rgba(34,211,238,0.32) 0%,
      rgba(96,165,250,0.26) 50%,
      rgba(34,211,238,0.30) 100%) !important;
  border-color: rgba(34,211,238,0.45) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 4px 16px rgba(34,211,238,0.30) !important;
}

/* ── Footer : CARTE (cyan) + ON DÉCOLLE (gradient) ── */
#screen-quest-shop .mcp-trigger-btn {
  background:
    linear-gradient(135deg,
      rgba(34,211,238,0.26) 0%,
      rgba(96,165,250,0.18) 50%,
      rgba(34,211,238,0.24) 100%) !important;
  border: 1px solid rgba(34,211,238,0.36) !important;
  backdrop-filter: blur(22px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(190%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    0 8px 26px rgba(34,211,238,0.28),
    0 3px 10px rgba(0,0,0,0.20) !important;
}
#screen-quest-shop .mcp-trigger-btn::before { display: none !important; }

#screen-quest-shop .qs5-gen-btn {
  background:
    linear-gradient(135deg,
      rgba(124,58,237,0.32) 0%,
      rgba(217,70,239,0.28) 60%,
      rgba(6,182,212,0.26) 100%) !important;
  border: 1px solid rgba(255,255,255,0.30) !important;
  backdrop-filter: blur(24px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.50),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 10px 32px rgba(217,70,239,0.32),
    0 0 50px rgba(124,58,237,0.20),
    0 3px 12px rgba(0,0,0,0.22) !important;
}
/* Coupe le shine glissant sur ON DÉCOLLE */
#screen-quest-shop .qs5-gen-btn::after { content: none !important; }

/* ── Footer totalement transparent : pas de barre/bande derrière les boutons,
   on laisse passer le ciel étoilé (les boutons gardent leur propre fond). ── */
#screen-quest-shop .qs5-footer {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: none !important;
  box-shadow: none !important;
}

/* ── Titres de colonne : pleine largeur, taille mesurée ── */
#screen-quest-shop .qs5-col-hdr {
  justify-content: center !important;
  padding: 12px 12px !important;
}
/* On garde l'icône de titre visible (elle devient une pastille, cf. plus bas) ;
   seul le bouton info (i) reste masqué. */
#screen-quest-shop .qs5-col-hdr .qs5-info-btn {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════
   HIÉRARCHIE TYPO — Centre de mission
   Tier 1 : titres (page + colonnes)
   Tier 2 : CTAs principaux + noms de matière
   Tier 3 : contrôles secondaires + chips header
════════════════════════════════════════════════════════════ */

/* TIER 1 — 0.9rem, Orbitron 900 */
#screen-quest-shop .qs5-title,
#screen-quest-shop .qs5-col-title {
  font-size: 0.9rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.20em !important;
  text-align: center !important;
}
#screen-quest-shop .qs5-col-title { flex: 1 !important; }

/* TIER 2 — 0.72rem, CTAs + noms de matière */
#screen-quest-shop .rev-forge-btn,
#screen-quest-shop .mcp-trigger-btn,
#screen-quest-shop .qs5-gen-btn,
#screen-quest-shop .rev-subj-name {
  font-size: 0.72rem !important;
  letter-spacing: 0.14em !important;
}

/* TIER 3 — 0.62rem, contrôles secondaires + chips header */
#screen-quest-shop .qs5-back,
#screen-quest-shop .qs5-date-chip,
#screen-quest-shop .qs5-clock-chip,
#screen-quest-shop .btn-add-agenda,
#screen-quest-shop .btn-add-agenda-top,
#screen-quest-shop .btn-import-ics,
#screen-quest-shop .cal-view-btn,
#screen-quest-shop .cal-nav-btn,
#screen-quest-shop .cal-month-label {
  font-size: 0.62rem !important;
  letter-spacing: 0.10em !important;
}

/* ── Fond étoilé désactivé (canvas dust + nuages galactiques) ── */
#screen-quest-shop .qs-dust-canvas { display: none !important; }
#screen-quest-shop.qs-root {
  /* Transparent : on laisse transparaître le fond cosmique global (#cosmic-bg :
     nébuleuse + 90 étoiles), exactement comme la page d'accueil. */
  background: transparent !important;
}

/* ── Effet luciole autour de ON DÉCOLLE désactivé ── */
.decolle-spark { display: none !important; }

/* ── Home : toutes les étoiles legacy désactivées (on garde uniquement .home-starfield) ── */
#screen-home .home-star-dot,
#screen-home .home-star-glow,
#screen-home .home-star-cross,
#screen-home .hrr-stars,
#screen-home .hrr-star,
#screen-home .falling-stars-wrap {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════
   HOME : Refonte boutons + ailes Liquid Glass
════════════════════════════════════════════════════════════ */

/* ── Anciens éléments masqués ── */
#screen-home .home-avatar-bg-logo,
#screen-home .home-nav-side {
  display: none !important;
}

/* ── Le Gardien (gauche) et l'Oubli (droite) qui flottent autour de l'avatar ── */
.home-flank {
  position: absolute;
  top: 50%;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: clamp(96px, 11vw, 148px);
}
.home-flank svg { width: 100%; height: auto; display: block; }

/* Bulle de réplique au-dessus de chaque personnage */
.home-flank-bubble {
  position: absolute;
  bottom: calc(100% - 6px);
  left: 50%;
  transform: translate(-50%, 6px) scale(0.96);
  width: max-content;
  max-width: clamp(150px, 15vw, 230px);
  padding: 9px 13px;
  border-radius: 14px;
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(0.72rem, 0.85vw, 0.86rem);
  line-height: 1.32;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(.22,1,.36,1);
  z-index: 3;
}
.home-flank-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-width: 8px;
  border-bottom: 0;
}
.home-flank-bubble.is-on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
/* Gardien : bulle claire et chaleureuse */
.hfb-gardien {
  background: linear-gradient(180deg, #ffffff, #f1ecff);
  color: #4a2f96;
  box-shadow: 0 12px 28px rgba(109,93,252,0.4);
}
.hfb-gardien::after { border-top-color: #f1ecff; }
/* Oubli : bulle sombre et blasée */
.hfb-oubli {
  background: linear-gradient(180deg, #3a2f64, #2c2356);
  color: #c9c0ec;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 26px rgba(12,6,34,0.5);
}
.hfb-oubli::after { border-top-color: #2c2356; }

.home-flank-name {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-weight: 600;
  font-size: clamp(0.72rem, 0.9vw, 0.9rem);
  letter-spacing: 0.02em;
  color: #d9cffb;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(12,6,34,0.6);
}
.home-flank--left {
  left: 50%;
  transform: translate(calc(-50% - clamp(220px, 19vw, 360px)), -50%);
  animation: home-flank-float-l 5.5s ease-in-out infinite;
}
.home-flank--right {
  left: 50%;
  transform: translate(calc(-50% + clamp(220px, 19vw, 360px)), -50%);
  animation: home-flank-float-r 6.2s ease-in-out infinite;
}
@keyframes home-flank-float-l {
  0%, 100% { transform: translate(calc(-50% - clamp(220px, 19vw, 360px)), calc(-50% - 6px)); }
  50%      { transform: translate(calc(-50% - clamp(220px, 19vw, 360px)), calc(-50% + 10px)); }
}
@keyframes home-flank-float-r {
  0%, 100% { transform: translate(calc(-50% + clamp(220px, 19vw, 360px)), calc(-50% + 8px)); }
  50%      { transform: translate(calc(-50% + clamp(220px, 19vw, 360px)), calc(-50% - 8px)); }
}
@media (prefers-reduced-motion: reduce) {
  .home-flank--left, .home-flank--right { animation: none; }
}

/* ── Nouvelles ailes (SVG) — derrière le chibi ── */
.home-cosmic-wings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 0;
  pointer-events: none;
}
.home-cosmic-wings svg {
  width: 360px;
  height: 360px;
  opacity: 0.85;
  filter: drop-shadow(0 0 26px rgba(167,139,250,0.5));
  animation: home-cosmic-wings-float 6s ease-in-out infinite;
}
@keyframes home-cosmic-wings-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
/* Chibi devant les ailes */
#screen-home .home-avatar {
  position: relative !important;
  z-index: 1 !important;
  /* Suppression de l'animation "chute du ciel" — on garde uniquement le float doux */
  animation: home-float-sync 6s ease-in-out infinite !important;
}

/* Suppression de l'aura blanche au sol sous l'avatar + de sa traînée d'arrivée */
#screen-home .home-avatar-wrap::after {
  display: none !important;
  animation: none !important;
}

/* ════════════════════════════════════════════════════════════
   HOME — TOP RIGHT : pastilles série/pièces + profil dropdown
════════════════════════════════════════════════════════════ */

/* Masquage des anciens éléments redondants */
#screen-home .home-menu-avatar-btn,
#screen-home .home-logout-btn,
#screen-home .home-stats-bar {
  display: none !important;
}

/* ── Conteneur top-right ── */
.home-topright {
  position: absolute;
  top: 29px;
  right: 18px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Pastilles série / pièces ── */
.home-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 17px 6px 6px;
  border-radius: 40px;
  border: 2px solid transparent;
  background: linear-gradient(rgba(20,14,44,0.72), rgba(20,14,44,0.72)) padding-box,
              linear-gradient(135deg, #7C5CFF, #EC4FD0) border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.10);
  font-weight: 700;
  font-size: 15px;
  color: #f5f2ff;
  line-height: 1;
  white-space: nowrap;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease;
}
.home-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px -4px rgba(190,72,200,.8), inset 0 1px 0 rgba(255,255,255,0.12);
}
/* Icône nue (pas de cadre), effet vitré + halo néon façon jeu vidéo */
.home-pill-ic {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: none;
  border: none;
  box-shadow: none;
  margin-left: 4px;
}
.home-pill-ic svg {
  width: 24px;
  height: 24px;
  display: block;
  filter:
    drop-shadow(0 0 5px rgba(167,139,250,0.75))
    drop-shadow(0 0 11px rgba(124,58,237,0.5))
    drop-shadow(0 2px 3px rgba(0,0,0,0.45));
}
.home-pill-ic-coin svg { width: 26px; height: 26px; }
/* Légère pulsation vitrée du halo */
@keyframes home-ic-glow {
  0%,100% { filter: drop-shadow(0 0 5px rgba(167,139,250,0.7)) drop-shadow(0 0 10px rgba(124,58,237,0.45)) drop-shadow(0 2px 3px rgba(0,0,0,0.45)); }
  50%     { filter: drop-shadow(0 0 8px rgba(196,181,253,0.95)) drop-shadow(0 0 16px rgba(124,58,237,0.6)) drop-shadow(0 2px 3px rgba(0,0,0,0.45)); }
}
.home-pill-ic svg { animation: home-ic-glow 2.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .home-pill-ic svg { animation: none; } }
.home-pill-sub {
  font-weight: 500;
  color: #b3a9d6;
  font-size: 12.5px;
  margin-left: -2px;
}

/* ── Bouton profil + dropdown ── */
.home-profile {
  position: relative;
}
.home-profile-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px 6px 6px;
  border-radius: 40px;
  cursor: pointer;
  border: 2px solid transparent;
  background: linear-gradient(rgba(20,14,44,0.72), rgba(20,14,44,0.72)) padding-box,
              linear-gradient(135deg, #7C5CFF, #EC4FD0) border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.10);
  color: #f5f2ff;
  font: inherit;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease;
}
.home-profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px -4px rgba(190,72,200,.8), inset 0 1px 0 rgba(255,255,255,0.12);
}
.home-avatar-mini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #d6caff, #7c3aed);
  box-shadow: 0 4px 12px -3px rgba(124,58,237,0.6), inset 0 1px 0 rgba(255,255,255,0.4);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #1a1330;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}
.home-chev {
  transition: transform 0.25s ease;
  opacity: 0.7;
  flex-shrink: 0;
}
.home-profile.open .home-chev {
  transform: rotate(180deg);
}

/* ── Dropdown menu ── */
.home-profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(20,15,42,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 50px -16px rgba(0,0,0,0.7);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.2,0.8,0.2,1), transform 0.22s cubic-bezier(0.2,0.8,0.2,1);
  z-index: 40;
}
.home-profile.open .home-profile-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* Pont invisible : on franchit l'espace bouton↔menu sans perdre le survol. */
.home-profile-menu::before {
  content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
}
.home-profile-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  color: #b3a9d6;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.home-profile-menu a:hover,
.home-profile-menu a:focus {
  background: rgba(255,255,255,0.07);
  color: #fff;
  outline: none;
}
.home-profile-menu a svg {
  opacity: 0.85;
  flex-shrink: 0;
}
.home-profile-sep {
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 5px 8px;
}

/* ════════════════════════════════════════════════════════════
   HOME — Typo greeting + pseudo (style premium moderne)
════════════════════════════════════════════════════════════ */

/* Regroupement serré : greeting → pseudo → avatar comme une seule unité */
#screen-home .home-cinematic-top {
  margin-bottom: -16px !important;
}

/* Greeting = eyebrow label : petit, espacé, discret */
#screen-home .home-cinematic-top .home-greeting {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase !important;
  color: #7d749e !important;
  -webkit-text-fill-color: #7d749e !important;
  margin-bottom: 8px !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Pseudo = grand, moderne, sans CAPS forcées (1ère lettre seulement) */
#screen-home .home-cinematic-top .home-player-name {
  font-family: 'Syne', 'Inter', system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: clamp(40px, 5vw, 60px) !important;
  letter-spacing: -0.01em !important;
  line-height: 1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-transform: lowercase !important;
  text-shadow: none !important;
  margin: 0 !important;
}
#screen-home .home-cinematic-top .home-player-name::first-letter {
  text-transform: uppercase !important;
}

/* ════════════════════════════════════════════════════════════
   QUEST PATH — Modale PAUSE (déclenchée par la croix)
   Pas un abandon : la mission reste en cours en arrière-plan
════════════════════════════════════════════════════════════ */
.qp-pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 4, 20, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.qp-pause-overlay[hidden] { display: none !important; }
.qp-pause-overlay.is-open { opacity: 1; }

.qp-pause-card {
  width: min(440px, 100%);
  padding: 32px 32px 24px;
  border-radius: 22px;
  background:
    linear-gradient(160deg,
      rgba(40, 30, 78, 0.92) 0%,
      rgba(20, 14, 50, 0.94) 100%);
  border: 1px solid rgba(196, 181, 253, 0.22);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 30px 80px -20px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(124, 58, 237, 0.18);
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.qp-pause-overlay.is-open .qp-pause-card {
  transform: scale(1) translateY(0);
}

.qp-pause-title {
  margin: 0 0 10px;
  font-family: 'Syne', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}
.qp-pause-text {
  margin: 0 0 26px;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.5;
  color: #b3a9d6;
}

.qp-pause-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Bouton primaire — gros, gradient violet→rose, mis en avant */
.qp-pause-primary {
  all: unset;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(105deg, #6d5dfc, #d65ad6);
  box-shadow:
    0 14px 36px -10px rgba(150, 70, 230, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}
.qp-pause-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px -10px rgba(150, 70, 230, 1),
    0 0 0 1px rgba(255, 255, 255, 0.20) inset;
}

/* Bouton secondaire — NEUTRE (pas de rouge), discret */
.qp-pause-secondary {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  color: #8a82a7;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  box-sizing: border-box;
}
.qp-pause-secondary:hover {
  color: #c4b5fd;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}

/* Lien tertiaire "Abandonner" — discret par défaut, rouge UNIQUEMENT si .is-danger */
.qp-pause-tertiary {
  all: unset;
  align-self: center;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  color: rgba(179, 169, 214, 0.55);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(179, 169, 214, 0.25);
  cursor: pointer;
  transition: color 0.18s ease, text-decoration-color 0.18s ease, background 0.18s ease;
}
.qp-pause-tertiary:hover {
  color: rgba(196, 181, 253, 0.85);
  text-decoration-color: rgba(196, 181, 253, 0.5);
}
/* Variante danger : appliquée par JS UNIQUEMENT si au moins une quête a été commencée */
.qp-pause-tertiary.is-danger {
  color: rgba(248, 113, 113, 0.85);
  text-decoration-color: rgba(248, 113, 113, 0.45);
}
.qp-pause-tertiary.is-danger:hover {
  color: #fca5a5;
  text-decoration-color: rgba(252, 165, 165, 0.7);
  background: rgba(248, 113, 113, 0.08);
}

/* ── Rail nav bas : 4 boutons centrés en ligne ── */
.home-cosmic-rail {
  display: flex !important;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 22px 20px 26px;
  margin-top: 4px;
  position: relative;
  z-index: 5;
}
.home-cosmic-nav {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #b3a9d6;
  font-weight: 500;
  font-size: 14.5px;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s ease;
  box-sizing: border-box;
}
.home-cosmic-nav svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  flex-shrink: 0;
}
.home-cosmic-nav:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(196,181,253,0.35);
  transform: translateY(-2px);
}

/* ── Bouton principal "LANCER MA MISSION" : gradient violet→rose + shimmer ── */
#screen-home .btn-play-hero {
  all: unset !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 11px !important;
  padding: 18px 40px !important;
  border: none !important;
  border-radius: 16px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 18px !important;
  color: #fff !important;
  font-family: 'Orbitron', sans-serif !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  background: linear-gradient(105deg, #6d5dfc, #d65ad6) !important;
  box-shadow:
    0 18px 44px -12px rgba(150,70,230,0.85),
    0 0 0 1px rgba(255,255,255,0.12) inset !important;
  overflow: hidden !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
  box-sizing: border-box !important;
}
#screen-home .btn-play-hero::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: -60% !important;
  width: 50% !important;
  height: 100% !important;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent) !important;
  transform: skewX(-18deg) !important;
  animation: home-primary-shimmer 4.5s ease-in-out infinite !important;
  pointer-events: none !important;
}
@keyframes home-primary-shimmer {
  0%, 60%   { left: -60%; }
  80%, 100% { left: 130%; }
}
#screen-home .btn-play-hero:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    0 26px 56px -12px rgba(150,70,230,1),
    0 0 0 1px rgba(255,255,255,0.20) inset !important;
}
#screen-home .btn-play-hero .bph-icon,
#screen-home .btn-play-hero svg {
  position: relative !important;
  z-index: 1 !important;
  width: 18px !important;
  height: 18px !important;
}
#screen-home .btn-play-hero .bph-text {
  position: relative !important;
  z-index: 1 !important;
}

/* ════════════════════════════════════════════════════════════
   HOME — Bandeau "REPRENDRE" (mission en pause)
   Visible UNIQUEMENT quand State.dailyPlan est en cours.
════════════════════════════════════════════════════════════ */
#screen-home .home-play-zone {
  flex-direction: column !important;
  align-items: center !important;
  gap: 14px !important;
}

/* Bandeau : badge + titre · durée */
.home-play-meta {
  display: inline-flex !important;
  align-items: center;
  gap: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1;
}
.home-play-meta[hidden] { display: none !important; }

/* Badge "REPRENDRE" — pill violet pastel */
.bph-status-badge {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(196, 181, 253, 0.30);
  color: #c4b5fd;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Titre du chapitre — blanc, modern serif/sans */
.home-play-meta-title {
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.005em;
}
.home-play-meta-sep {
  color: rgba(196, 181, 253, 0.40);
  font-size: 16px;
}
.home-play-meta-duration {
  font-size: 15px;
  font-weight: 500;
  color: #b3a9d6;
}

/* Lien "Programmer un autre parcours" — discret, sous le bouton */
.home-play-replan {
  all: unset;
  display: inline-block;
  margin-top: 4px;
  padding: 6px 12px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(179, 169, 214, 0.65);
  cursor: pointer;
  transition: color 0.18s ease;
}
.home-play-replan[hidden] { display: none !important; }
.home-play-replan:hover {
  color: #c4b5fd;
}

/* ── Espacement entre les 4 colonnes : 28px ── */
#screen-quest-shop .qs5-workspace {
  gap: 28px !important;
  padding: 8px 20px 10px !important;
}


/* ── Ordre par défaut : Planification → Matière → Préparation → Rattrapage ── */
#screen-quest-shop .qs5-col-mandatory { order: 1 !important; }
#screen-quest-shop .qs5-col-revision  { order: 2 !important; }
#screen-quest-shop .qs5-col-prep      { order: 3 !important; }
#screen-quest-shop .qs5-col-catchup   { order: 4 !important; }

/* ════════════════════════════════════════════════════════════════════
   EN-TÊTES UNIFIÉS — tous les hauts de page adoptent le design de la page
   « Apprentissage actif » (.saa-header / .saa-header-title) :
   même forme de barre, même bouton retour, même couleur + taille de titre.
   ════════════════════════════════════════════════════════════════════ */

/* — Barre d'en-tête : forme + fond + bordure + flou identiques à la référence — */
.screen-header,
.prog-header,
.quest-path-header,
.galaxy-header,
.sv-topbar,
.notes-header,
.qs5-header {
  padding: 14px 16px 10px !important;
  height: auto !important;
  min-height: 0 !important;
  border-bottom: 1px solid rgba(139,92,246,0.15) !important;
  background: rgba(0,0,0,0.30) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
  margin-bottom: 0 !important;
}

/* Quest-shop : header SANS barre sombre — totalement transparent, on laisse
   passer le ciel étoilé (override scopé de la règle partagée ci-dessus). */
#screen-quest-shop .qs5-header {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* — Titre : dégradé violet + taille + police identiques à la référence — */
.screen-title,
.prog-title,
.qp-header-title,
.galaxy-title,
.sv-title,
.notes-title,
.fc-title,
.mc-htitle,
.qs5-title {
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  background: linear-gradient(135deg, #c4b5fd, #818cf8, #a78bfa) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  text-shadow: none !important;
}

/* La Salle : son titre n'était pas centré → on le centre comme les autres */
.sv-title { flex: 1 !important; text-align: center !important; }

/* « Mon système solaire » : header SANS fond (transparent, pas de bande ni flou ni bordure) */
.screen-galaxy .galaxy-header {
  background: transparent !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  border-bottom: none !important; box-shadow: none !important;
}
/* Titre + sous-titre CENTRÉS sur la page (indépendants des boutons gauche/droite) */
.screen-galaxy .galaxy-header-center {
  position: absolute !important;
  left: 50% !important; top: 16px !important;
  transform: translateX(-50%) !important;
  flex: none !important;
}

/* « Mon système solaire » : titre Clash Display casse normale + sous-titre « X planètes » */
.galaxy-header .galaxy-title {
  font-family: "Clash Display", sans-serif !important;
  font-weight: 600 !important;
  font-size: 21px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  background: linear-gradient(100deg, #c4b5fd, #d65ad6) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
  text-align: center !important;
}
.galaxy-header .galaxy-count {
  font-family: "Satoshi", sans-serif !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  color: #b3a9d6 !important; -webkit-text-fill-color: #b3a9d6 !important;
  text-transform: none !important; letter-spacing: 0 !important;
  text-align: center !important;
}

/* — Bouton retour (à gauche) : même boîte violette arrondie que la référence — */
.screen-header .btn-back,
.av-btn-back,
.prog-header .btn-back,
.qs5-back,
.galaxy-back,
.sv-nav-back-btn,
.notes-back-btn,
.fc-back-btn,
.quest-path-header .btn-exit-game {
  width: 36px !important; height: 36px !important;
  min-width: 36px !important; flex-shrink: 0 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  gap: 0 !important; padding: 0 !important;
  background: rgba(124,58,237,0.15) !important;
  border: 1px solid rgba(139,92,246,0.30) !important;
  border-radius: 10px !important;
  color: rgba(196,181,253,0.9) !important;
  -webkit-text-fill-color: rgba(196,181,253,0.9) !important;
  font-size: 1rem !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
.screen-header .btn-back:hover,
.av-btn-back:hover,
.prog-header .btn-back:hover,
.qs5-back:hover,
.galaxy-back:hover,
.sv-nav-back-btn:hover,
.notes-back-btn:hover,
.fc-back-btn:hover,
.quest-path-header .btn-exit-game:hover {
  background: rgba(124,58,237,0.30) !important;
  box-shadow: 0 0 10px rgba(139,92,246,0.30) !important;
}

/* Quest-shop : son fond #07091C est posé en #id + !important (bat .screen).
   On le force transparent pour révéler le fond cosmique global (#cosmic-bg),
   comme sur toutes les autres pages. */
#screen-quest-shop {
  background: transparent !important;
}

/* ════════════════════════════════════════════════════════════════════════
   ✦ REDESIGN « PROGRAMMER LA MISSION DU JOUR » — SYSTÈME UNIFIÉ
   4 fenêtres : Planification · Matière · Préparation · Rattrapage
   Règle couleur : la couleur a un SENS, jamais décorative.
     violet = normal/à faire · vert = fait/sélectionné · ambre = à rattraper.
     Dégradé violet→magenta RÉSERVÉ aux boutons d'action principaux.
   → supprime les bordures néon multicolores qui donnaient l'effet « 4 apps collées ».
   (Scopé #screen-quest-shop : l'id bat toutes les anciennes règles .qs5-*.)
   ════════════════════════════════════════════════════════════════════════ */
#screen-quest-shop {
  --ink:#f3f0ff; --muted:#b3a9d6; --muted-2:#7d749e;
  --violet:#a78bfa; --violet-bright:#c4b5fd; --indigo:#6d5dfc; --magenta:#d65ad6;
  --green:#54d6a0; --amber:#f5a23d; --gold:#f5b544;
  --surface:rgba(255,255,255,.035);
  --surface-2:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.09);
  --stroke-soft:rgba(255,255,255,.06);
  --radius:18px;
}

/* ── Suppression jauge de capacité + colonne Vitalité, nettoyage ── */
#screen-quest-shop .qs5-capbar-row { display:none !important; }
#screen-quest-shop .qs5-col-vitality { display:none !important; }
#screen-quest-shop .qs5-drag-handle { display:none !important; }
#screen-quest-shop .qs5-splitter { display:none !important; }
#screen-quest-shop .qs5-info-btn { display:none !important; }

/* ── 4 fenêtres TOUJOURS côte à côte, ordre fixe ── */
#screen-quest-shop .qs5-workspace {
  display:flex !important; flex-direction:row !important;
  gap:14px !important; align-items:stretch !important;
}
#screen-quest-shop .qs5-col {
  flex:1 1 0 !important; min-width:0 !important;
}
#screen-quest-shop .qs5-col-mandatory { order:1; }   /* Planification */
#screen-quest-shop .qs5-col-revision  { order:2; }   /* Matière       */
#screen-quest-shop .qs5-col-prep      { order:3; }   /* Préparation   */
#screen-quest-shop .qs5-col-catchup   { order:4; }   /* Rattrapage    */

/* ════════ HEADER ════════ */
#screen-quest-shop .qs5-header { gap:14px !important; }
#screen-quest-shop .qs5-back {
  width:38px !important; height:38px !important; border-radius:12px !important;
  background:var(--surface) !important; border:1px solid var(--stroke) !important;
  color:var(--muted) !important; box-shadow:none !important;
}
#screen-quest-shop .qs5-back:hover {
  background:var(--surface-2) !important; color:var(--ink) !important;
  border-color:rgba(255,255,255,.16) !important;
}
#screen-quest-shop .qs5-date-chip,
#screen-quest-shop .qs5-clock-chip {
  padding:9px 14px !important; border-radius:30px !important;
  background:var(--surface) !important; border:1px solid var(--stroke) !important;
  color:var(--muted) !important; font-size:12px !important;
  letter-spacing:.04em !important; text-transform:uppercase !important;
  box-shadow:none !important;
}
#screen-quest-shop .qs5-date-chip svg,
#screen-quest-shop .qs5-clock-chip svg { color:var(--violet) !important; opacity:.9 !important; }
#screen-quest-shop .qs5-title {
  font-size:18px !important; font-weight:700 !important;
  letter-spacing:.01em !important; color:#fff !important;
  text-shadow:none !important; text-transform:none !important;
}
/* Pastille pièces (compteur panier) — cercle papillon doré */
#screen-quest-shop .qs5-basket-badge {
  padding:9px 14px 9px 12px !important; border-radius:30px !important;
  background:var(--surface) !important; border:1px solid var(--stroke) !important;
  color:var(--gold) !important; font-weight:700 !important; box-shadow:none !important;
}

/* ════════ PANNEAUX UNIFIÉS (kill du néon multicolore) ════════ */
#screen-quest-shop .qs5-col,
#screen-quest-shop .qs5-col-revision,
#screen-quest-shop .qs5-col-mandatory,
#screen-quest-shop .qs5-col-catchup,
#screen-quest-shop .qs5-col-prep {
  background:var(--surface) !important;
  border:1px solid var(--stroke) !important;
  border-radius:var(--radius) !important;
  box-shadow:0 4px 24px rgba(0,0,0,.35) !important;
  backdrop-filter:blur(18px) !important;
  -webkit-backdrop-filter:blur(18px) !important;
}
#screen-quest-shop .qs5-col:hover,
#screen-quest-shop .qs5-col-revision:hover,
#screen-quest-shop .qs5-col-mandatory:hover,
#screen-quest-shop .qs5-col-catchup:hover,
#screen-quest-shop .qs5-col-prep:hover {
  border-color:rgba(255,255,255,.15) !important;
  box-shadow:0 6px 30px rgba(0,0,0,.42) !important;
}
/* En-têtes de panneau uniformes */
#screen-quest-shop .qs5-col-hdr {
  padding:14px 16px !important;
  border-bottom:1px solid var(--stroke-soft) !important;
  border-radius:var(--radius) var(--radius) 0 0 !important;
}
#screen-quest-shop .qs5-col-title {
  color:var(--ink) !important; text-shadow:none !important;
  font-size:.6rem !important; font-weight:800 !important; letter-spacing:.10em !important;
}
/* Icônes d'en-tête : violet par défaut, ambre pour Rattrapage (sens couleur) */
#screen-quest-shop .qs5-col-hdr svg { color:var(--violet) !important; opacity:.92 !important; }
#screen-quest-shop .qs5-col-catchup .qs5-col-hdr svg { color:var(--amber) !important; }

/* Scrollbar fine custom */
#screen-quest-shop .qs5-col-body { padding:14px 14px !important; }
#screen-quest-shop .qs5-col-body::-webkit-scrollbar { width:6px; }
#screen-quest-shop .qs5-col-body::-webkit-scrollbar-track { background:transparent; }
#screen-quest-shop .qs5-col-body::-webkit-scrollbar-thumb {
  background:rgba(255,255,255,.12); border-radius:10px;
}
#screen-quest-shop .qs5-col-body::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,.2); }

/* ════════ CALENDRIER REFAIT (Planification) ════════ */
#screen-quest-shop .agenda-cal-wrap {
  background:transparent !important; border:none !important;
  padding:0 !important; box-shadow:none !important;
}
/* Segment Mois / Semaine / Jour */
#screen-quest-shop .cal-view-toggle {
  display:flex !important; gap:4px !important; padding:4px !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important;
  border-radius:11px !important; margin-bottom:12px !important;
}
#screen-quest-shop .cal-view-btn {
  flex:1 !important; padding:7px 0 !important; border:none !important;
  background:transparent !important; color:var(--muted) !important;
  font-size:11px !important; font-weight:700 !important; letter-spacing:.04em !important;
  border-radius:8px !important; cursor:pointer; transition:.15s;
}
#screen-quest-shop .cal-view-btn:hover { color:var(--ink) !important; }
#screen-quest-shop .cal-view-btn.active {
  background:rgba(167,139,250,.18) !important; color:#fff !important;
}
/* En-tête nav mois */
#screen-quest-shop .agenda-cal-nav {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  margin-bottom:10px !important;
}
#screen-quest-shop .cal-month-label {
  color:var(--ink) !important; font-weight:700 !important; font-size:14px !important;
  letter-spacing:.02em !important; text-shadow:none !important;
}
#screen-quest-shop .cal-nav-btn {
  width:30px !important; height:30px !important; border-radius:9px !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important;
  color:var(--muted) !important; font-size:16px !important; cursor:pointer; transition:.15s;
}
#screen-quest-shop .cal-nav-btn:hover:not(:disabled) { color:var(--ink) !important; border-color:var(--stroke) !important; }
#screen-quest-shop .cal-nav-btn:disabled { opacity:.3 !important; cursor:default; }
/* Grille 7 colonnes */
#screen-quest-shop .agenda-cal-grid {
  display:grid !important; grid-template-columns:repeat(7,1fr) !important;
  gap:5px !important;
}
#screen-quest-shop .cal-day-hdr {
  font-size:10px !important; color:var(--muted-2) !important; text-transform:uppercase !important;
  text-align:center !important; font-weight:700 !important; padding-bottom:4px !important;
  background:none !important; border:none !important;
}
/* Cellule jour carrée, lisible */
#screen-quest-shop .cal-cell {
  aspect-ratio:1 / 1 !important; height:auto !important; min-height:0 !important;
  display:flex !important; flex-direction:column !important;
  align-items:center !important; justify-content:center !important;
  position:relative !important;
  border-radius:9px !important; border:none !important;
  background:transparent !important; color:rgba(255,255,255,.35) !important;
  font-size:12.5px !important; font-weight:600 !important; cursor:pointer;
  transition:background .15s, color .15s; box-shadow:none !important;
}
#screen-quest-shop .cal-cell:hover { background:var(--surface-2) !important; color:var(--ink) !important; }
#screen-quest-shop .cal-empty { background:transparent !important; cursor:default; pointer-events:none; }
#screen-quest-shop .cal-day-future,
#screen-quest-shop .cal-day-past { color:rgba(255,255,255,.35) !important; }
/* Aujourd'hui : fond violet léger + anneau */
#screen-quest-shop .cal-today {
  background:rgba(167,139,250,.16) !important; color:#fff !important;
  box-shadow:inset 0 0 0 1.5px var(--violet) !important;
}
/* Jour sélectionné : dégradé violet→magenta */
#screen-quest-shop .cal-selected {
  background:linear-gradient(135deg,var(--violet),var(--magenta)) !important;
  color:#fff !important; box-shadow:0 2px 12px rgba(167,139,250,.4) !important;
}
/* Petit point d'activité (.pdot) sous le chiffre */
#screen-quest-shop .cal-dots-row {
  position:absolute !important; bottom:4px !important; left:0 !important; right:0 !important;
  display:flex !important; justify-content:center !important; gap:3px !important; line-height:0 !important;
}
#screen-quest-shop .cal-dot,
#screen-quest-shop .cal-galaxy-dot {
  width:4px !important; height:4px !important; border-radius:50% !important;
  background:var(--violet) !important; box-shadow:none !important;
}
#screen-quest-shop .cal-selected .cal-dot,
#screen-quest-shop .cal-selected .cal-galaxy-dot,
#screen-quest-shop .cal-today .cal-dot { background:#fff !important; }
#screen-quest-shop .cal-dot-missed { background:var(--amber) !important; }

/* ════════ BOUTONS « AJOUTER » + IMPORT ════════ */
#screen-quest-shop .agenda-top-actions {
  display:flex !important; gap:8px !important; margin-bottom:12px !important;
}
/* .add : ligne en pointillés violet */
#screen-quest-shop .btn-add-agenda,
#screen-quest-shop .btn-add-agenda-top {
  flex:1 !important; padding:10px 0 !important;
  border:1px dashed rgba(167,139,250,.55) !important;
  background:rgba(167,139,250,.07) !important; color:var(--violet-bright) !important;
  border-radius:11px !important; font-size:12px !important; font-weight:700 !important;
  cursor:pointer; transition:.15s; box-shadow:none !important;
}
#screen-quest-shop .btn-add-agenda:hover,
#screen-quest-shop .btn-add-agenda-top:hover {
  background:rgba(167,139,250,.14) !important; border-color:var(--violet) !important;
}
/* Import iCal : secondaire discret */
#screen-quest-shop .btn-import-ics {
  display:flex !important; align-items:center !important; justify-content:center !important; gap:6px !important;
  padding:10px 14px !important; border:1px solid var(--stroke) !important;
  background:var(--surface) !important; color:var(--muted) !important;
  border-radius:11px !important; font-size:12px !important; font-weight:600 !important;
  cursor:pointer; transition:.15s; box-shadow:none !important;
}
#screen-quest-shop .btn-import-ics:hover { color:var(--ink) !important; border-color:rgba(255,255,255,.16) !important; }
#screen-quest-shop .btn-import-ics svg { color:var(--violet) !important; }

/* ════════ ITEMS UNIFIÉS (.item) ════════ */
#screen-quest-shop .quest-card {
  background:var(--surface-2) !important;
  border:1px solid var(--stroke-soft) !important;
  border-radius:12px !important; box-shadow:none !important;
}
#screen-quest-shop .quest-card::before { display:none !important; }
#screen-quest-shop .quest-card:hover { border-color:rgba(255,255,255,.14) !important; }
#screen-quest-shop .quest-card.in-basket {
  border-color:rgba(84,214,160,.45) !important;
  background:rgba(84,214,160,.08) !important;
}
#screen-quest-shop .qcard-checkbox.checked {
  background:var(--green) !important; border-color:var(--green) !important;
}

/* ════════ FOOTER ════════ */
#screen-quest-shop .qs5-footer { justify-content:center !important; }
#screen-quest-shop .qs5-gen-wrap { gap:12px !important; }
/* Carte : bouton secondaire */
#screen-quest-shop .mcp-trigger-btn {
  background:var(--surface) !important; border:1px solid var(--stroke) !important;
  color:var(--muted) !important; box-shadow:none !important; border-radius:13px !important;
}
#screen-quest-shop .mcp-trigger-btn:hover {
  color:var(--ink) !important; border-color:rgba(255,255,255,.16) !important;
  background:var(--surface-2) !important;
}
/* On décolle : bouton primaire dégradé violet→magenta + shimmer */
#screen-quest-shop .qs5-gen-btn {
  position:relative !important; overflow:hidden !important;
  background:linear-gradient(135deg,var(--violet),var(--magenta)) !important;
  border:none !important; color:#fff !important; font-weight:800 !important;
  border-radius:13px !important;
  box-shadow:0 6px 24px rgba(167,139,250,.4), 0 2px 8px rgba(214,90,214,.3) !important;
  transition:transform .2s, box-shadow .2s !important;
}
#screen-quest-shop .qs5-gen-btn:hover {
  transform:translateY(-2px) !important;
  box-shadow:0 10px 32px rgba(167,139,250,.5), 0 4px 12px rgba(214,90,214,.4) !important;
}
#screen-quest-shop .qs5-gen-btn::after {
  content:''; position:absolute; top:0; left:-60%; width:40%; height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.45),transparent);
  transform:skewX(-18deg); animation:qs5ShimmerSweep 3.2s ease-in-out infinite;
}
@keyframes qs5ShimmerSweep {
  0%,60% { left:-60%; } 100% { left:160%; }
}

/* ── Entrée des panneaux en cascade ── */
#screen-quest-shop .qs5-col-mandatory { animation:qs5PanelIn .5s cubic-bezier(.2,.7,.3,1) .05s both; }
#screen-quest-shop .qs5-col-revision  { animation:qs5PanelIn .5s cubic-bezier(.2,.7,.3,1) .13s both; }
#screen-quest-shop .qs5-col-prep      { animation:qs5PanelIn .5s cubic-bezier(.2,.7,.3,1) .21s both; }
#screen-quest-shop .qs5-col-catchup   { animation:qs5PanelIn .5s cubic-bezier(.2,.7,.3,1) .29s both; }
@keyframes qs5PanelIn {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════════
   ✦ COMPOSANTS MAQUETTE (portés tel quel, scopés) + reskin du contenu réel
   ════════════════════════════════════════════════════════════════════════ */
/* Polices Fontshare */
#screen-quest-shop .qs5-title,
#screen-quest-shop .qs5-col-title,
#screen-quest-shop .cal-month-label,
#screen-quest-shop .m,
#screen-quest-shop .btn,
#screen-quest-shop .qs5-gen-btn,
#screen-quest-shop .mcp-trigger-btn {
  font-family:"Clash Display", var(--body, sans-serif) !important;
}
#screen-quest-shop, #screen-quest-shop .qs5-col-body {
  font-family:"Satoshi", "Inter", sans-serif;
}

/* Corps de panneau : pile verticale espacée comme la maquette */
#screen-quest-shop .qs5-col-body {
  display:flex !important; flex-direction:column !important; gap:10px !important;
}
/* En-tête : icône dans une pastille 30×30 (.hicon) */
#screen-quest-shop .qs5-col-hdr > svg {
  /* display:block annule le `display:none` hérité (ligne ~28549) qui masquait l'icône */
  display:block !important;
  width:30px !important; height:30px !important; padding:7px !important;
  border-radius:9px !important; box-sizing:border-box !important;
  background:rgba(167,139,250,.15) !important; color:var(--violet-bright) !important; opacity:1 !important;
}
#screen-quest-shop .qs5-col-catchup .qs5-col-hdr > svg {
  background:rgba(245,162,61,.15) !important; color:var(--amber) !important;
}

/* ════════════════════════════════════════════════════════════════════════
   ✦ RECALAGE SUR LA MAQUETTE — en-têtes translucides + boutons à la bonne taille
   ════════════════════════════════════════════════════════════════════════ */
/* (1) En-têtes : plus de bande noire opaque. On laisse transparaître le verre
   de la fenêtre (et le ciel étoilé derrière) ; seul le filet du bas subsiste.
   L'#id bat les anciennes règles .qs5-col-X .qs5-col-hdr (fond rgba .80). */
#screen-quest-shop .qs5-col-hdr {
  background: transparent !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}
/* Titre aligné à gauche, à côté de la pastille (comme le modèle) */
#screen-quest-shop .qs5-col-title {
  text-align: left !important;
  flex: 1 !important;
}

/* (2) Boutons du bas : taille du modèle (la police avait été rétrécie à .72rem) */
#screen-quest-shop .qs5-gen-btn {
  height: 56px !important;
  font-size: 1rem !important;
  letter-spacing: .04em !important;
  padding: 0 40px !important;
  border-radius: 14px !important;
}
#screen-quest-shop .mcp-trigger-btn {
  height: 56px !important;
  font-size: .92rem !important;
  letter-spacing: .04em !important;
  padding: 0 28px !important;
  border-radius: 14px !important;
}

/* ── .item (ligne universelle) ── */
#screen-quest-shop .item {
  display:flex !important; align-items:center !important; gap:11px !important;
  padding:12px !important; border-radius:12px !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important;
  transition:.18s !important;
}
#screen-quest-shop .item:hover { border-color:rgba(196,181,253,.3) !important; }
#screen-quest-shop .item.item-on {
  border-color:rgba(84,214,160,.45) !important; background:rgba(84,214,160,.08) !important;
}
#screen-quest-shop .item .dot {
  width:30px !important; height:30px !important; border-radius:9px !important; flex:none !important;
  display:grid !important; place-items:center !important; padding:0 !important;
  background:rgba(167,139,250,.14) !important; color:var(--violet-bright) !important;
  border:none !important; cursor:pointer; box-shadow:none !important;
}
#screen-quest-shop .item .dot.done { background:rgba(84,214,160,.16) !important; color:var(--green) !important; }
#screen-quest-shop .item .dot.amber { background:rgba(245,162,61,.16) !important; color:var(--amber) !important; }
#screen-quest-shop .item .body { flex:1 !important; min-width:0 !important; cursor:pointer; }
#screen-quest-shop .item .body .t {
  font-weight:600 !important; font-size:13.5px !important; color:#fff !important;
  white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important;
  text-transform:none !important; text-shadow:none !important; letter-spacing:0 !important;
}
#screen-quest-shop .item .body .s { font-size:12px !important; color:var(--muted) !important; margin-top:2px !important; }
#screen-quest-shop .item .act {
  color:var(--muted-2) !important; cursor:pointer; padding:5px !important; border-radius:7px !important;
  flex:none !important; transition:.15s !important; display:grid !important; place-items:center !important;
  background:none !important; border:none !important;
}
#screen-quest-shop .item .act:hover { color:#fff !important; background:rgba(255,255,255,.08) !important; }
#screen-quest-shop .item .act.act-add.on { color:var(--green) !important; }
#screen-quest-shop .item .act.act-dismiss { opacity:0; }
#screen-quest-shop .item:hover .act.act-dismiss { opacity:.85; }
#screen-quest-shop .item .rev-subj-chevron svg { transition:transform .2s; }
#screen-quest-shop .item .rev-subj-chevron.open svg { transform:rotate(180deg); }

/* ── Étoile = sélection (Préparation / Rattrapage) — vide=non sélectionné, pleine=sélectionné ── */
#screen-quest-shop .item .star {
  width:36px !important; height:36px !important; border-radius:11px !important; flex:none !important;
  display:grid !important; place-items:center !important; cursor:pointer; transition:.18s !important;
  background:rgba(167,139,250,.15) !important;
}
#screen-quest-shop .item .star svg { width:19px !important; height:19px !important; }
#screen-quest-shop .item .star .s-icon { fill:transparent; stroke:var(--violet); stroke-width:1.7; transition:.18s; }
#screen-quest-shop .item.item-on .star .s-icon { fill:var(--violet); }      /* l'étoile se remplit */
/* coche verte (apparaît quand sélectionné) */
#screen-quest-shop .item .check { flex:none; color:var(--green); opacity:0; transform:scale(.6); transition:.2s; display:grid; place-items:center; }
#screen-quest-shop .item .check svg { width:20px !important; height:20px !important; }
#screen-quest-shop .item.item-on .check { opacity:1; transform:none; }
/* accent ambre pour Rattrapage */
#shop-body-catchup .item .star { background:rgba(245,162,61,.15) !important; }
#shop-body-catchup .item .star .s-icon { stroke:var(--amber); }
#shop-body-catchup .item.item-on .star .s-icon { fill:var(--amber); }

/* ── MATIÈRE (Révision) : même brique .item, étoile PASTEL par matière, validation dans SA couleur ── */
/* On neutralise l'ancien bloc cockpit (fond sombre, bordure indigo, clip-path, largeur 50%) */
#shop-body-revision .rev-subject {
  width:100% !important; max-width:none !important; margin:0 !important;
  background:transparent !important; border:none !important; clip-path:none !important;
  filter:none !important; box-shadow:none !important; border-radius:14px !important;
}
#shop-body-revision .rev-subject:hover { filter:none !important; }
/* plus AUCUN trait/barre d'accent vertical à gauche : ni sur le bloc, ni sur les lignes de chapitre */
#shop-body-revision .rev-subject::before,
#shop-body-revision .rev-chap-row::before { display:none !important; }
/* Chapitre coché : tout en pastel de la matière (var --subj-color = --acc), plus de violet/vert */
#shop-body-revision .rev-chap-row.rev-chap-sel,
#shop-body-revision .rev-chap-row.rev-chap-sel.rev-swipe-content {
  background:color-mix(in srgb, var(--subj-color, #a78bfa) 12%, transparent) !important;
  border-color:color-mix(in srgb, var(--subj-color, #a78bfa) 32%, transparent) !important;
  box-shadow:none !important;
}
#shop-body-revision .rev-chap-cb.checked { color:#fff !important; }   /* coche blanche, lisible sur le pastel */
#shop-body-revision .rev-chap-cb.checked svg { stroke:#fff !important; }
/* l'étoile PASTEL par matière (remplace l'ancienne case .rev-subj-cb) ; --acc posé inline sur l'en-tête.
   Le remplissage (vide / demi pastel / plein pastel) est géré en inline sur .s-icon selon l'état. */
#shop-body-revision .rev-subject-header .star {
  background:rgba(255,255,255,.06) !important;
  background:color-mix(in srgb, var(--acc, #fff) 20%, transparent) !important;
  border:none !important; align-self:center;
}
#shop-body-revision .rev-subject-header .star .s-icon { stroke:var(--acc, #fff); }
/* SÉLECTION (tout coché) = couleur PASTEL de la matière, plus de vert ici */
#shop-body-revision .rev-subject-header.item-on {
  border-color:var(--acc, var(--violet)) !important;
  background:rgba(255,255,255,.05) !important;
  background:color-mix(in srgb, var(--acc, #fff) 8%, transparent) !important;
}
#shop-body-revision .rev-subject-header .check { color:var(--acc, var(--green)) !important; }

/* ── .add (bouton pointillés) ── */
#screen-quest-shop .add {
  display:flex !important; align-items:center !important; justify-content:center !important; gap:8px !important;
  padding:12px !important; border-radius:12px !important; cursor:pointer;
  font-size:13px !important; font-weight:600 !important; color:var(--violet-bright) !important;
  background:rgba(167,139,250,.07) !important; border:1px dashed rgba(167,139,250,.35) !important;
  transition:.18s !important; box-shadow:none !important;
}
#screen-quest-shop .add:hover { background:rgba(167,139,250,.14) !important; }

/* ── Préparation & Rattrapage : liste défilante + bouton « Ajouter » épinglé en bas ── */
.qs5-col-catchup .qs5-col-body,
.qs5-col-prep    .qs5-col-body { overflow: hidden !important; }
.qs5-col-catchup .qs5-col-body > .ctup-list,
.qs5-col-prep    .qs5-col-body > .ctup-list {
  flex: 1 1 auto !important; min-height: 0 !important;
  overflow-y: auto !important; overflow-x: hidden !important;
}
.qs5-col-catchup .qs5-col-body > .add,
.qs5-col-prep    .qs5-col-body > .add {
  flex: none !important; margin-top: auto !important;
}

/* ── Planification : calendrier défilant + boutons Ajouter/Importer épinglés en bas ── */
.qs5-col-mandatory .qs5-col-body { overflow: hidden !important; }
.qs5-col-mandatory .qs5-col-body > .agenda-scroll {
  flex: 1 1 auto !important; min-height: 0 !important;
  overflow-y: auto !important; overflow-x: hidden !important;
}
.qs5-col-mandatory .qs5-col-body > .agenda-actions-pinned {
  flex: none !important;
  margin: 10px 0 0 0 !important;
}

/* ── .hint / .empty / .total ── */
#screen-quest-shop .hint { font-size:11.5px !important; color:var(--muted-2) !important; text-align:center !important; padding:2px 0 !important; }
#screen-quest-shop .empty {
  flex:1 !important; display:flex !important; flex-direction:column !important;
  align-items:center !important; justify-content:center !important; gap:10px !important;
  text-align:center !important; color:var(--muted-2) !important; min-height:140px;
}
#screen-quest-shop .empty .ec {
  width:46px !important; height:46px !important; border-radius:13px !important;
  display:grid !important; place-items:center !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important; color:var(--muted-2) !important;
}
#screen-quest-shop .empty p { font-size:12.5px !important; line-height:1.5 !important; }
#screen-quest-shop .total {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  padding:11px 13px !important; border-radius:12px !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important;
  font-size:12.5px !important; color:var(--muted) !important;
}
#screen-quest-shop .total b { color:#fff !important; font-weight:600 !important; }

/* ════ MATIÈRE — reskin de l'arbre matières/chapitres ════ */
#screen-quest-shop .rev-container { display:flex !important; flex-direction:column !important; gap:10px !important; background:none !important; border:none !important; padding:0 !important; }
#screen-quest-shop .rev-subject {
  background:transparent !important; border:none !important; box-shadow:none !important;
  padding:0 !important; margin:0 !important; overflow:visible !important;
}
#screen-quest-shop .rev-subject-header.item { padding:12px !important; border-radius:12px !important; background:var(--surface-2) !important; }
#screen-quest-shop .rev-subj-name {
  font-weight:600 !important; font-size:13.5px !important; color:#fff !important;
  text-transform:none !important; text-shadow:none !important; letter-spacing:0 !important;
  white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; display:block !important;
}
#screen-quest-shop .rev-subj-cb.dot svg { width:15px !important; height:15px !important; }
#screen-quest-shop .rev-subj-menu.act { font-size:16px !important; line-height:1 !important; color:var(--muted-2) !important; opacity:0; }
#screen-quest-shop .rev-subject-header:hover .rev-subj-menu.act { opacity:.85; }
#screen-quest-shop .rev-subj-chevron.act { color:var(--muted-2) !important; }
#screen-quest-shop .rev-subj-menu-panel {
  margin:6px 0 2px !important; background:var(--surface-2) !important; border:1px solid var(--stroke) !important;
  border-radius:10px !important; overflow:hidden;
}
#screen-quest-shop .rev-subj-menu-panel button { color:var(--ink) !important; }
#screen-quest-shop .rev-chapters { padding:8px 4px 2px 8px !important; display:flex !important; flex-direction:column !important; gap:6px !important; background:none !important; border:none !important; box-shadow:none !important; }
#screen-quest-shop .rev-chapters.rev-collapsed { display:none !important; }
#screen-quest-shop .rev-chap-row {
  background:var(--surface) !important; border:none !important;
  border-radius:10px !important; box-shadow:none !important; padding:8px 10px !important;
}
/* sélection : pas d'encadrement (frame inutile), juste un léger fond pastel de la matière */
#screen-quest-shop .rev-chap-row.rev-chap-sel { background:color-mix(in srgb, var(--subj-color, #a78bfa) 10%, transparent) !important; border:none !important; box-shadow:none !important; }
#screen-quest-shop .rev-chap-name { color:#fff !important; font-size:12.5px !important; }
#screen-quest-shop .rev-drag-handle { display:none !important; }
#screen-quest-shop .rev-chap-cb.checked { background:var(--subj-color, #a78bfa) !important; border-color:var(--subj-color, #a78bfa) !important; color:#fff !important; }
#screen-quest-shop .rev-add-chap-btn, #screen-quest-shop .rev-forge-btn {
  display:flex !important; align-items:center !important; justify-content:center !important; gap:8px !important;
  width:100% !important; padding:11px !important; border-radius:11px !important; cursor:pointer;
  font-size:12.5px !important; font-weight:600 !important; letter-spacing:.02em !important;
  color:var(--violet-bright) !important; background:rgba(167,139,250,.07) !important;
  border:1px dashed rgba(167,139,250,.35) !important; box-shadow:none !important; text-transform:none !important;
}
#screen-quest-shop .rev-add-chap-btn:hover, #screen-quest-shop .rev-forge-btn:hover { background:rgba(167,139,250,.14) !important; color:var(--violet-bright) !important; border-color:var(--violet) !important; }
#screen-quest-shop .rev-add-subj-wrap { margin:0 !important; }
/* Barre de progression → .total */
#screen-quest-shop .rev-progress-wrap {
  display:flex !important; align-items:center !important; gap:10px !important;
  padding:11px 13px !important; border-radius:12px !important; margin:0 0 2px !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important;
}
#screen-quest-shop .rev-progress-left, #screen-quest-shop .rev-progress-right { color:var(--muted) !important; font-size:12px !important; }
#screen-quest-shop .rev-progress-right { color:#fff !important; font-weight:600 !important; }
#screen-quest-shop .rev-progress-track { flex:1 !important; height:5px !important; background:rgba(255,255,255,.08) !important; border-radius:10px !important; overflow:hidden; }
#screen-quest-shop .rev-progress-fill { height:100% !important; background:linear-gradient(90deg,var(--indigo),var(--magenta)) !important; border-radius:10px !important; }
#screen-quest-shop .rev-empty-state { color:var(--muted-2) !important; text-align:center; padding:18px 8px; }
#screen-quest-shop .rev-sep-ornament { display:none !important; }

/* ════ RATTRAPAGE / PRÉPARATION — listes ════ */
#screen-quest-shop .ctup-list, #screen-quest-shop .prep-row-wrap { display:flex !important; flex-direction:column !important; gap:10px !important; }
#screen-quest-shop .ctup-list { gap:10px !important; }
/* Bouton chapitres (prep) → .act avec badge */
#screen-quest-shop .ctup-chap-btn {
  color:var(--muted-2) !important; background:none !important; border:none !important;
  padding:5px !important; border-radius:7px !important; position:relative; cursor:pointer;
}
#screen-quest-shop .ctup-chap-btn:hover, #screen-quest-shop .ctup-chap-btn.pct-open { color:#fff !important; background:rgba(255,255,255,.08) !important; }
#screen-quest-shop .ctup-chap-btn.pct-has { color:var(--violet-bright) !important; }
#screen-quest-shop .pct-badge { background:var(--violet) !important; color:#fff !important; }
/* Séparateurs de groupe — discrets */
#screen-quest-shop .prep-group-label, #screen-quest-shop .prep-date-sep-label { color:var(--muted-2) !important; text-shadow:none !important; }
#screen-quest-shop .prep-group-line, #screen-quest-shop .prep-date-sep-line { background:var(--stroke-soft) !important; }
#screen-quest-shop .prep-month-arrow { color:var(--muted) !important; }
/* Sélecteur de chapitres (prep) */
#screen-quest-shop .prep-chap-picker {
  background:var(--surface) !important; border:1px solid var(--stroke-soft) !important;
  border-radius:10px !important; margin-top:6px !important;
}
#screen-quest-shop .prep-chap-item.pci-sel { background:rgba(84,214,160,.14) !important; border-color:rgba(84,214,160,.4) !important; color:#fff !important; }

/* ════ Pastille pièces : papillon doré ════ */
#screen-quest-shop .qs5-basket-badge::before {
  content:''; width:16px; height:16px; display:inline-block; vertical-align:-3px; margin-right:5px;
  background-repeat:no-repeat; background-position:center; background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 24c-3-10-10-15-17-13-4 1-5 8-2 13s11 6 19 0z' fill='%23f5b544'/%3E%3Cpath d='M24 24c3-10 10-15 17-13 4 1 5 8 2 13s-11 6-19 0z' fill='%23e0972a'/%3E%3Crect x='22.9' y='11' width='2.2' height='26' rx='1.1' fill='%239a6a1a'/%3E%3C/svg%3E");
}

/* Planification : pousser « + Ajouter / Importer » sous le calendrier (comme la maquette) */
#screen-quest-shop .agenda-top-actions { order:6 !important; }

/* ════════════════════════════════════════════════════════════════════════
   ✦ MODALE « PLANNING DU JOUR » (#aei-detail-overlay) — refonte maquette
   Carte d'événement : 1 action « Au plan » + menu ⋯ (scopé serré).
   ════════════════════════════════════════════════════════════════════════ */
/* Fond cosmique étoilé bien visible (esprit page principale), au lieu du voile noir */
#aei-detail-overlay {
  background:
    radial-gradient(80% 70% at 22% 22%, rgba(150,95,245,.45), transparent 60%),
    radial-gradient(80% 75% at 82% 80%, rgba(214,90,214,.34), transparent 62%),
    radial-gradient(70% 70% at 78% 18%, rgba(120,150,255,.22), transparent 60%),
    radial-gradient(140% 120% at 50% 30%, #1a1140, #0b0826 78%) !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  overflow:hidden !important;
}
/* Étoiles scintillantes (le fond « principal » sans dépendre du starfield JS) */
#aei-detail-overlay::before {
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:
    radial-gradient(2.4px 2.4px at 12% 18%, #fff, transparent),
    radial-gradient(2px 2px at 27% 62%, #e8e0ff, transparent),
    radial-gradient(1.8px 1.8px at 41% 32%, #fff, transparent),
    radial-gradient(2.6px 2.6px at 55% 78%, #fff, transparent),
    radial-gradient(2px 2px at 63% 22%, #d8ccff, transparent),
    radial-gradient(2.2px 2.2px at 73% 52%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 84% 35%, #fff, transparent),
    radial-gradient(2.4px 2.4px at 91% 72%, #efe8ff, transparent),
    radial-gradient(1.8px 1.8px at 33% 88%, #fff, transparent),
    radial-gradient(2px 2px at 8% 80%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 48% 12%, #fff, transparent),
    radial-gradient(2px 2px at 78% 90%, #fff, transparent),
    radial-gradient(2.2px 2.2px at 18% 45%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 67% 8%, #fff, transparent),
    radial-gradient(2px 2px at 95% 50%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 5% 35%, #fff, transparent);
  background-repeat:no-repeat;
  filter:drop-shadow(0 0 3px rgba(255,255,255,.6));
  animation:aeiTwinkle 4.5s ease-in-out infinite alternate;
}
@keyframes aeiTwinkle { from{opacity:.5} to{opacity:1} }
/* La carte passe au-dessus des étoiles */
#aei-detail-overlay .aei-detail-modal { position:relative !important; z-index:2 !important; }

/* Coque épurée (on enlève la déco cockpit néon) */
#aei-detail-overlay .aei-cpk-scanline,
#aei-detail-overlay .aei-cpk-corner { display:none !important; }
#aei-detail-overlay .aei-detail-modal {
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.02)) !important;
  border:1px solid var(--stroke) !important; border-radius:22px !important;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.85) !important;
}
/* En-tête : titre à gauche, boutons à droite (iconbtn) */
#aei-detail-overlay .aei-det-header {
  display:flex !important; align-items:center !important; gap:14px !important;
  padding:20px 22px 16px !important; border:none !important; background:none !important;
}
#aei-detail-overlay .aei-det-header-center {
  order:-1 !important; flex:1 !important; text-align:left !important; display:block !important;
}
#aei-detail-overlay .aei-det-hud-tag {
  display:block !important;
  font-size:11px !important; font-weight:700 !important; letter-spacing:.16em !important;
  text-transform:uppercase !important; color:var(--muted-2) !important; text-shadow:none !important;
}
#aei-detail-overlay .aei-det-date {
  display:block !important; white-space:nowrap !important;
  font-family:"Clash Display", sans-serif !important; font-weight:600 !important;
  font-size:22px !important; color:#fff !important; margin-top:3px !important; text-shadow:none !important;
}
#aei-detail-overlay .aei-det-nav-btn,
#aei-detail-overlay .aei-det-close {
  position:static !important; width:38px !important; height:38px !important; border-radius:12px !important;
  display:grid !important; place-items:center !important; cursor:pointer; flex:none !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke) !important;
  color:var(--muted) !important; box-shadow:none !important;
}
#aei-detail-overlay .aei-det-nav-btn:hover,
#aei-detail-overlay .aei-det-close:hover { color:#fff !important; border-color:rgba(196,181,253,.4) !important; }
#aei-detail-overlay .aei-det-body {
  padding:6px 18px 20px !important; display:flex !important; flex-direction:column !important;
  gap:11px !important; max-height:64vh !important; overflow-y:auto !important;
}
#aei-detail-overlay .aei-det-body::-webkit-scrollbar { width:6px; }
#aei-detail-overlay .aei-det-body::-webkit-scrollbar-thumb { background:rgba(255,255,255,.12); border-radius:10px; }

/* ── Carte événement ── */
.dd-body .event {
  display:flex !important; align-items:center !important; gap:15px !important;
  padding:16px 18px !important; border-radius:16px !important;
  background:var(--surface-2) !important; border:1px solid var(--stroke-soft) !important;
  transition:.22s cubic-bezier(.2,.8,.2,1) !important;
}
.dd-body .event:hover {
  transform:translateY(-2px); border-color:rgba(196,181,253,.3) !important;
  box-shadow:0 16px 36px -20px rgba(80,40,160,.8) !important;
}
.dd-body .ev-ic {
  width:46px !important; height:46px !important; border-radius:13px !important; flex:none !important;
  display:grid !important; place-items:center !important;
  background:linear-gradient(150deg,rgba(167,139,250,.22),rgba(214,90,214,.12)) !important;
  border:1px solid rgba(196,181,253,.2) !important; color:var(--violet-bright) !important;
}
.dd-body .ev-main { flex:1 !important; min-width:0 !important; }
.dd-body .ev-title {
  font-weight:600 !important; font-size:15.5px !important; color:#fff !important; margin-bottom:5px !important;
  /* Titre complet visible : on autorise le retour à la ligne au lieu de tronquer. */
  white-space:normal !important; overflow:visible !important; overflow-wrap:anywhere !important;
  text-overflow:clip !important; line-height:1.3 !important; text-shadow:none !important;
}
.dd-body .ev-meta { display:flex !important; align-items:center !important; gap:9px !important; font-size:13px !important; color:var(--muted) !important; }
.dd-body .ev-meta .type {
  font-size:10.5px !important; font-weight:700 !important; letter-spacing:.07em !important; text-transform:uppercase !important;
  color:var(--violet-bright) !important; padding:2px 8px !important; border-radius:20px !important;
  background:rgba(167,139,250,.13) !important;
}
.dd-body .ev-meta .sep { width:3px !important; height:3px !important; border-radius:50% !important; background:var(--muted-2) !important; display:inline-block; }
.dd-body .ev-act { display:flex !important; align-items:center !important; gap:8px !important; flex:none !important; }

/* Action principale */
.dd-body .primary {
  display:flex !important; align-items:center !important; gap:8px !important;
  padding:11px 18px !important; border:none !important; border-radius:12px !important; cursor:pointer;
  font:inherit; font-size:13.5px !important; font-weight:600 !important; color:#fff !important;
  background:linear-gradient(105deg,var(--indigo),var(--magenta)) !important;
  box-shadow:0 10px 26px -10px rgba(150,70,230,.8) !important; transition:.2s !important;
}
.dd-body .primary svg { width:15px !important; height:15px !important; }
.dd-body .primary:hover { transform:translateY(-1px); box-shadow:0 16px 32px -10px rgba(150,70,230,1) !important; }
.dd-body .primary.done {
  background:rgba(84,214,160,.14) !important; color:var(--green) !important;
  box-shadow:none !important; border:1px solid rgba(84,214,160,.3) !important;
}

/* Menu ⋯ */
.dd-body .more { position:relative !important; }
.dd-body .kebab {
  width:40px !important; height:40px !important; border-radius:12px !important;
  display:grid !important; place-items:center !important; cursor:pointer;
  background:transparent !important; border:1px solid transparent !important; color:var(--muted-2) !important; transition:.18s;
}
.dd-body .kebab:hover { color:#fff !important; background:var(--surface) !important; border-color:var(--stroke) !important; }
.dd-body .menu {
  position:absolute !important; top:calc(100% + 8px) !important; right:0 !important; width:188px !important;
  padding:7px !important; border-radius:14px !important; z-index:10 !important;
  background:rgba(20,15,42,.96) !important; border:1px solid var(--stroke) !important;
  backdrop-filter:blur(20px) !important; box-shadow:0 24px 50px -16px rgba(0,0,0,.7) !important;
  opacity:0; transform:translateY(-8px) scale(.97); pointer-events:none; transition:.2s cubic-bezier(.2,.8,.2,1);
}
.dd-body .more.open .menu { opacity:1; transform:none; pointer-events:auto; }
.dd-body .menu a {
  display:flex !important; align-items:center !important; gap:11px !important;
  padding:10px 12px !important; border-radius:10px !important; cursor:pointer;
  font-size:13.5px !important; font-weight:500 !important; color:var(--muted) !important; transition:.15s;
}
.dd-body .menu a svg { width:16px !important; height:16px !important; opacity:.85; }
.dd-body .menu a:hover { background:rgba(255,255,255,.07) !important; color:#fff !important; }
.dd-body .menu a.amber:hover, .dd-body .menu a.amber.on { color:var(--amber) !important; }
.dd-body .menu a.violet:hover, .dd-body .menu a.violet.on { color:var(--violet-bright) !important; }
.dd-body .menu .sep-h { height:1px !important; background:var(--stroke) !important; margin:5px 8px !important; }
.dd-body .menu a.danger { color:var(--muted-2) !important; }
.dd-body .menu a.danger:hover { color:#ff8a8a !important; background:rgba(255,120,120,.08) !important; }

/* État vide épuré */
#aei-detail-overlay .aei-det-empty { color:var(--muted-2) !important; }
#aei-detail-overlay .aei-det-add-btn {
  border:1px dashed rgba(167,139,250,.4) !important; background:rgba(167,139,250,.08) !important;
  color:var(--violet-bright) !important; border-radius:11px !important; box-shadow:none !important;
}

/* ════════════════════════════════════════════════════════════════════════
   ✦ PLANNING DU JOUR — VUE INLINE (sous le calendrier, dans la fenêtre Planif)
   Remplace l'ancienne modale : le jour cliqué s'affiche ici, pas par-dessus.
   Réutilise les cartes d'événement via la classe partagée .dd-body.
   ════════════════════════════════════════════════════════════════════════ */
.qs-day-inline {
  margin-top:16px; padding-top:16px;
  border-top:1px solid var(--stroke-soft, rgba(255,255,255,.06));
  display:flex; flex-direction:column; gap:12px;
}
.qs-day-inline-head {
  display:flex; align-items:center; gap:10px;
}
.qs-day-inline-titles { flex:1; display:flex; flex-direction:column; min-width:0; }
.qs-day-inline-tag {
  font-size:10.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted-2);
}
.qs-day-inline-date {
  font-family:"Clash Display","Satoshi",sans-serif; font-weight:600; font-size:16px;
  color:#fff; margin-top:2px; text-transform:capitalize;
}
.qs-day-inline-nav {
  width:30px; height:30px; border-radius:9px; flex:none;
  display:grid; place-items:center; cursor:pointer;
  background:var(--surface-2); border:1px solid var(--stroke-soft);
  color:var(--muted); transition:.15s;
}
.qs-day-inline-nav:hover { color:#fff; border-color:rgba(196,181,253,.4); }
/* conteneur des cartes (les cartes .event sont stylées par .dd-body) */
.qs-day-inline-body { display:flex; flex-direction:column; gap:10px; }

/* ── Cartes événement en colonne ÉTROITE ──────────────────────────────────
   La colonne Planification fait ~1/5 de la largeur (5 colonnes côte à côte).
   Les cartes héritées de la modale (large) y sont trop serrées : le titre se
   coupait lettre-par-lettre. On libère la largeur du titre en faisant passer
   la rangée d'actions SOUS le titre, et on remplace anywhere → break-word.
   Scopé #qs-day-inline : la modale (large) garde son rendu d'origine.        */
#qs-day-inline .event {
  flex-wrap:nowrap !important; align-items:center !important;
  gap:10px !important; padding:12px 13px !important;
}
#qs-day-inline .ev-ic { width:34px !important; height:34px !important; border-radius:10px !important; }
/* min-width:0 = lève le blocage flex qui comprimait le texte caractère par caractère */
#qs-day-inline .ev-main { flex:1 1 0 !important; min-width:0 !important; }
#qs-day-inline .ev-title {
  white-space:normal !important;
  overflow-wrap:break-word !important;
  word-break:normal !important;      /* surtout PAS break-all / anywhere */
  font-size:14px !important; line-height:1.3 !important;
}
/* "15h – 16h" et "60 min" restent groupés et passent à la ligne ENSEMBLE, pas empilés char par char */
#qs-day-inline .ev-meta { flex-wrap:wrap !important; row-gap:3px !important; }
#qs-day-inline .ev-meta > span { white-space:nowrap !important; }
/* Action sur LA MÊME ligne que le titre, rangée à droite : [titre flex:1] [rond ✓] [⋯] */
#qs-day-inline .ev-act { flex:none !important; align-items:center !important; gap:5px !important; margin-top:0 !important; }
/* « Au plan » → bouton rond discret (icône seule), pas un gros bouton qui mange la largeur */
#qs-day-inline .primary.aei-dib-plan {
  width:36px !important; height:36px !important; padding:0 !important; flex:none !important;
  border-radius:50% !important; display:grid !important; place-items:center !important;
  background:rgba(255,255,255,.04) !important; border:1px solid rgba(255,255,255,.12) !important;
  color:var(--muted-2) !important; box-shadow:none !important;
}
#qs-day-inline .primary.aei-dib-plan span { display:none !important; }   /* on masque le texte « Au plan » */
#qs-day-inline .primary.aei-dib-plan svg { width:17px !important; height:17px !important; }
#qs-day-inline .primary.aei-dib-plan:hover {
  color:#fff !important; border-color:rgba(196,181,253,.45) !important; transform:none !important;
}
/* état « au plan » = rond rempli vert */
#qs-day-inline .primary.aei-dib-plan.done {
  background:rgba(84,214,160,.16) !important; border-color:rgba(84,214,160,.45) !important;
  color:var(--green) !important;
}
/* menu ⋯ un peu plus compact pour tenir sur la ligne */
#qs-day-inline .kebab { width:34px !important; height:34px !important; }
/* Menu ⋯ adapté à la colonne étroite : ancré à droite, largeur réduite pour tenir dans la colonne */
#qs-day-inline .menu { width:168px !important; right:0 !important; left:auto !important; }
/* état vide aux couleurs de l'app */
#qs-day-inline .aei-det-empty {
  font-family:"Satoshi",sans-serif !important; font-size:12.5px !important; letter-spacing:0 !important;
  color:var(--muted-2) !important; padding:20px 10px !important; gap:9px !important;
}
#qs-day-inline .aei-det-add-btn {
  font-family:"Satoshi",sans-serif !important; font-size:12.5px !important; font-weight:600 !important;
  letter-spacing:0 !important; padding:10px 18px !important; border-radius:11px !important;
  border:1px dashed rgba(167,139,250,.4) !important; background:rgba(167,139,250,.08) !important;
  color:var(--violet-bright) !important;
}
#qs-day-inline .aei-det-add-btn:hover { background:rgba(167,139,250,.16) !important; }
/* ════════════════════════════════════════════════════════════════════════ */

/* ── Révision : retirer le liseré coloré (encadré) de l'en-tête matière ──
   L'en-tête .item-on prenait une bordure couleur accent (rose/orange). On la supprime. */
#screen-quest-shop .rev-subject-header.item,
#screen-quest-shop .rev-subject-header.item-on {
  border: none !important;
  box-shadow: none !important;
}

/* ── Révision : bouton « Ajouter une matière » centré et contenu (plus de débordement) ── */
#screen-quest-shop .rev-add-subj-wrap {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0 12px 10px !important;
  box-sizing: border-box !important;
}
#screen-quest-shop .rev-forge-btn {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
  padding: 11px 10px !important;
}

/* ── Révision : bouton « Ajouter un chapitre » aligné sur la ligne du chapitre ──
   width:100% + margin:10px le faisait déborder (rogné par overflow:hidden).
   On lui redonne la largeur calculée (= largeur de la ligne chapitre), centré. */
#screen-quest-shop .rev-add-chap-btn {
  width: calc(100% - 20px) !important;
  max-width: calc(100% - 20px) !important;
  margin: 4px 10px 10px !important;
  box-sizing: border-box !important;
}
#screen-quest-shop .rev-chapters { overflow: visible !important; }

/* ── Sélecteur Mois / Semaine / Jour : pastille colorée qui glisse ── */
#screen-quest-shop .cal-view-toggle { position: relative !important; overflow: visible !important; }
#screen-quest-shop .cal-view-btn {
  position: relative !important; z-index: 1 !important;
  background: transparent !important; transition: color .25s !important;
}
#screen-quest-shop .cal-view-btn.active {
  background: transparent !important; color: #fff !important; box-shadow: none !important;
}
#screen-quest-shop .cal-view-pill {
  position: absolute !important; left: 0; top: 4px; bottom: 4px; z-index: 0;
  border-radius: 8px; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, #6d5dfc, #d65ad6);
  box-shadow: 0 8px 22px -8px rgba(150,70,230,.85), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .32s cubic-bezier(.4,0,.2,1), width .32s cubic-bezier(.4,0,.2,1);
}

/* ══ Boutons « Carte » & « On décolle » — paire restylée ══
   (ids/onclick conservés ; ce bloc écrase l'ancien style + le halo cyan sous Carte) */
#screen-quest-shop .qs5-gen-wrap { display:flex !important; align-items:center !important; justify-content:center !important; gap:14px !important; }

/* Carte = bouton translucide (secondaire) */
#screen-quest-shop .mcp-trigger-btn {
  display:flex !important; align-items:center !important; justify-content:center !important; gap:11px !important;
  height:58px !important; padding:0 28px !important; min-width:0 !important; border-radius:16px !important; cursor:pointer;
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:16px !important;
  letter-spacing:.02em !important; text-transform:none !important; white-space:nowrap !important;
  outline:none !important;                          /* supprime l'encadrement noir (outline 3px) */
  border:1px solid rgba(255,255,255,.22) !important;        /* fin liseré blanc */
  background:rgba(255,255,255,.03) !important;               /* léger verre premium */
  color:#fff !important;
  backdrop-filter:blur(10px) !important; -webkit-backdrop-filter:blur(10px) !important;
  /* néon blanc léger : halo doux + lueur diffuse + fin reflet intérieur */
  box-shadow:0 0 14px rgba(255,255,255,.18), 0 0 30px rgba(255,255,255,.07), inset 0 0 0 1px rgba(255,255,255,.10) !important;
  animation:none !important;                        /* supprime le clignotant (mcp-glow-breathe / float) */
  transition:.22s cubic-bezier(.2,.8,.2,1) !important;
}
#screen-quest-shop .mcp-trigger-btn::before,
#screen-quest-shop .mcp-trigger-btn::after { display:none !important; content:none !important; animation:none !important; }
#screen-quest-shop .mcp-trigger-btn svg { width:20px !important; height:20px !important; filter:none !important; }
#screen-quest-shop .mcp-trigger-btn span { font:inherit !important; color:inherit !important; letter-spacing:inherit !important; text-transform:none !important; }
#screen-quest-shop .mcp-trigger-btn:hover {
  color:#fff !important; background:rgba(255,255,255,.06) !important;
  border-color:rgba(255,255,255,.38) !important;
  transform:translateY(-2px) !important;
  box-shadow:0 0 20px rgba(255,255,255,.28), 0 0 42px rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.16) !important;
}
#screen-quest-shop .mcp-trigger-btn:hover svg { transform:none !important; filter:none !important; }

/* On décolle = action principale (dégradé + shimmer + halo violet) */
#screen-quest-shop .qs5-gen-btn {
  position:relative !important; overflow:hidden !important;
  display:flex !important; align-items:center !important; justify-content:center !important; gap:11px !important;
  height:58px !important; padding:0 46px !important; min-width:0 !important; border-radius:16px !important; cursor:pointer;
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:16px !important;
  letter-spacing:.02em !important; text-transform:none !important; white-space:nowrap !important;
  border:none !important; outline:none !important; color:#fff !important;
  background:linear-gradient(105deg,#6d5dfc,#d65ad6) !important;
  box-shadow:0 16px 40px -12px rgba(150,70,230,.85), 0 0 0 1px rgba(255,255,255,.12) inset !important;
  animation:none !important;                        /* pas de clignotant/shimmer animé */
  transition:.22s cubic-bezier(.2,.8,.2,1) !important;
}
#screen-quest-shop .qs5-gen-btn svg { width:20px !important; height:20px !important; }
/* Plus de shimmer/clignotant : on désactive les deux pseudo-éléments animés */
#screen-quest-shop .qs5-gen-btn::before,
#screen-quest-shop .qs5-gen-btn::after { display:none !important; content:none !important; animation:none !important; }
#screen-quest-shop .qs5-gen-btn:hover {
  transform:translateY(-3px) !important;
  box-shadow:0 24px 54px -12px rgba(150,70,230,1), 0 0 0 1px rgba(255,255,255,.2) inset !important;
}
#screen-quest-shop .qs5-gen-btn:active { transform:scale(0.97) !important; }

/* ══ Pastille fusionnée date + heure (remplace les 2 pastilles séparées) ══ */
#screen-quest-shop .chip,
#screen-daily-plan .chip,
#screen-quest-path .chip {
  display:inline-flex !important; align-items:center !important; gap:10px !important;
  padding:10px 16px !important; border-radius:30px !important;
  background:rgba(255,255,255,.04) !important;
  border:1px solid rgba(255,255,255,.07) !important;
  backdrop-filter:blur(12px) !important; -webkit-backdrop-filter:blur(12px) !important;
  box-shadow:none !important;
}
#screen-quest-shop .chip svg, #screen-daily-plan .chip svg, #screen-quest-path .chip svg { width:15px !important; height:15px !important; color:#7d749e !important; stroke:#7d749e !important; opacity:1 !important; flex-shrink:0 !important; }
#screen-quest-shop .chip .d, #screen-daily-plan .chip .d, #screen-quest-path .chip .d { font-family:"Satoshi","Inter",sans-serif !important; font-size:14px !important; font-weight:500 !important; color:#f3f0ff !important; text-transform:none !important; letter-spacing:0 !important; white-space:nowrap !important; }
#screen-quest-shop .chip .sep, #screen-daily-plan .chip .sep, #screen-quest-path .chip .sep { width:3px !important; height:3px !important; border-radius:50% !important; background:#7d749e !important; flex-shrink:0 !important; }
#screen-quest-shop .chip .h, #screen-daily-plan .chip .h, #screen-quest-path .chip .h { font-family:"Clash Display",sans-serif !important; font-size:14px !important; font-weight:500 !important; color:#b3a9d6 !important; letter-spacing:.02em !important; white-space:nowrap !important; }

/* ════════════════════════════════════════════════════════════════════════
   ✦ ÉCHELLE TYPOGRAPHIQUE t1–t5 — écran « Programmer la mission du jour »
   Classes réutilisables + mapping des textes existants sur leur niveau.
   RÈGLE : MAJUSCULES uniquement en t2 et t5 ; casse normale partout ailleurs.
   Pour ajuster un niveau partout, modifie ici (un seul endroit).
   ════════════════════════════════════════════════════════════════════════ */

/* t1 — Titre de page (1 seul par écran) */
.t1,
.mc-htitle,
#screen-quest-shop .t1,
#screen-quest-shop .qs5-title {
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important;
  font-size:22px !important; letter-spacing:.01em !important; color:#f3f0ff !important;
  text-transform:none !important; text-shadow:none !important;
}

/* t2 — Titre de section / colonne (MAJUSCULES autorisées) */
.t2,
#screen-quest-shop .t2,
#screen-quest-shop .qs5-col-title {
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important;
  font-size:13px !important; letter-spacing:.06em !important; text-transform:uppercase !important;
  color:#fff !important; text-shadow:none !important;
}

/* t3 — Titre d'élément (matière, examen, cours…) — JAMAIS en majuscules */
.t3,
#screen-quest-shop .t3,
#screen-quest-shop .item .body .t,
#screen-quest-shop .rev-subj-name,
#screen-quest-shop .rev-chap-name,
#screen-quest-shop .ev-title {
  font-family:"Satoshi",sans-serif !important; font-weight:600 !important;
  font-size:15px !important; color:#fff !important;
  text-transform:none !important; letter-spacing:0 !important;
}

/* t4 — Sous-titre / info sous un élément */
.t4,
#screen-quest-shop .t4,
#screen-quest-shop .item .body .s,
#screen-quest-shop .rev-subject .s,
#screen-quest-shop .ev-meta {
  font-family:"Satoshi",sans-serif !important; font-weight:500 !important;
  font-size:13px !important; color:#b3a9d6 !important;
  text-transform:none !important; letter-spacing:0 !important;
}

/* t5 — Micro-étiquette / tag (MAJUSCULES autorisées) */
.t5,
#screen-quest-shop .t5,
#screen-quest-shop .qs-day-inline-tag,
#screen-quest-shop .ev-meta .type,
#screen-quest-shop .s-sub .tag {
  font-family:"Satoshi",sans-serif !important; font-weight:700 !important;
  font-size:11px !important; letter-spacing:.14em !important; text-transform:uppercase !important;
  color:#7d749e !important;
}

/* ══ « Planning du jour » : sélecteur = étoile bleue (couleur-section Planification) ══
   Remplace l'ancien rond/coche verte. Vide = non au plan, pleine = au plan.
   (La classe aei-dib-plan est conservée → câblage tryValidateAgendaItem intact.) */
#qs-day-inline .star-sel,
#aei-det-body .star-sel {
  width:42px !important; height:42px !important; border-radius:12px !important; flex:none !important;
  display:grid !important; place-items:center !important; cursor:pointer !important;
  padding:0 !important; border:none !important; box-shadow:none !important;
  background:rgba(90,160,245,.16) !important; transition:.18s !important;
}
#qs-day-inline .star-sel svg,
#aei-det-body .star-sel svg { width:20px !important; height:20px !important; }
#qs-day-inline .star-sel .s-icon,
#aei-det-body .star-sel .s-icon {
  fill:transparent !important; stroke:#7cb0f5 !important; stroke-width:1.7 !important; transition:.18s !important;
}
#qs-day-inline .star-sel.sel .s-icon,
#aei-det-body .star-sel.sel .s-icon { fill:#7cb0f5 !important; }
#qs-day-inline .star-sel:hover,
#aei-det-body .star-sel:hover { background:rgba(90,160,245,.26) !important; transform:none !important; }

/* ══ Calendrier (mode Mois) — restyle exact ══
   Jours vides = gris doux, jours avec contenu = blancs, AUJOURD'HUI = contour fin
   (sans fond, distinct), SÉLECTIONNÉ = pastille pleine dégradée. Points : violet=à faire, ambre=rattrapage. */
#screen-quest-shop .cal-month-label {
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:18px !important;
  color:#fff !important; letter-spacing:0 !important; text-transform:none !important;
}
#screen-quest-shop .cal-nav-btn {
  width:36px !important; height:36px !important; border-radius:11px !important;
  display:grid !important; place-items:center !important;
  background:rgba(255,255,255,.04) !important; border:1px solid rgba(255,255,255,.09) !important;
  color:#b3a9d6 !important; font-size:17px !important; cursor:pointer; transition:.15s !important;
}
#screen-quest-shop .cal-nav-btn:hover:not(:disabled) { color:#fff !important; border-color:rgba(196,181,253,.4) !important; }
#screen-quest-shop .agenda-cal-grid { gap:4px !important; }
#screen-quest-shop .cal-day-hdr {
  font-size:11px !important; font-weight:700 !important; color:#7d749e !important;
  text-transform:uppercase !important; padding-bottom:4px !important;
}
#screen-quest-shop .cal-cell {
  aspect-ratio:1/1 !important; gap:3px !important; border-radius:11px !important;
  font-size:15px !important; font-weight:500 !important;
  color:rgba(255,255,255,.35) !important;   /* jour SANS événement = terne/effacé */
  background:transparent !important; box-shadow:none !important;
}
#screen-quest-shop .cal-cell:hover { background:rgba(255,255,255,.06) !important; color:#fff !important; }
/* jours AVEC événement / aujourd'hui / sélectionné = blancs (ressortent) */
#screen-quest-shop .cal-cell.cal-has-items,
#screen-quest-shop .cal-cell.cal-has-galaxy,
#screen-quest-shop .cal-cell.cal-today,
#screen-quest-shop .cal-cell.cal-selected { color:#fff !important; font-weight:700 !important; }
#screen-quest-shop .cal-empty { opacity:0 !important; pointer-events:none !important; background:transparent !important; }
/* Aujourd'hui = contour fin discret (PAS de fond) */
#screen-quest-shop .cal-today {
  background:transparent !important; color:#fff !important;
  box-shadow:inset 0 0 0 1.5px rgba(196,181,253,.55) !important;
}
/* Sélectionné = pastille pleine dégradée (distinct d'aujourd'hui) */
#screen-quest-shop .cal-selected {
  background:linear-gradient(135deg,#6d5dfc,#d65ad6) !important; color:#fff !important;
  box-shadow:0 10px 24px -8px rgba(150,70,230,.9) !important;
}
/* Points : violet = à faire, ambre = rattrapage */
#screen-quest-shop .cal-dot,
#screen-quest-shop .cal-dot-future { width:5px !important; height:5px !important; background:#a78bfa !important; }
#screen-quest-shop .cal-dot-missed { background:#f5a23d !important; }
#screen-quest-shop .cal-selected .cal-dot { background:#fff !important; }

/* Sélecteur Mois/Semaine/Jour — aligné EXACTEMENT sur le modèle (casse normale, pas de MAJUSCULES) */
#screen-quest-shop .cal-view-toggle {
  gap:4px !important; padding:5px !important; border-radius:14px !important;
  background:rgba(255,255,255,.05) !important; border:1px solid rgba(255,255,255,.08) !important;
  box-shadow:none !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
}
#screen-quest-shop .cal-view-btn {
  flex:1 !important; padding:10px 0 !important; border:none !important; background:transparent !important;
  box-shadow:none !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
  color:var(--muted) !important; font-family:"Satoshi",sans-serif !important;
  font-size:13.5px !important; font-weight:600 !important; letter-spacing:0 !important;
  text-transform:none !important; border-radius:10px !important;
}
#screen-quest-shop .cal-view-btn.active { background:transparent !important; color:#fff !important; }
#screen-quest-shop .cal-view-pill { border-radius:10px !important; }

/* ══════════════════════════════════════════════════════════════════════
   ✦ RÉCAPITULATIF DE LA MISSION (#screen-daily-plan) — reskin modèle
   Grille de départ = carte « .recap » propre, titre casse normale, bouton dégradé.
   (Mécanique route/lancement inchangée.)
   ══════════════════════════════════════════════════════════════════════ */
/* Titre — casse normale, dégradé violet→magenta (pas de néon cyan animé) */
body:not(.light-theme) #screen-daily-plan .screen-title,
#screen-daily-plan .screen-title {
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important;
  font-size:21px !important; letter-spacing:.01em !important; text-transform:none !important;
  background:linear-gradient(100deg,#c4b5fd,#d65ad6) !important;
  -webkit-background-clip:text !important; background-clip:text !important;
  -webkit-text-fill-color:transparent !important; color:transparent !important;
  filter:none !important; animation:none !important;
}
/* Carte grille de départ */
#screen-daily-plan .plan-standings {
  border-radius:18px !important; background:var(--surface) !important;
  border:1px solid var(--stroke) !important; box-shadow:none !important;
  backdrop-filter:blur(14px) !important; -webkit-backdrop-filter:blur(14px) !important;
  overflow:hidden !important;
}
#screen-daily-plan .plan-standings::before { display:none !important; }
#screen-daily-plan .pst-header {
  padding:14px 18px !important; border-bottom:1px solid var(--stroke-soft) !important;
  background:transparent !important;
}
#screen-daily-plan .pst-header::before,
#screen-daily-plan .pst-header::after,
#screen-daily-plan .pst-header-dot { display:none !important; }
#screen-daily-plan .pst-title {
  font-family:"Satoshi",sans-serif !important; font-size:11px !important; font-weight:700 !important;
  letter-spacing:.14em !important; text-transform:uppercase !important; color:var(--muted-2) !important;
}
/* Lignes = étapes propres */
#screen-daily-plan .pst-row {
  display:flex !important; align-items:center !important; gap:14px !important;
  padding:15px 18px !important; border-bottom:1px solid var(--stroke-soft) !important;
  background:transparent !important; box-shadow:none !important; animation:none !important;
}
#screen-daily-plan .pst-row:hover { background:var(--surface-2) !important; }
#screen-daily-plan .pst-bar { display:none !important; }
#screen-daily-plan .pst-pos-badge {
  width:34px !important; height:34px !important; border-radius:10px !important; flex:none !important;
  display:grid !important; place-items:center !important;
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:15px !important;
  color:var(--violet-bright) !important; background:rgba(167,139,250,.16) !important;
  border:none !important; box-shadow:none !important;
}
#screen-daily-plan .pst-pos-badge::after { display:none !important; }
#screen-daily-plan .pst-info { flex:1 !important; min-width:0 !important; }
#screen-daily-plan .pst-name {
  font-family:"Satoshi",sans-serif !important; font-weight:600 !important; font-size:15px !important;
  color:#fff !important; text-transform:none !important; letter-spacing:0 !important;
}
#screen-daily-plan .pst-meta { display:flex !important; align-items:center !important; gap:6px !important; margin-top:3px !important; }
#screen-daily-plan .pst-cat-tag {
  font-size:10px !important; font-weight:700 !important; letter-spacing:.08em !important;
  text-transform:uppercase !important; color:var(--muted-2) !important;
}
#screen-daily-plan .pst-time { font-size:12px !important; color:var(--muted) !important; }
/* Gain = pastille dorée (on garde le papillon) */
#screen-daily-plan .pst-coins-badge {
  display:flex !important; align-items:center !important; gap:6px !important; flex:none !important;
  padding:6px 12px !important; border-radius:20px !important;
  background:rgba(245,181,68,.1) !important; border:1px solid rgba(245,181,68,.25) !important;
  color:var(--gold) !important; font-weight:700 !important; font-size:13px !important; box-shadow:none !important;
}
/* Pied = temps total + total pièces */
#screen-daily-plan .pst-footer {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  padding:15px 18px !important; background:rgba(255,255,255,.02) !important; border-top:1px solid var(--stroke-soft) !important;
}
#screen-daily-plan .pst-footer::before { display:none !important; }
#screen-daily-plan .pst-footer-time {
  font-family:"Clash Display",sans-serif !important; font-weight:500 !important; font-size:16px !important; color:#fff !important;
}
#screen-daily-plan .pst-footer-coins {
  display:flex !important; align-items:center !important; gap:7px !important;
  padding:8px 15px !important; border-radius:30px !important;
  background:rgba(245,181,68,.14) !important; border:1px solid rgba(245,181,68,.35) !important;
  color:var(--gold) !important; font-weight:700 !important; font-size:16px !important;
}
/* Bouton Valider = action principale dégradée */
#screen-daily-plan .btn-launch {
  display:flex !important; align-items:center !important; justify-content:center !important; gap:11px !important;
  width:340px !important; max-width:100% !important; padding:17px !important; border-radius:16px !important;
  border:none !important; color:#fff !important; cursor:pointer; position:relative !important; overflow:hidden !important;
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:17px !important;
  letter-spacing:.01em !important; text-transform:none !important;
  background:linear-gradient(105deg,var(--indigo),var(--magenta)) !important;
  box-shadow:0 16px 44px -12px rgba(150,70,230,.9), 0 0 0 1px rgba(255,255,255,.12) inset !important;
}
#screen-daily-plan .btn-launch:hover { transform:translateY(-2px) !important; }
#screen-daily-plan .btn-launch svg { width:19px !important; height:19px !important; }
/* Courbe de mission (modèle) */
#screen-daily-plan #map-svg { width:100% !important; max-width:820px !important; height:auto !important; display:block; margin:0 auto; }
#screen-daily-plan #map-svg .node-num { font-family:"Clash Display",sans-serif !important; font-weight:600; font-size:15px; fill:#fff; }
#screen-daily-plan #map-svg .cap { font-family:"Satoshi",sans-serif !important; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
/* En-tête : pastille pièces dorée (style modèle) */
#screen-daily-plan .plan-header-coins {
  display:flex !important; align-items:center !important; gap:7px !important;
  padding:8px 14px !important; border-radius:30px !important; flex:none !important;
  font-family:"Satoshi",sans-serif !important; font-size:15px !important; font-weight:700 !important;
  letter-spacing:0 !important; color:var(--gold) !important;
  background:rgba(245,181,68,.1) !important; border:1px solid rgba(245,181,68,.3) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   ✦ RÉCAPITULATIF DE LA MISSION — page reconstruite EXACTEMENT sur le modèle
   (classes préfixées dp- ; données réelles via renderDailyPlan/dessineCourbe/dessineGrille)
   ══════════════════════════════════════════════════════════════════════ */
#screen-daily-plan {
  /* Tokens du modèle scopés ici (sinon var(--magenta)/--violet-bright sont vides → dégradés invalides) */
  --violet:#a78bfa; --violet-bright:#c4b5fd; --indigo:#6d5dfc; --magenta:#d65ad6;
  --teal:#5ad6e0; --gold:#f5b544;
  --ink:#f3f0ff; --muted:#b3a9d6; --muted-2:#7d749e;
  --surface:rgba(255,255,255,.04); --surface-2:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.09); --stroke-soft:rgba(255,255,255,.06);
  /* Fond transparent → on voit le fond cosmique GLOBAL unifié (#cosmic-bg), comme partout. */
  background: transparent !important;
  overflow:hidden !important;
}
/* Calque d'étoiles propre à la page retiré : le fond global #cosmic-bg fournit déjà les étoiles (unifié, sans couture). */
#screen-daily-plan .plan-stars { display:none !important; }
#screen-daily-plan .plan-stars-unused { position:fixed; inset:0; z-index:0; pointer-events:none; }
#screen-daily-plan .plan-stars .star { position:absolute; background:#fff; border-radius:50%;
  animation-name:dpTw; animation-timing-function:ease-in-out; animation-iteration-count:infinite; }
@keyframes dpTw { 0%,100%{opacity:.15;transform:scale(.8)} 50%{opacity:.9;transform:scale(1.2)} }

#screen-daily-plan .dp-page { position:relative; z-index:2; height:100vh; box-sizing:border-box;
  display:flex; flex-direction:column; padding:22px 34px 28px; }

/* 1. En-tête */
#screen-daily-plan .dp-top { display:flex; align-items:center; gap:16px; margin-bottom:10px; }
#screen-daily-plan .dp-back { width:42px; height:42px; border-radius:13px; display:grid; place-items:center;
  cursor:pointer; flex:none; background:var(--surface); border:1px solid var(--stroke); color:var(--muted); transition:.18s; }
#screen-daily-plan .dp-back:hover { color:#fff; border-color:rgba(196,181,253,.4); }
#screen-daily-plan .dp-title { flex:1; text-align:center; font-family:"Clash Display",sans-serif !important; font-weight:600 !important;
  font-size:21px !important; letter-spacing:.01em !important; text-transform:none !important; text-shadow:none !important;
  background:linear-gradient(100deg,var(--violet-bright),var(--magenta)) !important;
  -webkit-background-clip:text !important; background-clip:text !important;
  -webkit-text-fill-color:transparent !important; color:transparent !important; }
#screen-daily-plan .dp-coins { display:flex; align-items:center; gap:7px; padding:8px 14px; border-radius:30px; flex:none;
  background:rgba(245,181,68,.1); border:1px solid rgba(245,181,68,.3); color:var(--gold); font-weight:700; font-size:15px; }
#screen-daily-plan .dp-coins .pst-butterfly-circle { width:18px; height:18px; }

/* 2. Zone principale : cartes + bouton centrés ENSEMBLE (le bouton suit les cartes) */
#screen-daily-plan .dp-main { flex:1; min-height:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:clamp(40px, 7vh, 96px); padding-top:clamp(24px, 7vh, 90px); }
#screen-daily-plan .dp-duo { width:92%; max-width:2400px; display:grid; grid-template-columns:1fr 1fr; gap:28px; align-items:stretch;
  flex:1 1 auto; min-height:0; max-height:680px; }
#screen-daily-plan .dp-panel { border-radius:20px; background:var(--surface); border:1px solid var(--stroke);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); overflow:hidden; display:flex; flex-direction:column; min-height:0; }
#screen-daily-plan .dp-panel-head { padding:15px 20px; border-bottom:1px solid var(--stroke-soft); flex:none;
  font-family:"Satoshi",sans-serif; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--muted-2); }
#screen-daily-plan .dp-map { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; padding:20px; overflow:hidden; }
/* La liste défile à l'intérieur du panneau au lieu d'étirer la page */
#screen-daily-plan .dp-panel #recap-list { flex:1; min-height:0; overflow-y:auto; }
#screen-daily-plan .dp-panel #recap-list::-webkit-scrollbar { width:6px; }
#screen-daily-plan .dp-panel #recap-list::-webkit-scrollbar-thumb { background:rgba(167,139,250,.35); border-radius:3px; }
#screen-daily-plan .dp-map #map-svg { width:100%; max-width:680px; height:auto; max-height:100%; }

/* 2B. Grille de départ */
#screen-daily-plan .dp-recap { border-radius:18px; background:var(--surface); border:1px solid var(--stroke);
  overflow:hidden; backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
#screen-daily-plan .dp-recap-head { padding:14px 18px; border-bottom:1px solid var(--stroke-soft);
  font-family:"Satoshi",sans-serif; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--muted-2); }
#screen-daily-plan .dp-step { display:flex; align-items:center; gap:14px; padding:15px 18px; border-bottom:1px solid var(--stroke-soft); }
#screen-daily-plan .dp-num { width:34px; height:34px; border-radius:10px; flex:none; display:grid; place-items:center;
  font-family:"Clash Display",sans-serif; font-weight:600; font-size:15px; color:var(--violet-bright); background:rgba(167,139,250,.16); }
#screen-daily-plan .dp-info { flex:1; min-width:0; }
#screen-daily-plan .dp-t { font-family:"Satoshi",sans-serif; font-weight:600; font-size:15px; color:#fff; text-transform:none; }
#screen-daily-plan .dp-s { font-size:12px; color:var(--muted); margin-top:3px; }
#screen-daily-plan .dp-s .dp-tag { font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted-2); margin-right:6px; }
#screen-daily-plan .dp-gain { display:flex; align-items:center; gap:6px; padding:6px 12px; border-radius:20px; flex:none;
  background:rgba(245,181,68,.1); border:1px solid rgba(245,181,68,.25); color:var(--gold); font-weight:700; font-size:13px; }
#screen-daily-plan .dp-gain .pst-butterfly-circle { width:15px; height:15px; }
#screen-daily-plan .dp-recap-foot { margin-top:auto; flex:none; display:flex; align-items:center; justify-content:space-between; padding:16px 20px; background:rgba(255,255,255,.02); }
#screen-daily-plan .dp-time { display:flex; align-items:center; gap:9px; font-family:"Clash Display",sans-serif; font-weight:500; font-size:16px; color:#fff; }
#screen-daily-plan .dp-time svg { width:16px; height:16px; color:var(--muted); }
#screen-daily-plan .dp-total { display:flex; align-items:center; gap:7px; padding:8px 15px; border-radius:30px;
  background:rgba(245,181,68,.14); border:1px solid rgba(245,181,68,.35); color:var(--gold); font-weight:700; font-size:16px; }
#screen-daily-plan .dp-total .pst-butterfly-circle { width:18px; height:18px; }

/* 3. Bouton Valider */
#screen-daily-plan .dp-validate { display:flex; justify-content:center; padding-top:22px; }
#screen-daily-plan .dp-btn-go { display:inline-flex; align-items:center; justify-content:center; gap:11px; width:auto; min-width:220px; max-width:100%;
  padding:16px 48px; border-radius:16px; cursor:pointer; border:none; color:#fff;
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:17px !important;
  letter-spacing:.01em !important; text-transform:none !important; position:relative; overflow:hidden;
  background:linear-gradient(105deg,var(--indigo),var(--magenta)) !important;
  box-shadow:0 16px 44px -12px rgba(150,70,230,.9), 0 0 0 1px rgba(255,255,255,.12) inset; transition:.2s; }
#screen-daily-plan .dp-btn-go svg { width:19px; height:19px; }
#screen-daily-plan .dp-btn-go::after { content:""; position:absolute; top:0; left:-60%; width:50%; height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.45),transparent); transform:skewX(-18deg);
  animation:dpSh 4.5s ease-in-out infinite; }
@keyframes dpSh { 0%,60%{left:-60%} 80%,100%{left:130%} }
#screen-daily-plan .dp-btn-go:hover { transform:translateY(-2px); }

/* ══════════════════════════════════════════════════════════════════════
   ✦ PARCOURS DU JOUR (#screen-quest-path) — même FOND + même EN-TÊTE que le
   Récapitulatif. On ne touche PAS au chemin de quête (#quest-path-map).
   ══════════════════════════════════════════════════════════════════════ */
#screen-quest-path {
  /* Fond transparent → fond cosmique GLOBAL unifié (#cosmic-bg), comme partout. */
  background: transparent !important;
}
/* En-tête en flux, transparent (le fond uniforme plein écran passe derrière) */
/* PAS d'en-tête : la bande/titre disparaît, seuls la croix (sortie) et les pièces
   flottent dans les coins → la carte remplit tout, fond continu, AUCUNE démarcation. */
#screen-quest-path .quest-path-header {
  position:absolute !important; top:0 !important; left:0 !important; right:0 !important; z-index:60 !important;
  background:transparent !important; -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  border:none !important; box-shadow:none !important;
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  gap:16px !important; padding:18px 24px !important; pointer-events:none !important;
}
/* Titre ré-affiché : flotte directement sur le fond (pas de bande) */
#screen-quest-path .btn-exit-game,
#screen-quest-path .qp-header-coins { pointer-events:auto !important; }
/* Titre : centré sur la page + MÊME police/couleur que « Programmer la mission du jour » */
#screen-quest-path .qp-header-coins { margin-left:auto !important; }
#screen-quest-path .quest-path-header { justify-content:flex-start !important; }
#screen-quest-path .qp-header-title {
  position:absolute !important; left:50% !important; top:50% !important;
  transform:translate(-50%,-50%) !important;
  flex:none !important; margin:0 !important; max-width:none !important; text-align:center !important;
  font-family:"Clash Display",sans-serif !important; font-weight:600 !important; font-size:22px !important;
  letter-spacing:.01em !important; text-transform:none !important; text-shadow:none !important;
  background:none !important;
  -webkit-text-fill-color:#f3f0ff !important; color:#f3f0ff !important;
  white-space:nowrap !important; pointer-events:none !important;
}
/* Bouton (croix pause) : même boîte arrondie que le retour du Récap */
#screen-quest-path .btn-exit-game {
  width:42px !important; height:42px !important; min-width:42px !important; flex:none !important;
  border-radius:13px !important; display:flex !important; align-items:center !important; justify-content:center !important; padding:0 !important;
  background:rgba(255,255,255,.04) !important; border:1px solid rgba(255,255,255,.09) !important;
  color:#b3a9d6 !important; -webkit-text-fill-color:#b3a9d6 !important; box-shadow:none !important;
}
#screen-quest-path .btn-exit-game:hover {
  color:#fff !important; background:rgba(255,255,255,.07) !important; border-color:rgba(196,181,253,.4) !important; box-shadow:none !important;
}
/* Pièces : pastille dorée (papillon + valeur), comme le Récap */
#screen-quest-path .qp-header-coins {
  display:flex !important; align-items:center !important; gap:7px !important; flex:none !important;
  padding:8px 14px !important; border-radius:30px !important;
  background:rgba(245,181,68,.1) !important; border:1px solid rgba(245,181,68,.3) !important;
  color:#f5b544 !important; font-family:"Satoshi",sans-serif !important; font-weight:700 !important; font-size:15px !important; letter-spacing:0 !important;
}
#screen-quest-path .qp-header-coins .pst-butterfly-circle { width:18px !important; height:18px !important; }

/* Fond du Récapitulatif : dégradé sobre + étoiles discrètes, plein écran.
   (Le Parcours, lui, utilise le fond cosmique GLOBAL #cosmic-bg comme l'accueil.) */
#screen-daily-plan::before {
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none; background-repeat:no-repeat;
  background-image:
    radial-gradient(2px 2px at 8% 12%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 26%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 35% 9%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(2px 2px at 48% 19%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1px 1px at 62% 13%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 23%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(2px 2px at 91% 10%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1px 1px at 14% 40%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 52%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 44% 44%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(2px 2px at 58% 56%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 72% 47%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 86% 60%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 6% 64%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(2px 2px at 18% 76%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1px 1px at 34% 84%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 50% 72%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 66% 88%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(2px 2px at 82% 80%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 94% 70%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 26% 93%, rgba(255,255,255,.65), transparent 60%),
    radial-gradient(1px 1px at 54% 95%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 74% 97%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(120% 90% at 70% 10%, rgba(120,80,220,.28), transparent 55%),
    radial-gradient(140% 120% at 50% 0%, #0e0a24, #070512 74%);
}
/* Carte au-dessus du fond, mais l'en-tête (z-index:2) reste au-dessus de tout */
#screen-quest-path .quest-path-map { position:relative !important; z-index:1 !important; }

/* ══ Pastilles pièces SOBRES (récap + parcours) : moins de jaune ══
   Pilule neutre translucide + chiffre blanc + petit papillon doré SANS cercle. */
#screen-daily-plan .dp-coins,
#screen-daily-plan .dp-gain,
#screen-daily-plan .dp-total,
#screen-quest-path .qp-header-coins {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  color: #fff !important;
}
/* papillon doré seul, plus de cercle doré */
#screen-daily-plan .pst-butterfly-circle,
#screen-quest-path .pst-butterfly-circle {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}
#screen-daily-plan .dp-coins .pst-butterfly-circle,
#screen-daily-plan .dp-gain .pst-butterfly-circle,
#screen-daily-plan .dp-total .pst-butterfly-circle,
#screen-quest-path .qp-header-coins .pst-butterfly-circle { width:17px !important; height:17px !important; }
#screen-daily-plan .dp-coins .pst-butterfly-circle svg,
#screen-daily-plan .dp-gain .pst-butterfly-circle svg,
#screen-daily-plan .dp-total .pst-butterfly-circle svg,
#screen-quest-path .qp-header-coins .pst-butterfly-circle svg { width:100% !important; height:100% !important; }

/* ════════════════════════════════════════════════════════════════════════
   ✦ COMPTEURS DE PIÈCES — STYLE UNIQUE PARTOUT (homogénéisation)
   Tous les compteurs (accueil, récap, parcours, quête active…) :
   pilule neutre translucide + papillon doré SANS cercle + chiffre BLANC.
   ════════════════════════════════════════════════════════════════════════ */
.mp-currency-pill:not(.mp-gem-pill),
.dp-coins, .dp-gain, .dp-total,
.qp-header-coins, .qa-hud-coins, .plan-header-coins,
#screen-daily-plan .dp-coins, #screen-daily-plan .dp-gain, #screen-daily-plan .dp-total,
#screen-quest-path .qp-header-coins {
  display:inline-flex !important; align-items:center !important; gap:6px !important;
  padding:7px 13px !important; border-radius:99px !important;
  background:rgba(255,255,255,.05) !important; border:1px solid rgba(255,255,255,.10) !important;
  color:#fff !important; font-family:"Satoshi",sans-serif !important; font-weight:700 !important;
  font-size:14px !important; letter-spacing:0 !important; text-transform:none !important;
  text-shadow:none !important; box-shadow:none !important;
}
/* Papillon doré SEUL (plus de cercle doré) — partout */
.pst-butterfly-circle {
  background:transparent !important; border:none !important; border-radius:0 !important;
  width:17px !important; height:17px !important; padding:0 !important;
  display:inline-flex !important; align-items:center !important; justify-content:center !important;
}
.pst-butterfly-circle svg { width:100% !important; height:100% !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   MÉTHODE DES J — réglage de la répétition espacée
   Tout est namespacé .mdj-* / .screen-methode-j pour éviter toute collision.
   Le fond cosmique global (#cosmic-bg) reste visible : la section est transparente.
   ═══════════════════════════════════════════════════════════════════════════ */
.screen-methode-j {
  --mdj-violet:#c4b5fd; --mdj-indigo:#6d5dfc; --mdj-magenta:#d65ad6;
  --mdj-amber:#f5b544; --mdj-amber-deep:#e07b2e;
  --mdj-ink:#f3f0ff; --mdj-muted:#b3a9d6; --mdj-muted-2:#7d749e;
  --mdj-surface:rgba(255,255,255,.05); --mdj-surface-2:rgba(255,255,255,.07);
  --mdj-stroke:rgba(255,255,255,.10); --mdj-stroke-soft:rgba(255,255,255,.06);
  overflow-y:auto; color:var(--mdj-ink);
}
.screen-methode-j .mdj-page { width:100%; max-width:1100px; margin:0 auto; padding:26px 30px 60px; font-family:"Satoshi",sans-serif; }
.screen-methode-j .mdj-top { display:flex; align-items:center; gap:16px; margin-bottom:8px; }
.screen-methode-j .mdj-back { width:44px; height:44px; border-radius:13px; display:grid; place-items:center; cursor:pointer; flex:none; background:var(--mdj-surface); border:1px solid var(--mdj-stroke); color:var(--mdj-muted); transition:.16s; }
.screen-methode-j .mdj-back:hover { color:#fff; border-color:rgba(196,181,253,.4); }
.screen-methode-j .mdj-top h1 { flex:1; text-align:center; font-family:"Clash Display"; font-weight:600; font-size:21px; background:linear-gradient(100deg,var(--mdj-violet),var(--mdj-magenta)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.screen-methode-j .mdj-spacer { width:44px; flex:none; }
.screen-methode-j .mdj-sub { text-align:center; color:var(--mdj-muted); font-size:13px; margin-bottom:26px; }
.screen-methode-j .mdj-card { border-radius:20px; background:var(--mdj-surface); border:1px solid var(--mdj-stroke); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); padding:22px; margin-bottom:22px; }
.screen-methode-j .mdj-card h2 { font-family:"Clash Display"; font-weight:600; font-size:16px; color:#fff; margin-bottom:4px; }
.screen-methode-j .mdj-hint { font-size:12.5px; color:var(--mdj-muted); margin-bottom:18px; }
.screen-methode-j .mdj-presets { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:18px; }
.screen-methode-j .mdj-preset { border-radius:15px; padding:16px; cursor:pointer; background:var(--mdj-surface-2); border:1px solid var(--mdj-stroke); transition:.16s; }
.screen-methode-j .mdj-preset:hover { transform:translateY(-2px); border-color:rgba(196,181,253,.35); }
.screen-methode-j .mdj-preset.on { border-color:rgba(167,139,250,.7); box-shadow:0 0 0 1px rgba(167,139,250,.5),0 10px 26px -12px rgba(150,70,230,.7); background:rgba(167,139,250,.1); }
.screen-methode-j .mdj-preset .mdj-nm { font-family:"Clash Display"; font-weight:600; font-size:15px; color:#fff; }
.screen-methode-j .mdj-preset .mdj-desc { font-size:12px; color:var(--mdj-muted); margin-top:5px; line-height:1.4; }
.screen-methode-j .mdj-preset .mdj-seq { display:flex; flex-wrap:wrap; gap:5px; margin-top:11px; }
.screen-methode-j .mdj-preset .mdj-seq span { font-size:10.5px; font-weight:700; color:var(--mdj-violet); background:rgba(167,139,250,.14); border-radius:6px; padding:2px 7px; }
.screen-methode-j .mdj-adv-toggle { display:flex; align-items:center; gap:8px; cursor:pointer; color:var(--mdj-violet); font-size:13px; font-weight:600; user-select:none; }
.screen-methode-j .mdj-adv-toggle svg { width:15px; height:15px; transition:.2s; }
.screen-methode-j .mdj-adv-toggle.open svg { transform:rotate(180deg); }
.screen-methode-j .mdj-adv { display:none; margin-top:16px; padding-top:18px; border-top:1px solid var(--mdj-stroke-soft); }
.screen-methode-j .mdj-adv.show { display:block; }
.screen-methode-j .mdj-adv .mdj-row { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.screen-methode-j .mdj-adv .mdj-lbl { font-size:13px; color:var(--mdj-muted); width:160px; flex:none; }
.screen-methode-j .mdj-stepper { display:flex; align-items:center; gap:12px; }
.screen-methode-j .mdj-stepper button { width:32px; height:32px; border-radius:9px; border:1px solid var(--mdj-stroke); background:var(--mdj-surface-2); color:#fff; font-size:18px; cursor:pointer; line-height:1; }
.screen-methode-j .mdj-stepper button:hover { border-color:rgba(196,181,253,.4); }
.screen-methode-j .mdj-stepper .mdj-v { font-family:"Clash Display"; font-weight:600; font-size:17px; color:#fff; min-width:24px; text-align:center; }
.screen-methode-j .mdj-chips { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.screen-methode-j .mdj-chip { display:flex; align-items:center; gap:6px; padding:7px 11px; border-radius:10px; background:rgba(167,139,250,.12); border:1px solid rgba(167,139,250,.3); font-weight:700; font-size:13px; color:var(--mdj-violet); }
.screen-methode-j .mdj-chip input { width:42px; background:transparent; border:none; color:#fff; font:inherit; font-weight:700; text-align:right; outline:none; -moz-appearance:textfield; appearance:textfield; }
.screen-methode-j .mdj-chip input::-webkit-outer-spin-button,
.screen-methode-j .mdj-chip input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.screen-methode-j .mdj-viewseg { position:relative; display:inline-flex; gap:4px; padding:5px; border-radius:12px; background:var(--mdj-surface-2); border:1px solid var(--mdj-stroke); margin-bottom:18px; }
.screen-methode-j .mdj-viewseg .mdj-pill { position:absolute; top:5px; bottom:5px; border-radius:8px; z-index:0; background:linear-gradient(105deg,var(--mdj-indigo),var(--mdj-magenta)); transition:.3s cubic-bezier(.4,0,.2,1); }
.screen-methode-j .mdj-viewseg button { position:relative; z-index:1; padding:9px 22px; border:none; background:transparent; cursor:pointer; color:var(--mdj-muted); font:inherit; font-size:13px; font-weight:600; }
.screen-methode-j .mdj-viewseg button.on { color:#fff; }
.screen-methode-j .mdj-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.screen-methode-j .mdj-cal-head .mdj-m { font-family:"Clash Display"; font-weight:600; font-size:16px; color:#fff; }
.screen-methode-j .mdj-nav { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; cursor:pointer; background:var(--mdj-surface-2); border:1px solid var(--mdj-stroke); color:var(--mdj-muted); }
.screen-methode-j .mdj-nav:hover { color:#fff; border-color:rgba(196,181,253,.4); }
.screen-methode-j .mdj-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.screen-methode-j .mdj-wd { text-align:center; font-size:10.5px; font-weight:700; color:var(--mdj-muted-2); padding-bottom:3px; }
.screen-methode-j .mdj-day { aspect-ratio:1; border-radius:10px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:13px; color:var(--mdj-muted-2); }
.screen-methode-j .mdj-day.in { color:var(--mdj-ink); background:var(--mdj-surface); }
.screen-methode-j .mdj-day.today { box-shadow:inset 0 0 0 1.5px rgba(196,181,253,.55); color:#fff; }
.screen-methode-j .mdj-day .mdj-d { width:5px; height:5px; border-radius:50%; }
.screen-methode-j .mdj-list { display:none; flex-direction:column; gap:10px; }
.screen-methode-j .mdj-list.show { display:flex; }
.screen-methode-j .mdj-li { display:flex; align-items:center; gap:13px; padding:13px 15px; border-radius:13px; background:var(--mdj-surface); border:1px solid var(--mdj-stroke); }
.screen-methode-j .mdj-li .mdj-when { width:84px; flex:none; font-weight:700; font-size:13px; }
.screen-methode-j .mdj-li .mdj-ch { flex:1; font-weight:600; font-size:14px; color:#fff; }
.screen-methode-j .mdj-li .mdj-ch small { display:block; color:var(--mdj-muted); font-weight:500; font-size:12px; margin-top:2px; }
.screen-methode-j .mdj-li .mdj-tag { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; padding:4px 9px; border-radius:20px; flex:none; }
.screen-methode-j .mdj-save { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; max-width:460px; margin:0 auto; padding:15px; border-radius:14px; cursor:pointer; border:none; color:#fff; font-family:"Clash Display"; font-weight:600; font-size:16px; background:linear-gradient(105deg,var(--mdj-indigo),var(--mdj-magenta)); box-shadow:0 14px 36px -12px rgba(150,70,230,.85); transition:.16s; }
.screen-methode-j .mdj-save:hover { transform:translateY(-1px); }
.screen-methode-j .mdj-save.saved { background:linear-gradient(105deg,#54d6a0,#3fb98a); }

@media (max-width:640px) {
  .screen-methode-j .mdj-page { padding:20px 16px 50px; }
  .screen-methode-j .mdj-presets { grid-template-columns:1fr; }
  .screen-methode-j .mdj-adv .mdj-row { flex-direction:column; align-items:flex-start; }
  .screen-methode-j .mdj-adv .mdj-lbl { width:auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BARRE D'ONGLETS AVATAR (Peau / Coiffure / Tenue / Accessoires)
   Indicateur en verre élastique + glisser + points de progression vert/violet.
   Remplace .avatar-tabs-bar / .av-tab. Tout namespacé av-tabs2 / av-tab2.
   ═══════════════════════════════════════════════════════════════════════════ */
.av-tabs2 {
  --av2-violet:#c4b5fd; --av2-green:#54d6a0; --av2-muted-2:#7d749e;
  position:relative; display:flex; gap:4px; padding:6px; border-radius:20px; isolation:isolate; flex-shrink:0;
  background:rgba(255,255,255,.035); border:1px solid rgba(255,255,255,.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  touch-action:pan-y; user-select:none; cursor:grab;
}
.av-tabs2:active { cursor:grabbing; }
.av-tabs2 .av-tabs2-glass {
  position:absolute; top:6px; bottom:6px; z-index:0; border-radius:14px; will-change:transform;
  background:linear-gradient(180deg,rgba(167,139,250,.22),rgba(150,90,230,.10));
  border:1px solid rgba(196,181,253,.45);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35),inset 0 -8px 18px -10px rgba(150,90,230,.5),0 8px 26px -12px rgba(150,90,230,.55);
  backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px);
}
.av-tabs2 .av-tabs2-glass::before {
  content:""; position:absolute; left:14px; right:14px; bottom:-1px; height:1.5px; border-radius:2px;
  background:linear-gradient(90deg,transparent,var(--av2-violet),transparent); opacity:.9;
}
.av-tabs2 .av-tab2 {
  position:relative; z-index:1; flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 0; border:none; background:transparent; cursor:inherit;
  font-family:"Satoshi",sans-serif; font-size:14px; font-weight:600; text-transform:none; letter-spacing:0;
  color:var(--av2-muted-2); transition:color .3s;
}
.av-tabs2 .av-tab2 svg { width:18px; height:18px; flex:none; transition:transform .4s cubic-bezier(.33,1.4,.4,1); }
.av-tabs2 .av-tab2.on { color:#fff; }
.av-tabs2 .av-tab2.on svg { transform:translateY(-1px); }
.av-tabs2 .av-tab2 .av-tab2-prog {
  position:absolute; top:8px; right:14px; width:7px; height:7px; border-radius:50%;
  background:rgba(196,181,253,.35); transition:.3s;
}
.av-tabs2 .av-tab2.done .av-tab2-prog { background:var(--av2-green); box-shadow:0 0 10px -1px rgba(84,214,160,.8); }
@media (prefers-reduced-motion:reduce) { .av-tabs2 .av-tabs2-glass { transition:transform .2s ease; } }

/* Lisibilité en thème clair (les onglets inactifs gardent un violet foncé) */
body.light-theme #screen-avatar .av-tabs2 .av-tab2:not(.on) { color:#6d5a9e; }

/* ═══════════════════════════════════════════════════════════════════════════
   ÉDITEUR D'AVATAR — vue épurée (demande utilisatrice)
   On retire les « compartiments » (cadres, fonds de colonnes, boîte de l'aperçu)
   pour laisser le fond cosmique global de l'accueil (#cosmic-bg) sur TOUTE la page.
   On garde : la barre d'onglets (.av-tabs2) et les bulles d'éléments (.blush-option,
   .swatch). Rien ne bouge de place. Voir [[feedback_unified_cosmic_bg]].
   ═══════════════════════════════════════════════════════════════════════════ */
/* Plus aucun fond propre : le cosmique global traverse toute la page */
#screen-avatar { background: transparent !important; }
body.light-theme #screen-avatar { background: transparent !important; background-image: none !important; }

/* Colonnes : plus de séparateurs ni de dégradés de compartiment */
#screen-avatar .av-left-col  { border-right: none; }
#screen-avatar .av-right-col { background: none; border-left: none; }
#screen-avatar .avatar-options-scroll { background: none; }

/* Aperçu de l'avatar : on supprime la boîte sombre (cadre + lueur de bord).
   L'avatar flotte directement sur le fond cosmique, à la même place. */
#screen-avatar .avatar-preview-zone,
#screen-avatar .avatar-preview-zone.skin-dark-glow {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
}
/* Étoiles + lueur LOCALES masquées → fond uniforme, identique au reste de la page */
#screen-avatar .av-preview-stars,
#screen-avatar .avatar-glow-bg,
#screen-avatar .avatar-preview-zone .avatar-star-dot,
#screen-avatar .avatar-preview-zone.skin-dark-glow::after { display: none !important; }

/* Champ « Nom du personnage » : on enlève la boîte ; il reste lisible et éditable */
#screen-avatar .av-name-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(196,181,253,0.25);
  border-radius: 0;
  box-shadow: none;
}
#screen-avatar .av-name-input:focus { box-shadow: none; border-bottom-color: var(--purple-l); }

/* Titre + flèche retour : même design que la page « Programmer la mission du jour »
   (titre = classe .t1 ajoutée dans le HTML ; flèche = même look que .qs5-back) */
#screen-avatar .av-btn-back {
  width: 38px !important; height: 38px !important; border-radius: 12px !important;
  background: rgba(255,255,255,.035) !important; border: 1px solid rgba(255,255,255,.09) !important;
  color: #b3a9d6 !important; box-shadow: none !important;
}
#screen-avatar .av-btn-back:hover {
  background: rgba(255,255,255,.06) !important; color: #f3f0ff !important;
  border-color: rgba(255,255,255,.16) !important;
}
#screen-avatar .av-btn-back svg { stroke: currentColor; }

/* Sur l'écran avatar uniquement : fond cosmique appliqué UNIFORMÉMENT à toute la page.
   1) on retire le vignettage sombre (#cosmic-bg) ; 2) on remplace la couche de base
   de #app — qui était ancrée en haut et virait au quasi-noir (#070512) vers le bas —
   par une teinte unie #0e0a24, en gardant les halos violet/magenta/bleu.
   Résultat : plus de bande sombre en bas, fond identique du haut au bas.
   Les autres pages gardent leur fond d'origine. */
#app:has(#screen-avatar.active) #cosmic-bg { background: none !important; }
#app:has(#screen-avatar.active) {
  /* Dégradé linéaire lisse haut→bas : monotone, sans anneaux radiaux → aucune
     bande sombre. Léger violet en haut qui se fond uniformément vers le fond. */
  background: linear-gradient(180deg, #2a1e52 0%, #181034 45%, #0e0a24 100%) !important;
}
/* En-tête + pied de page : on retire leurs scrims sombres (dégradés opaques +
   flou) qui formaient une bande sombre en haut et en bas. Le fond reste uniforme.
   Le titre, la flèche et le bouton Continuer gardent leur propre style. */
#screen-avatar .screen-header,
#screen-avatar .screen-footer {
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ─── Accueil : le PSEUDO affiché dans le même style que le champ « Nom du
   personnage » → Clash Display + dégradé violet, casse exactement comme saisie.
   Le « Bonsoir, » au-dessus reste tel quel. Données : State.avatar.name. ─── */
#screen-home .home-cinematic-top .home-player-name {
  font-family: "Clash Display", sans-serif !important;
  font-weight: 600 !important;
  text-transform: none !important;
  background-image: linear-gradient(100deg, #c4b5fd, #d65ad6) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
#screen-home .home-cinematic-top .home-player-name::first-letter { text-transform: none !important; }

/* ════════════ ÉDITEUR D'AVATAR — deux blocs structurels (style du récap .dp-panel) ════════════
   Gauche « Ton personnage » (nom + avatar) · Droite « Personnalisation » (barre + options).
   Contour fin, fond verre léger, rayon 20, petit titre en haut à gauche — comme « Ton parcours »
   / « Grille de départ ». À l'intérieur : aucun sous-cadre lourd, on respire (espace + titres). */
#screen-avatar .avatar-creation-body {
  display: grid !important;
  grid-template-columns: minmax(300px, 400px) 1fr !important;
  gap: 24px !important;
  padding: 14px 28px 16px !important;
  align-items: stretch !important;     /* les 2 blocs remplissent la hauteur dispo */
  overflow: hidden !important;          /* pas de débordement de page → pas de rognage */
  min-height: 0 !important;
}
#screen-avatar .av-left-col,
#screen-avatar .av-right-col {
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,.04) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
  backdrop-filter: blur(14px) !important; -webkit-backdrop-filter: blur(14px) !important;
  padding: 22px 24px 24px !important;
  overflow: hidden !important;          /* le contenu se met à l'échelle / défile dedans */
  min-height: 0 !important;
  display: flex !important; flex-direction: column !important; gap: 0 !important;
}
#screen-avatar .av-bloc-titre {
  font-family: "Satoshi", sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #7d749e; margin: 0 0 16px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
/* Les options défilent À L'INTÉRIEUR du bloc droit (comme la liste du récap).
   Marge basse généreuse → la dernière rangée + le slider ne sont jamais rognés. */
#screen-avatar .avatar-options-scroll {
  flex: 1 1 auto !important; min-height: 0 !important;
  overflow-y: auto !important; overflow-x: hidden !important;
  padding: 4px 6px 22px 2px !important; background: none !important;
}
#screen-avatar .avatar-options-scroll::-webkit-scrollbar { width: 6px; }
#screen-avatar .avatar-options-scroll::-webkit-scrollbar-thumb { background: rgba(167,139,250,.35); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   COMBAT — Monstre de l'Oubli (refonte) + bilan. Verre premium, namespacé .cb-*.
   ═══════════════════════════════════════════════════════════════════════════ */
.screen-cb {
  --cb-violet:#c4b5fd; --cb-indigo:#6d5dfc; --cb-magenta:#d65ad6; --cb-green:#54d6a0;
  --cb-amber:#f5b544; --cb-red:#ff7a8a; --cb-teal:#5ad6e0; --cb-ink:#f3f0ff; --cb-muted:#b3a9d6; --cb-muted-2:#7d749e;
  overflow-y:auto; color:var(--cb-ink); font-family:"Satoshi",sans-serif;
}
.screen-cb .cb-combat, .screen-cb .cb-bilan { width:100%; max-width:680px; margin:0 auto; padding:20px 22px 40px; }
/* En-tête */
.screen-cb .cb-top { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.screen-cb .cb-close { width:38px; height:38px; flex:none; border-radius:11px; display:grid; place-items:center; cursor:pointer; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); color:var(--cb-muted); }
.screen-cb .cb-close:hover { color:#fff; }
.screen-cb .cb-progress { flex:1; display:flex; gap:5px; }
.screen-cb .cb-seg { flex:1; height:6px; border-radius:6px; background:rgba(255,255,255,.10); transition:.2s; }
.screen-cb .cb-seg.juste { background:var(--cb-green); }
.screen-cb .cb-seg.revoir { background:var(--cb-amber); }
.screen-cb .cb-seg.faux { background:var(--cb-red); }
.screen-cb .cb-timer { font-family:"Clash Display",sans-serif; font-weight:600; font-size:18px; color:var(--cb-ink); min-width:54px; text-align:right; }
.screen-cb .cb-timer.warn { color:var(--cb-amber); }
/* Monstre + mémoire */
.screen-cb .cb-arena { display:flex; align-items:center; gap:16px; margin-bottom:8px; }
.screen-cb .cb-monster { width:64px; height:66px; flex:none; transition:transform .25s; filter:drop-shadow(0 8px 18px rgba(120,80,220,.55)); }
.screen-cb .cb-monster svg { width:100%; height:100%; }
.screen-cb .cb-monster.shake { animation:cb-shake .35s; }
@keyframes cb-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.screen-cb .cb-mem { flex:1; }
.screen-cb .cb-mem-bar { height:12px; border-radius:8px; background:rgba(255,255,255,.10); overflow:hidden; }
.screen-cb .cb-mem-fill { display:block; height:100%; width:100%; border-radius:8px; background:linear-gradient(90deg,var(--cb-magenta),var(--cb-violet)); transition:width .4s ease; }
.screen-cb .cb-mem-label { font-size:11.5px; color:var(--cb-muted-2); margin-top:5px; text-transform:uppercase; letter-spacing:.06em; }
.screen-cb .cb-taunt { font-size:13px; font-style:italic; color:var(--cb-violet); min-height:20px; margin:8px 0 14px; text-align:center; }
/* Carte question */
.screen-cb .cb-qcard { border-radius:20px; padding:22px; background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.10); box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 20px 60px -30px rgba(0,0,0,.7); backdrop-filter:blur(14px); }
.screen-cb .cb-fmt { display:inline-block; font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--cb-muted-2); margin-bottom:10px; }
.screen-cb .cb-scenario { background:rgba(167,139,250,.10); border:1px solid rgba(167,139,250,.22); border-radius:12px; padding:12px 14px; font-size:13.5px; color:var(--cb-muted); margin-bottom:12px; line-height:1.5; }
.screen-cb .cb-q { font-family:"Clash Display",sans-serif; font-weight:600; font-size:17px; color:#fff; margin-bottom:14px; line-height:1.4; }
.screen-cb .cb-opts { display:flex; flex-direction:column; gap:10px; }
.screen-cb .cb-opt { text-align:left; padding:13px 16px; border-radius:13px; cursor:pointer; background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.10); color:var(--cb-ink); font:inherit; font-size:14px; transition:.15s; }
.screen-cb .cb-opt:hover:not(:disabled) { border-color:rgba(167,139,250,.5); }
.screen-cb .cb-opt.sel { background:rgba(167,139,250,.14); border-color:rgba(167,139,250,.6); }
.screen-cb .cb-opt.good { background:rgba(84,214,160,.16); border-color:var(--cb-green); color:#fff; }
.screen-cb .cb-opt.bad { background:rgba(255,122,138,.14); border-color:var(--cb-red); }
.screen-cb .cb-input { width:100%; padding:13px 15px; border-radius:13px; background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.10); color:#fff; font:inherit; font-size:14px; resize:vertical; line-height:1.5; }
.screen-cb .cb-input:focus { outline:none; border-color:rgba(167,139,250,.55); box-shadow:0 0 0 3px rgba(167,139,250,.12); }
.screen-cb .cb-loading, .screen-cb .cb-err { display:flex; flex-direction:column; align-items:center; gap:12px; padding:24px; text-align:center; color:var(--cb-muted); font-size:14px; }
.screen-cb .cb-err-sub { font-size:12px; color:var(--cb-muted-2); }
.screen-cb .cb-err-btns { display:flex; gap:10px; margin-top:6px; }
/* Correction 3 niveaux */
.screen-cb .cb-correction { margin-top:14px; border-radius:14px; padding:14px 16px; border:1px solid; }
.screen-cb .cb-correction.juste { background:rgba(84,214,160,.10); border-color:rgba(84,214,160,.35); }
.screen-cb .cb-correction.revoir { background:rgba(245,181,68,.10); border-color:rgba(245,181,68,.35); }
.screen-cb .cb-correction.faux { background:rgba(255,122,138,.10); border-color:rgba(255,122,138,.35); }
.screen-cb .cb-corr-head { font-family:"Clash Display",sans-serif; font-weight:600; font-size:15px; margin-bottom:6px; }
.screen-cb .cb-correction.juste .cb-corr-head { color:var(--cb-green); }
.screen-cb .cb-correction.revoir .cb-corr-head { color:var(--cb-amber); }
.screen-cb .cb-correction.faux .cb-corr-head { color:var(--cb-red); }
.screen-cb .cb-corr-fb { font-size:13.5px; color:var(--cb-ink); margin-bottom:8px; line-height:1.5; }
.screen-cb .cb-corr-exp { font-size:13px; color:var(--cb-muted); line-height:1.5; }
.screen-cb .cb-corr-exp-l { display:block; font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--cb-muted-2); margin-bottom:3px; }
/* Bouton action */
.screen-cb .cb-action { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; margin-top:16px; padding:15px; border-radius:14px; cursor:pointer; border:none; color:#fff; font-family:"Clash Display",sans-serif; font-weight:600; font-size:16px; background:linear-gradient(105deg,var(--cb-indigo),var(--cb-magenta)); box-shadow:0 16px 40px -14px rgba(150,70,230,.85); transition:.16s; }
.screen-cb .cb-action:hover:not(:disabled) { transform:translateY(-1px); }
.screen-cb .cb-action:disabled { opacity:.6; cursor:default; }
.screen-cb .cb-ghost { padding:13px 18px; border-radius:13px; cursor:pointer; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); color:var(--cb-muted); font:inherit; font-weight:600; }

/* ════ Mise en scène : le Monstre interroge en grand, puis balance les cartes ════ */
.screen-cb .cb-monster { transition:transform .5s cubic-bezier(.34,1.3,.5,1); transform-origin:center bottom; }
.screen-cb .cb-bubble { display:none; position:relative; max-width:440px; margin:20px auto 0; padding:18px 22px; border-radius:20px; color:#241046; cursor:pointer; background:linear-gradient(180deg,#ffffff,#f4f0ff); box-shadow:0 18px 44px rgba(80,40,160,.40), inset 0 1px 0 rgba(255,255,255,.9); }
.screen-cb .cb-bubble::before { content:""; position:absolute; top:-9px; left:50%; transform:translateX(-50%); border:10px solid transparent; border-bottom-color:#fff; border-top:0; }
.screen-cb .cb-bubble-txt { margin:0; font-size:1.05rem; line-height:1.5; font-weight:600; text-align:center; }
.screen-cb .cb-bubble-txt .hl.hl-key { color:#6d5dfc; } .screen-cb .cb-bubble-txt .hl.hl-ok { color:#1ba673; } .screen-cb .cb-bubble-txt .hl.hl-warn { color:#d6457c; }
/* Phase « il interroge » : monstre géant et centré, bulle visible, le reste caché */
.screen-cb .cb-combat.is-asking .cb-arena { justify-content:center; min-height:160px; }
.screen-cb .cb-combat.is-asking .cb-mem { display:none; }
.screen-cb .cb-combat.is-asking .cb-monster { transform:scale(2.7); }
.screen-cb .cb-combat.is-asking .cb-bubble { display:block; animation:cmpRise .4s ease both; }
.screen-cb .cb-combat.is-asking .cb-qcard,
.screen-cb .cb-combat.is-asking .cb-action,
.screen-cb .cb-combat.is-asking .cb-taunt { display:none; }
/* Rappel de la question en petit pendant le choix */
.screen-cb .cb-q-small { font-size:14px; opacity:.85; }
/* Propositions « balancées » une à une */
.screen-cb .cb-opt { opacity:0; transform:translateY(16px) scale(.95); }
.screen-cb .cb-opt.in { opacity:1; transform:none; transition:opacity .3s ease, transform .4s cubic-bezier(.34,1.45,.5,1); }
/* ── Bilan ── */
.screen-cb .cb-bil-top { display:flex; justify-content:center; gap:12px; margin-bottom:14px; }
.screen-cb .cb-bil-chip { display:inline-flex; align-items:center; gap:7px; padding:7px 14px; border-radius:30px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); font-weight:700; font-size:14px; }
.screen-cb .cb-bil-title { font-family:"Clash Display",sans-serif; font-weight:600; font-size:22px; text-align:center; margin-bottom:18px; background:linear-gradient(100deg,var(--cb-violet),var(--cb-magenta)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; }
.screen-cb .cb-bil-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.screen-cb .cb-card { border-radius:18px; padding:18px; background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.10); backdrop-filter:blur(14px); margin-bottom:14px; }
.screen-cb .cb-bil-grid .cb-card { margin-bottom:0; display:flex; flex-direction:column; align-items:center; gap:12px; }
.screen-cb .cb-card-t { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--cb-muted-2); }
.screen-cb .cb-ring { width:110px; height:110px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--cb-violet) 0deg, rgba(255,255,255,.10) 0); }
.screen-cb .cb-ring-hole { width:84px; height:84px; border-radius:50%; background:var(--bg-1,#0e0a24); display:grid; place-items:center; font-family:"Clash Display",sans-serif; font-weight:600; font-size:22px; }
.screen-cb .cb-score { font-family:"Clash Display",sans-serif; font-weight:700; font-size:34px; color:#fff; }
.screen-cb .cb-resbar { width:100%; height:12px; border-radius:8px; overflow:hidden; display:flex; background:rgba(255,255,255,.08); }
.screen-cb .cb-resbar span { display:block; height:100%; }
.screen-cb .cb-leg { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; font-size:12.5px; color:var(--cb-muted); }
.screen-cb .cb-leg b { color:#fff; }
.screen-cb .cb-d { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:5px; vertical-align:middle; }
.screen-cb .cb-d-juste { background:var(--cb-green); } .screen-cb .cb-d-revoir { background:var(--cb-amber); } .screen-cb .cb-d-faux { background:var(--cb-red); }
.screen-cb .cb-card-j { display:flex; align-items:center; gap:10px; background:rgba(84,214,160,.10); border-color:rgba(84,214,160,.28); font-size:13.5px; color:var(--cb-ink); }
.screen-cb .cb-lacunes { margin:6px 0 0; padding-left:18px; font-size:13.5px; color:var(--cb-muted); line-height:1.7; }
.screen-cb .cb-lacunes .cb-lac-none { list-style:none; margin-left:-18px; color:var(--cb-green); }
.screen-cb .cb-gains { display:flex; flex-wrap:wrap; gap:12px; }
.screen-cb .cb-gain { display:inline-flex; align-items:center; gap:8px; padding:10px 16px; border-radius:13px; background:rgba(245,181,68,.12); border:1px solid rgba(245,181,68,.30); font-weight:700; font-size:14px; color:var(--cb-amber); }
.screen-cb .cb-gain-diamond { background:rgba(90,214,224,.12); border-color:rgba(90,214,224,.30); color:var(--cb-teal); }
.screen-cb .cb-gain-off { opacity:.4; filter:grayscale(.6); }
@media (max-width:560px) { .screen-cb .cb-bil-grid { grid-template-columns:1fr; } }
/* Écriture simple et lisible : casse normale + lettres non espacées partout
   (sauf les micro-étiquettes .cb-fmt / .cb-card-t / .cb-mem-label qui restent en
   petites majuscules espacées). Corrige les options héritant d'un style global. */
.screen-cb .cb-opt, .screen-cb .cb-input, .screen-cb .cb-action, .screen-cb .cb-ghost,
.screen-cb .cb-q, .screen-cb .cb-scenario, .screen-cb .cb-corr-fb, .screen-cb .cb-corr-exp,
.screen-cb .cb-leg, .screen-cb .cb-lacunes, .screen-cb .cb-gain, .screen-cb .cb-taunt,
.screen-cb .cb-bil-chip {
  text-transform: none !important;
  letter-spacing: normal !important;
}
.screen-cb .cb-opt, .screen-cb .cb-input, .screen-cb .cb-leg, .screen-cb .cb-lacunes,
.screen-cb .cb-corr-fb, .screen-cb .cb-corr-exp, .screen-cb .cb-scenario {
  font-family: "Satoshi", sans-serif !important;
  font-weight: 500 !important;
}
#screen-avatar .av-tabs2 { margin: 0 0 6px !important; }

/* Zone aperçu : remplit l'espace restant du bloc gauche ; l'avatar se met à
   l'échelle (object-fit: contain) pour ne JAMAIS être rogné. */
#screen-avatar .avatar-preview-zone {
  flex: 1 1 auto !important; min-height: 0 !important; height: auto !important;
  margin-top: 8px !important;
}

/* Champ « Nom du personnage » : la BOÎTE (cadre verre) + le nom en dégradé violet.
   La boîte est sur le wrapper .av-name-box ; le dégradé clippé sur l'input
   (sinon background-clip:text masquerait le fond de la boîte). */
#screen-avatar .av-name-box {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  margin-top: 8px;
}
#screen-avatar .av-name-box:focus-within { border-color: rgba(196,181,253,.45); }
#screen-avatar .av-name-input {
  width: 100% !important;
  background: linear-gradient(100deg, #c4b5fd, #d65ad6) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
  border: none !important; border-radius: 16px !important; box-shadow: none !important;
  padding: 14px 18px !important; text-align: center !important;
  font-family: "Clash Display", sans-serif !important; font-weight: 600 !important;
  font-size: 1.5rem !important; letter-spacing: .01em !important;
}
#screen-avatar .av-name-input::placeholder { -webkit-text-fill-color: #7d749e; color: #7d749e; font-weight: 500; }
#screen-avatar .av-name-input:focus { outline: none !important; box-shadow: none !important; }

/* ── Blocs plus compacts + ÉLÉMENTS bien visibles pour choisir correctement ── */
/* On limite la largeur globale → les blocs ne s'étirent plus à l'infini en largeur */
#screen-avatar .avatar-creation-body {
  max-width: 1000px !important; margin: 0 auto !important; width: 100% !important;
}
/* Vignettes (coiffure, tenue, chaussures, accessoires, Base…) ENCORE plus grandes,
   grille qui s'adapte à la largeur (tuiles confortables, pas étirées) */
#screen-avatar .blush-grid {
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)) !important;
  gap: 14px !important;
}
#screen-avatar .blush-option {
  padding: 15px 10px !important; border-radius: 16px !important; gap: 9px !important;
}
#screen-avatar .blush-thumb,
#screen-avatar .blush-none { width: 90px !important; height: 90px !important; }
#screen-avatar .blush-none { font-size: 2rem !important; }
#screen-avatar .blush-label { font-size: 13.5px !important; letter-spacing: .02em !important; text-transform: none !important; }
/* Pastilles de teinte de peau / couleurs plus grosses */
#screen-avatar .swatches-row { gap: 16px !important; }
#screen-avatar .swatch { width: 64px !important; height: 64px !important; }
/* Boutons de style (texte) plus lisibles */
#screen-avatar .style-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important; gap: 12px !important; }
#screen-avatar .style-option { padding: 16px 14px !important; font-size: 15px !important; }

/* Les images sont des frames CORPS ENTIER → on RECADRE chaque vignette sur sa zone utile
   (le conteneur .bt-wrap rogne, l'image est zoomée sur la bonne partie du corps). */
#screen-avatar .bt-wrap {
  display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px;
}
#screen-avatar .bt-wrap .blush-thumb {
  width: 100% !important; height: 100% !important; object-fit: contain; display: block;
}
#screen-avatar .bt-shoes .blush-thumb    { transform: scale(4.6); transform-origin: 50% 94%; }
#screen-avatar .bt-blush .blush-thumb    { transform: scale(4.2); transform-origin: 50% 13%; }
#screen-avatar .bt-hair .blush-thumb     { transform: scale(2.8); transform-origin: 50% 12%; }
#screen-avatar .bt-clothing .blush-thumb { transform: scale(2.6); transform-origin: 50% 38%; }
#screen-avatar .bt-pants .blush-thumb    { transform: scale(2.6); transform-origin: 50% 66%; }

/* Titre « Parcours du jour » : même dégradé violet que le titre « Programmer la
   mission du jour » (.qs5-title). La police (Clash Display 22px) est déjà identique. */
#screen-quest-path .qp-header-title {
  background: linear-gradient(135deg, #c4b5fd, #818cf8, #a78bfa) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BRIEFING CHAPITRE — « Prépare ta carte mentale » / « Reprendre le chapitre »
   Verre premium sur le fond cosmique global. Namespacé .qb-* / .screen-qb.
   ═══════════════════════════════════════════════════════════════════════════ */
.screen-qb {
  --qb-violet:#c4b5fd; --qb-indigo:#6d5dfc; --qb-magenta:#d65ad6;
  --qb-green:#54d6a0; --qb-ink:#f3f0ff; --qb-muted:#b3a9d6; --qb-muted-2:#7d749e;
  overflow-y:auto; color:var(--qb-ink); font-family:"Satoshi",sans-serif;
}
.screen-qb .qb-page { width:100%; max-width:1060px; margin:0 auto; padding:24px 28px 56px; }
.screen-qb .qb-page-narrow { max-width:640px; }
.screen-qb .qb-top { display:flex; align-items:flex-start; gap:16px; margin-bottom:26px; }
.screen-qb .qb-back { width:44px; height:44px; border-radius:13px; flex:none; display:grid; place-items:center; cursor:pointer; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); color:var(--qb-muted); transition:.16s; }
.screen-qb .qb-back:hover { color:#fff; border-color:rgba(196,181,253,.4); }
.screen-qb .qb-head-center { flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; }
.screen-qb .qb-head-row { display:flex; align-items:center; gap:12px; }
.screen-qb .qb-monster { width:42px; height:42px; flex:none; filter:drop-shadow(0 6px 14px rgba(120,80,220,.5)); }
.screen-qb .qb-monster svg { width:100%; height:100%; }
.screen-qb .qb-title { font-family:"Clash Display",sans-serif; font-weight:600; font-size:24px; background:linear-gradient(100deg,var(--qb-violet),var(--qb-magenta)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; }
.screen-qb .qb-sub { font-size:13px; color:var(--qb-muted); max-width:520px; }
.screen-qb .qb-chip { display:inline-flex; align-items:center; gap:8px; padding:7px 14px; border-radius:30px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); font-size:12px; font-weight:600; color:var(--qb-violet); }
.screen-qb .qb-chip-dot { width:7px; height:7px; border-radius:50%; background:var(--qb-violet); box-shadow:0 0 8px var(--qb-violet); }
.screen-qb .qb-spacer { width:44px; flex:none; }

.screen-qb .qb-cols { display:grid; grid-template-columns:1fr 1fr; gap:22px; align-items:start; margin-bottom:22px; }
.screen-qb .qb-bloc {
  border-radius:22px; padding:24px; margin-bottom:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07), 0 20px 60px -30px rgba(0,0,0,.7);
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
}
.screen-qb .qb-cols .qb-bloc { margin-bottom:0; }
.screen-qb .qb-bloc-titre { font-size:11px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--qb-muted-2); margin-bottom:16px; }

/* Zone de dépôt */
.screen-qb .qb-dropzone { display:flex; flex-direction:column; align-items:center; gap:6px; padding:26px 16px; border-radius:16px; cursor:pointer; text-align:center; color:var(--qb-muted); background:rgba(167,139,250,.04); border:1.5px dashed rgba(167,139,250,.35); transition:.18s; }
.screen-qb .qb-dropzone:hover, .screen-qb .qb-dropzone.drag { border-color:rgba(167,139,250,.7); background:rgba(167,139,250,.09); box-shadow:0 0 0 4px rgba(167,139,250,.08); color:#fff; }
.screen-qb .qb-dropzone svg { color:var(--qb-violet); }
.screen-qb .qb-dz-main { font-weight:600; font-size:14px; color:var(--qb-ink); }
.screen-qb .qb-dz-sub { font-size:12px; color:var(--qb-muted-2); }
.screen-qb .qb-docs-head { display:flex; align-items:center; justify-content:space-between; margin:16px 0 8px; font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--qb-muted-2); }
.screen-qb .qb-count { background:rgba(167,139,250,.16); color:var(--qb-violet); border-radius:20px; padding:1px 9px; font-size:11px; }
.screen-qb .qb-docs { display:flex; flex-direction:column; gap:8px; }
.screen-qb .qb-docs-empty { font-size:12.5px; color:var(--qb-muted-2); padding:4px 2px; }
.screen-qb .qb-doc { display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); }
.screen-qb .qb-doc-ic { width:30px; height:30px; flex:none; display:grid; place-items:center; border-radius:9px; background:rgba(167,139,250,.16); color:var(--qb-violet); }
.screen-qb .qb-doc-info { flex:1; min-width:0; }
.screen-qb .qb-doc-name { font-size:13.5px; font-weight:600; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.screen-qb .qb-doc-size { font-size:11.5px; color:var(--qb-muted-2); }
.screen-qb .qb-doc-del { width:26px; height:26px; flex:none; border:none; border-radius:8px; cursor:pointer; background:transparent; color:var(--qb-muted-2); font-size:13px; transition:.15s; }
.screen-qb .qb-doc-del:hover { background:rgba(244,114,114,.16); color:#f47272; }
.screen-qb .qb-saved { display:flex; align-items:center; gap:8px; margin-top:14px; font-size:12.5px; font-weight:600; color:var(--qb-green); }

/* Champs */
.screen-qb .qb-field-label { display:block; font-size:12.5px; font-weight:600; color:var(--qb-muted); margin:0 0 6px; }
.screen-qb .qb-opt { color:var(--qb-muted-2); font-weight:500; }
.screen-qb .qb-input { width:100%; padding:12px 14px; border-radius:13px; background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.10); color:#fff; font:inherit; font-size:14px; transition:.16s; margin-bottom:4px; }
.screen-qb .qb-input::placeholder { color:var(--qb-muted-2); }
.screen-qb .qb-input:focus { outline:none; border-color:rgba(167,139,250,.55); background:rgba(167,139,250,.06); box-shadow:0 0 0 3px rgba(167,139,250,.12); }
.screen-qb .qb-textarea { resize:vertical; line-height:1.5; }
.screen-qb .qb-field-help { font-size:11.5px; color:var(--qb-muted-2); margin-bottom:14px; }

/* Puces style d'examen */
.screen-qb .qb-chips { display:flex; flex-wrap:wrap; gap:8px; }
.screen-qb .qb-chips .qb-chip { display:inline-flex; padding:8px 14px; border-radius:11px; cursor:pointer; font:inherit; font-size:13px; font-weight:600; background:rgba(255,255,255,.045); border:1px solid rgba(255,255,255,.10); color:var(--qb-muted); transition:.15s; }
.screen-qb .qb-chips .qb-chip:hover { border-color:rgba(167,139,250,.4); color:#fff; }
.screen-qb .qb-chips .qb-chip.on { background:rgba(167,139,250,.14); border-color:rgba(167,139,250,.6); color:#fff; }
.screen-qb .qb-tag { display:inline-flex; padding:5px 11px; border-radius:20px; font-size:11.5px; font-weight:700; background:rgba(167,139,250,.14); color:var(--qb-violet); }
.screen-qb .qb-tag-muted { background:rgba(255,255,255,.05); color:var(--qb-muted-2); }

/* Écran reprise : bloc 1 */
.screen-qb .qb-resume { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.screen-qb .qb-resume-ic { width:34px; height:34px; flex:none; display:grid; place-items:center; border-radius:11px; background:rgba(84,214,160,.16); color:var(--qb-green); }
.screen-qb .qb-resume-label { font-size:12px; color:var(--qb-muted-2); }
.screen-qb .qb-resume-point { font-family:"Clash Display",sans-serif; font-weight:600; font-size:19px; color:#fff; margin-top:2px; }
.screen-qb .qb-q { font-family:"Clash Display",sans-serif; font-weight:600; font-size:17px; color:#fff; margin:0 0 6px; }

/* Écran reprise : bloc 2 (mémoire repliable) */
.screen-qb .qb-mem-bloc { padding:0; overflow:hidden; }
.screen-qb .qb-mem-toggle { width:100%; display:flex; align-items:center; gap:10px; padding:18px 22px; border:none; background:transparent; cursor:pointer; font:inherit; font-size:14px; font-weight:600; color:#fff; }
.screen-qb .qb-mem-check { color:var(--qb-green); flex:none; }
.screen-qb .qb-mem-toggle span { flex:1; text-align:left; }
.screen-qb .qb-mem-chev { color:var(--qb-muted-2); flex:none; transition:transform .25s; }
.screen-qb .qb-mem-toggle.open .qb-mem-chev { transform:rotate(180deg); }
.screen-qb .qb-mem { display:none; padding:0 22px 20px; }
.screen-qb .qb-mem.open { display:block; }
.screen-qb .qb-mem-sub { font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--qb-muted-2); margin-bottom:8px; }
.screen-qb .qb-mem-edit { margin-top:14px; background:none; border:none; cursor:pointer; color:var(--qb-violet); font:inherit; font-size:13px; font-weight:600; padding:0; }
.screen-qb .qb-mem-edit:hover { text-decoration:underline; }

/* Bouton d'action + note */
.screen-qb .qb-generate { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:16px; border-radius:15px; cursor:pointer; border:none; color:#fff; font-family:"Clash Display",sans-serif; font-weight:600; font-size:16px; background:linear-gradient(105deg,var(--qb-indigo),var(--qb-magenta)); box-shadow:0 16px 40px -14px rgba(150,70,230,.85); transition:.16s; }
.screen-qb .qb-generate:hover { transform:translateY(-1px); box-shadow:0 20px 46px -14px rgba(150,70,230,.95); }
.screen-qb .qb-note { text-align:center; font-size:12px; color:var(--qb-muted-2); margin-top:12px; }

@media (max-width:760px) {
  .screen-qb .qb-cols { grid-template-columns:1fr; }
  .screen-qb .qb-page { padding:18px 16px 50px; }
}

/* ─── FLUX DE PRÉPARATION (wizard 4 étapes) ─── */
#screen-quest-prep .prep-page { width:100%; max-width:680px; margin:0 auto; padding:24px 24px 40px; position:relative; }
#screen-quest-prep .prep-head { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
#screen-quest-prep .prep-progress { flex:1; display:flex; gap:6px; }
#screen-quest-prep .prep-seg { flex:1; height:6px; border-radius:6px; background:rgba(255,255,255,.08); transition:.3s; }
#screen-quest-prep .prep-seg.done { background:linear-gradient(105deg,#6d5dfc,#d65ad6); }
#screen-quest-prep .prep-step-count { font-size:12px; font-weight:700; color:var(--qb-muted-2); white-space:nowrap; }
/* Monstre + bulle */
#screen-quest-prep .prep-monster-row { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
#screen-quest-prep .prep-monster { width:54px; height:54px; flex:none; filter:drop-shadow(0 8px 18px rgba(120,80,220,.55)); }
#screen-quest-prep .prep-monster svg { width:100%; height:100%; }
#screen-quest-prep .prep-bubble { position:relative; flex:1; padding:13px 16px; border-radius:14px; border-top-left-radius:4px; font-size:13.5px; color:var(--qb-ink); background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); backdrop-filter:blur(10px); }
/* Étapes (une visible) */
#screen-quest-prep .prep-step { display:none; }
#screen-quest-prep .prep-step.on { display:block; animation:prep-fade .3s ease; }
@keyframes prep-fade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
#screen-quest-prep .prep-sub { font-size:13px; color:var(--qb-muted); margin:-8px 0 18px; }
/* Sommaire + curseur */
#screen-quest-prep .prep-resume { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--qb-muted); background:rgba(84,214,160,.10); border:1px solid rgba(84,214,160,.25); border-radius:12px; padding:9px 12px; margin-bottom:14px; }
#screen-quest-prep .prep-resume b { color:#fff; font-weight:700; }
#screen-quest-prep .prep-resume-ic { color:var(--qb-green); display:inline-flex; }
#screen-quest-prep .prep-toc { list-style:none; margin:0 0 18px; padding:0; display:flex; flex-direction:column; gap:2px; }
#screen-quest-prep .prep-toc-item { display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:10px; transition:.18s; }
#screen-quest-prep .prep-toc-dot { width:9px; height:9px; flex:none; border-radius:50%; background:rgba(255,255,255,.18); transition:.18s; }
#screen-quest-prep .prep-toc-name { font-size:14px; color:var(--qb-muted-2); font-weight:500; transition:.18s; }
#screen-quest-prep .prep-toc-item.on { background:rgba(167,139,250,.08); }
#screen-quest-prep .prep-toc-item.on .prep-toc-dot { background:var(--qb-violet); box-shadow:0 0 10px -1px var(--qb-violet); }
#screen-quest-prep .prep-toc-item.on .prep-toc-name { color:#fff; font-weight:700; }
/* Indentation hiérarchique (parties / sous-parties / sous-sous-parties) */
#screen-quest-prep .prep-toc-item.lvl-1 { padding-left:10px; }
#screen-quest-prep .prep-toc-item.lvl-2 { padding-left:30px; }
#screen-quest-prep .prep-toc-item.lvl-3 { padding-left:50px; }
#screen-quest-prep .prep-toc-item.lvl-4 { padding-left:70px; }
#screen-quest-prep .prep-toc-item.lvl-1 .prep-toc-name { font-size:14.5px; font-weight:700; }
#screen-quest-prep .prep-toc-item.lvl-2 .prep-toc-name { font-size:13.5px; }
#screen-quest-prep .prep-toc-item.lvl-3 .prep-toc-name,
#screen-quest-prep .prep-toc-item.lvl-4 .prep-toc-name { font-size:12.5px; }
#screen-quest-prep .prep-toc-item.lvl-2 .prep-toc-dot { width:7px; height:7px; }
#screen-quest-prep .prep-toc-item.lvl-3 .prep-toc-dot,
#screen-quest-prep .prep-toc-item.lvl-4 .prep-toc-dot { width:5px; height:5px; }
/* État lecture du sommaire */
#screen-quest-prep .prep-toc-loading { list-style:none; display:flex; align-items:center; gap:10px; padding:16px 10px; font-size:13px; color:var(--qb-muted); }
#screen-quest-prep .prep-spin { width:16px; height:16px; flex:none; border-radius:50%; border:2px solid rgba(167,139,250,.25); border-top-color:var(--qb-violet); animation:prep-spin .8s linear infinite; }
@keyframes prep-spin { to { transform:rotate(360deg); } }
/* Sélection verticale : curseur (rail) qui descend + case « tout sélectionner » */
#screen-quest-prep .prep-selectall { display:inline-flex; align-items:center; gap:8px; margin:2px 0 12px; font-size:13px; font-weight:600; color:var(--qb-muted); cursor:pointer; user-select:none; }
#screen-quest-prep .prep-selectall input { width:17px; height:17px; accent-color:#a78bfa; cursor:pointer; }
/* Bloc sommaire à HAUTEUR DÉFINIE : défile à l'intérieur → les boutons restent visibles */
#screen-quest-prep .prep-toc-wrap { position:relative; max-height:42vh; overflow-y:auto; overflow-x:hidden; margin-bottom:14px; padding-right:4px; }
#screen-quest-prep .prep-toc-wrap::-webkit-scrollbar { width:6px; }
#screen-quest-prep .prep-toc-wrap::-webkit-scrollbar-thumb { background:rgba(167,139,250,.35); border-radius:3px; }
/* Rail inséré (left:16) pour que le curseur ne soit jamais rogné par le bord */
#screen-quest-prep .prep-rail { position:absolute; left:16px; top:0; width:8px; height:100%; border-radius:8px; background:rgba(255,255,255,.10); cursor:pointer; touch-action:none; }
#screen-quest-prep .prep-rail-locked { position:absolute; top:0; left:0; right:0; height:0; border-radius:8px; background:rgba(84,214,160,.40); transition:height .12s ease; }
#screen-quest-prep .prep-rail-fill { position:absolute; top:0; left:0; right:0; height:0; border-radius:8px; background:linear-gradient(180deg,#6d5dfc,#d65ad6); transition:top .12s ease, height .12s ease; }
/* Curseur : gros knob blanc avec point violet + halo → on comprend que c'est un curseur */
#screen-quest-prep .prep-rail-handle { position:absolute; left:50%; top:0; width:26px; height:26px; transform:translate(-50%,-50%); border-radius:50%; background:#fff; border:3px solid #a78bfa; box-shadow:0 0 0 5px rgba(167,139,250,.18), 0 6px 16px rgba(150,70,230,.7); cursor:grab; transition:top .12s ease; opacity:0; z-index:3; }
#screen-quest-prep .prep-rail-handle::before { content:""; position:absolute; inset:0; margin:auto; width:9px; height:9px; border-radius:50%; background:#a78bfa; }
#screen-quest-prep .prep-rail:active .prep-rail-handle { cursor:grabbing; transform:translate(-50%,-50%) scale(1.12); }
#screen-quest-prep .prep-toc-wrap .prep-toc { margin:0 0 0 44px; }
#screen-quest-prep .prep-toc-item { cursor:pointer; }
/* Parties déjà vues (cadenatées) : gris terne, non décochables, point vert terne */
#screen-quest-prep .prep-toc-item.locked { cursor:default; opacity:.45; }
#screen-quest-prep .prep-toc-item.locked:hover { background:transparent; }
#screen-quest-prep .prep-toc-item.locked .prep-toc-name { color:var(--qb-muted-2) !important; font-weight:500 !important; }
#screen-quest-prep .prep-toc-item.locked .prep-toc-dot { background:rgba(84,214,160,.55) !important; box-shadow:none !important; }
/* Bandeau « première fois » en violet (vs vert pour le retour) */
#screen-quest-prep .prep-resume.first { background:rgba(167,139,250,.10); border-color:rgba(167,139,250,.30); }
#screen-quest-prep .prep-resume.first .prep-resume-ic { color:var(--qb-violet); }
#screen-quest-prep .prep-toc-item:hover { background:rgba(255,255,255,.04); }
#screen-quest-prep .prep-slider-wrap { position:relative; height:26px; display:flex; align-items:center; margin:4px 2px 10px; }
#screen-quest-prep .prep-slider-rail { position:absolute; left:0; right:0; height:6px; border-radius:6px; background:rgba(255,255,255,.10); overflow:hidden; }
#screen-quest-prep .prep-slider-fill { display:block; height:100%; width:0; background:linear-gradient(105deg,#6d5dfc,#d65ad6); transition:width .15s; }
#screen-quest-prep .prep-slider { position:relative; z-index:2; width:100%; -webkit-appearance:none; appearance:none; background:transparent; height:26px; cursor:pointer; margin:0; }
#screen-quest-prep .prep-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:22px; height:22px; border-radius:50%; background:#fff; border:3px solid #a78bfa; box-shadow:0 4px 12px rgba(150,70,230,.6); cursor:grab; }
#screen-quest-prep .prep-slider::-moz-range-thumb { width:22px; height:22px; border-radius:50%; background:#fff; border:3px solid #a78bfa; box-shadow:0 4px 12px rgba(150,70,230,.6); cursor:grab; }
#screen-quest-prep .prep-upto { font-size:13px; color:var(--qb-muted); }
#screen-quest-prep .prep-upto #prep-upto-name { color:#fff; font-weight:700; }
#screen-quest-prep .prep-sample-note { margin-top:12px; font-size:11.5px; color:var(--qb-muted-2); font-style:italic; }
/* Coche verte sur un doc déposé */
#screen-quest-prep .qb-doc-ok { color:var(--qb-green); display:inline-flex; }
#screen-quest-prep .prep-skip { display:block; margin:14px auto 0; background:none; border:none; cursor:pointer; color:var(--qb-muted); font:inherit; font-size:13px; }
#screen-quest-prep .prep-skip:hover { color:#fff; text-decoration:underline; }
/* Navigation bas */
#screen-quest-prep .prep-nav { display:flex; align-items:center; justify-content:center; gap:12px; margin-top:20px; }
#screen-quest-prep .prep-btn-ghost { display:inline-flex; align-items:center; gap:7px; padding:14px 20px; border-radius:14px; cursor:pointer; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.10); color:var(--qb-muted); font:inherit; font-size:14px; font-weight:600; transition:.16s; }
#screen-quest-prep .prep-btn-ghost:hover { color:#fff; border-color:rgba(196,181,253,.4); }
#screen-quest-prep .prep-btn-main { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:15px 48px; border-radius:14px; cursor:pointer; border:none; color:#fff; font-family:"Clash Display",sans-serif; font-weight:600; font-size:16px; background:linear-gradient(105deg,#6d5dfc,#d65ad6); box-shadow:0 16px 40px -14px rgba(150,70,230,.85); transition:.16s; }
#screen-quest-prep .prep-btn-main:hover { transform:translateY(-1px); }
#screen-quest-prep .prep-btn-main.disabled { opacity:.45; pointer-events:none; box-shadow:none; }

/* ── ÉTAPE 1 : DÉPÔT DU COURS (refonte premium) ── */
#screen-quest-prep .prep-step-depot { max-width:540px; margin:0 auto; text-align:center; flex-direction:column; align-items:center; }
#screen-quest-prep .prep-step-depot.on { display:flex; }
#screen-quest-prep .prep-step-depot > * { animation:cmpRise .55s cubic-bezier(.34,1.4,.5,1) both; }
#screen-quest-prep .prep-step-depot > *:nth-child(1) { animation-delay:.05s; }
#screen-quest-prep .prep-step-depot > *:nth-child(2) { animation-delay:.16s; }
#screen-quest-prep .prep-step-depot > *:nth-child(3) { animation-delay:.26s; }
#screen-quest-prep .prep-step-depot > *:nth-child(4) { animation-delay:.36s; }

#screen-quest-prep .depot-stage { position:relative; width:160px; height:160px; display:flex; align-items:center; justify-content:center; margin-bottom:4px; }
#screen-quest-prep .depot-aura { position:absolute; inset:-12%; border-radius:50%; pointer-events:none; background:radial-gradient(circle at 50% 46%, rgba(167,139,250,.5), rgba(150,100,240,.16) 44%, transparent 68%); animation:cmpAura 5.5s ease-in-out infinite; }
#screen-quest-prep .depot-alien { position:relative; z-index:2; width:118px; filter:drop-shadow(0 14px 26px rgba(109,93,252,.45)); animation:cmpFloat 3.6s ease-in-out infinite; }
#screen-quest-prep .depot-alien .cmp-alien-svg { width:100%; height:auto; overflow:visible; }

#screen-quest-prep .depot-title { font-family:"Clash Display",sans-serif; font-weight:600; font-size:2rem; color:var(--qb-ink); margin:0 0 8px; letter-spacing:-.01em; }
#screen-quest-prep .depot-hl { background:linear-gradient(105deg,var(--qb-violet,#a78bfa),#d65ad6); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
#screen-quest-prep .depot-sub { font-size:.98rem; color:var(--qb-muted); line-height:1.5; max-width:440px; margin:0 0 26px; }

#screen-quest-prep .depot-dz { width:100%; padding:34px 20px; border-radius:20px; gap:9px; border:1.7px dashed rgba(167,139,250,.4); background:rgba(255,255,255,.035); backdrop-filter:blur(8px); }
#screen-quest-prep .depot-dz:hover, #screen-quest-prep .depot-dz.drag { border-color:rgba(196,181,253,.85); background:rgba(167,139,250,.10); box-shadow:0 0 0 5px rgba(167,139,250,.08); transform:translateY(-2px); }
#screen-quest-prep .depot-dz-ic { display:grid; place-items:center; width:54px; height:54px; border-radius:14px; margin-bottom:4px; background:rgba(167,139,250,.14); color:var(--qb-violet,#a78bfa); }
#screen-quest-prep .depot-dz .qb-dz-main { font-size:1.05rem; font-weight:700; color:#fff; }
#screen-quest-prep .depot-dz .qb-dz-sub { font-size:.85rem; color:var(--qb-muted); }
#screen-quest-prep .depot-dz-fmt { margin-top:6px; font-size:.78rem; color:var(--qb-muted-2); }

/* Carte de confirmation verte quand un fichier valide est déposé (remplace la dropzone) */
#screen-quest-prep .depot-confirm { width:100%; }
#screen-quest-prep .depot-confirm .qb-doc { background:rgba(84,214,160,.10); border:1px solid rgba(84,214,160,.4); border-radius:16px; padding:14px 16px; margin-top:14px; }
#screen-quest-prep .depot-confirm .qb-doc-ic { background:rgba(84,214,160,.18); color:var(--qb-green,#54d6a0); }

/* Bouton premium avec éclat balayant, à l'étape dépôt */
#screen-quest-prep .prep-btn-main { position:relative; overflow:hidden; }
#screen-quest-prep .prep-btn-main::after { content:""; position:absolute; top:0; left:-60%; width:45%; height:100%; background:linear-gradient(100deg,transparent,rgba(255,255,255,.42),transparent); transform:skewX(-18deg); animation:cmpSheen 4.5s ease-in-out infinite; }
#screen-quest-prep .prep-btn-main.disabled::after { display:none; }

/* Phrase rassurante sous le bouton (étape dépôt uniquement) */
#screen-quest-prep .depot-foot { display:none; max-width:460px; margin:18px auto 0; text-align:center; font-size:.86rem; line-height:1.5; color:var(--qb-muted-2); }

/* Écran génération (orbe) */
#screen-quest-prep .prep-generating { display:none; position:absolute; inset:0; flex-direction:column; align-items:center; justify-content:center; gap:16px; text-align:center; background:rgba(7,5,18,.72); backdrop-filter:blur(8px); border-radius:20px; z-index:10; }
#screen-quest-prep .prep-generating.on { display:flex; }
#screen-quest-prep .prep-orb { width:72px; height:72px; border-radius:50%; background:radial-gradient(circle at 35% 30%, #c4b5fd, #6d5dfc 60%, #4c1d95); box-shadow:0 0 50px -4px rgba(150,90,230,.9); animation:prep-pulse 1.4s ease-in-out infinite; }
@keyframes prep-pulse { 0%,100% { transform:scale(1); opacity:.9; } 50% { transform:scale(1.12); opacity:1; } }
#screen-quest-prep .prep-gen-title { font-family:"Clash Display",sans-serif; font-weight:600; font-size:18px; color:#fff; }
#screen-quest-prep .prep-gen-sub { font-size:13px; color:var(--qb-muted); }
@media (max-width:560px) {
  #screen-quest-prep .prep-page { padding:18px 14px 36px; }
  #screen-quest-prep .prep-nav { flex-wrap:wrap; }
}

/* ─── Compagnon alien de l'accueil (suit la souris + sautille) ─── */
.home-companion {
  position: fixed; left: 0; top: 0; width: 62px; height: 65px;
  z-index: 58; pointer-events: none; will-change: transform;
  transform: translate(-120px, -120px);
  filter: drop-shadow(0 8px 16px rgba(120,80,220,.55));
}
.home-companion svg { width: 100%; height: 100%; display: block; overflow: visible; }
.home-companion .hc-shadow { fill: rgba(40,16,70,.45); }
.home-companion .hc-pupil { transition: transform .08s linear; }

@media (max-width:560px) {
  .av-tabs2 .av-tab2 { font-size:12.5px; gap:5px; padding:12px 0; }
  .av-tabs2 .av-tab2 svg { width:16px; height:16px; }
  .av-tabs2 .av-tab2 .av-tab2-prog { right:8px; top:6px; }
}

/* Titre « Crée ton avatar » — même design dégradé que le titre boutique de quêtes
   (Clash Display, casse normale, dégradé violet en background-clip text). */
#screen-avatar .screen-header .screen-title.t1 {
  font-family:"Clash Display", sans-serif !important;
  font-weight:600 !important;
  font-size:22px !important;
  letter-spacing:.01em !important;
  text-transform:none !important;
  background:linear-gradient(135deg,#c4b5fd,#818cf8,#a78bfa) !important;
  -webkit-background-clip:text !important;
  background-clip:text !important;
  -webkit-text-fill-color:transparent !important;
  color:transparent !important;
  text-shadow:none !important;
}

/* ═══════════════════════════════════════════════════════════════
   COMPAGNON-PROF — écran d'apprentissage (#screen-quest-companion)
   Verre dépoli translucide sur le cosmos global ; le compagnon est le prof
   privé qui explique le diapo point par point avant le combat.
   Variables locales calées sur la charte (alignées sur l'accueil).
   ═══════════════════════════════════════════════════════════════ */
#screen-quest-companion{
  --cmp-violet:#a78bfa; --cmp-violet-bright:#c4b5fd; --cmp-indigo:#6d5dfc;
  --cmp-magenta:#d65ad6; --cmp-gold:#f5b544; --cmp-ink:#f3f0ff;
  --cmp-green:#54d6a0; --cmp-teal:#5ad6e0;
  --cmp-muted:#b3a9d6; --cmp-muted-2:#7d749e;
  --cmp-surface:rgba(255,255,255,.05); --cmp-stroke:rgba(255,255,255,.10);
  --cmp-wb-w:min(94vw, 1180px);   /* largeur du tableau : panoramique */
  background:transparent; /* laisse passer le #cosmic-bg global */
  font-family:'Satoshi','Inter',sans-serif;
  align-items:stretch; justify-content:flex-start;
}

/* ── Apparition douce de la section ── */
#screen-quest-companion .cmp-view{ opacity:0; }
#screen-quest-companion.cmp-in .cmp-view-welcome:not([hidden]),
#screen-quest-companion.active .cmp-view:not([hidden]){ opacity:1; }
#screen-quest-companion .cmp-view{ transition:opacity .4s ease; }

/* ════ ÉCRAN 1 — ACCUEIL (refonte premium, épuré : 3 zones max) ════ */
.cmp-view-welcome{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  padding:24px; overflow-y:auto;
}
.cmp-view-welcome[hidden]{ display:none; }
.cmp-back{
  position:absolute; top:18px; left:18px; z-index:4;
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke);
  color:var(--cmp-ink); cursor:pointer; backdrop-filter:blur(8px);
  transition:background .2s, transform .2s;
}
.cmp-back:hover{ background:rgba(255,255,255,.10); transform:translateX(-2px); }

/* ── Ailes de papillon du compagnon (battent doucement) ── */
.cmp-wings .cmp-wing{ transform-box:fill-box; }
.cmp-wing-l{ transform-origin:90% 50%; animation:cmpFlapL 3s ease-in-out infinite; }
.cmp-wing-r{ transform-origin:10% 50%; animation:cmpFlapR 3s ease-in-out infinite; }
@keyframes cmpFlapL{ 0%,100%{ transform:rotate(0); } 50%{ transform:rotate(-8deg); } }
@keyframes cmpFlapR{ 0%,100%{ transform:rotate(0); } 50%{ transform:rotate(8deg); } }

/* ── Effet machine à écrire : curseur clignotant + prof qui « parle » ── */
.cmp-cursor{ display:inline-block; width:2px; height:1em; margin-left:1px; vertical-align:-0.14em; background:var(--cmp-violet,#a78bfa); border-radius:1px; box-shadow:0 0 6px rgba(167,139,250,.7); animation:cmpCaret .9s steps(1,end) infinite; }
@keyframes cmpCaret{ 0%,49%{ opacity:1; } 50%,100%{ opacity:0; } }
.cmp-prof.is-talking svg{ animation:cmpProfTalk .34s ease-in-out infinite; }
@keyframes cmpProfTalk{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-5px); } }
.cmp-speech{ cursor:pointer; }

.cmp-welcome-inner{
  display:flex; flex-direction:column; align-items:center; gap:30px;
  max-width:560px; width:100%; text-align:center;
}
/* apparition séquentielle : scène → bulle → reprise → bouton */
.cmp-welcome-inner > *{ animation:cmpRise .6s cubic-bezier(.34,1.4,.5,1) both; }
.cmp-welcome-inner > *:nth-child(1){ animation-delay:.06s; }
.cmp-welcome-inner > *:nth-child(2){ animation-delay:.20s; }
.cmp-welcome-inner > *:nth-child(3){ animation-delay:.34s; }
.cmp-welcome-inner > *:nth-child(4){ animation-delay:.46s; }
@keyframes cmpRise{ from{ opacity:0; transform:translateY(18px); } to{ opacity:1; transform:translateY(0); } }

/* ── La scène : aura qui respire + orbite qui tourne (point doré) + alien ── */
.cmp-stage{ position:relative; width:248px; height:248px; display:flex; align-items:center; justify-content:center; }
.cmp-aura{
  position:absolute; inset:-6%; border-radius:50%; pointer-events:none; z-index:0;
  background:radial-gradient(circle at 50% 46%, rgba(167,139,250,.5), rgba(150,100,240,.18) 42%, transparent 68%);
  animation:cmpAura 5.5s ease-in-out infinite;
}
@keyframes cmpAura{ 0%,100%{ opacity:.7; transform:scale(.95); } 50%{ opacity:1; transform:scale(1.07); } }
.cmp-orbit{
  position:absolute; inset:3%; border-radius:50%; z-index:1; pointer-events:none;
  border:1px solid rgba(255,255,255,.12);
  animation:cmpOrbit 18s linear infinite;
}
.cmp-orbit-dot{
  position:absolute; top:-4.5px; left:50%; margin-left:-4.5px;
  width:9px; height:9px; border-radius:50%; background:var(--cmp-gold,#f5b544);
  box-shadow:0 0 10px 2px rgba(245,181,68,.85), 0 0 22px 5px rgba(245,181,68,.35);
}
@keyframes cmpOrbit{ from{ transform:rotate(0); } to{ transform:rotate(360deg); } }

/* ── Le compagnon (alien) qui flotte ── */
.cmp-alien{ display:block; }
.cmp-alien--hero{ position:relative; z-index:2; width:170px; filter:drop-shadow(0 16px 30px rgba(109,93,252,.45)); animation:cmpFloat 3.6s ease-in-out infinite; }
.cmp-alien-svg{ width:100%; height:auto; overflow:visible; }
.cmp-alien-shadow{ fill:#6d5dfc; opacity:.18; animation:cmpShadow 3.6s ease-in-out infinite; }
.cmp-wand{ animation:cmpWandGlow 2.2s ease-in-out infinite; transform-origin:center; }
@keyframes cmpFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-9px); } }
@keyframes cmpShadow{ 0%,100%{ transform:scaleX(1); opacity:.18; } 50%{ transform:scaleX(.86); opacity:.12; } }
@keyframes cmpWandGlow{ 0%,100%{ filter:drop-shadow(0 0 0 rgba(245,181,68,0)); } 50%{ filter:drop-shadow(0 0 7px rgba(245,181,68,.9)); } }

/* ── Bulle de parole premium, pointe vers le compagnon (en haut) ── */
.cmp-bubble--hero{
  position:relative; color:#241046; max-width:480px;
  background:linear-gradient(180deg,#ffffff,#f4f0ff);
  border-radius:24px; padding:20px 26px;
  font-size:1.12rem; line-height:1.5; font-weight:500;
  box-shadow:0 22px 50px rgba(80,40,160,.40), inset 0 1px 0 rgba(255,255,255,.9);
}
.cmp-bubble--hero::before{
  content:""; position:absolute; top:-10px; left:50%; transform:translateX(-50%);
  border:11px solid transparent; border-bottom-color:#fff; border-top:0;
}
.cmp-bubble--hero .cmp-hl{ color:var(--cmp-indigo,#6d5dfc); font-weight:700; }

/* ── Pastille « Reprise » discrète (affichée UNIQUEMENT en reprise) ── */
.cmp-resume-pill{
  display:none; align-items:center; gap:9px;
  padding:7px 17px 7px 13px; border-radius:999px;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke);
  color:var(--cmp-muted); font-size:.86rem; font-weight:600; letter-spacing:.03em;
  backdrop-filter:blur(8px);
}
.cmp-resume-pill.is-on{ display:inline-flex; }
.cmp-resume-pill::before{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--cmp-violet,#a78bfa);
  box-shadow:0 0 8px 1px rgba(167,139,250,.8); animation:cmpPulse 2s ease-in-out infinite;
}
@keyframes cmpPulse{ 0%,100%{ opacity:.5; } 50%{ opacity:1; } }

/* ── Bouton CTA premium avec éclat de lumière qui balaie ── */
.cmp-cta{
  position:relative; overflow:hidden; margin-top:10px; border:none; cursor:pointer;
  font-family:'Clash Display','Satoshi',sans-serif; font-weight:600; font-size:1.08rem;
  color:#fff; padding:16px 34px; border-radius:18px; letter-spacing:.01em;
  background:linear-gradient(105deg,var(--cmp-indigo,#6d5dfc),var(--cmp-magenta,#d65ad6));
  box-shadow:0 14px 32px rgba(150,70,230,.5), inset 0 1px 0 rgba(255,255,255,.25);
  transition:transform .2s, box-shadow .2s;
}
.cmp-cta::after{
  content:""; position:absolute; top:0; left:-60%; width:45%; height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.5),transparent);
  transform:skewX(-18deg); animation:cmpSheen 4.5s ease-in-out infinite;
}
@keyframes cmpSheen{ 0%,20%{ left:-60%; } 42%,100%{ left:135%; } }
.cmp-cta:hover{ transform:translateY(-2px); box-shadow:0 18px 40px rgba(214,90,214,.6); }
.cmp-cta:active{ transform:translateY(0); }

/* ════ ÉCRAN 2 — LA SALLE DE CLASSE ════ */
.cmp-view-board{
  position:absolute; inset:0;
  display:flex; flex-direction:column;
}
.cmp-view-board[hidden]{ display:none; }

/* ── Barre du haut ── */
.cmp-topbar{
  flex:0 0 auto; display:flex; align-items:center; gap:14px;
  padding:14px 18px; border-bottom:1px solid var(--cmp-stroke);
  background:rgba(10,6,24,.35); backdrop-filter:blur(10px);
}
.cmp-close{
  width:38px; height:38px; flex:0 0 auto; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke);
  color:var(--cmp-ink); cursor:pointer; transition:background .2s;
}
.cmp-close:hover{ background:rgba(255,255,255,.10); }
.cmp-topbar-mid{ flex:1 1 auto; min-width:0; }
.cmp-topbar-title{
  font-family:'Clash Display',sans-serif; font-weight:600; font-size:1.02rem;
  color:var(--cmp-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cmp-topbar-sub{ font-size:.78rem; color:var(--cmp-muted-2); margin-top:1px; }
.cmp-chrono{
  flex:0 0 auto; font-family:'Clash Display',sans-serif; font-weight:600;
  font-size:1.02rem; color:var(--cmp-violet-bright);
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke);
  padding:7px 13px; border-radius:12px; font-variant-numeric:tabular-nums;
}
.cmp-chrono.warn{ color:#ff8b8b; border-color:rgba(255,139,139,.4); }

/* ── La salle : zone défilante centrale ── */
.cmp-class{
  position:relative; flex:1 1 auto; min-height:0; overflow-y:auto;
  padding:14px 18px 18px;
  display:flex; flex-direction:column; align-items:center; justify-content:safe center; gap:16px;
}

/* HUD : papillons (gauche) + Monstre en cage (droite) */
.cmp-class-hud{
  width:100%; max-width:720px; display:flex; align-items:center; justify-content:space-between;
}
.cmp-reward{
  display:inline-flex; align-items:center; gap:7px;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke);
  border-radius:999px; padding:5px 13px 5px 9px;
  font-family:'Clash Display',sans-serif; font-weight:600; color:#fff;
  font-variant-numeric:tabular-nums;
}
.cmp-reward-ico{ width:20px; height:20px; display:inline-flex; }
.cmp-reward-ico svg{ width:100%; height:100%; }
.cmp-reward.pop{ animation:cmpPop .4s ease; }
@keyframes cmpPop{ 0%{ transform:scale(1); } 40%{ transform:scale(1.18); } 100%{ transform:scale(1); } }

/* Monstre de l'Oubli en cage (sa mémoire faiblit quand on apprend) */
.cmp-cage{
  position:relative; width:72px; height:94px; flex:0 0 auto; overflow:visible;
}
.cmp-cage-frame{ position:absolute; inset:0; width:100%; height:100%; z-index:2; pointer-events:none; filter:drop-shadow(0 2px 3px rgba(40,20,80,.45)); }
.cmp-cage-monster{
  position:absolute; left:16px; top:38px; width:40px; height:36px; z-index:1;
  transform:scale(var(--shrink,1)); transform-origin:center bottom;
  transition:transform .55s cubic-bezier(.34,1.5,.5,1), opacity .5s;
}
.cmp-cage-mon-svg{ width:100%; height:100%; display:block; transform-origin:center bottom; animation:cmpMonBob 2.8s ease-in-out infinite; }
@keyframes cmpMonBob{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-2px); } }
/* Sursaut bref quand il rétrécit (réaction physique, silencieuse) */
.cmp-cage-monster.is-startle{ animation:cmpMonStartle .45s ease-out; }
@keyframes cmpMonStartle{ 0%{ filter:brightness(1.7); } 100%{ filter:brightness(1); } }
/* Épuisé : raplapla */
.cmp-cage-monster.is-flop .cmp-cage-mon-svg{ animation:none; transform:scaleY(.55); }
/* Il se jette contre les barreaux (direction aléatoire) */
.cmp-cage-monster.lunge-l .cmp-cage-mon-svg{ animation:cmpLungeL .26s ease-out; }
.cmp-cage-monster.lunge-r .cmp-cage-mon-svg{ animation:cmpLungeR .26s ease-out; }
.cmp-cage-monster.lunge-u .cmp-cage-mon-svg{ animation:cmpLungeU .26s ease-out; }
@keyframes cmpLungeL{ 0%,100%{ transform:translate(0) rotate(0); } 50%{ transform:translate(-5px,0) rotate(-7deg); } }
@keyframes cmpLungeR{ 0%,100%{ transform:translate(0) rotate(0); } 50%{ transform:translate(5px,0) rotate(7deg); } }
@keyframes cmpLungeU{ 0%,100%{ transform:translate(0,0); } 50%{ transform:translate(0,-6px); } }

/* ── Le tableau : fine bordure blanche autour de la scène cosmos ── */
.cmp-wb{
  position:relative; width:100%; max-width:var(--cmp-wb-w, min(1760px, 96vw));
  background:transparent; border:none; border-radius:20px;
  box-shadow:none; padding:0; overflow:visible;
}
.cmp-wb-title{
  font-family:inherit; font-weight:700; font-size:.92rem;
  color:#c9b8ff; text-align:center; margin:0 0 8px;
}
/* Bouton « agrandir le tableau » retiré (demandé) */
.cmp-wb-fs{ display:none !important; }

/* ════════════════════════════════════════════════════════════
   SCÈNE D'ATTENTE : le gardien et l'Oubli se chamaillent dans
   l'espace pendant que l'IA prépare les cartes. Recouvre le
   tableau blanc vide le temps du chargement.
════════════════════════════════════════════════════════════ */
.cmp-prep-scene{
  position:absolute; inset:0; z-index:8; border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px;
  padding:26px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,241,255,.94));
}
/* Tableau blanc en chargement : lignes squelette qui scintillent */
.cwl-board{ width:min(680px,88%); display:flex; flex-direction:column; gap:16px; }
.cwl-row{ display:flex; align-items:center; gap:14px; }
.cwl-dot{ width:13px; height:13px; border-radius:50%; flex:0 0 auto;
  background:linear-gradient(90deg,#e9e2ff,#f3eeff); }
.cwl-line{ height:14px; border-radius:8px;
  background:linear-gradient(90deg,#eae3fb 0%,#f7f3ff 45%,#eae3fb 80%);
  background-size:200% 100%; animation:cwlShimmer 1.4s linear infinite; }
.cwl-title{ width:48%; height:22px; margin-bottom:6px; }
.cwl-line.w70{ width:70%; } .cwl-line.w88{ width:88%; }
.cwl-line.w58{ width:58%; } .cwl-line.w80{ width:80%; }
@keyframes cwlShimmer{ 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.cwl-caption{ display:flex; align-items:center; gap:10px; color:#6b4fb0; font-weight:600; font-size:.95rem; }
.cwl-spin{ width:16px; height:16px; border-radius:50%; flex:0 0 auto;
  border:2.5px solid rgba(124,92,255,.25); border-top-color:#7c5cff;
  animation:cwlSpin .8s linear infinite; }
@keyframes cwlSpin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .cwl-line,.cwl-spin{ animation:none; } }
.cps-star{
  position:absolute; width:3px; height:3px; border-radius:50%; background:#fff;
  box-shadow:0 0 6px 1px rgba(255,255,255,.7);
  animation:cpsTwinkle 2.4s ease-in-out infinite;
}
@keyframes cpsTwinkle{ 0%,100%{opacity:.22;transform:scale(.6)} 50%{opacity:.9;transform:scale(1.1)} }

.cps-stage{ position:relative; width:min(480px,84%); height:210px; }
.cps-fighter{
  position:absolute; top:50%; left:50%; will-change:transform;
}
.cps-fighter svg{
  width:100%; height:100%; display:block;
  filter:drop-shadow(0 8px 18px rgba(0,0,0,.5));
}
.cps-guardian{ width:140px; height:122px; margin:-61px 0 0 -70px; animation:cpsGuard 4s ease-in-out infinite; }
.cps-oubli{ width:112px; height:126px; margin:-63px 0 0 -56px; animation:cpsOubli 4s ease-in-out infinite; }
.cps-bob{ width:100%; height:100%; animation:cpsBob 1.15s ease-in-out infinite; }
@keyframes cpsBob{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
/* L'Oubli regarde le Gardien (miroir) ; il flotte avec un léger décalage. */
.cps-oubli .cps-bob{ animation-name:cpsBobFlip; animation-delay:.25s; }
@keyframes cpsBobFlip{ 0%,100%{transform:scaleX(-1) translateY(0)} 50%{transform:scaleX(-1) translateY(-8px)} }

/* LE GARDIEN : fonce, donne deux coups joueurs, puis fait un tonneau de joie. */
@keyframes cpsGuard{
  0%   { transform:translateX(-170px) rotate(0deg); }
  16%  { transform:translateX(-84px)  rotate(8deg); }
  28%  { transform:translateX(-54px)  rotate(16deg); }   /* coup 1 */
  34%  { transform:translateX(-78px)  rotate(-6deg); }   /* recul */
  40%  { transform:translateX(-54px)  rotate(14deg); }   /* coup 2 */
  46%  { transform:translateX(-76px)  rotate(2deg); }
  54%  { transform:translateX(-88px)  rotate(140deg); }  /* tonneau de joie */
  62%  { transform:translateX(-98px)  rotate(300deg); }
  68%  { transform:translateX(-102px) rotate(360deg); }
  84%  { transform:translateX(-146px) rotate(360deg); }
  100% { transform:translateX(-170px) rotate(360deg); }
}
/* L'OUBLI : grognon, rend les coups, puis gonfle de colère quand l'autre s'amuse. */
@keyframes cpsOubli{
  0%   { transform:translateX(170px) rotate(0deg) scale(1); }
  16%  { transform:translateX(84px)  rotate(-7deg) scale(1); }
  28%  { transform:translateX(46px)  rotate(-16deg) scale(1); }  /* coup 1 */
  34%  { transform:translateX(70px)  rotate(7deg) scale(1); }    /* recul */
  40%  { transform:translateX(46px)  rotate(-14deg) scale(1); }  /* coup 2 */
  46%  { transform:translateX(70px)  rotate(-2deg) scale(1); }
  56%  { transform:translateX(82px)  rotate(5deg) scale(1.14); } /* il gonfle, vexé */
  64%  { transform:translateX(92px)  rotate(-3deg) scale(1); }
  84%  { transform:translateX(146px) rotate(0deg) scale(1); }
  100% { transform:translateX(170px) rotate(0deg) scale(1); }
}
.cps-clash{
  position:absolute; left:50%; top:50%; font-size:38px; pointer-events:none;
  animation:cpsClash 4s ease-in-out infinite;
}
@keyframes cpsClash{
  0%,22% { opacity:0; transform:translate(-50%,-50%) scale(0); }
  28%    { opacity:1; transform:translate(-50%,-60%) scale(1.15); }  /* coup 1 */
  34%    { opacity:0; transform:translate(-50%,-54%) scale(.7); }
  40%    { opacity:1; transform:translate(-50%,-62%) scale(1.1); }   /* coup 2 */
  48%,100%{ opacity:0; transform:translate(-50%,-50%) scale(0); }
}
/* Petites bulles d'émotion : étincelles du Gardien joueur, signe de colère de l'Oubli. */
.cps-emote{ position:absolute; font-size:24px; pointer-events:none; }
.cps-emote-g{ top:-4px; right:2px; animation:cpsEmoteG 4s ease-in-out infinite; }
.cps-emote-o{ top:-2px; left:6px; animation:cpsEmoteO 4s ease-in-out infinite; }
@keyframes cpsEmoteG{
  0%,46% { opacity:0; transform:scale(.4) translateY(4px); }
  56%    { opacity:1; transform:scale(1.1) translateY(-4px); }
  72%    { opacity:0; transform:scale(.6) translateY(-10px); }
  100%   { opacity:0; }
}
@keyframes cpsEmoteO{
  0%,22% { opacity:0; transform:scale(.4); }
  30%    { opacity:1; transform:scale(1.1) rotate(-8deg); }
  44%    { opacity:.4; transform:scale(.8) rotate(6deg); }
  58%    { opacity:1; transform:scale(1.15) rotate(-6deg); }
  70%,100%{ opacity:0; transform:scale(.6); }
}
.cps-caption{
  margin-top:18px; color:#d9d2ff; font-weight:600; font-size:.95rem;
  letter-spacing:.01em; text-align:center; max-width:80%;
  display:flex; align-items:center; gap:9px;
}
.cps-dots{ display:inline-flex; gap:4px; flex:none; }
.cps-dots i{ width:5px; height:5px; border-radius:50%; background:#a78bfa; animation:cpsDot 1s ease-in-out infinite; }
.cps-dots i:nth-child(2){ animation-delay:.15s; }
.cps-dots i:nth-child(3){ animation-delay:.3s; }
@keyframes cpsDot{ 0%,100%{opacity:.3;transform:translateY(0)} 50%{opacity:1;transform:translateY(-4px)} }

@media (prefers-reduced-motion: reduce){
  .cps-guardian, .cps-oubli, .cps-bob, .cps-clash, .cps-star, .cps-dots i, .cps-emote{ animation:none !important; }
  .cps-guardian{ transform:translateX(-70px); }
  .cps-oubli{ transform:translateX(70px); }
  .cps-emote{ opacity:0; }
}

/* ════════════════════════════════════════════════════════════
   TABLEAU RÉPONSE : quand l'étudiant pose une question, le gardien
   met tout en pause et écrit sa réponse rigoureuse AU TABLEAU.
   Recouvre la carte mentale le temps de la réponse.
════════════════════════════════════════════════════════════ */
.cmp-qa{
  position:absolute; inset:34px 6px 7px; z-index:9; border-radius:13px;
  display:flex; flex-direction:column; overflow:hidden;
  background:linear-gradient(180deg, #ffffff, #f6f2ff);
  border:1px solid rgba(167,139,250,.35);
  box-shadow:0 10px 30px rgba(40,18,90,.18), inset 0 1px 0 rgba(255,255,255,.9);
  animation:cmpQaIn .26s cubic-bezier(.2,.7,.2,1.1) both;
}
@keyframes cmpQaIn{ 0%{opacity:0; transform:translateY(8px) scale(.99)} 100%{opacity:1; transform:none} }
.cmp-qa-q{
  display:flex; align-items:flex-start; gap:9px; flex:none;
  padding:12px 16px; font-weight:700; font-size:.96rem; color:#3a2570;
  background:linear-gradient(180deg, rgba(167,139,250,.16), rgba(167,139,250,.06));
  border-bottom:1px solid rgba(167,139,250,.25);
}
.cmp-qa-q-ic{
  flex:none; width:22px; height:22px; border-radius:50%; margin-top:1px;
  display:inline-flex; align-items:center; justify-content:center;
  background:linear-gradient(180deg,#7c5cf0,#a78bfa); color:#fff; font-weight:800; font-size:.85rem;
}
.cmp-qa-body{
  flex:1 1 auto; min-height:0; overflow-y:auto;
  padding:14px 18px; color:#2c2150; font-size:.95rem; line-height:1.55;
}
.cmp-qa-think{ display:flex; align-items:center; gap:5px; color:#7a6aa8; font-style:italic; padding:8px 0; }
.cmp-qa-think span{ width:7px; height:7px; border-radius:50%; background:#a78bfa; animation:cpsDot 1s ease-in-out infinite; }
.cmp-qa-think span:nth-child(2){ animation-delay:.15s; }
.cmp-qa-think span:nth-child(3){ animation-delay:.3s; margin-right:6px; }
.cmp-qa-ans > :first-child{ margin-top:0; }
.cmp-qa-ans p{ margin:0 0 10px; }
.cmp-qa-ans ul{ margin:0 0 10px; padding-left:20px; }
.cmp-qa-ans li{ margin:3px 0; }
.cmp-qa-ans strong{ color:#3a2570; font-weight:700; }
.cmp-qa-note{ margin-top:8px; font-size:.84rem; color:#8a7ab0; font-style:italic; }
.cmp-qa-resume{
  flex:none; align-self:center; margin:4px auto 12px; padding:10px 26px;
  border:none; border-radius:999px; cursor:pointer;
  background:linear-gradient(180deg,#7c5cf0,#9b7ef0); color:#fff;
  font-weight:700; font-size:.92rem; letter-spacing:.01em;
  box-shadow:0 6px 16px rgba(124,92,240,.4); transition:transform .12s, box-shadow .15s;
}
.cmp-qa-resume:hover{ transform:translateY(-1px); box-shadow:0 9px 22px rgba(124,92,240,.5); }
.cmp-qa-resume:active{ transform:scale(.97); }
/* Contrôles sur la carte : pause · précédent · suivant */
.cmp-wb-ctrl{ position:absolute; bottom:10px; right:12px; display:flex; gap:6px; z-index:6; }
.cmp-wb-btn{ width:30px; height:30px; flex:none; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,.28); background:rgba(255,255,255,.14); color:#ffffff; cursor:pointer; transition:background .15s, transform .12s, opacity .15s; }
.cmp-wb-btn svg{ color:#fff; stroke:#fff; }
.cmp-wb-btn:hover{ background:rgba(255,255,255,.26); }
.cmp-wb-btn:active{ transform:scale(.92); }
.cmp-wb-btn:disabled{ opacity:.4; cursor:default; }
.cmp-wb-btn.is-paused{ background:rgba(245,181,68,.30); border-color:rgba(245,181,68,.65); color:#fff; }
.cmp-map{
  position:relative; width:100%; height:clamp(420px, 74vh, 940px);
  border-radius:20px; overflow:hidden;
}
.cmp-map-links{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.cmp-link{
  stroke:#c4b5fd; stroke-width:1.4; fill:none; stroke-linecap:round;
  vector-effect:non-scaling-stroke;   /* trait fin et net, non déformé par l'étirement du SVG */
  stroke-dasharray:1; stroke-dashoffset:1;
  transition:stroke-dashoffset .55s ease, stroke .3s;
}
.cmp-link.is-drawn{ stroke-dashoffset:0; }
.cmp-link.is-active{ stroke:#f5b544; stroke-width:2; }

/* Nœud central (mot clé) — sans pulsation (plus de clignotement) */
.cmp-central{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  z-index:3; max-width:46%;
  background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta));
  color:#fff; font-family:'Clash Display',sans-serif; font-weight:600;
  font-size:1.02rem; text-align:center; line-height:1.2;
  padding:14px 18px; border-radius:16px;
  box-shadow:0 10px 24px rgba(109,93,252,.5);
}

/* Nœuds reliés (texte simple, comme au début) */
.cmp-node{
  position:absolute; transform:translate(-50%,-50%) scale(.6);
  z-index:2; max-width:150px; width:max-content;
  padding:9px 12px; border-radius:13px; border:1.5px solid;
  font-size:.86rem; line-height:1.25; font-weight:600; text-align:center;
  opacity:0; pointer-events:none;
  transition:opacity .4s ease, transform .45s cubic-bezier(.34,1.5,.5,1);
}
.cmp-node.is-on{ opacity:1; transform:translate(-50%,-50%) scale(1); }
.cmp-node.is-active{ box-shadow:0 0 0 3px rgba(245,181,68,.25), 0 8px 20px rgba(12,6,34,.18); }
.cmp-node--fam{  background:rgba(167,139,250,.16); border-color:rgba(167,139,250,.6); color:#5b3aa6; }
.cmp-node--leaf{ background:rgba(84,214,160,.16);  border-color:rgba(84,214,160,.65); color:#1c7d57; }
.cmp-node--warn{ background:rgba(240,106,176,.16); border-color:rgba(240,106,176,.65); color:#a8327a; }

/* Liste des POINTS à expliquer (apprentissage actif : quiz d'abord, explication ensuite).
   Les points se révèlent au fil de l'explication, le point en cours est mis en valeur. */
.cmp-points{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:10px; padding:12px 10px 54px; overflow-y:auto; }
.cmp-point{ padding:11px 15px; border-radius:13px; border:1.5px solid; font-size:.92rem; font-weight:600; line-height:1.3; text-align:left; opacity:.3; filter:grayscale(.35); transition:opacity .35s ease, transform .35s, box-shadow .25s, filter .35s; }
.cmp-point.is-on{ opacity:1; filter:none; }
.cmp-point.is-active{ box-shadow:0 0 0 3px rgba(245,181,68,.28), 0 8px 20px rgba(12,6,34,.18); transform:translateX(5px); }
.cmp-point--fam{  background:rgba(167,139,250,.16); border-color:rgba(167,139,250,.6); color:#5b3aa6; }
.cmp-point--leaf{ background:rgba(84,214,160,.16);  border-color:rgba(84,214,160,.65); color:#1c7d57; }
.cmp-point--warn{ background:rgba(240,106,176,.16); border-color:rgba(240,106,176,.65); color:#a8327a; }

/* ── SCHÉMA visuel (phase explication) : concept central + branches en MOTS-CLÉS.
   La voix porte l'explication ; la carte ne sert qu'à schématiser. Statique (zéro clignotement). ── */
.cmp-schema{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px 14px 56px; overflow-y:auto; }
.cmp-schema-center{
  position:relative; z-index:2; max-width:84%;
  background:linear-gradient(135deg,var(--cmp-indigo,#7c5cff),var(--cmp-magenta,#d946ef));
  color:#fff; font-weight:700; font-size:1.02rem; text-align:center; line-height:1.2;
  padding:12px 20px; border-radius:16px; box-shadow:0 10px 24px rgba(109,93,252,.45);
}
.cmp-schema-center::after{   /* tronc vertical sous le central */
  content:''; position:absolute; left:50%; bottom:-18px; transform:translateX(-50%);
  width:2px; height:18px; background:rgba(167,139,250,.55);
}
.cmp-schema-branches{
  position:relative; margin-top:18px; display:flex; flex-wrap:wrap;
  align-items:flex-start; justify-content:center; gap:0 14px; max-width:100%;
}
.cmp-schema-branches::before{   /* rail horizontal au-dessus des branches */
  content:''; position:absolute; left:16%; right:16%; top:-9px; height:2px;
  background:rgba(167,139,250,.4); border-radius:2px;
}
.cmp-schema--single .cmp-schema-branches::before{ display:none; }
.cmp-schema .cmp-point{
  position:relative; flex:0 0 auto; width:max-content; max-width:44%;
  text-align:center; font-size:.9rem; padding:10px 14px; margin-top:9px;
}
.cmp-schema .cmp-point::before{   /* tige reliant chaque mot-clé au rail */
  content:''; position:absolute; left:50%; top:-9px; transform:translateX(-50%);
  width:2px; height:9px; background:rgba(167,139,250,.4);
}
.cmp-schema--single .cmp-point::before{ display:none; }

/* ── DIAGRAMMES auto (Markmap / Mermaid) : dessinés par librairie, mise en page automatique ── */
.cmp-diagram{ position:absolute; inset:0; width:100%; height:100%; padding:6px 8px 50px; }
svg.cmp-diagram--markmap{ display:block; }                 /* Markmap remplit tout le SVG */
.cmp-diagram--mermaid{ display:flex; align-items:center; justify-content:center; overflow:auto; }
.cmp-diagram--mermaid svg{ max-width:100%; height:auto; font-family:inherit; }
.cmp-diagram--markmap .markmap-node text{ font-family:inherit; }
.cmp-diagram--markmap .markmap-link{ stroke-opacity:.55; }

/* ── MODE DIAPO : la vraie slide de l'étudiante + le compagnon qui POINTE une zone ── */
.cmp-diapo{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:8px 10px 50px; }
.cmp-diapo-frame{ position:relative; display:inline-block; max-width:100%; max-height:100%; border-radius:12px; overflow:hidden; box-shadow:0 8px 26px rgba(12,6,34,.22); border:1px solid rgba(167,139,250,.4); background:#fff; }
.cmp-diapo-img{ display:block; max-width:100%; max-height:330px; width:auto; height:auto; }
.cmp-diapo-ptr{
  position:absolute; left:50%; top:50%; width:74px; height:74px; transform:translate(-50%,-50%);
  border-radius:50%; border:3px solid #f5b544;
  box-shadow:0 0 0 3px rgba(245,181,68,.22), 0 0 18px rgba(245,181,68,.5);
  background:rgba(245,181,68,.10); opacity:0; pointer-events:none;
  transition:left .55s cubic-bezier(.34,1.2,.5,1), top .55s cubic-bezier(.34,1.2,.5,1), opacity .3s ease;
}
.cmp-diapo-ptr.is-on{ opacity:1; }
.cmp-diapo-ptr::after{   /* petite flèche au-dessus du cercle pour bien désigner */
  content:''; position:absolute; left:50%; top:-15px; transform:translateX(-50%);
  border:7px solid transparent; border-bottom-color:#f5b544;
}

/* ════════════════════════════════════════════════════════════════
   TABLEAU EN MOTION  (remplace l'ancien tableau / carte mentale)
   Scène en mouvement permanent : blobs flottants + zoom Ken Burns,
   cartes qui glissent, éléments en cascade, mot-clé qui pulse.
   La bulle raconte ; le tableau donne l'IMPACT.
   ════════════════════════════════════════════════════════════════ */
.tm-scene{
  position:absolute; inset:0; border-radius:12px; overflow:hidden;
  background:radial-gradient(120% 120% at 50% 0%, #2a1f55 0%, #1d1542 55%, #16102e 100%);
  box-shadow:inset 0 0 70px rgba(124,58,237,.18);
}
/* hyperespace : champ d'étoiles 3D DANS le tableau (canvas), traînées qui filent à chaque saut */
.tm-warp{ position:absolute; inset:0; z-index:0; display:block; width:100%; height:100%; }
/* couche zoom lent (Ken Burns) — on zoome le contenu, pas le cadre */
.tm-zoom{ position:absolute; inset:0; animation:tm-ken 22s ease-in-out infinite; }
@keyframes tm-ken{ 0%,100%{ transform:scale(1) translate(0,0); } 50%{ transform:scale(1.06) translate(-1.2%,-1%); } }

/* blobs colorés flous qui flottent en fond */
.tm-blobs{ position:absolute; inset:-10%; pointer-events:none; }
.tm-blob{ position:absolute; border-radius:50%; filter:blur(46px); opacity:.55; mix-blend-mode:screen; }
.tm-blob.b1{ width:46%; height:46%; left:-6%; top:-4%;  background:#6d5dfc; animation:tm-float1 17s ease-in-out infinite; }
.tm-blob.b2{ width:42%; height:42%; right:-8%; top:12%;  background:#d65ad6; animation:tm-float2 21s ease-in-out infinite; }
.tm-blob.b3{ width:40%; height:40%; left:18%; bottom:-12%; background:#5ad6e0; animation:tm-float3 19s ease-in-out infinite; }
@keyframes tm-float1{ 0%,100%{ transform:translate(0,0) scale(1); } 33%{ transform:translate(14%,8%) scale(1.18); } 66%{ transform:translate(6%,18%) scale(.92); } }
@keyframes tm-float2{ 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(-16%,12%) scale(1.2); } }
@keyframes tm-float3{ 0%,100%{ transform:translate(0,0) scale(1); } 40%{ transform:translate(-10%,-12%) scale(1.15); } 75%{ transform:translate(12%,-6%) scale(.95); } }

/* pastilles de progression en haut de la scène */
.tm-pills{ position:absolute; top:16px; left:0; right:0; z-index:4; display:flex; gap:7px; justify-content:center; }
.tm-pill{ width:9px; height:9px; border-radius:5px; background:rgba(255,255,255,.22); transition:width .45s cubic-bezier(.34,1.4,.5,1), background .45s; }
.tm-pill.is-done{ background:rgba(196,181,253,.6); }
.tm-pill.is-active{ width:26px; background:linear-gradient(90deg,var(--cmp-indigo),var(--cmp-magenta)); }

/* tint cosmos : voile de couleur qui se fond doucement d'une slide à l'autre (toujours spatial) */
.tm-tint{ position:absolute; inset:0; mix-blend-mode:screen; opacity:.20; background:#6d5dfc; transition:background .9s ease, opacity .9s ease; pointer-events:none; }
.tm-tint.tt-violet{  background:#6d5dfc; }
.tm-tint.tt-magenta{ background:#d65ad6; }
.tm-tint.tt-teal{    background:#5ad6e0; }
.tm-tint.tt-indigo{  background:#4b3fd6; }

/* étincelles brèves au changement de slide (petites, cosmos) */
.tm-sparks{ position:absolute; inset:0; z-index:4; pointer-events:none; overflow:hidden; }
.tm-spark{ position:absolute; bottom:14%; width:4px; height:4px; border-radius:50%;
  background:#c4b5fd; box-shadow:0 0 8px #c4b5fd; opacity:0; animation:tm-spark 1.2s ease-out forwards; }
@keyframes tm-spark{ 0%{ opacity:0; transform:translateY(0) scale(.6); } 20%{ opacity:.9; } 100%{ opacity:0; transform:translateY(-130px) scale(1.1); } }

/* scène : zone des cartes (perspective pour le flip 3D) */
.tm-stage{ position:absolute; inset:0; z-index:3; display:flex; align-items:center; justify-content:center; padding:44px 26px 26px; perspective:1200px; }
.tm-card{
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; text-align:center;
  opacity:0; transform-origin:center center; backface-visibility:hidden;
  transition:opacity .5s ease, transform .6s cubic-bezier(.22,1,.36,1);
  will-change:transform,opacity;
}
.tm-card.is-active{ opacity:1; transform:none; }
/* TRANSITIONS VARIÉES (entrée par défaut + sortie .is-out) */
.tm-trans-slide{ transform:translateX(64px) scale(.98); }
.tm-trans-slide.is-out{ opacity:0; transform:translateX(-64px) scale(.98); }
.tm-trans-up{ transform:translateY(66px) scale(.98); }
.tm-trans-up.is-out{ opacity:0; transform:translateY(-48px) scale(.93); }
.tm-trans-zoom{ transform:scale(.62); }
.tm-trans-zoom.is-out{ opacity:0; transform:scale(1.2); }
.tm-trans-flip{ transform:rotateY(82deg); }
.tm-trans-flip.is-out{ opacity:0; transform:rotateY(-82deg); }

/* éléments en cascade (montent l'un après l'autre) */
.tm-card.is-active .tm-anim{ animation:tm-rise .5s cubic-bezier(.22,1,.36,1) both; }
.tm-card.is-active .tm-anim:nth-child(1){ animation-delay:.05s; }
.tm-card.is-active .tm-anim:nth-child(2){ animation-delay:.16s; }
.tm-card.is-active .tm-anim:nth-child(3){ animation-delay:.28s; }
.tm-card.is-active .tm-anim:nth-child(4){ animation-delay:.40s; }
@keyframes tm-rise{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:translateY(0); } }

/* kicker (étiquette en pastille) */
.tm-kicker{
  font-family:'Satoshi',sans-serif; font-weight:700; font-size:.66rem; letter-spacing:.18em; text-transform:uppercase;
  color:#fff; padding:6px 14px; border-radius:999px;
  background:linear-gradient(100deg,rgba(109,93,252,.5),rgba(214,90,214,.5)); border:1px solid rgba(196,181,253,.4);
  box-shadow:0 6px 16px rgba(60,30,120,.4);
}
.tm-kicker.t-ok{   background:linear-gradient(100deg,rgba(84,214,160,.5),rgba(90,214,224,.45)); border-color:rgba(84,214,160,.5); }
.tm-kicker.t-warn{ background:linear-gradient(100deg,rgba(244,99,170,.55),rgba(214,90,214,.45)); border-color:rgba(244,99,170,.5); }

/* gros mot-clé central, qui pulse */
.tm-motfort{
  font-family:'Clash Display',sans-serif; font-weight:600; line-height:1.04;
  font-size:clamp(1.6rem,5vw,3rem); letter-spacing:-.01em; max-width:92%; overflow-wrap:break-word; text-wrap:balance;
  /* palette cosmos verrouillée : blanc → violet → cyan (AUCUN ton chaud en grand titre) */
  background:linear-gradient(110deg,#ffffff 0%,#e9ddff 34%,#c4b5fd 66%,#5ad6e0 115%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
  filter:drop-shadow(0 8px 26px rgba(124,58,237,.45));
}
.tm-card.is-active .tm-motfort{ animation:tm-rise .5s cubic-bezier(.22,1,.36,1) both, tm-pulse 3.4s ease-in-out 1s infinite; }
@keyframes tm-pulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.035); } }
.tm-motfort.t-ok{   background:linear-gradient(110deg,#ffffff,#c9f6e4 45%,#54d6a0 110%); -webkit-background-clip:text; background-clip:text; }
.tm-motfort.t-warn{ background:linear-gradient(110deg,#ffffff,#ffd4ea 45%,#f06ab0 110%); -webkit-background-clip:text; background-clip:text; }

/* sous-phrase courte */
.tm-sub{
  font-family:'Satoshi',sans-serif; font-weight:500; font-size:clamp(.95rem,2.4vw,1.18rem);
  color:#d9cffb; max-width:34ch; line-height:1.4;
}

/* rangée de chips (plusieurs éléments) */
.tm-chips{ display:flex; flex-wrap:wrap; gap:9px; justify-content:center; }
.tm-chip{
  font-family:'Satoshi',sans-serif; font-weight:700; font-size:.92rem; color:#fff;
  padding:9px 15px; border-radius:13px; border:1.5px solid;
  background:rgba(167,139,250,.16); border-color:rgba(167,139,250,.55);
  /* CACHÉE au départ : révélée PILE quand le compagnon nomme le mot (déclencheur [show:ID]) */
  opacity:0; transform:translateY(12px) scale(.88);
  transition:opacity .42s ease, transform .5s cubic-bezier(.34,1.7,.5,1);
}
.tm-chip.tm-shown{ opacity:1; transform:translateY(0) scale(1); }
.tm-chip.t-ok{   background:rgba(84,214,160,.16);  border-color:rgba(84,214,160,.6); }
.tm-chip.t-warn{ background:rgba(244,99,170,.16); border-color:rgba(244,99,170,.6); }
.tm-chip.t-info{ background:rgba(90,214,224,.16); border-color:rgba(90,214,224,.6); }
.tm-chip.t-ex{   background:rgba(245,181,68,.15); border-color:rgba(245,181,68,.55); }

/* titre moyen (formats points / flow) */
.tm-title{
  font-family:'Clash Display',sans-serif; font-weight:600; line-height:1.08;
  font-size:clamp(1.25rem,3.6vw,1.9rem); letter-spacing:-.01em; max-width:90%;
  background:linear-gradient(110deg,#ffffff,#c4b5fd 68%,#5ad6e0 120%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}

/* ── FORMAT POINTS : liste détaillée (idée + exemple), chaque point révélé au fil de la parole ── */
.tm-points{ display:flex; flex-direction:column; gap:9px; width:100%; max-width:540px; }
.tm-pt{ display:flex; gap:11px; align-items:flex-start; text-align:left; padding:9px 13px; border-radius:14px; border:1.5px solid;
  background:rgba(167,139,250,.12); border-color:rgba(167,139,250,.5);
  opacity:0; transform:translateY(14px) scale(.96); transition:opacity .42s ease, transform .5s cubic-bezier(.34,1.6,.5,1); }
.tm-pt.tm-shown{ opacity:1; transform:none; }
.tm-pt-num{ flex:0 0 auto; width:24px; height:24px; border-radius:50%; display:grid; place-items:center;
  font-family:'Clash Display',sans-serif; font-weight:600; font-size:.82rem; color:#fff;
  background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta)); }
.tm-pt-t{ font-family:'Satoshi',sans-serif; font-weight:700; font-size:1rem; color:#efeaff; line-height:1.25; }
.tm-pt-ex{ font-family:'Satoshi',sans-serif; font-weight:500; font-size:.84rem; color:#c2b6e8; margin-top:2px; }
.tm-pt.t-info{ border-color:rgba(90,214,224,.55); background:rgba(90,214,224,.10); }  .tm-pt.t-info .tm-pt-num{ background:linear-gradient(135deg,#3aa9c0,#5ad6e0); }
.tm-pt.t-ok{   border-color:rgba(84,214,160,.55); background:rgba(84,214,160,.10); }  .tm-pt.t-ok .tm-pt-num{ background:linear-gradient(135deg,#2bbf86,#54d6a0); }
.tm-pt.t-warn{ border-color:rgba(244,99,170,.55); background:rgba(244,99,170,.10); }  .tm-pt.t-warn .tm-pt-num{ background:linear-gradient(135deg,#d6457c,#f06ab0); }
.tm-pt.t-ex{   border-color:rgba(245,181,68,.5);  background:rgba(245,181,68,.10); }  .tm-pt.t-ex .tm-pt-num{ background:linear-gradient(135deg,#d99a1e,#f5b544); }

/* ── FORMAT FLOW : cases reliées par des flèches qui se tracent une par une ── */
.tm-flow{ display:flex; flex-direction:column; align-items:center; gap:0; max-width:90%; }
.tm-fitem{ display:flex; flex-direction:column; align-items:center; gap:0;
  opacity:0; transform:translateY(16px) scale(.94); transition:opacity .42s ease, transform .5s cubic-bezier(.34,1.6,.5,1); }
.tm-fitem.tm-shown{ opacity:1; transform:none; }
.tm-farrow{ width:2px; height:18px; background:linear-gradient(var(--cmp-violet-bright),rgba(196,181,253,.1));
  transform:scaleY(0); transform-origin:top; transition:transform .42s ease .12s; }
.tm-fitem.tm-shown .tm-farrow{ transform:scaleY(1); }
.tm-box{ padding:8px 16px; border-radius:13px; border:1.5px solid rgba(167,139,250,.55); background:rgba(167,139,250,.14); text-align:center; }
.tm-box-t{ font-family:'Satoshi',sans-serif; font-weight:700; font-size:.98rem; color:#efeaff; }
.tm-box-ex{ font-family:'Satoshi',sans-serif; font-weight:500; font-size:.8rem; color:#c2b6e8; margin-top:1px; }
.tm-box.t-info{ border-color:rgba(90,214,224,.6);  background:rgba(90,214,224,.12); }
.tm-box.t-ok{   border-color:rgba(84,214,160,.6);  background:rgba(84,214,160,.12); }
.tm-box.t-warn{ border-color:rgba(244,99,170,.6); background:rgba(244,99,170,.12); }
.tm-box.t-ex{   border-color:rgba(245,181,68,.55); background:rgba(245,181,68,.12); }

/* Surlignages DANS la scène (fond sombre) : texte TOUJOURS blanc, surlignage = soulignage coloré
   (les couleurs sombres de la bulle blanche seraient illisibles ici). */
.tm-scene .hl{ color:#fff !important; background:transparent !important; border-radius:3px; padding:0 1px;
  box-shadow:inset 0 -0.32em 0 rgba(167,139,250,.40); }
.tm-scene .hl-key{  box-shadow:inset 0 -0.32em 0 rgba(167,139,250,.45); }
.tm-scene .hl-ok{   box-shadow:inset 0 -0.32em 0 rgba(84,214,160,.45); }
.tm-scene .hl-warn{ box-shadow:inset 0 -0.32em 0 rgba(244,99,170,.45); }
.tm-scene .hl-info{ box-shadow:inset 0 -0.32em 0 rgba(90,214,224,.45); }
.tm-scene .hl-ex{   box-shadow:inset 0 -0.32em 0 rgba(245,181,68,.45); }
/* textes du tableau bien blancs pour la lisibilité sur fond cosmos */
.tm-pt-t, .tm-box-t{ color:#ffffff; }
.tm-pt-ex, .tm-box-ex{ color:#d7cdf2; }

@media (prefers-reduced-motion:reduce){
  .tm-zoom,.tm-blob,.tm-card.is-active .tm-motfort,.tm-spark{ animation:none !important; }
}

/* MINI QUIZ affiché DANS la carte (question + propositions cliquables + feedback) */
.cmp-quiz{ position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; gap:10px; padding:16px 14px 54px; overflow-y:auto; }
.cmp-quiz-q{ font-family:inherit; font-weight:700; font-size:1.2rem; color:#241046; text-align:center; margin-bottom:12px; line-height:1.35; letter-spacing:normal; text-transform:none; }
.cmp-quiz-opts{ display:flex; flex-direction:column; gap:9px; }
.cmp-qopt{ font-family:inherit; text-align:left; padding:14px 18px; border-radius:13px; cursor:pointer; font-size:1rem; font-weight:500; color:#3a2a6e; background:rgba(167,139,250,.1); border:1.5px solid rgba(167,139,250,.4); transition:background .15s, border-color .15s, transform .12s; text-transform:none; letter-spacing:normal; }
.cmp-qopt:hover:not(:disabled){ background:rgba(167,139,250,.2); border-color:rgba(167,139,250,.7); }
.cmp-qopt:active:not(:disabled){ transform:scale(.99); }
.cmp-qopt:disabled{ cursor:default; }
.cmp-qopt.is-correct{ background:rgba(84,214,160,.22); border-color:#54d6a0; color:#1c7d57; }
.cmp-qopt.is-wrong{ background:rgba(240,106,176,.2); border-color:#e06aa8; color:#a8327a; }
.cmp-quiz-fb{ margin-top:2px; padding:10px 14px; border-radius:12px; font-size:.88rem; font-weight:600; line-height:1.35; }
.cmp-quiz-fb.ok{ background:rgba(84,214,160,.16); color:#1c7d57; }
.cmp-quiz-fb.no{ background:rgba(240,106,176,.15); color:#a8327a; }

/* Le prof-alien au pied du tableau */
.cmp-prof{
  position:absolute; left:-4px; bottom:-14px; width:86px; z-index:4;
  animation:cmpFloat 3.6s ease-in-out infinite; pointer-events:none;
}
.cmp-prof svg{ width:100%; height:auto; overflow:visible; filter:drop-shadow(0 8px 16px rgba(109,93,252,.45)); }

/* Papillon qui s'envole (récompense) */
.cmp-fly{
  position:absolute; width:22px; height:22px; z-index:6; pointer-events:none;
  animation:cmpFlyUp 1.1s ease-out forwards;
}
.cmp-fly svg{ width:100%; height:100%; }
@keyframes cmpFlyUp{
  0%{ opacity:0; transform:translateY(0) scale(.6); }
  20%{ opacity:1; }
  100%{ opacity:0; transform:translateY(-90px) translateX(18px) scale(1.1) rotate(12deg); }
}

/* ── Bulle de parole (détail du nœud) ── */
.cmp-speech{
  position:relative; width:100%; max-width:var(--cmp-wb-w, 1100px);
  display:flex; gap:clamp(12px,1.2vw,18px); align-items:flex-start;
  background:#fff; color:#241046; border-radius:18px;
  padding:clamp(12px,1.1vw,18px) clamp(16px,1.5vw,24px); box-shadow:0 14px 36px rgba(20,8,50,.32);
}
.cmp-speech::before{
  content:""; position:absolute; top:-10px; left:42px;
  border:10px solid transparent; border-bottom-color:#fff; border-top:0;
}
.cmp-speech-head{ flex:0 0 auto; width:clamp(36px,2.6vw,48px); height:clamp(36px,2.6vw,48px); }
.cmp-speech-head svg{ width:100%; height:100%; }
/* Seul le TEXTE défile (l'avatar reste fixe) : on ne coupe jamais le bas de l'écriture. */
.cmp-speech-txt{
  margin:0; flex:1 1 auto; min-width:0;
  font-size:clamp(0.95rem,1.15vw,1.22rem); line-height:1.42; font-weight:500; padding-top:1px;
  max-height:32vh; overflow-y:auto; scrollbar-width:thin;
}

/* ── Mini-exercice ── */
.cmp-ex{
  width:100%; max-width:720px;
  background:rgba(255,255,255,.05); border:1px solid var(--cmp-stroke);
  border-radius:18px; padding:16px 18px; backdrop-filter:blur(10px);
  display:flex; flex-direction:column; gap:12px;
}
.cmp-ex[hidden]{ display:none; }
.cmp-ex-tag{
  font-size:.7rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--cmp-gold);
}
.cmp-ex-q{ margin:0; color:var(--cmp-ink); font-size:1rem; line-height:1.45; font-weight:600; }
.cmp-ex-opts{ display:flex; flex-direction:column; gap:8px; }
.cmp-ex-opt{
  text-align:left; cursor:pointer; font-family:inherit; font-size:.95rem; font-weight:500;
  color:var(--cmp-ink); background:var(--cmp-surface); border:1.5px solid var(--cmp-stroke);
  border-radius:13px; padding:12px 15px; transition:border-color .2s, background .2s, transform .15s;
}
.cmp-ex-opt:hover:not(:disabled){ border-color:var(--cmp-violet); transform:translateX(2px); }
.cmp-ex-opt:disabled{ cursor:default; }
.cmp-ex-opt.is-correct{ background:rgba(84,214,160,.16); border-color:rgba(84,214,160,.7); color:#5dcaa5; }
.cmp-ex-opt.is-wrong{ background:rgba(240,106,176,.14); border-color:rgba(240,106,176,.65); color:#ff9ad0; }
.cmp-ex-fb{
  border-radius:13px; padding:12px 15px; font-size:.94rem; line-height:1.5; font-weight:500;
}
.cmp-ex-fb[hidden]{ display:none; }
.cmp-ex-fb.ok{  background:rgba(84,214,160,.12); border:1px solid rgba(84,214,160,.4); color:#cdeede; }
.cmp-ex-fb.no{  background:rgba(240,106,176,.10); border:1px solid rgba(240,106,176,.4); color:#ffd0e8; }

/* ── Réponse à une question (« Coupe-moi ») ── */
.cmp-answer{
  width:100%; max-width:720px;
  background:rgba(167,139,250,.10); border:1px solid rgba(167,139,250,.35);
  border-radius:18px; padding:15px 18px;
  display:flex; flex-direction:column; gap:10px; align-items:flex-start;
}
.cmp-answer[hidden]{ display:none; }
.cmp-answer-tag{
  font-size:.7rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--cmp-violet-bright);
}
.cmp-answer-txt{ margin:0; color:var(--cmp-ink); font-size:.96rem; line-height:1.55; }
.cmp-answer-resume{
  align-self:flex-end; border:1px solid var(--cmp-stroke); cursor:pointer;
  background:var(--cmp-surface); color:var(--cmp-ink);
  padding:9px 16px; border-radius:12px; font-family:inherit; font-weight:600; font-size:.9rem;
  transition:background .2s;
}
.cmp-answer-resume:hover{ background:rgba(255,255,255,.10); }

/* ── Dock : Précédent · question · Suivant ── */
.cmp-dock{
  flex:0 0 auto; display:flex; align-items:center; gap:12px; position:relative; overflow:hidden;
  /* place à GAUCHE pour le bouton bascule du dock (38px, discret) → plus de superposition */
  padding:12px 22px calc(12px + env(safe-area-inset-bottom)) 68px;
  background:linear-gradient(105deg,#0d0220 0%,#120535 15%,#0a1540 30%,#071230 45%,#160830 60%,#0d0525 75%,#120318 100%);
  backdrop-filter:blur(24px) saturate(2);
  box-shadow:0 -3px 30px rgba(100,50,255,.2), 0 1px 0 rgba(120,80,255,.12) inset;
}
/* aurore animée (même que la barre du haut) */
.cmp-dock::before{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(90deg, rgba(99,102,241,.18) 0%, rgba(139,92,246,.14) 15%, rgba(217,70,239,.16) 28%, rgba(236,72,153,.18) 40%, rgba(251,113,133,.12) 52%, rgba(251,191,36,.10) 62%, rgba(52,211,153,.13) 75%, rgba(56,189,248,.15) 87%, rgba(99,102,241,.18) 100%);
  background-size:300% 100%; animation:hud-aurora 8s ease-in-out infinite;
}
.cmp-dock > *{ position:relative; z-index:1; }   /* contenu au-dessus de l'aurore */
.cmp-dock-icon{
  width:46px; height:46px; flex:0 0 auto; border-radius:13px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke); color:var(--cmp-ink);
  transition:background .2s, opacity .2s;
}
.cmp-dock-icon:hover{ background:rgba(255,255,255,.10); }
.cmp-dock-icon:disabled{ opacity:.35; cursor:default; }
.cmp-ask-row{ flex:1 1 auto; min-width:0; display:flex; gap:8px; }
.cmp-ask-row.is-hidden{ display:none; }
.cmp-ask-input{
  flex:1 1 auto; min-width:0;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke);
  border-radius:13px; padding:12px 14px; color:var(--cmp-ink);
  font-family:inherit; font-size:.92rem;
}
.cmp-ask-input::placeholder{ color:var(--cmp-muted-2); }
.cmp-ask-input:focus{ outline:none; border-color:var(--cmp-violet); box-shadow:0 0 0 3px rgba(167,139,250,.2); }
/* Mode PROF : champ de modification agrandi + texte plus grand */
body.cmp-prof-mode .cmp-ask-input{ padding:16px 20px; font-size:1.02rem; border-radius:15px; }
body.cmp-prof-mode .cmp-ask-input::placeholder{ color:rgba(198,190,228,.85); }
body.cmp-prof-mode .cmp-ask-send{ width:56px; border-radius:15px; }
.cmp-ask-send{
  flex:0 0 auto; width:46px; border-radius:13px; cursor:pointer; border:none;
  display:flex; align-items:center; justify-content:center; color:#fff;
  background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta));
  transition:transform .2s, box-shadow .2s;
}
.cmp-ask-send:hover{ transform:translateY(-2px); box-shadow:0 8px 18px rgba(109,93,252,.5); }
/* Trombone « donner un document à l'Oubli » — visible surtout en entraînement */
.cmp-ask-attach{
  flex:0 0 auto; width:46px; border-radius:13px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:#cbb9ff; background:rgba(124,93,252,0.16);
  border:1.5px solid rgba(167,139,250,0.45);
  transition:transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.cmp-ask-attach:hover{
  transform:translateY(-2px); color:#fff;
  background:rgba(124,93,252,0.30); border-color:rgba(167,139,250,0.9);
  box-shadow:0 8px 18px rgba(109,93,252,.4);
}
.cmp-next{
  flex:0 0 auto; border:none; cursor:pointer; white-space:nowrap;
  font-family:'Clash Display','Satoshi',sans-serif; font-weight:600; font-size:.98rem;
  color:#fff; padding:13px 20px; border-radius:14px;
  background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta));
  box-shadow:0 10px 24px rgba(109,93,252,.45);
  transition:transform .2s, box-shadow .2s, background .3s, opacity .2s;
}
.cmp-next:hover:not(:disabled){ transform:translateY(-2px); }
.cmp-next:disabled{ opacity:.5; cursor:default; }
/* dernière carte : affronter le monstre */
.cmp-next.is-fight{
  background:linear-gradient(135deg,#f5b544,#d65ad6);
  box-shadow:0 12px 30px rgba(214,90,214,.5);
}
/* Contrôles (son, répéter, pause, ◀, ▶) DANS la barre du bas (à la place du gros bouton) */
.cmp-wb-ctrl.cmp-dock-ctrl{ position:static; flex:0 0 auto; gap:8px; z-index:auto; }
.cmp-dock-ctrl .cmp-wb-btn{ width:44px; height:44px; border-radius:13px; }
.cmp-dock-ctrl .cmp-wb-btn svg{ width:17px; height:17px; }
/* la flèche ▶ (Suivant) = action principale, mise en avant en dégradé violet */
.cmp-dock-ctrl .cmp-dock-next{ background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta)); border-color:transparent; box-shadow:0 8px 20px rgba(109,93,252,.45); }
.cmp-dock-ctrl .cmp-dock-next:hover:not(:disabled){ filter:brightness(1.1); transform:translateY(-1px); }
.cmp-dock-ctrl .cmp-dock-next:disabled{ opacity:.4; }
.cmp-dock-ctrl .cmp-dock-next.is-fight{ background:linear-gradient(135deg,#f5b544,#d65ad6); box-shadow:0 10px 26px rgba(214,90,214,.5); }

/* État « le prof lit ton diapo… » */
.cmp-classloading{
  display:flex; align-items:center; gap:12px; justify-content:center;
  color:var(--cmp-muted); font-size:.98rem; padding:40px 16px; text-align:center;
}

/* ── Responsive ── */
@media (max-width:560px){
  .cmp-stage{ width:210px; height:210px; }
  .cmp-alien--hero{ width:140px; }
  .cmp-bubble--hero{ font-size:1rem; padding:16px 18px; }
  .cmp-welcome-inner{ gap:24px; }
  .cmp-map{ height:262px; }
  .cmp-central{ font-size:.94rem; padding:11px 14px; }
  .cmp-node{ font-size:.8rem; max-width:118px; padding:7px 10px; }
  .cmp-prof{ width:68px; }
  .cmp-dock{ flex-wrap:wrap; }
  .cmp-ask-row{ order:3; flex-basis:100%; }
}

/* ════ Ajouts salle de classe v2 — couleurs, fiche, cage, drag, récompenses ════ */

/* ── Surlignages dans les explications (paragraphe coloré) ── */
.hl{ border-radius:5px; padding:0 3px; font-weight:600; }
.hl-key{  background:rgba(167,139,250,.22); color:#5b3aa6; box-shadow:inset 0 -2px 0 rgba(109,93,252,.35); }
.hl-ok{   background:rgba(84,214,160,.20);  color:#1c7d57; box-shadow:inset 0 -2px 0 rgba(84,214,160,.45); }
.hl-warn{ background:rgba(240,106,176,.20); color:#a8327a; box-shadow:inset 0 -2px 0 rgba(240,106,176,.45); }
.hl-info{ background:rgba(90,214,224,.20);  color:#0e7c8a; box-shadow:inset 0 -2px 0 rgba(90,214,224,.5); }
.hl-ex{   background:rgba(245,181,68,.20);  color:#9a6b06; box-shadow:inset 0 -2px 0 rgba(245,181,68,.5); }
/* mêmes surlignages mais lisibles sur fond sombre (fiche) */
.cmp-fiche-note .hl-key{  background:rgba(167,139,250,.22); color:#d7c8ff; box-shadow:none; }
.cmp-fiche-note .hl-ok{   background:rgba(84,214,160,.18);  color:#9be9c8; box-shadow:none; }
.cmp-fiche-note .hl-warn{ background:rgba(240,106,176,.18); color:#ffbce0; box-shadow:none; }

/* ── Bouton « Ma fiche » + compteur ── */
.cmp-fiche-btn{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke); color:var(--cmp-ink);
  border-radius:12px; padding:7px 11px; font-family:inherit; font-weight:600; font-size:.85rem;
  transition:background .2s, border-color .2s;
}
.cmp-fiche-btn:hover{ background:rgba(255,255,255,.10); border-color:var(--cmp-violet); }
.cmp-fiche-lbl{ white-space:nowrap; }
.cmp-fiche-count{
  min-width:20px; height:20px; padding:0 5px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta)); color:#fff;
  font-size:.72rem; font-weight:700; font-variant-numeric:tabular-nums;
}
.cmp-fiche-count.pop{ animation:cmpPop .4s ease; }

/* ── Barre de progression segmentée ── */
.cmp-progress{
  flex:0 0 auto; display:flex; gap:5px; padding:8px 18px 0;
}
.cmp-progress .cmp-seg{
  flex:1 1 0; height:5px; border-radius:99px; background:rgba(255,255,255,.10);
  transition:background .35s, box-shadow .35s;
}
.cmp-progress .cmp-seg.is-done{ background:linear-gradient(90deg,#54d6a0,#5ad6e0); }
.cmp-progress .cmp-seg.is-current{ background:linear-gradient(90deg,var(--cmp-indigo),var(--cmp-magenta)); box-shadow:0 0 10px rgba(167,139,250,.55); }
/* Aperçu prof : segments cliquables (navigation libre entre toutes les slides) */
.cmp-progress.cmp-prog-clickable{ padding-top:14px; padding-bottom:6px; }
.cmp-progress.cmp-prog-clickable .cmp-seg{ height:8px; cursor:pointer; }
.cmp-progress.cmp-prog-clickable .cmp-seg:hover{ background:rgba(183,164,255,.55); box-shadow:0 0 10px rgba(167,139,250,.6); transform:scaleY(1.25); }
/* Aperçu prof : slide déjà générée (cliquable) vs pas encore prête */
.cmp-progress.cmp-prog-clickable .cmp-seg.is-ready{ cursor:pointer; }
.cmp-progress.cmp-prog-clickable .cmp-seg.is-pending{ cursor:default; opacity:.4; background:rgba(255,255,255,.10); }
.cmp-progress.cmp-prog-clickable .cmp-seg.is-pending:hover{ transform:none; box-shadow:none; background:rgba(255,255,255,.14); }

/* ── HUD cage : alignée à droite + label ── */
.cmp-class-hud{ justify-content:flex-end; gap:10px; }
.cmp-cage-lock{
  position:absolute; bottom:5px; left:50%; transform:translateX(-50%); width:18px; height:18px; z-index:3;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.4));
}
.cmp-cage-lock svg{ width:100%; height:100%; }
.cmp-cage-label{
  font-size:.68rem; font-weight:700; letter-spacing:.04em; color:var(--cmp-muted);
  align-self:center; white-space:nowrap; transition:color .4s;
}
.cmp-cage-label.is-weak{ color:#54d6a0; }
/* lueur violette qui pulse autour de la cage */
.cmp-cage::before{
  content:""; position:absolute; inset:-6px; border-radius:18px; pointer-events:none;
  box-shadow:0 0 16px rgba(167,139,250,.5); animation:cmpCageGlow 2.4s ease-in-out infinite;
}
@keyframes cmpCageGlow{ 0%,100%{ opacity:.4; } 50%{ opacity:.85; } }
/* le Monstre se débat : la cage tressaute */
.cmp-cage.is-struggle{ animation:cmpShake .5s ease; }
@keyframes cmpShake{
  0%,100%{ transform:translate(0,0); }
  20%{ transform:translate(-2px,1px) rotate(-1.5deg); }
  45%{ transform:translate(2px,-1px) rotate(1.5deg); }
  70%{ transform:translate(-1px,2px) rotate(-1deg); }
}
/* Monstre épuisé (raplapla) */
.cmp-cage-monster.is-flop{ opacity:.85; }

/* ── Prof-alien déplaçable (enfant de .cmp-class) ── */
.cmp-class > .cmp-prof{
  /* Au centre de l'espace vide à GAUCHE du tableau (le tableau fait ~720px, centré).
     L'alien traverse vers l'espace vide de DROITE (.is-right) de temps en temps. */
  --cmp-side: max(6px, calc((100% - var(--cmp-wb-w, 1100px)) / 4 - 72px));
  position:absolute; left:var(--cmp-side); top:50%; margin-top:-66px;
  width:144px; z-index:7; cursor:grab; touch-action:none;
  animation:cmpFloat 3.6s ease-in-out infinite;
  transition:left 1.4s cubic-bezier(.5,0,.3,1), top 1.4s cubic-bezier(.5,0,.3,1);   /* glisse vers sa nouvelle place */
}
/* 6 ancrages AUTOUR du tableau (gauche/droite × haut/milieu/bas), dans l'espace vide */
.cmp-class > .cmp-prof.pos-lt{ left:var(--cmp-side); top:18%; }
.cmp-class > .cmp-prof.pos-lm{ left:var(--cmp-side); top:50%; }
.cmp-class > .cmp-prof.pos-lb{ left:var(--cmp-side); top:78%; }
.cmp-class > .cmp-prof.pos-rt{ left:calc(100% - 144px - var(--cmp-side)); top:18%; }
.cmp-class > .cmp-prof.pos-rm{ left:calc(100% - 144px - var(--cmp-side)); top:50%; }
.cmp-class > .cmp-prof.pos-rb{ left:calc(100% - 144px - var(--cmp-side)); top:78%; }
.cmp-class > .cmp-prof.is-dragging{ cursor:grabbing; animation:none; transition:none; }
.cmp-class > .cmp-prof.cmp-rejoice{ animation:cmpRejoice .6s ease; }
@keyframes cmpRejoice{ 0%,100%{ transform:translateY(0) rotate(0); } 30%{ transform:translateY(-14px) rotate(-6deg); } 60%{ transform:translateY(-4px) rotate(5deg); } }

/* ── TRAVERSÉE : comme une fée, l'alien passe d'un espace vide à l'autre. Quand il SURVOLE le
   tableau (milieu du trajet), il RÉTRÉCIT fort pour ne pas cacher l'écran, puis reprend sa taille. ── */
@keyframes cmpFlyCross{
  0%{   transform:translateY(0)    scale(1)   rotate(0); }
  22%{  transform:translateY(-22px) scale(.7)  rotate(-7deg); }
  50%{  transform:translateY(-30px) scale(.4)  rotate(5deg); }   /* tout petit au-dessus du tableau */
  78%{  transform:translateY(-20px) scale(.7)  rotate(7deg); }
  100%{ transform:translateY(0)    scale(1)   rotate(0); }
}
.cmp-class > .cmp-prof.cmp-fly{ animation:cmpFlyCross 1.5s cubic-bezier(.42,0,.4,1); z-index:9; }
.cmp-prof.cmp-fly .cmp-wing-l, .cmp-prof.cmp-fly .cmp-wing-r{ animation-duration:.2s !important; }   /* battement rapide en vol */
@media (prefers-reduced-motion:reduce){ .cmp-class > .cmp-prof.cmp-fly{ animation:none; transition:none; } }

/* ── Récompense : « +X » qui s'envole + étincelles ── */
.cmp-plus{
  position:absolute; z-index:8; pointer-events:none;
  font-family:'Clash Display',sans-serif; font-weight:700; font-size:1rem; color:var(--cmp-gold);
  text-shadow:0 2px 6px rgba(0,0,0,.4); animation:cmpFlyUp 1.1s ease-out forwards;
}
.cmp-spark{ position:absolute; width:7px; height:7px; border-radius:50%; background:var(--cmp-gold); z-index:7; pointer-events:none; animation:cmpSpark .7s ease-out forwards; }
@keyframes cmpSpark{ 0%{ opacity:1; transform:scale(1) translate(0,0); } 100%{ opacity:0; transform:scale(.3) translate(var(--sx,0),var(--sy,0)); } }

/* ── « Coupe-moi » : réflexion (petits points) ── */
.cmp-thinking{ display:flex; gap:5px; padding:4px 0; }
.cmp-thinking[hidden]{ display:none; }
.cmp-thinking span{ width:8px; height:8px; border-radius:50%; background:var(--cmp-violet); animation:cmpDot 1s ease-in-out infinite; }
.cmp-thinking span:nth-child(2){ animation-delay:.15s; }
.cmp-thinking span:nth-child(3){ animation-delay:.3s; }
@keyframes cmpDot{ 0%,100%{ opacity:.3; transform:translateY(0); } 50%{ opacity:1; transform:translateY(-4px); } }

/* ── Panneau « Ma fiche de révision » ── */
.cmp-fiche{
  position:absolute; inset:0; z-index:20;
  display:flex; align-items:flex-end; justify-content:center;
  background:rgba(8,5,20,.55); backdrop-filter:blur(4px);
  animation:cmpFadeIn .25s ease;
}
.cmp-fiche[hidden]{ display:none; }
@keyframes cmpFadeIn{ from{ opacity:0; } to{ opacity:1; } }
.cmp-fiche-card{
  width:100%; max-width:640px; max-height:84%;
  background:linear-gradient(180deg, rgba(27,20,64,.98), rgba(10,6,24,.98));
  border:1px solid var(--cmp-stroke); border-bottom:0;
  border-radius:22px 22px 0 0; padding:20px 20px calc(18px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; gap:14px;
  box-shadow:0 -18px 48px rgba(0,0,0,.5); animation:cmpSheetUp .32s cubic-bezier(.34,1.1,.5,1);
}
@keyframes cmpSheetUp{ from{ transform:translateY(40px); opacity:.6; } to{ transform:translateY(0); opacity:1; } }
.cmp-fiche-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.cmp-fiche-ttl{ font-family:'Clash Display',sans-serif; font-weight:600; font-size:1.2rem; color:var(--cmp-ink); }
.cmp-fiche-sub{ font-size:.84rem; color:var(--cmp-muted-2); margin-top:2px; }
.cmp-fiche-x{
  flex:0 0 auto; width:36px; height:36px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke); color:var(--cmp-ink);
}
.cmp-fiche-x:hover{ background:rgba(255,255,255,.10); }
.cmp-fiche-body{ overflow-y:auto; display:flex; flex-direction:column; gap:16px; padding-right:4px; }
.cmp-fiche-empty{ color:var(--cmp-muted-2); font-size:.92rem; text-align:center; padding:30px 0; }
.cmp-fiche-group-ttl{
  font-family:'Clash Display',sans-serif; font-weight:600; font-size:.96rem; color:var(--cmp-violet-bright);
  margin-bottom:7px; padding-bottom:5px; border-bottom:1px solid var(--cmp-stroke);
}
.cmp-fiche-note{
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke); border-left:3px solid var(--cmp-violet);
  border-radius:12px; padding:11px 14px; margin-bottom:8px;
  color:var(--cmp-ink); font-size:.92rem; line-height:1.55;
}
.cmp-fiche-note-lbl{ display:block; font-weight:700; color:var(--cmp-ink); margin-bottom:5px; font-size:.92rem; }
.cmp-fiche-note--leaf{ border-left-color:#54d6a0; }
.cmp-fiche-note--warn{ border-left-color:#f06ab0; }
/* notes en POINTS faciles à relire */
.cmp-fiche-pts{ margin:0; padding-left:18px; list-style:disc; }
.cmp-fiche-pts li{ margin:4px 0; line-height:1.5; color:var(--cmp-ink); font-size:.9rem; text-align:justify; }
.cmp-fiche-pts li::marker{ color:var(--cmp-violet); }

/* actions de la fiche (imprimer + fermer) */
.cmp-fiche-actions{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.cmp-fiche-print{
  display:inline-flex; align-items:center; gap:7px; cursor:pointer; white-space:nowrap;
  background:linear-gradient(135deg,var(--cmp-indigo),var(--cmp-magenta)); color:#fff; border:none;
  border-radius:12px; padding:9px 14px; font-family:inherit; font-weight:600; font-size:.85rem;
  box-shadow:0 8px 20px rgba(109,93,252,.4); transition:transform .2s, box-shadow .2s;
}
.cmp-fiche-print:hover{ transform:translateY(-2px); box-shadow:0 12px 26px rgba(214,90,214,.5); }
@media (max-width:560px){
  .cmp-fiche-print span{ display:none; }   /* garde juste l'icône sur petit écran */
  .cmp-fiche-print{ padding:9px 11px; }
}

/* ── Fiche anti-sèche : accroche + points essentiel/détail ── */
.cmp-fiche-acc{
  color:var(--cmp-violet-bright); font-size:.92rem; font-style:italic; line-height:1.5;
  background:rgba(167,139,250,.08); border:1px solid var(--cmp-stroke);
  border-radius:12px; padding:11px 14px; margin-bottom:4px;
}
.cmp-fp{
  background:var(--cmp-surface); border:1px solid var(--cmp-stroke); border-left:3px solid var(--cmp-violet);
  border-radius:12px; margin-bottom:8px; overflow:hidden;
}
.cmp-fp--leaf{ border-left-color:#54d6a0; }
.cmp-fp--warn{ border-left-color:#f06ab0; }
.cmp-fp.is-prio{ border-left-color:#f06ab0; background:rgba(240,106,176,.07); }
.cmp-fp-ess{
  width:100%; display:flex; align-items:center; gap:8px; cursor:pointer;
  background:none; border:none; text-align:left; font-family:inherit;
  color:var(--cmp-ink); font-size:.94rem; font-weight:600; line-height:1.5;
  padding:11px 13px;
}
.cmp-fp-txt{ flex:1 1 auto; text-align:justify; }
.cmp-fp-caret{ flex:0 0 auto; color:var(--cmp-muted-2); transition:transform .25s; }
.cmp-fp.is-open .cmp-fp-caret{ transform:rotate(180deg); }
.cmp-fp-flag{
  flex:0 0 auto; font-size:.62rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  color:#fff; background:#f06ab0; border-radius:5px; padding:2px 6px;
}
.cmp-fp-detail{
  padding:0 13px 12px; color:var(--cmp-muted); font-size:.9rem; line-height:1.55; font-weight:400;
  text-align:justify;
}
.cmp-fp-detail[hidden]{ display:none; }

/* Compteur parcours : nombre en blanc */
#screen-quest-path #qp-coins-hud{ color:#fff !important; }

/* ════════════════════════════════════════════════════════════════
   SCÈNE D'INTRO CINÉMATIQUE (#screen-intro-story) — une seule fois
   ════════════════════════════════════════════════════════════════ */
#screen-intro-story{
  overflow:hidden; padding:0;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(168,120,255,.42), transparent 62%),
    radial-gradient(70% 60% at 18% 14%, rgba(109,93,252,.30), transparent 60%),
    radial-gradient(70% 60% at 84% 86%, rgba(214,90,214,.26), transparent 60%),
    radial-gradient(140% 120% at 50% 0%, #2a1f55, #160e38 78%);
  display:flex; align-items:center; justify-content:center;
}
#screen-intro-story::after{   /* vignettage premium (doux, pas noir) */
  content:''; position:absolute; inset:0; pointer-events:none; z-index:3;
  background:radial-gradient(125% 105% at 50% 45%, transparent 64%, rgba(14,8,34,.48) 100%);
}
.ih-stars{ position:absolute; inset:0; z-index:0; pointer-events:none; }
.ih-star{ position:absolute; border-radius:50%; background:#fff; }
@keyframes ih-tw{ 0%,100%{ opacity:.25; transform:scale(.8); } 50%{ opacity:1; transform:scale(1.25); } }
.ih-neb{ position:absolute; border-radius:50%; filter:blur(70px); opacity:.30; z-index:0; pointer-events:none; }
.ih-neb-1{ width:42vw; height:42vw; background:#6d5dfc; top:-8%; left:-6%; animation:ih-drift 22s ease-in-out infinite; }
.ih-neb-2{ width:40vw; height:40vw; background:#d65ad6; bottom:-10%; right:-8%; animation:ih-drift 27s ease-in-out infinite reverse; }
@keyframes ih-drift{ 0%,100%{ transform:translate(0,0) scale(1); } 50%{ transform:translate(6%,5%) scale(1.12); } }

/* Même design que le bouton "Se connecter" (.game-btn), juste replacé/redimensionne pour le coin haut droit. */
.ih-skip{
  position:absolute; top:20px; right:24px; z-index:5;
  min-width:0; padding:11px 22px; font-size:.78rem; letter-spacing:.14em; gap:9px;
}
.ih-skip-ic{ width:16px; height:16px; transition:transform .28s cubic-bezier(.22,1,.36,1); }
.ih-skip:hover .ih-skip-ic{ transform:translateX(3px); }

.ih-stage{ position:relative; z-index:2; width:100%; max-width:min(1200px,92vw); padding:clamp(24px,2.4vw,44px);
  display:flex; flex-direction:column; align-items:center; gap:clamp(24px,2.6vw,46px); }
.ih-chars{ display:flex; align-items:flex-end; justify-content:center; gap:clamp(20px,8vw,130px); }
.ih-char{ position:relative; display:flex; flex-direction:column; align-items:center; gap:6px;
  perspective:760px;
  transition:transform .55s cubic-bezier(.34,1.3,.5,1), filter .55s ease, opacity .55s ease; }
.ih-char.is-speaking{ transform:scale(1.05); filter:none; opacity:1; z-index:2; }
.ih-char:not(.is-speaking){ transform:scale(.86); filter:brightness(.62) saturate(.55); opacity:.7; }
.ih-aura{ position:absolute; top:18%; left:50%; width:150%; height:150%; transform:translate(-50%,-30%);
  border-radius:50%; filter:blur(34px); z-index:-1; pointer-events:none; }
.ih-aura-v{ background:none; }
.ih-aura-m{ background:none; }
.ih-char-svg{ width:clamp(230px,29vw,500px); height:auto; display:block;
  filter:drop-shadow(0 18px 34px rgba(60,30,120,.5)); animation:ih-bob1 4.4s ease-in-out infinite; }
#ih-oubli .ih-char-svg{ animation:ih-bob2 5s ease-in-out infinite; }
.ih-char.is-speaking .ih-char-svg{ animation-duration:2.6s; }   /* le locuteur s'anime plus */
@keyframes ih-bob1{ 0%,100%{ transform:translateY(0) rotate(0); } 50%{ transform:translateY(-12px) rotate(-1.5deg); } }
@keyframes ih-bob2{ 0%,100%{ transform:translateY(0) rotate(0); } 50%{ transform:translateY(-9px) rotate(1.5deg); } }
/* Tour sur soi-meme (tonneau 360) quand le personnage prend la parole */
.ih-char-svg.ih-spin{ animation:ih-spin 1.15s cubic-bezier(.34,.15,.3,1) !important; transform-style:preserve-3d; }
@keyframes ih-spin{ 0%{ transform:translateY(-5px) rotateY(0); } 100%{ transform:translateY(-5px) rotateY(360deg); } }
/* L'Oubli absent au debut : retire du decor (le Gardien se centre tout seul) */
.ih-char.ih-absent{ display:none !important; }
/* Son arrivee quand il prend la parole pour la 1re fois */
.ih-char.ih-appear .ih-char-svg{ animation:ih-appear .78s cubic-bezier(.34,1.45,.5,1) both !important; }
@keyframes ih-appear{ 0%{ opacity:0; transform:translateY(34px) scale(.35); } 55%{ opacity:1; } 100%{ opacity:1; transform:translateY(0) scale(1); } }
/* Entrée cinématique du Gardien (1re intro) : il arrive de TRÈS loin et grossit, puis parle */
.ih-char.ih-arrive .ih-char-svg{ animation:ih-arrive 2.6s cubic-bezier(.22,.7,.3,1) both !important; }
@keyframes ih-arrive{
  0%   { opacity:0;  transform:translateY(-4px) scale(.03); filter:blur(2.4px) brightness(1.5); }
  14%  { opacity:.6; }
  80%  { opacity:1;  transform:translateY(0) scale(1.09);   filter:blur(0) brightness(1.05); } /* il déboule un peu trop vite */
  90%  { transform:translateY(2px) scale(.96); }                                               /* il se rattrape, essoufflé */
  100% { opacity:1;  transform:translateY(0) scale(1);      filter:blur(0) brightness(1); }
}
/* Petit halètement quand il vient d'arriver (sa 1re réplique : « Ouf... pfiou... ») */
.ih-char.ih-pant .ih-char-svg{ animation:ih-pant .5s ease-in-out 3 !important; }
@keyframes ih-pant{ 0%,100%{ transform:translateY(0) scale(1); } 50%{ transform:translateY(-3px) scale(1.03); } }
.ih-name, .ih-role{ transition:opacity .55s ease; }
@media (prefers-reduced-motion:reduce){ .ih-char.ih-arrive .ih-char-svg{ animation:none !important; } }
.ih-name{ font-family:'Clash Display',sans-serif; font-weight:600; font-size:clamp(1rem,1.3vw,1.4rem); color:#fff; }
.ih-role{ font-family:'Satoshi',sans-serif; font-weight:500; font-size:clamp(.78rem,1vw,1.05rem); color:#b3a9d6; }

.ih-bubble{ position:relative; width:100%; max-width:min(1080px,86vw); display:flex; gap:clamp(15px,1.4vw,24px); align-items:flex-start;
  padding:clamp(21px,1.8vw,32px) clamp(27px,2.4vw,44px); border-radius:24px; min-height:96px;
  backdrop-filter:blur(12px) saturate(1.15); -webkit-backdrop-filter:blur(12px) saturate(1.15);
  box-shadow:0 28px 74px rgba(10,4,30,.55), 0 8px 22px rgba(10,4,30,.32), inset 0 1px 0 rgba(255,255,255,.55);
  transition:background .4s, color .4s, border-color .4s;
  animation:ih-bubble-float 6s ease-in-out infinite; will-change:transform; }
/* halo lumineux derriere la bulle (premium) */
.ih-bubble::after{ content:''; position:absolute; inset:-3px; border-radius:27px; z-index:-1;
  filter:blur(24px); opacity:.6; transition:background .4s; pointer-events:none; }
.ih-bubble.ih-from-gardien{ background:linear-gradient(157deg,#ffffff 0%,#f3efff 100%); color:#241046;
  border:1px solid rgba(167,139,250,.4); }
.ih-bubble.ih-from-gardien::after{ background:radial-gradient(62% 85% at 28% -10%, rgba(124,93,252,.6), transparent 70%); }
.ih-bubble.ih-from-oubli{ background:linear-gradient(160deg,#2c2160,#160e2f); color:#ece7ff;
  border:1px solid rgba(167,139,250,.3); }
.ih-bubble.ih-from-oubli::after{ background:radial-gradient(62% 85% at 72% -10%, rgba(214,90,214,.5), transparent 70%); }
/* leger flottement continu + petit pop a chaque replique */
@keyframes ih-bubble-float{ 0%,100%{ transform:translateY(0) rotate(-.12deg); } 50%{ transform:translateY(-7px) rotate(.12deg); } }
.ih-bubble.ih-pop{ animation:ih-bubble-pop .52s cubic-bezier(.34,1.5,.5,1); }
@keyframes ih-bubble-pop{ 0%{ transform:translateY(7px) scale(.975); } 60%{ transform:translateY(-2px) scale(1.008); } 100%{ transform:translateY(0) scale(1); } }
.ih-bubble::before{ content:''; position:absolute; top:-12px; width:0; height:0; border:12px solid transparent; transition:left .35s, right .35s; }
.ih-bubble.ih-from-gardien::before{ left:40px; border-bottom-color:#fff; }
.ih-bubble.ih-from-oubli::before{ right:40px; border-bottom-color:#2c2160; }
.ih-bubble-av{ flex:0 0 auto; width:clamp(44px,3.4vw,62px); height:clamp(44px,3.4vw,62px); border-radius:50%; display:block;
  background:rgba(167,139,250,.18); box-shadow:0 0 0 2px rgba(167,139,250,.3), 0 4px 12px rgba(60,30,120,.25); }
.ih-bubble.ih-from-oubli .ih-bubble-av{ background:rgba(214,90,214,.2); box-shadow:0 0 0 2px rgba(214,90,214,.32), 0 4px 12px rgba(80,20,80,.3); }
.ih-bubble-av svg{ width:100%; height:100%; }
.ih-bubble-name{ font-family:'Clash Display',sans-serif; font-weight:600; font-size:clamp(.84rem,1vw,1.08rem); margin-bottom:4px; opacity:.9; letter-spacing:.02em; }
.ih-bubble-txt{ font-family:'Satoshi',sans-serif; font-weight:500; font-size:clamp(1.08rem,1.45vw,1.5rem); line-height:1.5; min-height:1.4em; }
.ih-bubble-txt .ih-k{ color:#6d5dfc; font-weight:800; }
.ih-bubble.ih-from-oubli .ih-bubble-txt .ih-k{ color:#c4b5fd; }
.ih-bubble-txt .ih-w{ color:#d6457c; font-weight:800; }
.ih-bubble.ih-from-oubli .ih-bubble-txt .ih-w{ color:#ff9ecb; }
.ih-cursor{ display:inline-block; width:2px; height:1.05em; background:currentColor; margin-left:1px;
  vertical-align:-2px; animation:ih-blink .9s steps(1) infinite; }
@keyframes ih-blink{ 0%,50%{ opacity:1; } 51%,100%{ opacity:0; } }

.ih-nav{ display:flex; justify-content:center; }
.ih-next{ font-family:'Clash Display','Satoshi',sans-serif; font-weight:600; font-size:1rem; color:#fff;
  cursor:pointer; border:none; padding:14px 30px; border-radius:14px;
  background:linear-gradient(135deg,#6d5dfc,#d65ad6); box-shadow:0 12px 30px rgba(109,93,252,.5);
  transition:transform .18s, box-shadow .18s, filter .18s; }
.ih-next:hover{ transform:translateY(-2px); filter:brightness(1.08); }
@media (max-width:560px){ .ih-chars{ gap:14px; } .ih-bubble-txt{ font-size:.98rem; } }
@media (prefers-reduced-motion:reduce){ .ih-star,.ih-neb,.ih-char-svg{ animation:none !important; } }

/* ── Intro : effets qui appuient les propos (étincelles, étoiles filantes, aura, secousse) ── */
.ih-char.is-speaking .ih-aura{ animation:ih-aura-pulse 2.4s ease-in-out infinite; }
@keyframes ih-aura-pulse{ 0%,100%{ opacity:.85; transform:translate(-50%,-30%) scale(1); } 50%{ opacity:1; transform:translate(-50%,-30%) scale(1.12); } }
.ih-sparkle{ position:absolute; width:7px; height:7px; border-radius:50%; pointer-events:none; z-index:3;
  opacity:0; animation:ih-spark 1.5s ease-out forwards; }
.ih-sp-gardien{ background:#ffe6a8; box-shadow:0 0 9px 2px rgba(245,181,68,.9); }
.ih-sp-oubli{   background:#f0b6f0; box-shadow:0 0 9px 2px rgba(214,90,214,.85); }
@keyframes ih-spark{ 0%{ opacity:0; transform:translate(0,0) scale(.4); } 18%{ opacity:1; } 100%{ opacity:0; transform:translate(var(--dx,0), -54px) scale(1.1); } }
.ih-shoot{ position:absolute; width:120px; height:2px; border-radius:2px; pointer-events:none; z-index:1;
  background:linear-gradient(90deg, transparent, #fff, rgba(196,181,253,.9), transparent);
  transform:rotate(18deg); opacity:0; animation:ih-shoot 1.2s ease-out forwards; }
@keyframes ih-shoot{ 0%{ opacity:0; transform:rotate(18deg) translateX(-40px); } 12%{ opacity:1; } 100%{ opacity:0; transform:rotate(18deg) translateX(280px); } }
.ih-char-svg.ih-shake{ animation:ih-shake .52s ease; }
@keyframes ih-shake{ 0%,100%{ transform:translateX(0) rotate(0); } 18%{ transform:translateX(-6px) rotate(-2.5deg); } 38%{ transform:translateX(6px) rotate(2.5deg); } 58%{ transform:translateX(-4px); } 78%{ transform:translateX(4px); } }
@media (prefers-reduced-motion:reduce){ .ih-sparkle,.ih-shoot,.ih-char-svg.ih-shake,.ih-char.is-speaking .ih-aura{ animation:none !important; } }

/* ── Intro : moment interactif (le Gardien demande le domaine d'étude) ── */
.ih-ask{ display:flex; gap:10px; width:100%; max-width:560px; }
.ih-ask[hidden]{ display:none; }
.ih-ask-input{ flex:1 1 auto; min-width:0; background:rgba(255,255,255,.07); border:1px solid rgba(167,139,250,.4);
  border-radius:14px; padding:14px 16px; color:#fff; font-family:'Satoshi',sans-serif; font-size:1rem; }
.ih-ask-input::placeholder{ color:#9d92c8; }
.ih-ask-input:focus{ outline:none; border-color:#a78bfa; box-shadow:0 0 0 3px rgba(167,139,250,.22); }
.ih-ask-go{ flex:0 0 auto; border:none; cursor:pointer; color:#fff; font-family:'Clash Display','Satoshi',sans-serif;
  font-weight:600; font-size:.98rem; padding:14px 22px; border-radius:14px;
  background:linear-gradient(135deg,#6d5dfc,#d65ad6); box-shadow:0 10px 26px rgba(109,93,252,.5);
  transition:transform .18s, filter .18s; }
.ih-ask-go:hover{ transform:translateY(-2px); filter:brightness(1.08); }

/* ── Intro : hyperespace (étoiles à grande vitesse) quand le Gardien parle de son voyage ── */
.ih-warp{ position:absolute; inset:0; z-index:1; width:100%; height:100%; pointer-events:none;
  opacity:0; transition:opacity .5s ease; }
.ih-warp.on{ opacity:1; }


/* ── Intro : rebondissement (punch de scène + flash du locuteur) ── */
.ih-stage.ih-punch{ animation:ih-punch .5s cubic-bezier(.34,1.6,.5,1); }
@keyframes ih-punch{ 0%{ transform:scale(1); } 30%{ transform:scale(1.035); } 100%{ transform:scale(1); } }
.ih-flash{ position:absolute; inset:0; z-index:2; pointer-events:none; opacity:0; }
.ih-flash.go{ animation:ih-flash .6s ease-out; }
@keyframes ih-flash{ 0%{ opacity:0; } 22%{ opacity:.55; } 100%{ opacity:0; } }
.ih-flash.f-gardien{ background:radial-gradient(60% 60% at 35% 40%, rgba(245,181,68,.5), transparent 70%); }
.ih-flash.f-oubli{   background:radial-gradient(60% 60% at 68% 42%, rgba(214,90,214,.6), transparent 70%); }

/* ════ Schémas supplémentaires du tableau : TREE (classification), CYCLE (boucle), VERSUS (comparaison) ════ */
/* TREE */
.tm-tree-top{ display:flex; flex-direction:column; align-items:center; }
.tm-tree-root{ font-family:'Clash Display',sans-serif; font-weight:700; font-size:clamp(1.05rem,3vw,1.55rem); color:#fff;
  padding:8px 18px; border-radius:14px; background:linear-gradient(135deg,var(--cmp-indigo,#6d5dfc),var(--cmp-magenta,#d65ad6)); }
.tm-tree-stem{ width:2px; height:18px; background:rgba(167,139,250,.5); }
.tm-tree-row{ position:relative; display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:center; gap:14px; }
.tm-tree-row::before{ content:''; position:absolute; left:16%; right:16%; top:0; height:2px; background:rgba(167,139,250,.38); }
.tm-tnode{ display:flex; flex-direction:column; align-items:center;
  opacity:0; transform:translateY(14px) scale(.94); transition:opacity .42s ease, transform .5s cubic-bezier(.34,1.6,.5,1); }
.tm-tnode.tm-shown{ opacity:1; transform:none; }
.tm-tbranch{ width:2px; height:14px; background:rgba(167,139,250,.45); }
/* CYCLE */
.tm-cyc-back{ display:flex; align-items:center; gap:8px; margin-top:10px; font-family:'Satoshi',sans-serif; font-weight:600; font-size:.9rem; color:#c4b5fd; }
.tm-cyc-ico{ width:15px; height:15px; border:2px solid #c4b5fd; border-top-color:transparent; border-radius:50%; display:inline-block; transform:rotate(40deg); }
/* VERSUS */
.tm-versus{ display:flex; align-items:center; justify-content:center; gap:14px; width:100%; max-width:620px; }
.tm-vs-col{ flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:9px; }
.tm-vs-mid{ flex:0 0 auto; font-family:'Clash Display',sans-serif; font-weight:700; font-size:1rem; color:#fff;
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center;
  background:linear-gradient(135deg,#6d5dfc,#d65ad6); box-shadow:0 6px 18px rgba(109,93,252,.5); }
.tm-vs-item{ padding:10px 14px; border-radius:13px; border:1.5px solid rgba(167,139,250,.5); background:rgba(167,139,250,.12); text-align:center;
  opacity:0; transform:translateY(12px) scale(.94); transition:opacity .42s ease, transform .5s cubic-bezier(.34,1.6,.5,1); }
.tm-vs-item.tm-shown{ opacity:1; transform:none; }
.tm-vs-item.t-info{ border-color:rgba(90,214,224,.6);  background:rgba(90,214,224,.12); }
.tm-vs-item.t-warn{ border-color:rgba(244,99,170,.6);  background:rgba(244,99,170,.12); }
.tm-vs-item.t-ok{   border-color:rgba(84,214,160,.6);  background:rgba(84,214,160,.12); }
.tm-vs-item.t-ex{   border-color:rgba(245,181,68,.55); background:rgba(245,181,68,.12); }
.tm-vs-item .tm-box-t{ font-family:'Satoshi',sans-serif; font-weight:700; font-size:.95rem; color:#fff; }
.tm-vs-item .tm-box-ex{ font-family:'Satoshi',sans-serif; font-weight:500; font-size:.78rem; color:#d7cdf2; }

/* ── Plusieurs bulles par slide : petites flèches en bas à droite de la bulle ── */
.cmp-speech{ padding-bottom:clamp(24px,1.8vw,32px); }
.cmp-bub-nav{ position:absolute; right:clamp(16px,1.6vw,26px); bottom:clamp(10px,1vw,16px); display:flex; align-items:center; gap:10px; z-index:2; }
.cmp-bub-nav[hidden]{ display:none; }
.cmp-bub-btn{ width:clamp(30px,2.4vw,40px); height:clamp(30px,2.4vw,40px); border-radius:10px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid rgba(120,90,210,.3); background:rgba(167,139,250,.14); color:#6d5dfc; cursor:pointer; transition:background .15s, opacity .15s; padding:0; }
.cmp-bub-btn:hover:not(:disabled){ background:rgba(167,139,250,.3); }
.cmp-bub-btn:disabled{ opacity:.3; cursor:default; }
.cmp-bub-btn svg{ width:55%; height:55%; }
.cmp-bub-dots{ font-family:'Satoshi',sans-serif; font-size:clamp(.82rem,1.1vw,1.05rem); font-weight:700; color:#8a7fb0; font-variant-numeric:tabular-nums; }

/* ══════════════════════════════════════════════════════════
   TUTO ONBOARDING — le Gardien guide la 1re quête
   Overlay au-dessus de tout : fond assombri + spotlight sur la
   cible + Gardien flottant + bulle à texte tapé.
══════════════════════════════════════════════════════════ */
.tuto-overlay {
  position: fixed; inset: 0; z-index: 99999;
  pointer-events: none;                 /* la cible spotlightée et la bulle restent cliquables */
}
.tuto-overlay.hidden { display: none; }
/* Étape en attente d'arriver sur son écran : on masque les visuels sans démonter l'overlay */
.tuto-overlay.tuto-waiting .tuto-spotlight,
.tuto-overlay.tuto-waiting .tuto-bubble,
.tuto-overlay.tuto-waiting .tuto-guide { opacity: 0; pointer-events: none; }

/* ── Spotlight : un rectangle dont l'immense box-shadow assombrit tout autour ── */
.tuto-spotlight {
  position: fixed;
  left: var(--tuto-x, 50%); top: var(--tuto-y, 50%);
  width: var(--tuto-w, 0px); height: var(--tuto-h, 0px);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(8,6,26,0.74);
  outline: 2px solid rgba(190,170,255,0.95);
  outline-offset: 4px;
  pointer-events: none;
  transition: left .38s cubic-bezier(.4,0,.2,1), top .38s cubic-bezier(.4,0,.2,1),
              width .38s cubic-bezier(.4,0,.2,1), height .38s cubic-bezier(.4,0,.2,1),
              box-shadow .38s ease, outline-color .38s ease;
  animation: tuto-ring 2.1s ease-in-out infinite;
}
/* Étape narrative (pas de cible) : on masque l'anneau, on garde juste un voile sombre */
.tuto-overlay.tuto-no-target .tuto-spotlight {
  outline-color: transparent;
  animation: none;
  box-shadow: 0 0 0 9999px rgba(8,6,26,0.80);
}
@keyframes tuto-ring {
  0%,100% { outline-color: rgba(190,170,255,0.55); }
  50%     { outline-color: rgba(214,90,214,0.95); }
}

/* ── Gardien flottant ── */
.tuto-guide {
  position: fixed; left: 0; top: 0;
  width: 70px; height: 61px;
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(124,93,252,0.55));
  transition: left .38s cubic-bezier(.4,0,.2,1), top .38s cubic-bezier(.4,0,.2,1);
  animation: tuto-bob 3.2s ease-in-out infinite;
  z-index: 2;
}
.tuto-guide-svg { width: 100%; height: 100%; display: block; }
.tuto-guide .tuto-wings { transform-origin: 60px 60px; animation: tuto-flap 1.6s ease-in-out infinite; }
@keyframes tuto-bob  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes tuto-flap { 0%,100% { transform: scaleX(1); } 50% { transform: scaleX(.86); } }

/* ── Bulle de dialogue ── */
.tuto-bubble {
  position: fixed; left: 0; top: 0;
  max-width: 308px; width: max-content;
  pointer-events: auto;
  background: linear-gradient(160deg, rgba(28,22,58,0.97), rgba(18,14,42,0.97));
  border: 1px solid rgba(167,139,250,0.42);
  border-radius: 16px;
  padding: 13px 15px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.12), 0 0 28px rgba(124,93,252,0.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  z-index: 3;
  transition: left .38s cubic-bezier(.4,0,.2,1), top .38s cubic-bezier(.4,0,.2,1);
  animation: tuto-bubble-in .3s ease;
}
@keyframes tuto-bubble-in { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.tuto-bubble-name {
  font-family: 'Orbitron', sans-serif; font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #c4b5fd; margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(124,93,252,0.6);
}
.tuto-bubble-txt {
  margin: 0; font-family: 'Satoshi', sans-serif;
  font-size: 0.95rem; line-height: 1.48; color: #f3f0ff;
  min-height: 1.4em;
}
.tuto-bubble-txt .tuto-caret {
  display: inline-block; width: 2px; height: 1em; vertical-align: -2px;
  background: #c4b5fd; margin-left: 1px; animation: tuto-blink 0.9s steps(1) infinite;
}
@keyframes tuto-blink { 50% { opacity: 0; } }
.tuto-next {
  margin-top: 12px; display: inline-block;
  font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.06em;
  padding: 8px 16px; border-radius: 11px; border: none; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #7c5dfc, #b15ad6);
  box-shadow: 0 4px 16px rgba(124,93,252,0.5); transition: transform .12s, box-shadow .15s, opacity .2s;
}
.tuto-next:hover   { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,93,252,0.62); }
.tuto-next:active  { transform: translateY(0) scale(.96); }
.tuto-bubble.no-next .tuto-next { display: none; }

/* ─── Gardien (gauche) + Oubli (droite) : flottement bien visible sur l'accueil ─── */
#screen-home .home-flank {
  width: auto !important;
  z-index: 2 !important;
}
/* Hauteur commune → Gardien et Oubli alignés (mêmes proportions de rendu) */
#screen-home .home-flank svg {
  height: clamp(320px, 42vh, 580px) !important;
  width: auto !important;
  display: block !important;
}
#screen-home .home-flank--left {
  left: 16.75% !important;
  top: calc(50% + 0.25vh) !important;
  /* PAS de transform !important ici : une règle !important bat les animations,
     ce qui figeait le personnage. Le recentrage est intégré aux keyframes. */
  animation: home-flank-float-l2 5s ease-in-out infinite !important;
}
#screen-home .home-flank--right {
  left: 86% !important;
  /* durée différente + léger décalage → les deux ne montent jamais en même temps. */
  animation: home-flank-float-r2 6.2s ease-in-out infinite !important;
  animation-delay: -1.4s !important;
}
@keyframes home-flank-float-l2 {
  0%   { transform: translate(calc(-50% - 10px), calc(-50% + 60px)) rotate(-2.5deg); }
  50%  { transform: translate(calc(-50% + 10px), calc(-50% - 60px)) rotate(2.5deg); }
  100% { transform: translate(calc(-50% - 10px), calc(-50% + 60px)) rotate(-2.5deg); }
}
@keyframes home-flank-float-r2 {
  0%   { transform: translate(calc(-50% + 10px), calc(-50% - 55px)) rotate(2.5deg); }
  50%  { transform: translate(calc(-50% - 10px), calc(-50% + 65px)) rotate(-2.5deg); }
  100% { transform: translate(calc(-50% + 10px), calc(-50% - 55px)) rotate(2.5deg); }
}
/* Assurance : on FORCE le flottement même si « Réduire les animations » est activé */
@media (prefers-reduced-motion: reduce) {
  #screen-home .home-flank--left  { animation: home-flank-float-l2 5s ease-in-out infinite !important; }
  #screen-home .home-flank--right { animation: home-flank-float-r2 6.2s ease-in-out infinite !important; }
}

/* Centre agrandi : salutation + pseudo + bouton bien plus visibles */
#screen-home .home-cinematic-top .home-greeting {
  font-size: clamp(14px, 1.3vw, 18px) !important;
  letter-spacing: 0.3em !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#screen-home .home-cinematic-top .home-player-name {
  font-size: clamp(56px, 7vw, 96px) !important;
}
/* Bouton « Lancer ma mission » : taille validée par l'utilisatrice (grand format,
   exactement la capture). Texte agrandi, padding resserré pour coller au texte. */
#screen-home .btn-play-hero,
#screen-home .btn-play-hero .bph-text {
  font-size: clamp(26px, 2.4vw, 34px) !important;
}
#screen-home .btn-play-hero {
  padding: 12px 18px !important;
}

/* Avatar personnage au centre masqué (la classe av-off, prévue pour ça, n'avait
   aucune règle CSS → le perso s'affichait quand même). Le Gardien, l'Oubli, les
   ailes, le halo et le logo papillon restent visibles. */
#home-avatar.av-off,
#screen-home .home-avatar.av-off {
  display: none !important;
}
/* Ailes de papillon cosmiques (derrière le perso) masquées aussi : le perso étant
   retiré, elles flottaient seules au centre. */
#screen-home .home-cosmic-wings {
  display: none !important;
}
/* Badge « REPRENDRE » (pilule violette) du bandeau de reprise : retiré. */
#screen-home .bph-status-badge {
  display: none !important;
}

/* ════════════════════════════════════════════════════════════
   HOME — Raffinement héros (rythme + CTA + nav homogènes)
   Polices conservées (Orbitron CTA / display du nom). Aucun HTML/JS touché.
════════════════════════════════════════════════════════════ */
/* Méta mission « sujet · durée » : retirée de l'accueil. */
#screen-home .home-play-meta { display: none !important; }

/* CTA principal : plus rond, plus présent, halo renforcé */
#screen-home .btn-play-hero {
  border-radius: 20px !important;
  padding: 20px 42px !important;
  gap: 16px !important;
  background: linear-gradient(100deg, #7C5CFF, #A24FE6 45%, #EC4FD0) !important;
  box-shadow:
    0 22px 50px -14px rgba(190,72,210,0.8),
    0 0 40px -10px rgba(124,92,255,0.6),
    inset 0 1px 0 rgba(255,255,255,0.35) !important;
}
#screen-home .btn-play-hero:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 28px 58px -14px rgba(190,72,210,0.9),
    0 0 52px -8px rgba(124,92,255,0.7),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
}
#screen-home .btn-play-hero .bph-text {
  font-size: 23px !important;
  letter-spacing: 0.06em !important;
}
/* Icône play : flèche pleine blanche, sans cercle */
#screen-home .btn-play-hero .bph-icon {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  fill: #fff !important;
  stroke: none !important;
  color: #fff !important;
  overflow: visible !important;
}

/* Lien « Programmer un autre parcours » collé sous le CTA, plus clair */
#screen-home .home-play-replan {
  margin-top: 14px !important;
  color: #d9d2f5 !important;
  font-weight: 600 !important;
}
#screen-home .home-play-replan:hover { color: #ffffff !important; }

/* Boutons nav bas : plus ronds */
#screen-home .home-cosmic-nav {
  border-radius: 16px;
  padding: 14px 22px;
}

/* ── Accueil compact + cluster centré au milieu de la page ── */
#screen-home .home-body {
  justify-content: center !important;
  gap: 16px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* L'avatar/personnages sont masqués : on neutralise l'espace réservé */
#screen-home .home-avatar-wrap { flex: 0 0 auto !important; min-height: 0 !important; }
/* Groupe nav resserré juste sous le CTA (plus de grand vide) */
#screen-home .home-cosmic-rail {
  margin-top: 18px !important;
  padding: 0 20px !important;
  gap: 14px;
}

@media (max-width: 560px) {
  #screen-home .btn-play-hero { padding: 17px 28px !important; }
  #screen-home .btn-play-hero .bph-text { font-size: 18px !important; }
  #screen-home .home-cosmic-rail { margin-top: 14px !important; }
}

/* ── Dock pliable : musique · plein écran · déconnexion (bas gauche) ── */
.fdock {
  position: fixed; right: 18px; bottom: 18px; z-index: 9500;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
/* Sur l'écran compagnon : on remonte le dock AU-DESSUS de la barre du bas
   (sinon le rond blanc cache le bouton de navigation des slides). */
body:has(#screen-quest-companion.active) .fdock { bottom: 104px; }
.fdock-items {
  display: flex; flex-direction: column-reverse; align-items: center; gap: 12px;
}
.fdock-items > * {
  opacity: 0; transform: translateY(14px) scale(.6); pointer-events: none;
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.8,.2,1);
}
.fdock.open .fdock-items > * { opacity: 1; transform: none; pointer-events: auto; }
.fdock.open .fdock-items > *:nth-child(1) { transition-delay: .02s; }
.fdock.open .fdock-items > *:nth-child(2) { transition-delay: .06s; }
.fdock.open .fdock-items > *:nth-child(3) { transition-delay: .10s; }
/* fermé : on ne réserve pas d'espace cliquable au-dessus du bouton */
.fdock:not(.open) .fdock-items { height: 0; gap: 0; pointer-events: none; }

/* Bouton bascule (flèche) — discret */
.fdock-toggle {
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; flex: 0 0 auto;
  display: grid; place-items: center; color: #7c3aed; border: 2px solid rgba(124,58,237,.16);
  background: #fff;
  box-shadow: 0 10px 26px -10px rgba(20,8,60,0.5), inset 0 1px 0 rgba(255,255,255,0.7);
  opacity: 1;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s, color .2s;
}
.fdock-toggle svg { width: 22px; height: 22px; }
.fdock-toggle:hover { color: #6d28d9; transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(124,58,237,.5); }
.fdock-toggle:active { transform: scale(.94); }
.fdock.open .fdock-toggle { opacity: 1; }
.fdock-chev { transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.fdock.open .fdock-chev { transform: rotate(180deg); }

/* Dans le dock, les outils ne sont plus positionnés individuellement (position relative pour l'anneau ::after) */
.fdock .music-toggle, .fdock .fs-toggle, .fdock .home-logout-pill {
  position: relative !important; left: auto !important; bottom: auto !important; margin: 0 !important;
  width: 52px !important; height: 52px !important;
}
/* Déconnexion : même cercle néon que les autres */
.fdock .home-logout-pill {
  border-radius: 50%; padding: 0 !important; display: grid; place-items: center; cursor: pointer;
  color: #f5f2ff; border: 2px solid transparent;
  background: linear-gradient(rgba(20,14,44,.72), rgba(20,14,44,.72)) padding-box,
              linear-gradient(135deg, #7C5CFF, #EC4FD0) border-box;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.10);
}
.fdock .home-logout-pill:hover { transform: translateY(-2px); box-shadow: 0 0 22px -4px rgba(190,72,200,.8); }
.fdock .home-logout-pill .hlp-icon { opacity: .9; }
/* Déconnexion visible uniquement quand une session est ouverte */
.fdock-logout { display: none !important; }
body.is-authed .fdock-logout { display: grid !important; }

/* ── Déconnexion toujours visible (quand connecté) ── */
.global-logout {
  position: fixed; left: 18px; bottom: 18px; z-index: 9400;
  display: none; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: .88rem; color: #fff;
  border: 2px solid transparent;
  background: linear-gradient(rgba(20,14,44,.82), rgba(20,14,44,.82)) padding-box,
              linear-gradient(135deg, #7C5CFF, #EC4FD0) border-box;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 10px 26px -10px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.global-logout svg { width: 18px; height: 18px; }
.global-logout:hover { transform: translateY(-2px); box-shadow: 0 0 22px -4px rgba(190,72,200,.85); }
.global-logout:active { transform: scale(.96); }
/* Bouton déconnexion bas-gauche retiré partout (la déconnexion reste dispo via le dock en bas à droite). */
body.is-authed .global-logout { display: none !important; }

/* Mes cours — mode Entraînement : bouton « Déposer des annales » sur la carte */
.mc-annales-chip {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 12px; padding: 7px 13px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #d9d2f5; cursor: pointer;
  background: rgba(255,255,255,.07); border: 1px solid rgba(167,139,250,.32);
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.mc-annales-chip:hover { background: rgba(167,139,250,.18); border-color: rgba(196,181,253,.6); color: #fff; transform: translateY(-1px); }

/* Plus de chrono sur le board du compagnon (cours / review).
   En annales (entraînement), le chrono est réaffiché via JS (style.display). */
#cmp-chrono, .cmp-chrono { display: none; }
/* Le chrono étant masqué, ses deux séparateurs se collaient (double trait) :
   on masque celui qui le suit → un SEUL trait entre RÉVISION et le titre. */
.cmp-hud-bar #cmp-chrono + .qa-hud-sep { display: none; }

/* Menu d'entrée de l'Oubli (entraînement) : choix du format */
.cmp-oubli-menu {
  position: absolute; inset: 0; z-index: 9; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,241,255,.94)); padding: 26px;
}
.cmp-oubli-menu .com-title { font-weight: 800; font-size: 1.15rem; color: #4a3a86; }
.cmp-oubli-menu .com-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 220px)); gap: 14px; }
.cmp-oubli-menu .com-grid.com-grid-1 { grid-template-columns: minmax(220px, 320px); }
.cmp-oubli-menu .com-grid-1 .com-btn { align-items: center; text-align: center; }
.cmp-oubli-menu .com-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 16px 20px; border-radius: 16px; cursor: pointer; text-align: left;
  background: #fff; border: 1.5px solid rgba(124,92,255,.25);
  box-shadow: 0 8px 20px -10px rgba(80,50,160,.35); transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cmp-oubli-menu .com-btn:hover { transform: translateY(-2px); border-color: rgba(124,92,255,.6); box-shadow: 0 14px 28px -12px rgba(124,92,255,.5); }
.cmp-oubli-menu .com-lbl { font-weight: 800; font-size: 1rem; color: #2c2356; }
.cmp-oubli-menu .com-sub { font-size: .8rem; color: #8a7fb5; }
.cmp-oubli-menu .com-btn-annales { background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(236,79,208,.1)); border-color: rgba(236,79,208,.35); }
/* Intro de l'Oubli : liste des notions clés + question exemple d'examen */
.cmp-oubli-menu .com-notions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  max-width: 560px;
}
.cmp-oubli-menu .com-notion {
  padding: 7px 14px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; color: #4a3a86;
  background: rgba(124,92,255,.10); border: 1.5px solid rgba(124,92,255,.28);
}
.cmp-oubli-menu .com-notions-empty {
  color: #8a7fb5; font-size: .9rem; font-weight: 600; text-align: center;
  border: none; background: none; max-width: 480px;
}
.cmp-oubli-menu .com-ask { font-weight: 800; font-size: 1.02rem; color: #2c2356; margin-top: 2px; }

/* ── Trésor : PAS de bloc/cadre autour des stats — juste les icônes + les chiffres ── */
.treasure-stats-row,
body:not(.light-theme) .treasure-stats-row,
body.light-theme .treasure-stats-row {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  gap: 22px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  animation: none !important;
}
.treasure-stats-row::before,
.treasure-stats-row::after,
body:not(.light-theme) .treasure-stats-row::before,
body:not(.light-theme) .treasure-stats-row::after { content: none !important; display: none !important; }
.tr-stat-divider { display: none !important; }

/* ── Boutons des pages récompense = EXACTEMENT le design « Lancer ma mission » (néon) ── */
#screen-quest-complete .qc-btn-continuer,
#screen-treasure .tr-btn-newday,
#screen-treasure .t-btn-merite {
  width: auto !important; min-width: 240px !important; max-width: 340px !important;
  padding: 16px 42px !important; height: auto !important;
  border: none !important; outline: none !important; border-radius: 18px !important;
  color: #fff !important; text-shadow: none !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: 0.9rem !important; font-weight: 700 !important; letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  background: linear-gradient(100deg, #7C5CFF, #A24FE6 45%, #EC4FD0) !important;
  box-shadow:
    0 18px 44px -14px rgba(190,72,210,0.8),
    0 0 36px -10px rgba(124,92,255,0.6),
    inset 0 1px 0 rgba(255,255,255,0.35) !important;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s ease !important;
  animation: none !important;
}
#screen-quest-complete .qc-btn-continuer:hover,
#screen-treasure .tr-btn-newday:hover,
#screen-treasure .t-btn-merite:hover {
  transform: translateY(-2px) !important;
  background: linear-gradient(100deg, #7C5CFF, #A24FE6 45%, #EC4FD0) !important;
  box-shadow:
    0 24px 54px -14px rgba(190,72,210,0.9),
    0 0 48px -8px rgba(124,92,255,0.7),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
}
#screen-quest-complete .qc-btn-continuer:active,
#screen-treasure .tr-btn-newday:active,
#screen-treasure .t-btn-merite:active { transform: scale(.97) !important; }

/* ── Récompenses = PETIT PANNEAU compact (pas une page entière) ── */
/* Panneau translucide (comme « TON PARCOURS / GRILLE DE DÉPART » = .dp-panel) */
#screen-quest-complete .qc-modal,
#screen-treasure .tr-modal {
  width: min(470px, 92vw) !important;
  padding: 28px 26px !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.09) !important;
  box-shadow: 0 24px 60px -22px rgba(0,0,0,0.6) !important;
  -webkit-backdrop-filter: blur(14px) !important; backdrop-filter: blur(14px) !important;
  gap: 6px !important;
}
#screen-quest-complete .qc-title,
#screen-treasure .treasure-title { font-size: 1.55rem !important; margin-bottom: 8px !important; }
/* Messages d'intro retirés sur les deux écrans récompense */
#screen-quest-complete .qc-message,
#screen-treasure .treasure-persona-msg { display: none !important; }

/* Étoile compacte (titre remonté) + panneau aéré — les deux écrans */
#screen-treasure .tr-modal,
#screen-quest-complete .qc-modal { gap: 22px !important; padding: 30px 30px 34px !important; }
#screen-treasure .treasure-chest-wrap { width: 64px !important; height: 64px !important; margin-bottom: 0 !important; }
#screen-quest-complete .qc-orb { width: 64px !important; height: 64px !important; }
#screen-treasure .treasure-title,
#screen-quest-complete .qc-modal .qc-title { margin: 0 !important; }
#screen-treasure .tr-modal .treasure-stats-row { margin: 6px 0 8px !important; }

/* Quête Terminée : pièce = même rendu que le trésor (cercle doré + nombre à côté + label dessous),
   sans bloc/cadre, sur une ligne centrée. */
#screen-quest-complete .qc-coin-card {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 6px 0 8px !important;
  animation: none !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
}
#screen-quest-complete .qc-coin-card::after { content: none !important; display: none !important; }
#screen-quest-complete .qc-coin-icon { width: 56px !important; height: 56px !important; }
#screen-quest-complete .qc-coin-icon svg { width: 32px !important; height: 32px !important; }
#screen-quest-complete .qc-coin-info { align-items: flex-start !important; }
#screen-quest-complete .qc-coin-val { font-size: 2rem !important; }
#screen-quest-complete .qc-orb svg { width: 42px !important; height: 42px !important; }
#screen-treasure .treasure-stars-icon svg { width: 58px !important; height: 58px !important; }
#screen-quest-complete .qc-modal .qc-coin-card { margin-bottom: 16px !important; padding: 16px 24px !important; }
#screen-treasure .tr-modal .treasure-stats-row { margin-bottom: 20px !important; }

/* Fond = MÊME que l'accueil : transparent → on voit le fond cosmique global #cosmic-bg */
#screen-quest-complete, #screen-treasure { background: transparent !important; }
.qc-star-canvas, .tr-star-canvas { display: none !important; }

/* Stats trésor : alignées sur une ligne, valeurs en BLANC */
#screen-treasure .treasure-stats-row {
  flex-wrap: nowrap !important;
  gap: 18px !important;
  align-items: center !important;
  justify-content: center !important;
}
#screen-treasure .ts-icon-circle-gold { width: 56px !important; height: 56px !important; }
#screen-treasure .ts-icon-circle-gold svg { width: 32px !important; height: 32px !important; }
#screen-treasure .ts-icon-circle-purple { width: 50px !important; height: 50px !important; }
#screen-treasure .ts-stat-info { align-items: flex-start !important; }
#screen-quest-complete .qc-coin-val,
#screen-treasure .ts-val,
#screen-treasure .ts-val-purple {
  color: #ffffff !important;
  text-shadow: 0 0 18px rgba(255,255,255,0.25) !important;
}

/* ════════════════════════════════════════════════════════════════
   DÉFILEMENT DES FENÊTRES (page mission) — CORRECTIF DE FOND
   Problème : le workspace avait une hauteur fixe calc(100vh - 220px)
   qui dépassait l'espace réel sous l'en-tête → bas coupé, aucun scroll.
   Solution : flexbox — le workspace prend EXACTEMENT la place restante,
   et chaque corps de fenêtre défile dans cette hauteur contrainte.
════════════════════════════════════════════════════════════════ */
#screen-quest-shop {
  overflow: clip !important;
}
/* Le carrousel/conteneur prend toute la hauteur restante sous l'en-tête */
#screen-quest-shop .qs5-carousel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
/* Le workspace remplit le carrousel — plus de hauteur magique */
#screen-quest-shop .qs5-workspace {
  flex: 1 1 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
/* Les colonnes se contraignent en hauteur (sinon leur corps ne sait pas quand déborder) */
#screen-quest-shop .qs5-col {
  min-height: 0 !important;
  overflow: hidden !important;
}
/* Le corps de CHAQUE fenêtre est contraint en hauteur (l'overflow propre à
   chaque fenêtre reste géré par ses règles existantes : Matière = défilement
   direct, Planif/Rattrapage/Prépa = défilement interne avec barre épinglée) */
#screen-quest-shop .qs5-col-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}
/* Fenêtre MATIÈRE : défilement direct du corps */
#screen-quest-shop .qs5-col-revision .qs5-col-body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(167,139,250,0.6) transparent !important;
}
/* Barre de défilement bien visible pour la fenêtre matière */
#screen-quest-shop .qs5-col-revision .qs5-col-body::-webkit-scrollbar { width: 8px !important; }
#screen-quest-shop .qs5-col-revision .qs5-col-body::-webkit-scrollbar-track {
  background: rgba(167,139,250,0.08) !important; border-radius: 4px !important;
}
#screen-quest-shop .qs5-col-revision .qs5-col-body::-webkit-scrollbar-thumb {
  background: rgba(167,139,250,0.55) !important; border-radius: 4px !important;
}
#screen-quest-shop .qs5-col-revision .qs5-col-body::-webkit-scrollbar-thumb:hover {
  background: rgba(167,139,250,0.8) !important;
}

/* ════════════════════════════════════════════════════════════════
   ACCUEIL MVP — deux boutons côte à côte (Mes cours / Entraînement)
   Même look que l'ancien « LANCE TA MISSION » (.btn-play-hero)
════════════════════════════════════════════════════════════════ */
/* Agencement d'origine : les deux boutons côte à côte, DANS le flux, sous le nom.
   (aucun positionnement absolu → le compagnon et l'Oubli gardent leur place) */
#screen-home .home-play-zone.home-dual-cta {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  /* Remonte un peu les boutons (transform → n'affecte pas le compagnon/Oubli) */
  transform: translateY(-32px) !important;
}
/* La salutation + le nom remontent de la même valeur, pour rester groupés avec les boutons */
#screen-home .home-cinematic-top {
  transform: translateY(-32px) !important;
}
/* Les personnages (compagnon + Oubli) remontent aussi, du même décalage */
#screen-home .home-avatar-wrap {
  transform: translateY(-32px) !important;
}
/* L'icône Entraînement en CONTOUR (vraie manette), pas en aplat blanc */
#screen-home .home-dual-cta .home-cta-btn:last-child .bph-icon {
  fill: none !important;
  stroke: #fff !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
#screen-home .home-dual-cta .btn-play-hero {
  padding: 16px 30px !important;
}
#screen-home .home-dual-cta .btn-play-hero,
#screen-home .home-dual-cta .btn-play-hero .bph-text {
  font-size: clamp(17px, 1.6vw, 24px) !important;
}
/* (Ancien bouton ENTRAÎNEMENT vert retiré → on garde le violet/magenta d'origine pour Mes cours) */
#screen-home .home-dual-cta .home-cta-btn:last-child {
  background: linear-gradient(105deg, #6d5dfc, #d65ad6) !important;
  box-shadow:
    0 18px 44px -12px rgba(150,70,230,0.85),
    0 0 0 1px rgba(255,255,255,0.12) inset !important;
}
#screen-home .home-dual-cta .home-cta-btn:last-child:hover {
  box-shadow:
    0 26px 56px -12px rgba(150,70,230,1),
    0 0 0 1px rgba(255,255,255,0.20) inset !important;
}

/* ════════════════════════════════════════════════════════════════
   MES COURS / ENTRAÎNEMENT — boutons d'ajout matière & chapitre
════════════════════════════════════════════════════════════════ */
/* Beau bouton « + » (ajouter une matière) — pastille ronde dégradé violet→magenta + halo */
.mc-pill-add {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; min-width: 40px; padding: 0;
  border: none; border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #7c5dfc 0%, #b15ad6 55%, #ec4faf 100%);
  box-shadow:
    0 6px 18px -4px rgba(150,70,230,0.75),
    0 0 0 1px rgba(255,255,255,0.18) inset,
    0 0 14px rgba(196,107,224,0.45);
  transition: transform .18s cubic-bezier(.3,.9,.35,1.4), box-shadow .2s, filter .2s;
}
.mc-pill-add svg {
  width: 20px; height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.mc-pill-add:hover {
  transform: translateY(-2px) scale(1.08) rotate(90deg);
  box-shadow:
    0 10px 26px -4px rgba(150,70,230,0.95),
    0 0 0 1px rgba(255,255,255,0.28) inset,
    0 0 22px rgba(236,79,175,0.6);
}
.mc-pill-add:active {
  transform: translateY(0) scale(0.96) rotate(90deg);
}
/* Beau « + » (ajouter un chapitre) — à droite du titre de matière, couleur de la matière */
.mc-chap-add {
  all: unset;
  flex: 0 0 auto;
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--g1, #7c5dfc), var(--g2, #ec4faf));
  box-shadow:
    0 4px 12px -3px var(--glow, rgba(150,70,230,0.7)),
    0 0 0 1px rgba(255,255,255,0.18) inset;
  transition: transform .18s cubic-bezier(.3,.9,.35,1.4), box-shadow .2s;
}
.mc-chap-add svg {
  width: 15px; height: 15px;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.25));
}
.mc-chap-add:hover {
  transform: scale(1.12) rotate(90deg);
  box-shadow:
    0 7px 18px -3px var(--glow, rgba(150,70,230,0.85)),
    0 0 0 1px rgba(255,255,255,0.3) inset,
    0 0 16px var(--glow, rgba(236,79,175,0.55));
}
.mc-chap-add:active { transform: scale(0.95) rotate(90deg); }

/* Corbeille de matière — discrète dans l'en-tête (à droite), rouge au survol */
.mc-subj-del {
  all: unset;
  flex: 0 0 auto;
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  transition: color .18s, background .18s, border-color .18s, transform .15s;
}
.mc-subj-del svg { width: 16px; height: 16px; }
.mc-subj-del:hover {
  color: #ff6b8b;
  background: rgba(244,63,94,0.14);
  border-color: rgba(244,63,94,0.55);
  transform: translateY(-1px);
}
.mc-subj-del:active { transform: scale(0.94); }

/* « × » de suppression d'un chapitre — discret & moderne : fin trait, sans pastille,
   apparaît en douceur au survol de la carte, vire au rouge quand on le pointe */
.mc-card { position: relative; }
.mc-card-del {
  position: absolute; top: 9px; right: 10px; z-index: 4;
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border: none; background: none;
  color: rgba(255,255,255,0.40);
  cursor: pointer;
  opacity: 0; transform: scale(0.9);
  transition: opacity .18s ease, color .18s ease, transform .18s ease;
}
.mc-card-del svg { width: 13px; height: 13px; }
.mc-card:hover .mc-card-del,
.mc-card:focus-within .mc-card-del { opacity: 1; transform: scale(1); }
.mc-card-del:hover { color: #ff6b8b; transform: scale(1.15); }
.mc-card-del:active { transform: scale(0.9); }

/* ════════════════════════════════════════════════════════════════
   TITRE « Mes cours » / « Entraînement » — plus grand, dégradé rose/violet
════════════════════════════════════════════════════════════════ */
#mc-htitle.mc-htitle {
  height: auto !important;
  line-height: 1.08 !important;
  font-family: 'Clash Display', 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  font-size: clamp(36px, 4.4vw, 54px) !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  background: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35) !important;
}

/* Fenêtre de dépôt — bloc annales sous le dépôt du cours */
.prep-annales-block { width: 100%; max-width: 420px; margin: 16px auto 0; }
.prep-annales-lbl {
  font-size: .8rem; font-weight: 700; color: #cbb9ff; text-align: left;
  margin: 0 0 8px 2px; letter-spacing: .01em;
}
.prep-annales-lbl span { color: rgba(203,185,255,.6); font-weight: 600; }
.qb-dropzone.prep-annales-mini { padding: 14px 16px; }
.qb-dropzone.prep-annales-mini .qb-dz-main { font-size: .92rem; }

/* ════════════════════════════════════════════════════════════════
   Bouton « afficher la navigation » (chevron ^) — rendu bien visible
════════════════════════════════════════════════════════════════ */
.bn-reveal-btn {
  width: 52px !important; height: 30px !important;
  background: rgba(124,93,252,0.30) !important;
  border: 1.5px solid rgba(167,139,250,0.75) !important;
  color: #f0e9ff !important;
  opacity: 1 !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45), 0 0 16px rgba(167,139,250,0.55) !important;
  animation: bn-reveal-pulse 2.4s ease-in-out infinite !important;
}
.bn-reveal-btn svg { width: 18px !important; height: 18px !important; }
.bn-reveal-btn:hover {
  background: rgba(124,93,252,0.48) !important;
  border-color: rgba(196,181,253,1) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 24px rgba(167,139,250,0.85) !important;
}
@keyframes bn-reveal-pulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(0,0,0,0.45), 0 0 12px rgba(167,139,250,0.40); }
  50%      { box-shadow: 0 4px 18px rgba(0,0,0,0.45), 0 0 24px rgba(167,139,250,0.80); }
}


/* ════════════════════════════════════════════════════════════════
   QUIZ TOUJOURS SUR LE FOND HYPERESPACE (warp) — voile + texte clair
   (le quiz est désormais posé par-dessus le warp, comme le reste du cas)
════════════════════════════════════════════════════════════════ */
.cmp-map .tm-scene.tm-scene-quiz { z-index: 0; }
.cmp-map .cmp-quiz { z-index: 2; }
.cmp-map .cmp-quiz::before {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: 12px; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%, rgba(13,9,32,0.42) 0%, rgba(13,9,32,0.74) 100%);
}
.cmp-map .cmp-quiz > * { position: relative; z-index: 1; }
.cmp-map .cmp-quiz-q { color: #f3efff !important; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.cmp-map .cmp-qopt {
  color: #ece7ff !important;
  background: rgba(28,20,58,0.55) !important;
  border-color: rgba(167,139,250,.5) !important;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.cmp-map .cmp-qopt:hover:not(:disabled) {
  background: rgba(48,36,92,0.72) !important; border-color: rgba(167,139,250,.9) !important;
}
.cmp-map .cmp-qopt.is-correct { background: rgba(84,214,160,.30) !important; border-color: #54d6a0 !important; color: #d7ffe9 !important; }
.cmp-map .cmp-qopt.is-wrong { background: rgba(240,106,176,.28) !important; border-color: #e06aa8 !important; color: #ffd9ee !important; }
.cmp-map .cmp-quiz-fb.ok { background: rgba(84,214,160,.20) !important; color: #d7ffe9 !important; }
.cmp-map .cmp-quiz-fb.no { background: rgba(240,106,176,.20) !important; color: #ffd9ee !important; }

/* ════════════════════════════════════════════════════════════════
   TABLEAU DU CAS — agrandi + plus de rognage de l'énoncé
════════════════════════════════════════════════════════════════ */
.cmp-map { height: clamp(460px, 62vh, 720px) !important; }
/* "safe center" : centré quand ça tient, aligné en haut (sans rogner) quand ça déborde */
.cmp-map .cmp-quiz { justify-content: safe center !important; padding-top: 22px !important; padding-bottom: 22px !important; }

/* ════════════════════════════════════════════════════════════════
   EXERCICE « REMETS DANS L'ORDRE » (escape game) + secousse si faux
════════════════════════════════════════════════════════════════ */
.cmp-shake { animation: cmpShake .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes cmpShake {
  0%,100%{ transform:translateX(0) } 15%{ transform:translateX(-9px) }
  30%{ transform:translateX(9px) } 45%{ transform:translateX(-6px) }
  60%{ transform:translateX(6px) } 75%{ transform:translateX(-3px) } 90%{ transform:translateX(3px) }
}
.cmp-map .cmp-order .cmp-order-slots { display:flex; flex-direction:column; gap:8px; margin:6px 0 12px; }
.cmp-map .cmp-order .cmp-ord-hint { color:#cbb9ff; font-size:.92rem; text-align:center; padding:14px; border:1.5px dashed rgba(167,139,250,.4); border-radius:12px; }
.cmp-map .cmp-order .cmp-ord-slot {
  display:flex; align-items:center; gap:11px; text-align:left; width:100%;
  padding:13px 16px; border-radius:12px; cursor:pointer; font-weight:600; font-size:.98rem;
  color:#ece7ff; background:rgba(124,93,252,0.32); border:1.5px solid rgba(167,139,250,.7);
  transition:background .15s, border-color .15s;
}
.cmp-map .cmp-order .cmp-ord-slot:hover{ background:rgba(124,93,252,0.45); }
.cmp-map .cmp-order .cmp-ord-slot.is-correct{ background:rgba(84,214,160,.30); border-color:#54d6a0; color:#d7ffe9; cursor:default; }
.cmp-map .cmp-order .cmp-ord-num{ display:inline-flex; align-items:center; justify-content:center; width:25px; height:25px; border-radius:50%; background:rgba(255,255,255,.22); font-weight:800; font-size:.82rem; flex-shrink:0; }
.cmp-map .cmp-order .cmp-order-pool{ display:flex; flex-wrap:wrap; gap:9px; justify-content:center; }
.cmp-map .cmp-order .cmp-ord-item{
  padding:13px 17px; border-radius:12px; cursor:pointer; font-weight:600; font-size:.98rem;
  color:#ece7ff; background:rgba(28,20,58,0.62); border:1.5px dashed rgba(167,139,250,.6);
  transition:transform .12s, background .15s, border-color .15s;
}
.cmp-map .cmp-order .cmp-ord-item:hover{ background:rgba(48,36,92,0.78); border-color:rgba(167,139,250,.95); transform:translateY(-2px); }

/* ════════════════════════════════════════════════════════════════
   ACCUEIL — un SEUL bouton « Mes cours » (Entraînement retiré)
   Violet/magenta, icône manette en contour, centré sous le nom.
════════════════════════════════════════════════════════════════ */
#screen-home .home-single-cta { justify-content: center !important; }
#screen-home .home-single-cta .home-cta-btn:last-child {
  background: linear-gradient(105deg, #6d5dfc, #d65ad6) !important;
  box-shadow: 0 18px 44px -12px rgba(150,70,230,0.85), 0 0 0 1px rgba(255,255,255,0.12) inset !important;
}
#screen-home .home-single-cta .home-cta-btn:last-child:hover {
  box-shadow: 0 26px 56px -12px rgba(150,70,230,1), 0 0 0 1px rgba(255,255,255,0.20) inset !important;
}
#screen-home .home-single-cta .home-cta-btn:last-child .bph-icon {
  fill: none !important; stroke: #fff !important; stroke-width: 1.9 !important;
}

/* ════════════════════════════════════════════════════════════════
   SCREEN CHOIX DU PROFIL — Professeur / Étudiant
════════════════════════════════════════════════════════════════ */
#screen-role .role-content {
  position: relative; z-index: 2; flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center;
}
/* ── Carte blanche (style Talya) qui contient tout ─────────────── */
#screen-role .role-card-panel {
  width: 100%; max-width: 780px;
  background: #ffffff;
  border-radius: 28px;
  padding: clamp(30px, 4vw, 46px) clamp(26px, 4vw, 44px) clamp(34px, 4vw, 48px);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(26px, 4vh, 40px);
  box-shadow:
    0 30px 80px -30px rgba(20,10,60,0.55),
    0 10px 28px -14px rgba(20,10,60,0.35);
  animation: slide-up 0.35s ease;
}
#screen-role .role-head { display: flex; flex-direction: column; gap: 8px; }
#screen-role .role-title {
  font-family: 'Clash Display', 'Outfit', sans-serif; font-weight: 800; margin: 0;
  font-size: clamp(28px, 3.4vw, 40px); color: #1c1233; letter-spacing: -0.01em;
}
#screen-role .role-sub { color: #6b6486; font-size: clamp(14px, 1.6vw, 17px); margin: 0; }
#screen-role .role-cards { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; align-items: stretch; width: 100%; }
#screen-role .role-card {
  all: unset; cursor: pointer; box-sizing: border-box; position: relative; isolation: isolate;
  flex: 1 1 260px; max-width: 320px; padding: 30px 26px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
  border-radius: 20px;
  background: #fbfaff;
  border: 1.5px solid #e7e1f5;
  box-shadow:
    0 20px 40px -18px rgba(55,20,110,0.34),
    0 6px 14px -6px rgba(55,20,110,0.18),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

#screen-role .role-card:hover {
  transform: translateY(-7px);
  border-color: #b794f4;
  background: #ffffff;
  box-shadow:
    0 34px 60px -22px rgba(124,58,237,.55),
    0 10px 22px -10px rgba(124,58,237,.35),
    inset 0 1px 0 rgba(255,255,255,0.95);
}
#screen-role .role-card:active { transform: translateY(-3px); transition-duration: .12s; }

#screen-role .role-ic {
  width: 66px; height: 66px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #9d5cf0);
  box-shadow: 0 10px 24px -8px rgba(124,58,237,.6);
  transition: transform .25s ease, box-shadow .25s ease;
}
#screen-role .role-card:hover .role-ic {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 16px 30px -8px rgba(124,58,237,.75);
}
#screen-role .role-ic svg { width: 32px; height: 32px; }
#screen-role .role-name { font-family: 'Clash Display', 'Outfit', sans-serif; font-weight: 700; font-size: 1.18rem; color: #1c1233; }
#screen-role .role-desc { color: #6b6486; font-size: .92rem; line-height: 1.45; }
#screen-role .role-card-teacher .role-ic { background: linear-gradient(135deg, #a855f7, #d24fd0); }

/* ═══════════════════════════════════════════════════════════
   Fenêtre de choix « Mes cours » (Vidéo / Fiche / Jeux)
   Même langage visuel que l'écran « Qui es-tu ? » (modal blanc + cartes)
═══════════════════════════════════════════════════════════ */
.mcc-overlay{
  position:fixed; inset:0; z-index:1200;
  display:flex; align-items:center; justify-content:center; padding:24px;
  background:rgba(10,4,26,0.62); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  animation:mcc-fade .22s ease;
}
.mcc-overlay[hidden]{ display:none; }
@keyframes mcc-fade{ from{ opacity:0; } to{ opacity:1; } }
.mcc-modal{
  position:relative; width:100%; max-width:880px;
  background:#ffffff; border-radius:30px;
  padding:clamp(28px,3vw,48px) clamp(22px,3vw,44px) clamp(30px,3.4vw,50px);
  box-shadow:0 40px 100px -30px rgba(30,10,70,.7), 0 0 0 1px rgba(255,255,255,.5) inset;
  text-align:center; animation:mcc-pop .34s cubic-bezier(.22,1,.36,1);
}
@keyframes mcc-pop{ from{ opacity:0; transform:translateY(16px) scale(.97); } to{ opacity:1; transform:none; } }
.mcc-close{
  position:absolute; top:16px; right:16px; width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  background:#f2eefb; border:1px solid #e7e1f5; color:#6b6486;
  transition:background .2s, color .2s, transform .2s;
}
.mcc-close:hover{ background:#eadcff; color:#3a2a6e; transform:rotate(90deg); }
.mcc-close svg{ width:16px; height:16px; }
.mcc-title{ font-family:'Clash Display','Outfit',sans-serif; font-weight:800; margin:0 0 6px; font-size:clamp(24px,3vw,38px); color:#1c1233; letter-spacing:.01em; }
.mcc-sub{ margin:0 0 clamp(22px,2.4vw,34px); color:#6b6486; font-size:clamp(13px,1.5vw,17px); }
.mcc-cards{ display:flex; gap:20px; flex-wrap:wrap; justify-content:center; align-items:stretch; }
.mcc-card{
  all:unset; cursor:pointer; box-sizing:border-box; position:relative;
  flex:1 1 210px; max-width:250px; padding:26px 20px;
  display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center;
  border-radius:20px; background:#fbfaff; border:1.5px solid #e7e1f5;
  box-shadow:0 18px 36px -18px rgba(55,20,110,.3), inset 0 1px 0 rgba(255,255,255,.9);
  transition:transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.mcc-card:hover{
  transform:translateY(-7px);
  border-color:#e879f9; background:#ffffff;
  box-shadow:0 34px 56px -22px rgba(217,70,239,.5), 0 0 0 1px rgba(232,121,249,.25), inset 0 1px 0 rgba(255,255,255,.95);
}
.mcc-card:active{ transform:translateY(-3px); transition-duration:.12s; }
.mcc-ic{
  width:62px; height:62px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; color:#fff;
  box-shadow:0 10px 24px -8px rgba(124,58,237,.6);
  transition:transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.mcc-ic svg{ width:30px; height:30px; }
.mcc-card:hover .mcc-ic{ transform:scale(1.08) translateY(-2px); filter:saturate(1.15); }
.mcc-name{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.08rem; color:#1c1233; }
.mcc-desc{ color:#6b6486; font-size:.86rem; line-height:1.4; }
/* Icônes colorées par type */
.mcc-card-video .mcc-ic{ background:linear-gradient(135deg,#7c3aed,#a855f7); }
.mcc-card-fiche .mcc-ic{ background:linear-gradient(135deg,#a855f7,#e879f9); }
.mcc-card-jeux  .mcc-ic{ background:linear-gradient(135deg,#f472b6,#fb7185); box-shadow:0 10px 24px -8px rgba(244,114,182,.6); }
@media (max-width:640px){ .mcc-cards{ flex-direction:column; } .mcc-card{ max-width:none; width:100%; flex-direction:row; text-align:left; } .mcc-card .mcc-desc{ margin-top:2px; } }

/* ── Visualiseur de fiche de révision (autonome) ── */
.mccf-overlay{
  position:fixed; inset:0; z-index:1250; display:flex; align-items:center; justify-content:center; padding:24px;
  background:rgba(10,4,26,0.62); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); animation:mcc-fade .22s ease;
}
.mccf-overlay[hidden]{ display:none; }
.mccf-sheet{
  position:relative; width:100%; max-width:720px; max-height:86vh; overflow-y:auto;
  background:#ffffff; border-radius:24px; padding:clamp(22px,2.6vw,38px);
  box-shadow:0 40px 100px -30px rgba(30,10,70,.7); animation:mcc-pop .34s cubic-bezier(.22,1,.36,1);
}
.mccf-close{
  position:absolute; top:14px; right:14px; width:36px; height:36px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center; background:#f2eefb; border:1px solid #e7e1f5; color:#6b6486;
  transition:background .2s, color .2s, transform .2s;
}
.mccf-close:hover{ background:#eadcff; color:#3a2a6e; transform:rotate(90deg); }
.mccf-close svg{ width:15px; height:15px; }
.mccf-head{ text-align:center; margin-bottom:20px; }
.mccf-badge{ display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#a855f7; background:#f6edff; padding:5px 12px; border-radius:999px; }
.mccf-title{ font-family:'Clash Display','Outfit',sans-serif; font-weight:800; font-size:clamp(20px,2.4vw,30px); color:#1c1233; margin:10px 0 0; }
.mccf-acc{ color:#4a3d6e; font-size:.98rem; line-height:1.5; text-align:center; margin-bottom:18px; }
.mccf-group{ margin-bottom:18px; }
.mccf-group-ttl{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.05rem; color:#3a2a6e; padding-bottom:8px; margin-bottom:12px; border-bottom:2px solid #efe8fb; }
.mccf-pt{ background:#fbfaff; border:1px solid #ece6f8; border-left:4px solid #c084fc; border-radius:12px; padding:12px 15px; margin-bottom:10px; }
.mccf-pt.is-prio{ border-left-color:#f472b6; background:#fff5fb; }
.mccf-flag{ display:inline-block; font-size:.66rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#db2777; background:#ffe4f1; padding:2px 8px; border-radius:999px; margin-bottom:6px; }
.mccf-ess{ font-weight:600; color:#241046; line-height:1.45; }
.mccf-det{ color:#6b6486; font-size:.9rem; line-height:1.5; margin-top:5px; }
.mccf-body .hl, .mccf-body b{ color:#7c3aed; }

/* ── Fiche de révision v2 : narrative en cases qui se construisent ── */
.mccf-sheet--v2{ max-width:860px; }
.mccf-intro{ color:#4a3d6e; font-size:1rem; line-height:1.55; text-align:center; max-width:640px; margin:0 auto 22px; }
.mccf-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
@media (max-width:620px){ .mccf-grid{ grid-template-columns:1fr; } }
.mccf-case{
  position:relative; background:#fbfaff; border:1px solid #ece6f8; border-left:4px solid #c084fc;
  border-radius:14px; padding:14px 16px;
  box-shadow:0 10px 22px -14px rgba(55,20,110,.28);
}
.mccf-grid.is-building .mccf-case{ opacity:0; animation:mccf-pop .5s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes mccf-pop{ from{ opacity:0; transform:translateY(14px) scale(.97); } to{ opacity:1; transform:none; } }
.mccf-case-ttl{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.02rem; color:#1c1233; margin-bottom:7px; }
.mccf-case-txt{ color:#3f3562; font-size:.93rem; line-height:1.55; }
/* liseré + pastille de titre colorés par type */
.mccf-case--key{ border-left-color:#a855f7; }
.mccf-case--ok{ border-left-color:#22c55e; }
.mccf-case--warn{ border-left-color:#f472b6; background:#fff6fb; }
.mccf-case--info{ border-left-color:#38bdf8; }
/* la « clé » à retenir, en bas, pleine largeur */
.mccf-cle{
  margin-top:18px; display:flex; align-items:flex-start; gap:12px;
  background:linear-gradient(135deg,#f6edff,#fdeffb); border:1px solid #ecd9fb; border-radius:16px; padding:15px 18px;
}
.mccf-cle-lbl{ flex:0 0 auto; font-size:.68rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:#fff; background:linear-gradient(135deg,#a855f7,#e879f9); padding:5px 11px; border-radius:999px; margin-top:1px; }
.mccf-cle-txt{ color:#241046; font-weight:600; line-height:1.5; }
/* chargement */
.mccf-loading{ text-align:center; padding:34px 10px 24px; }
.mccf-spinner{ width:46px; height:46px; margin:0 auto 18px; border-radius:50%; border:4px solid #ece6f8; border-top-color:#a855f7; animation:mccf-spin .8s linear infinite; }
@keyframes mccf-spin{ to{ transform:rotate(360deg); } }
.mccf-loading-txt{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.1rem; color:#1c1233; }
.mccf-loading-sub{ color:#6b6486; font-size:.9rem; margin-top:8px; line-height:1.5; }
.mccf-retry{ margin-top:18px; background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; border:none; border-radius:999px; padding:10px 24px; font-weight:700; font-size:.9rem; cursor:pointer; box-shadow:0 10px 24px -8px rgba(124,58,237,.6); }
.mccf-retry:hover{ filter:brightness(1.06); }
/* surlignages IA (fond clair) */
.mccf-intro .hl, .mccf-case-txt .hl, .mccf-cle-txt .hl{ font-weight:700; padding:0 1px; border-radius:3px; }
.mccf-body .hl-key, .mccf-intro .hl-key, .mccf-case-txt .hl-key, .mccf-cle-txt .hl-key{ color:#8b2fd6; }
.mccf-body .hl-ok, .mccf-intro .hl-ok, .mccf-case-txt .hl-ok, .mccf-cle-txt .hl-ok{ color:#15a34a; }
.mccf-body .hl-warn, .mccf-intro .hl-warn, .mccf-case-txt .hl-warn, .mccf-cle-txt .hl-warn{ color:#db2777; }
.mccf-body .hl-info, .mccf-intro .hl-info, .mccf-case-txt .hl-info, .mccf-cle-txt .hl-info{ color:#0284c7; }
.mccf-body .hl-ex, .mccf-intro .hl-ex, .mccf-case-txt .hl-ex, .mccf-cle-txt .hl-ex{ color:#d97706; }

/* ═══════════════════════════════════════════════════════════
   Page de dépôt (étape 1) refondue au design « Qui es-tu ? »
   Carte blanche + police claire + texte minimal, Mele Mele au-dessus.
═══════════════════════════════════════════════════════════ */
#screen-quest-prep .prep-step-depot{ display:flex; flex-direction:column; align-items:center; }
#screen-quest-prep .depot-sub{ display:none; }
#screen-quest-prep .depot-foot{ display:none; }
#screen-quest-prep .prep-card{
  width:100%; max-width:560px; margin:4px auto 0; box-sizing:border-box;
  display:flex; flex-direction:column;
  background:#ffffff; border-radius:28px;
  padding:clamp(22px,2.6vw,32px) clamp(20px,2.6vw,32px) clamp(20px,2.4vw,28px);
  box-shadow:0 40px 100px -34px rgba(30,10,70,.65), 0 0 0 1px rgba(255,255,255,.5) inset;
  text-align:center;
}
/* Titre = EN-TÊTE de l'onglet : centré, tout en haut */
#screen-quest-prep .prep-card-title{
  flex:0 0 auto; text-align:center;
  font-family:'Clash Display','Outfit',sans-serif; font-weight:800; margin:0 0 18px;
  font-size:clamp(24px,3vw,36px); color:#1c1233; letter-spacing:.01em;
}
#screen-quest-prep .prep-card-title .depot-hl{ color:#a855f7; -webkit-text-fill-color:#a855f7; }
/* dropzone thème clair : remplit ~80% de la carte, SOUS le titre */
#screen-quest-prep .prep-card-dz{
  flex:0 0 auto; width:100%; box-sizing:border-box;
  min-height:clamp(190px,30vh,280px);
  background:#fbfaff !important; border:2px dashed #d9cdf3 !important; border-radius:20px; color:#3a2a6e;
  padding:28px 20px; cursor:pointer; box-shadow:none !important;
  transition:border-color .2s, background .2s, transform .2s;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
}
#screen-quest-prep .prep-card-dz:hover,
#screen-quest-prep .prep-card-dz.drag{ border-color:#a855f7 !important; background:#f6edff !important; transform:translateY(-2px); }
#screen-quest-prep .prep-card-dz .depot-dz-ic{
  width:56px; height:56px; border-radius:16px; display:inline-flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; box-shadow:0 10px 22px -8px rgba(124,58,237,.6); margin-bottom:4px;
}
#screen-quest-prep .prep-card-dz .qb-dz-main{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.12rem; color:#1c1233; }
#screen-quest-prep .prep-card-dz .qb-dz-sub{ color:#6b6486; font-size:.88rem; }
#screen-quest-prep .prep-card .qb-docs{ margin-top:12px; }
/* annales : repli discret optionnel */
#screen-quest-prep .prep-annales-fold{ margin-top:14px; text-align:left; }
#screen-quest-prep .prep-annales-fold > summary{
  cursor:pointer; list-style:none; text-align:center; color:#8b5cf6; font-weight:600; font-size:.9rem; padding:6px;
}
#screen-quest-prep .prep-annales-fold > summary::-webkit-details-marker{ display:none; }
#screen-quest-prep .prep-annales-fold > summary span{ color:#9b93b8; font-weight:400; }
#screen-quest-prep .prep-annales-fold[open] > summary{ margin-bottom:8px; }
#screen-quest-prep .prep-annales-fold .prep-annales-mini{
  background:#fbfaff !important; border:2px dashed #e2d9f5 !important; border-radius:16px !important; color:#6b6486; padding:18px; cursor:pointer;
  box-shadow:none !important; display:flex; flex-direction:column; align-items:center; gap:5px;
}
#screen-quest-prep .prep-annales-fold .prep-annales-mini:hover,
#screen-quest-prep .prep-annales-fold .prep-annales-mini.drag{ border-color:#a855f7 !important; background:#f6edff !important; }
#screen-quest-prep .prep-annales-fold .prep-annales-mini svg{ color:#a855f7; }
#screen-quest-prep .prep-annales-fold .prep-annales-mini .qb-dz-main{ color:#3a2a6e; font-weight:600; font-size:.95rem; }
#screen-quest-prep .prep-annales-fold .prep-annales-mini .qb-dz-sub{ color:#9b93b8; font-size:.82rem; }

/* Fichier déposé : VIOLET (pas vert) et lisible sur la carte blanche */
#screen-quest-prep .prep-card .depot-confirm .qb-doc{
  background:rgba(168,85,247,.08) !important; border:1px solid rgba(168,85,247,.30) !important;
  border-radius:14px; padding:14px 16px; margin-top:14px;
}
#screen-quest-prep .prep-card .qb-doc-ic{ background:rgba(168,85,247,.16) !important; color:#a855f7 !important; }
#screen-quest-prep .prep-card .qb-doc-name{ color:#1c1233; }
#screen-quest-prep .prep-card .qb-doc-size{ color:#6b6486; }
#screen-quest-prep .prep-card .qb-doc-ok{ color:#a855f7 !important; }
#screen-quest-prep .prep-card .qb-doc-del{ color:#9b93b8; }
#screen-quest-prep .prep-card .qb-doc-del:hover{ background:rgba(244,114,114,.14); color:#f47272; }

/* Flèche de retour VRAIMENT dans le coin haut-gauche de l'écran */
#screen-quest-prep .qb-back{ position:fixed; top:16px; left:16px; z-index:40; }

/* ═══════════════════════════════════════════════════════════
   Carte « Diaporama » (4e choix) + état grisé (PDF uniquement)
═══════════════════════════════════════════════════════════ */
.mcc-card-diapo .mcc-ic{ background:linear-gradient(135deg,#6366f1,#38bdf8); box-shadow:0 10px 24px -8px rgba(56,189,248,.6); }
.mcc-card.is-disabled{ opacity:.5; filter:grayscale(.6); }
.mcc-lock{ display:inline-block; margin-top:6px; font-size:.66rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#8b8397; background:#f0eef7; border-radius:999px; padding:3px 10px; }

/* ═══════════════════════════════════════════════════════════
   Viewer DIAPORAMA : vraies pages du PDF + Mélé Mélé qui commente
═══════════════════════════════════════════════════════════ */
.dv-overlay{
  position:fixed; inset:0; z-index:1300; display:flex; flex-direction:column;
  background:radial-gradient(120% 120% at 50% 0%, #1a1030, #0a0618 70%);
}
.dv-overlay[hidden]{ display:none; }
.dv-close{
  position:absolute; top:16px; right:16px; z-index:5; width:42px; height:42px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); color:#fff; transition:.2s;
}
.dv-close:hover{ background:rgba(255,255,255,.16); transform:rotate(90deg); }
.dv-close svg{ width:18px; height:18px; }
.dv-stage{ flex:1 1 auto; min-height:0; display:flex; align-items:center; justify-content:center; gap:14px; padding:44px 18px 10px; }
.dv-slide-wrap{ flex:0 1 auto; max-width:min(1100px,92vw); max-height:100%; display:flex; align-items:center; justify-content:center; }
.dv-slide-img{
  max-width:100%; max-height:70vh; border-radius:14px; background:#fff;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
}
.dv-nav{
  flex:0 0 auto; width:52px; height:52px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); color:#fff; transition:.2s;
}
.dv-nav:hover{ background:rgba(168,85,247,.35); border-color:rgba(196,181,253,.6); transform:scale(1.06); }
.dv-nav svg{ width:24px; height:24px; }
.dv-dock{
  flex:0 0 auto; display:flex; align-items:center; gap:14px;
  padding:14px clamp(16px,3vw,40px) calc(16px + env(safe-area-inset-bottom));
  background:linear-gradient(0deg, rgba(10,6,24,.92), rgba(10,6,24,.35));
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-top:1px solid rgba(255,255,255,.08);
}
.dv-mele{ flex:0 0 auto; width:52px; height:52px; }
.dv-mele svg{ width:100%; height:100%; }
.dv-bubble{
  flex:1 1 auto; min-width:0; position:relative; background:#fff; color:#241046; border-radius:16px;
  padding:13px 18px; font-size:clamp(.95rem,1.4vw,1.12rem); line-height:1.45; font-weight:500;
  max-height:22vh; overflow-y:auto;
}
.dv-bubble::before{ content:""; position:absolute; left:-8px; top:20px; border:8px solid transparent; border-right-color:#fff; border-left:0; }
.dv-play{
  flex:0 0 auto; width:50px; height:50px; border-radius:50%; cursor:pointer; color:#fff;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#7c3aed,#a855f7); border:none; box-shadow:0 10px 24px -8px rgba(124,58,237,.7); transition:.2s;
}
.dv-play:hover{ filter:brightness(1.08); transform:scale(1.05); }
.dv-count{ flex:0 0 auto; color:#c4b5fd; font-weight:700; font-size:.9rem; font-variant-numeric:tabular-nums; min-width:52px; text-align:center; }
.dv-msg{ margin:auto; text-align:center; color:#fff; padding:24px; }
.dv-spinner{ width:46px; height:46px; margin:0 auto 16px; border-radius:50%; border:4px solid rgba(255,255,255,.15); border-top-color:#a855f7; animation:mccf-spin .8s linear infinite; }
.dv-msg-txt{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.15rem; }
.dv-msg-sub{ color:#a99fce; font-size:.92rem; margin-top:8px; }
@media (max-width:640px){ .dv-nav{ width:42px; height:42px; } .dv-slide-img{ max-height:56vh; } .dv-mele{ width:42px; height:42px; } }

/* ═══════════════════════════════════════════════════════════
   NOUVEAU CHAPITRE : dépôt PDF obligatoire + écran de génération
═══════════════════════════════════════════════════════════ */
.nc-overlay{
  position:fixed; inset:0; z-index:1350; display:flex; align-items:center; justify-content:center; padding:24px;
  background:rgba(10,4,26,.66); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); animation:mcc-fade .22s ease;
}
.nc-overlay[hidden]{ display:none; }
.nc-modal{
  position:relative; width:100%; max-width:520px; box-sizing:border-box;
  background:#fff; border-radius:28px; padding:clamp(28px,3vw,42px) clamp(22px,2.6vw,36px) clamp(24px,2.6vw,34px);
  box-shadow:0 40px 100px -30px rgba(30,10,70,.7); text-align:center; animation:mcc-pop .34s cubic-bezier(.22,1,.36,1);
  display:flex; flex-direction:column; align-items:center;
}
.nc-close{
  position:absolute; top:14px; right:14px; width:36px; height:36px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center; background:#f2eefb; border:1px solid #e7e1f5; color:#6b6486; transition:.2s;
}
.nc-close:hover{ background:#eadcff; color:#3a2a6e; transform:rotate(90deg); }
.nc-close svg{ width:15px; height:15px; }
.nc-mele{ width:76px; height:76px; margin-bottom:6px; filter:drop-shadow(0 8px 18px rgba(124,58,237,.35)); }
.nc-mele svg{ width:100%; height:100%; }
.nc-mele--busy{ animation:nc-float 2.4s ease-in-out infinite; }
@keyframes nc-float{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-8px); } }
.nc-title{ font-family:'Clash Display','Outfit',sans-serif; font-weight:800; font-size:clamp(22px,2.6vw,32px); color:#1c1233; margin:2px 0 4px; }
.nc-title span{ color:#a855f7; }
.nc-sub{ color:#6b6486; font-size:.95rem; margin:0 0 20px; }
.nc-dz{
  width:100%; box-sizing:border-box; min-height:clamp(170px,26vh,240px);
  background:#fbfaff; border:2px dashed #d9cdf3; border-radius:20px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:26px 18px;
  transition:border-color .2s, background .2s, transform .2s;
}
.nc-dz:hover, .nc-dz.drag{ border-color:#a855f7; background:#f6edff; transform:translateY(-2px); }
.nc-dz-ic{ width:56px; height:56px; border-radius:16px; display:inline-flex; align-items:center; justify-content:center; color:#fff; background:linear-gradient(135deg,#7c3aed,#a855f7); box-shadow:0 10px 22px -8px rgba(124,58,237,.6); }
.nc-dz-main{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1.1rem; color:#1c1233; }
.nc-dz-sub{ color:#6b6486; font-size:.88rem; }
.nc-fileinfo{ margin-top:12px; width:100%; box-sizing:border-box; background:rgba(168,85,247,.08); border:1px solid rgba(168,85,247,.3); border-radius:12px; padding:10px 14px; color:#1c1233; font-weight:600; font-size:.9rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nc-start{
  margin-top:18px; width:100%; box-sizing:border-box; border:none; cursor:pointer;
  font-family:'Clash Display','Outfit',sans-serif; font-weight:700; font-size:1rem; color:#fff;
  background:linear-gradient(135deg,#7c3aed,#a855f7); border-radius:16px; padding:15px 20px;
  box-shadow:0 16px 34px -12px rgba(124,58,237,.7); transition:filter .2s, transform .2s, opacity .2s;
}
.nc-start:hover:not(:disabled){ filter:brightness(1.07); transform:translateY(-1px); }
.nc-start:disabled{ opacity:.45; cursor:not-allowed; }
.nc-later{ margin-top:10px; background:transparent; border:none; color:#8b5cf6; font-weight:600; font-size:.9rem; cursor:pointer; padding:6px; }
.nc-later:hover{ color:#6d28d9; }
/* écran de génération */
.nc-modal--gen .nc-gen-label{ font-family:'Clash Display','Outfit',sans-serif; font-weight:700; color:#3a2a6e; font-size:1rem; margin:2px 0 14px; min-height:1.2em; }
.nc-bar{ width:100%; height:12px; border-radius:999px; background:#efe8fb; overflow:hidden; }
.nc-bar-fill{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#7c3aed,#e879f9); transition:width .5s ease; box-shadow:0 0 14px rgba(168,85,247,.6); }
.nc-gen-hint{ color:#6b6486; font-size:.86rem; line-height:1.5; margin:16px 0 0; }

/* ═══════════════════════════════════════════════════════════
   FLÈCHE « RETOUR » UNIFIÉE — même look que la page de connexion
   (chevron blanc flottant + halo violet au survol) appliqué à TOUTES
   les flèches de retour du site. Exclut volontairement les faces de
   flashcards et les boutons libellés (pas des flèches de navigation).
═══════════════════════════════════════════════════════════ */
.btn-back,
.mc-back, .cmp-back, .qb-back,
.sv-back-btn, .sv-nav-back-btn,
.notes-back-btn, .ne-back-btn, .fc-back-btn,
.galaxy-back, .gpo-back, .mdj-back, .dp-back,
.bib-back, .aa-solo-back-btn, .qs5-back {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  color: #ffffff !important;
  cursor: pointer !important;
  font-size: 0 !important;                 /* masque les flèches en caractère (←) ou libellés éventuels */
  line-height: 0 !important;
  align-items: center; justify-content: center;
  opacity: .95;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,.35));
  transition: transform .18s ease, opacity .18s ease, filter .18s ease;
}
/* On masque l'icône d'origine (formes hétérogènes : chevron, flèche à hampe…) */
.btn-back > svg,
.mc-back > svg, .cmp-back > svg, .qb-back > svg,
.sv-back-btn > svg, .sv-nav-back-btn > svg,
.notes-back-btn > svg, .ne-back-btn > svg, .fc-back-btn > svg,
.galaxy-back > svg, .gpo-back > svg, .mdj-back > svg, .dp-back > svg,
.bib-back > svg, .aa-solo-back-btn > svg, .qs5-back > svg { display: none !important; }
/* …et on dessine PARTOUT la même flèche que la page de connexion */
.btn-back::before,
.mc-back::before, .cmp-back::before, .qb-back::before,
.sv-back-btn::before, .sv-nav-back-btn::before,
.notes-back-btn::before, .ne-back-btn::before, .fc-back-btn::before,
.galaxy-back::before, .gpo-back::before, .mdj-back::before, .dp-back::before,
.bib-back::before, .aa-solo-back-btn::before, .qs5-back::before {
  content: ""; display: block; width: 27px; height: 27px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E") center/contain no-repeat;
}
.btn-back:hover,
.mc-back:hover, .cmp-back:hover, .qb-back:hover,
.sv-back-btn:hover, .sv-nav-back-btn:hover,
.notes-back-btn:hover, .ne-back-btn:hover, .fc-back-btn:hover,
.galaxy-back:hover, .gpo-back:hover, .mdj-back:hover, .dp-back:hover,
.bib-back:hover, .aa-solo-back-btn:hover, .qs5-back:hover {
  opacity: 1; transform: scale(1.06);
  filter: drop-shadow(0 0 12px rgba(196,181,253,.95)) drop-shadow(0 0 22px rgba(139,92,246,.6));
}
.btn-back:active,
.mc-back:active, .cmp-back:active, .qb-back:active,
.sv-back-btn:active, .sv-nav-back-btn:active,
.notes-back-btn:active, .ne-back-btn:active, .fc-back-btn:active,
.galaxy-back:active, .gpo-back:active, .mdj-back:active, .dp-back:active,
.bib-back:active, .aa-solo-back-btn:active, .qs5-back:active { transform: scale(.95); }

/* ══ Parcours de jeu des professeurs (2026-10-04) ══ */
/* étudiant : « De ton professeur » sous les chapitres (barre latérale) et sous les cartes */
.mv2 .side .pp-side-t{margin:10px 0 2px 40px;font:700 11px var(--texte);letter-spacing:.14em;text-transform:uppercase;color:var(--cf,#8A5CD8)}
.mv2 .side .pp-ligne{gap:8px}
.mv2 .side .pp-ligne .pp-ic{width:18px;height:18px;flex:none;color:var(--cf,#8A5CD8)}
.mv2 .side .pp-ligne .pp-ic svg{width:18px;height:18px}
.mv2 .pp-nouveau{margin-left:auto;padding:2px 8px;border-radius:99px;font:700 11px var(--texte);color:#fff;background:linear-gradient(90deg,#E86BDA,#6A55D8);white-space:nowrap}
.mv2 .pp-sec{margin-top:18px}
.mv2 .pp-sec-t{display:flex;align-items:center;gap:8px;margin:0 0 12px;font:700 12.5px var(--texte);letter-spacing:.16em;text-transform:uppercase;color:rgba(201,184,255,.9)}
.mv2 .pp-sec-t svg{width:18px;height:18px}
.mv2 .carte.teinte.carte-pp{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(120deg,#E86BDA,#6A55D8) border-box;border:2px solid transparent;box-shadow:0 24px 50px -26px rgba(0,0,0,.85)}
.mv2 .carte-pp .pp-par{font:700 11px var(--texte);letter-spacing:.12em;text-transform:uppercase;color:var(--cf)}
.mv2 .carte-pp .pp-nouveau{position:absolute;top:14px;right:14px}
.mv2 .carte.carte-pp h2{margin-right:0}
.mv2 .carte.carte-pp .pp-info{margin:-2px 0 10px;font:400 14px var(--texte);color:#7A70A8}

/* professeur : barre latérale = sa matière + ses promotions */
body.role-prof .mv2 .side > .promo, body.role-prof .mv2 .side > .side-tete, body.role-prof .mv2 .side > .tout, body.role-prof .mv2 .side > .side-titre, body.role-prof .mv2 .side > .side-ajout{display:none !important}
.mv2 .pd-mat{display:flex;align-items:center;gap:12px;padding:14px;margin-bottom:8px;border-radius:16px;background:linear-gradient(120deg,#FCEBF8,#EEE9FF)}
.mv2 .pd-mat-ic{width:40px;height:40px;flex:none;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#E86BDA,#6A55D8)}
.mv2 .pd-mat-ic svg{width:20px;height:20px}
.mv2 .pd-mat small{display:block;font:700 11px var(--texte);letter-spacing:.14em;text-transform:uppercase;color:#8A5CD8}
.mv2 .pd-mat b{display:block;font:800 1.15rem/1.15 var(--affiche);color:var(--encre)}
.mv2 .side .side-titre.pd-t{display:block;margin:12px 6px 6px;color:#A49BCB}
.mv2 .side .pd-promo{padding:10px 12px;font:700 15px var(--texte);color:var(--encre)}
.mv2 .side .pd-promo svg{width:19px;height:19px;flex:none;color:#8A5CD8}
.mv2 .side .pd-promo.on svg{color:#fff}
.mv2 .side .pd-promo .t small{display:block;font:400 12.5px var(--texte);opacity:.7}
.mv2 .pd-charge{margin:8px 12px;color:#A49BCB;font:400 14px var(--texte)}

/* professeur : contenu */
.mv2 .pd{color:#fff}
.mv2 .pd-kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px;margin-bottom:26px}
.mv2 .pd-kpi{padding:18px 18px 16px;border-radius:20px;background:#fff;color:var(--encre);box-shadow:0 24px 50px -26px rgba(0,0,0,.85)}
.mv2 .pd-kpi b{display:block;font:800 2.1rem/1 var(--affiche);background:linear-gradient(90deg,#E86BDA,#6A55D8);-webkit-background-clip:text;background-clip:text;color:transparent}
.mv2 .pd-kpi span{display:block;margin-top:6px;font:400 14.5px var(--texte);color:#7A70A8}
.mv2 .pd-h{margin:0 0 12px;font:700 12.5px var(--texte);letter-spacing:.16em;text-transform:uppercase;color:rgba(201,184,255,.9)}
.mv2 .pd-promos{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}
.mv2 .pd-promo-c{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:18px;border:0;border-radius:20px;background:#fff;color:var(--encre);text-align:left;cursor:pointer;box-shadow:0 24px 50px -26px rgba(0,0,0,.85);transition:transform .2s,box-shadow .2s}
.mv2 .pd-promo-c:hover{transform:translateY(-3px);box-shadow:0 30px 56px -24px rgba(236,107,221,.55)}
.mv2 .pd-promo-c b{font:800 1.5rem/1.1 var(--affiche)}
.mv2 .pd-promo-c span{font:700 14px var(--texte);color:#8A5CD8}
.mv2 .pd-promo-c small{font:400 14px var(--texte);color:#7A70A8}
.mv2 .pd-promo-c em{margin-top:10px;padding:4px 10px;border-radius:99px;font:700 12.5px var(--texte);font-style:normal;color:#6A55D8;background:#F3EFFF}
.mv2 .pd-tete{margin-bottom:16px}
.mv2 .pd-tete h2{margin:0;font:800 2rem/1.1 var(--affiche)}
.mv2 .pd-tete p{margin:4px 0 0;color:rgba(201,184,255,.85);font:400 15.5px var(--texte)}
.mv2 .pd-creer{display:flex;align-items:center;gap:16px;width:100%;max-width:720px;margin-bottom:28px;padding:18px 22px;border:0;border-radius:22px;text-align:left;color:#fff;cursor:pointer;background:linear-gradient(90deg,#E86BDA 0%,#A45BD6 50%,#6A55D8 100%);box-shadow:0 20px 40px -18px rgba(236,107,221,.8);transition:transform .2s,box-shadow .2s}
.mv2 .pd-creer:hover{transform:translateY(-2px);box-shadow:0 26px 46px -18px rgba(236,107,221,.95)}
.mv2 .pd-creer:disabled{opacity:.6;cursor:wait}
.mv2 .pd-plus{width:48px;height:48px;flex:none;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.22)}
.mv2 .pd-plus svg{width:24px;height:24px}
.mv2 .pd-creer b{display:block;font:800 1.3rem/1.15 var(--affiche)}
.mv2 .pd-creer small{display:block;margin-top:3px;font:400 14.5px var(--texte);opacity:.92}
.mv2 .pd-liste{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.mv2 .pd-pc{display:flex;flex-direction:column;padding:18px;border-radius:20px;background:#fff;color:var(--encre);box-shadow:0 24px 50px -26px rgba(0,0,0,.85)}
.mv2 .pd-statut{align-self:flex-start;padding:3px 10px;border-radius:99px;font:700 12px var(--texte);color:#8A83AE;background:#F2F0F7}
.mv2 .pd-pc.publie .pd-statut{color:#0F8C7E;background:#E2F7F1}
.mv2 .pd-pc h4{margin:10px 0 2px;font:800 1.2rem/1.2 var(--affiche)}
.mv2 .pd-meta{margin:0 0 12px;font:400 14px var(--texte);color:#7A70A8}
.mv2 .pd-mini{display:flex;flex-wrap:wrap;gap:4px 14px;margin-bottom:8px;font:400 13.5px var(--texte);color:#5E5689}
.mv2 .pd-mini b{color:var(--encre)}
.mv2 .pd-pc .jauge{display:block;flex:none;margin-bottom:14px}
.mv2 .pd-btns{display:flex;gap:8px;margin-top:auto}
.mv2 .pd-b{display:inline-flex;align-items:center;gap:7px;padding:9px 14px;border:0;border-radius:12px;font:700 14px var(--texte);color:var(--encre);background:#F3EFFF;cursor:pointer}
.mv2 .pd-b:hover{background:#E6DEFF}
.mv2 .pd-b svg{width:16px;height:16px}
.mv2 .pd-b.grad{color:#fff;background:linear-gradient(90deg,#E86BDA,#6A55D8)}
.mv2 .pd-b.pd-x{margin-left:auto;padding:9px 10px;color:#D63A6F;background:none}
.mv2 .pd-b.pd-x:hover{background:#FDEBEF}
.mv2 .pd-vide{color:rgba(201,184,255,.8);font:400 15px var(--texte)}
body.role-prof .mv2 .outils .outil-diam{display:none !important}

/* barre latérale du professeur : ses promotions (2026-10-04) */
.mv2 .side .pd-promo.pd-fixe{cursor:default}
.mv2 .side .pd-promo.pd-fixe:hover{background:none}

/* le professeur n'a pas la fiche de révision (2026-10-04) : ni sur la carte du chapitre, ni dans la page de jeu */
body.role-prof .mv2 .choix [data-act="fiche"],body.role-prof [data-jx="fiche"]{display:none!important}
