@charset "UTF-8";

:root {
  --cyan-neon: #38bdf8;
  --cyan-bright: #00f0ff;
  --ice-panel: #d5ebff;
  --ice-panel-2: #b8dcff;
  --navy-deep: #040b1c;
  --navy-hud: rgba(7, 18, 42, 0.92);
  --navy-glass: rgba(9, 24, 54, 0.84);
  --border-cyan: rgba(56, 189, 248, 0.78);
  --text-white: #ffffff;
  --text-cyan: #7dd3fc;
  --text-dark: #071633;
  --font-main: 'Exo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #02050e;
  font-family: var(--font-main);
  color: var(--text-white);
}

#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none !important;
}

#canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none !important;
}

#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.interactive {
  pointer-events: auto;
}

/* ==========================================================================
   REGLES FONDAMENTALES D'INTERFACE (AUDIT GLOBAL DES BOUTONS & MODALS)
   ========================================================================== */

/* 1. TOUS LES BOUTONS DU JEU : Réactivité tactile instantanée et propre */
button,
.art-hitbox-btn,
.scifi-roll-btn,
.lobby-action-btn,
.lobby-add-player-btn,
.choice-btn,
.hex-icon-btn,
.carousel-arrow-btn,
.intro-skip-btn,
.intro-enter-btn,
.replay-intro-pill,
.de-joker-btn,
.scifi-mode-tab {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* 2. AUCUN ENFANT D'UN BOUTON NE DOIT INTERCEPTER LE CLIC (Évite que <span> ou icône avale le tap) */
button *,
.art-hitbox-btn *,
.scifi-roll-btn *,
.lobby-action-btn *,
.lobby-add-player-btn *,
.choice-btn *,
.hex-icon-btn *,
.carousel-arrow-btn *,
.intro-skip-btn *,
.intro-enter-btn *,
.replay-intro-pill *,
.de-joker-btn *,
.scifi-mode-tab * {
  pointer-events: none !important;
}

/* 3. TOUS LES MODALS & OVERLAYS INACTIFS : Entièrement masqués et transparents aux clics */
.intro-video-overlay.hidden,
.start-screen-overlay.hidden,
.lobby-overlay:not(.active),
.cockpit-Split-overlay:not(.active),
.discovery-split-overlay:not(.active),
.modal-backdrop:not(.active) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* 4. TOUS LES MODALS ACTIFS : Affichage forcé et clics autorisés */
.lobby-overlay.active,
.cockpit-Split-overlay.active,
.discovery-split-overlay.active,
.modal-backdrop.active {
  display: flex !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Quand la fenêtre de question ou de découverte est active : priorité z-index et boutons désactivés */
.cockpit-Split-overlay.active {
  z-index: 200 !important;
}
.discovery-split-overlay.active {
  z-index: 210 !important;
}

button:disabled,
.scifi-mode-tab:disabled {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

/* ==========================================================================
   0. CINÉMATIQUE D'INTRODUCTION (L'Odyssée de LIA en Temps Réel 60fps)
   ========================================================================== */
.intro-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: #02050e;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: opacity 0.42s ease;
  overflow: hidden;
}

.intro-video-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

#intro-cinematic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none !important;
}

#intro-video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  z-index: 2;
  background: transparent;
  pointer-events: none !important;
}

.intro-top-bar {
  position: relative;
  z-index: 1000 !important;
  pointer-events: auto !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 18px 12px;
}

.intro-brand-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(6, 18, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.55);
  backdrop-filter: blur(8px);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
  pointer-events: none;
}

.intro-skip-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 1001 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
}

