/* ==========================================
   CSS CUSTOM VARIABLES & DESIGN TOKENS
   ========================================== */
:root {
  --bg-dark: #0a0516;
  --bg-card: rgba(18, 10, 36, 0.65);
  --border-glow: rgba(56, 189, 248, 0.25);

  /* Triade Cyber-Divine harmonisée : Bleu Clair & Rouge Clair */
  --neon-blue-light: #38bdf8;
  --neon-cyan: var(--neon-blue-light);
  --neon-red-light: #ff4d6d;
  --neon-magenta: var(--neon-red-light);
  --neon-red: var(--neon-red-light);
  --neon-gold: #ffd700;
  --neon-yellow: #ffd700;
  --neon-green: var(--neon-blue-light);
  --neon-purple: var(--neon-red-light);

  /* Text colors */
  --text-main: #f0ecf8;
  --text-muted: #8c82a6;
  --text-dark: #05020a;

  /* Font Families */
  --font-title: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

/* Faction Colors */
.faction-nordique {
  --faction-color: var(--neon-cyan);
}

.faction-grec {
  --faction-color: var(--neon-yellow);
}

.faction-egyptien {
  --faction-color: var(--neon-magenta);
}

.faction-japonais {
  --faction-color: var(--neon-green);
}

.faction-hindou {
  --faction-color: var(--neon-purple);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.1rem;
  overflow-x: hidden;
  -height: 100vh;
  -height: -webkit-fill-available;
  position: relative;
  overscroll-behavior-y: contain;
  /* Désactive le pull-to-refresh et l'effet élastique sur mobile */
}

html {
  -height: -webkit-fill-available;
  overscroll-behavior-y: contain;
}

/* Scrollbars styles (fines et dark) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.3);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

#body {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background Grids and Pulsing Halo */
.bg-glow {
  position: fixed;
  top: 0%;
  left: 0%;
  /* transform: translate(-50%, -50%); */
  width: 100%;
  /* Réduit de 150 à 100 */
  height: 100%;
  /* J'ai ajouté les couleurs en directement dans le gradient pour faire le flou naturellement */
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(56, 189, 248, 0.02) 50%, transparent 80%);
  z-index: -2;
  pointer-events: none;
  /* filter: blur(80px); <-- SUPPRIMÉ ICI (C'était le tueur de GPU) */
  animation: cyan-pulse 6s infinite ease-in-out;
  transition: background 0.6s ease, opacity 0.6s ease;
  will-change: opacity;
}

@keyframes cyan-pulse {
  0% {
    -transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.6;
  }

  50% {
    -transform: translate(-50%, -50%) scale(1.08);
    opacity: 0.9;
  }

  100% {
    -transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.6;
  }
}

/* Thèmes Dynamiques pour le Halo de Fond (Bleu Clair, Rouge Clair, Doré, Gris) */
.bg-glow.theme-cyan,
.bg-glow.theme-blue-light {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3) 0%, rgba(56, 189, 248, 0.08) 50%, transparent 80%);
}

.bg-glow.theme-magenta,
.bg-glow.theme-red-light,
.bg-glow.theme-red,
.bg-glow.theme-flatline,
.bg-glow.theme-angry {
  background: radial-gradient(circle, rgba(255, 77, 109, 0.35) 0%, rgba(255, 77, 109, 0.08) 50%, transparent 80%);
}

.bg-glow.theme-glitch,
.bg-glow.theme-green {
  background: radial-gradient(circle, rgba(74, 222, 128, 0.35) 0%, rgba(74, 222, 128, 0.08) 50%, transparent 80%);
}

.bg-glow.theme-gold,
.bg-glow.theme-divine {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0.1) 50%, transparent 80%);
}

.bg-glow.theme-gray,
.bg-glow.theme-neutral,
.bg-glow.theme-muted {
  background: radial-gradient(circle, rgba(140, 130, 166, 0.2) 0%, rgba(140, 130, 166, 0.05) 50%, transparent 80%);
}

/* Pulsations du halo lumineux de fond en accord avec le rythme cardiaque */
.bg-glow.pulse-slow {
  animation: pulse-bg-anim 2.0s infinite ease-in-out;
  will-change: opacity;
}

.bg-glow.pulse-fast {
  animation: pulse-bg-anim 1.0s infinite ease-in-out;
  will-change: opacity;
}

@keyframes pulse-bg-anim {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1.0;
  }
}

/*
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 26, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 16, 26, 0.3) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: -1;
  pointer-events: none;
}*/

/* Mode Divin - HUD, Border & Timer Doré */
.divine-mode .oracle-rim,
.divine-mode .timer-progress,
.divine-mode .battle-timer-value {
  color: #ffd700 !important;
  stroke: #ffd700 !important;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8) !important;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6)) !important;
}

.divine-mode .oracle-impulsion .imp-value,
.divine-mode .oracle-impulsion .imp-text {
  color: #ffd700 !important;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8) !important;
}

.divine-glitch {
  animation: divine-glitch-anim 0.6s cubic-bezier(.25, .46, .45, .94) both;
}

@keyframes divine-glitch-anim {
  0% {
    transform: translate(0);
    filter: hue-rotate(0deg) skew(0deg);
  }

  15% {
    transform: translate(-3px, 2px);
    filter: hue-rotate(90deg) skew(-1.5deg);
  }

  30% {
    transform: translate(3px, -2px);
    filter: hue-rotate(180deg) skew(1.5deg);
  }

  45% {
    transform: translate(-2px, -3px);
    filter: hue-rotate(270deg) skew(-1deg);
  }

  60% {
    transform: translate(2px, 3px);
    filter: hue-rotate(360deg) skew(1deg);
  }

  75% {
    transform: translate(-1px, 1px);
    filter: hue-rotate(180deg) skew(-0.5deg);
  }

  100% {
    transform: translate(0);
    filter: hue-rotate(0deg) skew(0deg);
  }
}

.anomalie-flash.cyan-alert {
  animation: flash-cyan 0.25s ease-out;
}

@keyframes flash-cyan {
  0% {
    background: rgba(56, 189, 248, 0.25);
  }

  100% {
    background: transparent;
  }
}

.anomalie-flash.yellow-alert {
  animation: flash-yellow 0.3s ease-in-out;
}

@keyframes flash-yellow {
  0% {
    background: rgba(255, 230, 0, 0.2);
  }

  100% {
    background: transparent;
  }
}

/* ==========================================
   LAYOUT CONTAINERS
   ========================================== */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  padding: 10px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 3000000;
  top: 0;
  pointer-events: none;
}

.app-header .logo,
.app-header .header-status,
.app-header .btn-burger-menu {
  pointer-events: auto;
}

.logo {
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-size: 0.5rem;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  font-family: var(--font-title);
}

.logo-main {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 1px;
  font-family: var(--font-title);
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  right: 15px;
  top: 15px;
}

.status-indicator {
  font-family: var(--font-title);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.status-indicator.online {
  color: var(--neon-green);
  text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
  box-shadow: inset 0 0 5px rgba(57, 255, 20, 0.2);
}

.status-indicator.offline {
  color: var(--neon-magenta);
  text-shadow: 0 0 5px rgba(255, 0, 127, 0.5);
  box-shadow: inset 0 0 5px rgba(255, 0, 127, 0.2);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-burger-menu {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(20, 15, 35, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-burger-menu:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px var(--neon-cyan);
  transform: scale(1.08);
}

.btn-burger-menu:active {
  transform: scale(0.92);
}

.burger-bar {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(56, 189, 248, 0.6);
  transition: all 0.25s ease;
}

/* ==========================================
   TIROIR LATÉRAL CYBER-DIVIN (HUB ORACLE)
   ========================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 3000001;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 88vw);
  background: rgba(12, 7, 24, 0.96);
  border-left: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 3000002;
  overflow: hidden;
}

.drawer-menu.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(20, 12, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title-group {
  display: flex;
  flex-direction: column;
}

.drawer-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  letter-spacing: 1px;
}

.drawer-subtitle {
  font-size: 0.65rem;
  color: var(--neon-gold);
  font-family: var(--font-title);
  letter-spacing: 1.5px;
}

.btn-close-drawer {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-drawer:hover {
  background: rgba(255, 0, 85, 0.25);
  border-color: #ff0055;
  transform: scale(1.1);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-section-title {
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--neon-gold);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.btn-drawer-action {
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  min-height: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-drawer-action:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--neon-cyan);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.btn-drawer-action:active {
  transform: translateY(0);
}

.btn-drawer-action.btn-drawer-action-gold {
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
  background: rgba(255, 215, 0, 0.08);
}

.btn-drawer-action.btn-drawer-action-gold:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--neon-gold);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.45);
}

.btn-drawer-action.btn-drawer-action-cyan {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.06);
}

.btn-drawer-action.btn-drawer-action-cyan:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.drawer-hint-text {
  font-size: 0.76rem;
  color: rgba(240, 236, 248, 0.78);
  line-height: 1.45;
  margin: 0;
}

.main-content {
  flex: 1;
  position: relative;
  margin-top: 10px;
}

/* ==========================================
   SCREENS & CARDS
   ========================================== */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.screen.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.glass-card {
  background: rgba(0, 0, 0, 0.65);
  -border: 1px solid var(--border-glow);
  /* backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); */
  border-radius: 16px;
  padding: 25px;
  width: 100%;
  max-width: 500px;
  /* box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5),
    0 0 15px 0 rgba(56, 189, 248, 0.1); */
  max-height: 90%;
  overflow-y: auto;
  scrollbar-width: thin;
}

h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 2px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 10px;
}

h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--neon-cyan);
  margin-bottom: 10px;
}

/* ==========================================
   INPUTS & BUTTONS
   ========================================== */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group label {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
}

.radio-group input[type="radio"]:checked+label {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.radio-title {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-title);
}

.radio-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Custom Select & Range */
.custom-select {
  background: #140d28;
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  outline: none;
}

.range-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.range-container input[type="range"] {
  flex: 1;
  accent-color: var(--neon-cyan);
}

.range-val {
  font-family: var(--font-title);
  color: var(--neon-cyan);
  min-width: 45px;
  text-align: right;
  font-size: 1.2rem;
}

/* Player Config List */
.players-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.player-config-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.player-config-row input[type="text"] {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border 0.2s ease;
}

.player-config-row input[type="text"]:focus {
  border-color: var(--neon-cyan);
}

.pantheon-selector {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.btn-remove-player {
  background: rgba(255, 0, 127, 0.1);
  border: 1px solid rgba(255, 0, 127, 0.3);
  color: var(--neon-magenta);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-player:hover {
  background: var(--neon-magenta);
  color: white;
}

/* BUTTONS */
.btn-primary,
.btn-primary-small,
.btn-sec,
.btn-danger {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 700;
  text-align: center;
}

.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  color: var(--text-dark);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.btn-primary:disabled {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.1);
  color: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-primary :hover,
.btn-primary:focus,
.btn-primary:active {
  box-shadow: 0 0 15px rgba(56, 189, 248, 1);
}

.btn-primary-small {
  padding: 15px 15px;
  background: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  color: var(--text-dark);
  font-size: 0.85rem;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.btn-sec {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 15px 15px;
  font-size: 0.9rem;
}

.btn-sec:hover {
  background: rgba(255, 255, 255, 0.1);
}

.voice-status-indicator {
  transition: all 0.25s ease;
  user-select: none;
}

.voice-status-indicator.is-active-btn {
  border-color: var(--neon-cyan) !important;
  color: var(--neon-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25), inset 0 0 8px rgba(0, 240, 255, 0.12) !important;
}

.voice-status-indicator.voice-listening {
  border-color: #00ff66 !important;
  color: #00ff66 !important;
  box-shadow: 0 0 18px rgba(0, 255, 102, 0.35), inset 0 0 10px rgba(0, 255, 102, 0.15) !important;
}

.voice-status-indicator:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  pointer-events: none;
}

.btn-danger {
  background: rgba(255, 0, 127, 0.2);
  border: 1px solid var(--neon-magenta);
  color: var(--neon-magenta);
  padding: 12px 20px;
}

.btn-danger:hover {
  background: var(--neon-magenta);
  color: white;
}

/* ==========================================
   CALIBRATION SCREEN
   ========================================== */
.calibration-step {
  display: none;
  flex-direction: column;
  gap: 15px;
}

.calibration-step.active {
  display: flex;
}

.domaine-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: 8px;
}

.legend-item {
  font-size: 1rem;
}

.legend-item span {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 5px;
}

.initiator-select {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tap-calibration-box {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px dashed var(--neon-cyan);
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: var(--font-title);
  color: var(--neon-cyan);
  font-weight: 700;
  cursor: pointer;
}

.tap-calibration-box.calibrating {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
}

.tap-calibration-box.detected {
  animation: tap-detected-pulse 0.3s ease-out;
  color: var(--neon-green) !important;
}

@keyframes tap-detected-pulse {
  0% {
    transform: scale(1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  }

  50% {
    transform: scale(1.08);
    border-color: var(--neon-green);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.5);
  }

  100% {
    transform: scale(1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  }
}

.radar-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: ping 2s infinite ease-out;
}

@keyframes ping {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--neon-cyan);
  transition: width 0.1s ease;
}

.sensor-info {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ==========================================
   BATTLE SCREEN (HUD & CENTRAL TIMER)
   ========================================== */
#screen-battle {
  justify-content: center;
  padding: 10px 0;
}

.action-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 9900;
  display: flex;
  width: min(90vw, 390px);
  padding: 12px 16px;
  border: 1px solid var(--neon-cyan);
  border-radius: 12px;
  background: rgba(5, 3, 15, 0.96);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
  color: var(--text-main);
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%) translateY(140px);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0s linear 0.35s;
}


.action-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.action-toast strong {
  color: var(--neon-cyan);
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.action-toast span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ==========================================================================
   CADRAN ORBITAL CONCENTRIQUE ARÉNIA (STYLE DOUGHNUT 3 ANNEAUX)
   ========================================================================== */
.battle-dial-wrapper {
  position: relative;
  width: 440px;
  height: 440px;
  max-width: 94vw;
  max-height: 94vw;
  aspect-ratio: 1 / 1;
  margin: 5px auto 10px;
  user-select: none;
}

/* ==========================================================================
   HALO RÉACTIF VOCAL CYBER-DIVIN (PULSATION MICRO EN DIRECT)
   ========================================================================== */
.dial-voice-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  height: 95%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

body.voice-active .dial-voice-halo,
.dial-voice-halo.active {
  opacity: 1;
  visibility: visible;
}

.voice-halo-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 240, 255, 0.7);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12) 0%, rgba(0, 240, 255, 0.02) 70%, transparent 100%);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.4), inset 0 0 12px rgba(0, 240, 255, 0.2);
  will-change: transform, box-shadow, border-color, background;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.voice-halo-pulse-wave {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 240, 255, 0.4);
  opacity: 0.35;
  animation: voiceHaloRotate 14s linear infinite;
  pointer-events: none;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

/* 🟢 ÉTAT ÉVEILLÉ / ÉCOUTE ACTIVE (ALEXA STYLE) : VERT ÉMERAUDE ÉCLATANT */
.dial-voice-halo.voice-awake .voice-halo-ring {
  border-color: #00ff88 !important;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.32) 0%, rgba(0, 255, 136, 0.04) 70%, transparent 100%) !important;
  box-shadow: 0 0 32px rgba(0, 255, 136, 0.95), inset 0 0 18px rgba(0, 255, 136, 0.6) !important;
  transform: scale(1.05);
}

.dial-voice-halo.voice-awake .voice-halo-pulse-wave {
  border-color: rgba(0, 255, 136, 0.9) !important;
  opacity: 0.85 !important;
  transform: scale(1.08);
}

@keyframes voiceHaloRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   MODE FACE RETOURNÉE / DÉFI À L'AVEUGLE (ÉCONOMIE GPU / ÉCRAN NOIR)
   Le halo vocal et toutes les animations CSS sont coupés quand le téléphone est face contre table
   ========================================================================== */
body.blind-mode-active,
body.is-face-down,
.app-container.blind-mode-active {
  background: #000000 !important;
}

body.blind-mode-active .dial-voice-halo,
body.is-face-down .dial-voice-halo,
.app-container.blind-mode-active .dial-voice-halo {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
  pointer-events: none !important;
}

body.blind-mode-active *,
body.is-face-down *,
.app-container.blind-mode-active * {
  animation-play-state: paused !important;
}

body.blind-mode-active .bg-glow,
body.is-face-down .bg-glow,
body.blind-mode-active .anomalie-flash,
body.is-face-down .anomalie-flash,
body.blind-mode-active .vortex-fx,
body.is-face-down .vortex-fx {
  display: none !important;
}

.battle-dial-rotor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  pointer-events: none;
}

.battle-dial-rotor .oracle-core-wrapper {
  pointer-events: auto;
}

.battle-dial-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

/* 1. Anneau Extérieur : Parts de Donut Joueurs */
.dial-ring-outer {
  pointer-events: auto;
}

.dial-player-sector {
  fill: rgba(10, 6, 24, 0.6);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.dial-player-sector:hover {
  fill: rgba(20, 14, 44, 0.8);
  stroke: rgba(56, 189, 248, 0.4);
}

.dial-player-sector.is-active-player,
.dial-player-sector.p-sector-1.is-active-player,
.dial-player-sector.p-sector-2.is-active-player,
.dial-player-sector.p-sector-3.is-active-player,
.dial-player-sector.p-sector-4.is-active-player {
  fill: rgba(56, 189, 248, 0.18);
  stroke: var(--neon-cyan);
  stroke-width: 2.5px;
  filter: url(#dial-glow-cyan);
}

.dial-sector-divider {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5px;
}

.dial-junction-dot {
  fill: #00f0ff;
  stroke: rgba(0, 0, 0, 0.8);
  stroke-width: 1px;
}

/* 2. Anneau Intermédiaire : Événements Divins & Anomalie */
.dial-ring-middle {
  pointer-events: none;
}

.dial-mid-sector {
  fill: rgba(8, 4, 20, 0.7);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1.5px;
  transition: all 0.3s ease;
}

.dial-mid-sector.sector-divine {
  stroke: rgba(255, 215, 0, 0.35);
}

.dial-mid-sector.sector-divine.active {
  fill: rgba(255, 215, 0, 0.1);
  stroke: var(--neon-gold);
  filter: url(#dial-glow-gold);
}

.dial-mid-sector.sector-anomaly {
  stroke: rgba(188, 19, 254, 0.35);
}

.dial-mid-sector.sector-anomaly.active {
  fill: rgba(188, 19, 254, 0.1);
  stroke: var(--neon-magenta);
  filter: url(#dial-glow-magenta);
}

.dial-circuit-line {
  stroke: rgba(255, 215, 0, 0.35);
  stroke-width: 1px;
  fill: none;
}

/* 3. Anneau Intérieur : Cœur de l'Oracle & Minuteur Circulaire */
.dial-core-bg-stroke {
  fill: none;
  stroke: rgba(56, 189, 248, 0.25);
  stroke-width: 1.5px;
}

.timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 7px;
}

.timer-progress {
  fill: none;
  stroke: var(--neon-cyan);
  stroke-width: 7px;
  stroke-linecap: round;
  transform-origin: 250px 250px;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
  filter: drop-shadow(0 0 8px var(--neon-cyan));
}

/* 4. HTML Layer : Cœur Central (Avatar + Mode) - Entièrement contenu à l'intérieur pour laisser la jauge 100% visible */
.oracle-core-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  height: 38%;
  border-radius: 50%;
  overflow: hidden;
  margin: 0;
  z-index: 15;
}

.battle-dial-rotor-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.oracle-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oracle-display {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.18) 0%, rgba(14, 8, 38, 0.95) 55%, rgba(6, 2, 16, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 25px rgba(56, 189, 248, 0.2), 0 0 20px rgba(0, 0, 0, 0.9);
}


.oracle-core-energy-vortex {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  height: 65%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(0, 150, 255, 0.1) 60%, transparent 80%);
  filter: blur(8px);
  pointer-events: none;
  animation: pulse-core-vortex 3s infinite alternate ease-in-out;
}

@keyframes pulse-core-vortex {
  0% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.6;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

.oracle-hud-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.battle-timer {
  margin-top: -8px;
  text-align: center;
  color: #ffffff;
}

.battle-timer-value {
  display: block;
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 0.9;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.8), 0 2px 6px #000;
  letter-spacing: -1px;
}

.core-mode-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
}

.core-mode-label {
  font-family: var(--font-title);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.core-mode-title {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 1px;
}

.core-mode-icon {
  font-size: 0.6rem;
  color: var(--neon-cyan);
  margin-top: -1px;
}

/* 5. HTML Layer : Anneau Intermédiaire */
.dial-mid-html-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

.dial-mid-slot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 190px;
}

.dial-mid-slot.top-slot {
  top: 13%;
}

.dial-mid-slot.bottom-slot {
  bottom: 13%;
}

.dial-mid-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(14, 8, 30, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 2px;
}

.card-domain-icon-circle {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  transition: all 0.3s ease;
}

.card-domain-icon-circle.domain-frappe {
  border-color: #ff3e3e;
  color: #ff3e3e;
  box-shadow: 0 0 10px rgba(255, 62, 62, 0.6);
}

.card-domain-icon-circle.domain-defense {
  border-color: #00f0ff;
  color: #00f0ff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.card-domain-icon-circle.domain-glitch {
  border-color: #bc13fe;
  color: #bc13fe;
  box-shadow: 0 0 10px rgba(188, 19, 254, 0.6);
}

.card-domain-icon-circle.domain-corruption {
  border-color: #ff0055;
  color: #ff0055;
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.6);
}

.divine-icon-circle {
  border-color: var(--neon-gold);
  color: var(--neon-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.anomaly-icon-circle {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
  margin-top: 2px;
  margin-bottom: 0;
}

.dial-mid-texts {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 5. Textes en Arc de Cercle sur l'Anneau Intermédiaire */
.dial-curved-texts {
  pointer-events: none;
  user-select: none;
}

.dial-curved-texts text {
  font-family: var(--font-title);
  dominant-baseline: central;
}

.curved-text-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.curved-text-label.top-label textPath {
  fill: #38bdf8;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

.curved-text-label.bottom-label textPath {
  fill: #c084fc;
  filter: drop-shadow(0 0 4px rgba(192, 132, 252, 0.6));
}

.curved-text-val {
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.curved-text-val.top-val textPath {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8)), drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
}

.curved-text-val.bottom-val textPath {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 0, 128, 0.8)), drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
}

/* 6. HTML Layer : Anneau Extérieur (Orbes Joueurs) */
.dial-outer-html-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}

.player-doughnut-slot {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  z-index: 15;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.player-doughnut-slot:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.player-doughnut-name {
  position: absolute;
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(56, 189, 248, 0.4);
  white-space: nowrap;
  pointer-events: none;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.25s ease;
}

.player-doughnut-slot.is-active-player .player-doughnut-name,
.player-doughnut-slot.p-slot-1.is-active-player .player-doughnut-name,
.player-doughnut-slot.p-slot-2.is-active-player .player-doughnut-name,
.player-doughnut-slot.p-slot-3.is-active-player .player-doughnut-name,
.player-doughnut-slot.p-slot-4.is-active-player .player-doughnut-name {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
}

/* Orientation et placement des noms des joueurs face à chaque place */
/* 1. Joueur en bas : en bas du cercle, rotation 0° */
.player-doughnut-slot.pos-bottom .player-doughnut-name {
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  text-align: center;
}

/* 2. Joueur en haut : au-dessus du cercle, rotation 180° */
.player-doughnut-slot.pos-top .player-doughnut-name {
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  text-align: center;
}

/* 3. Joueur à gauche : à gauche du cercle, rotation -90° */
.player-doughnut-slot.pos-left .player-doughnut-name {
  right: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center center;
  text-align: center;
}

/* 4. Joueur à droite : à droite du cercle, rotation +90° */
.player-doughnut-slot.pos-right .player-doughnut-name {
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center center;
  text-align: center;
}

/* Mode 3 joueurs : positions obliques */
.player-doughnut-slot.pos-top-left .player-doughnut-name {
  bottom: calc(100% + 2px);
  right: 60%;
  transform: translateY(0) rotate(-120deg);
  transform-origin: center center;
  text-align: center;
}

.player-doughnut-slot.pos-top-right .player-doughnut-name {
  bottom: calc(100% + 2px);
  left: 60%;
  transform: translateY(0) rotate(120deg);
  transform-origin: center center;
  text-align: center;
}

.player-circle-slot {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(14, 8, 30, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}

.player-doughnut-slot.is-active-player .player-circle-slot,
.player-doughnut-slot.p-slot-1.is-active-player .player-circle-slot,
.player-doughnut-slot.p-slot-2.is-active-player .player-circle-slot,
.player-doughnut-slot.p-slot-3.is-active-player .player-circle-slot,
.player-doughnut-slot.p-slot-4.is-active-player .player-circle-slot {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 10px rgba(56, 189, 248, 0.4) !important;
  transform: scale(1.12);
}

.player-slot-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.player-slot-avatar-icon {
  font-size: 1.1rem;
  color: #ffffff;
}

.player-slot-stase-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(10, 5, 20, 0.95);
  border: 1.5px solid var(--neon-gold);
  color: var(--neon-gold);
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  pointer-events: none;
}

.player-slot-stase-badge.is-max {
  background: var(--neon-gold);
  color: #000;
  box-shadow: 0 0 12px var(--neon-gold);
  animation: pulse-max-stase 1.2s infinite alternate;
}

.dial-direction-badge {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 5, 25, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 4px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

/*
.battle-timer.warning {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
}

.battle-timer.urgent {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 24px rgba(255, 0, 127, 0.35);
  color: var(--neon-magenta);
  animation: timer-urgent-pulse 0.65s ease-in-out infinite alternate;
}
*/

.battle-timer.paused,
.battle-timer.standby {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
  color: var(--text-muted);
  animation: none;
}

@keyframes timer-urgent-pulse {
  from {
    transform: translateX(-50%) scale(1);
  }

  to {
    transform: translateX(-50%) scale(1.07);
  }
}

.oracle-label {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 2.8rem;
  color: var(--text-main);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  line-height: 1;
  margin-top: 15px;
}

.oracle-impulsion {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.imp-label {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.imp-value {
  font-size: 2.2rem;
  margin: 2px 0;
  animation: pulse-emoji 1.5s infinite;
}

@keyframes pulse-emoji {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.imp-text {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
}

.tap-anywhere-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  position: absolute;
  bottom: 25px;
  letter-spacing: 1px;
}

/* Battle HUD (Players) */
.battle-hud {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding: 0 15px;
  gap: 8px;
}

.player-panel {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
}

.hud-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.hud-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.player-panel.active-player {
  flex: 1.4;
  background: var(--bg-card);
  border-color: var(--faction-color, var(--neon-cyan));
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.05),
    inset 0 0 10px rgba(56, 189, 248, 0.05);
}

.player-panel.active-player .hud-name {
  font-size: 1.3rem;
  color: var(--faction-color, var(--neon-cyan));
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
  max-width: 150px;
}

.hud-pantheon {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
  color: var(--faction-color, var(--text-muted));
}

/* Arena Status Bar */
.arena-state-bar {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 600px;
  padding: 15px 0px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.25);
  -border-top: 1px solid rgba(255, 255, 255, 0.02);
  -border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 0.85rem;
  margin: 15px 0;
  margin-bottom: 25px;
}

.arena-anomaly {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--neon-yellow);
  font-family: var(--font-title);
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.arena-direction {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

#current-player-indicator {
  color: var(--neon-cyan);
  font-size: 1.1rem;
  text-shadow: 0 0 9px rgba(56, 189, 248, 0.3);
}

#arena-direction-indicator {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.arena-anomaly.active {
  color: var(--neon-magenta);
  text-shadow: 0 0 5px rgba(255, 0, 127, 0.3);
  animation: glitch-text 2s infinite;
}

/* Tactical Actions */
.battle-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 600px;
  padding: 0 15px;
  margin: 10px 0;
}