.intro-bottom-story {
  position: relative;
  z-index: 1000 !important;
  pointer-events: auto !important;
  padding: 18px 20px max(26px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.intro-chapter-badge {
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.24), rgba(56, 189, 248, 0.28));
  border: 1px solid rgba(251, 191, 36, 0.65);
  color: #fde68a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

.intro-subtitle-text {
  max-width: 480px;
  font-size: clamp(15px, 4.1vw, 18px);
  line-height: 1.45;
  font-weight: 600;
  color: #f8fafc;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 0 22px rgba(56, 189, 248, 0.45);
  min-height: 3.9em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-progress-track {
  width: 100%;
  max-width: 360px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.intro-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #00f0ff 50%, #fbbf24 100%);
  box-shadow: 0 0 12px #00f0ff;
  transition: width 0.1s linear;
}

.intro-video-controls {
  position: absolute;
  bottom: max(36px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 90%;
  max-width: 340px;
  pointer-events: auto !important;
}

.intro-hint-text {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}

.intro-enter-btn,
.btn-enter-galaxy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 15px 32px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 55%, #f59e0b 100%);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 1001 !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.intro-enter-btn.origins-enter-btn,
.btn-enter-galaxy.origins-enter-btn {
  border-color: rgba(254, 243, 199, 0.95);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 55%, #b45309 100%);
  color: #fffbeb;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 26px rgba(245, 158, 11, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.intro-enter-btn.oceans-enter-btn,
.btn-enter-galaxy.oceans-enter-btn {
  border-color: rgba(186, 230, 253, 0.95);
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%);
  color: #f0f9ff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 26px rgba(14, 165, 233, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.intro-enter-btn.animaux-enter-btn,
.btn-enter-galaxy.animaux-enter-btn {
  border-color: rgba(217, 249, 157, 0.95);
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 55%, #4d7c0f 100%);
  color: #f7fee7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 26px rgba(132, 204, 22, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.intro-enter-btn.merveilles-enter-btn,
.btn-enter-galaxy.merveilles-enter-btn {
  border-color: rgba(254, 249, 195, 0.95);
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 55%, #a16207 100%);
  color: #fefce8;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 26px rgba(234, 179, 8, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.intro-enter-btn.moyenage-enter-btn,
.btn-enter-galaxy.moyenage-enter-btn {
  border-color: rgba(254, 215, 170, 0.95);
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 55%, #7f1d1d 100%);
  color: #fef3c7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 26px rgba(220, 38, 38, 0.62), inset 0 1px 2px rgba(255, 255, 255, 0.45);
}

.intro-enter-btn.it-enter-btn,
.btn-enter-galaxy.it-enter-btn {
  border-color: rgba(165, 243, 252, 0.95);
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 55%, #1d4ed8 100%);
  color: #ecfeff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 26px rgba(34, 211, 238, 0.65), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.intro-enter-btn:hover,
.btn-enter-galaxy:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.intro-enter-btn:active,
.btn-enter-galaxy:active {
  transform: translateY(1px) scale(0.97);
}

.replay-intro-pill {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 16px;
  z-index: 15;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid rgba(125, 211, 252, 0.85);
  background: rgba(8, 22, 52, 0.78);
  backdrop-filter: blur(8px);
  color: #e0f2fe;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

/* ==========================================================================
   1. START MENU SCREEN (Exact Full-Screen Match to design/menu-accueil-lia.png)
   ========================================================================== */
.start-screen-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at center, #081530 0%, #02040a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.start-screen-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.start-art-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}

/* Interactive Frosted-Glass Buttons (identical size, single layer) */
.art-hitbox-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 68%;
  max-width: 320px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(90deg, rgba(235, 198, 152, 0.88) 0%, rgba(200, 195, 225, 0.85) 50%, rgba(126, 179, 238, 0.90) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 800;
  letter-spacing: 0.8px;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  z-index: 100 !important;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 0 28px rgba(125, 211, 252, 0.65),
    0 8px 25px rgba(0, 0, 0, 0.55),
    inset 0 0 18px rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  overflow: hidden;
}

.solo-hitbox {
  top: 71%;
  z-index: 101 !important;
}

.multi-hitbox {
  top: 82%;
  z-index: 101 !important;
}

.art-hitbox-btn:hover,
.art-hitbox-btn:active {
  transform: translateX(-50%) scale(1.04);
  box-shadow:
    0 0 42px rgba(0, 240, 255, 0.95),
    0 10px 30px rgba(0, 0, 0, 0.65),
    inset 0 0 24px rgba(255, 255, 255, 0.85);
}

.hitbox-text {
  position: relative;
  z-index: 2;
  pointer-events: none !important;
  text-shadow: 0 2px 10px rgba(30, 58, 138, 0.45);
}

.sparkle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none !important;
  background-image:
    radial-gradient(circle at 18% 32%, rgba(255,255,255,0.9) 0%, transparent 4px),
    radial-gradient(circle at 76% 28%, rgba(255,255,255,0.85) 0%, transparent 3px),
    radial-gradient(circle at 84% 72%, rgba(186,230,253,0.9) 0%, transparent 4px),
    radial-gradient(circle at 28% 75%, rgba(255,255,255,0.8) 0%, transparent 3px);
}

.multi-popup-card {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: 86%;
  max-width: 340px;
  background: rgba(7, 18, 42, 0.95);
  border: 1.5px solid var(--cyan-bright);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 240, 255, 0.45);
  text-align: center;
  z-index: 15;
}

.multi-popup-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-cyan);
  margin-bottom: 8px;
}

.player-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.player-count-btn {
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(15, 34, 72, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.player-count-btn.active {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  color: #030918;
  border-color: #fff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.65);
}

.scifi-launch-multi-btn {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid #e0f2fe;
  background: linear-gradient(90deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
}

/* ==========================================================================
   2. TOP TRAPEZOID SCI-FI HEADER & BOARD OVERVIEW HUD
   ========================================================================== */
.scifi-top-bar {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 10px 14px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#btn-reset-cam {
  display: none !important;
}

.trapezoid-header {
  min-width: 220px;
  padding: 8px 28px 10px;
  background: linear-gradient(180deg, rgba(16, 40, 84, 0.95) 0%, rgba(8, 22, 52, 0.92) 100%);
  border-bottom: 2px solid var(--cyan-bright);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.35);
}

.trapezoid-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.65);
}

.trapezoid-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-cyan);
  margin-top: 1px;
}

.hex-icon-btn {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(20, 48, 98, 0.92) 0%, rgba(8, 20, 46, 0.95) 100%);
  border: 1.5px solid var(--cyan-neon);
  clip-path: polygon(25% 5%, 75% 5%, 98% 50%, 75% 95%, 25% 95%, 2% 50%);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.hex-icon-btn.small {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.hex-icon-btn.close-red-dot {
  position: relative;
}

/* Floating NASA Callout Box on Board (matching plateau-galaxy-overview.jpg) */
.board-callout {
  align-self: flex-end;
  margin-right: 16px;
  margin-top: auto;
  margin-bottom: 10px;
  max-width: 245px;
  background: rgba(8, 22, 48, 0.88);
  border: 1.5px solid rgba(125, 211, 252, 0.75);
  clip-path: polygon(0 0, 94% 0, 100% 16%, 100% 100%, 6% 100%, 0 84%);
  padding: 10px 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65), 0 0 18px rgba(0, 240, 255, 0.25);
}

.callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.nasa-mini-dot {
  background: #0b3d91;
  border: 1px solid #38bdf8;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.callout-body {
  font-size: 11.5px;
  line-height: 1.35;
  color: #cbd5e1;
}

/* Bottom Board Controls - Boutons flottants directement sur le plateau (sans bande noire) */
.bottom-board-bar {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 6px 16px max(14px, env(safe-area-inset-bottom));
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none !important;
}

.mode-switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  pointer-events: none !important;
}

/* un seul bouton (Test), tout à gauche */
.mode-switch-row.one-slot-left {
  grid-template-columns: max-content;
  justify-content: start;
}

.mode-switch-row.three-slots {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.mode-switch-row.three-slots .scifi-mode-tab {
  font-size: 13.5px;
  gap: 6px;
  padding: 0 8px;
}

.mode-switch-row.three-slots .mode-num-badge {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.scifi-tab-reserved {
  border-style: dashed !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  color: #94a3b8 !important;
  opacity: 0.72;
}

.scifi-mode-tab {
  height: 52px;
  background: rgba(10, 26, 58, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(56, 189, 248, 0.55);
  border-radius: 12px;
  color: #e2e8f0;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 14px;
  cursor: pointer;
  pointer-events: auto !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.joker-info-tab {
  pointer-events: auto !important;
  cursor: default;
}

.holo-timeline {
  pointer-events: none !important;
}

.scifi-mode-tab.active {
  background: linear-gradient(90deg, rgba(14, 116, 180, 0.85) 0%, rgba(29, 78, 216, 0.85) 100%);
  border-color: var(--cyan-bright);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.45);
}

.scifi-mode-tab.teleport-tab {
  background: linear-gradient(135deg, rgba(35, 12, 65, 0.9) 0%, rgba(68, 18, 110, 0.9) 100%);
  border-color: rgba(192, 132, 252, 0.75);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
  color: #f5d0fe;
}

.scifi-mode-tab.teleport-tab .mode-num-badge {
  background: rgba(168, 85, 247, 0.5);
  border-color: #d8b4fe;
  color: #ffffff;
}

.scifi-mode-tab.teleport-tab:not(:disabled):active {
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.8);
  transform: scale(0.97);
}

.scifi-mode-tab.teleport-tab:disabled {
  opacity: 0.38;
  filter: grayscale(0.5);
  cursor: not-allowed !important;
}

.mode-num-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.35);
  border: 1.5px solid #7dd3fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  font-weight: 800;
  color: #fff;
}

.scifi-roll-btn {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  border: 2px solid #bae6fd;
  background: linear-gradient(90deg, #0284c7 0%, #2563eb 50%, #0ea5e9 100%);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.55), inset 0 0 14px rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scifi-roll-btn:not(:disabled):not(.grayed-out) {
  animation: rollBtnTurnPulse 2.2s infinite ease-in-out;
}

@keyframes rollBtnTurnPulse {
  0%, 100% {
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.55), inset 0 0 12px rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 34px rgba(0, 240, 255, 0.88), 0 0 14px rgba(255, 255, 255, 0.65), inset 0 0 18px rgba(255, 255, 255, 0.5);
    transform: scale(1.015);
  }
}

.scifi-roll-btn:active {
  transform: scale(0.98);
}

.scifi-roll-btn:disabled,
.scifi-roll-btn.grayed-out {
  opacity: 0.42;
  filter: grayscale(0.85);
  cursor: not-allowed;
  box-shadow: none !important;
  border-color: #475569 !important;
  background: linear-gradient(90deg, #334155 0%, #1e293b 100%) !important;
  pointer-events: none;
}

/* Holographic Bottom Timeline : retirée */
.holo-timeline,
.timeline-track,
.timeline-labels,
.bottom-board-bar .timeline-labels {
  display: none !important;
}

/* ==========================================================================
   3. BANNIÈRE RÉSULTAT DU DÉ SUR LE PLATEAU & FENÊTRE DE QUESTION ÉPURÉE
   ========================================================================== */

/* Bannière flottante du résultat du dé directement au-dessus du dé sur le plateau */
.board-dice-banner-overlay {
  position: absolute;
  /* centrée en hauteur (Paul, 2026-11-05) */
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 18px)) scale(0.85);
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.25), transform 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.25), visibility 0.28s ease;
}

.board-dice-banner-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.board-dice-banner-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: radial-gradient(circle at center, rgba(14, 116, 204, 0.96) 0%, rgba(4, 15, 38, 0.98) 100%);
  border: 2px solid #38bdf8;
  border-radius: 22px;
  padding: 12px 26px;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.85), inset 0 0 16px rgba(255, 255, 255, 0.35);
  animation: diceBannerPulse 1.2s ease-in-out infinite alternate;
}

@keyframes diceBannerPulse {
  0% { box-shadow: 0 0 25px rgba(0, 240, 255, 0.65); transform: scale(0.98); }
  100% { box-shadow: 0 0 45px rgba(0, 240, 255, 1); transform: scale(1.02); }
}

.banner-dice-num {
  font-family: var(--font-main);
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-shadow: 0 0 16px #38bdf8;
}

.banner-dice-qui {
  font-family: var(--font-main);
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 900;
  color: #fde68a;
  max-width: 78vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.banner-dice-qui:empty { display: none; }
.banner-dice-qui.moi { color: #86efac; }
.banner-dice-face {
  display: inline-block;
  font-size: 1.35em;
  line-height: 1;
  vertical-align: -0.12em;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
}

.banner-dice-text {
  font-family: var(--font-main);
  font-size: clamp(11.5px, 3.2vw, 14px);
  font-weight: 800;
  color: #e0f2fe;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ==========================================================================
   FENÊTRE DE QUESTION PLEIN ÉCRAN SCI-FI (Occupe 100% de l'espace, ultra-lisible, zéro vide)
   ========================================================================== */
.cockpit-Split-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 25%, rgba(10, 26, 60, 0.98) 0%, rgba(2, 6, 18, 0.99) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: max(8px, env(safe-area-inset-top)) clamp(10px, 2.5vw, 24px) max(8px, env(safe-area-inset-bottom));
  margin: 0;
  width: 100vw;
  height: 100dvh;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cockpit-Split-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: flex !important;
}

.de-question-card.scifi-panorama-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: auto;   /* filet de sécurité : sur un petit téléphone, rien n'est coupé, ça défile en vertical */
  -webkit-overflow-scrolling: touch;
  gap: clamp(6px, 1.2vh, 12px);
  animation: cardScaleIn 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.15) forwards;
  margin: 0;
}

@keyframes cardScaleIn {
  0% { transform: scale(0.97); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 1. En-tête HUD : Destination & Timeline des 4 Catégories */
.scifi-panorama-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  flex-shrink: 0;
}

.question-target-pill {
  position: absolute;
  top: clamp(8px, 1.4vh, 12px);
  left: clamp(8px, 1.4vw, 12px);
  z-index: 5;
  max-width: calc(62% - 10px);
  padding: clamp(5px, 0.9vh, 8px) clamp(10px, 1.6vw, 16px);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(14, 40, 84, 0.92), rgba(8, 24, 56, 0.92));
  border: 1.5px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: clamp(12px, 1.8vw, 14.5px);
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65), 0 0 12px rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.category-timeline-track {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.8vw, 8px);
  position: relative;
  flex-shrink: 0;
  padding: 3px 8px;
  background: rgba(8, 18, 42, 0.82);
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.category-timeline-track .cat-track-line {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  height: 2px;
  background: rgba(56, 189, 248, 0.35);
  transform: translateY(-50%);
  z-index: 1;
}

.cat-node-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cat-node-btn .cat-node-icon {
  font-size: 15px;
  line-height: 1;
}

.cat-node-btn .cat-node-name {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.3px;
}

@media (max-width: 900px) {
  .cat-node-btn .cat-node-name {
    display: none;
  }
  .cat-node-btn {
    padding: 4px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    justify-content: center;
  }
  .cat-node-btn .cat-node-icon {
    font-size: 14px;
  }
}

.cat-node-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(217, 119, 6, 0.98));
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.85);
  transform: scale(1.1);
}