.btn-action {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-action .action-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: white;
}

.btn-action .action-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-action.repli {
  color: var(--neon-cyan);
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.02);
}

.btn-action.repli:hover {
  background: rgba(160, 175, 190, 0.1);
  border-color: rgba(160, 175, 190, 0.45);
}

.btn-action.defaut {
  color: var(--neon-magenta);
  box-shadow: inset 0 0 10px rgba(255, 0, 127, 0.02);
}

.btn-action.defaut:hover {
  background: rgba(255, 0, 127, 0.1);
  border-color: var(--neon-magenta);
}

.btn-action.purge {
  color: var(--neon-gold);
  box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.02);
}

.btn-action.purge:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--neon-gold);
}

.btn-action.fosse {
  border-color: rgba(255, 168, 0, 0.55);
  background: rgba(255, 168, 0, 0.08);
}

.btn-action.debug {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.06);
}

.btn-action.debug:hover,
.btn-action.debug:focus,
.btn-action.debug:active {
  background: rgba(56, 189, 248, 0.25);
  color: white
}

.btn-action.crash {
  border-color: rgba(255, 0, 127, 0.55);
  background: rgba(255, 0, 127, 0.08);
}

.btn-action.crash:hover,
.btn-action.crash:focus,
.btn-action.crash:active {
  background: rgba(255, 0, 127, 0.25);
  color: white
}

.mode-description {
  min-height: 2.6em;
  margin: 10px 2px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
}

.resolution-card {
  max-width: 420px;
  text-align: left;
  border-color: rgba(255, 0, 127, 0.4);
  box-shadow: 0 0 35px rgba(255, 0, 127, 0.16);
}

.resolution-kicker {
  color: var(--neon-yellow);
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
}

.resolution-card h2 {
  margin: 8px 0 18px;
  color: var(--neon-cyan);
  text-align: center;
}

.resolution-body {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.resolution-body ol,
.resolution-body ul {
  padding-left: 22px;
}

.resolution-body li+li {
  margin-top: 8px;
}

.resolution-body strong {
  color: var(--text-main);
}

@media (max-width: 520px) {
  #screen-battle {
    padding-top: 4px;
  }

  .oracle-core-wrapper {
    width: 210px;
    height: 210px;
    margin: 12px auto;
  }

  .oracle-display {
    width: 184px;
    height: 184px;
    overflow: hidden;
  }

  .battle-timer {
    bottom: 14px;
    min-width: 66px;
    padding: 4px 9px;
  }

  .battle-timer-value {
    font-size: 1.65rem;
  }

  #oracle-avatar-container {
    transform: scale(0.84);
  }

  .arena-state-bar {
    gap: 8px;
    margin: 10px 0;
    padding: 14px 10px;
  }

  .arena-direction,
  .arena-anomaly {
    font-size: 0.75rem;
  }

  .battle-actions {
    gap: 20px;
    padding: 0 8px;
  }

  .btn-action {
    min-height: 58px;
    padding: 9px 6px;
  }

  .btn-action .action-title {
    font-size: 0.82rem;
  }

  .btn-action .action-sub {
    font-size: 0.66rem;
  }
}

@media (max-height: 740px) and (max-width: 520px) {
  .oracle-core-wrapper {
    width: 175px;
    height: 175px;
    margin: 6px auto;
  }

  .oracle-display {
    width: 152px;
    height: 152px;
  }

  .battle-timer {
    bottom: 9px;
  }

  .battle-timer-value {
    font-size: 1.35rem;
  }

  #oracle-avatar-container {
    transform: scale(0.7);
  }

  .battle-hud-simplified {
    margin-bottom: 0 !important;
  }

  .arena-state-bar {
    margin: 6px 0;
    padding: 9px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .battle-timer.urgent,
  .imp-value,
  .radar-ping,
  .bg-glow {
    animation: none !important;
  }
}

.battle-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 600px;
  padding: 10px 15px 0 15px;
  margin-top: 25px;
}

/* ==========================================
   MODAL DIALOGS
   ========================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 2, 10, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
  background: rgba(5, 2, 10, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-content {
  max-width: 450px;
  transform: scale(0.9) translateY(15px);
  filter: blur(6px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease-out, opacity 0.35s ease-out;
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
  filter: blur(0px);
  opacity: 1;
}

.divine-event-log {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 234, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  min-height: 100px;
}

.divine-event-log h3 {
  color: var(--neon-yellow);
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.divine-event-log p {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-top: 6px;
  color: var(--text-main);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* ==========================================
   VICTORY SCREEN & SCORES
   ========================================== */
.victory-card {
  text-align: center;
}

.trophy-icon {
  font-size: 4rem;
  margin-bottom: 10px;
  animation: bounce-trophy 2s infinite ease;
}

@keyframes bounce-trophy {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

#victory-desc {
  color: var(--neon-cyan);
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 20px;
}

.scores-summary {
  margin: 20px 0;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 15px;
  text-align: left;
}

.scores-summary h3 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
  font-size: 0.95rem;
}

.scores-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border-left: 3px solid var(--faction-color, transparent);
}

.score-row.initiator-next {
  background: rgba(57, 255, 20, 0.05);
  border-right: 2px dashed var(--neon-green);
}

.score-row .player-info {
  display: flex;
  flex-direction: column;
}

.score-row .player-info-name {
  font-weight: 700;
  font-size: 1rem;
}

.score-row .player-info-pantheon {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.score-row .cards-count {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
}

.victory-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

/* ==========================================
   GLITCH & UTILITY ANIMATIONS
   ========================================== */
@keyframes glitch-text {
  0% {
    transform: skew(0deg);
  }

  2% {
    transform: skew(3deg);
  }

  4% {
    transform: skew(-3deg);
  }

  6% {
    transform: skew(0deg);
  }

  100% {
    transform: skew(0deg);
  }
}

/* ==========================================
   VISUAL FX SYSTEM (SHAKE, PULSE & CRT)
   ========================================== */

/* Secousse d'impact */
.shake-screen {
  animation: shake-anim 0.25s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake-anim {

  10%,
  90% {
    transform: translate3d(-2px, -1px, 0);
  }

  20%,
  80% {
    transform: translate3d(3px, 2px, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-5px, -3px, 0);
  }

  40%,
  60% {
    transform: translate3d(5px, 3px, 0);
  }
}

/* Pulsations du halo lumineux de fond en accord avec le rythme cardiaque */
.bg-glow.pulse-slow {
  animation: pulse-bg-anim 2.0s infinite ease-in-out;
  will-change: opacity;
}

.bg-glow.pulse-fast {
  animation: pulse-bg-anim 1.0s infinite ease-in-out;
  will-change: opacity;
}

@keyframes pulse-bg-anim {

  0%,
  100% {
    /* transform: translate(-50%, -50%) scale(1.0); */
    opacity: 0.7;
  }

  50% {
    /* transform: translate(-50%, -50%) scale(1.2); */
    opacity: 1.0;
  }
}

/* Effet CRT dégradé pour les anomalies */
/*.crt-flicker {
  position: relative;
}

.crt-flicker::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 26, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  animation: crt-flicker-anim 0.1s infinite;
  opacity: 0.15;
}

@keyframes crt-flicker-anim {

  0%,
  100% {
    opacity: 0.15;
  }

  50% {
    opacity: 0.25;
  }
}*/

/* Glitch plein écran - Intervention Divine */
.divine-glitch {
  animation: divine-glitch-anim 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes divine-glitch-anim {
  0% {
    filter: none;
    transform: translate(0);
  }

  10% {
    filter: invert(0.8) hue-rotate(90deg) contrast(3) saturate(2.5);
    transform: translate(-15px, 8px) skewX(12deg);
  }

  20% {
    filter: invert(0) hue-rotate(180deg) contrast(1.5) saturate(2);
    transform: translate(12px, -8px) skewX(-20deg);
  }

  30% {
    filter: invert(0.5) hue-rotate(270deg) contrast(2.5) saturate(3);
    transform: translate(-8px, -12px) skewY(15deg);
  }

  40% {
    filter: invert(0) hue-rotate(360deg) contrast(1.2) saturate(1.5);
    transform: translate(6px, 6px) skewX(5deg);
  }

  50% {
    filter: none;
    transform: translate(0);
  }
}

/* Effet Backglass (Glassmorphism) de démarrage de manche */
.battle-start-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 5, 22, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.battle-start-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================
   ORACLE PROGRESSION, SKINS & QR SCANNER
   ========================================== */

/* Panel de niveau et XP */
.oracle-progression-panel {
  background: none;
  border: none !important;
  border-radius: 0px;
  box-shadow: none !important;
  padding: 0px;
  margin: 0px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.oracle-level-badge {
  font-family: var(--font-title);
  font-weight: 900;
  color: var(--neon-cyan);
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.oracle-xp-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.xp-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
}

.xp-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Choix des thèmes (skins) */
.theme-selection-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 5px;
}

.theme-options {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-theme {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 6px;
  font-size: 0.75rem;
  font-family: var(--font-title);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-theme:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.btn-theme.active {
  border-color: var(--neon-cyan);
  color: var(--text-main);
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Modale de Transfert (QR Code) */
.qr-modal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 10px;
}

.qr-canvas-holder {
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  display: inline-block;
}

.qr-actions-row {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

/* Scanner de QR Code */
.camera-scanner-wrapper {
  width: 100%;
  max-width: 320px;
  height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
  margin: 10px auto;
  background: black;
}

#scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border: 2px solid var(--neon-green);
  border-radius: 8px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.scanner-viewfinder::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: scan-line-anim 2.5s infinite linear;
}

@keyframes scan-line-anim {
  0% {
    top: 0%;
  }

  50% {
    top: 100%;
  }

  100% {
    top: 0%;
  }
}

/* Halo circulaire grisé pour les tapes ignorées durant le cooldown */
.oracle-core-wrapper.has-cooldown::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  margin-top: -110px;
  margin-left: -110px;
  border: 3px dashed rgba(180, 180, 180, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  animation: cooldown-halo-pulse 0.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

#tap-test-status {
  text-align: center
}

@keyframes cooldown-halo-pulse {
  0% {
    transform: scale(0.75);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

/* Segmented Mode Selector */
.mode-selector-container {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-mode {
  flex: 1;
  padding: 12px;
  font-family: var(--font-title);
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.1, 0.8, 0.3, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-mode:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-mode.active-ascension {
  border-color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.1);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.btn-mode.active-chaos {
  border-color: var(--neon-red);
  background: rgba(255, 0, 127, 0.1);
  color: var(--neon-red);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
}

/* ==========================================
   FLOATING UNDO TOAST BAR (4s CANCEL)
   ========================================== */
.action-toast-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(140px);
  width: calc(100% - 32px);
  max-width: 440px;
  background: rgba(14, 10, 28, 0.95);
  border: 1px solid var(--neon-cyan);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(16px);
  z-index: 9900;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
  overflow: hidden;
}

.action-toast-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-undo-action {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--neon-magenta), #b0004c);
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 900;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.btn-undo-action:active {
  transform: scale(0.94);
  filter: brightness(1.2);
}

.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  box-shadow: 0 0 10px var(--neon-cyan);
  pointer-events: none;
  border-radius: 0 0 12px 12px;
}

/* ==========================================
   ULTRA-PREMIUM DOMAIN FX & SCREEN OVERLAYS
   ========================================== */
.anomalie-flash {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease-out;
  overflow: hidden;
}

.anomalie-flash.cyan-alert {
  opacity: 1;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(56, 189, 248, 0.1) 70%, transparent 100%);
  box-shadow: inset 0 0 60px rgba(56, 189, 248, 0.8);
}

.anomalie-flash.red-alert {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 0, 127, 0.45) 0%, rgba(255, 0, 127, 0.15) 70%, transparent 100%);
  box-shadow: inset 0 0 60px rgba(255, 0, 127, 0.9);
}

.anomalie-flash.yellow-alert {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 230, 0, 0.35) 0%, rgba(255, 230, 0, 0.1) 70%, transparent 100%);
  box-shadow: inset 0 0 60px rgba(255, 230, 0, 0.8);
}

.anomalie-flash.gray-alert {
  opacity: 1;
  background: radial-gradient(circle, rgba(160, 175, 190, 0.45) 0%, rgba(90, 100, 110, 0.15) 70%, transparent 100%);
  box-shadow: inset 0 0 60px rgba(160, 175, 190, 0.75);
}

/* ==========================================
   ONBOARDING SLIDER STYLES (PREMIUM DESIGN)
   ========================================== */
.onboarding-card {
  max-width: 480px;
  width: 92%;
  max-height: 88vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

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

.onboarding-title-badge {
  color: var(--neon-cyan);
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.btn-skip-onboarding {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-skip-onboarding:hover {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
}

.onboarding-slider-viewport {
  overflow: hidden;
  width: 100%;
  position: relative;
  flex: 1;
}

.onboarding-slides-container {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
}

.onboarding-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.onboarding-slide .slide-icon {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.onboarding-slide h2 {
  font-family: var(--font-title);
  color: var(--neon-cyan);
  font-size: 1.2rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.onboarding-slide .slide-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.onboarding-slide .slide-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
  font-size: 1rem;
  text-align: left;
  line-height: 1.55;
  width: 100%;
  box-sizing: border-box;
}

.slide-mode-item {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.5;
}

.slide-mode-item.cyan {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid var(--neon-cyan);
}

.slide-mode-item.magenta {
  background: rgba(255, 0, 127, 0.08);
  border-left: 3px solid var(--neon-magenta);
}

.slide-mode-item.gold {
  background: rgba(255, 215, 0, 0.08);
  border-left: 3px solid var(--neon-gold);
}

.slide-list {
  padding-left: 18px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

.slide-list li {
  margin-bottom: 8px;
}

.slide-list li:last-child {
  margin-bottom: 0;
}

.gestures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  font-size: 1rem;
  text-align: left;
}

.gesture-card {
  padding: 10px;
  border-radius: 8px;
  line-height: 1.4;
}

.gesture-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}

.gesture-card.cyan {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid var(--neon-cyan);
}

.gesture-card.gray {
  background: rgba(160, 175, 190, 0.1);
  border-left: 3px solid rgba(160, 175, 190, 0.6);
}

.gesture-card.gold {
  background: rgba(255, 215, 0, 0.08);
  border-left: 3px solid var(--neon-gold);
}

.gesture-card.magenta {
  background: rgba(255, 0, 127, 0.08);
  border-left: 3px solid var(--neon-magenta);
}

.slide-swipes-box {
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  text-align: left;
}

.slide-swipes-box strong {
  color: var(--neon-cyan);
  display: block;
  margin-bottom: 4px;
}

/* Footer & Controls */
.onboarding-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.onboarding-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.onboarding-dot.active {
  background: var(--neon-cyan) !important;
  opacity: 1 !important;
  transform: scale(1.35);
  box-shadow: 0 0 10px var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.onboarding-nav-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-onboarding-nav {
  flex: 1;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-onboarding-prev {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-main);
}

.btn-onboarding-prev:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-onboarding-next {
  background: linear-gradient(135deg, var(--neon-cyan), #00aaff);
  border: 1px solid var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.btn-onboarding-next:hover {
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
  transform: translateY(-1px);
}

.anomalie-flash.glitch-alert,
.anomalie-flash.gold-alert,
.anomalie-flash.divine-alert {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(255, 215, 0, 0.15) 70%, transparent 100%);
  box-shadow: inset 0 0 60px rgba(255, 215, 0, 0.9);
}

/* 1. FRAPPE (Slash Impact & Shockwave) */
.anomalie-flash.fx-frappe {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(255, 0, 127, 0.45) 0%, rgba(255, 42, 109, 0.2) 50%, transparent 85%);
  box-shadow: inset 0 0 100px rgba(255, 0, 127, 0.7);
  animation: fx-frappe-pulse 0.45s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-frappe::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 8px;
  background: linear-gradient(90deg, transparent, #ff007f, #ffffff, #ff007f, transparent);
  transform: translateY(-50%) rotate(-25deg) scaleX(0);
  filter: drop-shadow(0 0 20px #ff007f);
  animation: fx-frappe-slash 0.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes fx-frappe-pulse {
  0% {
    opacity: 1;
    transform: scale(0.96);
  }

  40% {
    opacity: 1;
    transform: scale(1.02);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes fx-frappe-slash {
  0% {
    transform: translateY(-50%) rotate(-25deg) scaleX(0);
    opacity: 1;
  }

  60% {
    transform: translateY(-50%) rotate(-25deg) scaleX(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) rotate(-25deg) scaleX(1.1);
    opacity: 0;
  }
}

/* 2. DÉFENSE (Shield Reflection Glow) */
.anomalie-flash.fx-defense {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.35) 0%, rgba(0, 150, 255, 0.15) 60%, transparent 85%);
  box-shadow: inset 0 0 90px rgba(56, 189, 248, 0.65);
  animation: fx-defense-aura 0.55s ease-out forwards;
}

.anomalie-flash.fx-defense::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(135deg, transparent 42%, rgba(56, 189, 248, 0.85) 48%, rgba(255, 255, 255, 0.95) 50%, rgba(56, 189, 248, 0.85) 52%, transparent 58%);
  transform: translateX(-100%) translateY(-100%) rotate(25deg);
  animation: fx-defense-sheen 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fx-defense-aura {
  0% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes fx-defense-sheen {
  0% {
    transform: translateX(-60%) translateY(-60%) rotate(25deg);
  }

  100% {
    transform: translateX(60%) translateY(60%) rotate(25deg);
  }
}

/* 3. GLITCH (Digital Aberration & Chromatic Shift) */
.anomalie-flash.fx-glitch {
  opacity: 1;
  background: rgba(157, 0, 255, 0.3);
  box-shadow: inset 0 0 100px rgba(157, 0, 255, 0.75);
  animation: fx-glitch-flash 0.45s steps(2, start) forwards;
}

.anomalie-flash.fx-glitch::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.4), transparent 30%, rgba(0, 255, 255, 0.4));
  mix-blend-mode: color-dodge;
  animation: fx-glitch-lines 0.35s steps(3, start) forwards;
}

@keyframes fx-glitch-flash {
  0% {
    opacity: 1;
    filter: contrast(180%) hue-rotate(90deg);
    transform: translate(2px, -2px);
  }

  30% {
    opacity: 0.9;
    filter: contrast(220%) hue-rotate(-90deg);
    transform: translate(-3px, 2px);
  }

  60% {
    opacity: 1;
    filter: invert(40%);
    transform: translate(3px, -1px);
  }

  100% {
    opacity: 0;
    filter: none;
    transform: translate(0, 0);
  }
}

@keyframes fx-glitch-lines {
  0% {
    clip-path: inset(15% 0 60% 0);
  }

  40% {
    clip-path: inset(45% 0 15% 0);
  }

  80% {
    clip-path: inset(10% 0 75% 0);
  }

  100% {
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }
}

/* 4. CORRUPTION (Toxic Biohazard Vignette & Radial System Reset Wave) */
.anomalie-flash.fx-corruption {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(180, 0, 220, 0.6) 0%, rgba(60, 0, 90, 0.75) 60%, rgba(10, 0, 20, 0.95) 100%);
  box-shadow: inset 0 0 140px rgba(220, 0, 255, 0.9), inset 0 0 40px rgba(180, 0, 220, 0.7);
  animation: fx-corruption-pulse 0.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-corruption::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  margin-top: -140px;
  margin-left: -140px;
  border: 4px solid rgba(220, 0, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(200, 0, 255, 0.9), inset 0 0 30px rgba(180, 0, 220, 0.6);
  transform: scale(0.1);
  animation: fx-corruption-ripple 0.45s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes fx-corruption-pulse {
  0% {
    opacity: 1;
    filter: brightness(150%);
    transform: scale(1.03);
  }

  40% {
    opacity: 0.9;
    filter: brightness(120%);
    transform: scale(1);
  }

  100% {
    opacity: 0;
    filter: brightness(100%);
    transform: scale(0.98);
  }
}

@keyframes fx-corruption-ripple {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }

  70% {
    transform: scale(2.6);
    opacity: 0.8;
  }

  100% {
    transform: scale(3.8);
    opacity: 0;
  }
}

/* 5. FUSION (Cosmic Energy Burst & Expanding Shockwave) */
.anomalie-flash.fx-fusion {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.6) 0%, rgba(56, 189, 248, 0.4) 45%, rgba(56, 189, 248, 0.15) 75%, transparent 100%);
  box-shadow: inset 0 0 120px rgba(56, 189, 248, 0.95), inset 0 0 60px rgba(255, 215, 0, 0.85);
  animation: fx-fusion-burst 0.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-fusion::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 320px;
  margin-top: -160px;
  margin-left: -160px;
  border: 5px solid #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 50px #00f0ff, 0 0 100px #ffd700, inset 0 0 40px #00f0ff;
  transform: scale(0.2);
  animation: fx-fusion-ring 0.45s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-fusion::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 12px;
  background: linear-gradient(90deg, transparent, #00f0ff, #ffffff, #ffd700, transparent);
  transform: translateY(-50%) rotate(45deg) scaleX(0);
  filter: drop-shadow(0 0 25px #00f0ff) drop-shadow(0 0 15px #ffd700);
  animation: fx-fusion-flare 0.45s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes fx-fusion-burst {
  0% {
    opacity: 1;
    filter: brightness(180%) contrast(140%);
    transform: scale(0.95);
  }

  30% {
    opacity: 1;
    filter: brightness(220%) contrast(160%);
    transform: scale(1.03);
  }

  100% {
    opacity: 0;
    filter: brightness(100%) contrast(100%);
    transform: scale(1);
  }
}

@keyframes fx-fusion-ring {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }

  60% {
    transform: scale(2.2);
    opacity: 0.9;
  }

  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

@keyframes fx-fusion-flare {
  0% {
    transform: translateY(-50%) rotate(45deg) scaleX(0);
    opacity: 1;
  }

  50% {
    transform: translateY(-50%) rotate(45deg) scaleX(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) rotate(45deg) scaleX(1.3);
    opacity: 0;
  }
}

/* 6. CONCENTRATION DIVINE (Stase Vortex & Sacred Golden Halo) */
.anomalie-flash.fx-concentration {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.65) 0%, rgba(255, 170, 0, 0.35) 45%, rgba(255, 215, 0, 0.1) 75%, transparent 100%);
  box-shadow: inset 0 0 120px rgba(255, 215, 0, 0.85), 0 0 80px rgba(255, 215, 0, 0.6);
  animation: fx-concentration-burst 0.65s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-concentration::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  margin-top: -120px;
  margin-left: -120px;
  border: 4px solid #ffd700;
  box-shadow: 0 0 50px #ffd700, 0 0 80px #ffaa00, inset 0 0 40px #ffd700;
  transform: rotate(45deg) scale(0.2);
  animation: fx-concentration-diamond 0.6s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-concentration::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 10px;
  background: linear-gradient(90deg, transparent, #ffaa00, #ffffff, #ffd700, transparent);
  transform: translateY(-50%) rotate(-45deg) scaleX(0);
  filter: drop-shadow(0 0 30px #ffd700) drop-shadow(0 0 15px #ffffff);
  animation: fx-concentration-flare 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes fx-concentration-burst {
  0% {
    opacity: 0;
    transform: scale(0.92);
    filter: brightness(180%);
  }

  25% {
    opacity: 1;
    transform: scale(1.04);
    filter: brightness(240%);
  }

  100% {
    opacity: 0;
    transform: scale(1);
    filter: brightness(100%);
  }
}

@keyframes fx-concentration-diamond {
  0% {
    transform: rotate(45deg) scale(0.1);
    opacity: 1;
  }

  50% {
    transform: rotate(135deg) scale(2.2);
    opacity: 0.9;
  }

  100% {
    transform: rotate(225deg) scale(3.8);
    opacity: 0;
  }
}

@keyframes fx-concentration-flare {
  0% {
    transform: translateY(-50%) rotate(-45deg) scaleX(0);
    opacity: 1;
  }

  50% {
    transform: translateY(-50%) rotate(-45deg) scaleX(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) rotate(-45deg) scaleX(1.4);
    opacity: 0;
  }
}

/* 7. RECONFIGURATION TACTIQUE (Matrix Grid Shift & Quantum Cyber Sweep) */
.anomalie-flash.fx-reconfiguration {
  opacity: 1;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.5) 0%, rgba(255, 0, 127, 0.25) 50%, rgba(0, 0, 0, 0.4) 80%, transparent 100%);
  box-shadow: inset 0 0 130px rgba(56, 189, 248, 0.8), inset 0 0 60px rgba(255, 0, 127, 0.5);
  animation: fx-reconfig-burst 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-reconfiguration::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.25) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: fx-reconfig-grid 0.5s ease-out forwards;
}

.anomalie-flash.fx-reconfiguration::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, transparent, #00f0ff, #ffffff, #ff007f, transparent);
  box-shadow: 0 0 25px #00f0ff, 0 0 40px #ff007f;
  animation: fx-reconfig-sweep 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fx-reconfig-burst {
  0% {
    opacity: 0;
    filter: contrast(180%) brightness(180%);
    transform: scale(0.96);
  }

  30% {
    opacity: 1;
    filter: contrast(240%) brightness(220%);
    transform: scale(1.02);
  }

  100% {
    opacity: 0;
    filter: contrast(100%) brightness(100%);
    transform: scale(1);
  }
}

@keyframes fx-reconfig-grid {
  0% {
    opacity: 1;
    transform: scale(0.8) rotate(-5deg);
  }

  60% {
    opacity: 0.8;
    transform: scale(1.1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: scale(1.3) rotate(3deg);
  }
}

@keyframes fx-reconfig-sweep {
  0% {
    top: 0%;
    opacity: 1;
  }

  80% {
    top: 100%;
    opacity: 1;
  }

  100% {
    top: 105%;
    opacity: 0;
  }
}

/* 8. RÉSONANCE DIVINE (Dual Harmonic Sonic Waves & Frequency Ripples) */
.anomalie-flash.fx-resonance {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(0, 255, 200, 0.55) 0%, rgba(56, 189, 248, 0.3) 40%, rgba(255, 215, 0, 0.2) 70%, transparent 95%);
  box-shadow: inset 0 0 120px rgba(0, 255, 200, 0.85), inset 0 0 60px rgba(255, 215, 0, 0.6);
  animation: fx-resonance-burst 0.6s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-resonance::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  margin-top: -100px;
  margin-left: -100px;
  border: 4px solid #00f0ff;
  border-radius: 50%;
  box-shadow: 0 0 40px #00f0ff, inset 0 0 30px #00f0ff;
  animation: fx-resonance-ring1 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-resonance::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  margin-top: -100px;
  margin-left: -100px;
  border: 4px solid #ffd700;
  border-radius: 50%;
  box-shadow: 0 0 40px #ffd700, inset 0 0 30px #ffd700;
  animation: fx-resonance-ring2 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) 0.08s forwards;
}

@keyframes fx-resonance-burst {
  0% {
    opacity: 0;
    transform: scale(0.95);
    filter: brightness(160%);
  }

  30% {
    opacity: 1;
    transform: scale(1.03);
    filter: brightness(220%);
  }

  100% {
    opacity: 0;
    transform: scale(1);
    filter: brightness(100%);
  }
}

@keyframes fx-resonance-ring1 {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }

  60% {
    transform: scale(2.4);
    opacity: 0.9;
  }

  100% {
    transform: scale(4.2);
    opacity: 0;
  }
}

@keyframes fx-resonance-ring2 {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }

  60% {
    transform: scale(2.0);
    opacity: 0.85;
  }

  100% {
    transform: scale(3.6);
    opacity: 0;
  }
}

/* 9. PURGE THERMIQUE (Incandescent Plasma & Total Catalyst Vaporization) */
.anomalie-flash.fx-purge {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0%, rgba(255, 140, 0, 0.75) 35%, rgba(255, 30, 0, 0.45) 70%, transparent 100%);
  box-shadow: inset 0 0 160px rgba(255, 100, 0, 0.95), 0 0 100px rgba(255, 255, 255, 0.9);
  animation: fx-purge-blast 0.65s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-purge::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  margin-top: -150px;
  margin-left: -150px;
  border: 8px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 80px #ff6600, 0 0 140px #ff0000, inset 0 0 60px #ffffff;
  animation: fx-purge-ring 0.6s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-purge::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -25%;
  width: 150%;
  height: 18px;
  background: linear-gradient(90deg, transparent, #ff3300, #ffffff, #ffcc00, transparent);
  transform: translateY(-50%) rotate(0deg) scaleX(0);
  filter: drop-shadow(0 0 40px #ff6600) drop-shadow(0 0 20px #ffffff);
  animation: fx-purge-flare 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes fx-purge-blast {
  0% {
    opacity: 1;
    filter: brightness(300%) contrast(200%);
    transform: scale(0.9);
  }

  30% {
    opacity: 1;
    filter: brightness(250%) contrast(160%);
    transform: scale(1.05);
  }

  100% {
    opacity: 0;
    filter: brightness(100%) contrast(100%);
    transform: scale(1);
  }
}

@keyframes fx-purge-ring {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }

  50% {
    transform: scale(2.2);
    opacity: 0.9;
  }

  100% {
    transform: scale(4.5);
    opacity: 0;
  }
}

@keyframes fx-purge-flare {
  0% {
    transform: translateY(-50%) rotate(0deg) scaleX(0);
    opacity: 1;
  }

  40% {
    transform: translateY(-50%) rotate(0deg) scaleX(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-50%) rotate(0deg) scaleX(1.5);
    opacity: 0;
  }
}

/* 10. FLATLINE (Temporal Blackout & Critical Strobe Asphyxia) */
.anomalie-flash.fx-flatline {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 20%, rgba(255, 0, 40, 0.8) 75%, rgba(30, 0, 5, 0.95) 100%);
  box-shadow: inset 0 0 160px rgba(255, 0, 40, 0.95);
  animation: fx-flatline-strobe 0.8s steps(4, start) forwards;
}

.anomalie-flash.fx-flatline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #ff0040, #ffffff, #ff0040, transparent);
  box-shadow: 0 0 30px #ff0040, 0 0 60px #ff0000;
  animation: fx-flatline-line 0.75s ease-out forwards;
}

@keyframes fx-flatline-strobe {
  0% {
    opacity: 1;
    filter: contrast(250%) invert(20%);
  }

  25% {
    opacity: 0.4;
    filter: contrast(180%);
  }

  50% {
    opacity: 1;
    filter: contrast(280%) invert(30%);
  }

  75% {
    opacity: 0.6;
    filter: contrast(200%);
  }

  100% {
    opacity: 0;
    filter: none;
  }
}

@keyframes fx-flatline-line {
  0% {
    transform: scaleY(3);
    opacity: 1;
  }

  50% {
    transform: scaleY(1);
    opacity: 0.9;
  }

  100% {
    transform: scaleY(0.2);
    opacity: 0;
  }
}

/* 11. INVERSION TEMPORELLE (Quantum Time Warp Spiral & Chrono Distortion) */
.anomalie-flash.fx-time-warp {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.5) 0%, rgba(130, 0, 255, 0.35) 50%, rgba(0, 0, 0, 0.5) 85%, transparent 100%);
  box-shadow: inset 0 0 130px rgba(56, 189, 248, 0.75), inset 0 0 70px rgba(130, 0, 255, 0.55);
  animation: fx-timewarp-pulse 0.65s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-time-warp::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  margin-top: -130px;
  margin-left: -130px;
  border: 4px dashed #00f0ff;
  border-top-color: #ff00ff;
  border-bottom-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 50px #00f0ff, 0 0 80px #ff00ff;
  animation: fx-timewarp-spin 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fx-timewarp-pulse {
  0% {
    opacity: 0;
    transform: scale(0.9);
    filter: hue-rotate(0deg);
  }

  40% {
    opacity: 1;
    transform: scale(1.04);
    filter: hue-rotate(-90deg);
  }

  100% {
    opacity: 0;
    transform: scale(1);
    filter: hue-rotate(-180deg);
  }
}

@keyframes fx-timewarp-spin {
  0% {
    transform: rotate(0deg) scale(0.2);
    opacity: 1;
  }

  60% {
    transform: rotate(-540deg) scale(2.2);
    opacity: 0.9;
  }

  100% {
    transform: rotate(-720deg) scale(3.6);
    opacity: 0;
  }
}

/* 12. COUP DE GRÂCE DIVIN (Ascendant God Ray & Solar Glory) */
.anomalie-flash.fx-divine-finisher {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(255, 235, 120, 0.85) 0%, rgba(255, 180, 0, 0.5) 40%, rgba(255, 215, 0, 0.2) 75%, transparent 100%);
  box-shadow: inset 0 0 160px rgba(255, 215, 0, 0.95), 0 0 120px rgba(255, 255, 255, 0.9);
  animation: fx-finisher-bloom 0.9s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-divine-finisher::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 140px;
  height: 100%;
  margin-left: -70px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 215, 0, 0.6) 60%, transparent 100%);
  filter: drop-shadow(0 0 40px #ffd700) drop-shadow(0 0 80px #ffffff);
  animation: fx-finisher-ray 0.85s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-divine-finisher::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  margin-top: -140px;
  margin-left: -140px;
  border: 6px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 60px #ffd700, inset 0 0 40px #ffffff;
  animation: fx-finisher-corona 0.8s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes fx-finisher-bloom {
  0% {
    opacity: 0;
    transform: scale(0.9);
    filter: brightness(200%);
  }

  35% {
    opacity: 1;
    transform: scale(1.05);
    filter: brightness(300%);
  }

  100% {
    opacity: 0;
    transform: scale(1);
    filter: brightness(100%);
  }
}

@keyframes fx-finisher-ray {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }

  30% {
    transform: scaleY(1);
    opacity: 1;
  }

  100% {
    transform: scaleY(1.2);
    opacity: 0;
  }
}