/* 2. Scène Centrale : Bannière Panoramique (2x hauteur) + Zone Question & Info Réduite et Agrandie */
.question-stage-assembly {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
  justify-content: stretch;
}

/* Bannière d'ambiance 16:9 cinématographique (2x la hauteur pour occuper tout l'espace sans vide) */
/* Bannière d'ambiance cinématique (hauteur ajustée pour accueillir la barre de décompte de temps) */
.question-panorama-assembly {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: clamp(110px, 18vh, 260px);
  max-height: clamp(180px, 32vh, 420px);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 0 20px rgba(0, 240, 255, 0.15);
}

.panorama-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  max-height: inherit;
  background: #040b1c;
  overflow: hidden;
}

/* Barre de temps qui diminue entre l'image et la question (visibilité immédiate, hauteur doublée, chiffres ultra-nets) */
.question-timer-countdown-bar {
  width: 100%;
  flex: 0 0 auto;
  min-height: clamp(52px, 6.5vh, 66px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  padding: clamp(6px, 1vh, 10px) clamp(14px, 2vw, 20px);
  background: rgba(8, 20, 48, 0.96);
  border: 2px solid rgba(56, 189, 248, 0.75);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), inset 0 0 20px rgba(14, 165, 233, 0.22);
  box-sizing: border-box;
}

.timer-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.88);
  padding: 4px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.timer-countdown-pill .timer-icon {
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1;
}

.timer-countdown-pill .timer-digits {
  font-family: 'Exo', monospace;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 900;
  color: #fde047;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.5);
}

.timer-countdown-pill .timer-digits.warning {
  color: #f87171 !important;
  text-shadow: 0 0 14px rgba(248, 113, 113, 0.85) !important;
  animation: timerWarningPulse 0.5s ease-in-out infinite alternate;
}

.question-timer-countdown-bar .timer-bar-track {
  flex: 1;
  min-width: 0;
  max-width: none !important;
  height: clamp(14px, 2vh, 18px);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.question-timer-countdown-bar .timer-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #00f0ff 65%, #34d399 100%);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.9);
  transition: width 0.9s linear;
}

/* JUSTE EN DESSOUS DU TEMPS : Dé et Info Erreur */
.question-stakes-strip {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 6px;
  box-sizing: border-box;
}

.question-stakes-strip .gain-status-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.22);
  border: 1.5px solid rgba(251, 191, 36, 0.75);
  color: #fde68a;
  font-size: clamp(14px, 2vw, 16.5px);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.question-stakes-strip .gain-status-box.x2-active {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.94), rgba(217, 119, 6, 0.94));
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.85);
}

.question-stakes-strip .penalty-cost-notice {
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 900;
  color: #f87171;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
  white-space: nowrap;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.14);
  border: 1.5px solid rgba(239, 68, 68, 0.45);
}

.panorama-category-tag {
  position: absolute;
  top: clamp(8px, 1.4vh, 12px);
  right: clamp(8px, 1.4vw, 12px);
  z-index: 5;
  max-width: calc(38% - 10px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: clamp(5px, 0.9vh, 8px) clamp(10px, 1.6vw, 16px);
  border-radius: 999px;
  background: rgba(10, 20, 42, 0.92);
  border: 1.5px solid rgba(251, 191, 36, 0.85);
  color: #fde68a;
  font-size: clamp(12px, 1.6vw, 14px);
  font-weight: 800;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.panorama-category-tag .tag-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BLOC QUESTION + RÉPONSES (Collés avec espace maîtrisé) */
.question-qa-cluster {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Zone QUESTION + INFO : Regroupées, compactes en hauteur, texte agrandi d'une taille */
.question-main-box {
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(8px, 1.2vh, 14px) clamp(14px, 2.4vw, 24px);
  background: linear-gradient(180deg, rgba(12, 34, 76, 0.94) 0%, rgba(5, 18, 44, 0.98) 100%);
  border: 2px solid rgba(56, 189, 248, 0.65);
  border-radius: 16px;
  text-align: center;
  box-shadow: inset 0 0 24px rgba(14, 165, 233, 0.16), 0 6px 20px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  overflow: hidden;
}

.question-prompt-text {
  font-family: var(--font-main);
  font-size: clamp(23px, 4.2vw, 34px);
  font-weight: 900;
  line-height: 1.28;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  margin: 0;
  letter-spacing: 0.3px;
}

/* Bloc INFO : Regroupé sous la question, lisibilité agrandie */
.question-clue-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  background: rgba(245, 158, 11, 0.16);
  border: 1.5px solid rgba(245, 158, 11, 0.7);
  border-radius: 12px;
  padding: 6px 14px;
  box-sizing: border-box;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.clue-tag-badge {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
  color: #fde047;
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1.5px solid rgba(245, 158, 11, 0.55);
}

.clue-text-body {
  font-size: clamp(16px, 2.7vw, 19.5px);
  color: #fef08a;
  line-height: 1.35;
  font-weight: 600;
  font-style: italic;
  text-align: left;
}

/* 3. EN DESSOUS DE LA QUESTION : Les 3 réponses (A, B, C) */
.de-choices-area.grid-3-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 1vw, 10px);
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0;
}

@media (max-width: 680px) and (orientation: portrait) {
  .de-choices-area.grid-3-choices {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .choice-btn {
    min-height: 36px !important;
    padding: 4px 10px !important;
    font-size: 14.5px !important;
  }
}

.choice-btn {
  min-height: clamp(36px, 4.6vh, 44px);
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(16, 44, 96, 0.94) 0%, rgba(8, 26, 62, 0.98) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.7);
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: clamp(14px, 2.1vw, 16.5px);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(0, 240, 255, 0.15);
  box-sizing: border-box;
}

.choice-btn:active {
  transform: scale(0.98);
}

.choice-btn:hover:not(:disabled) {
  border-color: #ffffff;
  background: linear-gradient(135deg, rgba(24, 68, 142, 0.96) 0%, rgba(14, 42, 94, 0.98) 100%);
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.7);
}

.choice-letter {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.28);
  border: 1.5px solid #7dd3fc;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.choice-label {
  flex: 1;
  line-height: 1.25;
}

.choice-btn.eliminated {
  opacity: 0.22 !important;
  filter: grayscale(1) !important;
  text-decoration: line-through !important;
  pointer-events: none !important;
  border-color: #475569 !important;
}

.choice-btn.correct {
  border-color: #4ade80 !important;
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.96) 0%, rgba(20, 83, 45, 0.98) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.8) !important;
}

.choice-btn.wrong {
  border-color: #f87171 !important;
  background: linear-gradient(135deg, rgba(153, 27, 27, 0.96) 0%, rgba(127, 29, 29, 0.98) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(248, 113, 113, 0.7) !important;
}

/* 4. EN DESSOUS DES RÉPONSES : Joker et Passer ensemble */
.question-tools-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(8px, 1.4vw, 14px);
  width: 100%;
  flex-shrink: 0;
  margin-top: clamp(4px, 0.8vh, 8px);
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .question-tools-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

.tool-btn {
  min-height: clamp(34px, 4.4vh, 40px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  font-family: var(--font-main);
  font-size: 13px;
}

.tool-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* Bouton JOKER : Distinctif, violet cosmique éclatant */
.tool-btn.joker-tool-btn {
  background: linear-gradient(135deg, rgba(46, 16, 84, 0.95) 0%, rgba(26, 8, 48, 0.98) 100%);
  border: 2px solid rgba(192, 132, 252, 0.85);
  color: #f5d0fe;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
}

.tool-btn.joker-tool-btn:hover:not(:disabled) {
  border-color: #f0abfc;
  background: linear-gradient(135deg, rgba(68, 24, 124, 0.96) 0%, rgba(42, 12, 78, 0.98) 100%);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.85);
}

.tool-btn.joker-tool-btn:disabled {
  opacity: 0.38 !important;
  filter: grayscale(0.7) !important;
  cursor: not-allowed !important;
  border-color: #475569 !important;
}

.tool-btn.joker-tool-btn .joker-btn-left {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.tool-btn.joker-tool-btn .joker-badge {
  font-size: clamp(14px, 2.2vw, 16px);
  font-weight: 900;
  color: #f5d0fe;
  letter-spacing: 0.3px;
}

.tool-btn.joker-tool-btn .joker-action {
  font-size: clamp(11.5px, 1.6vw, 13px);
  color: #f8fafc;
  font-weight: 700;
  white-space: nowrap;
}

/* Bouton BONUS ×2 (à la place de Passer) : or, allumé quand il est activé */
.tool-btn.x2-tool-btn {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.95), rgba(69, 26, 3, 0.98));
  border: 2px solid rgba(251, 191, 36, 0.85);
  color: #fef3c7;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.tool-btn.x2-tool-btn:hover:not(:disabled) {
  border-color: #fde68a;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.75);
}