@keyframes fx-finisher-corona {
  0% {
    transform: scale(0.1);
    opacity: 1;
  }

  50% {
    transform: scale(2.2);
    opacity: 0.9;
  }

  100% {
    transform: scale(4.0);
    opacity: 0;
  }
}

/* 13. REPLI TACTIQUE (Shadow Extraction Smoke & Decompression) */
.anomalie-flash.fx-retreat {
  opacity: 1;
  background: radial-gradient(circle at center, rgba(40, 45, 60, 0.8) 0%, rgba(15, 20, 30, 0.9) 65%, rgba(5, 5, 10, 0.95) 100%);
  box-shadow: inset 0 0 130px rgba(0, 0, 0, 0.95), inset 0 0 50px rgba(56, 189, 248, 0.3);
  animation: fx-retreat-smoke 0.6s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

.anomalie-flash.fx-retreat::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  margin-top: -110px;
  margin-left: -110px;
  border: 3px dashed rgba(56, 189, 248, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  animation: fx-retreat-ring 0.55s ease-out forwards;
}

@keyframes fx-retreat-smoke {
  0% {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(4px);
  }

  30% {
    opacity: 1;
    transform: scale(1.02);
    filter: blur(0px);
  }

  100% {
    opacity: 0;
    transform: scale(1);
    filter: blur(2px);
  }
}

@keyframes fx-retreat-ring {
  0% {
    transform: scale(0.3);
    opacity: 1;
  }

  60% {
    transform: scale(2.0);
    opacity: 0.7;
  }

  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

/* MICRO SHAKE SCREEN FOR IMPACTS */
.screen-impact-shake {
  animation: micro-impact-shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes micro-impact-shake {

  10%,
  90% {
    transform: translate3d(-2px, 1px, 0);
  }

  20%,
  80% {
    transform: translate3d(3px, -2px, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-3px, 3px, 0);
  }

  40%,
  60% {
    transform: translate3d(3px, -2px, 0);
  }
}

/* ==========================================
   MODALES OVERLAY (Arène à Distance & QR)
   ========================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}

.modal.active {
  display: flex !important;
}

.modal-content {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
  0% {
    transform: scale(0.9) translateY(10px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Verrouillage navigateur strict lors des cooldowns / toast d'annulation */
body.input-blocked button:not(#btn-undo-toast):not(#action-toast *):not(.player-undo-floating-pill),
body.input-blocked #tap-area,
body.input-blocked .btn-action,
body.input-blocked .btn-turn-action,
body.input-blocked #oracle-avatar-container {
  pointer-events: none !important;
  opacity: 0.7 !important;
}

body.input-blocked #action-toast,
body.input-blocked #action-toast *,
body.input-blocked #btn-undo-toast,
body.input-blocked .player-doughnut-slot.is-undo-active,
body.input-blocked .player-circle-slot.is-undo-active,
body.input-blocked .player-doughnut-slot.is-undo-active *,
body.input-blocked .dial-player-sector.is-undo-sector,
body.input-blocked .player-undo-floating-pill {
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* ==========================================
   PROFILE & ACHIEVEMENTS SYSTEM CSS
   ========================================== */
.profile-tab-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-title);
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1;
}

.profile-tab-btn:hover {
  color: #fff;
  border-color: var(--neon-cyan);
}

.profile-tab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  font-weight: bold;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 5px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: #fff;
  font-weight: bold;
}

.stat-value.gold {
  color: var(--neon-gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.stat-value.cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.stat-value.magenta {
  color: var(--neon-magenta);
  text-shadow: 0 0 8px rgba(255, 0, 255, 0.4);
}

.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.achievement-card.unlocked {
  background: rgba(255, 215, 0, 0.06);
  border-color: rgba(255, 215, 0, 0.3);
}

.achievement-card.locked {
  opacity: 0.5;
  filter: grayscale(0.8);
}

.ach-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.ach-info {
  flex: 1;
}

.ach-title {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--neon-gold);
}

.achievement-card.locked .ach-title {
  color: #aaa;
}

.ach-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.profile-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.history-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid var(--text-muted);
  padding: 10px 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item.win {
  border-left-color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.04);
}

.history-item.loss {
  border-left-color: var(--neon-magenta);
}

.history-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-badge {
  font-size: 0.68rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-win {
  background: rgba(56, 189, 248, 0.2);
  color: var(--neon-cyan);
}

.badge-loss {
  background: rgba(255, 0, 127, 0.2);
  color: var(--neon-magenta);
}

.history-mode {
  font-size: 0.75rem;
  color: #fff;
  font-weight: bold;
}

.history-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.68rem;
  color: var(--text-muted);
  gap: 2px;
}

/* Toast de notification de succès */
.achievement-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(10, 5, 20, 0.92);
  border: 1.5px solid var(--neon-gold);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20000;
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.achievement-toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================
   ARCABOX AUTHENTICATION & USER BADGE
   ========================================== */
.auth-status-container {
  display: flex;
  align-items: center;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 255, 249, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 249, 0.2);
  transition: all 0.3s ease;
}

.btn-login:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 255, 249, 0.5);
  transform: scale(1.05);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 5, 25, 0.7);
  border: 1px solid rgba(0, 255, 249, 0.3);
  border-radius: 20px;
  padding: 3px 10px 3px 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.user-badge-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.user-badge,
.pantheon-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 5, 22, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 4px 8px 4px 4px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.user-badge {
  position: relative;
  z-index: 1;
}

.user-badge:hover {
  z-index: 3;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  background: rgba(15, 8, 35, 0.95);
}

.pantheon-badge {
  position: relative;
  margin-left: -14px;
  z-index: 2;
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 215, 0, 0.2);
}

.pantheon-badge:hover {
  z-index: 4;
  border-color: var(--neon-gold);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.5);
  background: rgba(25, 18, 5, 0.95);
}

.avatar-ring-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-ring-svg {
  position: absolute;
  inset: -2px;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
  pointer-events: none;
}

.xp-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}

.xp-ring-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.xp-ring-fill.user-ring {
  stroke: var(--neon-cyan);
  filter: drop-shadow(0 0 4px var(--neon-cyan));
}

.xp-ring-fill.pantheon-ring {
  stroke: var(--neon-gold);
  filter: drop-shadow(0 0 4px var(--neon-gold));
}

.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.pantheon-icon-bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.lvl-pill {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-title);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 8px;
  line-height: 1;
  z-index: 10;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}

.user-lvl-pill {
  background: #ffffff;
  color: #0b061a;
  border: 1px solid #ffffff;
  font-weight: 900;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.pantheon-lvl-pill {
  background: #140d05;
  color: var(--neon-gold);
  border: 1px solid var(--neon-gold);
}

.equipped-card-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 5, 22, 0.85);
  border: 1px solid rgba(255, 0, 255, 0.45);
  border-radius: 20px;
  padding: 4px 8px 4px 4px;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 0, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(8px);
  position: relative;
  margin-left: -14px;
  z-index: 3;
}

.equipped-card-badge:hover {
  z-index: 5;
  border-color: var(--neon-magenta);
  box-shadow: 0 0 18px rgba(255, 0, 255, 0.6);
  background: rgba(30, 5, 30, 0.95);
}

.xp-ring-fill.card-ring {
  stroke: var(--neon-magenta);
  filter: drop-shadow(0 0 4px var(--neon-magenta));
}

.equipped-card-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 0, 255, 0.4);
}

.equipped-card-icon-bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 0, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.card-lvl-pill {
  background: #1a0520;
  color: var(--neon-magenta);
  border: 1px solid var(--neon-magenta);
}