.tool-btn.x2-tool-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fff7ed;
  color: #1c1003;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.95);
}

.tool-btn.x2-tool-btn.active .pass-cost-pill {
  color: #1c1003;
}

.tool-btn.x2-tool-btn:disabled:not(.active) {
  opacity: 0.4;
  filter: grayscale(0.6);
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.tool-btn.x2-tool-btn .pass-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-btn.x2-tool-btn .pass-icon {
  font-size: clamp(16px, 2.4vw, 19px);
}

.tool-btn.x2-tool-btn .pass-label {
  font-size: clamp(14px, 2.2vw, 16px);
  font-weight: 900;
  letter-spacing: 0.5px;
}

.tool-btn.x2-tool-btn .pass-cost-pill {
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 900;
  color: #fbbf24;
  white-space: nowrap;
}

/* Bouton PASSER la question (retiré de la fenêtre de question ; style conservé) */
.tool-btn.pass-tool-btn {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(148, 163, 184, 0.6);
  color: #f8fafc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.tool-btn.pass-tool-btn:hover:not(:disabled) {
  border-color: #f87171;
  background: rgba(153, 27, 27, 0.75);
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.6);
}

.tool-btn.pass-tool-btn:disabled,
.tool-btn.pass-tool-btn.used {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.tool-btn.pass-tool-btn .pass-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-btn.pass-tool-btn .pass-icon {
  font-size: clamp(16px, 2.4vw, 19px);
}

.tool-btn.pass-tool-btn .pass-label {
  font-size: clamp(14px, 2.2vw, 16px);
  font-weight: 900;
  letter-spacing: 0.5px;
}

.tool-btn.pass-tool-btn .pass-cost-pill {
  font-size: clamp(12px, 1.8vw, 13.5px);
  font-weight: 800;
  color: #94a3b8;
  white-space: nowrap;
}

.discovery-split-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  overflow: hidden;
  z-index: 210;
  background: radial-gradient(circle at 50% 22%, rgba(10, 34, 78, 0.97) 0%, rgba(3, 9, 24, 0.99) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: max(10px, env(safe-area-inset-top)) clamp(10px, 2.5vw, 28px) max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow: hidden !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.discovery-split-overlay.world-situation-mode {
  background: radial-gradient(circle at 32% 24%, rgba(52, 29, 12, 0.97) 0%, rgba(10, 9, 8, 0.99) 100%);
}

.discovery-split-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* En-tête masqué : pas besoin de titre World le jeu ni de croix X */
.discovery-top-header {
  display: none !important;
}

.discovery-monitor-assembly {
  width: 100%;
  max-width: 1380px;
  height: 100%;
  min-height: 0;
  flex: 1;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden !important;
}

.discovery-reading-col {
  width: 100%;
  max-width: 720px;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  max-height: 48dvh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.holo-photo-frame {
  position: relative;
  width: auto;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 0;
  aspect-ratio: 540 / 967;
  margin: 0 auto;
  background: #040b1c;
  border: 2.5px solid #7dd3fc;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 28px rgba(0, 240, 255, 0.45),
    inset 0 0 20px rgba(0, 240, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.holo-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Mode officiel innovLia World : affichage vertical 9:16 de l'image situation (540x967) s'ajustant dynamiquement */
.discovery-split-overlay.world-situation-mode .holo-photo-frame {
  width: auto;
  max-width: 100%;
  aspect-ratio: 540 / 967;
  height: 100%;
  min-height: 0;
  flex: 1 1 0;
  margin: 0 auto;
  background: #0b0907;
  border-color: #f59e0b;
  box-shadow:
    0 0 28px rgba(245, 158, 11, 0.48),
    inset 0 0 18px rgba(245, 158, 11, 0.22);
}

.discovery-split-overlay.world-situation-mode .holo-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0907;
}

/* Titre incrusté en haut directement dans l'image de découverte */
.discovery-embedded-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, rgba(8, 14, 28, 0.94) 0%, rgba(8, 14, 28, 0.65) 60%, transparent 100%);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: clamp(14px, 3.6vw, 19px);
  line-height: 1.28;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.3px;
  box-sizing: border-box;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.discovery-split-overlay.world-situation-mode .discovery-embedded-title {
  background: linear-gradient(180deg, rgba(28, 14, 6, 0.94) 0%, rgba(28, 14, 6, 0.65) 65%, transparent 100%);
  color: #fde68a;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

/* Bouton Plein Écran discret pour voir l'image seule en grand */
.discovery-fullscreen-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(10, 20, 42, 0.84);
  border: 1.5px solid rgba(125, 211, 252, 0.8);
  color: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease;
  pointer-events: auto;
}

.discovery-fullscreen-btn:hover,
.discovery-fullscreen-btn:active {
  background: rgba(2, 132, 199, 0.88);
  border-color: #bae6fd;
  transform: scale(1.06);
}

.discovery-split-overlay.world-situation-mode .discovery-fullscreen-btn {
  background: rgba(35, 18, 8, 0.88);
  border-color: rgba(251, 191, 36, 0.85);
  color: #fde68a;
}

.discovery-split-overlay.world-situation-mode .discovery-fullscreen-btn:hover,
.discovery-split-overlay.world-situation-mode .discovery-fullscreen-btn:active {
  background: rgba(180, 83, 9, 0.95);
  border-color: #ffffff;
  color: #ffffff;
}

.discovery-fullscreen-btn .fs-icon {
  font-size: 13px;
  line-height: 1;
}

.scifi-ribbon-wrapper {
  display: none !important;
}

.discovery-holo-box {
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  max-height: 100%;
  margin-top: 0;
  background: linear-gradient(180deg, rgba(10, 30, 68, 0.90) 0%, rgba(5, 16, 40, 0.95) 100%);
  border: 2px solid rgba(125, 211, 252, 0.62);
  border-radius: 18px;
  padding: 10px 14px 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), inset 0 0 26px rgba(0, 240, 255, 0.12);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden !important;
}

.discovery-split-overlay.world-situation-mode .discovery-holo-box {
  width: 100%;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(28, 19, 12, 0.94) 0%, rgba(15, 11, 8, 0.97) 100%);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), inset 0 0 24px rgba(245, 158, 11, 0.10);
}

/* Zone de lecture défilante ajustée à la taille du texte (zéro vide noir sous le texte) */
.discovery-holo-content {
  flex: 0 1 auto;
  min-height: 0;
  max-height: clamp(120px, 32dvh, 260px);
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b rgba(15, 23, 42, 0.75);
}

.discovery-holo-content::-webkit-scrollbar {
  width: 7px;
}

.discovery-holo-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 8px;
}

.discovery-holo-content::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.discovery-holo-content::-webkit-scrollbar-thumb:hover {
  background: #fbbf24;
}

.discovery-split-overlay:not(.world-situation-mode) .discovery-holo-content {
  scrollbar-color: #38bdf8 rgba(10, 25, 55, 0.75);
}
.discovery-split-overlay:not(.world-situation-mode) .discovery-holo-content::-webkit-scrollbar-thumb {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Histoire de LIA en accroche narrative au sommet de la fiche */
.discovery-quote-line {
  font-size: clamp(14.5px, 3.7vw, 18.5px);
  line-height: 1.5;
  font-style: italic;
  font-weight: 600;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.12);
  border-left: 4px solid #38bdf8;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0;
}

.discovery-split-overlay.world-situation-mode .discovery-quote-line {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-left-color: #f59e0b;
}

/* Explication scientifique & historique */
.discovery-science-line {
  font-size: clamp(15.5px, 3.9vw, 20.5px);
  line-height: 1.54;
  font-weight: 500;
  color: #f8fafc;
  margin: 0;
}

/* Bouton Continuer l'exploration : toujours visible par défaut, ancré sous le texte sans espace vide superflu */
.discovery-box-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  padding-top: 4px;
  flex-shrink: 0;
  margin-top: 0;
}