/* Grille de Récompenses d'XP Fin de Match */
.victory-xp-section {
  background: rgba(10, 5, 25, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 15px;
}

.victory-xp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.xp-reward-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}

.xp-reward-box:hover {
  transform: translateY(-2px);
}

.xp-reward-box.player {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.xp-reward-box.pantheon {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.xp-reward-box.card {
  border-color: rgba(255, 0, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.15);
}

.xp-reward-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.xp-reward-val {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 8px currentColor;
}

.xp-reward-box.player .xp-reward-val {
  color: var(--neon-cyan);
}

.xp-reward-box.pantheon .xp-reward-val {
  color: var(--neon-gold);
}

.xp-reward-box.card .xp-reward-val {
  color: var(--neon-magenta);
}

.xp-reward-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.xp-reward-sub {
  font-size: 0.7rem;
  color: var(--text-main);
  opacity: 0.85;
  margin-top: 3px;
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.non-clickable {
  pointer-events: none !important;
  cursor: default !important;
}

.roster-player-card {
  background: rgba(15, 8, 30, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: all 0.3s ease;
}

.roster-player-card.linked {
  border-color: var(--neon-gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
  background: rgba(25, 18, 5, 0.85);
}

.roster-slot-title {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.roster-status-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.roster-player-card.linked .roster-status-badge {
  color: var(--neon-gold);
  font-weight: 600;
}

.roster-scan-btn {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.roster-scan-btn:hover {
  background: var(--neon-cyan);
  color: #000;
}

.user-pseudo {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-level {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--neon-gold);
  font-weight: 600;
}

/* ==========================================
   AURA ET POUSSIÈRE D'ÉTOILES DORÉES (Oracle)
   ========================================== */
.oracle-rim.divine-resonance-aura {
  box-shadow:
    0 0 35px rgba(255, 215, 0, 0.85),
    0 0 70px rgba(255, 180, 0, 0.5),
    inset 0 0 30px rgba(255, 215, 0, 0.6) !important;
  border-color: #ffd700 !important;
  animation: pulseDivineAura 2s ease-in-out infinite alternate !important;
}

@keyframes pulseDivineAura {
  0% {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6), 0 0 50px rgba(255, 180, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.5);
    filter: drop-shadow(0 0 10px #ffd700);
  }

  100% {
    box-shadow: 0 0 45px rgba(255, 215, 0, 0.95), 0 0 85px rgba(255, 200, 0, 0.75), inset 0 0 40px rgba(255, 215, 0, 0.8);
    filter: drop-shadow(0 0 22px #ffe555);
  }
}

#oracle-stardust-particles {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #ffd700, transparent),
    radial-gradient(3px 3px at 70% 20%, #fff3a8, transparent),
    radial-gradient(2px 2px at 80% 80%, #ffb700, transparent),
    radial-gradient(3px 3px at 30% 75%, #ffffff, transparent),
    radial-gradient(2px 2px at 50% 15%, #ffd700, transparent),
    radial-gradient(2.5px 2.5px at 15% 60%, #fff3a8, transparent);
  background-repeat: repeat;
  background-size: 100px 100px;
  animation: rotateStardust 8s linear infinite;
}

#oracle-stardust-particles.active {
  opacity: 1;
}

@keyframes rotateStardust {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.04);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* ==========================================
   SLOTS VISUELS DE CONCENTRATION (1 À 4 JOUEURS)
   ========================================== */
/* ==========================================
   SLOTS VISUELS DE CONCENTRATION / JOUEURS (RONDS 48PX CENTRÉS)
   ========================================== */
.dial-outer-html-layer {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  z-index: 12 !important;
  display: block !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}



.concentration-slot.player-circle-slot {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  background: rgba(15, 10, 30, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 0 !important;
  user-select: none;
}

.player-circle-slot,
.player-circle-slot.p-slot-1,
.player-circle-slot.p-slot-2,
.player-circle-slot.p-slot-3,
.player-circle-slot.p-slot-4 {
  border-color: rgba(56, 189, 248, 0.45);
}

.player-circle-slot .player-slot-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.player-circle-slot .player-slot-num-text,
.player-circle-slot.p-slot-1 .player-slot-num-text,
.player-circle-slot.p-slot-2 .player-slot-num-text,
.player-circle-slot.p-slot-3 .player-slot-num-text,
.player-circle-slot.p-slot-4 .player-slot-num-text {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

/* Joueur Actif (Tour en cours) */
.player-circle-slot.is-active-player {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 16px var(--neon-cyan), inset 0 0 8px rgba(56, 189, 248, 0.4) !important;
  transform: scale(1.15);
  z-index: 5;
  animation: pulseActivePlayerOrb 1.8s infinite alternate ease-in-out;
}

@keyframes pulseActivePlayerOrb {
  0% {
    box-shadow: 0 0 10px var(--neon-cyan);
  }

  100% {
    box-shadow: 0 0 22px var(--neon-cyan), 0 0 30px rgba(56, 189, 248, 0.4);
  }
}

/* Joueur avec carte en Stase */
.player-circle-slot.has-card {
  border-color: var(--neon-gold) !important;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.6) !important;
}

.player-circle-slot.has-card.max-power {
  border-color: #ffd700 !important;
  animation: pulseGoldConcentration 1.2s infinite alternate ease-in-out;
}

@keyframes pulseGoldConcentration {
  0% {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
  }

  100% {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), inset 0 0 10px rgba(255, 215, 0, 0.3);
  }
}

/* Badge Stase flottant sur le rond */
.player-slot-stase-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: rgba(10, 5, 25, 0.96);
  border: 1.5px solid var(--neon-gold);
  border-radius: 12px;
  font-size: 0.65rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--neon-gold);
  padding: 1px 5px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  z-index: 6;
  white-space: nowrap;
}

.player-slot-stase-badge.is-max {
  background: #ffd700;
  color: #000;
  border-color: #ffffff;
  box-shadow: 0 0 12px #ffd700;
}

/* ==========================================
   ORBE DE JOUEUR : ANNULATION / REMBOBINAGE TEMPOREL (OPTION A)
   ========================================== */
.player-circle-slot.is-undo-active {
  border-color: var(--neon-magenta) !important;
  box-shadow: 0 0 24px var(--neon-magenta), inset 0 0 12px rgba(255, 0, 128, 0.6) !important;
  transform: scale(1.22) !important;
  z-index: 20 !important;
  animation: pulseRadialUndo 0.8s infinite alternate ease-in-out !important;
  cursor: pointer !important;
}

@keyframes pulseRadialUndo {
  0% {
    box-shadow: 0 0 14px var(--neon-magenta), inset 0 0 8px rgba(255, 0, 128, 0.4);
  }

  100% {
    box-shadow: 0 0 28px var(--neon-magenta), 0 0 40px rgba(255, 0, 128, 0.6), inset 0 0 16px rgba(255, 0, 128, 0.8);
  }
}

.player-slot-undo-badge {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
}

.undo-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.undo-ring-track {
  stroke: rgba(255, 0, 128, 0.25);
  stroke-width: 3.5;
  fill: none;
}

.undo-ring-progress {
  stroke: var(--neon-magenta);
  stroke-width: 4;
  stroke-dasharray: 150.8;
  stroke-dashoffset: 0;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--neon-magenta));
}

.undo-icon {
  position: absolute;
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px #ffffff);
  animation: rewindSpin 1.4s infinite linear;
}

@keyframes rewindSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

/* Quand le slot est en mode annulation, le nom s'efface pour laisser place nette à la bulle d'annulation */
.player-doughnut-slot.is-undo-active .player-doughnut-name {
  opacity: 0 !important;
  pointer-events: none;
}

.player-undo-floating-pill {
  position: absolute;
  background: linear-gradient(135deg, var(--neon-magenta), #7b00ff);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 14px;
  box-shadow: 0 0 16px rgba(255, 0, 128, 0.9), 0 4px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  z-index: 30;
  letter-spacing: 0.6px;
  pointer-events: auto;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  animation: pulseUndoPill 0.6s infinite alternate ease-in-out;
}

@keyframes pulseUndoPill {
  0% {
    filter: brightness(1) drop-shadow(0 0 4px rgba(255, 0, 128, 0.5));
  }

  100% {
    filter: brightness(1.25) drop-shadow(0 0 10px rgba(255, 0, 128, 1));
  }
}

/* Orientation et positionnement de la bulle d'annulation dans l'arc de cercle face au joueur actif */
.player-doughnut-slot.pos-bottom .player-undo-floating-pill {
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  text-align: center;
}

.player-doughnut-slot.pos-top .player-undo-floating-pill {
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  text-align: center;
}

.player-doughnut-slot.pos-left .player-undo-floating-pill {
  right: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center center;
  text-align: center;
}

.player-doughnut-slot.pos-right .player-undo-floating-pill {
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center center;
  text-align: center;
}

.player-doughnut-slot.pos-top-left .player-undo-floating-pill {
  bottom: calc(100% + 2px);
  right: 60%;
  transform: translateY(0) rotate(-120deg);
  transform-origin: center center;
  text-align: center;
}

.player-doughnut-slot.pos-top-right .player-undo-floating-pill {
  bottom: calc(100% + 2px);
  left: 60%;
  transform: translateY(0) rotate(120deg);
  transform-origin: center center;
  text-align: center;
}

/* Secteur SVG pulsant en mode annulation */
.dial-player-sector.is-undo-sector {
  fill: rgba(255, 0, 128, 0.22) !important;
  stroke: var(--neon-magenta) !important;
  stroke-width: 3px !important;
  filter: url(#dial-glow-magenta);
  cursor: pointer !important;
  animation: pulseUndoSector 0.8s infinite alternate ease-in-out;
}

@keyframes pulseUndoSector {
  0% {
    fill: rgba(255, 0, 128, 0.15);
  }

  100% {
    fill: rgba(255, 0, 128, 0.32);
  }
}

/* Boutons tactiques spéciaux */
.btn-action.reconfig {
  border-color: var(--neon-cyan);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(0, 100, 150, 0.4));
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  animation: pulseReconfig 1.8s infinite alternate ease-in-out;
}

@keyframes pulseReconfig {
  0% {
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
  }

  100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
  }
}

.btn-action.concentration {
  border-color: var(--neon-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(150, 100, 0, 0.4));
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Modale Concentration */
.btn-conc-domain.active-conc-domain {
  border-color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
  font-weight: bold;
}

.btn-conc-power.active-conc-power {
  border-color: var(--neon-gold);
  background: rgba(255, 215, 0, 0.3);
  color: var(--neon-yellow);
}

/* Overlay Maintien Concentration 3s -> 5s */
.conc-hold-card {
  max-width: 420px;
  width: 90%;
  text-align: center;
  border: 2px solid var(--neon-gold);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.15);
  padding: 25px 20px;
  border-radius: 16px;
  animation: pulseGoldGlow 1.5s infinite alternate ease-in-out;
}

@keyframes pulseGoldGlow {
  0% {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  }

  100% {
    box-shadow: 0 0 45px rgba(255, 215, 0, 0.7);
  }
}

.conc-hold-countdown-val {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  margin: 10px 0;
}

.conc-hold-progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin: 15px 0 10px 0;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.conc-hold-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff8800, #ffd700, #00fff9);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  border-radius: 6px;
  transition: width 0.1s linear;
}

/* Initiation guidée styles are defined at the end of the stylesheet */

@keyframes guidedPulseGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
  }

  100% {
    transform: scale(1.04);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.9), 0 0 40px rgba(56, 189, 248, 0.5);
  }
}

/* ==========================================================================
   FORMAT MATCH DE TOURNOI (BO3 / BO5) & DROIT DE REVANCHE
   ========================================================================== */

.tournament-match-hud {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px auto 8px auto;
  padding: 5px 14px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 24px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
  width: fit-content;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

.tournament-hud-badge {
  font-family: var(--font-title);
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--neon-gold);
  background: rgba(255, 215, 0, 0.18);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--neon-gold);
}

.tournament-hud-score-track {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--text-main);
}

.tournament-player-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tournament-player-name {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tournament-pips-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.score-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.score-pip.filled {
  background: var(--neon-gold);
  border-color: #fff;
  box-shadow: 0 0 8px var(--neon-gold), 0 0 14px rgba(255, 215, 0, 0.8);
  transform: scale(1.15);
}

.tournament-hud-round-label {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  font-family: var(--font-title);
  letter-spacing: 0.5px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Modal Intermission Scoreboard */
.intermission-scoreboard {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin: 14px 0;
  flex-wrap: wrap;
}

.intermission-player-card {
  flex: 1;
  min-width: 130px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.intermission-player-card.winner {
  border-color: var(--neon-gold);
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.intermission-player-card .p-name {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: #fff;
}

.intermission-player-card .p-score {
  font-size: 1.8rem;
  font-family: var(--font-title);
  color: var(--neon-gold);
  font-weight: bold;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
  line-height: 1;
}

.intermission-player-card .p-pips {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.intermission-player-card .p-pips .score-pip {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   BILAN STATISTIQUE & CARTE MVP DE FIN DE PARTIE (MATCH RECAP)
   ========================================================================== */

.stats-section-title {
  font-family: var(--font-title);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding-bottom: 4px;
}

/* Carte MVP Holographique */
.mvp-card-container {
  margin: 16px 0;
  position: relative;
}

.mvp-card-box {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(56, 189, 248, 0.08));
  border: 1.5px solid var(--neon-gold);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.25), inset 0 0 15px rgba(255, 215, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
  animation: pulseGlowGold 3s infinite alternate ease-in-out;
}

.mvp-card-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.15) 50%, transparent 55%);
  transform: rotate(30deg);
  animation: holoSheen 4s infinite linear;
  pointer-events: none;
}

@keyframes holoSheen {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }

  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

@keyframes pulseGlowGold {
  0% {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
  }

  100% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.45), 0 0 10px rgba(56, 189, 248, 0.3);
  }
}

.mvp-card-visual {
  min-width: 60px;
  height: 75px;
  border-radius: 10px;
  border: 2px solid var(--neon-gold);
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.mvp-card-visual .mvp-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.mvp-card-visual .mvp-power {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--neon-gold);
}

.mvp-card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mvp-badge-tag {
  font-family: var(--font-title);
  font-size: 0.68rem;
  color: var(--neon-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

.mvp-card-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  color: #fff;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.mvp-card-feat {
  font-size: 0.8rem;
  color: var(--neon-cyan);
  line-height: 1.3;
}

.mvp-card-player {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Grille Statistique */
.match-recap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0;
}

@media (max-width: 480px) {
  .match-recap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.recap-stat-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.recap-stat-box:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.05);
}

.recap-stat-icon {
  font-size: 1.2rem;
}

.recap-stat-val {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: bold;
  color: #fff;
}

.recap-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* Comparatif Gladiateurs */
.players-breakdown-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.player-breakdown-row.is-winner {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.06);
}

.player-breakdown-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-breakdown-name {
  font-family: var(--font-title);
  color: #fff;
  font-weight: bold;
}

.player-breakdown-stats {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.player-breakdown-stats strong {
  color: #fff;
}

/* ==========================================================================
   🎯 ONGLET QUÊTES & DÉFIS ARCABOX
   ========================================================================== */
.profile-challenges-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.challenge-card {
  background: rgba(11, 6, 26, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.challenge-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.challenge-card.completed {
  border-color: rgba(255, 215, 0, 0.45);
  background: rgba(255, 215, 0, 0.04);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.challenge-title-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.challenge-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: #ffffff;
  font-weight: bold;
}

.challenge-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.challenge-rewards {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.reward-pill {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.reward-pill.ac {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
}

.reward-pill.xp {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #00f0ff;
}

.reward-pill.freq-daily {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.45);
  color: #ffaa00;
}

.reward-pill.freq-weekly {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #00f0ff;
}

.reward-pill.freq-monthly {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.reward-pill.freq-ephemere {
  background: rgba(255, 0, 127, 0.15);
  border: 1px solid rgba(255, 0, 127, 0.45);
  color: #ff3399;
}

.reward-pill.history-count {
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #ffd700;
  font-weight: 900;
}

.challenge-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
}

.challenge-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.challenge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.challenge-card.completed .challenge-progress-fill {
  background: linear-gradient(90deg, #ffd700, #ffaa00);
}

.challenge-progress-val {
  font-family: var(--font-mono, monospace);
  color: #ffffff;
  font-weight: bold;
  font-size: 0.72rem;
  min-width: 40px;
  text-align: right;
}

.challenge-status-badge {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
}

.challenge-status-badge.in-progress {
  color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.1);
}

.challenge-status-badge.done {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ==========================================================================
   👑 CÉLÉBRATION DE LEVEL-UP
   ========================================================================== */
.levelup-celebration-card {
  border: 2px solid var(--neon-gold) !important;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.3), inset 0 0 25px rgba(56, 189, 248, 0.15) !important;
  animation: levelup-pulse-glow 2s infinite alternate;
}

@keyframes levelup-pulse-glow {
  0% {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.25), inset 0 0 15px rgba(56, 189, 248, 0.1);
  }

  100% {
    box-shadow: 0 0 45px rgba(255, 215, 0, 0.5), inset 0 0 35px rgba(56, 189, 248, 0.25);
  }
}

.levelup-crown-icon {
  animation: levelup-crown-bounce 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 12px #ffd700);
}

@keyframes levelup-crown-bounce {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.1);
  }
}

.levelup-badge-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: left;
}

.levelup-badge-visual {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 2px solid var(--neon-gold);
  background: radial-gradient(circle, rgba(255, 215, 0, 0.25) 0%, rgba(0, 0, 0, 0.8) 100%);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.levelup-badge-text {
  flex: 1;
}

.levelup-badge-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.levelup-badge-rank {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ==========================================================================
   MODE GRAND ÉCRAN TV (SPECTATOR JUMBOTRON 16:9)
   ========================================================================== */

/* Écran de verrouillage TV non autorisée */
.tv-unauthorized-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #11001a 0%, #05000a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  font-family: var(--font-main, sans-serif);
}

.tv-lock-card {
  background: rgba(20, 10, 35, 0.85);
  border: 2px solid rgba(255, 0, 85, 0.5);
  box-shadow: 0 0 50px rgba(255, 0, 85, 0.3), inset 0 0 30px rgba(255, 0, 85, 0.1);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 550px;
  backdrop-filter: blur(15px);
}

.tv-lock-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px #ff0055);
}

.tv-lock-title {
  font-family: var(--font-title, sans-serif);
  font-size: 1.8rem;
  color: #ff0055;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 0 0 15px rgba(255, 0, 85, 0.6);
}

.tv-lock-desc {
  color: #cccccc;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.tv-lock-badge {
  background: rgba(255, 0, 85, 0.2);
  border: 1px solid #ff0055;
  color: #ff88aa;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.tv-lock-hint {
  font-size: 0.8rem;
  color: #888888;
}

.tv-lock-hint code {
  color: var(--neon-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Grille Spectateur TV 16:9 */
body.tv-display-mode #screen-config,
body.tv-display-mode #screen-calibration,
body.tv-display-mode #screen-victory,
body.tv-display-mode .action-bar,
body.tv-display-mode .hud-top-bar,
body.tv-display-mode .mobile-only-controls,
body.tv-display-mode #btn-action-validate,
body.tv-display-mode #btn-action-cancel,
body.tv-display-mode #btn-action-purge,
body.tv-display-mode #btn-action-debug,
body.tv-display-mode #btn-action-crash {
  display: none !important;
}

/* ==========================================================================
   TV DISPLAY : HYBRIDE & MULTIPLEX 32 JOUEURS (8 TABLES)
   ========================================================================== */
body.tv-display-mode {
  overflow: hidden !important;
  background: #04010a !important;
  user-select: none;
}

body.tv-display-mode .app-header,
body.tv-display-mode .arena-state-bar,
body.tv-display-mode .battle-hud-simplified,
body.tv-display-mode .concentration-slots-container,
body.tv-display-mode .battle-footer,
body.tv-display-mode .oracle-core-wrapper,
body.tv-display-mode #screen-config,
body.tv-display-mode #screen-calibration,
body.tv-display-mode .tournament-match-hud {
  display: none !important;
}

.tv-root-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0e0722 0%, #03010a 100%);
  display: flex;
  flex-direction: column;
  z-index: 99999;
  overflow: hidden;
}

/* 1. Header Navigation Régie */
.tv-top-bar {
  height: 54px;
  background: rgba(10, 5, 25, 0.95);
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 10;
}

.tv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-brand-logo {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  letter-spacing: 1px;
}

.tv-brand-sub {
  font-size: 0.75rem;
  color: var(--neon-gold);
  font-family: var(--font-title);
  letter-spacing: 1.5px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 12px;
}

.tv-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-control-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.tv-control-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--neon-cyan);
}

.tv-control-btn.active {
  background: var(--neon-cyan);
  color: #000;
  border-color: #fff;
  box-shadow: 0 0 12px var(--neon-cyan);
}

.tv-tables-selector {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tv-table-btn {
  padding: 4px 8px;
  font-size: 0.7rem;
}

.tv-demo-btn {
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--neon-gold);
}

.tv-demo-btn.active-demo {
  background: var(--neon-gold);
  color: #000;
  box-shadow: 0 0 14px var(--neon-gold);
  animation: pulse-demo-btn 1.4s infinite alternate;
}

@keyframes pulse-demo-btn {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--neon-gold);
  }
}

/* 2. Zone Principale */
.tv-main-view {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 12px 20px 60px 20px;
}

/* Layout Multiplex (Grille 8 tables) */
.tv-multiplex-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
}

@media (max-width: 1300px) {
  .tv-multiplex-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
    overflow-y: auto;
  }
}

.tv-table-card {
  background: rgba(14, 8, 30, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tv-table-card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: var(--neon-cyan);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3);
}

.tv-table-card.tv-hot-table-pulse {
  border-color: var(--neon-gold) !important;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), inset 0 0 15px rgba(255, 215, 0, 0.3) !important;
  animation: pulse-hot-table 1s infinite alternate ease-in-out;
}

@keyframes pulse-hot-table {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.02);
  }
}

.tv-table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.tv-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-card-table-id {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.tv-card-status-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--neon-cyan);
  border: 1px solid currentColor;
}

.tv-card-status-badge.status-resonance {
  background: rgba(255, 215, 0, 0.2);
  color: var(--neon-gold);
}

.tv-card-status-badge.status-purge {
  background: rgba(255, 85, 0, 0.2);
  color: #ff5500;
}

.tv-card-status-badge.status-victory {
  background: #ffd700;
  color: #000;
}

.tv-card-timer-badge {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--neon-yellow);
}

.tv-table-card-center {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  margin: 4px 0;
}

.tv-card-card-box {
  display: flex;
  flex-direction: column;
}

.tv-card-card-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.tv-card-card-name {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  font-weight: bold;
}

.tv-card-dir {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: bold;
}

.tv-table-card-players {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tv-mini-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.tv-mini-player.is-turn {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.tv-mini-player.is-eliminated {
  opacity: 0.4;
  filter: grayscale(0.8);
}

.tv-mini-avatar-wrap {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-right: 6px;
}

.tv-mini-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.tv-mini-num {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.5rem;
  font-weight: bold;
  background: #000;
  border-radius: 2px;
  padding: 0 2px;
}

.tv-mini-num.p1 {
  color: #00f0ff;
}

.tv-mini-num.p2 {
  color: #ff0055;
}

.tv-mini-num.p3 {
  color: #ffaa00;
}

.tv-mini-num.p4 {
  color: #bc13fe;
}

.tv-mini-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.tv-mini-name {
  font-size: 0.72rem;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.tv-mini-pips-track {
  display: flex;
  gap: 2px;
}

.tv-mini-pip {
  width: 4px;
  height: 6px;
  border-radius: 1px;
  background: rgba(0, 255, 128, 0.2);
  border: 0.5px solid #00ff80;
}

.tv-mini-pip.corrupted {
  background: #ff0055;
  border-color: #ff0055;
  box-shadow: 0 0 3px #ff0055;
}

.tv-mini-score {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--neon-gold);
  margin-left: 4px;
}

/* 3. Vue Leaderboard 32 Joueurs */
.tv-leaderboard-card {
  max-width: 1000px;
  height: 100%;
  margin: 0 auto;
  background: rgba(12, 6, 26, 0.9);
  border: 2px solid var(--neon-gold);
  border-radius: 16px;
  padding: 16px 24px;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.tv-leaderboard-header {
  text-align: center;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.tv-leaderboard-header h2 {
  font-family: var(--font-title);
  color: var(--neon-gold);
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.tv-leaderboard-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tv-leaderboard-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 8px;
}

.tv-leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tv-leaderboard-row.rank-1 {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--neon-gold);
}

.tv-leaderboard-row.rank-2 {
  background: rgba(192, 192, 192, 0.1);
  border-color: #c0c0c0;
}

.tv-leaderboard-row.rank-3 {
  background: rgba(205, 127, 50, 0.1);
  border-color: #cd7f32;
}

.tv-rank-col {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 900;
  width: 40px;
}

.tv-leader-player-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.tv-leader-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--neon-cyan);
}

.tv-leader-names {
  display: flex;
  flex-direction: column;
}

.tv-leader-pseudo {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: #fff;
}

.tv-leader-pantheon {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tv-leader-stat-col {
  font-size: 0.85rem;
  color: #fff;
  width: 140px;
  text-align: center;
}

.tv-leader-stat-col.text-danger {
  color: #ff0055;
  font-weight: bold;
}

.tv-leader-status-col {
  font-size: 0.75rem;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  width: 90px;
  text-align: center;
}

.tv-leader-status-col.is-alive {
  background: rgba(0, 255, 128, 0.15);
  color: #00ff80;
  border: 1px solid #00ff80;
}

.tv-leader-status-col.is-eliminated {
  background: rgba(255, 0, 85, 0.15);
  color: #ff0055;
  border: 1px solid #ff0055;
}

.tv-table-dedicated-badge {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--neon-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  letter-spacing: 2px;
}

.tv-center-card-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 6px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tv-spectator-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* 4 Coins Joueurs (Table Dédiée) */
.tv-player-corner {
  position: absolute;
  width: 280px;
  background: rgba(15, 10, 30, 0.85);
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.tv-player-corner.corner-nw {
  top: 20px;
  left: 24px;
}

.tv-player-corner.corner-ne {
  top: 20px;
  right: 24px;
}

.tv-player-corner.corner-sw {
  bottom: 20px;
  left: 24px;
}

.tv-player-corner.corner-se {
  bottom: 20px;
  right: 24px;
}

.tv-player-corner.active-turn {
  border-color: var(--neon-gold);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.2);
  transform: scale(1.04);
}

.tv-player-corner.eliminated {
  opacity: 0.45;
  filter: grayscale(0.8);
  border-color: #555555;
}

.tv-player-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-avatar-box {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.tv-player-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.tv-player-num-tag {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 4px;
  background: #000;
  color: #fff;
  border: 1px solid currentColor;
}

.tv-player-num-tag.p1 {
  color: #00f0ff;
  border-color: #00f0ff;
}

.tv-player-num-tag.p2 {
  color: #ff0055;
  border-color: #ff0055;
}

.tv-player-num-tag.p3 {
  color: #ffaa00;
  border-color: #ffaa00;
}

.tv-player-num-tag.p4 {
  color: #bc13fe;
  border-color: #bc13fe;
}

.tv-player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.tv-player-meta.align-right {
  text-align: right;
}

.tv-player-name {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.tv-player-equipped-card {
  font-size: 0.75rem;
  color: var(--neon-cyan);
}

.tv-status-eliminated {
  color: #ff0055;
  font-weight: bold;
}

.tv-player-corruption-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tv-corruption-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: bold;
  letter-spacing: 1px;
}

.tv-corruption-label.align-right {
  text-align: right;
}

.tv-corruption-bar {
  display: flex;
  gap: 6px;
}

.tv-corr-pip {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  transition: all 0.3s;
}

.tv-corr-pip.clean {
  background: rgba(0, 255, 128, 0.25);
  border: 1px solid #00ff80;
  box-shadow: 0 0 8px rgba(0, 255, 128, 0.4);
}

.tv-corr-pip.corrupted {
  background: #ff0055;
  border: 1px solid #ff0055;
  box-shadow: 0 0 12px #ff0055;
  animation: pulse-corrupted-pip 1.2s infinite;
}

@keyframes pulse-corrupted-pip {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(0.95);
  }
}

/* Centre : Oracle Géant + Minuteur */
.tv-center-core {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.tv-direction-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 2px solid var(--neon-cyan);
  color: var(--neon-cyan);
  padding: 6px 20px;
  border-radius: 30px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 2px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-direction-badge.reverse {
  border-color: #ff0055;
  color: #ff0055;
  box-shadow: 0 0 20px rgba(255, 0, 85, 0.3);
}

.tv-oracle-wrapper {
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-timer-box {
  text-align: center;
}

.tv-timer-val {
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 20px var(--neon-cyan);
  line-height: 1;
}

.tv-timer-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-weight: bold;
  margin-top: 4px;
}

/* Bandeau Ticker Live Bas */
.tv-ticker-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(5, 0, 15, 0.95);
  border-top: 2px solid var(--neon-cyan);
  box-shadow: 0 -5px 25px rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 100000;
}

.tv-ticker-tag {
  background: #ff0055;
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  flex-shrink: 0;
  animation: blink-tag 1.5s infinite;
}

@keyframes blink-tag {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.tv-ticker-text {
  color: #ffffff;
  font-size: 0.95rem;
  font-family: var(--font-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   EFFETS DE FLASH ÉCRAN & DOMAINES DE COMBAT
   ========================================================================== */
.anomalie-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.1s ease-out;
}

/* Frappe -> Rouge Clair */
.anomalie-flash.fx-frappe,
.anomalie-flash.red-alert,
.anomalie-flash.flash-red,
.anomalie-flash.flash-frappe {
  background: radial-gradient(circle at center, rgba(255, 77, 109, 0.45) 0%, rgba(255, 77, 109, 0) 75%);
  opacity: 1;
  animation: flash-anim 0.4s ease-out forwards;
}

/* Défense -> Bleu Clair */
.anomalie-flash.fx-defense,
.anomalie-flash.cyan-alert,
.anomalie-flash.flash-cyan,
.anomalie-flash.flash-blue-light,
.anomalie-flash.flash-defense {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.45) 0%, rgba(56, 189, 248, 0) 75%);
  opacity: 1;
  animation: flash-anim 0.4s ease-out forwards;
}

/* Glitch -> Vert Plutôt Clair */
.anomalie-flash.fx-glitch,
.anomalie-flash.green-alert,
.anomalie-flash.flash-glitch,
.anomalie-flash.flash-green-light {
  background: radial-gradient(circle at center, rgba(74, 222, 128, 0.5) 0%, rgba(74, 222, 128, 0) 75%);
  opacity: 1;
  animation: flash-anim 0.4s ease-out forwards;
}

/* Résonance -> Or Divin */
.anomalie-flash.fx-resonance,
.anomalie-flash.gold-alert,
.anomalie-flash.flash-gold,
.anomalie-flash.flash-resonance {
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.55) 0%, rgba(255, 215, 0, 0) 75%);
  opacity: 1;
  animation: flash-anim 0.4s ease-out forwards;
}