.discovery-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.45);
  border: 1.5px solid rgba(125, 211, 252, 0.85);
  color: #ffffff;
  font-family: inherit;
  font-size: clamp(13px, 3.4vw, 15px);
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.discovery-continue-btn:hover,
.discovery-continue-btn:active {
  background: rgba(2, 132, 199, 0.65);
  border-color: #bae6fd;
  color: #ffffff;
  transform: translateX(2px);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.55);
}

.discovery-split-overlay.world-situation-mode .discovery-continue-btn {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.48) 0%, rgba(180, 83, 9, 0.72) 100%);
  border: 2px solid #fde68a;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.48), 0 0 10px rgba(251, 191, 36, 0.35);
}

.discovery-split-overlay.world-situation-mode .discovery-continue-btn:hover,
.discovery-split-overlay.world-situation-mode .discovery-continue-btn:active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.65) 0%, rgba(217, 119, 6, 0.88) 100%);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.65);
}

.discovery-continue-arrow {
  font-size: 1.15em;
  line-height: 1;
}

.discovery-inline-timeline {
  display: none !important;
}

/* Grand écran / Tablette Paysage : Image 9:16 agrandie pleine hauteur à gauche + Panneau d'explication à droite */
@media (min-width: 780px) {
  .discovery-monitor-assembly {
    display: grid;
    grid-template-columns: minmax(320px, 44%) 1fr;
    gap: clamp(18px, 2.8vw, 36px);
    height: 100%;
    min-height: 0;
    max-height: calc(100dvh - 28px);
    align-items: stretch;
  }

  .holo-photo-frame {
    width: 100%;
    height: 100%;
    max-height: calc(100dvh - 28px);
    aspect-ratio: auto;
    margin: 0;
  }

  .discovery-split-overlay.world-situation-mode .holo-photo-frame {
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: calc(100dvh - 28px);
    aspect-ratio: 540 / 967;
    margin: 0 auto;
  }

  .discovery-reading-col {
    height: 100%;
    max-height: calc(100dvh - 28px);
    min-height: 0;
    max-width: 100%;
    flex: 1;
    gap: 12px;
  }

  .discovery-holo-box {
    flex: 1;
    max-height: 100%;
    justify-content: flex-start;
    gap: clamp(10px, 1.8vh, 16px);
  }

  .discovery-holo-content {
    flex: 1;
    max-height: none;
  }

  .discovery-embedded-title {
    font-size: clamp(16px, 1.8vw, 21px);
    padding: 12px 16px 14px;
  }

  .discovery-science-line {
    font-size: clamp(18px, 1.8vw, 23px);
    line-height: 1.6;
  }

  .discovery-quote-line {
    font-size: clamp(16px, 1.6vw, 19.5px);
    line-height: 1.52;
    padding: 12px 16px;
  }

  .discovery-continue-btn {
    font-size: 15px;
    padding: 9px 22px;
  }
}

/* ==========================================================================
   4B. LIGHTBOX PLEIN ÉCRAN POUR L'IMAGE DE DÉCOUVERTE
   ========================================================================== */
.discovery-lightbox-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 350;
  background: radial-gradient(circle at 50% 30%, rgba(12, 18, 36, 0.98) 0%, rgba(3, 7, 18, 0.99) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.discovery-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-top-bar {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  flex-shrink: 0;
  z-index: 10;
}

.lightbox-title {
  color: #fde68a;
  font-family: var(--font-main);
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 900;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.85) 0%, rgba(180, 83, 9, 0.95) 100%);
  border: 1.5px solid #fde68a;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 14px rgba(245, 158, 11, 0.45);
  transition: transform 0.15s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}

.lightbox-close-btn:hover,
.lightbox-close-btn:active {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 1) 100%);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.7);
}

.lightbox-content-box {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  box-sizing: border-box;
  cursor: pointer;
}

.lightbox-content-box img {
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 540 / 967;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.25);
  border: 2px solid rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   5. VICTORY MODAL
   ========================================================================== */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 180;
  background: rgba(3, 8, 20, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 16px;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.victory-card {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at center, rgba(16, 36, 80, 0.96) 0%, rgba(6, 12, 28, 0.99) 100%);
  border: 2px solid #facc15;
  border-radius: 22px;
  box-shadow: 0 0 50px rgba(250, 204, 21, 0.5);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.victory-title {
  font-size: 24px;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 15px rgba(250, 204, 21, 0.8);
}

.victory-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-item {
  background: rgba(10, 25, 55, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 10px;
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan-bright);
}

.stat-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
}

/* ==========================================================================
   6. SALON MULTIJOUEUR (QR CODE SCAN, ENVOI INVITATION & CHOIX PERSONNAGE)
   ========================================================================== */
/* Choix du perso / salon : PLEINE PAGE (Paul, 2026-11-09), plus une fenêtre flottante au milieu de l'écran */
.lobby-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  overflow: hidden;
  z-index: 210;
  background: radial-gradient(circle at 50% 15%, rgb(14, 42, 92) 0%, rgb(4, 10, 26) 100%);
  display: flex;
  align-items: stretch;
  justify-content: center;
  box-sizing: border-box;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.lobby-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lobby-container {
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: none;
  overflow-x: hidden;   /* jamais de barre de défilement horizontale (1 px de débordement suffisait à la faire apparaître) */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vh, 14px);
  padding-bottom: 6px;
  box-sizing: border-box;
}

.lobby-container > * {
  flex-shrink: 0;
}

/* la carte du perso prend la place libre, sans jamais passer sous sa hauteur utile (la page défile alors, en vertical) ; « Explorer » reste en bas */
.lobby-container > .lobby-creator-card {
  flex: 1 0 auto;
}

.lobby-container > .lobby-launch-btn {
  margin-top: auto !important;
}

/* le héros grandit avec l'écran */
.lobby-overlay .char-carousel-stage {
  flex: 1 1 auto;
  min-height: 0;
  align-items: stretch;
}

.lobby-overlay .carousel-arrow-btn {
  align-self: center;
}

.lobby-overlay .char-hero-viewport {
  min-height: clamp(214px, 36vh, 520px);
}

/* le perso remplit son cadre (le cadre grandit avec l'écran) */
.lobby-overlay .char-hero-figure-wrap {
  flex: 1 1 auto;
  height: auto;
  min-height: 158px;
}

.lobby-overlay .char-hero-figure-wrap img {
  height: 100%;
  max-height: clamp(150px, 40vh, 600px);   /* téléphone : le perso ne mange pas tout l'écran, l'ambiance reste à portée */
  width: auto;
}

@media (min-width: 900px) {
  .lobby-overlay .char-hero-figure-wrap img { max-height: min(100%, 68vh); }
}

/* « Explorer » reste toujours visible en bas, même quand la page défile (petit téléphone) */
.lobby-container > .lobby-launch-btn {
  position: sticky !important;
  bottom: 0;
}

.lobby-overlay .char-hero-name {
  font-size: clamp(17px, 2.6vh, 26px);
}

.lobby-overlay .char-hero-role {
  font-size: clamp(11px, 1.7vh, 15px);
}

/* grand écran, solo : le perso à gauche, l'ambiance à droite */
@media (min-width: 900px) {
  .lobby-overlay.solo .lobby-container {
    max-width: 1180px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: 20px;
    align-content: stretch;
  }

  .lobby-overlay.solo .lobby-header,
  .lobby-overlay.solo .lobby-launch-btn {
    grid-column: 1 / -1;
  }

  .lobby-overlay.solo .lobby-creator-card {
    grid-column: 1;
    grid-row: 2;
  }

  .lobby-overlay.solo .lobby-atmosphere-card {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }
}

.lobby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

.lobby-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.65);
}

.lobby-status-pill {
  display: inline-block;
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 700;
}

.lobby-status-pill.locked {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fde68a;
}

.lobby-invite-card {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 10px;
  align-items: center;
  background: rgba(9, 25, 58, 0.9);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  border-radius: 14px;
  padding: 9px 10px;
  box-shadow: 0 0 22px rgba(0, 240, 255, 0.18);
}

.lobby-qr-box {
  width: 96px;
  height: 96px;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.lobby-qr-box svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.lobby-invite-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lobby-room-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lobby-room-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #93c5fd;
}