@keyframes flash-anim {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.02);
  }
}

/* Flash FX Spectaculaires pour Grand Écran TV */
.tv-flash-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  animation: tv-flash-fade 0.45s ease-out forwards;
}

/* Frappe TV -> Rouge Clair */
.tv-flash-fx.flash-frappe,
.tv-flash-fx.flash-magenta,
.tv-flash-fx.flash-red,
.tv-flash-fx.flash-danger {
  background: radial-gradient(circle at center, rgba(255, 77, 109, 0.55) 0%, rgba(255, 77, 109, 0) 75%);
}

/* Défense TV -> Bleu Clair */
.tv-flash-fx.flash-defense,
.tv-flash-fx.flash-cyan,
.tv-flash-fx.flash-blue-light {
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.5) 0%, rgba(56, 189, 248, 0) 75%);
}

/* Glitch TV -> Vert Plutôt Clair */
.tv-flash-fx.flash-glitch,
.tv-flash-fx.flash-green-light {
  background: radial-gradient(circle at center, rgba(74, 222, 128, 0.55) 0%, rgba(74, 222, 128, 0) 75%);
}

/* Résonance TV -> Or Divin */
.tv-flash-fx.flash-gold,
.tv-flash-fx.flash-resonance {
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.55) 0%, rgba(255, 215, 0, 0) 75%);
}

@keyframes tv-flash-fade {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

/* ==========================================================================
   MODE TABLE ARÉNIA : ÉCRAN ROND PIMORONI (480x480) SUR PI 4B
   ========================================================================== */

body.table-round-mode {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000000;
  cursor: none !important;
  user-select: none;
}

/* Masquage simple de tous les boutons et menus */
body.table-round-mode #screen-config,
body.table-round-mode #screen-calibration,
body.table-round-mode #screen-victory,
body.table-round-mode .action-bar,
body.table-round-mode .hud-top-bar,
body.table-round-mode .mobile-only-controls,
body.table-round-mode .arena-status-bar,
body.table-round-mode .anomalie-banner,
body.table-round-mode .tournament-match-hud,
body.table-round-mode .modal,
body.table-round-mode #btn-action-validate,
body.table-round-mode #btn-action-cancel,
body.table-round-mode #btn-action-purge,
body.table-round-mode #btn-action-debug,
body.table-round-mode #btn-action-crash,
body.table-round-mode #btn-action-reconfig,
body.table-round-mode #btn-action-chaos-fosse,
body.table-round-mode #btn-action-defaut,
body.table-round-mode #btn-action-repli,
body.table-round-mode #btn-show-history,
body.table-round-mode #btn-show-profile,
body.table-round-mode .action-toast,
body.table-round-mode .sync-status-badge {
  display: none !important;
}

/* Écran de combat transformé en hub circulaire plein écran */
body.table-round-mode #screen-battle {
  display: flex !important;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 50%;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #0a0518 0%, #000000 100%);
  margin: 0;
  padding: 0;
}

body.table-round-mode .oracle-core-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

body.table-round-mode #oracle-avatar-container {
  width: 100% !important;
  height: 100% !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 50%;
}

/* Minuteur incrusté avec lisibilité maximale */
body.table-round-mode #battle-timer {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  border: 2px solid var(--neon-cyan);
  padding: 6px 20px;
  border-radius: 30px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

body.table-round-mode #battle-timer-text {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 10px var(--neon-cyan);
}

/* Écran de verrouillage circulaire */
.table-unauthorized-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 50%;
  background: radial-gradient(circle, #150510 0%, #000000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  text-align: center;
}

.table-lock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.table-lock-icon {
  font-size: 2.5rem;
}

.table-lock-title {
  font-family: var(--font-title);
  color: #ff4d6d;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.table-lock-sub {
  color: #888888;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* ==========================================
   VOICE CONTROL HUD & INDICATOR (« LES OREILLES DE L'ORACLE »)
   ========================================== */
.voice-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(10, 5, 22, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
  transition: all 0.25s ease-in-out;
  user-select: none;
}

.voice-status-indicator.voice-listening {
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  animation: pulseVoiceListening 2s infinite ease-in-out;
}

.voice-status-indicator.voice-hearing {
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
  transform: scale(1.06);
}

.voice-status-indicator.voice-muted {
  border-color: rgba(0, 240, 255, 0.35);
  color: var(--neon-cyan);
  box-shadow: none;
  opacity: 0.75;
}

.voice-status-indicator.voice-disabled {
  border-color: rgba(255, 255, 255, 0.15);
  color: #8c82a6;
  opacity: 0.5;
}

.voice-wave {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: voiceDotWave 1.2s infinite ease-in-out;
}

@keyframes pulseVoiceListening {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
  }

  50% {
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.65);
  }
}

@keyframes voiceDotWave {

  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.4;
  }

  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

/* ==========================================
   TABLE LAYOUT & DISPOSITION SELECTOR
   ========================================== */
.table-layout-btn-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-table-layout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  background: rgba(15, 8, 30, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
}

.btn-table-layout:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  transform: translateX(2px);
}

.btn-table-layout.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(255, 0, 85, 0.15));
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
  color: #ffffff;
  font-weight: bold;
}

.btn-table-layout .layout-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.btn-table-layout .layout-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.btn-table-layout .layout-title {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  font-family: var(--font-title);
}

.btn-table-layout .layout-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-main);
}

.btn-table-layout.active .layout-sub {
  color: rgba(255, 255, 255, 0.85);
}

.shake-anim {
  animation: modalShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes modalShake {

  10%,
  90% {
    transform: translate3d(-2px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(4px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-6px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(6px, 0, 0);
  }
}

/* ==========================================
   BLIND CHALLENGE MODE (DÉFI À L'AVEUGLE)
   ========================================== */
.app-container.blind-mode-active {
  filter: brightness(0.7) contrast(1.1);
  transition: filter 0.5s ease;
}

/* =========================================================
   🎓 INITIATION GUIDÉE PAR L'ORACLE — HUD FLOTTANT EN BAS
   ========================================================= */
.guided-tutorial-overlay {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 580px;
  z-index: 1100;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: slideUpGuidedHUD 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpGuidedHUD {
  from {
    opacity: 0;
    transform: translate(-50%, 30px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.guided-hud-box {
  pointer-events: auto;
  width: 100%;
  background: linear-gradient(145deg, rgba(14, 8, 30, 0.96), rgba(8, 4, 18, 0.98));
  border: 2px solid rgba(0, 240, 255, 0.7);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 240, 255, 0.35), inset 0 0 15px rgba(0, 240, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s ease;
}

.guided-hud-box.guided-locked {
  border-color: rgba(255, 215, 0, 0.8);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 215, 0, 0.4);
}

.guided-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.guided-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.guided-step-counter {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.15);
  border: 1.5px solid rgba(0, 240, 255, 0.6);
  border-radius: 20px;
  padding: 3px 10px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.guided-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.22rem;
  font-weight: 900;
  color: #ffffff;
  margin: 4px 0 8px 0;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
  letter-spacing: 0.5px;
}

.guided-instruction {
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 14px;
}

.guided-instruction strong {
  color: #ffd700;
  font-weight: 800;
}

.guided-instruction em {
  color: #00f0ff;
  font-style: normal;
  font-weight: 700;
}

.guided-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.guided-btn-subtle {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guided-btn-subtle:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
  color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.guided-btn-exit {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 0, 85, 0.15);
  border: 1.5px solid rgba(255, 0, 85, 0.6);
  color: #ff3366;
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guided-btn-exit:hover {
  background: rgba(255, 0, 85, 0.35);
  box-shadow: 0 0 14px rgba(255, 0, 85, 0.6);
}

/* Cibles lumineuses pulsantes pendant le tutoriel */
.pulse-guided-target {
  animation: pulseGuidedTarget 1.2s ease-in-out infinite alternate !important;
  outline: 3px solid #ffd700 !important;
  outline-offset: 4px !important;
}

@keyframes pulseGuidedTarget {
  from {
    box-shadow: 0 0 10px #ffd700, inset 0 0 8px #ffd700;
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 30px #ffd700, 0 0 45px #00f0ff, inset 0 0 16px #ffd700;
    transform: scale(1.04);
  }
}

/* =========================================================
   👑 MODALE POPIN DE FIN D'INITIATION (MAÎTRE DE L'ARÈNE)
   ========================================================= */
.guided-complete-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2200;
  padding: 20px;
  animation: fadeInModalBackdrop 0.3s ease forwards;
}

@keyframes fadeInModalBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.guided-complete-modal-box {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(155deg, rgba(22, 12, 45, 0.98), rgba(10, 5, 24, 0.99));
  border: 2.5px solid rgba(255, 215, 0, 0.75);
  border-radius: 24px;
  padding: 32px 26px;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.35), inset 0 0 20px rgba(255, 215, 0, 0.15);
  position: relative;
  overflow: hidden;
  animation: scaleUpModalBox 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUpModalBox {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.guided-complete-icon {
  font-size: 3.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
  animation: bounceCrown 2s ease-in-out infinite;
}

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

.guided-complete-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.guided-complete-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 12px 0;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 35px rgba(255, 136, 0, 0.6);
  letter-spacing: 1px;
}

.guided-complete-desc {
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 18px;
}

.guided-complete-recap {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guided-complete-recap .recap-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
}

.guided-complete-recap .recap-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.guided-complete-recap strong {
  color: #00f0ff;
  font-weight: 700;
}

.guided-complete-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guided-complete-btn-primary {
  width: 100%;
  padding: 16px 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #05020a;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  letter-spacing: 0.5px;
}

.guided-complete-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
}

.guided-complete-btn-primary:active {
  transform: translateY(1px);
}

.guided-complete-btn-secondary {
  width: 100%;
  padding: 13px 20px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  background: rgba(0, 240, 255, 0.1);
  border: 1.5px solid rgba(0, 240, 255, 0.6);
  color: #00f0ff;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guided-complete-btn-secondary:hover {
  background: rgba(0, 240, 255, 0.22);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.app-container.blind-mode-active .battle-dial-wrapper {
  animation: pulseBlindVortex 2s infinite alternate ease-in-out;
}

@keyframes pulseBlindVortex {
  0% {
    filter: drop-shadow(0 0 15px rgba(255, 0, 85, 0.4));
  }

  100% {
    filter: drop-shadow(0 0 35px rgba(255, 0, 85, 0.8));
  }
}