.lobby-room-code {
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.lobby-invite-hint {
  font-size: 11px;
  line-height: 1.28;
  color: #cbd5e1;
  margin: 0;
}

.lobby-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lobby-action-btn {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(15, 39, 82, 0.92);
  border: 1px solid rgba(125, 211, 252, 0.55);
  color: #e0f2fe;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lobby-action-btn.share-primary {
  background: linear-gradient(90deg, #0284c7 0%, #2563eb 100%);
  border-color: #7dd3fc;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.lobby-join-drawer {
  background: rgba(8, 22, 52, 0.95);
  border: 1px dashed #38bdf8;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.join-drawer-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.lobby-camera-scan-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lobby-camera-scan-box video {
  width: 100%;
  max-height: 170px;
  border-radius: 10px;
  border: 2px solid #38bdf8;
  background: #000;
  object-fit: cover;
}

.lobby-creator-card,
.lobby-roster-card {
  background: rgba(9, 25, 58, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lobby-section-title {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: #7dd3fc;
  text-transform: uppercase;
}

.lobby-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.char-counter-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(125, 211, 252, 0.55);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 900;
}

.char-carousel-stage {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  user-select: none;
  touch-action: pan-y;
}

.carousel-arrow-btn {
  width: 52px;
  height: 72px;
  min-width: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 52, 108, 0.95) 0%, rgba(8, 24, 58, 0.98) 100%);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  touch-action: manipulation !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}

.carousel-arrow-btn:active {
  transform: scale(0.92);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.85);
}

.char-hero-viewport {
  position: relative;
  background: radial-gradient(circle at 50% 42%, rgba(28, 78, 148, 0.65) 0%, rgba(7, 19, 44, 0.96) 78%);
  border: 2px solid var(--active-char-color, #38bdf8);
  border-radius: 18px;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 214px;
  overflow: hidden;
  box-shadow:
    0 0 22px rgba(0, 240, 255, 0.35),
    inset 0 -18px 28px rgba(56, 189, 248, 0.22);
  cursor: grab;
  touch-action: pan-y !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.char-hero-viewport.is-taken {
  border-color: rgba(248, 113, 113, 0.75);
}

.char-taken-ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(153, 27, 27, 0.92);
  border: 1.5px solid #fca5a5;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.char-hero-figure-wrap {
  position: relative;
  width: 100%;
  height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

.char-hero-figure-wrap.slide-left {
  transform: translateX(-26px) scale(0.92);
  opacity: 0.45;
}

.char-hero-figure-wrap.slide-right {
  transform: translateX(26px) scale(0.92);
  opacity: 0.45;
}

.char-hero-figure-wrap img {
  max-height: 154px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.78));
  animation: heroFloat 2.8s ease-in-out infinite;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.char-hero-base-glow {
  position: absolute;
  bottom: 2px;
  width: 120px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--active-char-color, #38bdf8) 0%, rgba(0, 0, 0, 0) 74%);
  box-shadow: 0 0 22px var(--active-char-color, #38bdf8);
  z-index: 1;
}

.char-hero-info {
  margin-top: 3px;
  text-align: center;
  z-index: 2;
}

.char-hero-name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 0 0 12px var(--active-char-color, #38bdf8);
}

.char-hero-role {
  font-size: 11px;
  font-weight: 700;
  color: #bae6fd;
}

.char-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 2px 0;
}

.char-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  min-width: 0;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.16s ease;
}

.char-dot.active {
  width: 20px;
  border-radius: 999px;
  background: var(--active-char-color, #38bdf8);
  box-shadow: 0 0 8px var(--active-char-color, #38bdf8);
}

.char-dot.taken {
  background: rgba(239, 68, 68, 0.55);
  border-color: #f87171;
}

.lobby-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px;
}

.color-row-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #cbd5e1;
}

.lobby-color-swatches {
  display: flex;
  gap: 8px;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch.active {
  border-color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 12px var(--swatch);
}

.lobby-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.lobby-text-input {
  width: 100%;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(5, 14, 34, 0.92);
  border: 1.5px solid rgba(125, 211, 252, 0.45);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.lobby-text-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.lobby-text-input.code-upper {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lobby-add-player-btn {
  padding: 8px 13px;
  border-radius: 10px;
  background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
  border: 1.5px solid #bae6fd;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.lobby-add-player-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

.lobby-empty-hint {
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(6, 17, 40, 0.65);
  border: 1px dashed rgba(125, 211, 252, 0.35);
  color: #93c5fd;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

.lobby-roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lobby-sync-indicator {
  font-size: 10.5px;
  color: #6ee7b7;
  font-weight: 700;
}

.lobby-players-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.lobby-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(6, 17, 40, 0.92);
  border: 1.5px solid rgba(125, 211, 252, 0.28);
}

.lobby-player-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lobby-player-avatar {
  width: 36px;
  height: 42px;
  border-radius: 8px;
  background: rgba(15, 35, 75, 0.9);
  border-bottom: 3px solid var(--p-color, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lobby-player-avatar img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.lobby-player-meta {
  display: flex;
  flex-direction: column;
}

.lobby-player-name {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lobby-player-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--p-color, #38bdf8);
  box-shadow: 0 0 8px var(--p-color, #38bdf8);
}

.lobby-player-sub {
  font-size: 10.5px;
  color: #93c5fd;
  font-weight: 600;
}

.lobby-player-remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fca5a5;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.lobby-launch-btn {
  flex-shrink: 0 !important;
  margin-top: 6px !important;
  height: 52px !important;
  min-height: 52px !important;
  font-size: 14.5px !important;
  font-weight: 900 !important;
  letter-spacing: 0.8px !important;
  position: relative !important;
  z-index: 50 !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
}

.qr-zoom-backdrop {
  position: absolute;
  inset: 0;
  z-index: 230;
  background: rgba(2, 8, 22, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qr-zoom-backdrop[style*="display: none"] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.qr-zoom-card {
  width: 100%;
  max-width: 340px;
  background: rgba(9, 25, 58, 0.98);
  border: 2px solid #38bdf8;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.45);
}

.qr-zoom-title {
  font-size: 14px;
  font-weight: 900;
  color: #7dd3fc;
}

.qr-zoom-code {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #ffffff;
}

.qr-zoom-svg {
  width: 220px;
  height: 220px;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-zoom-svg svg {
  width: 100% !important;
  height: 100% !important;
}

.qr-zoom-sub {
  font-size: 12px;
  color: #cbd5e1;
  margin: 0;
}

/* Disposition interne du bouton Joker */
.choice-btn.joker-slot-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  padding: 8px 16px !important;
}

.joker-btn-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Badge stock Joker ultra-lisible (blanc/or éclatant haute visibilité) */
.joker-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid #ffffff;
  color: #000000;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.85), 0 2px 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.joker-stock-pill .stock-num {
  font-family: var(--font-main);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  color: #0b0907;
  background: #ffffff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.joker-stock-pill .stock-label {
  font-size: 13.5px;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.joker-stock-pill.exhausted {
  background: #334155 !important;
  border-color: #64748b !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.joker-stock-pill.exhausted .stock-num {
  background: #475569 !important;
  color: #cbd5e1 !important;
}

.joker-stock-pill.exhausted .stock-label {
  color: #94a3b8 !important;
}


/* ==========================================================================
   PERSONNALISATION AMBIANCE & MÉTÉO (SOLO MODE)
   ========================================================================== */
.lobby-atmosphere-card {
  width: 100%;
  padding: clamp(10px, 1.6vh, 16px) clamp(12px, 2vw, 20px);
  background: linear-gradient(135deg, rgba(16, 36, 78, 0.94) 0%, rgba(8, 20, 50, 0.97) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 0 18px rgba(14, 165, 233, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.atmosphere-badge-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid #38bdf8;
  color: #fde047;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.atmosphere-selectors-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(10px, 1.8vw, 18px);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .atmosphere-selectors-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.atmosphere-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.atmo-block-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #7dd3fc;
  text-transform: uppercase;
}

.atmo-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.atmo-choice-btn {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.atmo-choice-btn:hover:not(.disabled-by-night) {
  border-color: #38bdf8;
  color: #ffffff;
  background: rgba(30, 58, 102, 0.9);
  transform: translateY(-1px);
}

.atmo-choice-btn.active {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.85) 0%, rgba(3, 105, 161, 0.9) 100%);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.atmo-choice-btn.disabled-by-night {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  border-color: #334155 !important;
  color: #64748b !important;
  box-shadow: none !important;
}

.atmo-incompat-warning {
  font-size: 12px;
  color: #fde047;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
}

/* Barre d'ambiance sur l'écran d'accueil Solo */
.start-atmosphere-bar {
  position: absolute;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  width: calc(100% - 28px);
  max-width: 620px;
}

.start-atmo-pill-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(10, 22, 48, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  flex-wrap: wrap;
}

.start-atmo-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.start-atmo-label {
  font-size: 11px;
  font-weight: 800;
  color: #7dd3fc;
  letter-spacing: 0.5px;
}

.start-atmo-btn {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.start-atmo-btn:hover:not(.disabled-by-night) {
  border-color: #38bdf8;
  color: #ffffff;
}

.start-atmo-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.start-atmo-btn.disabled-by-night {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
}

.start-atmo-sep {
  width: 1px;
  height: 18px;
  background: rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   SCIFI TOP RIGHT ACTIONS & OPTIONS MODAL & PEDAGOGY MODES
   ========================================================================== */
.scifi-top-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 25;
}

/* Téléphone étroit (invariant 20, 2026-11-14) : la barre du plateau tient dans 360 px sans défilement horizontal.
   Le titre (220 px minimum) + 3 boutons de 40 px + les marges faisaient 384 px : le titre se resserre, et la cale
   de gauche (vide, elle ne servait qu'à centrer le titre) disparaît pour lui laisser la place du nom du monde entier. */
@media (max-width: 400px) {
  .scifi-top-bar { padding: 10px 8px 0; gap: 6px; }
  .scifi-top-left-spacer { display: none; }
  .trapezoid-header { min-width: 0; flex: 0 1 220px; padding: 8px 16px 10px; }
  .trapezoid-title { font-size: clamp(13px, 4.2vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .scifi-top-right-actions { gap: 4px; flex: 0 0 auto; }
}

.options-modal-card {
  width: min(92vw, 440px);
  background: rgba(8, 18, 38, 0.96);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 28px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(14px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f8fafc;
  font-family: var(--font-main, 'Exo', sans-serif);
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.options-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
}

.options-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.8px;
}

.options-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.options-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options-section-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: #bae6fd;
  letter-spacing: 0.6px;
}

.options-section-hint {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.pedagogy-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pedagogy-mode-btn {
  background: rgba(15, 30, 60, 0.8);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #e2e8f0;
  transition: all 0.18s ease;
  user-select: none;
  touch-action: manipulation;
}

.pedagogy-mode-btn:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(20, 45, 90, 0.9);
}

.pedagogy-mode-btn.active {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.95), rgba(30, 58, 138, 0.95));
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
  color: #ffffff;
}

.p-mode-icon {
  font-size: 20px;
}

.p-mode-name {
  font-size: 12.5px;
  font-weight: 800;
}

.p-mode-sub {
  font-size: 9.5px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.15;
}

.pedagogy-mode-btn.active .p-mode-sub {
  color: #e0f2fe;
}

.pedagogy-desc-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;
}

.options-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.opt-pill-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 12px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.opt-pill-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.opt-sep {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

.pedagogy-mode-lobby-block {
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* World Origines - Bouton unique centré (pas de multiplayer) */
#start-menu-overlay.world-origines .multi-hitbox {
  display: none !important;
}

#start-menu-overlay.world-origines .solo-hitbox.solo-btn-origins-single {
  top: 76.5% !important;
  width: 78% !important;
  max-width: 360px !important;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.92) 0%, rgba(217, 119, 6, 0.95) 50%, rgba(180, 83, 9, 0.95) 100%) !important;
  border: 2px solid rgba(254, 243, 199, 0.95) !important;
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.75), 0 8px 25px rgba(0, 0, 0, 0.65), inset 0 0 18px rgba(255, 255, 255, 0.6) !important;
  font-size: clamp(17px, 4.5vw, 21px) !important;
}

.intro-enter-btn.origins-enter-btn {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #b45309 100%) !important;
  border-color: rgba(254, 243, 199, 0.95) !important;
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.85), 0 8px 22px rgba(0, 0, 0, 0.6) !important;
}

/* Question : plus d'image de catégorie, seulement son titre et le cap, sur une ligne (Paul, 2026-11-05) — on gagne de la place */
#question-modal .question-panorama-assembly { flex: 0 0 auto !important; min-height: 0 !important; max-height: none !important; }
#question-modal .panorama-frame { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px;
  padding: 8px 10px; height: auto; min-height: 0 !important; max-height: none !important; }
#question-modal .question-target-pill, #question-modal .panorama-category-tag { position: static !important; max-width: 100%; min-width: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
#question-modal .panorama-category-tag { order: -1; font-size: clamp(14px, 2vw, 16px); }

/* « Je prends ce perso » : à droite et bien visible, c'est le bouton à toucher (Paul, 2026-11-05) */
#lobby-add-row #btn-lobby-add-player { grid-column: 2; justify-self: end; margin-left: auto; padding: 12px 20px; border-radius: 14px; font-size: 16px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); border: 2px solid #bbf7d0;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6), 0 6px 18px rgba(0, 0, 0, 0.4); animation: prendre-perso 1.6s ease-in-out infinite; }
#lobby-add-row #btn-lobby-add-player:disabled { animation: none; background: rgba(51, 65, 85, 0.85); border-color: rgba(148, 163, 184, 0.4); box-shadow: none; }
@keyframes prendre-perso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55), 0 6px 18px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0), 0 6px 18px rgba(0, 0, 0, 0.4); }
}
@media (prefers-reduced-motion: reduce) { #lobby-add-row #btn-lobby-add-player { animation: none; } }


/* ==========================================================================
   MOBILE : la question tient dans un téléphone de 640 px de haut (Paul, 2026-11-09, invariant 20)
   ========================================================================== */
@media (max-height: 780px) {
  #question-modal .question-prompt-text { font-size: clamp(18px, 5vw, 24px); line-height: 1.22; }
  #question-modal .question-main-box { padding: 6px 12px; gap: 4px; }
  #question-modal .clue-text-body { font-size: clamp(13px, 3.6vw, 16px); line-height: 1.28; }
  #question-modal .question-clue-bar { padding: 4px 10px; gap: 8px; }
  #question-modal .clue-tag-badge { font-size: 13px; padding-right: 8px; }
  #question-modal .question-timer-countdown-bar { min-height: 44px; padding: 4px 12px; gap: 10px; }
  #question-modal .timer-countdown-pill { padding: 2px 10px; gap: 6px; }
  #question-modal .timer-countdown-pill .timer-digits { font-size: clamp(19px, 5vw, 24px); }
  #question-modal .question-stakes-strip { padding: 0 4px; gap: 8px; }
  #question-modal .question-stakes-strip .gain-status-box,
  #question-modal .question-stakes-strip .penalty-cost-notice { padding: 3px 10px; font-size: clamp(12.5px, 3.4vw, 15px); }
  #question-modal .panorama-frame { padding: 5px 8px; gap: 4px 6px; }
  #question-modal .panorama-category-tag { font-size: 13px; }
  #question-modal .question-target-pill { font-size: 12.5px; }
  #question-modal .de-choices-area.grid-3-choices { gap: 4px; }
  #question-modal .choice-btn { min-height: 40px !important; }
  #question-modal .tool-btn { min-height: 42px; }
}

@media (max-height: 680px) {
  #question-modal .question-prompt-text { font-size: clamp(17px, 4.7vw, 21px); }
  #question-modal .question-stage-assembly { gap: 4px; }
  #question-modal .de-question-card, #question-modal .scifi-panorama-card { gap: 4px; }
  #question-modal .question-tools-row { margin-top: 2px; }
}


/* ==========================================================================
   CHOIX DU PERSO EN SOLO : UNE SEULE PAGE, sans monter ni descendre (Paul, 2026-11-09, invariant 20)
   Le perso prend toute la place libre ; ambiance sur une ligne, icônes seules ; plus de titre ni de modes.
   ========================================================================== */
.lobby-overlay.solo .lobby-container { overflow: hidden; }
.lobby-overlay.solo .lobby-header { justify-content: flex-end; padding: 0; }
.lobby-overlay.solo .lobby-status-pill { display: none; }
.lobby-overlay.solo .lobby-container > .lobby-creator-card { flex: 1 1 0; min-height: 0; padding: 8px; gap: 5px; }
.lobby-overlay.solo .lobby-section-header-row { flex: 0 0 auto; }
.lobby-overlay.solo .char-carousel-stage { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.lobby-overlay.solo .char-hero-viewport { min-height: 0; height: auto; padding: 6px 8px 8px; }
.lobby-overlay.solo .char-hero-figure-wrap { flex: 1 1 0; min-height: 0; height: auto; position: relative; width: 100%; }
.lobby-overlay.solo .char-hero-figure-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.lobby-overlay.solo .char-hero-info { flex: 0 0 auto; }
.lobby-overlay.solo .char-carousel-dots { flex: 0 0 auto; padding: 0; }
.lobby-overlay.solo .lobby-atmosphere-card { flex: 0 0 auto; padding: 8px 10px; border-radius: 14px; gap: 6px; }
.lobby-overlay.solo .lobby-launch-btn { position: relative !important; flex: 0 0 auto; margin-top: 0 !important; }

/* jour/nuit et météo : une ligne, icônes seules */
.atmo-one-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.atmo-one-line .atmo-choice-btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 !important; justify-content: center; gap: 0; }
.atmo-one-line .atmo-text { display: none !important; }
.atmo-one-line .atmo-emoji { font-size: 22px; line-height: 1; }
.atmo-one-line .atmo-sep { flex: 0 0 2px; align-self: stretch; margin: 6px 3px; border-radius: 2px; background: rgba(125, 211, 252, 0.4); }

/* l'ampoule d'aide (solo) */
.help-bulb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 4px 16px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.18); border: 1.5px solid rgba(251, 191, 36, 0.85);
  color: #fde68a; font-family: var(--font-main); font-size: 14px; font-weight: 800;
  cursor: pointer; box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  touch-action: manipulation;
}
.help-bulb-btn .help-bulb-ico { font-size: 22px; line-height: 1; }
.help-bulb-btn:active { transform: scale(0.96); }

/* grand écran : la même page, centrée en une colonne (plus de colonne vide à droite) */
@media (min-width: 900px) {
  .lobby-overlay.solo .lobby-container {
    display: flex;
    flex-direction: column;
    max-width: 620px;
  }
}


/* la phrase qui confirme le choix d'ambiance : deux lignes réservées, pas de saut de page quand elle change */
.atmo-phrase {
  margin: 0; padding: 0 4px; min-height: 2.7em; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 13px; line-height: 1.35; font-weight: 700; color: #bae6fd;
}
.atmo-phrase.flash { animation: atmoPhrase 0.45s ease-out; }
@keyframes atmoPhrase { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }


/* ==========================================================================
   L'AIDE (Paul, 2026-11-10) : le bouton à la place de « Erreur : -1 case », et la fenêtre image + infos, pleine page (invariant 20)
   ========================================================================== */
.help-strip-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 4px 14px; border-radius: 999px; box-sizing: border-box;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.9), rgba(69, 26, 3, 0.95));
  border: 2px solid rgba(251, 191, 36, 0.9); color: #fef3c7;
  font-family: var(--font-main); font-size: clamp(13px, 3.6vw, 15px); font-weight: 900; white-space: nowrap;
  cursor: pointer; touch-action: manipulation; box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}
.help-strip-btn .help-bulb-ico { font-size: 22px; line-height: 1; }
.help-strip-btn:active:not(:disabled) { transform: scale(0.96); }
.help-strip-btn:disabled, .help-strip-btn.used { opacity: 0.45; filter: grayscale(0.5); cursor: not-allowed; box-shadow: none; }

@media (max-height: 780px) {
  #question-modal .help-strip-btn { padding: 2px 12px; }
}


/* la catégorie juste au-dessus de la question, centrée (Paul, 2026-11-10) */
#question-modal .question-main-box .panorama-category-tag {
  order: 0; align-self: center; max-width: 100%; margin: 0 auto 2px; font-size: clamp(13px, 3.6vw, 15px);
}


/* ==========================================================================
   Question (Paul, 2026-11-10) : l'Aide au-dessus du Joker (les bonus regroupés), l'ampoule qui perd sa lumière,
   le titre général agrandi et la catégorie sans bordure (le cadre a déjà la sienne : plus de double bordure)
   ========================================================================== */
#question-modal .question-tools-row { grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; row-gap: 6px; }
#question-modal #btn-question-help { grid-column: 1; grid-row: 1; }
#question-modal #btn-use-joker { grid-column: 1; grid-row: 2; }
#question-modal #btn-question-x2 { grid-column: 2; grid-row: 1 / span 2; }

#question-modal .help-strip-btn { width: 100%; justify-content: flex-start; gap: 10px; padding: 2px 12px; border-radius: 10px; min-height: 44px; font-size: clamp(14px, 3.8vw, 16px); }
.help-bulb { position: relative; display: inline-block; flex: none; width: 38px; height: 38px; font-size: 32px; line-height: 38px; text-align: center; --perdu: 0%; }
.help-bulb .hb-lit, .help-bulb .hb-dim { position: absolute; inset: 0; display: block; text-align: center; }
.help-bulb .hb-lit { filter: drop-shadow(0 0 7px rgba(251, 191, 36, 0.95)); }
/* la partie perdue (en haut) devient sombre : 10 % de moins à chaque aide, du haut vers le bas */
.help-bulb .hb-dim { filter: grayscale(1) brightness(0.2); clip-path: inset(0 0 calc(100% - var(--perdu, 0%)) 0); }

#question-modal .panorama-frame { justify-content: center; }
#question-modal .question-target-pill {
  border: 0; background: transparent; box-shadow: none; padding: 0; text-align: center; max-width: 100%;
  white-space: normal; overflow: visible; text-overflow: clip; font-size: clamp(16px, 4.6vw, 21px); line-height: 1.2;
}
#question-modal .question-main-box .panorama-category-tag { border: 0; background: transparent; box-shadow: none; padding: 0; }

#question-modal #btn-question-x2 { flex-direction: column; justify-content: center; gap: 6px; }
#question-modal #btn-question-x2 .pass-btn-left { justify-content: center; }

/* désactivée (déjà prise sur cette question) : on garde l'ampoule bien lisible, pour voir la lumière qui baisse */
#question-modal .help-strip-btn:disabled, #question-modal .help-strip-btn.used { opacity: 0.85; filter: none; }
#question-modal .help-strip-btn:disabled { border-color: rgba(148, 163, 184, 0.6); box-shadow: none; }


/* ==========================================================================
   Question (Paul, 2026-11-10) : UNE ligne « Dé : +X cases | chrono | Aide (n) », la barre de temps en dessous ; Joker | Bonus ×2 en bas
   ========================================================================== */
#question-modal .question-timer-countdown-bar { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 8px; min-height: 0; }
#question-modal .qt-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 0; min-width: 0; flex: 0 0 auto; }
#question-modal .qt-top .gain-status-box { flex: 0 1 auto; min-width: 0; gap: 4px; padding: 4px 8px; font-size: clamp(11.5px, 3.2vw, 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#question-modal .qt-top .timer-countdown-pill { flex: 0 0 auto; padding: 2px 8px; gap: 5px; }
#question-modal .qt-top .timer-countdown-pill .timer-digits { font-size: clamp(18px, 5.4vw, 26px); }
#question-modal .qt-top .help-strip-btn { width: auto; flex: 0 0 auto; padding: 2px 8px; gap: 4px; min-height: 40px; border-radius: 12px; font-size: clamp(12px, 3.4vw, 15px); }
#question-modal .qt-top .help-bulb { width: 32px; height: 32px; font-size: 27px; line-height: 32px; }
#question-modal .question-timer-countdown-bar .timer-bar-track { width: 100%; flex: 0 0 auto; }
/* celui qui attend : sa ligne « Vous jouez pour le bonus ! » entre la ligne du haut et la barre */
#question-timer-bar .qt-top { order: 1; }
#question-timer-bar .qt-ligne { order: 2; }
#question-timer-bar .timer-bar-track { order: 3; }
#question-timer-bar.qt-spectateur { flex-wrap: nowrap; }
#question-timer-bar.qt-spectateur .timer-bar-track { flex: 0 0 auto; }
#question-timer-bar.qt-spectateur .qt-ligne { flex: 0 0 auto; padding-left: 0; border-left: 0; }

#question-modal .question-tools-row { grid-template-columns: 1.35fr 1fr; grid-template-rows: auto; row-gap: 0; }
#question-modal #btn-use-joker { grid-column: 1; grid-row: 1; }
#question-modal #btn-question-x2 { grid-column: 2; grid-row: 1; flex-direction: row; justify-content: space-between; gap: 0; }
#question-modal #btn-question-x2 .pass-btn-left { justify-content: flex-start; }

/* petits téléphones : tout tient sur la ligne du haut et dans le pied */
#question-modal .qt-top { gap: 4px; }
#question-modal .qt-top .gain-status-box { padding: 4px 6px; font-size: clamp(11px, 3vw, 14px); }
#question-modal .qt-top .timer-countdown-pill { padding: 2px 6px; gap: 4px; }
#question-modal .qt-top .timer-countdown-pill .timer-digits { font-size: clamp(17px, 5vw, 24px); }
#question-modal .qt-top .timer-countdown-pill .timer-icon { font-size: clamp(16px, 4.6vw, 22px); }
#question-modal .qt-top .help-strip-btn { padding: 2px 6px; gap: 2px; font-size: clamp(11.5px, 3.3vw, 14.5px); }
#question-modal .qt-top .help-bulb { width: 28px; height: 28px; font-size: 24px; line-height: 28px; }
#question-modal .question-tools-row { grid-template-columns: 1.1fr 1fr; }
#question-modal #btn-question-x2 .pass-label { white-space: nowrap; font-size: clamp(12.5px, 3.6vw, 15px); }
#question-modal #btn-question-x2 .pass-cost-pill { font-size: clamp(12px, 3.4vw, 14px); }
#question-modal #btn-question-x2 .pass-btn-left { gap: 4px; }

/* le style des salons est injecté après cette feuille : on monte la spécificité pour que la barre du joueur qui attend reste en dessous */
#question-modal #question-timer-bar.qt-spectateur { flex-wrap: nowrap; row-gap: 6px; }
#question-modal #question-timer-bar.qt-spectateur .timer-bar-track { order: 3; flex: 0 0 auto; width: 100%; height: 8px; }
#question-modal #question-timer-bar.qt-spectateur .qt-ligne { order: 2; flex: 0 0 auto; padding-left: 0; border-left: 0; width: 100%; }
#question-modal #question-timer-bar .qt-top { order: 1; }
