/* ==========================================================================
   BabeMasters • TCG Modern Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #0b0d14;
  --bg-card: #151926;
  --bg-card-hover: #1e2438;
  --panel-bg: rgba(22, 27, 46, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --gold: #f59e0b;
  --accent-gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --purple-glow: rgba(168, 85, 247, 0.4);
  --blue-glow: rgba(59, 130, 246, 0.4);
  --green-glow: rgba(16, 185, 129, 0.4);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

button, input, select, textarea {
  font-family: inherit;
}

input, textarea {
  user-select: text;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Background Ambient Glow */
.background-ambient {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 15%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(245, 158, 11, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.9) 0%, #07090e 100%);
  z-index: -2;
}

/* ==========================================================================
   APP LAYOUT (BabeMasters Left Sidebar Layout)
   ========================================================================== */

.app-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* APP SIDEBAR */
.app-sidebar {
  width: 300px;
  min-width: 300px;
  background: rgba(10, 13, 22, 0.96);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 6px 0 25px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  gap: 0.65rem;
}

.app-sidebar::-webkit-scrollbar {
  width: 5px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.sidebar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  width: 100%;
}

.brand-logo-emblem {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.35s ease;
  filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.4));
}

.sidebar-brand:hover .brand-logo-emblem {
  transform: scale(1.08) rotate(3deg);
  filter: drop-shadow(0 0 18px rgba(250, 204, 21, 0.75));
}

.brand-emblem-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sidebar-brand h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.55rem;
  letter-spacing: 2px;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-brand .logo-accent {
  background: linear-gradient(180deg, #fef08a 0%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.6));
}

.sidebar-brand .logo-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  font-weight: 600;
  text-transform: uppercase;
}

/* SIDEBAR HUD STATS */
.sidebar-hud {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.2rem 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
}

.sidebar-hud .hud-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.hud-icon {
  font-size: 1.3rem;
}

.hud-data {
  display: flex;
  flex-direction: column;
}

.hud-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.hud-value {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}

/* SIDEBAR VERTICAL NAVIGATION */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  margin-top: 0.5rem;
}

.sidebar-nav .nav-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.sidebar-nav .nav-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(4px);
}

.sidebar-nav .nav-tab.active {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.16), rgba(250, 204, 21, 0.04));
  border-color: rgba(250, 204, 21, 0.5);
  color: #facc15;
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.2);
}

.tab-badge {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  margin-left: auto;
}

/* Bouton Autres : masqué sur desktop car tous les onglets sont visibles dans la barre latérale */
.nav-tab-more {
  display: none !important;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
  gap: 0.8rem;
}

.sidebar-brand-credit {
  text-align: center;
  padding-top: 0.8rem;
  font-size: 0.7rem;
  color: #64748b;
  letter-spacing: 0.6px;
  user-select: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  margin-top: 0.6rem;
}

.sidebar-brand-credit strong {
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 1px;
}


/* MAIN CONTENT */
.main-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100vh;
  padding: 2.2rem 2.8rem;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* CUSTOM VISIBLE SCROLLBAR */
.main-content::-webkit-scrollbar {
  width: 10px;
}

.main-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 8px;
}

.main-content::-webkit-scrollbar-thumb {
  background: rgba(250, 204, 21, 0.35);
  border-radius: 8px;
  border: 2px solid rgba(15, 23, 42, 0.7);
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: rgba(250, 204, 21, 0.75);
}

/* ==========================================================================
   SIDEBAR CURRENCY WIDGET (PC Desktop)
   ========================================================================== */
.top-currency-widget {
  position: relative;
  top: auto;
  right: auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  color: #fff;
  margin: 0.2rem 0;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-currency-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.currency-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.3);
  transition: all 0.2s ease;
  min-width: 0;
  box-sizing: border-box;
}

.currency-chip:hover {
  background: rgba(250, 204, 21, 0.2);
  border-color: rgba(250, 204, 21, 0.6);
}

.currency-chip.diamond-chip {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.currency-chip.diamond-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.7);
}

/* Monnaie BabeMasters TCG personnalisée */
.babe-coin {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.16em;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  border-radius: 50%;
  flex-shrink: 0;
}

.currency-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  line-height: 1;
  flex-shrink: 0;
}

.currency-icon .babe-coin {
  width: 1.35rem;
  height: 1.35rem;
  vertical-align: middle;
}

.currency-val {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: #facc15;
  letter-spacing: 0.5px;
  min-width: 1.5ch;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
  line-height: 1;
}

.diamond-chip .currency-val {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

.sidebar-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.btn-ad-trigger {
  flex: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  min-width: 0;
  box-sizing: border-box;
}

.btn-ad-trigger:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.btn-ad-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.8);
  transform: none;
  box-shadow: none;
}

.ad-trigger-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.ad-charges-badge {
  background: rgba(0, 0, 0, 0.5);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* SIDEBAR SOCIAL HUB BUTTON */
.btn-header-social {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid #818cf8;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.3);
  min-width: 0;
  box-sizing: border-box;
}

.btn-header-social:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #3730a3, #4338ca);
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.5);
}

.social-btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.social-btn-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e0e7ff;
  white-space: nowrap;
}

.social-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  border-radius: 999px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.95), 0 2px 4px rgba(0, 0, 0, 0.6);
  border: 1.5px solid #0f172a;
  z-index: 15;
  pointer-events: none;
  animation: pulse-red-dot 2s infinite ease-in-out;
}

@keyframes pulse-red-dot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 14px rgba(239, 68, 68, 1);
  }
}

/* FLOATING REWARD TEXT */
.currency-gain-float {
  position: fixed;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: #facc15;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.95), 0 2px 5px #000;
  pointer-events: none;
  z-index: 1001;
  animation: coinFloatAnim 1.4s ease-out forwards;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.currency-gain-float .babe-coin {
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: middle;
}

.diamond-gain-float {
  position: fixed;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 1.25rem;
  color: #38bdf8;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.95), 0 2px 5px #000;
  pointer-events: none;
  z-index: 1001;
  animation: coinFloatAnim 1.4s ease-out forwards;
}

@keyframes coinFloatAnim {
  0% { opacity: 0; transform: translateY(0) scale(0.7); }
  20% { opacity: 1; transform: translateY(-12px) scale(1.2); }
  75% { opacity: 1; transform: translateY(-40px) scale(1); }
  100% { opacity: 0; transform: translateY(-65px) scale(0.9); }
}

/* BUTTONS */
.btn {
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.6rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #000;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.55);
  background: linear-gradient(135deg, #fef08a, #ca8a04);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  font-weight: 700;
}

.btn-outline:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.95) !important;
  border-color: #cbd5e1 !important;
  color: #ffffff !important;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.pulse-glow {
  animation: pulse-glow-anim 2s infinite alternate;
}

@keyframes pulse-glow-anim {
  0% { box-shadow: 0 0 10px rgba(250, 204, 21, 0.2); }
  100% { box-shadow: 0 0 25px rgba(250, 204, 21, 0.6); }
}

.tab-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold);
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* MAIN CONTENT PANE */
.tab-pane {
  max-width: 1400px;
  margin: 0 auto;
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BOOSTER PACK SECTION
   ========================================================================== */

.booster-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 520px;
  justify-content: flex-start;
  padding-top: 3.8rem; /* Positionne l'interface confortablement sous le compteur de pièces et diamants */
}

.pack-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* 3D Booster Pack Wrapper Graphic */
.booster-pack-3d {
  width: 280px;
  height: 420px;
  position: relative;
  border-radius: 16px;
  cursor: pointer;
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.booster-pack-3d:hover {
  transform: translateY(-12px) scale(1.03) rotateZ(1deg);
}

.pack-foil {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: 
    linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 40%),
    linear-gradient(to bottom, #1e113b 0%, #0d071a 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(139, 92, 246, 0.3),
    inset 0 0 20px rgba(245, 158, 11, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.pack-foil::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 10px,
    transparent 10px,
    transparent 20px
  );
  pointer-events: none;
}

.pack-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pack-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.pack-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.pack-logo {
  text-align: center;
  margin: 1.5rem 0;
}

.pack-icon-main,
.pack-crown {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 15px var(--gold-glow));
  animation: bounce-subtle 3s infinite ease-in-out;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pack-logo h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: 2px;
}

.gold-text {
  color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
}

.pack-logo p {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 0.4rem;
}

.pack-footer {
  text-align: center;
  margin-top: 0.5rem;
}

.pack-footer-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(250, 204, 21, 0.85);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.3);
  display: inline-block;
}

.pack-tear-line {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  height: 2px;
  border-top: 2px dashed rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.pack-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.pack-tap-prompt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.pack-tap-prompt:hover {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.pack-tap-prompt.empty {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  cursor: default;
}

.pack-stock-badge {
  color: #fff;
  font-weight: 800;
}

.compact-store-btn {
  padding: 0.38rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.compact-store-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.mobile-user-btn {
  display: none;
}

/* FREE PACK STATUS BANNER */
.free-pack-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  padding: 0 1.1rem;
  margin-bottom: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.free-pack-timer-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.free-pack-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.free-pack-timer-text {
  font-size: 0.84rem;
  color: #cbd5e1;
  white-space: nowrap;
}

.free-pack-timer-text strong {
  color: #facc15;
  font-weight: 800;
}

.free-pack-timer-text .timer-digits {
  color: #facc15;
  font-family: var(--font-main, 'Outfit', monospace, sans-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-block;
  min-width: 62px;
  text-align: center;
}

.free-pack-stock-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.8rem;
  flex-shrink: 0;
}

.stock-pill {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.stock-pill.filled {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  border-color: #fef08a;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

/* DIAMOND STORE SECTION */
.diamond-store-section {
  width: 100%;
  max-width: 950px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 1rem;
}

.diamond-store-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.diamond-store-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: #38bdf8;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.diamond-store-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.diamond-packs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.diamond-pack-card {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  box-sizing: border-box;
}

.diamond-pack-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.25);
  background: rgba(30, 41, 59, 0.85);
}

.diamond-pack-badge {
  position: absolute;
  top: -10px;
  background: #0284c7;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.diamond-pack-badge.classic-badge {
  background: linear-gradient(90deg, #059669, #10b981);
  color: #fff;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.diamond-pack-icon {
  font-size: 2.4rem;
  margin: 0.5rem 0 0.4rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.diamond-pack-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
}

.diamond-pack-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.6rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diamond-pack-limit {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.8rem;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gold-limit-text {
  color: #facc15;
}

.btn-diamond-buy {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  margin-top: auto;
}

.btn-diamond-buy:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.btn-diamond-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
  transform: none;
  box-shadow: none;
}

/* ROYAL CARD SPECIFIC GOLD STYLING */
.diamond-pack-card.royal-card {
  border-color: rgba(250, 204, 21, 0.5);
  background: linear-gradient(135deg, rgba(24, 16, 40, 0.8), rgba(12, 8, 24, 0.9));
}

.diamond-pack-card.royal-card:hover {
  border-color: #facc15;
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.35);
}

.diamond-pack-badge.thematic-badge {
  background: linear-gradient(90deg, #ea580c, #f97316);
  color: #fff;
  border: 1px solid rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.diamond-pack-badge.royal-badge {
  background: linear-gradient(90deg, #facc15, #ca8a04);
  color: #000;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.btn-royal-buy {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  border-color: #fef08a;
  color: #000;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.4);
}

.btn-royal-buy:hover {
  background: linear-gradient(135deg, #fef08a, #facc15);
  box-shadow: 0 6px 22px rgba(250, 204, 21, 0.7);
}

/* ==========================================================================
   REVEAL BOARD (Pack opened - 5 Cards Display)
   ========================================================================== */

.reveal-board {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  animation: fadeIn 0.4s ease;
  margin-top: 0.8rem;
}

.reveal-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-bg);
  padding: 1rem 1.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.reveal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.8rem;
}

.reveal-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reveal-header-info h3 {
  font-size: 1.15rem;
  color: #fff;
  margin: 0;
}

.reveal-stack-pill {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.reveal-actions {
  display: flex;
  gap: 0.8rem;
}

.reveal-stack-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.btn-stack-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #f8fafc;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.btn-stack-arrow:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #facc15;
  color: #facc15;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.45);
}

.btn-stack-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.btn-stack-arrow.hidden {
  display: none !important;
}

.btn-stack-prev {
  left: 14px;
}

.btn-stack-next {
  right: 14px;
}

.reveal-cards-grid {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 420px;
  position: relative;
  perspective: 1400px;
  margin: 0 auto;
}

.reveal-cards-grid > .card-container {
  grid-area: 1 / 1;
  margin: 0 auto;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.35s ease,
              box-shadow 0.35s ease,
              filter 0.35s ease;
  user-select: none;
  cursor: pointer;
  transform-origin: center bottom;
}

/* CARTE ACTIVE AU SOMMET DE LA PILE (SUPERPOSITION) */
.reveal-cards-grid > .card-container.stack-active {
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  filter: brightness(1);
}

/* EFFET DE PROFONDEUR DU PAQUET (CARTES EN ATTENTE EN DESSOUS) */
.reveal-cards-grid > .card-container.stack-next-1 {
  z-index: 9;
  opacity: 0.9;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  filter: brightness(0.9);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.reveal-cards-grid > .card-container.stack-next-2 {
  z-index: 8;
  opacity: 0.75;
  pointer-events: none;
  transform: translateY(16px) scale(0.92);
  filter: brightness(0.8);
}

.reveal-cards-grid > .card-container.stack-next-3 {
  z-index: 7;
  opacity: 0.6;
  pointer-events: none;
  transform: translateY(24px) scale(0.88);
  filter: brightness(0.7);
}

.reveal-cards-grid > .card-container.stack-next-4 {
  z-index: 6;
  opacity: 0.45;
  pointer-events: none;
  transform: translateY(32px) scale(0.84);
  filter: brightness(0.6);
}

.reveal-cards-grid > .card-container.stack-hidden {
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px) scale(0.8);
}

/* CARTE BALAYÉE SUR LE CÔTÉ */
.reveal-cards-grid > .card-container.stack-dismissed {
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-140%) translateY(-20px) rotate(-18deg) scale(0.85);
}

.reveal-bottom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  margin-top: 0.8rem;
}


/* ==========================================================================
   3D CARD DESIGN & FOIL SHADERS
   ========================================================================== */

.card-container {
  width: 250px;
  height: 380px;
  aspect-ratio: 250 / 380;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 16px;
}

.card-container.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
}

/* CARD BACK */
.card-back {
  background: 
    linear-gradient(135deg, #181028 0%, #0c0818 100%);
  border: 2px solid rgba(245, 158, 11, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: absolute;
  transform: rotateY(0deg) translateZ(0px);
  -webkit-transform: rotateY(0deg) translateZ(0px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Prevent card-back from clipping/bleeding through when card is flipped and tilted */
.card-container.flipped .card-back {
  display: none !important;
}

/* Hide front face until flipped during booster pack opening */
.card-container:not(.flipped) .card-front {
  display: none !important;
}

.card-back::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 10px;
}

.card-back-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 15px var(--gold-glow));
}

.card-back-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 2px;
}

.card-back-tap {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: pulse-glow-anim 1.5s infinite alternate;
}

/* CARD FRONT */
.card-front {
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  display: flex;
  flex-direction: column;
  background: #121520;
  border: 2px solid #334155;
  padding: 8px;
  position: absolute;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  isolation: isolate;
}

/* RARITY STYLING : CADRE EXTÉRIEUR ET BARRE SUPÉRIEURE (OR, ARGENT, BRONZE) */

/* COÛT 3 / OR ÉTINCELANT (GOLD ★★★) */
.card-container.rarity-cout-3 .card-front,
.card-container.rarity-or .card-front,
.card-container.rarity-legendaire .card-front,
.card-container.rarity-légendaire .card-front {
  border: 4px solid #facc15 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}
.card-container.rarity-cout-3 .card-top-bar,
.card-container.rarity-or .card-top-bar,
.card-container.rarity-legendaire .card-top-bar,
.card-container.rarity-légendaire .card-top-bar {
  background: linear-gradient(90deg, #facc15, #fef08a) !important;
  border-bottom: 2px solid #ca8a04 !important;
}
.card-container.rarity-cout-3 .card-name-title,
.card-container.rarity-or .card-name-title,
.card-container.rarity-legendaire .card-name-title,
.card-container.rarity-légendaire .card-name-title {
  color: #000 !important;
  font-weight: 900;
}
.card-container.rarity-cout-3 .card-front::after,
.card-container.rarity-or .card-front::after,
.card-container.rarity-legendaire .card-front::after,
.card-container.rarity-légendaire .card-front::after {
  display: none !important;
}

/* COÛT 2 / ARGENT PUR & PLATINE (SILVER ★★) */
.card-container.rarity-cout-2 .card-front,
.card-container.rarity-argent .card-front,
.card-container.rarity-epique .card-front,
.card-container.rarity-épique .card-front {
  border: 3.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}
.card-container.rarity-cout-2 .card-top-bar,
.card-container.rarity-argent .card-top-bar,
.card-container.rarity-epique .card-top-bar,
.card-container.rarity-épique .card-top-bar {
  background: linear-gradient(90deg, #94a3b8, #e2e8f0) !important;
  border-bottom: 2px solid #64748b !important;
}
.card-container.rarity-cout-2 .card-name-title,
.card-container.rarity-argent .card-name-title,
.card-container.rarity-epique .card-name-title,
.card-container.rarity-épique .card-name-title {
  color: #0f172a !important;
  font-weight: 900;
}

/* COÛT 1 / BRONZE & CUIVRE CHAUD (BRONZE ★) */
.card-container.rarity-cout-1 .card-front,
.card-container.rarity-bronze .card-front,
.card-container.rarity-rare .card-front,
.card-container.rarity-peu-commune .card-front,
.card-container.rarity-commune .card-front {
  border: 3px solid #d97706 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
}
.card-container.rarity-cout-1 .card-top-bar,
.card-container.rarity-bronze .card-top-bar,
.card-container.rarity-rare .card-top-bar,
.card-container.rarity-peu-commune .card-top-bar,
.card-container.rarity-commune .card-top-bar {
  background: linear-gradient(90deg, #b45309, #d97706) !important;
  border-bottom: 2px solid #78350f !important;
}
.card-container.rarity-cout-1 .card-name-title,
.card-container.rarity-bronze .card-name-title,
.card-container.rarity-rare .card-name-title,
.card-container.rarity-peu-commune .card-name-title,
.card-container.rarity-commune .card-name-title {
  color: #fff !important;
  font-weight: 900;
}

/* ==========================================================================
   HALOS SUR SURVOL (SOURIS PC) & TOUCHER (MOBILE HORS SCROLL)
   Chaque rareté active son propre halo d'origine :
   - Or / Coût 3 : halo étincelant doré
   - Argent / Coût 2 : halo platine / argent
   - Bronze / Coût 1 : halo cuivre / bronze
   ========================================================================== */

/* 1. OR / COÛT 3 (★★★) */
@media (hover: hover) and (pointer: fine) {
  .card-container.rarity-cout-3:hover .card-front,
  .card-container.rarity-or:hover .card-front,
  .card-container.rarity-legendaire:hover .card-front,
  .card-container.rarity-légendaire:hover .card-front {
    box-shadow: 
      0 0 35px rgba(250, 204, 21, 0.85),
      0 0 12px #fef08a,
      inset 0 0 20px rgba(250, 204, 21, 0.4) !important;
  }
}
.card-container.rarity-cout-3:active .card-front,
.card-container.rarity-or:active .card-front,
.card-container.rarity-legendaire:active .card-front,
.card-container.rarity-légendaire:active .card-front,
.card-container.rarity-cout-3.card-touching .card-front,
.card-container.rarity-or.card-touching .card-front,
.card-container.rarity-legendaire.card-touching .card-front,
.card-container.rarity-légendaire.card-touching .card-front,
#modal-card-display .card-container.rarity-cout-3 .card-front,
#modal-card-display .card-container.rarity-or .card-front,
#modal-card-display .card-container.rarity-legendaire .card-front,
#modal-card-display .card-container.rarity-légendaire .card-front,
.market-inspect-card-col .card-container.rarity-cout-3 .card-front,
.market-inspect-card-col .card-container.rarity-or .card-front,
.market-inspect-card-col .card-container.rarity-legendaire .card-front,
.market-inspect-card-col .card-container.rarity-légendaire .card-front {
  box-shadow: 
    0 0 35px rgba(250, 204, 21, 0.85),
    0 0 12px #fef08a,
    inset 0 0 20px rgba(250, 204, 21, 0.4) !important;
}

/* 2. ARGENT / COÛT 2 (★★) */
@media (hover: hover) and (pointer: fine) {
  .card-container.rarity-cout-2:hover .card-front,
  .card-container.rarity-argent:hover .card-front,
  .card-container.rarity-epique:hover .card-front,
  .card-container.rarity-épique:hover .card-front {
    box-shadow: 
      0 0 30px rgba(203, 213, 225, 0.75),
      0 0 10px #f8fafc,
      inset 0 0 18px rgba(148, 163, 184, 0.4) !important;
  }
}
.card-container.rarity-cout-2:active .card-front,
.card-container.rarity-argent:active .card-front,
.card-container.rarity-epique:active .card-front,
.card-container.rarity-épique:active .card-front,
.card-container.rarity-cout-2.card-touching .card-front,
.card-container.rarity-argent.card-touching .card-front,
.card-container.rarity-epique.card-touching .card-front,
.card-container.rarity-épique.card-touching .card-front,
#modal-card-display .card-container.rarity-cout-2 .card-front,
#modal-card-display .card-container.rarity-argent .card-front,
#modal-card-display .card-container.rarity-epique .card-front,
#modal-card-display .card-container.rarity-épique .card-front,
.market-inspect-card-col .card-container.rarity-cout-2 .card-front,
.market-inspect-card-col .card-container.rarity-argent .card-front,
.market-inspect-card-col .card-container.rarity-epique .card-front,
.market-inspect-card-col .card-container.rarity-épique .card-front {
  box-shadow: 
    0 0 30px rgba(203, 213, 225, 0.75),
    0 0 10px #f8fafc,
    inset 0 0 18px rgba(148, 163, 184, 0.4) !important;
}

/* 3. BRONZE / COÛT 1 (★) */
@media (hover: hover) and (pointer: fine) {
  .card-container.rarity-cout-1:hover .card-front,
  .card-container.rarity-bronze:hover .card-front,
  .card-container.rarity-rare:hover .card-front,
  .card-container.rarity-peu-commune:hover .card-front,
  .card-container.rarity-commune:hover .card-front {
    box-shadow: 
      0 0 25px rgba(217, 119, 6, 0.65),
      0 0 8px rgba(245, 158, 11, 0.5),
      inset 0 0 15px rgba(217, 119, 6, 0.25) !important;
  }
}
.card-container.rarity-cout-1:active .card-front,
.card-container.rarity-bronze:active .card-front,
.card-container.rarity-rare:active .card-front,
.card-container.rarity-peu-commune:active .card-front,
.card-container.rarity-commune:active .card-front,
.card-container.rarity-cout-1.card-touching .card-front,
.card-container.rarity-bronze.card-touching .card-front,
.card-container.rarity-rare.card-touching .card-front,
.card-container.rarity-peu-commune.card-touching .card-front,
.card-container.rarity-commune.card-touching .card-front,
#modal-card-display .card-container.rarity-cout-1 .card-front,
#modal-card-display .card-container.rarity-bronze .card-front,
#modal-card-display .card-container.rarity-rare .card-front,
#modal-card-display .card-container.rarity-peu-commune .card-front,
#modal-card-display .card-container.rarity-commune .card-front,
.market-inspect-card-col .card-container.rarity-cout-1 .card-front,
.market-inspect-card-col .card-container.rarity-bronze .card-front,
.market-inspect-card-col .card-container.rarity-rare .card-front,
.market-inspect-card-col .card-container.rarity-peu-commune .card-front,
.market-inspect-card-col .card-container.rarity-commune .card-front {
  box-shadow: 
    0 0 25px rgba(217, 119, 6, 0.65),
    0 0 8px rgba(245, 158, 11, 0.5),
    inset 0 0 15px rgba(217, 119, 6, 0.25) !important;
}

/* COULEURS DE CORPS DE CARTE SELON LE TYPE ÉLÉMENTAIRE */
.card-container.type-feu .card-front {
  background: radial-gradient(ellipse at top, #450a0a 0%, #220505 55%, #0e0202 100%) !important;
}
.card-container.type-eau .card-front {
  background: radial-gradient(ellipse at top, #082f49 0%, #07192f 55%, #030a14 100%) !important;
}
.card-container.type-foudre .card-front {
  background: radial-gradient(ellipse at top, #3b0764 0%, #1e0533 55%, #0c0214 100%) !important;
}
.card-container.type-glace .card-front {
  background: radial-gradient(ellipse at top, #0e3b43 0%, #071f24 55%, #020c0e 100%) !important;
}
.card-container.type-vent .card-front {
  background: radial-gradient(ellipse at top, #064e3b 0%, #04241c 55%, #02100c 100%) !important;
}
.card-container.type-terre .card-front {
  background: radial-gradient(ellipse at top, #451a03 0%, #240d01 55%, #100600 100%) !important;
}
.card-container.type-nature .card-front {
  background: radial-gradient(ellipse at top, #1e3a10 0%, #0f1d07 55%, #060d02 100%) !important;
}

/* CARD TOP BAR */
.card-top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  height: 32px;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.card-name-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  width: 100%;
  letter-spacing: 0.2px;
}

/* CARD TOP RIGHT GROUP (COST + RANK) */
.card-top-right-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.card-cost-mini {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

/* RANK BADGE (RANK S = OR, RANK A = ARGENT, RANK B = BRONZE) */
.card-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  user-select: none;
}

.card-rank-badge.rank-s,
.modal-rank-badge.rank-s,
.pick-badge-rank.rank-s {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #eab308 55%, #a16207 100%) !important;
  color: #1a1002 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1.5px solid #fde047 !important;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
}

.card-rank-badge.rank-a,
.modal-rank-badge.rank-a,
.pick-badge-rank.rank-a {
  background: radial-gradient(circle at 35% 35%, #f8fafc 0%, #cbd5e1 55%, #64748b 100%) !important;
  color: #0f172a !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 0 8px rgba(203, 213, 225, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

.card-rank-badge.rank-b,
.modal-rank-badge.rank-b,
.pick-badge-rank.rank-b {
  background: radial-gradient(circle at 35% 35%, #fed7aa 0%, #d97706 55%, #78350f 100%) !important;
  color: #1c0902 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 0 7px rgba(217, 119, 6, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.7) !important;
}

.modal-rank-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.modal-rank-text.rank-s {
  color: #facc15 !important;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

.modal-rank-text.rank-a {
  color: #e2e8f0 !important;
  text-shadow: 0 0 10px rgba(226, 232, 240, 0.35);
}

.modal-rank-text.rank-b {
  color: #fb923c !important;
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.35);
}

.unit-passive-tag.rank-s {
  border-color: rgba(250, 204, 21, 0.5) !important;
  color: #facc15 !important;
  background: rgba(250, 204, 21, 0.12) !important;
}
.unit-passive-tag.rank-a {
  border-color: rgba(203, 213, 225, 0.5) !important;
  color: #cbd5e1 !important;
  background: rgba(203, 213, 225, 0.12) !important;
}
.unit-passive-tag.rank-b {
  border-color: rgba(217, 119, 6, 0.5) !important;
  color: #f59e0b !important;
  background: rgba(217, 119, 6, 0.12) !important;
}

.mini-fighter-meta strong.rank-s { color: #facc15; }
.mini-fighter-meta strong.rank-a { color: #cbd5e1; }
.mini-fighter-meta strong.rank-b { color: #d97706; }

/* STARS BADGE IN TOP BAR (Retrocompatibilité) */
.card-stars-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  line-height: 1;
}

.card-container.rarity-cout-3 .card-stars-badge,
.card-container.rarity-or .card-stars-badge,
.card-container.rarity-legendaire .card-stars-badge,
.card-container.rarity-légendaire .card-stars-badge {
  background: #000 !important;
  color: #facc15 !important;
  border: 1.5px solid #ca8a04 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.card-container.rarity-cout-2 .card-stars-badge,
.card-container.rarity-argent .card-stars-badge,
.card-container.rarity-epique .card-stars-badge,
.card-container.rarity-épique .card-stars-badge {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.card-container.rarity-cout-1 .card-stars-badge,
.card-container.rarity-bronze .card-stars-badge,
.card-container.rarity-rare .card-stars-badge,
.card-container.rarity-peu-commune .card-stars-badge,
.card-container.rarity-commune .card-stars-badge {
  background: #1c0f05 !important;
  color: #fed7aa !important;
  border: 1.5px solid #d97706 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ==========================================================================
   CARTES VERROUILLÉES / NON OBTENUES (CATALOGUE)
   ========================================================================== */
.card-container.locked {
  opacity: 0.65;
  transition: all 0.25s ease;
}

.card-container.locked:hover {
  opacity: 0.9;
  transform: translateY(-5px);
}

.card-container.locked .card-front {
  border: 2.5px solid #475569 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
  background: #0f172a !important;
}

.card-container.locked .card-top-bar {
  background: #1e293b !important;
  border-bottom: 1px solid #334155 !important;
}

.card-container.locked .card-name-title {
  color: #94a3b8 !important;
}

.card-container.locked .card-stars-badge {
  background: #1e293b !important;
  color: #64748b !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.card-container.locked .card-img {
  filter: grayscale(1) contrast(0.85);
  transition: filter 0.25s ease;
}

.card-container.locked:hover .card-img {
  filter: grayscale(0.35) contrast(0.95);
}

.card-container.locked .card-fav-btn {
  opacity: 0.9;
}

.card-container.locked .card-fav-btn.is-fav {
  opacity: 1 !important;
}

.card-container.locked .card-shine,
.card-container.locked .card-glare,
.card-container.locked .card-img-wrapper::after,
.card-container.locked .card-front::after {
  display: none !important;
}

.card-locked-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 5;
}

/* CARTES DÉSACTIVÉES / NON VALIDÉES EN ATTENTE DE CONTRÔLE QUALITÉ */
.card-container.card-deactivated {
  filter: grayscale(85%) brightness(0.72) !important;
  opacity: 0.72 !important;
}

.card-container.card-deactivated:hover {
  filter: grayscale(60%) brightness(0.82) !important;
  opacity: 0.85 !important;
}

.card-deactivated-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid #f59e0b;
  color: #fbbf24;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 3px;
  z-index: 5;
  text-transform: uppercase;
}

/* BANNER DANS LA MODALE D'INSPECTION */
.player-deactivated-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.player-deactivated-banner .deactivated-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.player-deactivated-banner .deactivated-text strong {
  display: block;
  color: #fbbf24;
  font-size: 0.88rem;
  margin-bottom: 2px;
}

.player-deactivated-banner .deactivated-text p {
  color: #cbd5e1;
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.35;
}

.player-deactivated-banner.banner-standby {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.45);
}
.player-deactivated-banner.banner-standby .deactivated-text strong {
  color: #a5b4fc;
}

.player-deactivated-banner.banner-perm-deactivated {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
}
.player-deactivated-banner.banner-perm-deactivated .deactivated-text strong {
  color: #f87171;
}

.diamond-compensation-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.18);
}

.diamond-compensation-box .diamond-comp-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.diamond-compensation-box .diamond-comp-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.diamond-compensation-box .diamond-comp-text strong {
  display: block;
  color: #38bdf8;
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.diamond-compensation-box .diamond-comp-text p {
  color: #e0f2fe;
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.35;
}

.btn-diamond-comp {
  background: linear-gradient(135deg, #0284c7, #0ea5e9, #38bdf8);
  border: 1px solid #7dd3fc;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
  text-align: center;
}

.btn-diamond-comp:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7, #0ea5e9);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

/* TEAM PICK THUMBS DÉSACTIVÉS */
.team-pick-thumb.thumb-deactivated {
  filter: grayscale(85%) opacity(0.55) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
  cursor: not-allowed;
}

.pick-badge-deactivated {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 4;
}

.pick-badge-deactivated.pick-badge-standby {
  border-color: #6366f1;
  color: #a5b4fc;
}

.pick-badge-deactivated.pick-badge-perm {
  border-color: #ef4444;
  color: #fca5a5;
}

.btn-pick-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  background: rgba(30, 41, 59, 0.8) !important;
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

.arena-team-deactivated-badge {
  display: block;
  font-size: 0.7rem;
  color: #f59e0b;
  font-weight: 700;
  margin-top: 4px;
}

/* CARD BOTTOM BAR (RECTANGLE TOUTE LARGEUR AVEC SYMBOLE, NUMÉRO ET RARETÉ) */
.card-bottom-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 28px;
  border-radius: 7px;
  margin-top: 5px;
  padding: 0 8px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  box-sizing: border-box;
}

.card-bottom-element-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  user-select: none;
  min-width: 24px;
}

/* NUMÉRO DE LA CARTE AU MILIEU (FORMAT 5 CHIFFRES) */
.card-bottom-number {
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
}

/* RARETÉ DU CADRE DU BAS : MÊME POLICE ET STYLE QUE DANS LA MODALE DE DÉTAIL (SANS "Rank") */
.card-bottom-rank.modal-rank-text {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
  user-select: none;
  min-width: 24px;
  text-align: right;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.card-bottom-rank.modal-rank-text.rank-s {
  color: #facc15 !important;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.45), 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.card-bottom-rank.modal-rank-text.rank-a {
  color: #e2e8f0 !important;
  text-shadow: 0 0 10px rgba(226, 232, 240, 0.35), 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.card-bottom-rank.modal-rank-text.rank-b {
  color: #fb923c !important;
  text-shadow: 0 0 10px rgba(251, 146, 60, 0.35), 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Thèmes élémentaires du rectangle du bas */
.card-bottom-bar.element-feu, .card-bottom-bar.element-pyro {
  background: linear-gradient(90deg, #4c0f0f, #220505) !important;
  border: 1.5px solid #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35) !important;
}

.card-bottom-bar.element-eau, .card-bottom-bar.element-hydro {
  background: linear-gradient(90deg, #0a3552, #041826) !important;
  border: 1.5px solid #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
}

.card-bottom-bar.element-foudre, .card-bottom-bar.element-electro {
  background: linear-gradient(90deg, #3f0b69, #1b0230) !important;
  border: 1.5px solid #c084fc !important;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.35) !important;
}

.card-bottom-bar.element-glace, .card-bottom-bar.element-cryo {
  background: linear-gradient(90deg, #10424c, #062025) !important;
  border: 1.5px solid #22d3ee !important;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.35) !important;
}

.card-bottom-bar.element-vent, .card-bottom-bar.element-anemo {
  background: linear-gradient(90deg, #07523f, #03271e) !important;
  border: 1.5px solid #34d399 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35) !important;
}

.card-bottom-bar.element-terre, .card-bottom-bar.element-geo {
  background: linear-gradient(90deg, #4a1c03, #220d01) !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35) !important;
}

.card-bottom-bar.element-nature, .card-bottom-bar.element-dendro {
  background: linear-gradient(90deg, #234313, #0f1c08) !important;
  border: 1.5px solid #a3e635 !important;
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.35) !important;
}

.card-element-pill {
  display: none !important;
}

/* RARITY FILTER CHIPS & COLOR DOTS */
.dot-rarity {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.dot-gold {
  background: #facc15;
  box-shadow: 0 0 8px #facc15;
}

.dot-silver {
  background: #cbd5e1;
  box-shadow: 0 0 6px #cbd5e1;
}

.dot-bronze {
  background: #d97706;
  box-shadow: 0 0 6px #d97706;
}

.dot-violet {
  background: #8b5cf6;
  box-shadow: 0 0 8px #8b5cf6;
}

.dot-cyan {
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4;
}

.dot-green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.filter-chip.filter-cost-3.active,
.filter-chip.filter-legendaire.active {
  background: rgba(250, 204, 21, 0.18) !important;
  border-color: #facc15 !important;
  color: #facc15 !important;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.3) !important;
}

.filter-chip.filter-cost-2.active,
.filter-chip.filter-epique.active {
  background: rgba(203, 213, 225, 0.2) !important;
  border-color: #cbd5e1 !important;
  color: #f8fafc !important;
  box-shadow: 0 0 12px rgba(203, 213, 225, 0.3) !important;
}

.filter-chip.filter-cost-1.active,
.filter-chip.filter-rare.active,
.filter-chip.filter-peu-commune.active,
.filter-chip.filter-commune.active {
  background: rgba(217, 119, 6, 0.2) !important;
  border-color: #d97706 !important;
  color: #fed7aa !important;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.3) !important;
}

.filter-chip.filter-cost-3,
.filter-chip.filter-cost-2,
.filter-chip.filter-cost-1 {
  font-size: 0.95rem;
  letter-spacing: 1.5px;
}

/* COMBAT STATS 2x2 GRID */
.card-combat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 5px;
  background: rgba(0, 0, 0, 0.55);
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.combat-stat-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.stat-tag {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.7rem;
}

.stat-number {
  font-weight: 900;
  color: #fff;
  font-size: 0.8rem;
}

/* CARD IMAGE FRAME (AGRANDI GRÂCE AU RETRAIT DE LA BIO) */
.card-img-wrapper {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 195px;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  contain: paint;
  z-index: 6;
}

/* SATIN PHOTO SHINE (IDENTIQUE POUR OR, ARGENT ET BRONZE POUR PRÉSERVER LA QUALITÉ NATURELLE DE LA PHOTO) */
.card-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  opacity: var(--shine-opacity, 0);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  mix-blend-mode: overlay;
  z-index: 2;
  background: linear-gradient(
    var(--sheen-angle, 125deg),
    rgba(255, 180, 100, 0.08) 0%,
    rgba(255, 225, 170, 0.35) var(--sheen-pos, 50%),
    rgba(217, 119, 6, 0.08) 100%
  );
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-container:hover .card-img {
  transform: scale(1.04);
}

.card-rarity-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
}

.rarity-légendaire .card-rarity-pill, .rarity-or .card-rarity-pill { color: #f59e0b; border: 1px solid #f59e0b; }
.rarity-épique .card-rarity-pill, .rarity-argent .card-rarity-pill { color: #c084fc; border: 1px solid #c084fc; }
.rarity-rare .card-rarity-pill, .rarity-bronze .card-rarity-pill { color: #60a5fa; border: 1px solid #60a5fa; }
.rarity-peu-commune .card-rarity-pill { color: #34d399; border: 1px solid #34d399; }
.rarity-commune .card-rarity-pill { color: #f1f5f9; background: #334155; border: 1px solid #94a3b8; font-weight: 800; }

.card-new-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  animation: pulse-glow-anim 1s infinite alternate;
  z-index: 5;
}

.card-verified-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-rejected-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  right: auto;
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-country-flag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  top: auto;
  left: auto;
  font-size: 0.74rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* CARD STATS BARS */
.card-stats-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 8px;
  border-radius: 8px;
}

.card-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
}

.stat-name {
  color: var(--text-muted);
  width: 65px;
}

.stat-bar-outer {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin: 0 6px;
  overflow: hidden;
}

.stat-bar-inner {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.rarity-légendaire .stat-bar-inner, .rarity-or .stat-bar-inner { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.rarity-épique .stat-bar-inner, .rarity-argent .stat-bar-inner { background: linear-gradient(90deg, #a855f7, #c084fc); }
.rarity-rare .stat-bar-inner, .rarity-bronze .stat-bar-inner { background: linear-gradient(90deg, #d97706, #f59e0b); }

.stat-val {
  font-weight: 700;
  width: 20px;
  text-align: right;
  color: #fff;
}

/* CARD FOOTER BIO (RETIRÉE DE LA CARTE, DISPONIBLE DANS LA MODALE 3D) */
.card-bio-snippet {
  display: none !important;
}

/* ==========================================================================
   HOLOGRAPHIC SHINE & SPECULAR GLARE OVERLAYS
   ========================================================================== */

.card-shine {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: var(--shine-opacity, 0);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  mix-blend-mode: color-dodge;
  z-index: 3;
  background: linear-gradient(
    var(--sheen-angle, 125deg),
    rgba(255, 255, 255, 0) calc(var(--sheen-pos, 50%) - 26%),
    rgba(255, 255, 255, 0.28) var(--sheen-pos, 50%),
    rgba(255, 255, 255, 0) calc(var(--sheen-pos, 50%) + 26%)
  );
}

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: var(--glare-opacity, 0);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  mix-blend-mode: overlay;
  z-index: 10;
  background: 
    radial-gradient(
      ellipse 65% 80% at var(--glare-x, 50%) var(--glare-y, 50%),
      rgba(255, 255, 255, 0.52) 0%,
      rgba(255, 255, 255, 0.18) 32%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(
      var(--sheen-angle, 125deg),
      rgba(255, 255, 255, 0) calc(var(--sheen-pos, 50%) - 26%),
      rgba(255, 255, 255, 0.28) var(--sheen-pos, 50%),
      rgba(255, 255, 255, 0) calc(var(--sheen-pos, 50%) + 26%)
    );
}

/* RARITY-SPECIFIC HOLOGRAPHIC FOIL & IRIDESCENCE */

/* OR (3★ / COÛT 3 / LÉGENDAIRE) : Prisme Holographique Solaire & Spectre Arc-en-Ciel */
.card-container.rarity-cout-3 .card-shine,
.card-container.rarity-or .card-shine,
.card-container.rarity-legendaire .card-shine,
.card-container.rarity-légendaire .card-shine {
  mix-blend-mode: color-dodge;
  background: 
    linear-gradient(
      var(--sheen-angle, 125deg),
      rgba(255, 0, 128, 0.22) 0%,
      rgba(255, 170, 0, 0.42) calc(var(--sheen-pos, 50%) - 26%),
      rgba(255, 255, 220, 0.75) var(--sheen-pos, 50%),
      rgba(0, 230, 255, 0.42) calc(var(--sheen-pos, 50%) + 26%),
      rgba(180, 0, 255, 0.22) 100%
    ),
    radial-gradient(
      circle at var(--glare-x, 50%) var(--glare-y, 50%),
      rgba(255, 230, 100, 0.32) 0%,
      transparent 60%
    );
}

/* ARGENT (2★ / COÛT 2 / ÉPIQUE) : Prisme Holographique Céleste & Diamant */
.card-container.rarity-cout-2 .card-shine,
.card-container.rarity-argent .card-shine,
.card-container.rarity-epique .card-shine,
.card-container.rarity-épique .card-shine {
  mix-blend-mode: color-dodge;
  background: 
    linear-gradient(
      var(--sheen-angle, 125deg),
      rgba(180, 220, 255, 0.18) 0%,
      rgba(220, 180, 255, 0.36) calc(var(--sheen-pos, 50%) - 24%),
      rgba(255, 255, 255, 0.7) var(--sheen-pos, 50%),
      rgba(130, 240, 255, 0.36) calc(var(--sheen-pos, 50%) + 24%),
      rgba(180, 220, 255, 0.18) 100%
    ),
    radial-gradient(
      circle at var(--glare-x, 50%) var(--glare-y, 50%),
      rgba(220, 240, 255, 0.28) 0%,
      transparent 60%
    );
}

/* BRONZE (1★ / COÛT 1 / RARE / PEU COMMUNE / COMMUNE) : Vernis Satin Chaud Ambré */
.card-container.rarity-cout-1 .card-shine,
.card-container.rarity-bronze .card-shine,
.card-container.rarity-rare .card-shine,
.card-container.rarity-peu-commune .card-shine,
.card-container.rarity-commune .card-shine {
  mix-blend-mode: overlay;
  background: 
    linear-gradient(
      var(--sheen-angle, 125deg),
      rgba(255, 180, 100, 0.08) 0%,
      rgba(255, 225, 170, 0.35) var(--sheen-pos, 50%),
      rgba(217, 119, 6, 0.08) 100%
    );
}

/* ==========================================================================
   COLLECTION TAB
   ========================================================================== */

.collection-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.collection-info h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  letter-spacing: 1px;
}

.collection-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.collection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Format PC : Mon Classeur avec recherche et tri placés juste sous les boutons de filtre */
#tab-collection .collection-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

#tab-collection .collection-toolbar .filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

#tab-collection .collection-search-sort-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  width: 100%;
}

#tab-collection .collection-search-box-wrapper {
  flex: 0 1 320px;
  min-width: 220px;
}

.collection-search-sort-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.collection-search-box-wrapper {
  min-width: 210px;
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sort-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.sort-select {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.sort-select:hover, .sort-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.25);
}

.btn-sort-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-sort-order:hover {
  border-color: var(--gold);
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.25);
  transform: translateY(-1px);
}

.btn-sort-order:active {
  transform: translateY(0);
}

.btn-sort-order .sort-order-icon {
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.element-sort-bar .sort-select {
  min-width: 145px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}

.chip-count {
  font-size: 0.72rem;
  margin-left: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.filter-chip.active .chip-count {
  background: rgba(0, 0, 0, 0.25);
  color: #000;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.filter-chip.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  justify-items: center;
}

/* EMPTY BINDER STATE */
.empty-binder-box {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  background: var(--panel-bg);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-binder-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 15px var(--gold-glow));
}

.empty-binder-box h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #fff;
}

.empty-binder-box p {
  color: var(--text-muted);
  max-width: 450px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-count-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* ==========================================================================
   DUEL ARENA TAB
   ========================================================================== */

.arena-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.arena-header {
  text-align: center;
}

.arena-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.arena-header p {
  color: var(--text-muted);
}

.arena-tally {
  margin-top: 1rem;
  display: inline-flex;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.tally-item.win strong { color: #10b981; }
.tally-item.loss strong { color: #ef4444; }
.tally-item.draw strong { color: #f59e0b; }

/* ==========================================================================
   STRATEGIC 3v3 BATTLEFIELD
   ========================================================================== */

.arena-battlefield-3v3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  background: var(--panel-bg);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  position: relative;
  min-height: 580px;
  align-items: start;
}

@media (max-width: 1024px) {
  .arena-battlefield-3v3 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.arena-board {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
}

.team-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.team-side.cpu-side {
  background: rgba(244, 63, 94, 0.04);
  border: 1px solid rgba(244, 63, 94, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.team-side.player-side {
  background: rgba(56, 189, 248, 0.04);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 0.9rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.team-badge {
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-badge { color: #38bdf8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
.cpu-badge { color: #f43f5e; text-shadow: 0 0 10px rgba(244, 63, 94, 0.4); }

.team-hp-summary {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

/* TACTICAL BATTLE LINES (AVANT & ARRIÈRE) */
.battle-line-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  position: relative;
  transition: all 0.3s ease;
}

.battle-line-container.line-front {
  border-left: 3px solid #f59e0b;
  padding-left: 0.65rem;
}

.battle-line-container.line-back {
  border-left: 3px solid #38bdf8;
  padding-left: 0.65rem;
}

.battle-line-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.line-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.line-badge.front {
  color: #fbbf24;
}

.line-badge.back {
  color: #38bdf8;
}

.line-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  font-style: italic;
}

.line-badge.front + .line-hint {
  color: rgba(251, 191, 36, 0.7);
}

.line-badge.back + .line-hint {
  color: rgba(56, 189, 248, 0.7);
}

.team-slots-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  flex-wrap: nowrap;
}

.team-slots-row .team-fighter-unit {
  flex: 1 1 0;
  max-width: 320px;
  min-width: 0;
}

@media (min-width: 901px) {
  .team-slots-row.has-3-units {
    flex-wrap: nowrap !important;
  }
  .team-slots-row.has-3-units .team-fighter-unit {
    flex: 1 1 0 !important;
    max-width: 320px !important;
  }
}

.empty-line-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 1.5px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-style: italic;
  opacity: 0.65;
  user-select: none;
}

/* CLASH BAR (CENTER ZONE BETWEEN CPU AND PLAYER) */
.battle-clash-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  box-sizing: border-box;
}

.team-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* FIGHTER CARD (COMPACT 3v3 UNIT) */
.team-fighter-unit {
  background: #111524;
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 142px;
  height: 142px;
  box-sizing: border-box;
  gap: 6px;
  position: relative;
  transition: all 0.25s ease;
  user-select: none;
}

.team-fighter-unit.empty-slot {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
  min-height: 142px;
  height: 142px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.team-fighter-unit.empty-slot:hover {
  border-color: var(--gold);
  color: #fff;
}

/* Rarity Accents on Units */
.team-fighter-unit.rarity-cout-3, .team-fighter-unit.rarity-legendaire { border-color: #facc15; box-shadow: 0 0 12px rgba(250, 204, 21, 0.25); }
.team-fighter-unit.rarity-cout-2, .team-fighter-unit.rarity-epique { border-color: #8b5cf6; box-shadow: 0 0 12px rgba(139, 92, 246, 0.25); }
.team-fighter-unit.rarity-cout-1, .team-fighter-unit.rarity-rare { border-color: #d97706; }
.team-fighter-unit.rarity-peu-commune { border-color: #10b981; }
.team-fighter-unit.rarity-commune { border-color: #94a3b8; }

/* Unit Statuses */
.team-fighter-unit.active-turn {
  transform: scale(1.02);
  border-color: #facc15 !important;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.6) !important;
  animation: pulse-unit 1.5s infinite alternate;
}

.team-fighter-unit.guard-active {
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6) !important;
}

.team-fighter-unit.is-targetable {
  cursor: crosshair !important;
  border-color: #f43f5e !important;
  animation: pulse-target 1s infinite alternate;
}

.team-fighter-unit.is-targetable:hover {
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.8) !important;
}

.team-fighter-unit.is-ko {
  filter: grayscale(0.9) opacity(0.5);
  border-color: #475569 !important;
  pointer-events: none;
}

@keyframes pulse-unit {
  0% { box-shadow: 0 0 12px rgba(250, 204, 21, 0.4); }
  100% { box-shadow: 0 0 24px rgba(250, 204, 21, 0.8); }
}

@keyframes pulse-target {
  0% { box-shadow: 0 0 8px rgba(244, 63, 94, 0.4); }
  100% { box-shadow: 0 0 20px rgba(244, 63, 94, 0.9); }
}

/* UNIT INTERNALS */
.unit-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-thumb-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.unit-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top center;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  display: block;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.unit-thumb-wrapper .unit-thumb {
  width: 100%;
  height: 100%;
}

.unit-thumb-aura-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  border: 1.5px solid #fff;
  z-index: 4;
  animation: aura-thumb-pulse 1.8s infinite ease-in-out;
}

@keyframes aura-thumb-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.15); filter: brightness(1.25); }
}

.unit-identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.unit-name {
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
}

.unit-country {
  color: #cbd5e1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-state-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.badge-guard { background: rgba(56, 189, 248, 0.25); color: #38bdf8; border: 1px solid #38bdf8; }
.badge-ko { background: rgba(239, 68, 68, 0.25); color: #ef4444; border: 1px solid #ef4444; }
.badge-frozen { background: rgba(6, 182, 212, 0.3) !important; color: #a5f3fc !important; border: 1px solid #06b6d4 !important; animation: pulse-glow-anim 1s infinite alternate; }

/* TACTICAL POSITION BADGES & TOGGLES */
.unit-pos-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.1;
  flex-shrink: 0;
}

.unit-pos-badge.pos-front {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.unit-pos-badge.pos-back {
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid #38bdf8;
  color: #7dd3fc;
}

.unit-protected-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid #38bdf8;
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.1;
  animation: pulse-subtle-anim 2s infinite ease-in-out;
}

.btn-toggle-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  margin-top: 3px;
  box-sizing: border-box;
  font-family: inherit;
}

.btn-toggle-line.btn-line-front {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.btn-toggle-line.btn-line-front:hover {
  background: rgba(245, 158, 11, 0.32);
  border-color: #f59e0b;
  color: #fff;
  transform: translateY(-1px);
}

.btn-toggle-line.btn-line-back {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.btn-toggle-line.btn-line-back:hover {
  background: rgba(56, 189, 248, 0.32);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.btn-toggle-line .toggle-icon {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* Position control in Team Builder Roster Cards */
.unit-position-control {
  margin-top: 4px;
  width: 100%;
}

.btn-position-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 1px solid transparent;
  box-sizing: border-box;
}

.btn-position-toggle.is-front {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}

.btn-position-toggle.is-front:hover {
  background: rgba(245, 158, 11, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.btn-position-toggle.is-back {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.btn-position-toggle.is-back:hover {
  background: rgba(56, 189, 248, 0.35);
  color: #fff;
  transform: translateY(-1px);
}

.btn-position-toggle .pos-switch-arrow {
  opacity: 0.7;
  font-size: 0.8rem;
}

.mini-fighter-slot .mini-pos-badge {
  font-size: 0.65rem;
  line-height: 1;
  margin-left: 2px;
}

/* =============================================================================
   ARENA ENHANCED ELEMENTAL AURA SYSTEM
   ============================================================================= */

/* Fighter Unit Aura Highlights */
.team-fighter-unit.has-aura {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-fighter-unit.has-aura.aura-feu,
.unit-thumb-wrapper.has-aura.aura-feu .unit-thumb {
  border-color: #ef4444 !important;
}
.team-fighter-unit.has-aura.aura-feu {
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4), inset 0 0 12px rgba(239, 68, 68, 0.12);
}
.unit-thumb-aura-badge.aura-feu {
  background: radial-gradient(circle, #f87171, #dc2626);
  border-color: #fca5a5;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
}

.team-fighter-unit.has-aura.aura-eau,
.unit-thumb-wrapper.has-aura.aura-eau .unit-thumb {
  border-color: #3b82f6 !important;
}
.team-fighter-unit.has-aura.aura-eau {
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.4), inset 0 0 12px rgba(59, 130, 246, 0.12);
}
.unit-thumb-aura-badge.aura-eau {
  background: radial-gradient(circle, #60a5fa, #2563eb);
  border-color: #bfdbfe;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.85);
}

.team-fighter-unit.has-aura.aura-foudre,
.unit-thumb-wrapper.has-aura.aura-foudre .unit-thumb {
  border-color: #a855f7 !important;
}
.team-fighter-unit.has-aura.aura-foudre {
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45), inset 0 0 12px rgba(168, 85, 247, 0.14);
}
.unit-thumb-aura-badge.aura-foudre {
  background: radial-gradient(circle, #c084fc, #9333ea);
  border-color: #e9d5ff;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.85);
}

.team-fighter-unit.has-aura.aura-glace,
.unit-thumb-wrapper.has-aura.aura-glace .unit-thumb {
  border-color: #06b6d4 !important;
}
.team-fighter-unit.has-aura.aura-glace {
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.45), inset 0 0 12px rgba(6, 182, 212, 0.14);
}
.unit-thumb-aura-badge.aura-glace {
  background: radial-gradient(circle, #22d3ee, #0891b2);
  border-color: #cffafe;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.85);
}

.team-fighter-unit.has-aura.aura-vent,
.unit-thumb-wrapper.has-aura.aura-vent .unit-thumb {
  border-color: #10b981 !important;
}
.team-fighter-unit.has-aura.aura-vent {
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4), inset 0 0 12px rgba(16, 185, 129, 0.12);
}
.unit-thumb-aura-badge.aura-vent {
  background: radial-gradient(circle, #34d399, #059669);
  border-color: #a7f3d0;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.85);
}

.team-fighter-unit.has-aura.aura-terre,
.unit-thumb-wrapper.has-aura.aura-terre .unit-thumb {
  border-color: #f59e0b !important;
}
.team-fighter-unit.has-aura.aura-terre {
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4), inset 0 0 12px rgba(245, 158, 11, 0.12);
}
.unit-thumb-aura-badge.aura-terre {
  background: radial-gradient(circle, #fbbf24, #d97706);
  border-color: #fef3c7;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.85);
}

.team-fighter-unit.has-aura.aura-nature,
.unit-thumb-wrapper.has-aura.aura-nature .unit-thumb {
  border-color: #84cc16 !important;
}
.team-fighter-unit.has-aura.aura-nature {
  box-shadow: 0 0 16px rgba(132, 204, 22, 0.4), inset 0 0 12px rgba(132, 204, 22, 0.12);
}
.unit-thumb-aura-badge.aura-nature {
  background: radial-gradient(circle, #a3e635, #65a30d);
  border-color: #ecfccb;
  box-shadow: 0 0 8px rgba(132, 204, 22, 0.85);
}

/* The Prominent Aura Pill in .unit-tags-row */
.unit-aura-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  animation: pulse-aura-badge 1.8s infinite alternate ease-in-out;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

@keyframes pulse-aura-badge {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.02); filter: brightness(1.2); }
}

.aura-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  display: inline-block;
  animation: aura-dot-pulse 1s infinite alternate;
}

@keyframes aura-dot-pulse {
  0% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

.unit-aura-badge.aura-feu, .unit-aura-badge.aura-pyro {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(185, 28, 28, 0.28));
  border: 1.5px solid #ef4444;
  color: #fecaca;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

.unit-aura-badge.aura-eau, .unit-aura-badge.aura-hydro {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.38), rgba(29, 78, 216, 0.28));
  border: 1.5px solid #3b82f6;
  color: #bfdbfe;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.45);
}

.unit-aura-badge.aura-foudre, .unit-aura-badge.aura-electro {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.38), rgba(126, 34, 206, 0.28));
  border: 1.5px solid #a855f7;
  color: #e9d5ff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
}

.unit-aura-badge.aura-glace, .unit-aura-badge.aura-cryo {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.38), rgba(14, 116, 144, 0.28));
  border: 1.5px solid #06b6d4;
  color: #cffafe;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.45);
}

.unit-aura-badge.aura-vent, .unit-aura-badge.aura-anemo {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(4, 120, 87, 0.28));
  border: 1.5px solid #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.unit-aura-badge.aura-terre, .unit-aura-badge.aura-geo {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.38), rgba(180, 83, 9, 0.28));
  border: 1.5px solid #f59e0b;
  color: #fef3c7;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.unit-aura-badge.aura-nature, .unit-aura-badge.aura-dendro {
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.38), rgba(77, 124, 15, 0.28));
  border: 1.5px solid #84cc16;
  color: #ecfccb;
  box-shadow: 0 0 10px rgba(132, 204, 22, 0.45);
}

.unit-aura-badge.no-aura {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  animation: none;
}

/* Fallback badge */
.element-aura-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  animation: pulse-glow-anim 1.5s infinite alternate;
}
.element-aura-badge.aura-feu, .element-aura-badge.aura-pyro { background: rgba(239, 68, 68, 0.3); border: 1px solid #ef4444; color: #fca5a5; }
.element-aura-badge.aura-eau, .element-aura-badge.aura-hydro { background: rgba(59, 130, 246, 0.3); border: 1px solid #3b82f6; color: #93c5fd; }
.element-aura-badge.aura-foudre, .element-aura-badge.aura-electro { background: rgba(168, 85, 247, 0.3); border: 1px solid #a855f7; color: #d8b4fe; }
.element-aura-badge.aura-glace, .element-aura-badge.aura-cryo { background: rgba(6, 182, 212, 0.3); border: 1px solid #06b6d4; color: #a5f3fc; }
.element-aura-badge.aura-vent, .element-aura-badge.aura-anemo { background: rgba(16, 185, 129, 0.3); border: 1px solid #10b981; color: #6ee7b7; }
.element-aura-badge.aura-terre, .element-aura-badge.aura-geo { background: rgba(245, 158, 11, 0.3); border: 1px solid #f59e0b; color: #fde68a; }
.element-aura-badge.aura-nature, .element-aura-badge.aura-dendro { background: rgba(132, 204, 22, 0.3); border: 1px solid #84cc16; color: #bef264; }

.team-fighter-unit.frozen {
  border-color: #06b6d4 !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.8) !important;
  filter: brightness(0.9) contrast(1.15);
}

/* HEALTH BAR */
.unit-hp-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unit-hp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
}

.hp-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.4s ease, background 0.4s ease;
  border-radius: 4px;
}

.hp-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.hp-fill.danger {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* STATS ROW */
.unit-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 6px;
  border-radius: 6px;
}

.u-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
}

.u-stat-tag { color: var(--text-muted); font-weight: 600; }
.u-stat-val { color: #fff; font-weight: 800; }

.stat-val-desktop {
  display: inline;
}

.stat-val-mobile {
  display: none;
}

.stat-buff-tag.buff-atk {
  color: #f472b6 !important;
  font-weight: 800 !important;
}

.stat-buff-tag.buff-def {
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

/* ==========================================================================
   CENTER PANEL (TIMELINE, ACTIONS, LOG)
   ========================================================================== */

.battle-center-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.battle-phase-indicator {
  text-align: center;
  padding: 0.6rem 1rem;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: #facc15;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

/* TURN ORDER BADGE (1 A 6 EN HAUT A DROITE DES CARTES) */
.timeline-container {
  display: none !important;
}

.unit-speed-order-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid #64748b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  z-index: 8;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: help;
  user-select: none;
}

.unit-speed-order-badge.rank-1 {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  border-color: #fef08a;
  color: #000;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.9);
}

.unit-speed-order-badge.rank-2 {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-color: #bae6fd;
  color: #fff;
  box-shadow: 0 0 11px rgba(14, 165, 233, 0.75);
}

.unit-speed-order-badge.rank-3 {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  border-color: #e9d5ff;
  color: #fff;
  box-shadow: 0 0 9px rgba(168, 85, 247, 0.65);
}

.unit-speed-order-badge.rank-4 {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #a7f3d0;
  color: #fff;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.55);
}

.unit-speed-order-badge.rank-5 {
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-color: #fed7aa;
  color: #fff;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.55);
}

.unit-speed-order-badge.rank-6 {
  background: linear-gradient(135deg, #64748b, #475569);
  border-color: #cbd5e1;
  color: #fff;
  box-shadow: 0 0 6px rgba(100, 116, 139, 0.5);
  opacity: 0.9;
}

.unit-speed-order-badge.is-acting {
  transform: scale(1.22);
  border-color: #ffffff !important;
  box-shadow: 0 0 18px #facc15, 0 0 28px rgba(250, 204, 21, 0.6) !important;
  animation: badge-pulse-acting 0.9s infinite alternate ease-in-out;
}

.unit-speed-order-badge.is-ko {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  opacity: 0.45;
}

@keyframes badge-pulse-acting {
  0% { transform: scale(1.15); box-shadow: 0 0 12px #facc15; }
  100% { transform: scale(1.3); box-shadow: 0 0 22px #facc15, 0 0 32px rgba(250, 204, 21, 0.8); }
}

/* ACTION PICKER PANEL */
.action-picker-panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.25s ease;
}

.current-actor-banner {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.btn-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fff;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.act-icon { font-size: 1.25rem; }
.act-name { font-size: 0.82rem; font-weight: 800; }
.act-desc { font-size: 0.64rem; color: var(--text-muted); }

.btn-action.act-attack:hover, .btn-action.act-attack.selected {
  border-color: #ef4444; background: rgba(239, 68, 68, 0.2); box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}
.btn-action.act-defend:hover, .btn-action.act-defend.selected {
  border-color: #38bdf8; background: rgba(56, 189, 248, 0.2); box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
.btn-action.act-speed:hover, .btn-action.act-speed.selected {
  border-color: #facc15; background: rgba(250, 204, 21, 0.2); box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}
.btn-action.act-heal:hover, .btn-action.act-heal.selected {
  border-color: #10b981; background: rgba(16, 185, 129, 0.2); box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.target-hint {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #facc15;
  animation: pulse-glow-anim 1.5s infinite alternate;
}

/* MAIN CONTROLS */
.battle-main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

/* ARENA HEADER TOP ROW */
.arena-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.pulse-subtle {
  animation: pulse-subtle-anim 2s infinite ease-in-out;
}

@keyframes pulse-subtle-anim {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(250, 204, 21, 0.2); }
  50% { transform: scale(1.02); box-shadow: 0 0 14px rgba(250, 204, 21, 0.45); }
}

/* BATTLE LOG CONSOLE (AGRANDI ET OPTIMISÉ) */
.battle-log-container {
  background: rgba(5, 8, 16, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  height: 380px; /* AGRANDI DE 180px A 380px */
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.battle-log-header {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-log-help {
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #facc15;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-log-help:hover {
  background: rgba(250, 204, 21, 0.3);
  border-color: #facc15;
  color: #fff;
  transform: translateY(-1px);
}

.battle-log-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  font-family: 'Consolas', 'Fira Code', monospace;
  font-size: 0.82rem; /* AGRANDI DE 0.75rem A 0.82rem */
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.battle-log-content::-webkit-scrollbar { width: 6px; }
.battle-log-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }

.log-entry { color: #cbd5e1; }
.log-entry.system { color: #facc15; font-weight: 700; }
.log-entry.player { color: #38bdf8; }
.log-entry.cpu { color: #f43f5e; }
.log-entry.crit { color: #fde047; font-weight: 800; }
.log-entry.heal { color: #34d399; font-weight: 700; }
.log-entry.special { 
  color: #f472b6; 
  font-weight: 800; 
  background: rgba(244, 114, 182, 0.12); 
  padding: 4px 8px; 
  border-radius: 4px; 
  border-left: 3px solid #ec4899; 
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}
.log-entry.synergy {
  color: #fde047;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.15);
  padding: 5px 9px;
  border-radius: 4px;
  border-left: 3px solid #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}
.log-entry.passive {
  color: #38bdf8;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #38bdf8;
}
.log-entry.reaction {
  color: #f472b6;
  font-weight: 800;
  background: rgba(244, 114, 182, 0.16);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #ec4899;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}
.log-entry.resonance {
  color: #a7f3d0;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.16);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}
.log-entry.ko { color: #ef4444; font-weight: 900; }
.log-entry.round { color: #c084fc; font-weight: 800; border-top: 1px dashed rgba(255, 255, 255, 0.15); padding-top: 4px; margin-top: 2px; }

/* SPECIAL ANNOUNCEMENT BANNER */
.special-announcement {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.25));
  border: 1px solid rgba(236, 72, 153, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fbcfe8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: pulse-glow-anim 1.5s infinite alternate;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.3);
}

.special-announcement.hidden { display: none !important; }

/* UNIT SPECIAL & PASSIVE TAGS */
.unit-tags-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.unit-special-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.unit-passive-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TEAM SYNERGIES & ELEMENTAL RESONANCE PANEL */
.team-synergies-panel {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.synergies-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 2px;
}

.synergies-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.synergy-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: fadeIn 0.3s ease;
}

.synergy-chip:hover,
.synergy-chip.expanded {
  transform: translateY(-1px);
}

.synergy-chip .synergy-chip-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.synergy-chip .synergy-chip-name {
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.synergy-chip .synergy-chip-info-icon {
  font-size: 0.60rem;
  opacity: 0.65;
  margin-left: 2px;
  transition: opacity 0.2s;
}

.synergy-chip:hover .synergy-chip-info-icon,
.synergy-chip.expanded .synergy-chip-info-icon {
  opacity: 1;
}

/* Floating Tooltip / Popover Detail */
.synergy-chip .synergy-chip-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 290px;
  min-width: 200px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 0, 0, 0.6);
  z-index: 120;
  pointer-events: none;
  text-align: left;
  white-space: normal;
  animation: fadeIn 0.2s ease;
}

.synergy-chip .synergy-chip-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
}

.synergy-tooltip-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--gold, #facc15);
  margin-bottom: 3px;
}

.synergy-tooltip-desc {
  font-size: 0.70rem;
  font-weight: 500;
  color: #cbd5e1;
  line-height: 1.35;
}

@media (hover: hover) {
  .synergy-chip:hover .synergy-chip-tooltip {
    display: block;
  }
}

.synergy-chip.expanded .synergy-chip-tooltip {
  display: block;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .synergy-chip .synergy-chip-tooltip {
    left: 0;
    transform: none;
    max-width: 260px;
  }
  .synergy-chip .synergy-chip-tooltip::after {
    left: 20px;
    transform: none;
  }
}

/* Elemental Resonance Chips */
.synergy-chip.resonance-feu, .synergy-chip.resonance-pyro {
  background: rgba(239, 68, 68, 0.2);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}
.synergy-chip.resonance-eau, .synergy-chip.resonance-hydro {
  background: rgba(59, 130, 246, 0.2);
  border: 1.5px solid #3b82f6;
  color: #93c5fd;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
.synergy-chip.resonance-foudre, .synergy-chip.resonance-electro {
  background: rgba(168, 85, 247, 0.2);
  border: 1.5px solid #a855f7;
  color: #d8b4fe;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}
.synergy-chip.resonance-glace, .synergy-chip.resonance-cryo {
  background: rgba(6, 182, 212, 0.2);
  border: 1.5px solid #06b6d4;
  color: #a5f3fc;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}
.synergy-chip.resonance-vent, .synergy-chip.resonance-anemo {
  background: rgba(16, 185, 129, 0.2);
  border: 1.5px solid #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
.synergy-chip.resonance-terre, .synergy-chip.resonance-geo {
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid #f59e0b;
  color: #fde68a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.synergy-chip.resonance-nature, .synergy-chip.resonance-dendro {
  background: rgba(132, 204, 22, 0.2);
  border: 1.5px solid #84cc16;
  color: #bef264;
  box-shadow: 0 0 10px rgba(132, 204, 22, 0.3);
}
.synergy-chip.resonance-poly {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(59, 130, 246, 0.18), rgba(16, 185, 129, 0.18));
  border: 1.5px solid #facc15;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

/* Nationality / Geopolitical Synergy Chips */
.synergy-chip.resonance-nat-def {
  background: rgba(56, 189, 248, 0.2);
  border: 1.5px solid #38bdf8;
  color: #bae6fd;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}
.synergy-chip.resonance-nat-atk {
  background: rgba(244, 63, 94, 0.2);
  border: 1.5px solid #f43f5e;
  color: #fecdd3;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.35);
}
.synergy-chip.resonance-nat-hybrid {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(244, 63, 94, 0.2));
  border: 1.5px solid #c084fc;
  color: #f3e8ff;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.35);
}

/* Generational (Decade Debut) Synergy Chips */
.synergy-chip.resonance-gen-trio {
  background: rgba(168, 85, 247, 0.2);
  border: 1.5px solid #a855f7;
  color: #e9d5ff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}
.synergy-chip.resonance-gen-cap-older {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(59, 130, 246, 0.22));
  border: 1.5px solid #eab308;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
}
.synergy-chip.resonance-gen-cap-younger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(245, 158, 11, 0.22));
  border: 1.5px solid #f97316;
  color: #fed7aa;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.35);
}
.synergy-chip.resonance-gen-frise {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(168, 85, 247, 0.2), rgba(234, 179, 8, 0.2));
  border: 1.5px solid #38bdf8;
  color: #bae6fd;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.synergy-chip.synergy-underdog-3 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.25));
  border: 1.5px solid #f59e0b;
  color: #fde68a;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.synergy-chip.synergy-underdog-2 {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fcd34d;
}

.synergy-chip.synergy-mentor {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(56, 189, 248, 0.22));
  border: 1.5px solid #a855f7;
  color: #e9d5ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.synergy-chip.synergy-national {
  background: rgba(16, 185, 129, 0.18);
  border: 1.5px solid #10b981;
  color: #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.synergy-chip.synergy-cosmo {
  background: rgba(6, 182, 212, 0.18);
  border: 1.5px solid #06b6d4;
  color: #a5f3fc;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

.synergy-chip.synergy-hybrid {
  background: rgba(236, 72, 153, 0.18);
  border: 1.5px solid #ec4899;
  color: #fbcfe8;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

.synergy-chip strong {
  font-weight: 800;
  display: block;
}

.synergy-tip {
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* FLOATING NUMBERS */
.floating-indicator {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 1.3rem;
  pointer-events: none;
  z-index: 100;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  animation: floatUp 1.2s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

.floating-indicator.damage { color: #f43f5e; }
.floating-indicator.crit { color: #facc15; font-size: 1.5rem; text-shadow: 0 0 12px #facc15; }
.floating-indicator.heal { color: #10b981; }
.floating-indicator.guard { color: #38bdf8; font-size: 1rem; }
.floating-indicator.special { 
  color: #f472b6; 
  font-size: 1.35rem; 
  text-shadow: 0 0 16px rgba(236, 72, 153, 0.9); 
}
.floating-indicator.reaction {
  color: #f472b6;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(244, 114, 182, 0.95), 0 2px 5px #000;
}
.floating-indicator.aura {
  color: #38bdf8;
  font-size: 1.25rem;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.95), 0 2px 5px #000;
}

@keyframes floatUp {
  0% { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  25% { transform: translate(-50%, -15px) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -45px) scale(1); opacity: 0; }
}

/* TEAM BUILDER PANEL */
.team-builder-panel {
  background: var(--panel-bg);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.team-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.builder-info h3 { font-size: 1.05rem; color: #fff; }
.builder-info p { font-size: 0.82rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.builder-actions { display: flex; gap: 0.6rem; }

.team-cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 0.82rem;
  transition: all 0.3s ease;
}

.team-cost-badge.cost-valid {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #6ee7b7;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.team-cost-badge.cost-overlimit {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #fca5a5;
  animation: pulse-glow-red 1s infinite alternate;
}

@keyframes pulse-glow-red {
  0% { box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); transform: scale(1); }
  100% { box-shadow: 0 0 18px rgba(239, 68, 68, 0.85); transform: scale(1.03); }
}

.deck-card-cost {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #facc15;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.6);
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  line-height: 1;
}

.deck-card-element {
  position: absolute;
  bottom: 84px;
  left: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: #000000 !important;
  color: #fff;
  z-index: 5;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

/* Deck card badges */
.deck-card-thumb .slot-pick-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--gold);
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

/* DECK SELECTOR SCROLL */
.deck-selector {
  background: var(--panel-bg);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.deck-selector h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.deck-cards-scroll {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 0.8rem;
}

.deck-card-thumb {
  flex: 0 0 130px;
  height: 190px;
  background: #181d2f;
  border: 2px solid var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.deck-card-thumb:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.deck-card-thumb.selected {
  border-color: var(--gold);
  box-shadow: 0 0 15px var(--gold-glow);
  transform: translateY(-6px);
}

.deck-card-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  object-position: top center;
}

.deck-card-thumb-info {
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.deck-card-thumb-name {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-card-thumb-stat {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 800;
}

/* ==========================================================================
   INSPECT MODAL
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

#inspect-modal {
  z-index: 1300;
}

#modal-card-report {
  z-index: 1350;
}

#modal-auth {
  z-index: 1400;
}

#modal-global-announcement {
  z-index: 1450;
}

.modal-dialog {
  background: #131726;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  max-width: 840px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-inspect-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding: 2.2rem;
}

.modal-card-display {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 0.85rem;
}

.modal-card-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 250px;
  justify-content: center;
  margin-top: 0.25rem;
}

.modal-card-action-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.modal-card-action-col .btn {
  width: 100%;
}

.action-sub-val {
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  letter-spacing: 0.2px;
}

.action-sub-val.recycle-sub-val {
  color: #10b981;
}

.action-sub-val.sell-sub-val {
  color: #f59e0b;
}

.modal-card-actions .btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-recycle {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  border: 1.5px solid #34d399 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  cursor: pointer;
}

.btn-recycle:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-recycle:active:not(:disabled) {
  transform: translateY(0);
}

.btn-recycle:disabled {
  background: rgba(51, 65, 85, 0.6) !important;
  color: #64748b !important;
  border: 1px solid #475569 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: 0.65;
  transform: none !important;
}

.btn-sell {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  cursor: pointer;
}

.btn-sell:hover:not(:disabled) {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.btn-sell:active:not(:disabled) {
  transform: translateY(0);
}

.btn-sell:disabled {
  background: rgba(51, 65, 85, 0.6) !important;
  color: #64748b !important;
  border: 1px solid #475569 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: 0.65;
  transform: none !important;
}

.modal-card-actions-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  max-width: 250px;
  line-height: 1.35;
  margin: 0;
}

.modal-card-actions-hint.recycle-hint-active {
  color: #34d399;
  font-weight: 600;
}

.modal-bio-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.modal-bio-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.2rem;
}

.modal-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
}

.modal-badge-locked {
  background: #334155 !important;
  color: #cbd5e1 !important;
  border-color: #64748b !important;
}

.modal-stats-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.modal-stat-item {
  display: flex;
  flex-direction: column;
}

.modal-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.modal-desc-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.modal-desc-box p {
  font-size: 0.85rem;
  color: #d1d5db;
  line-height: 1.45;
}

.modal-wiki-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.modal-wiki-link:hover {
  text-decoration: underline;
}

/* UTILITY */
.hidden {
  display: none !important;
}

/* ==========================================================================
   TAB : TEAMS MANAGER (GESTION DES 6 ÉQUIPES)
   ========================================================================== */
.teams-manager-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

.teams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.teams-header-info {
  flex: 1;
  min-width: 250px;
}

.teams-header-info h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.teams-header-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 6 TEAMS SLOTS BAR */
.teams-slots-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
}

.team-slot-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.team-slot-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.team-slot-btn.active {
  background: rgba(245, 158, 11, 0.14);
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}

.team-slot-btn .slot-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-slot-btn .slot-number {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
}

.team-slot-btn .slot-btn-cost {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.team-slot-btn .slot-btn-cost.cost-ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
}

.team-slot-btn .slot-btn-cost.cost-over {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.25);
}

.team-slot-btn .slot-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-slot-btn .slot-status-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.team-slot-btn.is-ready .slot-status-pill {
  color: #34d399;
}

/* TEAM EDITOR MAIN BOX */
.team-editor-box {
  background: var(--panel-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-subtle);
}

.team-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.team-name-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.team-name-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  width: 250px;
  outline: none;
  transition: all 0.2s;
}

.team-name-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
  background: rgba(0, 0, 0, 0.7);
}

.team-editor-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.teams-status-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.teams-status-badge.status-ready {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #6ee7b7;
}

.teams-status-badge.status-overlimit {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.teams-status-badge.status-incomplete {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fde68a;
}

.team-editor-actions {
  display: flex;
  gap: 0.5rem;
}

/* 3 ROSTER SLOTS IN EDITOR */
.team-roster-display {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.team-roster-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  transition: all 0.2s;
}

.team-roster-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.team-roster-card .btn-remove-fighter {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.2s;
  z-index: 5;
}

.team-roster-card .btn-remove-fighter:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}

.team-roster-card.empty-slot {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 210px;
  cursor: pointer;
}

.team-roster-card.empty-slot:hover {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.05);
}

.team-roster-card.empty-slot .empty-icon {
  font-size: 2rem;
  opacity: 0.5;
  color: var(--gold);
}

.team-roster-card.empty-slot .empty-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}

.team-roster-card.empty-slot .empty-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* CARDS SELECTOR (FROM INVENTORY) */
.teams-cards-selector {
  background: var(--panel-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.teams-selector-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.selector-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  flex-wrap: wrap;
}

.teams-selector-header h3 {
  font-size: 1.05rem;
  color: #fff;
}

.teams-selector-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.teams-count-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  white-space: nowrap;
}

.selector-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.teams-selector-controls {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.teams-filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.teams-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.teams-search-sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.teams-search-box-wrapper {
  flex: 1;
  min-width: 200px;
}

.teams-search-box {
  width: 100%;
  max-width: 320px;
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  outline: none;
  transition: all 0.2s;
}

.teams-search-box:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.teams-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.85rem;
  max-height: none !important;
  overflow: visible !important;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.teams-cards-grid.expanded {
  max-height: none !important;
  overflow: visible !important;
}

.team-pick-thumb {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.team-pick-thumb:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

.team-pick-thumb.rarity-cout-3 {
  border-color: rgba(250, 204, 21, 0.45);
}
.team-pick-thumb.rarity-cout-2 {
  border-color: rgba(192, 132, 252, 0.45);
}
.team-pick-thumb.rarity-cout-1 {
  border-color: rgba(217, 119, 6, 0.35);
}

.team-pick-thumb.in-active-team {
  border-color: var(--gold) !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}

.team-pick-thumb .pick-thumb-img-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  background: #0f172a;
  overflow: hidden;
  flex-shrink: 0;
}

.team-pick-thumb .pick-thumb-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s ease;
}

.team-pick-thumb:hover .pick-thumb-img-wrapper img {
  transform: scale(1.05);
}

.team-pick-thumb .pick-thumb-top-badges {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  pointer-events: none;
}

.team-pick-thumb .pick-badge-rank {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
}

.team-pick-thumb .pick-badge-cost {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #38bdf8;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  z-index: 4;
  letter-spacing: -0.2px;
}

.team-pick-thumb .pick-badge-element {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.team-pick-thumb .pick-badge-equipped {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #000;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  z-index: 5;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.8), 0 0 6px rgba(250, 204, 21, 0.6);
  white-space: nowrap;
}

.team-pick-thumb .pick-badge-count {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #cbd5e1;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 4;
}

.team-pick-thumb .pick-badge-gen {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #e2e8f0;
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  z-index: 4;
  letter-spacing: 0.3px;
}

.team-pick-thumb .pick-thumb-info {
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(10, 14, 25, 0.95);
  flex: 1;
  justify-content: space-between;
}

.team-pick-thumb .pick-thumb-title-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.team-pick-thumb .pick-thumb-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.team-pick-thumb .pick-thumb-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-pick-thumb .pick-combat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 5px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-pick-thumb .pick-stat-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.65rem;
}

.team-pick-thumb .pick-stat-tag {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.6rem;
}

.team-pick-thumb .pick-stat-val {
  color: #fff;
  font-weight: 800;
  font-size: 0.68rem;
}

.team-pick-thumb .pick-thumb-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.team-pick-thumb .btn-pick-toggle {
  flex: 1;
  padding: 4px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}

.team-pick-thumb .btn-pick-toggle:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

.team-pick-thumb.in-active-team .btn-pick-toggle {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: #ef4444;
}

.team-pick-thumb.in-active-team .btn-pick-toggle:hover {
  background: #ef4444;
  color: #fff;
}

.team-pick-thumb .btn-pick-inspect {
  padding: 4px 6px;
  font-size: 0.68rem;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.team-pick-thumb .btn-pick-inspect:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ==========================================================================
   TAB : ARENA TEAM PICKER (SÉLECTION D'ÉQUIPE POUR LE COMBAT)
   ========================================================================== */
.arena-team-picker-panel {
  background: var(--panel-bg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.arena-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.picker-info h3 {
  font-size: 1.15rem;
  color: #fff;
}

.picker-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.arena-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.arena-team-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.arena-team-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(20, 30, 55, 0.75);
}

.arena-team-card.selected {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.arena-team-card .card-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.arena-team-card .card-team-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arena-team-card .team-badge-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.arena-team-card .team-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.arena-team-card .card-team-cost {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.arena-team-card .card-team-cost.cost-ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
}

.arena-team-card .card-team-cost.cost-over {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.25);
}

.arena-team-card .team-fighters-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.arena-team-card .mini-fighter-slot {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  overflow: hidden;
}

.arena-team-card .mini-fighter-slot img {
  width: 100%;
  height: 65px;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
}

.arena-team-card .mini-fighter-slot .mini-fighter-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}

.arena-team-card .mini-fighter-slot .mini-fighter-meta {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.arena-team-card .mini-fighter-slot.empty-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.7rem;
}

.arena-team-card .team-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.arena-team-card .active-selection-indicator {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.arena-team-card.selected .active-selection-indicator {
  color: var(--gold);
}

/* ==========================================================================
   REWARDED AD MODAL & PLAYER
   ========================================================================== */

.ad-modal-dialog {
  max-width: 520px;
  background: linear-gradient(135deg, #0b1120 0%, #030712 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
}

.ad-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ad-header-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.6));
}

.ad-modal-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.ad-modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ad-modal-header p strong {
  color: #38bdf8;
}

.ad-stock-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.ad-stock-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.ad-stock-counter {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 0.8rem;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.ad-charges-visual {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.ad-charge-pill {
  width: 28px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}

.ad-charge-pill.filled {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-color: #7dd3fc;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.ad-timer-info {
  font-size: 0.8rem;
  color: #94a3b8;
}

.ad-timer-info strong {
  color: #facc15;
  font-family: monospace;
  font-size: 0.95rem;
}

/* AD PLAYER SCREEN */
.ad-player-box {
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.8);
}

.ad-player-box {
  background: #030712;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.8), 0 8px 25px rgba(0, 0, 0, 0.6);
}

.ad-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ad-sponsor-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ad-player-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ad-btn-icon-sound {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ad-btn-icon-sound:hover {
  background: rgba(255, 255, 255, 0.2);
}

.ad-countdown {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  color: #facc15;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

/* Dynamic Simulated Ad Stage */
.sim-ad-stage {
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.sim-ad-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-ad-tag {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.sim-ad-rating {
  font-size: 0.75rem;
  font-weight: 700;
  color: #facc15;
}

.sim-ad-body {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sim-ad-icon-halo {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sim-ad-big-icon {
  font-size: 2rem;
  display: inline-block;
  animation: pulseSubtle 2s infinite ease-in-out;
}

.sim-ad-details {
  flex: 1;
}

.sim-ad-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: 1px;
}

.sim-ad-headline {
  font-size: 0.8rem;
  font-weight: 800;
  margin: 2px 0 4px 0;
}

.sim-ad-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.35;
  margin: 0;
}

.sim-ad-bullets {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sim-ad-bullet-item {
  font-size: 0.72rem;
  color: #e2e8f0;
  font-weight: 600;
}

.sim-ad-footer-cta {
  margin-top: 0.25rem;
  display: flex;
  justify-content: center;
}

.sim-ad-install-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.sim-ad-install-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.sim-ad-tiny-sub {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 600;
}

.ad-progress-bar-container {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.ad-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #facc15, #10b981);
  transition: width 0.1s linear;
}

/* REWARD CELEBRATION / REVEAL SCREEN */
.ad-reward-celebration {
  padding: 1.5rem 1rem;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.5);
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: 1.2rem;
  animation: zoomIn 0.3s ease-out;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

.reward-celebration-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reward-sparkle-halo {
  font-size: 2.2rem;
  animation: spinSlow 6s linear infinite;
}

.reward-celebration-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: #34d399;
  margin: 0.5rem 0 0.2rem;
  letter-spacing: 1px;
}

.reward-celebration-card p {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.reward-diamond-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.2);
  border: 1.5px solid rgba(6, 182, 212, 0.5);
  padding: 6px 20px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.reward-gem-icon {
  font-size: 1.6rem;
  animation: bounce 1.5s infinite;
}

.reward-gem-qty {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 1px;
}

.ad-actions {
  text-align: center;
}

.ad-actions .btn {
  width: 100%;
}

/* Toast simulation notification */
.ad-simulation-toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.ad-simulation-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* DIAMOND STORE MODAL & TRIGGER */
#btn-open-diamond-store {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.3) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  color: #38bdf8;
  font-weight: 800;
  transition: all 0.25s ease;
}

#btn-open-diamond-store:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(59, 130, 246, 0.45) 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.45);
  color: #fff;
  transform: translateY(-2px);
}

.diamond-store-modal-dialog {
  max-width: 900px;
  width: 95%;
  background: linear-gradient(135deg, #10162a 0%, #080c18 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
}

.diamond-store-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.diamond-store-modal-content .diamond-store-header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.diamond-store-modal-content .diamond-store-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.diamond-store-modal-content .diamond-store-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* THEMATIC PACK ELEMENT SELECTOR */
.thematic-dialog {
  max-width: 580px;
  background: linear-gradient(135deg, #181028 0%, #080512 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(250, 204, 21, 0.2);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
}

.thematic-modal-content {
  text-align: center;
}

.thematic-modal-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.thematic-modal-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.thematic-elements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.thematic-elem-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: all 0.2s ease;
}

.thematic-elem-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.thematic-elem-btn.active {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.4);
  transform: scale(1.05);
}

.thematic-btn-icon {
  font-size: 1.6rem;
}

.thematic-btn-name {
  font-size: 0.8rem;
  font-weight: 800;
}

.thematic-actions {
  margin-top: 1.2rem;
  width: 100%;
}

#btn-confirm-thematic-pack {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  background: linear-gradient(135deg, #fef08a 0%, #facc15 45%, #ca8a04 100%);
  color: #0b0714 !important;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  letter-spacing: 0.3px;
  border: 1.5px solid #fef08a;
  box-shadow: 0 4px 18px rgba(250, 204, 21, 0.45);
  cursor: pointer;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 1.05rem;
}

#btn-confirm-thematic-pack:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(250, 204, 21, 0.65);
}

.thematic-btn-main-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.thematic-btn-price-badge {
  background: rgba(15, 7, 30, 0.88);
  color: #fde047 !important;
  border: 1px solid rgba(250, 204, 21, 0.6);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.95rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  text-shadow: none !important;
  letter-spacing: 0.2px;
}


/* =============================================================================
   MOBILE & VERTICAL / SMARTPHONE COMPATIBILITY (TCG MOBILE APP EXPERIENCE)
   ============================================================================= */

/* Dual tab labels: Desktop vs Mobile */
.tab-label-short {
  display: none;
}
.tab-label-full {
  display: inline;
}

@media (max-width: 900px), (orientation: portrait) and (max-width: 1024px) {
  /* 1. Global Viewport & Touch Optimization */
  html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
  }

  body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  button, a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* 2. Top Currency Bar (Mobile Header Sub-Bar) */
  .top-currency-widget {
    order: -1;
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 13, 24, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.2rem 0.5rem;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    z-index: 105;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0;
  }

  .sidebar-currency-row,
  .sidebar-actions-row {
    display: contents;
  }

  .currency-chip {
    flex: initial;
    padding: 0.15rem 0.45rem;
    gap: 0.25rem;
    border-radius: 999px;
  }

  .currency-icon {
    font-size: 0.85rem;
  }

  .currency-icon .babe-coin {
    width: 1.05rem;
    height: 1.05rem;
  }

  .currency-val {
    font-size: 0.82rem;
    font-weight: 800;
  }

  .btn-ad-trigger {
    flex: initial;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    gap: 0.2rem;
    border-radius: 999px;
  }

  .btn-header-social {
    flex: initial;
    padding: 0.15rem 0.5rem;
    font-size: 0.68rem;
    gap: 0.2rem;
    border-radius: 999px;
  }

  .social-btn-label {
    display: none;
  }

  /* 3. App Layout Shell */
  .app-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: relative;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* 4. Top Mobile App Bar (Compact Header en haut du layout) */
  .app-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0d18;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    contain: none !important;
    will-change: auto !important;
    padding: env(safe-area-inset-top, 0px) 0 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 100;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: 0;
  }

  .sidebar-top-bar {
    width: 100%;
    height: 42px;
    padding: 0.25rem 0.75rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .sidebar-brand {
    padding-bottom: 0;
    border-bottom: none;
    margin: 0;
    gap: 0.45rem;
    display: flex;
    align-items: center;
  }

  .brand-logo-emblem {
    width: 28px;
    height: 28px;
  }

  .sidebar-brand h1 {
    font-size: 1.05rem;
    letter-spacing: 0.8px;
    margin: 0;
  }

  .sidebar-brand .logo-subtitle {
    display: none;
  }

  .sidebar-footer {
    padding-top: 0;
    border-top: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .sidebar-footer .icon-btn {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-user-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    cursor: pointer;
  }

  .sidebar-footer .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 8px;
  }

  .sidebar-brand-credit {
    display: none;
  }

  /* Account Mode Switcher Row : Masqué sur mobile pour épurer la page */
  .account-mode-switcher {
    display: none !important;
  }

  /* HUD Stats Mini Row : Masqué sur mobile pour libérer l'espace (valeurs déjà visibles sur les onglets) */
  .sidebar-hud {
    display: none !important;
  }

  /* 5. Fixed Bottom Navigation Bar (Dock épuré fixé tout en bas de l'écran mobile) */
  .sidebar-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: auto;
    min-height: 52px;
    background: rgba(10, 13, 24, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    padding: 3px 2px calc(4px + env(safe-area-inset-bottom, 0px)) 2px;
    margin: 0;
    z-index: 1000;
    gap: 1px;
  }

  .sidebar-nav .nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 1px 3px 1px;
    min-width: 0;
    gap: 1px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    text-align: center;
  }

  .sidebar-nav .nav-tab:hover {
    transform: none;
    color: #fff;
  }

  .sidebar-nav .nav-tab.active {
    background: rgba(250, 204, 21, 0.08);
    border-color: rgba(250, 204, 21, 0.25);
    color: #facc15;
    box-shadow: none;
  }

  .sidebar-nav .nav-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2.5px;
    background: #facc15;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.8);
  }

  .sidebar-nav .nav-tab .tab-icon {
    font-size: 1.15rem;
    line-height: 1;
    margin-bottom: 2px;
  }

  .tab-label-full {
    display: none !important;
  }

  .tab-label-short {
    display: block !important;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
  }

  /* Badges compacts positionnés précisément au coin supérieur droit de l'icône */
  .sidebar-nav .nav-tab .tab-badge {
    position: absolute;
    top: 2px;
    left: calc(50% + 4px);
    right: auto;
    font-size: 0.52rem;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 999px;
    line-height: 14px;
    text-align: center;
    font-weight: 900;
    background: var(--accent-gold);
    color: #0b0f19;
    border: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin-left: 0;
    z-index: 3;
  }

  .sidebar-nav .nav-tab .quest-alert-badge {
    background: #ef4444;
    color: #ffffff;
  }

  /* Badge Bientôt discret (point cyan néon) pour préserver la lisibilité de Marché */
  .sidebar-nav .nav-tab .badge-soon {
    width: 7px;
    height: 7px;
    min-width: 0;
    padding: 0;
    font-size: 0;
    border-radius: 50%;
    top: 3px;
    left: calc(50% + 7px);
    right: auto;
    background: #06b6d4;
    box-shadow: 0 0 6px rgba(6, 182, 212, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.4);
  }

  .sidebar-nav .nav-tab .tester-only-badge {
    display: none;
  }

  /* Mobile Bottom Dock : Uniquement 5 boutons ordonnés */
  /* 1: Boosters, 2: Classeur, 3: Marché, 4: Quêtes, 5: Autres */
  .sidebar-nav #nav-tab-boosters {
    order: 1 !important;
    display: flex !important;
  }
  .sidebar-nav #nav-tab-collection {
    order: 2 !important;
    display: flex !important;
  }
  .sidebar-nav #nav-tab-trading {
    order: 3 !important;
    display: flex !important;
  }
  .sidebar-nav #nav-tab-quests {
    order: 4 !important;
    display: flex !important;
  }
  .sidebar-nav #nav-tab-more {
    order: 5 !important;
    display: flex !important;
  }

  /* Retrait de la pastille (badge) avec le nombre de cartes sur le bouton Classeur sur mobile */
  .sidebar-nav #nav-tab-collection #tab-badge-count {
    display: none !important;
  }

  /* Masquer du dock mobile les onglets déportés dans 'Autres' ou desktop */
  .sidebar-nav #nav-tab-profile,
  .sidebar-nav #nav-tab-teams,
  .sidebar-nav #nav-tab-arena,
  .sidebar-nav #nav-tab-settings,
  .sidebar-nav .tester-admin-tab,
  .sidebar-nav .admin-only-tab {
    display: none !important;
  }

  /* Toasts flottants relevés au-dessus du dock mobile */
  .quest-toast-container {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    z-index: 99999 !important;
  }

  .quest-toast {
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  }

  .quest-toast .toast-icon {
    font-size: 1.4rem !important;
  }

  .quest-toast .toast-title {
    font-size: 0.86rem !important;
  }

  .quest-toast .toast-subtitle {
    font-size: 0.75rem !important;
  }

  /* 6. Main Scrollable Content */
  .main-content {
    flex: 1;
    min-height: 0;
    height: 100%;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding: 0.65rem 0.75rem calc(64px + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
  }

  /* 7. Card Sizing on Mobile : Strict respect des proportions PC (250 / 380 = 1:1.52) */
  .card-container {
    max-width: calc(100vw - 32px);
    aspect-ratio: 250 / 380 !important;
  }

  /* 8. Tab 1: Boosters Mobile */
  #tab-boosters.tab-pane:not(.active) {
    display: none !important;
  }

  #tab-boosters.tab-pane.active {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    padding: 0.35rem 0.5rem;
  }

  .main-content:has(#tab-boosters.active) {
    overflow-y: hidden;
    padding-top: 0.35rem !important;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .booster-stage {
    padding: 0;
    min-height: auto;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
  }

  .pack-wrapper {
    gap: 0.45rem;
    width: 100%;
    max-width: 320px;
    margin: 0.25rem auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .free-pack-status-banner {
    width: 100%;
    max-width: min(320px, calc(100vw - 32px));
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    box-sizing: border-box !important;
    padding: 0 0.65rem;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    text-align: left;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(250, 204, 21, 0.3);
    margin-bottom: 0.25rem;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }

  .free-pack-timer-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    flex: 1;
    min-width: 0;
  }

  .free-pack-icon {
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .free-pack-timer-text {
    font-size: 0.74rem;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block;
    color: #cbd5e1;
  }

  .free-pack-timer-text strong {
    color: #facc15;
    font-weight: 800;
    display: inline;
    min-width: 0;
  }

  .free-pack-timer-text .timer-digits {
    font-variant-numeric: tabular-nums !important;
    font-family: var(--font-main, 'Outfit', monospace, sans-serif) !important;
    display: inline-block !important;
    min-width: 58px !important;
    text-align: center !important;
    letter-spacing: 0.5px;
    color: #facc15;
    font-weight: 800;
  }

  .free-pack-stock-pills {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
  }

  .stock-pill {
    width: 14px;
    height: 6px;
    border-radius: 3px;
  }

  #tab-boosters .booster-pack-3d,
  .booster-pack-3d {
    width: min(180px, 50vw, calc(46vh * 2 / 3));
    aspect-ratio: 2 / 3;
    height: auto;
    max-height: 46vh;
    margin: 0.2rem auto;
    border-radius: 12px;
  }

  .pack-foil {
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
  }

  .pack-badge {
    font-size: 0.52rem;
    padding: 0.15rem 0.35rem;
  }

  .pack-count {
    font-size: 0.58rem;
  }

  .pack-logo {
    margin: 0.3rem 0;
  }

  .pack-icon-main {
    font-size: 1.55rem;
    margin-bottom: 0.2rem;
  }

  .pack-logo h2 {
    font-size: 1.05rem;
    line-height: 1.05;
  }

  .pack-logo p {
    font-size: 0.5rem;
    margin-top: 0.15rem;
  }

  .pack-footer-text {
    font-size: 0.52rem;
    padding: 0.18rem 0.55rem;
  }

  .pack-tear-line {
    top: 40px;
  }

  .pack-tap-prompt {
    font-size: 0.74rem;
    padding: 0.22rem 0.7rem;
    gap: 0.3rem;
  }

  .pack-actions {
    gap: 0.35rem;
    margin-bottom: 0.1rem;
  }

  .compact-store-btn {
    padding: 0.28rem 0.75rem;
    font-size: 0.74rem;
  }

  .diamond-store-section {
    padding: 1rem 0.8rem;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .diamond-packs-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .reveal-board {
    margin-top: 0;
    gap: 0.35rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  .reveal-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.3rem 0.55rem !important;
    gap: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border-radius: 8px !important;
  }

  .reveal-header-info {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .reveal-header-info h3 {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    color: #f8fafc !important;
  }

  .reveal-stack-pill {
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
    flex-shrink: 0 !important;
  }

  .reveal-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .reveal-actions button {
    flex: unset !important;
    padding: 0.28rem 0.55rem !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  .reveal-stack-stage {
    min-height: 290px !important;
    padding: 0 !important;
  }

  .btn-stack-arrow {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .btn-stack-prev {
    left: 4px;
  }

  .btn-stack-next {
    right: 4px;
  }

  .reveal-cards-grid {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    min-height: 290px !important;
    position: relative !important;
    perspective: 1000px !important;
    gap: 0 !important;
    flex-direction: unset !important;
  }

  .reveal-cards-grid > .card-container {
    width: min(180px, calc(100vw - 64px)) !important;
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
  }

  .reveal-cards-grid > .card-container .card-face {
    padding: 5px !important;
    border-radius: 12px !important;
  }

  .reveal-cards-grid > .card-container .card-top-bar {
    height: 24px !important;
    padding: 2px 6px !important;
    margin-bottom: 3px !important;
  }

  .reveal-cards-grid > .card-container .card-name-title {
    font-size: 0.74rem !important;
    line-height: 1.2 !important;
  }

  .reveal-cards-grid > .card-container .card-cost-mini {
    font-size: 0.62rem !important;
    padding: 1px 4px !important;
  }

  .reveal-cards-grid > .card-container .card-rank-badge {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.72rem !important;
  }

  .reveal-cards-grid > .card-container .card-stars-badge {
    font-size: 0.70rem !important;
    padding: 1px 4px !important;
  }

  .reveal-cards-grid > .card-container .card-img-wrapper {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 130px !important;
    border-radius: 8px !important;
  }

  .reveal-cards-grid > .card-container .card-country-flag {
    font-size: 0.62rem !important;
    padding: 1px 4px !important;
    bottom: 4px !important;
    right: 4px !important;
  }

  .reveal-cards-grid > .card-container .card-rarity-pill,
  .reveal-cards-grid > .card-container .card-new-badge {
    font-size: 0.58rem !important;
    padding: 1px 4px !important;
    top: 4px !important;
    left: 4px !important;
  }

  .reveal-cards-grid > .card-container .card-combat-grid {
    margin-top: 3px !important;
    padding: 3px 5px !important;
    gap: 3px !important;
  }

  .reveal-cards-grid > .card-container .combat-stat-cell {
    padding: 2px 4px !important;
    font-size: 0.65rem !important;
  }

  .reveal-cards-grid > .card-container .stat-tag {
    font-size: 0.62rem !important;
  }

  .reveal-cards-grid > .card-container .stat-number {
    font-size: 0.72rem !important;
  }

  .reveal-cards-grid > .card-container .card-back {
    gap: 0.6rem !important;
    padding: 10px !important;
  }

  .reveal-cards-grid > .card-container .card-back-icon {
    font-size: 2.5rem !important;
  }

  .reveal-cards-grid > .card-container .card-back-title {
    font-size: 0.88rem !important;
    letter-spacing: 1px !important;
  }

  .reveal-cards-grid > .card-container .card-back-tap {
    font-size: 0.65rem !important;
  }

  .reveal-bottom-controls {
    gap: 0.4rem;
    margin-top: 0.35rem;
  }

  .reveal-bottom-controls button {
    padding: 0.38rem 0.8rem;
    font-size: 0.78rem;
  }


  /* 9. Tabs 2 & 3: Collection & Catalog Mobile */
  .collection-header,
  #tab-collection .collection-header,
  #tab-catalog .collection-header,
  #admin-subpane-cards .collection-header {
    margin-bottom: 0.5rem !important;
    gap: 0.35rem !important;
  }

  .collection-info h2 {
    font-size: 1.05rem !important;
    font-family: 'Cinzel', serif !important;
    margin: 0 !important;
    letter-spacing: 0.5px !important;
  }

  .collection-info p {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
  }

  .collection-toolbar,
  #tab-collection .collection-toolbar,
  #tab-catalog .collection-toolbar,
  #admin-subpane-cards .collection-toolbar {
    margin-bottom: 0.4rem !important;
    gap: 0.35rem !important;
    width: 100% !important;
  }

  .filter-bar,
  #tab-collection .collection-toolbar .filter-bar,
  #tab-catalog .collection-toolbar .filter-bar,
  #admin-subpane-cards .collection-toolbar .filter-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0.35rem !important;
    padding: 2px 2px 4px 2px !important;
    scrollbar-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
  }

  .filter-bar::-webkit-scrollbar,
  #tab-collection .collection-toolbar .filter-bar::-webkit-scrollbar,
  #tab-catalog .collection-toolbar .filter-bar::-webkit-scrollbar,
  #admin-subpane-cards .collection-toolbar .filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .filter-chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  .collection-search-sort-group,
  #tab-collection .collection-search-sort-group,
  #tab-catalog .collection-search-sort-group,
  #admin-subpane-cards .collection-search-sort-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .collection-search-box-wrapper,
  .teams-search-box-wrapper,
  #tab-collection .collection-search-box-wrapper,
  #tab-catalog .collection-search-box-wrapper,
  #admin-subpane-cards .collection-search-box-wrapper {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .teams-search-box,
  .collection-search-box-wrapper .teams-search-box,
  #tab-collection .collection-search-box-wrapper .teams-search-box,
  #tab-catalog .collection-search-box-wrapper .teams-search-box,
  #admin-subpane-cards .collection-search-box-wrapper .teams-search-box {
    width: 100% !important;
    max-width: 100% !important;
    height: 32px !important;
    box-sizing: border-box !important;
    font-size: 0.78rem !important;
    padding: 0 0.5rem !important;
  }

  .element-sort-bar,
  #tab-collection .element-sort-bar {
    flex: 1 1 calc(50% - 0.25rem) !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .sort-bar,
  #tab-collection .sort-bar,
  #tab-catalog .sort-bar,
  #admin-subpane-cards .sort-bar {
    flex: 1 1 calc(50% - 0.25rem) !important;
    min-width: 0 !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
  }

  .sort-bar .sort-label,
  #tab-collection .sort-label,
  #tab-catalog .sort-label,
  #admin-subpane-cards .sort-label {
    display: none !important;
  }

  .sort-select,
  #tab-collection .sort-select,
  #tab-catalog .sort-select,
  #admin-subpane-cards .sort-select {
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 32px !important;
    font-size: 0.78rem !important;
    padding: 0 0.35rem !important;
    box-sizing: border-box !important;
  }

  .btn-sort-order {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
    justify-items: center;
    width: 100%;
  }

  /* 10. Tab 4: Team Manager Mobile (Reworked Sticky Compact Dock) */
  #tab-teams,
  .teams-manager-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    gap: 0.6rem;
  }

  .teams-header,
  .teams-header-info {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .teams-header {
    margin-bottom: 0.2rem;
  }

  .teams-header-info h2 {
    font-size: 1.05rem !important;
    font-family: 'Cinzel', serif !important;
    margin: 0;
    letter-spacing: 0.5px !important;
  }

  .teams-header-info p {
    display: none;
  }

  .teams-slots-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-bottom: 0.45rem;
    padding: 0;
    overflow: visible;
  }

  .teams-slots-bar::-webkit-scrollbar {
    display: none;
  }

  .team-slot-btn {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 4px 2px;
    border-radius: 6px;
    gap: 1px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .team-slot-btn .slot-top-row {
    font-size: 0.58rem;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 1px;
    box-sizing: border-box;
  }

  .team-slot-btn .slot-number {
    font-weight: 800;
    font-size: 0.60rem;
  }

  .team-slot-btn .slot-btn-cost {
    font-size: 0.50rem;
    padding: 0;
  }

  .team-slot-btn .slot-name {
    font-size: 0.58rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
    text-align: center;
    line-height: 1.1;
  }

  .team-slot-btn .slot-status-pill {
    font-size: 0.48rem;
    padding: 1px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
    border-radius: 3px;
  }


  /* STICKY COMPACT TEAM DOCK */
  .team-editor-box {
    position: sticky;
    top: -4px;
    z-index: 85;
    background: rgba(12, 16, 28, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(250, 204, 21, 0.35);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.55rem;
    gap: 0.4rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
    margin-bottom: 0.6rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .team-editor-top {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-bottom: 0.4rem;
  }

  .team-name-wrapper {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .team-name-label {
    display: none;
  }

  .team-name-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.82rem;
    padding: 0.25rem 0.5rem;
    height: 30px;
    border-radius: 6px;
  }

  .team-editor-actions {
    order: 2;
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
  }

  .team-editor-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    height: 30px;
    border-radius: 6px;
    white-space: nowrap;
  }

  .team-editor-meta {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.4rem;
  }

  .team-cost-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .teams-status-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  /* 3 COMPACT ROSTER SLOTS SIDE-BY-SIDE IN STICKY DOCK */
  .team-roster-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .team-roster-card {
    padding: 0.35rem 0.25rem;
    gap: 0.2rem;
    border-radius: 8px;
    min-width: 0;
    box-sizing: border-box;
    position: relative;
    background: rgba(18, 24, 38, 0.9);
  }

  .team-roster-card .unit-top-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  .team-roster-card .unit-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    object-position: top center;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .team-roster-card .unit-identity {
    width: 100%;
    min-width: 0;
  }

  .team-roster-card .unit-name {
    font-size: 0.65rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
    color: #fff;
  }

  .team-roster-card .unit-meta {
    display: none;
  }

  .team-roster-card .unit-tags-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 1px;
    flex-wrap: wrap;
  }

  .team-roster-card .unit-special-tag {
    font-size: 0.58rem;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1;
  }

  .team-roster-card .unit-passive-tag {
    font-size: 0.58rem;
    padding: 1px 3px;
    border-radius: 3px;
    line-height: 1;
  }

  .team-roster-card .unit-hp-box {
    display: none;
  }

  .team-roster-card .unit-stats-row {
    display: none;
  }

  .team-roster-card .btn-remove-fighter {
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  /* Empty Slot in Sticky Dock */
  .team-roster-card.empty-slot {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.2rem;
    gap: 2px;
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.25);
  }

  .team-roster-card.empty-slot .empty-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin: 0;
  }

  .team-roster-card.empty-slot .empty-title {
    font-size: 0.62rem;
    font-weight: 700;
    margin: 0;
    color: #cbd5e1;
  }

  .team-roster-card.empty-slot .empty-sub {
    display: none;
  }

  /* Compact Synergies in Sticky Dock */
  .team-editor-box .team-synergies-panel {
    margin-bottom: 0;
    gap: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .team-editor-box .synergies-header-bar {
    font-size: 0.65rem;
    padding-bottom: 0;
  }

  .team-editor-box .synergy-tip {
    font-size: 0.65rem;
    padding: 3px 6px;
    gap: 4px;
    line-height: 1.25;
    margin: 0;
  }

  .team-editor-box .synergies-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  .team-editor-box .synergies-list::-webkit-scrollbar {
    display: none;
  }

  .team-editor-box .synergy-chip {
    width: 100%;
    box-sizing: border-box;
    padding: 3px 6px;
    font-size: 0.66rem;
    gap: 4px;
    white-space: normal;
    justify-content: flex-start;
  }

  /* Available Cards Selector on Mobile */
  .teams-cards-selector {
    padding: 0.5rem 0.35rem;
    gap: 0.5rem;
    background: transparent;
    border: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .teams-selector-header {
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .selector-title-row {
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .selector-title h3 {
    font-size: 0.95rem;
    margin: 0;
  }

  .selector-title p {
    display: none;
  }

  .teams-count-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
  }

  .teams-selector-controls {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .teams-filter-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.3rem;
    padding: 2px 2px 5px 2px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .teams-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .teams-filter-bar .filter-chip {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem;
    font-size: 0.72rem;
  }

  .teams-filter-label {
    font-size: 0.72rem;
    margin-right: 2px;
    flex-shrink: 0;
  }

  .teams-search-sort-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .teams-search-box-wrapper {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 32px;
  }

  .teams-search-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 32px;
    font-size: 0.8rem;
  }

  .teams-search-sort-row .element-sort-bar {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    width: auto;
  }

  .teams-search-sort-row .sort-bar {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }

  .teams-search-sort-row .sort-bar .sort-label {
    display: none;
  }

  .teams-search-sort-row .sort-select {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 32px;
    font-size: 0.78rem;
    padding: 0 0.35rem;
  }

  /* Balanced 3-Column Grid for Cards Roster on Mobile */
  .teams-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    padding: 0.2rem 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: transparent;
    border: none;
  }

  @media (min-width: 600px) and (max-width: 900px) {
    .teams-cards-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  .team-pick-thumb {
    border-radius: 7px;
    min-width: 0;
    box-sizing: border-box;
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .team-pick-thumb .pick-thumb-img-wrapper {
    height: 68px;
    position: relative;
    overflow: hidden;
  }

  .team-pick-thumb .pick-thumb-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .team-pick-thumb .pick-thumb-top-badges {
    top: 2px;
    left: 2px;
    right: 2px;
    padding: 0;
  }

  .team-pick-thumb .pick-badge-rank {
    font-size: 0.58rem;
    padding: 1px 4px;
  }

  .team-pick-thumb .pick-badge-cost {
    font-size: 0.56rem;
    padding: 1px 4px;
    bottom: 2px;
    left: 2px;
    letter-spacing: -0.3px;
  }

  .team-pick-thumb .pick-badge-gen {
    font-size: 0.54rem;
    padding: 1px 4px;
    bottom: 2px;
    right: 2px;
  }

  .team-pick-thumb .pick-badge-element {
    font-size: 0.52rem;
    padding: 1px 4px;
  }

  .team-pick-thumb .pick-badge-equipped {
    font-size: 0.52rem;
    padding: 1px 4px;
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team-pick-thumb .pick-thumb-info {
    padding: 0.25rem 0.3rem;
    gap: 0.15rem;
  }

  .team-pick-thumb .pick-thumb-name {
    font-size: 0.65rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
  }

  .team-pick-thumb .pick-thumb-meta {
    font-size: 0.54rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
  }

  .team-pick-thumb .pick-thumb-meta span:first-child {
    max-width: 60px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team-pick-thumb .pick-combat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 2px 2.5px;
    gap: 1.5px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 4px;
  }

  .team-pick-thumb .pick-stat-cell {
    padding: 1px 1.5px;
    font-size: 0.52rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .team-pick-thumb .pick-stat-tag {
    font-size: 0.48rem;
  }

  .team-pick-thumb .pick-stat-val {
    font-size: 0.54rem;
    font-weight: 800;
  }

  .team-pick-thumb .pick-thumb-actions {
    display: flex;
    gap: 2px;
    margin-top: 1px;
  }

  .team-pick-thumb .btn-pick-toggle {
    padding: 3px 2px;
    font-size: 0.58rem;
    font-weight: 800;
    border-radius: 4px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team-pick-thumb .btn-pick-inspect {
    padding: 3px 4px;
    font-size: 0.58rem;
    border-radius: 4px;
    flex: 0 0 auto;
    white-space: nowrap;
  }


  /* 11. Tab 5: 3v3 Arena Mobile (Player & AI Side-by-Side, Log Below, 2x2 Teams Grid) */
  .arena-container {
    gap: 0.85rem;
  }

  .arena-header {
    padding: 0.65rem 0.75rem;
  }

  .arena-header-top h2 {
    font-size: 1.05rem !important;
    font-family: 'Cinzel', serif !important;
    margin: 0;
    letter-spacing: 0.5px !important;
  }

  .arena-header p {
    display: none;
  }

  .arena-tally {
    margin-top: 0.35rem;
    gap: 0.4rem;
    font-size: 0.72rem;
  }

  .arena-battlefield-3v3 {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.5rem 0.35rem;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
  }

  .arena-board {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    min-width: 0;
  }

  .arena-battlefield-3v3 .player-side {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.35rem;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    gap: 0.45rem;
  }

  .arena-battlefield-3v3 .cpu-side {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.35rem;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 8px;
    border: 1px solid rgba(244, 63, 94, 0.3);
    gap: 0.45rem;
  }

  .battle-line-container {
    gap: 0.3rem;
  }

  .battle-line-container.line-front {
    border-left: 2.5px solid #f59e0b;
    padding-left: 0.4rem;
  }

  .battle-line-container.line-back {
    border-left: 2.5px solid #38bdf8;
    padding-left: 0.4rem;
  }

  .battle-line-header {
    padding: 1px 2px;
  }

  .line-badge {
    font-size: 0.68rem;
    gap: 3px;
  }

  .line-hint {
    font-size: 0.6rem;
  }

  .team-slots-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
    flex-wrap: nowrap;
  }

  .team-slots-row .team-fighter-unit {
    flex: 1 1 0;
    max-width: 280px;
    min-width: 0;
  }

  /* When 3 fighters are on the same line on mobile: comfortable 2+1 staggered layout */
  .team-slots-row.has-3-units {
    display: flex;
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 0.45rem;
  }

  .team-slots-row.has-3-units .team-fighter-unit {
    flex: 1 1 calc(50% - 0.25rem) !important;
    max-width: calc(50% - 0.25rem) !important;
    min-width: 140px;
  }

  .team-slots-row.has-3-units .team-fighter-unit:nth-child(3) {
    flex: 0 1 calc(50% - 0.25rem) !important;
    max-width: calc(50% - 0.25rem) !important;
  }

  .empty-line-placeholder {
    min-height: 28px;
    font-size: 0.68rem;
    border-radius: 6px;
  }

  .battle-clash-bar {
    padding: 0.45rem 0.5rem;
    gap: 0.35rem;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
  }

  .arena-battlefield-3v3 .team-header {
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    height: 28px;
    padding: 0 0.45rem;
    box-sizing: border-box;
    flex-wrap: nowrap;
    gap: 3px;
  }

  .arena-battlefield-3v3 .team-badge {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .arena-battlefield-3v3 .team-hp-summary {
    font-size: 0.66rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .arena-battlefield-3v3 .team-slots-grid {
    gap: 0.35rem;
  }

  /* Compact 3v3 Fighter Units on Mobile */
  .arena-battlefield-3v3 .team-fighter-unit {
    padding: 5px 6px;
    gap: 3px;
    border-radius: 8px;
    min-width: 0;
    box-sizing: border-box;
    min-height: 98px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: visible;
  }

  .team-fighter-unit .unit-top-row {
    gap: 5px;
    align-items: center;
  }

  .team-fighter-unit .unit-thumb {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  .team-fighter-unit .unit-name {
    font-size: 0.72rem;
    font-weight: 800;
    padding-right: 22px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .unit-speed-order-badge {
    top: 4px !important;
    right: 4px !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 0.65rem !important;
    border-width: 1.5px !important;
  }

  .stat-val-desktop {
    display: none !important;
  }

  .stat-val-mobile {
    display: inline !important;
  }

  .team-fighter-unit .unit-meta {
    font-size: 0.58rem;
    gap: 3px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.1;
    max-height: 15px;
  }

  .team-fighter-unit .unit-country {
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
  }

  .team-fighter-unit .unit-state-badge {
    font-size: 0.50rem;
    font-weight: 800;
    padding: 0 4px;
    line-height: 1.1;
    border-radius: 3px;
    flex-shrink: 0;
  }

  .team-fighter-unit .badge-ko {
    font-size: 0.50rem;
    font-weight: 900;
    padding: 0 4px;
    line-height: 1.1;
    letter-spacing: -0.2px;
    border-width: 1px;
    flex-shrink: 0;
    background: rgba(239, 68, 68, 0.35);
  }

  .team-fighter-unit .badge-frozen,
  .team-fighter-unit .badge-guard {
    font-size: 0.50rem;
    padding: 0 4px;
    line-height: 1.1;
    flex-shrink: 0;
  }

  .team-fighter-unit .unit-hp-box {
    gap: 2px;
    display: flex;
    flex-direction: column;
  }

  .team-fighter-unit .unit-hp-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.60rem;
    color: var(--text-muted);
    font-weight: 600;
  }

  .team-fighter-unit .unit-hp-bar {
    height: 7px;
  }

  .team-fighter-unit .unit-hp-text {
    font-size: 0.60rem;
  }

  .team-fighter-unit .unit-stats-row {
    font-size: 0.58rem;
    gap: 2px;
    padding: 2px 3px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
  }

  .team-fighter-unit .u-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .team-fighter-unit .u-stat-tag {
    font-size: 0.58rem;
    line-height: 1;
  }

  .team-fighter-unit .u-stat-val {
    font-weight: 700;
  }

  .team-fighter-unit .unit-tags-row {
    gap: 3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .team-fighter-unit .unit-special-tag,
  .team-fighter-unit .unit-passive-tag {
    font-size: 0.54rem;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.1;
  }

  .team-fighter-unit .unit-protected-tag {
    font-size: 0.54rem;
    padding: 1px 4px;
    border-radius: 3px;
  }

  .team-fighter-unit .unit-thumb-wrapper {
    width: 34px;
    height: 34px;
  }

  .team-fighter-unit .unit-thumb-aura-badge {
    width: 14px;
    height: 14px;
    font-size: 0.52rem;
    bottom: -2px;
    right: -2px;
  }

  .arena-battlefield-3v3 .team-fighter-unit.empty-slot {
    min-height: 98px;
    height: 98px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    font-size: 0.68rem;
    gap: 2px;
  }

  .battle-phase-indicator {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
  }

  .battle-main-controls {
    width: 100%;
  }

  .battle-main-controls button {
    width: 100%;
    padding: 0.55rem;
    font-size: 0.85rem;
  }

  .btn-toggle-line {
    padding: 4px 6px;
    font-size: 0.64rem;
    font-weight: 700;
    gap: 4px;
    margin-top: 3px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
  }

  .battle-log-container {
    height: 220px;
    max-height: 280px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.2rem;
  }

  .battle-log-content {
    font-size: 0.70rem;
    padding: 0.35rem 0.5rem;
  }

  /* 2x2 Arena Team Picker Grid */
  .arena-teams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
    width: 100%;
    box-sizing: border-box;
  }

  .arena-team-card {
    padding: 0.4rem 0.35rem;
    min-width: 0;
    box-sizing: border-box;
    border-radius: 8px;
    gap: 4px;
  }

  .arena-team-card .arena-team-header {
    gap: 2px;
  }

  .arena-team-card .arena-team-title {
    font-size: 0.72rem;
  }

  .arena-team-card .arena-team-meta {
    font-size: 0.60rem;
  }

  .arena-team-card .mini-roster-slots,
  .arena-team-card .team-fighters-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
  }

  .arena-team-card .mini-fighter-slot {
    width: 100%;
    min-width: 0;
    height: auto;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 1px;
    box-sizing: border-box;
  }

  .arena-team-card .mini-fighter-slot img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
  }

  .arena-team-card .mini-fighter-slot .mini-fighter-name {
    display: block !important;
    font-size: 0.52rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    line-height: 1.15 !important;
    margin-top: 2px !important;
  }

  .arena-team-card .mini-fighter-slot .mini-fighter-meta {
    display: block !important;
    font-size: 0.48rem !important;
    color: var(--text-muted) !important;
    text-align: center !important;
    line-height: 1 !important;
  }

  .arena-team-card .mini-fighter-slot.empty-mini {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.52rem;
  }

  .arena-team-card .btn-select-arena-team {
    font-size: 0.66rem;
    padding: 3px 6px;
  }

  .arena-picker-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .arena-picker-header .picker-info h3 {
    font-size: 0.85rem;
    margin: 0;
  }

  .arena-picker-header .picker-info p {
    display: none;
  }

  .picker-actions button {
    width: 100%;
    font-size: 0.72rem;
    padding: 0.35rem;
  }

  /* 12. Tab 6: Quests Mobile (Condensed Ultra-Compact Space Optimization) */
  .quests-page-container {
    gap: 0.65rem;
  }

  .quests-header {
    padding: 0.45rem 0.65rem !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    border-radius: 10px;
  }

  .quests-title-group h2 {
    font-size: 1.05rem !important;
    font-family: 'Cinzel', serif !important;
    margin: 0;
    letter-spacing: 0.5px !important;
  }

  .quests-title-group p {
    display: none;
  }

  .quests-reset-timer-chip {
    padding: 3px 8px;
    font-size: 0.68rem;
  }

  .streak-calendar-card {
    padding: 0.7rem 0.5rem;
    gap: 0.6rem;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .streak-calendar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-bottom: 0;
  }

  .streak-icon-box {
    font-size: 1.4rem;
    padding: 4px 6px;
    border-radius: 8px;
  }

  .streak-title-box {
    gap: 8px;
  }

  .streak-title-box h3 {
    font-size: 0.95rem;
    margin: 0;
  }

  .streak-title-box p {
    display: none;
  }

  /* Grille 7 jours 100% harmonieuse et 100% visible sans débordement */
  .streak-days-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .streak-day-card {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 84px !important;
    max-height: 96px !important;
    padding: 6px 2px !important;
    gap: 3px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  .streak-day-number {
    font-size: 0.60rem !important;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .streak-day-reward {
    margin: 1px 0 !important;
    gap: 0 !important;
  }

  .streak-reward-icon {
    font-size: 1rem !important;
  }

  .streak-reward-num {
    font-size: 0.74rem !important;
    font-weight: 900 !important;
  }

  /* Sur mobile, masquer le texte du statut pour ne garder que le symbole à gauche (✓, 🔒, 🎁) */
  .streak-day-status .status-text {
    display: none !important;
  }

  .status-claimed-badge {
    font-size: 0.72rem !important;
    padding: 2px 6px !important;
    border-radius: 999px !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }

  .status-locked-badge {
    font-size: 0.72rem !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.75 !important;
    line-height: 1 !important;
  }

  .btn-claim-streak-inline {
    font-size: 0.82rem !important;
    padding: 2px 4px !important;
    border-radius: 6px !important;
    width: auto !important;
    min-width: 24px !important;
    max-width: 92% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
  }

  /* Grand Coffre Quotidien ultra-compact sur smartphone */
  .daily-chest-banner {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    padding: 0.5rem 0.65rem !important;
    border-radius: 10px !important;
    margin: 0.2rem 0 !important;
    box-sizing: border-box !important;
  }

  .chest-banner-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .chest-icon-wrapper {
    font-size: 1.6rem !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
  }

  .chest-banner-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .chest-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    margin-bottom: 2px !important;
  }

  .chest-banner-info h3 {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .chest-badge-status {
    font-size: 0.60rem !important;
    font-weight: 800 !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Masquer le paragraphe descriptif pour diviser par deux la hauteur du coffre sur mobile */
  .chest-banner-info p {
    display: none !important;
  }

  .chest-progress-bar-container {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 2px !important;
    width: 100% !important;
  }

  .chest-progress-track {
    flex: 1 !important;
    height: 7px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .chest-progress-fill {
    display: block !important;
    height: 100% !important;
    background: linear-gradient(90deg, #f59e0b, #facc15) !important;
    border-radius: 999px !important;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6) !important;
  }

  .daily-chest-banner.chest-ready .chest-progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8) !important;
  }

  .daily-chest-banner.chest-completed .chest-progress-fill {
    background: linear-gradient(90deg, #64748b, #94a3b8) !important;
    box-shadow: none !important;
  }

  .chest-progress-label {
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    color: #cbd5e1 !important;
    white-space: nowrap !important;
  }

  .chest-banner-right {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 1px !important;
    padding-top: 3px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  .chest-rewards-pill {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .chest-rewards-pill .reward-pill {
    font-size: 0.66rem !important;
    font-weight: 800 !important;
    padding: 2px 5px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
  }

  .chest-banner-right button {
    flex: 1 !important;
    max-width: 160px !important;
    width: auto !important;
    padding: 3px 8px !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    height: 26px !important;
    border-radius: 6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .daily-quests-section-header {
    margin-top: 0.35rem !important;
  }

  .daily-quests-section-header h3 {
    font-size: 0.95rem !important;
  }

  .daily-quests-list,
  .weekly-quests-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quest-card {
    padding: 9px 12px;
    gap: 8px;
    border-radius: 10px;
  }

  .quest-icon-circle {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .quest-card-title {
    font-size: 0.88rem;
  }

  .quest-card-desc {
    font-size: 0.78rem;
  }

  .quest-header-action .btn-claim-reward {
    padding: 4px 10px;
    font-size: 0.76rem;
  }

  .quest-header-action .badge-status-claimed {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  .ach-summary-banner {
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
  }

  .ach-summary-stats {
    width: 100%;
    justify-content: space-between;
  }

  .ach-filters-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 0.35rem;
  }

  .ach-filters-row::-webkit-scrollbar {
    display: none;
  }

  .ach-filter-chip {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.25rem 0.55rem;
    font-size: 0.70rem;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ach-card {
    padding: 12px 14px;
    gap: 8px;
    border-radius: 12px;
  }

  .ach-icon-circle {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }

  .ach-card-title {
    font-size: 0.88rem;
  }

  .ach-card-desc {
    font-size: 0.78rem;
  }

  .ach-header-action .btn-claim-ach {
    padding: 4px 10px;
    font-size: 0.76rem;
  }

  /* 13. Modals on Mobile (Bottom Sheet UX) */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-inspect-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem 1rem calc(20px + env(safe-area-inset-bottom, 0px)) 1rem;
  }

  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }

  .modal-card-display {
    width: 100%;
  }

  .modal-card-display .card-container {
    width: min(240px, calc(100vw - 48px)) !important;
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
  }

  .modal-card-actions {
    max-width: 100%;
    width: 100%;
  }

  .modal-bio-header h2 {
    font-size: 1.45rem;
  }

  .modal-stats-list {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .tester-qc-box {
    margin-top: 0.5rem;
    padding: 0.75rem;
  }

  .qc-control-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .qc-btn-group {
    width: 100%;
  }

  .qc-btn-group .btn-qc {
    flex: 1;
    text-align: center;
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .ad-modal-dialog,
  .thematic-dialog,
  .diamond-store-modal-dialog,
  .arena-help-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    margin: 0;
  }

  .thematic-elements-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  #btn-confirm-thematic-pack {
    font-size: 0.92rem !important;
    padding: 0.75rem 0.6rem !important;
    gap: 0.35rem 0.5rem !important;
  }

  .thematic-btn-main-label {
    white-space: normal !important;
    text-align: center;
    line-height: 1.25;
  }

  .thematic-btn-price-badge {
    font-size: 0.88rem !important;
    padding: 2px 10px !important;
  }

  .synergy-subtabs-nav {
    gap: 0.3rem;
    padding: 3px;
  }

  .synergy-subtab-btn {
    font-size: 0.72rem;
    padding: 0.4rem 0.45rem;
  }
}

/* Smartphones and small screens (width <= 600px) */
@media (max-width: 600px) {
  .collection-header {
    margin-bottom: 0.45rem !important;
    gap: 0.35rem !important;
  }

  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    justify-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .card-container {
    width: min(250px, calc(100vw - 32px));
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
  }

  .collection-grid .card-container {
    width: 100% !important;
    max-width: 168px !important;
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
  }

  .collection-grid .card-face {
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .collection-grid .card-top-bar {
    height: 22px !important;
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
  }

  .collection-grid .card-name-title {
    font-size: 0.68rem !important;
  }

  .collection-grid .card-stars-badge {
    font-size: 0.68rem !important;
    padding: 1px 3px !important;
  }

  .collection-grid .card-img-wrapper {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 115px !important;
    border-radius: 6px !important;
  }

  .collection-grid .card-country-flag {
    font-size: 0.58rem !important;
    padding: 1px 3px !important;
    bottom: 3px !important;
    right: 3px !important;
    top: auto !important;
    left: auto !important;
  }

  .collection-grid .card-fav-btn {
    top: 3px !important;
    right: 3px !important;
    width: 22px !important;
    height: 22px !important;
  }

  .collection-grid .card-fav-btn .card-fav-icon {
    width: 12px !important;
    height: 12px !important;
  }

  .collection-grid .card-combat-grid {
    gap: 1.5px !important;
    padding: 2px 3px !important;
    margin-top: 2px !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
  }

  .collection-grid .combat-stat-cell {
    font-size: 0.55rem !important;
  }

  .collection-grid .stat-tag {
    font-size: 0.52rem !important;
  }

  .collection-grid .stat-number {
    font-size: 0.62rem !important;
  }

  .collection-grid .card-bottom-bar {
    height: 20px !important;
    margin-top: 2px !important;
    padding: 0 4px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }

  .collection-grid .card-bottom-element-icon {
    font-size: 0.75rem !important;
    min-width: 16px !important;
  }

  .collection-grid .card-bottom-number {
    font-size: 0.60rem !important;
    letter-spacing: 0.4px !important;
  }

  .collection-grid .card-bottom-rank.modal-rank-text {
    font-size: 0.85rem !important;
    min-width: 16px !important;
  }

  .collection-grid .card-bio-snippet {
    display: none !important;
  }

  .collection-grid .card-count-badge {
    bottom: 4px !important;
    right: 4px !important;
    font-size: 0.62rem !important;
    padding: 1px 4px !important;
  }

  .teams-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }
}


/* Mobile landscape (height <= 520px) */
@media (max-height: 520px) and (orientation: landscape) {
  .app-sidebar {
    padding: 0.25rem 0.6rem 0.2rem;
    gap: 0.2rem;
  }
  .top-currency-widget {
    padding: 0.2rem 0.4rem;
  }
  .sidebar-nav {
    min-height: 44px;
    padding: 2px 4px;
  }
  .sidebar-nav .nav-tab {
    padding: 2px;
  }
  .sidebar-nav .nav-tab .tab-icon {
    font-size: 1rem;
  }
  .sidebar-nav .nav-tab .tab-label-short {
    font-size: 0.58rem;
  }
  .main-content {
    padding-bottom: 52px;
  }
}

/* =============================================================================
   TAB 6 : QUÊTES JOURNALIÈRES & SUCCÈS (TCG ACHIEVEMENTS ENGINE)
   ============================================================================= */

.quest-alert-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  border: 1px solid #f87171;
}

.quests-page-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* HEADER EN-TÊTE */
.quests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.quests-title-group h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  margin: 0 0 6px 0;
  background: linear-gradient(90deg, #facc15, #fef08a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.quests-title-group p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
}

.quests-reset-timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.15);
}

.quests-reset-timer-chip strong {
  color: #facc15;
  font-family: monospace;
  font-size: 0.95rem;
}

/* SOUS-NAVIGATION DES ONGLETS */
.quests-subnav {
  display: flex;
  gap: 12px;
}

.quest-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.quest-subnav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.quest-subnav-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border-color: #f59e0b;
  color: #fff;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.3);
}

.subnav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

/* ==================== VUE 1 : QUÊTES JOURNALIÈRES ==================== */

/* ==================== VUE 1 : GRAND COFFRE QUOTIDIEN (DESKTOP & COMMUN) ==================== */

@keyframes wobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.08); }
  75% { transform: rotate(8deg) scale(1.08); }
}

.daily-chest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 20px 26px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.daily-chest-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
}

.daily-chest-banner.chest-ready,
.daily-chest-banner.claimable {
  border-color: #facc15;
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.35), 0 10px 25px rgba(0, 0, 0, 0.5);
}

.daily-chest-banner.chest-completed,
.daily-chest-banner.claimed {
  opacity: 0.85;
  border-color: rgba(51, 65, 85, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.chest-banner-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.chest-icon-wrapper {
  font-size: 3rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 70%, transparent 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  filter: drop-shadow(0 0 14px rgba(250, 204, 21, 0.4));
  transition: transform 0.3s ease;
}

.daily-chest-banner.chest-ready .chest-icon-wrapper,
.chest-icon-wrapper.wobble {
  animation: wobble 2s infinite ease-in-out;
  border-color: #facc15;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.3) 0%, rgba(245, 158, 11, 0.1) 70%, transparent 100%);
}

.chest-banner-info {
  flex: 1;
  min-width: 0;
}

.chest-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.chest-header-row h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.5px;
}

.chest-badge-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  white-space: nowrap;
}

.daily-chest-banner.chest-ready .chest-badge-status {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.5);
}

.daily-chest-banner.chest-completed .chest-badge-status {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.4);
}

.chest-banner-info p {
  color: #94a3b8;
  font-size: 0.86rem;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

/* Barre de progression Grand Coffre Desktop & Commun */
.chest-progress-bar-container,
.chest-progress-group {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  margin-top: 4px;
}

.chest-progress-track,
.chest-progress-bar-outer {
  flex: 1;
  height: 9px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.chest-progress-fill,
.chest-progress-bar-inner {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #facc15);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.daily-chest-banner.chest-ready .chest-progress-fill,
.daily-chest-banner.claimable .chest-progress-bar-inner {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}

.daily-chest-banner.chest-completed .chest-progress-fill,
.daily-chest-banner.claimed .chest-progress-bar-inner {
  background: linear-gradient(90deg, #64748b, #94a3b8);
  box-shadow: none;
}

.chest-progress-label,
.chest-progress-text {
  font-size: 0.82rem;
  font-weight: 800;
  color: #cbd5e1;
  white-space: nowrap;
}

/* Zone Droite : Récompenses & Bouton */
.chest-banner-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.chest-rewards-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chest-rewards-pill .reward-pill {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reward-pill.pill-coins {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.reward-pill.pill-diamonds {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

/* Bouton du Grand Coffre */
.btn-claim-chest,
.btn-claim-action {
  font-size: 0.95rem;
  font-weight: 900;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-claim-chest.pulse-glow,
.btn-claim-action {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.55);
}

.btn-claim-chest.pulse-glow:hover,
.btn-claim-action:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.75);
}

.btn-claim-chest.btn-locked,
.btn-progress-state {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: not-allowed;
  opacity: 0.75;
}

.btn-claim-chest.btn-claimed,
.btn-claimed-state {
  background: #334155;
  color: #94a3b8;
  cursor: default;
  opacity: 0.8;
}

/* LISTE DES QUÊTES DU JOUR & DÉFIS HEBDOMADAIRES (GRILLE OPTIMISÉE TYPE SUCCÈS) */
.daily-quests-list,
.weekly-quests-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.quest-card {
  background: rgba(18, 21, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
}

.quest-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.quest-card.quest-complete {
  border: 1.5px solid #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(18, 21, 32, 0.95) 100%);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.25);
}

.quest-card.weekly-quest-card.quest-complete {
  border: 1.5px solid #facc15;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.08) 0%, rgba(18, 21, 32, 0.95) 100%);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.25);
}

.quest-card.quest-claimed {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.04);
}

.quest-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.quest-header-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quest-type-pill {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  display: inline-block;
  align-self: flex-start;
  letter-spacing: 0.3px;
}

.quest-type-pill.pill-weekly {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.quest-card-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quest-header-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quest-rewards-pills {
  display: flex;
  gap: 4px;
}

.reward-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.reward-pill.pill-coins {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.reward-pill.pill-diamonds {
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.quest-card-desc {
  font-size: 0.80rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quest-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.quest-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.quest-card.quest-complete .quest-progress-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.quest-card.weekly-quest-card.quest-complete .quest-progress-fill {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.quest-progress-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 40px;
  text-align: right;
  white-space: nowrap;
}

.btn-claim-reward {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.80rem;
  padding: 5px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-claim-reward.btn-weekly-claim {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.45);
}

.btn-claim-reward:hover {
  transform: scale(1.05);
}

.badge-status-claimed {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  white-space: nowrap;
}

.badge-status-ongoing {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  white-space: nowrap;
}

/* ==================== 1. CALENDRIER DE CONNEXION CONSÉCUTIVE (7 JOURS) ==================== */

.streak-calendar-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}

.streak-calendar-card.streak-ready-today {
  border-color: #facc15;
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.25);
}

.streak-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.streak-title-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.streak-icon-box {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  border-radius: 12px;
}

.streak-title-box h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 4px 0;
}

.streak-title-box p {
  color: #94a3b8;
  font-size: 0.88rem;
  margin: 0;
}

.streak-missed-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grille des 7 jours */
.streak-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.streak-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
  text-align: center;
  min-height: 120px;
  min-width: 0;
  box-sizing: border-box;
}

.streak-day-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Paliers et Jackpot */
.streak-day-card.day-milestone {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.streak-day-card.day-jackpot {
  border-color: rgba(250, 204, 21, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.08) 100%);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.15);
}

/* États du jour */
.streak-day-card.day-claimed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.06) 100%);
  border-color: #22c55e;
}

.streak-day-card.day-today-done {
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

.streak-day-card.day-active {
  border-color: #facc15;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.15) 0%, rgba(30, 27, 75, 0.9) 100%);
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.35);
  transform: scale(1.02);
}

.streak-day-card.day-upcoming {
  opacity: 0.65;
}

.streak-day-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.streak-day-number {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #cbd5e1;
}

.streak-day-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 4px 0;
}

.streak-reward-icon {
  font-size: 1.5rem;
}

.streak-reward-num {
  font-size: 0.95rem;
  font-weight: 900;
  color: #67e8f9;
}

.day-jackpot .streak-reward-num {
  font-size: 1.15rem;
  color: #fef08a;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.streak-day-status {
  width: 100%;
  display: flex;
  justify-content: center;
}

.status-claimed-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.status-locked-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-claim-streak-inline {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-claim-streak-inline:hover {
  transform: scale(1.05);
}

/* En-tête de section des 4 Quêtes Quotidiennes */
.daily-quests-section-header {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.daily-quests-section-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.5px;
}


/* ==================== FLOATING TOAST NOTIFICATIONS ==================== */

.quest-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.quest-toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(25px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  max-width: 380px;
}

.quest-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.quest-toast-success {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.quest-toast-gold {
  border-color: #facc15;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.35);
}

.toast-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2px;
}

.toast-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* PULSE ANIMATIONS */
@keyframes pulseGreenBorder {
  0% { box-shadow: 0 0 8px rgba(34, 197, 94, 0.2); }
  100% { box-shadow: 0 0 18px rgba(34, 197, 94, 0.5); }
}

@keyframes pulseGoldBorder {
  0% { box-shadow: 0 0 8px rgba(250, 204, 21, 0.2); }
  100% { box-shadow: 0 0 20px rgba(250, 204, 21, 0.55); }
}

.pulse-green-border {
  animation: pulseGreenBorder 1.8s infinite alternate;
}

.pulse-gold-border {
  animation: pulseGoldBorder 1.8s infinite alternate;
}

/* ==========================================================================
   ARENA RULES & SYNERGIES MODAL STYLING
   ========================================================================== */
.arena-help-dialog {
  max-width: 780px;
  width: 94%;
  max-height: 90vh;
  background: #0f1526;
  border: 1px solid rgba(250, 204, 21, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(250, 204, 21, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.arena-help-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
  padding: 1.5rem;
  overflow-y: auto;
  gap: 1.2rem;
}

.arena-help-header h3 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.arena-help-header p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

/* TABS */
.arena-help-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.arena-help-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.arena-help-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.arena-help-tab.active {
  background: rgba(250, 204, 21, 0.15);
  border-color: #facc15;
  color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

/* PANES */
.arena-help-pane {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
  animation: fadeIn 0.25s ease;
}

.arena-help-pane.active {
  display: flex;
}

.help-section-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.help-section-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.help-section-box p {
  font-size: 0.83rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}

.help-tip-text {
  font-size: 0.78rem !important;
  color: #facc15 !important;
  background: rgba(250, 204, 21, 0.08);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #facc15;
}

.speed-badges-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.4rem 0;
}

.legend-badge-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.mini-ranks-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stats-help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (max-width: 600px) {
  .stats-help-grid { grid-template-columns: 1fr; }
}

.stat-help-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-help-card .sh-icon {
  font-size: 1.1rem;
}

.stat-help-card strong {
  font-size: 0.84rem;
  color: #fff;
}

.stat-help-card span {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* REACTIONS GRID */
.pane-intro-text {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.45;
}

.reactions-help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (max-width: 650px) {
  .reactions-help-grid { grid-template-columns: 1fr; }
}

.reaction-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s;
}

.reaction-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.rc-header {
  font-size: 0.85rem;
  color: #f8fafc;
}

.rc-header strong {
  color: #facc15;
}

.rc-desc {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.4;
}

.react-evap { border-left: 3px solid #ef4444; }
.react-melt { border-left: 3px solid #38bdf8; }
.react-overload { border-left: 3px solid #a855f7; }
.react-burn { border-left: 3px solid #f97316; }
.react-freeze { border-left: 3px solid #06b6d4; }
.react-electro { border-left: 3px solid #c084fc; }
.react-bloom { border-left: 3px solid #84cc16; }
.react-aggravate { border-left: 3px solid #eab308; }
.react-swirl { border-left: 3px solid #10b981; }
.react-cryst { border-left: 3px solid #f59e0b; }

/* SYNERGIES GRID */
.synergies-help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (max-width: 650px) {
  .synergies-help-grid { grid-template-columns: 1fr; }
}

.synergy-help-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sc-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.sc-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.sc-effect {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.rainbow-synergy {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.05);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.1);
}

/* SYNERGIES SUB-TABS NAVIGATION */
.synergy-subtabs-nav {
  display: flex;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.65);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0.25rem 0 0.6rem 0;
  overflow-x: auto;
}

.synergy-subtab-btn {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.synergy-subtab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.synergy-subtab-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.synergy-subpane {
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  animation: fadeIn 0.2s ease;
}

.synergy-subpane.active {
  display: flex;
}

.arena-help-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

/* MOBILE RESPONSIVE ERGONOMICS FOR ARENA RULES & SYNERGIES GUIDE */
@media (max-width: 768px) {
  .arena-help-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    max-height: 94dvh !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    margin: 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }

  .arena-help-modal-content {
    padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) 0.85rem !important;
    gap: 0.75rem !important;
  }

  .arena-help-header h3 {
    font-size: 1.05rem !important;
    padding-right: 38px !important;
    line-height: 1.25 !important;
    margin-bottom: 0.2rem !important;
  }

  .arena-help-header p {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
    color: #94a3b8 !important;
  }

  .arena-help-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.3rem !important;
    padding-bottom: 0.35rem !important;
    overflow-x: visible !important;
  }

  .arena-help-tab {
    font-size: 0.72rem !important;
    padding: 0.5rem 0.2rem !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
  }

  .synergy-subtabs-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.25rem !important;
    padding: 3px !important;
    margin: 0.15rem 0 0.4rem 0 !important;
    overflow-x: visible !important;
  }

  .synergy-subtab-btn {
    font-size: 0.68rem !important;
    padding: 0.45rem 0.2rem !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 34px !important;
  }

  .help-section-box {
    padding: 0.65rem 0.75rem !important;
    gap: 0.35rem !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
  }

  .help-section-box h4 {
    font-size: 0.88rem !important;
  }

  .help-section-box p {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
  }

  .speed-badges-legend {
    gap: 0.4rem !important;
    margin: 0.25rem 0 !important;
  }

  .legend-badge-item {
    font-size: 0.75rem !important;
    gap: 0.45rem !important;
    line-height: 1.3 !important;
  }

  .stats-help-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.45rem !important;
  }

  .stat-help-card {
    padding: 0.5rem 0.6rem !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .stat-help-card strong {
    font-size: 0.80rem !important;
  }

  .stat-help-card span {
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
  }

  .reactions-help-grid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
  }

  .reaction-card {
    padding: 0.55rem 0.75rem !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    gap: 2px !important;
  }

  .rc-header {
    font-size: 0.82rem !important;
  }

  .rc-desc {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
  }

  .synergies-help-grid {
    grid-template-columns: 1fr !important;
    gap: 0.45rem !important;
  }

  .synergy-help-card {
    padding: 0.6rem 0.75rem !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    gap: 2px !important;
  }

  .sc-badge {
    font-size: 0.64rem !important;
    padding: 2px 6px !important;
  }

  .sc-title {
    font-size: 0.84rem !important;
  }

  .sc-effect {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
  }

  .arena-help-footer {
    padding-top: 0.35rem !important;
  }

  .arena-help-footer .btn {
    width: 100% !important;
    font-size: 0.85rem !important;
    padding: 0.55rem 1rem !important;
  }
}

/* =============================================================================
   ACCOUNT MODE SWITCHER & TESTER CONTROL SPACE
   ============================================================================= */

.account-mode-switcher {
  margin: 0.2rem 0 1rem 0;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.account-mode-switcher.mode-player-active {
  border-color: rgba(16, 185, 129, 0.3);
}

.account-mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.account-mode-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.account-mode-indicator {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  transition: all 0.25s ease;
}

.account-mode-indicator.indicator-player {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.account-switch-control {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.account-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.4rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.account-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.account-switch-btn.active#btn-mode-tester,
.settings-profile-btn.active[data-mode="tester"] {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.45));
  border: 1px solid #f59e0b;
  color: #fef3c7;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.account-switch-btn.active#btn-mode-player,
.settings-profile-btn.active[data-mode="player"] {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.45));
  border: 1px solid #10b981;
  color: #d1fae5;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.account-switch-btn.active#btn-mode-admin,
.settings-profile-btn.active[data-mode="admin"] {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(185, 28, 28, 0.45));
  border: 1px solid #ef4444;
  color: #fee2e2;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

/* Grille sélecteur profil dans les paramètres */
.settings-profile-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.settings-profile-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text-color);
}

.settings-profile-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.settings-profile-btn .profile-btn-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.settings-profile-btn .profile-btn-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-profile-btn .profile-btn-meta strong {
  font-size: 0.92rem;
  color: #fff;
}

.settings-profile-btn .profile-btn-meta small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tester-only-badge {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  color: #fde68a;
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.badge-tester-pill {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  vertical-align: middle;
}

.filter-chip-new {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.filter-chip-new:hover, .filter-chip-new.active {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.tester-qc-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tester-qc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
}

.tester-qc-details {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tester-qc-details span {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-toggle-verify {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #6ee7b7;
  transition: all 0.2s ease;
}

.btn-toggle-verify:hover {
  background: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* 4-BUTTON QC SYSTEM */
.tester-qc-controls {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.25rem 0;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.qc-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.qc-control-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.qc-btn-group {
  display: flex;
  gap: 0.4rem;
}

.btn-qc {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-qc-ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.btn-qc-ok:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #ffffff;
}

.btn-qc-ok.active {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.btn-qc-nok {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-qc-nok:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

.btn-qc-nok.active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

.qc-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

.qc-status-pill.status-verified {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid #10b981;
  color: #34d399;
}

.qc-status-pill.status-rejected {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #f87171;
}

.qc-status-pill.status-in-progress {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.qc-status-pill.status-standby {
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid #6366f1;
  color: #a5b4fc;
}

.qc-status-pill.status-deactivated {
  background: rgba(100, 116, 139, 0.3);
  border: 1px solid #64748b;
  color: #cbd5e1;
}

/* QC STATUS CONTROLS (ACTIVE / STANDBY / DÉSACTIVER) */
.qc-status-control-row {
  margin-top: 0.2rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.qc-status-btn-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.btn-qc-status {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-status-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}
.btn-status-active:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #ffffff;
}
.btn-status-active.active {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.btn-status-standby {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}
.btn-status-standby:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #ffffff;
}
.btn-status-standby.active {
  background: #6366f1;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.btn-status-deactivate {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.btn-status-deactivate:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}
.btn-status-deactivate.active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

/* MODAL BIO LANGUAGE SWITCHER & WRAPPER */
.modal-bio-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-bio-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.bio-lang-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.6);
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-bio-lang {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-bio-lang:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.btn-bio-lang.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.modal-bio-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.card-deactivated-tag.card-tag-standby {
  background: rgba(99, 102, 241, 0.9) !important;
  color: #ffffff !important;
}
.card-deactivated-tag.card-tag-perm {
  background: rgba(239, 68, 68, 0.9) !important;
  color: #ffffff !important;
}

/* =============================================================================
   ESPACE UTILISATEURS & AUTHENTIFICATION MULTI-COMPTES (ADMIN / JOUEURS)
   ============================================================================= */

.account-user-card {
  margin-bottom: 0.45rem;
  cursor: pointer;
  user-select: none;
}

.account-user-card:hover .user-info-row {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(250, 204, 21, 0.35);
  transform: translateY(-1px);
}

.user-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.user-avatar-badge {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-text-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-display-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  width: fit-content;
}

.user-role-badge.role-admin {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
}

.user-role-badge.role-player {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.user-role-badge.role-guest {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.user-action-btns {
  display: flex;
  gap: 0.25rem;
}

.user-btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.user-btn-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

/* Modals Auth & Settings */
.auth-modal-card {
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 440px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  animation: modalPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f8fafc;
  box-sizing: border-box;
}

.settings-modal-card {
  max-width: 480px;
  border-color: rgba(56, 189, 248, 0.3);
}

.game-confirm-modal-card {
  max-width: 480px;
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 158, 11, 0.15);
}

.confirm-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #f1f5f9;
}

.confirm-info-box strong {
  color: #38bdf8;
}

.confirm-info-box .confirm-price-gold {
  color: #facc15;
  font-weight: 800;
}

.confirm-sub-box {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-modal-title h3 {
  font-size: 1.15rem;
  margin: 0;
  color: #f1f5f9;
}

.auth-tabs-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: #1e293b;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-form-container .form-group {
  margin-bottom: 0.9rem;
}

.auth-form-container label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: all 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.auth-submit-btn {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: 6px;
  margin-top: 0.6rem;
  cursor: pointer;
}

.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-separator span {
  padding: 0 0.75rem;
}

.auth-welcome-gift-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.78rem;
  color: #a7f3d0;
  margin-bottom: 0.75rem;
}

.auth-guest-section {
  margin-top: 0.5rem;
  text-align: center;
}

.auth-guest-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-guest-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.auth-guest-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.45rem;
  margin-bottom: 0;
  line-height: 1.35;
}

.auth-status-message,
.settings-status-message {
  padding: 0.5rem;
  font-size: 0.8rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  display: none;
}

.auth-status-message.error,
.settings-status-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.auth-status-message.success,
.settings-status-message.success {
  display: block;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #6ee7b7;
}

.auth-status-message.info,
.settings-status-message.info {
  display: block;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid #38bdf8;
  color: #bae6fd;
}

/* Paramètres & Wi-Fi Modal */
.settings-profile-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}

.profile-field .field-label {
  color: var(--text-muted);
}

.profile-field .badge-role {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.settings-wifi-section {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.settings-wifi-section h4 {
  margin: 0 0 0.4rem 0;
  font-size: 0.95rem;
  color: #38bdf8;
}

.wifi-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
}

.wifi-link-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 0.75rem;
}

.wifi-link {
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  word-break: break-all;
}

.wifi-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.wifi-qr-image {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.qr-caption {
  font-size: 0.68rem;
  color: #cbd5e1;
}

/* PWA Mobile App Install box in Settings */
.pwa-install-box {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.25), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pwa-install-title {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pwa-install-desc {
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.pwa-install-desc strong {
  color: #facc15;
}

.btn-install-pwa {
  margin-top: 0.25rem;
  align-self: flex-start;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.pwa-install-tip {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #facc15;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  line-height: 1.45;
  margin-top: 0.35rem;
}

.pwa-install-tip code {
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.8);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.settings-password-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.settings-password-section h4 {
  margin: 0 0 0.6rem 0;
  font-size: 0.9rem;
  color: #f1f5f9;
}

/* ==========================================================================
   SETTINGS TAB (PARAMÈTRES & OPTIONS)
   ========================================================================== */
.settings-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.5rem 0 3.5rem 0;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.settings-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #facc15, #38bdf8, transparent);
}

.settings-header-icon {
  font-size: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.18);
  flex-shrink: 0;
}

.settings-header-text h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.8px;
  margin: 0 0 0.35rem 0;
  background: linear-gradient(135deg, #ffffff 40%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.settings-header-text p {
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.settings-card {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.settings-card:hover {
  border-color: rgba(250, 204, 21, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.settings-card.settings-card-wide {
  grid-column: 1 / -1;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.4rem;
  background: rgba(30, 41, 59, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-card-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.settings-card-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.15rem 0;
  letter-spacing: 0.5px;
}

.settings-card-header p {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

.settings-card-body {
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

/* Rows inside settings card */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.setting-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
}

.setting-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
}

.setting-action {
  flex-shrink: 0;
}

.setting-toggle-btn {
  min-width: 115px;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  transition: all 0.2s ease;
}

.setting-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.7);
  color: #ffffff;
}

.setting-toggle-btn.muted {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.setting-toggle-btn.muted:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.7);
  color: #ffffff;
}

/* Account badge row */
.setting-account-badge {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.setting-user-avatar {
  width: 46px;
  height: 46px;
  background: rgba(56, 189, 248, 0.15);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.setting-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.setting-user-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.setting-user-role {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

/* Password change form inside settings */
.settings-password-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
}

.settings-box-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #facc15;
  margin-bottom: 0.9rem;
  letter-spacing: 0.5px;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

/* Danger zone (Reset collection) */
.setting-row.danger-zone {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-top: 0.4rem;
}

.text-danger {
  color: #f87171 !important;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

/* About Studio & Game info */
.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.about-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 0.95rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-label {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-val {
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 600;
}

.about-val strong {
  color: #facc15;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.about-legal-notice {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}

@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-header {
    flex-direction: row !important;
    text-align: left !important;
    align-items: center !important;
    gap: 0.6rem !important;
    padding: 0.5rem 0.75rem !important;
    margin-bottom: 0.6rem !important;
    border-radius: 10px !important;
  }
  .settings-header-icon {
    font-size: 1.35rem !important;
  }
  .settings-header-text h2 {
    font-size: 1.05rem !important;
    font-family: 'Cinzel', serif !important;
    margin: 0 !important;
    letter-spacing: 0.5px !important;
  }
  .settings-header-text p {
    display: none !important;
  }
  .form-row-2col {
    grid-template-columns: 1fr;
  }
  .about-info-grid {
    grid-template-columns: 1fr;
  }
  .setting-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .setting-action {
    align-self: flex-end;
  }
}

/* ==========================================================================
   FAVORITES SYSTEM (COEUR INTÉGRÉ EN HAUT À DROITE DE LA PHOTO)
   ========================================================================== */
.card-fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  left: auto;
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.card-fav-btn::before,
.card-wishlist-btn::before {
  content: '';
  position: absolute;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
}

.card-fav-btn .card-fav-icon {
  width: 15px;
  height: 15px;
  display: block;
  overflow: visible;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-fav-btn .card-fav-path {
  fill: rgba(0, 0, 0, 0.3);
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2px;
  stroke-linejoin: round;
  transition: all 0.22s ease;
}

.card-fav-btn:hover {
  transform: scale(1.18);
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}

.card-fav-btn:hover .card-fav-path {
  stroke: #fca5a5;
  fill: rgba(239, 68, 68, 0.25);
}

.card-fav-btn.is-fav {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.65);
  animation: favHeartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-fav-btn.is-fav .card-fav-path {
  fill: #ef4444;
  stroke: #f87171;
  stroke-width: 1.5px;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.9));
}

.card-fav-btn.is-fav:hover {
  transform: scale(1.22);
  background: rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.9);
}

@keyframes favHeartPop {
  0% { transform: scale(0.65); }
  60% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   WISHLIST SYSTEM (BOUTON RECTANGLE NOIR -> BLEU DANS LE MARCHÉ TCG)
   ========================================================================== */
.card-wishlist-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  left: auto;
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.card-wishlist-btn .card-wishlist-svg {
  width: 14px;
  height: 17px;
  display: block;
  overflow: visible;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-wishlist-btn .wishlist-rect-shape {
  fill: #090d16;
  stroke: #64748b;
  stroke-width: 1.8px;
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

.card-wishlist-btn:hover {
  transform: scale(1.18);
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.card-wishlist-btn:hover .wishlist-rect-shape {
  fill: #1e293b;
  stroke: #94a3b8;
}

.card-wishlist-btn.is-wished {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.7);
  animation: wishBluePop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-wishlist-btn.is-wished .wishlist-rect-shape {
  fill: #0ea5e9;
  stroke: #7dd3fc;
  stroke-width: 2px;
  filter: drop-shadow(0 0 5px rgba(14, 165, 233, 0.95));
}

.card-wishlist-btn.is-wished:hover {
  transform: scale(1.22);
  background: rgba(14, 165, 233, 0.4);
  box-shadow: 0 0 18px rgba(14, 165, 233, 0.9);
}

.card-wishlist-btn.is-wished:hover .wishlist-rect-shape {
  fill: #38bdf8;
  stroke: #e0f2fe;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 1));
}

@keyframes wishBluePop {
  0% { transform: scale(0.65); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Filter Chip Favoris */
.filter-chip.filter-fav {
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
}

.filter-chip.filter-fav:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fff;
}

.filter-chip.filter-fav.active {
  background: rgba(239, 68, 68, 0.26) !important;
  border-color: #ef4444 !important;
  color: #fef2f2 !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
}

/* Filter Chip Doubles (Mon Classeur) */
.filter-chip.filter-dupes {
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
}

.filter-chip.filter-dupes:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fff;
}

.filter-chip.filter-dupes.active {
  background: rgba(245, 158, 11, 0.28) !important;
  border-color: #f59e0b !important;
  color: #fffbeb !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45) !important;
}

/* ==========================================================================
   INSPECT MODAL : FOOTER LINKS & REPORT BUTTON
   ========================================================================== */
.modal-footer-links-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.btn-report-card {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-report-card:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

/* Report Modal Dialog */
.report-modal-card {
  max-width: 520px;
  width: 92%;
}

.report-intro-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.15rem;
}

.report-target-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.report-target-label {
  color: var(--text-muted);
}

.report-target-name {
  color: #f8fafc;
  font-weight: 800;
}

.report-target-id {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

.report-legal-notice {
  font-size: 0.74rem;
  color: #94a3b8;
  background: rgba(239, 68, 68, 0.06);
  border: 1px dashed rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  margin: 1rem 0;
  line-height: 1.4;
}

.report-legal-notice strong {
  color: #fca5a5;
}

.report-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ==========================================================================
   TAB : MARCHÉ & ÉCHANGES (TRADING PREVIEW)
   ========================================================================== */
.tab-badge.badge-soon {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trading-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.5rem 0 3.5rem 0;
}

.trading-header {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.5rem 1.85rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.trading-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #facc15, transparent);
}

.trading-header-icon {
  font-size: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.trading-header-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.trading-header-text h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: 0.8px;
  margin: 0 0 0.35rem 0;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.trading-header-text p {
  color: var(--text-muted, #94a3b8);
  font-size: 0.92rem;
  margin: 0;
}

.trading-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.trading-card {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.trading-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.trading-card-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trading-card-banner.banner-trade {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(15, 23, 42, 0.6));
}

.trading-card-banner.banner-market {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(15, 23, 42, 0.6));
}

.trading-banner-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.trading-card-banner h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 0.15rem 0;
  letter-spacing: 0.5px;
}

.trading-sub-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trading-card-body {
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.trading-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.trading-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trading-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tf-icon {
  font-size: 1.15rem;
  line-height: 1.2;
}

.tf-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tf-content strong {
  font-size: 0.84rem;
  color: #f1f5f9;
}

.tf-content span {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Simulation / Mock trade box */
.trading-mock-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mock-trade-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.mock-trade-stage {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 0.5rem;
}

.mock-trade-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.slot-who {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
}

.mock-card-placeholder {
  width: 90px;
  height: 120px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-align: center;
  padding: 0.4rem;
}

.mock-card-placeholder.highlight {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.mock-card-icon {
  font-size: 1.5rem;
}

.mock-card-label {
  font-size: 0.68rem;
  color: #cbd5e1;
  font-weight: 700;
  line-height: 1.2;
}

.mock-trade-arrows {
  font-size: 1.6rem;
  color: #facc15;
}

.mock-action-btn {
  width: 100%;
  justify-content: center;
  font-size: 0.82rem;
}

/* Market mock list */
.market-mock-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.market-mock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}

.m-card {
  font-weight: 700;
  color: #f1f5f9;
}

.m-seller {
  font-size: 0.72rem;
  color: #94a3b8;
}

.m-price {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  color: #facc15;
}

/* Beta notify card */
.trading-notify-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 1.8rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.notify-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.notify-text {
  flex: 1;
}

.notify-text h4 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #facc15;
  margin: 0 0 0.25rem 0;
}

.notify-text p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.notify-text strong {
  color: #f1f5f9;
}

@media (max-width: 768px) {
  .trading-grid {
    grid-template-columns: 1fr;
  }
  .trading-header {
    flex-direction: column;
    text-align: center;
    gap: 0.85rem;
  }
  .trading-notify-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* ==========================================================================
   LANGUAGE PICKER (Français, English, Español)
   ========================================================================== */
.language-picker-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.75);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.lang-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
  color: #facc15;
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.45);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.22);
  font-weight: 700;
}

.lang-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.lang-name {
  line-height: 1;
}

@media (max-width: 600px) {
  .language-picker-group {
    width: 100%;
    justify-content: space-around;
  }
  .lang-btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   HUB SOCIAL : LISTE D'AMIS & MESSAGERIE (P2P CHAT & SOCIAL HUB)
   ========================================================================== */

#modal-social {
  z-index: 1100;
}

.social-modal-card {
  width: 95%;
  max-width: 860px;
  height: 86vh;
  max-height: 800px;
  background: linear-gradient(180deg, #111827 0%, #0b0f19 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(99, 102, 241, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
}

.social-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
}

.social-header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.social-header-icon {
  font-size: 1.25rem;
}

.social-modal-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  letter-spacing: 0.5px;
}

/* TABS NAVIGATION */
.social-tabs-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem 0;
  gap: 0.35rem;
}

.social-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-family: 'Outfit', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  border-radius: 8px 8px 0 0;
}

.social-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}

.social-tab-btn.active {
  color: #facc15;
  border-bottom-color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  font-weight: 700;
}

.social-tab-counter {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.social-tab-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  min-width: 16px;
  text-align: center;
}

/* BODY & PANES */
.social-modal-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.social-tab-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  height: 100%;
}

.social-tab-pane.active {
  display: flex;
}

/* --- TAB 1 : FRIENDS LIST --- */
.social-search-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.social-search-bar input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: #f8fafc;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.social-search-bar input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.friends-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.friend-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: all 0.2s ease;
  gap: 0.85rem;
}

.friend-item-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.friend-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.friend-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.friend-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #0f172a;
}

.status-indicator-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #0f172a;
}

.badge-online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.badge-in-battle {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}

.badge-offline {
  background: #64748b;
}

.friend-meta {
  min-width: 0;
  flex: 1;
}

.friend-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.friend-name {
  font-weight: 700;
  color: #f8fafc;
  font-size: 0.9rem;
}

.badge-admin {
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-left: 0.35rem;
}

.friend-status-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-friend-remove {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.btn-friend-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* --- TAB 2 : CONVERSATIONS & CHAT --- */
.chat-hub-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.chat-sidebar {
  width: 220px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 15, 26, 0.5);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.conv-list-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.18s ease;
}

.conv-list-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.conv-list-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-left: 3px solid #818cf8;
}

.conv-list-item.has-unread {
  background: rgba(239, 68, 68, 0.12) !important;
  border-left: 3px solid #ef4444 !important;
}

.conv-list-item.has-unread .conv-name {
  color: #fca5a5 !important;
  font-weight: 800 !important;
}

.conv-list-item.has-unread .conv-snippet {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
}

.conv-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
  z-index: 5;
  animation: pulse-unread-conv 2s infinite ease-in-out;
}

.conv-unread-pill {
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: auto;
  margin-right: 6px;
  line-height: 1.2;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

@keyframes pulse-unread-conv {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.95);
  }
}

.conv-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.conv-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.conv-info {
  min-width: 0;
  flex: 1;
}

.conv-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.conv-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time {
  font-size: 0.68rem;
  color: #64748b;
}

.conv-snippet {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-main-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(15, 23, 42, 0.35);
}

.chat-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.7);
  gap: 0.6rem;
}

.btn-chat-back-mobile {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}

.chat-header-user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.active-chat-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.active-chat-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.active-chat-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.active-chat-code {
  font-size: 0.7rem;
  color: #64748b;
  font-family: monospace;
  font-weight: normal;
}

.active-chat-status {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-actions {
  display: flex;
  gap: 0.35rem;
}

.chat-messages-stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.chat-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  position: relative;
  animation: bubblePop 0.2s ease-out;
}

.chat-bubble-row.msg-me {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-row.msg-friend {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 0.65rem 1.85rem 0.65rem 0.95rem;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
}

.msg-me .chat-bubble {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.msg-friend .chat-bubble {
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-left-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-delete-msg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #94a3b8;
  font-size: 0.65rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  z-index: 5;
}

.chat-bubble-row:hover .btn-delete-msg,
.chat-bubble-row:focus-within .btn-delete-msg {
  opacity: 1;
}

.btn-delete-msg:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  opacity: 1;
}

.msg-timestamp {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 3px;
  display: block;
  text-align: right;
}

.msg-friend .msg-timestamp {
  color: #64748b;
}

.trade-offer-bubble,
.duel-offer-bubble {
  border: 1px solid #facc15;
  background: rgba(30, 27, 75, 0.95) !important;
}

.trade-offer-header {
  font-weight: 800;
  color: #facc15;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.duel-offer-header {
  font-weight: 800;
  color: #f43f5e;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.trade-offer-content,
.duel-offer-content {
  font-size: 0.8rem;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}

.trade-offer-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

/* =============================================================================
   SOCIAL CARD GIFT & TRADE BUBBLES
   ============================================================================= */
.card-gift-bubble {
  border: 1px solid #10b981;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
  max-width: 320px;
}

.gift-bubble-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #34d399;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  padding-bottom: 4px;
}

.gift-card-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.45rem;
}

.gift-card-thumb {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  background: #0f172a;
}

.gift-card-meta {
  flex: 1;
  min-width: 0;
}

.gift-card-name {
  font-weight: 800;
  color: #fff;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift-card-tags {
  display: flex;
  gap: 6px;
  margin: 3px 0;
  font-size: 0.72rem;
}

.gift-card-stats {
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  gap: 8px;
}

.gift-message-text {
  font-style: italic;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin: 0.35rem 0;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
}

.gift-added-badge {
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  margin-top: 4px;
}

/* TRADE BUBBLE */
.card-trade-bubble {
  border: 1px solid #facc15;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.2);
  max-width: 340px;
}

.trade-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(250, 204, 21, 0.25);
  padding-bottom: 4px;
  margin-bottom: 0.45rem;
}

.trade-title {
  font-weight: 800;
  color: #facc15;
  font-size: 0.85rem;
}

.trade-status-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.trade-status-badge.badge-pending,
.trade-status-badge.badge-waiting_counter {
  background: rgba(250, 204, 21, 0.2);
  color: #fde047;
}

.trade-status-badge.badge-waiting_decision {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.trade-status-badge.badge-accepted {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.trade-status-badge.badge-declined,
.trade-status-badge.badge-cancelled,
.trade-status-badge.badge-expired {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.trade-cards-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.5rem;
}

.trade-mini-card {
  flex: 1;
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.trade-mini-card img {
  width: 56px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  display: block;
  margin: 0 auto 4px;
  background: #0f172a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.trade-mini-card .open-box-icon {
  width: 56px;
  height: 78px;
  border-radius: 6px;
  border: 1.5px dashed #facc15;
  background: rgba(250, 204, 21, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 4px;
}

.trade-mini-label {
  font-size: 0.66rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.trade-mini-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.trade-swap-divider {
  font-size: 1.25rem;
  color: #facc15;
  font-weight: 900;
  flex-shrink: 0;
  padding: 0 4px;
}

.trade-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.trade-actions-row button {
  flex: 1;
  min-width: 120px;
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.trade-unowned-warning {
  font-size: 0.72rem;
  color: #f87171;
  display: block;
  margin-bottom: 4px;
}

/* =============================================================================
   CARD PICKER MODAL (OFFRIR / ÉCHANGER) - POSITION STRICTEMENT DEVANT LE CHAT
   ============================================================================= */
#modal-social-card-picker.modal-backdrop {
  z-index: 1300 !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}

.social-picker-modal-card {
  z-index: 1301;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  width: 95%;
  max-width: 760px;
  height: 88vh;
  max-height: 780px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(59, 130, 246, 0.25);
  animation: modalFadeIn 0.2s ease-out;
}

.social-picker-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.6);
}

.social-picker-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-picker-icon {
  font-size: 1.7rem;
}

.social-picker-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 800;
}

.social-picker-header p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.social-picker-trade-steps {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.picker-step-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.picker-step-btn.active {
  color: #facc15;
  border-bottom-color: #facc15;
  background: rgba(250, 204, 21, 0.08);
}

.social-picker-filters {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.social-picker-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
}

.social-picker-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.social-picker-element-filters {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.picker-elem-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.picker-elem-pill:hover,
.picker-elem-pill.active {
  background: #3b82f6;
  border-color: #60a5fa;
  color: #fff;
}

.picker-elem-pill.filter-missing {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #6ee7b7;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.picker-elem-pill.filter-missing:hover,
.picker-elem-pill.filter-missing.active {
  background: #10b981;
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.social-picker-grid-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.picker-cardlet {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.picker-cardlet:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  background: #273549;
}

.picker-cardlet.selected {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.picker-cardlet-thumb-box {
  width: 46px;
  height: 64px;
  position: relative;
  flex-shrink: 0;
}

.picker-cardlet-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0f172a;
}

.picker-count-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #eab308;
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid #000;
}

.picker-check-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #10b981;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  z-index: 2;
}

.picker-missing-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
  letter-spacing: 0.02em;
}

.picker-cardlet.is-missing-for-friend {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), #1e293b);
}

.picker-cardlet.is-missing-for-friend:hover {
  border-color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), #243447);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.picker-section-title {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 4px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.25);
  margin-top: 4px;
}

.picker-section-title.section-owned {
  color: #94a3b8;
  border-bottom-color: rgba(255, 255, 255, 0.1);
  margin-top: 14px;
}

.picker-cardlet-info {
  flex: 1;
  min-width: 0;
}

.picker-cardlet-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-cardlet-meta {
  display: flex;
  gap: 4px;
  margin: 2px 0;
  font-size: 0.68rem;
}

.picker-elem-tag {
  color: #94a3b8;
}

.picker-rank-tag {
  color: #facc15;
  font-weight: 700;
}

.picker-cardlet-stats {
  font-size: 0.65rem;
  color: #64748b;
  display: flex;
  gap: 6px;
}

.picker-open-offer-cardlet {
  grid-column: 1 / -1;
  background: rgba(250, 204, 21, 0.08);
  border: 1px dashed #facc15;
}

.open-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(250, 204, 21, 0.15);
  border-radius: 6px;
}

.badge-open-offer {
  background: #facc15;
  color: #000;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.68rem;
}

.picker-cardlet-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.social-picker-footer {
  padding: 0.85rem 1.25rem;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.picker-selection-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-selected-summary {
  font-size: 0.85rem;
  color: #e2e8f0;
}

.picker-empty-hint {
  color: #64748b;
  font-style: italic;
  font-size: 0.8rem;
}

.summary-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.85rem;
}

.summary-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.swap-arrow {
  color: #facc15;
  font-weight: 900;
  font-size: 1rem;
}

.picker-note-wrap input {
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  font-size: 0.8rem;
  outline: none;
}

.picker-actions-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.quick-chip.chip-gift {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.quick-chip.chip-gift:hover {
  background: rgba(16, 185, 129, 0.15);
}

.quick-chip.chip-trade {
  border-color: rgba(250, 204, 21, 0.4);
  color: #facc15;
}

.quick-chip.chip-trade:hover {
  background: rgba(250, 204, 21, 0.15);
}

/* TYPING INDICATOR */
.typing-bubble {
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #1e293b;
  border-radius: 14px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bubblePop {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* QUICK ACTION BAR */
.chat-quick-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.chat-quick-bar::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.quick-chip:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: #818cf8;
  color: #fff;
  transform: translateY(-1px);
}

/* CHAT INPUT BAR */
.chat-input-form {
  display: flex;
  padding: 0.65rem 0.85rem;
  gap: 0.5rem;
  background: rgba(10, 15, 26, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.chat-input-field {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  color: #f8fafc;
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-field:focus {
  border-color: #818cf8;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.25);
}

.btn-chat-send {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
}

/* --- TAB 3 : ADD FRIEND & PENDING --- */
.add-friend-section {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.add-friend-section h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.35rem;
}

.add-friend-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.add-friend-input-row {
  display: flex;
  gap: 0.6rem;
}

.add-friend-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  color: #f8fafc;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.add-friend-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.add-friend-feedback {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 1.2rem;
}

.add-friend-feedback.success {
  color: #10b981;
}

.add-friend-feedback.error {
  color: #ef4444;
}

.pending-requests-section {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pending-requests-section h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
}

.pending-req-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  gap: 0.75rem;
}

.pending-req-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pending-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: #0f172a;
}

.pending-name {
  font-weight: 700;
  font-size: 0.86rem;
  color: #f1f5f9;
}

.pending-time {
  font-size: 0.72rem;
  color: #94a3b8;
}

.pending-actions {
  display: flex;
  gap: 0.4rem;
}

/* EMPTY STATES & TOASTS */
.social-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: #64748b;
  text-align: center;
  gap: 0.5rem;
}

.social-empty-state .empty-icon {
  font-size: 2.2rem;
}

.social-toast {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #818cf8;
  color: #f8fafc;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(129, 140, 248, 0.4);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2000;
  pointer-events: none;
  animation: toastSlideUp 0.25s ease-out;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.social-toast.fade-out {
  opacity: 0;
  transform: translate(-50%, 10px);
}

@keyframes toastSlideUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* --- MOBILE RESPONSIVE OVERHAUL (SMARTPHONES & TABLETS < 768px) --- */
@media (max-width: 768px) {
  .btn-header-social {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
  }

  /* 1. MODAL SOCIAL PLEIN ÉCRAN ERGONOMIQUE */
  #modal-social.modal-backdrop {
    align-items: stretch;
    justify-content: stretch;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.94);
  }

  .social-modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .social-modal-header {
    padding: 0.65rem 0.9rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .social-modal-header h3 {
    font-size: 1rem;
  }

  .social-modal-header .modal-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
  }

  /* ONGLETS NAVIGATION HORIZONTALE */
  .social-tabs-nav {
    padding: 0.25rem 0.5rem 0;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .social-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .social-tab-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.84rem;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
  }

  /* LISTE D'AMIS SUR MOBILE */
  .social-search-bar {
    padding: 0.55rem 0.85rem;
  }

  .social-search-bar input {
    font-size: 16px !important; /* Évite le zoom automatique sur iOS */
    padding: 0.55rem 0.85rem;
  }

  .friends-list-container {
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
  }

  .friend-item-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0.8rem 0.9rem;
    position: relative;
    gap: 0.65rem;
  }

  .friend-card-left {
    width: 100%;
    padding-right: 32px; /* Dégage la place pour la croix de suppression */
  }

  .friend-avatar-wrap {
    width: 44px;
    height: 44px;
  }

  .friend-name {
    font-size: 0.95rem;
  }

  .btn-friend-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.35rem;
    padding: 4px 8px;
  }

  .friend-card-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    justify-content: stretch;
  }

  .friend-card-actions .btn {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 8px;
  }

  /* CHAT & MESSAGERIE */
  .chat-hub-layout {
    height: 100% !important;
    flex: 1;
    min-height: 0;
  }

  .chat-hub-layout .chat-sidebar {
    width: 100%;
    height: 100%;
    flex: 1;
    background: #0b0f19;
  }

  .conv-list-item {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .conv-avatar-wrap {
    width: 44px;
    height: 44px;
  }

  .conv-name {
    font-size: 0.9rem;
  }

  .conv-snippet {
    font-size: 0.78rem;
  }

  .chat-hub-layout .chat-main-window {
    display: none;
    height: 100%;
    flex: 1;
  }

  .chat-hub-layout.mobile-view-chat .chat-sidebar {
    display: none;
  }

  .chat-hub-layout.mobile-view-chat .chat-main-window {
    display: flex;
    width: 100%;
    height: 100%;
  }

  .chat-main-header {
    padding: 0.5rem 0.75rem;
    background: #0f172a;
    gap: 0.5rem;
  }

  .chat-hub-layout.mobile-view-chat .btn-chat-back-mobile {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    flex-shrink: 0;
  }

  .chat-header-user-info {
    min-width: 0;
    flex: 1;
    gap: 0.5rem;
  }

  .active-chat-avatar-wrap {
    width: 34px;
    height: 34px;
  }

  .active-chat-name {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .active-chat-status {
    font-size: 0.68rem;
  }

  /* Masquer les doublons boutons sur mobile (déjà disponibles dans la quick-bar) */
  #btn-chat-header-gift,
  #btn-chat-header-trade,
  #btn-chat-header-duel {
    display: none !important;
  }

  #btn-chat-header-clear {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  /* FLUX DE MESSAGES */
  .chat-messages-stream {
    padding: 0.75rem;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
  }

  .chat-bubble-row {
    max-width: 92%;
  }

  .chat-bubble {
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  /* BULLE D'ÉCHANGE 1V1 SUR MOBILE */
  .trade-offer-bubble {
    max-width: 100% !important;
    width: 100%;
    padding: 0.85rem !important;
  }

  .trade-cards-comparison {
    gap: 8px;
    padding: 10px 6px;
  }

  .trade-mini-card img {
    width: 54px;
    height: 74px;
  }

  .trade-mini-card .open-box-icon {
    width: 54px;
    height: 74px;
    font-size: 1.4rem;
  }

  .trade-mini-name {
    font-size: 0.78rem;
  }

  .trade-actions-row {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .trade-actions-row button {
    width: 100%;
    padding: 0.65rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 800;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* QUICK CHIPS BAR */
  .chat-quick-bar {
    padding: 0.45rem 0.75rem;
    gap: 6px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .quick-chip {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
  }

  /* CHAMP TEXTE & ENVOI */
  .chat-input-form {
    padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px)) 0.75rem;
    gap: 0.45rem;
    background: #0b0f19;
  }

  .chat-input-field {
    font-size: 16px !important; /* Empeche le zoom auto iOS */
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
  }

  .btn-chat-send {
    padding: 0.6rem 1.1rem;
    font-size: 0.86rem;
    font-weight: 800;
    border-radius: 10px;
  }

  /* 2. SÉLECTEUR DE CARTE PLEIN ÉCRAN ERGONOMIQUE */
  #modal-social-card-picker.modal-backdrop {
    padding: 0 !important;
    align-items: stretch;
    justify-content: stretch;
  }

  .social-picker-modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
  }

  .social-picker-header {
    padding: 0.65rem 0.85rem;
  }

  .social-picker-header h3 {
    font-size: 0.95rem;
  }

  .social-picker-header p {
    font-size: 0.72rem;
  }

  .social-picker-filters {
    padding: 0.5rem 0.75rem;
    gap: 6px;
  }

  .social-picker-search-bar input {
    font-size: 16px !important;
  }

  .social-picker-grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    padding: 8px;
  }

  .picker-cardlet {
    padding: 6px;
    gap: 6px;
  }

  .picker-cardlet-thumb-box {
    width: 44px;
    height: 60px;
  }

  .picker-cardlet-name {
    font-size: 0.78rem;
  }

  .picker-cardlet-meta {
    font-size: 0.65rem;
  }

  .picker-cardlet-stats {
    font-size: 0.6rem;
    gap: 4px;
  }

  .social-picker-footer {
    padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px)) 0.75rem;
  }

  .picker-actions-buttons {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .picker-actions-buttons button {
    flex: 1;
    padding: 0.65rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 800;
  }
}

/* ==========================================================================
   PAGINATION (200 CARTES PAR PAGE)
   ========================================================================== */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  width: 100%;
  box-sizing: border-box;
}

.pagination-bar.pagination-top {
  margin-top: 0.5rem;
  margin-bottom: 0.85rem;
}

.pagination-bar.pagination-bottom {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

.pagination-info strong {
  color: #f8fafc;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #fbbf24;
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  border-color: rgba(255, 255, 255, 0.05);
}

.pagination-ellipsis {
  color: #64748b;
  font-weight: 700;
  padding: 0 0.3rem;
  user-select: none;
}

@media (max-width: 640px) {
  .pagination-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
  }
  .pagination-info {
    font-size: 0.76rem;
  }
  .pagination-controls {
    justify-content: center;
    gap: 0.25rem;
  }
  .pagination-btn {
    min-width: 30px;
    height: 30px;
    font-size: 0.75rem;
    padding: 0 0.45rem;
  }
}

/* =============================================================================
   MODAL ANNONCE GLOBALE (COMMUNICATION JOUEURS) & REPORT CARDS (OPTION C & 2)
   ============================================================================= */
.modal-announcement-card {
  max-width: 540px;
  width: 92%;
  max-height: 90dvh;
  background: linear-gradient(165deg, #0f172a 0%, #1e1b4b 60%, #0b0f19 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(250, 204, 21, 0.2);
  border-radius: 18px;
  padding: 1.6rem;
  color: #fff;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.announcement-badge-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.announcement-pill {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.announcement-date {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.announcement-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.announcement-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
  margin-bottom: 0.2rem;
}

.announcement-title {
  font-family: 'Cinzel', 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #facc15;
  margin: 0;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.announcement-content {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.6;
  white-space: pre-line;
}

/* REWARD CARD */
.announcement-reward-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 204, 21, 0.1);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  gap: 0.8rem;
  margin-top: 0.4rem;
  box-shadow: inset 0 0 15px rgba(250, 204, 21, 0.1);
}

.reward-info-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reward-gift-icon {
  font-size: 1.6rem;
}

.reward-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reward-badge-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.reward-amount-label {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: #facc15;
}

.btn-reward-claim {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
  white-space: nowrap;
}

.btn-reward-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.btn-reward-claim.claimed {
  background: #334155;
  color: #94a3b8;
  box-shadow: none;
  cursor: default;
  transform: none;
}

/* ADMIN ANNOUNCEMENT EDITOR */
.admin-announcement-editor {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-editor-divider {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  margin: 0.6rem 0;
}

.admin-editor-title {
  font-size: 0.9rem;
  color: #38bdf8;
  margin: 0 0 0.2rem 0;
  font-weight: 800;
}

.admin-editor-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.admin-editor-field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.admin-editor-row {
  display: flex;
  gap: 0.8rem;
}

.btn-publish-ann {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 0.4rem;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}

.btn-publish-ann:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  transform: translateY(-1px);
}

.admin-ann-feedback {
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.admin-ann-feedback.success {
  color: #10b981;
}

.admin-ann-feedback.error {
  color: #ef4444;
}

.announcement-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.2rem;
  gap: 0.6rem;
}

.btn-toggle-admin-ann {
  background: transparent;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-admin-ann:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
}

/* =============================================================================
   CHAT REPORT CARDS (OPTION C : SIGNALEMENTS DANS LE HUB SOCIAL ADMIN)
   ============================================================================= */
.chat-report-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: border-color 0.2s ease;
}

.chat-report-card.resolved {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(15, 23, 42, 0.6);
  opacity: 0.85;
}

.chat-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.report-badge-reason {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  text-transform: uppercase;
}

.chat-report-card.resolved .report-badge-reason {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.report-time {
  font-size: 0.72rem;
  color: #64748b;
}

.chat-report-target {
  font-size: 0.95rem;
  color: #f1f5f9;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-report-target code {
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

.chat-report-details {
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  border-left: 3px solid #f87171;
  font-style: italic;
  line-height: 1.4;
}

.chat-report-card.resolved .chat-report-details {
  border-left-color: #34d399;
}

.chat-report-email {
  font-size: 0.78rem;
  color: #94a3b8;
}

.chat-report-email a {
  color: #38bdf8;
  text-decoration: underline;
}

.chat-report-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.btn-report-view-card {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-report-view-card:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

.btn-report-resolve {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-report-resolve:hover {
  background: rgba(16, 185, 129, 0.35);
  color: #fff;
}

.badge-report-resolved {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #34d399;
  padding: 0.35rem 0.6rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
}

/* ==========================================================================
   ADMIN CONTROL TOWER (TOUR DE CONTRÔLE ADMINISTRATEUR)
   ========================================================================== */

.admin-control-tower {
  max-width: 1350px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}

.admin-tower-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-badge-super {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #000;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.admin-header-title-box h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

.admin-header-title-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-operator-tag {
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.spinning {
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* KPIS GRID */
.admin-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.admin-kpi-card {
  background: rgba(22, 27, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, border-color 0.2s;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.admin-kpi-card .kpi-icon {
  font-size: 2rem;
  line-height: 1;
}

.admin-kpi-card .kpi-info {
  display: flex;
  flex-direction: column;
}

.admin-kpi-card .kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-kpi-card .kpi-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
}

.admin-kpi-card.kpi-alert.alert-active {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.admin-kpi-card.kpi-alert.alert-active .kpi-value {
  color: #ef4444;
}

.admin-kpi-card.kpi-highlight .kpi-value {
  color: #38bdf8;
}

/* SUBNAV TABS */
.admin-subnav-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

@media (max-width: 950px) {
  .admin-subnav-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px 8px 0 0;
}

.admin-subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.admin-subnav-btn.active {
  color: #fff;
  border-bottom-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
}

.admin-subnav-btn .subnav-badge {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
}

.admin-subnav-btn .subnav-badge.badge-warning-red {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* SUBPANES */
.admin-subpane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.admin-subpane.active {
  display: block;
}

/* BOX CONTAINERS */
.admin-box {
  background: rgba(18, 22, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  margin-bottom: 1.5rem;
}

.admin-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-box-header .abh-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-box-header .box-icon {
  font-size: 1.6rem;
}

.admin-box-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.admin-box-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* MENU 1 : COMMS LAYOUT */
.admin-comms-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .admin-comms-layout {
    grid-template-columns: 1fr;
  }
}

/* FORMS */
.admin-ann-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
}

.form-row-2 {
  grid-template-columns: 2fr 1fr;
}

.form-row-3 {
  grid-template-columns: minmax(130px, 1.8fr) minmax(65px, 0.7fr) minmax(65px, 0.7fr);
  gap: 0.65rem;
}

@media (max-width: 768px) {
  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  box-sizing: border-box;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-input {
  background: rgba(11, 14, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  padding: 0.6rem 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-input-num {
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-weight: 700;
}

/* ADMIN TARGETED REWARD BOX */
.admin-targeted-reward-box {
  margin-top: 1.5rem;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.08) !important;
}

.admin-targeted-reward-box .box-icon {
  color: #38bdf8;
}

.btn-action-reward {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 4px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action-reward:hover {
  background: #facc15;
  color: #000;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
  transform: translateY(-1px);
}

.admin-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.admin-textarea {
  resize: vertical;
  min-height: 90px;
}

.admin-select {
  cursor: pointer;
}

/* PRESETS TOOLBAR */
.ann-presets-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.ann-presets-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 0.25rem;
}

.btn-ann-preset {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f1f5f9;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ann-preset:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--gold);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ann-preset.btn-ann-reset {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-ann-preset.btn-ann-reset:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

.ann-char-counter {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.ann-form-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-purge-reports {
  margin-left: auto;
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
}

.btn-purge-reports:hover {
  background: #ef4444;
  color: #fff;
}

.ann-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.admin-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #e2e8f0;
  cursor: pointer;
}

.admin-active-ann-preview {
  margin-top: 1.5rem;
  background: rgba(11, 14, 24, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.ann-card-preview {
  background: rgba(30, 41, 59, 0.6);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 1rem;
}

.ann-card-preview.cat-alert {
  border-left-color: #ef4444;
}

.ann-card-preview.cat-update {
  border-left-color: #3b82f6;
}

.ann-card-preview.cat-maintenance {
  border-left-color: #f97316;
}

.ann-p-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ann-badge-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: #fff;
}

.ann-status-tag {
  font-size: 0.75rem;
  font-weight: 700;
}

.ann-status-tag.status-active {
  color: #34d399;
}

.ann-status-tag.status-inactive {
  color: #94a3b8;
}

.ann-card-preview h4 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.ann-card-preview p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.ann-preview-reward {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--gold);
}

/* REPORTS LIST */
.admin-reports-filters {
  display: flex;
  gap: 0.4rem;
}

.admin-reports-filters .filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}

.admin-reports-filters .filter-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.admin-reports-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.4rem;
}

.admin-report-card {
  background: rgba(11, 14, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s;
}

.admin-report-card.is-pending {
  border-left: 4px solid #f59e0b;
}

.admin-report-card.is-resolved {
  border-left: 4px solid #10b981;
  opacity: 0.8;
}

.rep-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rep-card-target {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rep-target-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

.rep-target-name {
  font-size: 0.95rem;
  color: #fff;
}

.rep-status-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.rep-status-badge.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.rep-status-badge.status-resolved {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.rep-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.rep-reason-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.rep-date {
  color: var(--text-muted);
}

.rep-card-details {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
}

.rep-contact {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rep-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #ef4444;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-outline-success {
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.6);
  color: #10b981;
}

.btn-outline-success:hover {
  background: rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   MENU 2 : FRAUDE MULTI-COMPTES & ANNUAIRE
   ========================================================================== */

.fraud-rule-explainer {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}

.fraud-rule-explainer .rule-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.fraud-rule-explainer .rule-text {
  font-size: 0.84rem;
  color: #bfdbfe;
  line-height: 1.45;
}

.admin-fraud-clusters-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fraud-cluster-card {
  background: rgba(11, 14, 24, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fraud-cluster-card.cluster-high-risk {
  border: 1px solid rgba(239, 68, 68, 0.6);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.12) 0%, rgba(11, 14, 24, 0.8) 100%);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.fraud-cluster-card.cluster-warning-risk {
  border-left: 4px solid #f59e0b;
}

.fraud-cluster-card.cluster-whitelisted {
  border-left: 4px solid #10b981;
  opacity: 0.85;
}

.cluster-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cluster-ip-badge {
  font-size: 0.95rem;
  color: #fff;
  margin-right: 0.75rem;
}

.cluster-accounts-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.cluster-risk-pill {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.badge-risk-high {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

.pulse-danger {
  animation: pulseDanger 2s infinite;
}

@keyframes pulseDanger {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-risk-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-risk-normal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-risk-whitelisted {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.cluster-explanation {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.cluster-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.cm-item {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cm-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.cm-val {
  font-size: 0.88rem;
}

.text-gold {
  color: var(--gold);
}

.text-danger {
  color: #ef4444;
}

.cluster-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* PLAYERS DIRECTORY & ADS STATS */
.admin-player-search-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.admin-player-search-bar .admin-input {
  min-width: 280px;
}

.admin-player-quick-filters {
  display: flex;
  gap: 0.4rem;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.admin-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 1rem;
}

.admin-players-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-players-table th {
  background: rgba(11, 14, 24, 0.95);
  color: #94a3b8;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.7rem 0.55rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.admin-players-table td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  vertical-align: middle;
  font-size: 0.8rem;
}

.admin-players-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-players-table tr.row-fraud-danger {
  background: rgba(239, 68, 68, 0.07);
}

.player-name-cell {
  display: flex;
  flex-direction: column;
}

.player-name-cell strong {
  color: #fff;
}

.player-email-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.player-role-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.role-admin {
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold);
}

.role-player {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.ip-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.player-ip-code {
  font-family: monospace;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #38bdf8;
}

.ip-history-hint {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: help;
}

.age-cell {
  display: flex;
  flex-direction: column;
}

.days-active-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.td-ads-total {
  font-weight: 700;
}

.daily-ads-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.td-ads-avg .ads-avg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.td-ads-avg .ads-avg-badge.ads-active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.trades-count-cell {
  display: flex;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.player-risk-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}

.risk-pill-normal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.risk-pill-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.risk-pill-high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.admin-loading-state, .admin-loading-cell, .admin-empty-cell {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.admin-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.admin-empty-state .empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.admin-empty-state h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

/* ==============================================================================
   BABEMASTERS TCG • MARCHÉ DES JOUEURS & HÔTEL DES VENTES
   ============================================================================== */

.badge-active-market {
  background: linear-gradient(135deg, #10b981, #06b6d4) !important;
  color: #fff !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  padding: 0.15rem 0.5rem !important;
  border-radius: 9999px !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
  animation: pulse-glow-market 2.5s infinite ease-in-out;
}

@keyframes pulse-glow-market {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 14px rgba(6, 182, 212, 0.7); transform: scale(1.05); }
}

.market-main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* HERO HEADER */
.market-header-hero {
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.1), transparent 70%),
              linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 14px;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.market-badge-pill {
  display: none;
}

.market-main-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.market-main-desc {
  display: none;
}

.market-wallet-card {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 10px;
  padding: 0.4rem 0.85rem;
  text-align: right;
  min-width: 140px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.market-wallet-card .mw-label {
  display: none;
}

.market-wallet-card .mw-balance {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  margin: 0;
}

.market-wallet-card .mw-coins {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.market-wallet-card .mw-unit {
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 600;
}

.market-wallet-card .mw-sub {
  display: block;
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 600;
  margin-top: 1px;
}

/* SUB-NAVIGATION TABS */
.market-subtabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.market-subtab-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #94a3b8;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.market-subtab-btn .ms-label-short {
  display: none;
}

.market-subtab-btn .ms-label-full {
  display: inline;
}

.market-subtab-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
  border-color: rgba(250, 204, 21, 0.3);
}

.market-subtab-btn.active {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(15, 23, 42, 0.9));
  border-color: #facc15;
  color: #fff;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.15);
}

.market-subtab-btn .ms-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
}

.market-subtab-btn .ms-badge-gold {
  background: #facc15;
  color: #0f172a;
}

/* PANES */
.market-pane {
  display: none;
}

.market-pane.active {
  display: block;
}

/* TOOLBAR & FILTERS */
.market-toolbar {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.market-search-box {
  position: relative;
  width: 100%;
}

.market-search-box .msb-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  font-size: 0.95rem;
}

.market-search-input {
  width: 100%;
  background: rgba(11, 15, 25, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.65rem 2.2rem 0.65rem 2.4rem;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.market-search-input:focus {
  border-color: #facc15;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
}

.market-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.market-select {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e2e8f0;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.market-select:focus {
  border-color: #facc15;
}

/* CUSTOM RARITY DROPDOWN */
.market-custom-rarity {
  position: relative;
  display: inline-block;
}

.mcr-trigger {
  background: rgba(11, 15, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e2e8f0;
  padding: 0.48rem 0.65rem;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 145px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.mcr-trigger:hover, .mcr-trigger:focus {
  border-color: #facc15;
  background: rgba(15, 23, 42, 0.95);
}

.mcr-trigger-content {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  white-space: nowrap;
}

.mcr-arrow {
  font-size: 0.7rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.mcr-trigger.is-open .mcr-arrow {
  transform: rotate(180deg);
}

.mcr-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 160px;
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 12px rgba(250, 204, 21, 0.15);
  z-index: 100;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-sizing: border-box;
}

.mcr-dropdown.hidden {
  display: none !important;
}

.mcr-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  transition: all 0.15s ease;
  user-select: none;
}

.mcr-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mcr-option.active {
  background: rgba(250, 204, 21, 0.18);
  color: #facc15;
}

/* S DORE, A ARGENTE, B BRONZE BADGES */
.rank-letter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 0.74rem;
  line-height: 1;
  text-align: center;
  flex-shrink: 0;
}

.badge-rank-s {
  background: linear-gradient(135deg, #d97706 0%, #facc15 50%, #fde047 100%);
  color: #0f172a !important;
  border: 1px solid #fef08a;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.6);
}

.badge-rank-a {
  background: linear-gradient(135deg, #64748b 0%, #cbd5e1 50%, #f8fafc 100%);
  color: #090d16 !important;
  border: 1px solid #f1f5f9;
  box-shadow: 0 0 8px rgba(203, 213, 225, 0.55);
}

.badge-rank-b {
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #d97706 100%);
  color: #fffbeb !important;
  border: 1px solid #f59e0b;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.45);
}

.market-rarity-native {
  display: none !important;
}

.market-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 600;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.5);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.market-toggle-label input {
  accent-color: #facc15;
  cursor: pointer;
}

.market-toggle-refresh-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-market-refresh {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #cbd5e1;
  padding: 0.48rem 0.75rem;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-market-refresh:hover {
  background: rgba(250, 204, 21, 0.2);
  border-color: #facc15;
  color: #facc15;
}

/* LISTINGS GRID */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  margin-top: 0.85rem;
}

.market-listing-card {
  width: 260px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 0.75rem 0.5rem 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.market-listing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), 0 0 18px rgba(250, 204, 21, 0.2);
}

.market-listing-card.is-my-listing {
  border-color: rgba(56, 189, 248, 0.5);
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.2), rgba(15, 23, 42, 0.95));
}

.market-card-badge {
  width: calc(100% - 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.market-card-badge.missing {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.market-card-badge.owned {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}

.market-card-badge.is-seller-badge {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* TOP BADGES & TIME REMAINING BADGE */
.market-card-top-badges {
  width: calc(100% - 10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.market-card-top-badges .market-card-badge {
  margin-bottom: 0;
  flex: 1;
}

.market-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.market-pill-type {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  line-height: 1;
}

.market-pill-type.auction {
  background: rgba(245, 158, 11, 0.2);
  color: #facc15;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.market-pill-type.direct {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.market-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
}

.market-time-badge.urgent {
  color: #f87171;
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: pulseUrgent 1.8s infinite;
}

@keyframes pulseUrgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Market Wishlist Filter Button in Toolbar (Rectangle Noir -> Bleu) */
.btn-market-filter-wishlist {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.22s ease;
  user-select: none;
  white-space: nowrap;
}

.wishlist-toolbar-rect {
  display: inline-block;
  width: 13px;
  height: 17px;
  border-radius: 3.5px;
  background: #090d16;
  border: 1.8px solid #64748b;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
  transition: all 0.22s ease;
  flex-shrink: 0;
}

.wishlist-toolbar-rect.inline-rect {
  width: 22px;
  height: 28px;
  border-radius: 5px;
  margin-bottom: 6px;
}

.btn-market-filter-wishlist:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.6);
  color: #fff;
}

.btn-market-filter-wishlist:hover .wishlist-toolbar-rect {
  background: #1e293b;
  border-color: #94a3b8;
}

.btn-market-filter-wishlist.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.55);
}

.btn-market-filter-wishlist.active .wishlist-toolbar-rect,
.wishlist-toolbar-rect.active {
  background: #0ea5e9;
  border-color: #e0f2fe;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.95);
}

.badge-wish-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #0284c7;
  color: #fff;
  line-height: 1;
  border: 1px solid #7dd3fc;
}

.btn-market-filter-wishlist.active .badge-wish-count {
  background: #0f172a;
  color: #38bdf8;
  border-color: #38bdf8;
}

.market-card-footer {
  width: calc(100% - 10px);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mcf-price-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}

.mcf-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mcf-seller {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcf-seller-avatar {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mcf-seller-name {
  color: #38bdf8;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcf-seller-name.is-me {
  color: #facc15;
}

.mcf-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.mcf-price-num {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #facc15;
}

.mcf-price-coin {
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
}

.mcf-price-coin .babe-coin {
  width: 1.15em;
  height: 1.15em;
}

.mcf-auction-status {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.6);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mcf-auction-status strong {
  color: #facc15;
}

.mcf-btn-row {
  width: 100%;
  margin-top: 0.15rem;
}

.btn-action-market {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  border: none;
  display: block;
  text-align: center;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.btn-action-market.btn-buy-market-card {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-action-market.btn-buy-market-card:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-action-market.btn-bid-market-card {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-action-market.btn-bid-market-card:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
  transform: translateY(-1px);
}

.btn-action-market.btn-cancel-market-offer {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.btn-action-market.btn-cancel-market-offer:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}

/* Backwards compatibility */
.mcf-seller-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.mcf-seller-label {
  color: #94a3b8;
}

.mcf-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.mcf-price {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

/* ==============================================================================
   MODALE MISE EN VENTE DEPUIS LE CLASSEUR (#modal-sell-card)
   ============================================================================== */
.sell-card-modal-card {
  position: relative !important;
  max-width: 620px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  border-color: rgba(250, 204, 21, 0.4);
  background: linear-gradient(180deg, #0f172a 0%, #090d16 100%);
  padding: 1.4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(250, 204, 21, 0.15);
}

.sell-card-modal-card #btn-close-sell-card-modal {
  position: absolute !important;
  top: 1rem !important;
  right: 1.2rem !important;
  z-index: 30 !important;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sell-card-modal-card #btn-close-sell-card-modal:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

.sell-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.sell-quota-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
}

.sell-quota-badge strong {
  color: #38bdf8;
  font-size: 0.95rem;
}

.sell-stock-badge strong {
  color: #facc15;
}

.sell-quota-alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #fca5a5;
  font-size: 0.82rem;
  line-height: 1.4;
}

.sell-modal-layout {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

@media (max-width: 640px) {
  .sell-modal-layout {
    flex-direction: column;
  }
}

.sell-modal-card-col {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  padding: 0.25rem 0;
}

.sell-modal-card-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 195px;
  height: 295px;
  position: relative;
  overflow: visible;
}

.sell-modal-card-slot .card-container {
  width: 250px !important;
  height: 380px !important;
  transform: scale(0.76) !important;
  transform-origin: center center !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7) !important;
  cursor: default !important;
}

.sell-average-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px dashed rgba(250, 204, 21, 0.4);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

.sell-average-price-row .sap-text {
  color: #e2e8f0;
}

.sell-average-price-row strong {
  color: #facc15;
  font-size: 0.85rem;
}

.btn-apply-avg {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  color: #0f172a;
  border: none;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.3);
}

.btn-apply-avg:hover {
  background: #fde047;
  transform: translateY(-1px);
}

.sell-modal-form-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.sell-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sell-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sell-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.sell-type-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.sell-type-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(250, 204, 21, 0.3);
}

.sell-type-btn.active {
  background: rgba(250, 204, 21, 0.15);
  border-color: #facc15;
  color: #fff;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.2);
}

.sell-type-btn .stb-icon {
  font-size: 1.3rem;
}

.sell-type-btn .stb-text strong {
  display: block;
  font-size: 0.82rem;
  color: #f8fafc;
}

.sell-type-btn.active .stb-text strong {
  color: #facc15;
}

.sell-type-btn .stb-text small {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.2;
}

.sell-price-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-step-price {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-step-price:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #fff;
}

.sell-price-num-input {
  flex: 1;
  background: #090d16;
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 8px;
  color: #facc15;
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
  padding: 0.45rem;
  outline: none;
  width: 100%;
}

.sell-price-num-input:focus {
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

.sell-input-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}

.sell-duration-picker {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sell-duration-pill {
  flex: 1;
  min-width: 48px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.45rem 0.3rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.sell-duration-pill:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.4);
}

.sell-duration-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.btn-publish-sale {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.65rem 0.85rem !important;
  gap: 0.25rem !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #facc15 0%, #eab308 50%, #ca8a04 100%) !important;
  color: #000 !important;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.4) !important;
  border: 1px solid rgba(254, 240, 138, 0.5) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: normal !important;
  text-align: center;
  min-height: 52px;
}

.btn-publish-sale:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.6) !important;
  background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #ca8a04 100%) !important;
}

.btn-publish-main {
  display: block;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.btn-publish-sub {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.16rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.4px;
  line-height: 1.25;
  color: #1c1917;
  border: 1px solid rgba(0, 0, 0, 0.12);
  max-width: 100%;
  word-break: break-word;
}

/* AUCTION & TYPE BADGES IN MARKET LISTINGS */
.market-badge-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.market-type-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  width: fit-content;
}

.market-type-pill.direct {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.market-type-pill.auction {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.mcf-auction-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #94a3b8;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
  margin-top: 2px;
}

.mcf-highest-bidder.is-me {
  color: #facc15;
  font-weight: 800;
}

.mlc-badge-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2px;
}

.mlc-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.mlc-type-badge.direct {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.mlc-type-badge.auction {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.mlc-time-badge {
  font-size: 0.65rem;
  color: #38bdf8;
}

.mlc-auction-sub {
  display: block;
  font-size: 0.68rem;
  color: #c084fc;
}

/* MY SALES PANE */
.my-sales-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .my-sales-kpis {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.ms-kpi-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ms-kpi-card.ms-kpi-gold {
  border-color: rgba(250, 204, 21, 0.35);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(15, 23, 42, 0.85));
}

.ms-kpi-icon {
  font-size: 1.75rem;
}

.ms-kpi-data {
  display: flex;
  flex-direction: column;
}

.ms-kpi-val {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
}

.ms-kpi-card.ms-kpi-gold .ms-kpi-val {
  color: #facc15;
}

.ms-kpi-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.my-sales-section {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.1rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.section-title-row h4 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
}

.section-sub-hint {
  font-size: 0.75rem;
  color: #94a3b8;
}

.my-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  margin-top: 0.85rem;
}

.my-listing-auction-sub {
  width: 100%;
  font-size: 0.72rem;
  color: #cbd5e1;
  text-align: center;
  margin-top: 0.35rem;
  margin-bottom: 0.25rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  box-sizing: border-box;
}

.my-listing-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mlc-thumb {
  width: 50px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mlc-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.mlc-name {
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-elem {
  font-size: 0.7rem;
  color: #94a3b8;
}

.mlc-price {
  font-size: 0.85rem;
  font-weight: 700;
}

.my-sales-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sale-history-row {
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.shr-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.shr-icon {
  font-size: 1.1rem;
}

.shr-left strong {
  font-size: 0.85rem;
  color: #fff;
  display: block;
}

.shr-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

.shr-coins {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 800;
}

/* RESPONSIVE MOBILE POUR LE MARCHÉ */
@media (max-width: 768px) {
  .market-main-container {
    padding: 0.25rem 0 1rem 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.65rem !important;
  }

  .market-header-hero {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.45rem 0.75rem !important;
    gap: 0.5rem !important;
    border-radius: 10px !important;
    margin-bottom: 0 !important;
  }

  .market-main-title {
    font-size: 1.05rem !important;
  }

  .market-subtabs-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    margin-bottom: 0.1rem !important;
    overflow: visible !important;
  }

  .market-subtab-btn {
    padding: 0.5rem 0.25rem !important;
    font-size: 0.76rem !important;
    justify-content: center !important;
    border-radius: 8px !important;
    gap: 0.25rem !important;
    min-width: 0 !important;
  }

  .market-subtab-btn .ms-label-full {
    display: none !important;
  }

  .market-subtab-btn .ms-label-short {
    display: inline !important;
  }

  .market-subtab-btn .ms-badge {
    font-size: 0.62rem !important;
    padding: 0.05rem 0.3rem !important;
  }

  .market-toolbar {
    padding: 0.55rem !important;
    gap: 0.45rem !important;
    border-radius: 12px !important;
    margin-bottom: 0.25rem !important;
  }

  .market-search-box {
    width: 100% !important;
  }

  .market-search-input {
    font-size: 0.82rem !important;
    height: 34px !important;
    padding: 0.4rem 1.8rem 0.4rem 2rem !important;
    box-sizing: border-box !important;
  }

  .market-filters-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .market-select,
  .mcr-trigger {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    font-size: 0.76rem !important;
    padding: 0 0.5rem !important;
    height: 34px !important;
  }

  .market-custom-rarity {
    width: 100% !important;
  }

  .market-toggle-refresh-group {
    grid-column: 1 / -1 !important;
    display: flex !important;
    width: 100% !important;
    gap: 0.35rem !important;
    align-items: center !important;
  }

  .market-toggle-label {
    flex: 1 1 auto !important;
    height: 34px !important;
    box-sizing: border-box !important;
    font-size: 0.72rem !important;
    padding: 0 0.4rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  .btn-market-refresh {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }

  /* 1 SEULE CARTE PAR LIGNE SUR MOBILE */
  .market-grid,
  .my-listings-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    justify-items: center !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0.5rem auto 0 auto !important;
    box-sizing: border-box !important;
  }

  .market-listing-card {
    width: 100% !important;
    max-width: 250px !important;
    padding: 0.65rem 0.6rem 0.75rem 0.6rem !important;
    border: 1px solid rgba(250, 204, 21, 0.22) !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%) !important;
    border-radius: 16px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 12px rgba(250, 204, 21, 0.08) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 auto !important;
  }

  .market-listing-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  .market-card-top-badges {
    width: 100% !important;
    max-width: 190px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 auto 0.4rem auto !important;
    height: 24px !important;
    box-sizing: border-box !important;
  }

  .market-card-badge {
    font-size: 0.68rem !important;
    padding: 0.18rem 0.45rem !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
  }

  .market-pill-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .market-pill-type {
    font-size: 0.68rem !important;
    padding: 0.18rem 0.4rem !important;
    border-radius: 6px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
  }

  .market-time-badge {
    font-size: 0.68rem !important;
    padding: 0.18rem 0.4rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
  }

  /* Dimensions strictement identiques aux cartes de Mon Classeur */
  .market-listing-card .card-container {
    width: 100% !important;
    max-width: 168px !important;
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .market-listing-card .card-face {
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .market-listing-card .card-top-bar {
    height: 22px !important;
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
  }

  .market-listing-card .card-name-title {
    font-size: 0.68rem !important;
  }

  .market-listing-card .card-stars-badge {
    font-size: 0.68rem !important;
    padding: 1px 3px !important;
  }

  .market-listing-card .card-img-wrapper {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 115px !important;
    border-radius: 6px !important;
  }

  .market-listing-card .card-country-flag {
    font-size: 0.58rem !important;
    padding: 1px 3px !important;
    bottom: 3px !important;
    right: 3px !important;
  }

  .market-listing-card .card-combat-grid {
    gap: 1.5px !important;
    padding: 2px 3px !important;
    margin-top: 2px !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
  }

  .market-listing-card .combat-stat-cell {
    font-size: 0.55rem !important;
  }

  .market-listing-card .stat-tag {
    font-size: 0.52rem !important;
  }

  .market-listing-card .stat-number {
    font-size: 0.62rem !important;
  }

  .market-listing-card .card-bottom-bar {
    height: 20px !important;
    margin-top: 2px !important;
    padding: 0 4px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }

  .market-listing-card .card-bottom-element-icon {
    font-size: 0.75rem !important;
    min-width: 16px !important;
  }

  .market-listing-card .card-bottom-rank {
    font-size: 0.85rem !important;
    min-width: 16px !important;
  }

  .market-listing-card .card-bio-snippet {
    display: none !important;
  }

  /* Market card footer styled as compact action dock on mobile */
  .market-listing-card .market-card-footer {
    width: 100% !important;
    max-width: 190px !important;
    margin: 0.45rem auto 0 auto !important;
    padding: 0.4rem 0.5rem !important;
    background: rgba(11, 15, 25, 0.85) !important;
    border: 1px solid rgba(250, 204, 21, 0.25) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
  }

  .mcf-price-time-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 4px !important;
  }

  .mcf-price-time-row .mcf-price-block {
    display: flex !important;
    align-items: baseline !important;
    gap: 2px !important;
  }

  .mcf-price-time-row .mcf-price-num {
    font-family: 'Cinzel', serif !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #facc15 !important;
    line-height: 1 !important;
  }

  .mcf-price-time-row .mcf-time-badge {
    font-size: 0.68rem !important;
    padding: 0.15rem 0.35rem !important;
  }

  .mcf-top-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  .mcf-seller {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    font-size: 0.74rem !important;
    color: #94a3b8 !important;
    max-width: 110px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .mcf-seller-avatar {
    font-size: 0.85rem !important;
    flex-shrink: 0 !important;
  }

  .mcf-seller-name {
    color: #38bdf8 !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .mcf-seller-name.is-me {
    color: #facc15 !important;
  }

  .mcf-price-block {
    display: flex !important;
    align-items: baseline !important;
    gap: 2px !important;
    flex-shrink: 0 !important;
  }

  .mcf-price-num {
    font-family: 'Cinzel', serif !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #facc15 !important;
    line-height: 1 !important;
  }

  .mcf-price-coin {
    font-size: 0.9rem !important;
  }

  .mcf-auction-status {
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
    background: rgba(30, 41, 59, 0.7) !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    text-align: center !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .mcf-auction-status strong {
    color: #facc15 !important;
  }

  .mcf-btn-row {
    width: 100% !important;
    margin-top: 1px !important;
  }

  .btn-action-market {
    width: 100% !important;
    border-radius: 6px !important;
    padding: 0.42rem 0.5rem !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    text-align: center !important;
    border: none !important;
    display: block !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
  }

  .btn-action-market.btn-buy-market-card {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
  }

  .btn-action-market.btn-bid-market-card {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
  }

  .btn-action-market.btn-cancel-market-offer {
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid #ef4444 !important;
    color: #fca5a5 !important;
  }

  /* MODALE MISE EN VENTE DEPUIS LE CLASSEUR SUR MOBILE */
  .sell-card-modal-card {
    padding: 1.1rem 0.85rem !important;
    width: 96% !important;
  }

  .sell-modal-layout {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .sell-modal-card-slot {
    width: 175px !important;
    height: 266px !important;
  }

  .sell-modal-card-slot .card-container {
    width: 250px !important;
    height: 380px !important;
    transform: scale(0.7) !important;
    transform-origin: center center !important;
    margin: 0 !important;
  }

  .sell-quota-row {
    font-size: 0.72rem !important;
    padding: 0.4rem 0.6rem !important;
  }

  .sell-type-btn {
    padding: 0.4rem 0.5rem !important;
  }

  .sell-type-btn .stb-icon {
    font-size: 1.1rem !important;
  }

  .sell-type-btn .stb-text strong {
    font-size: 0.75rem !important;
  }

  .sell-price-num-input {
    font-size: 1.1rem !important;
    padding: 0.35rem !important;
  }

  .sell-duration-pill {
    padding: 0.35rem 0.2rem !important;
    font-size: 0.75rem !important;
  }

  /* PANE MES VENTES SUR MOBILE */
  .my-sales-kpis {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .ms-kpi-card {
    padding: 0.75rem !important;
  }

  .ms-kpi-val {
    font-size: 1.2rem !important;
  }
}

/* =============================================================================
   CHARTE D'UTILISATEUR & FAIR-PLAY TCG MODAL
============================================================================= */
.charter-modal-card {
  max-width: 780px !important;
  width: 95% !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  background: linear-gradient(150deg, #090e1a 0%, #0f172a 50%, #131b2e 100%) !important;
  border: 1.5px solid rgba(250, 204, 21, 0.45) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(250, 204, 21, 0.15) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

.charter-header {
  padding: 1.1rem 1.4rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(15, 23, 42, 0.85) !important;
}

.charter-meta-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

/* NAVIGATION DES CHAPITRES */
.charter-nav-pills {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: rgba(11, 15, 25, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.charter-nav-pills::-webkit-scrollbar {
  display: none;
}

.charter-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.charter-pill:hover {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
  border-color: #facc15;
  transform: translateY(-1px);
}

.charter-modal-body {
  overflow-y: auto !important;
  padding: 1.25rem 1.4rem !important;
  max-height: 62vh !important;
  scrollbar-width: thin;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  scroll-behavior: smooth;
}

.charter-intro-banner {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.12) 0%, rgba(30, 41, 59, 0.7) 100%);
  border-left: 4px solid #facc15;
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}
.charter-intro-banner .cib-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.charter-intro-banner .cib-text strong {
  display: block;
  font-size: 0.95rem;
  color: #facc15;
  margin-bottom: 0.3rem;
  font-weight: 800;
}
.charter-intro-banner .cib-text p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #f1f5f9;
}

.charter-section {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.charter-section:hover {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(15, 23, 42, 0.9);
}

.charter-sec-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sec-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(250, 204, 21, 0.18);
  color: #facc15;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  flex-shrink: 0;
}

.charter-sec-head h4 {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
}

.charter-sec-content p {
  margin: 0 0 0.5rem 0;
  font-size: 0.83rem;
  line-height: 1.5;
  color: #cbd5e1;
}
.charter-sec-content p:last-child {
  margin-bottom: 0;
}
.charter-sec-content p strong {
  color: #f1f5f9;
}
.charter-sec-content code {
  background: rgba(0, 0, 0, 0.4);
  color: #38bdf8;
  font-family: 'Consolas', monospace;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82rem;
}
.charter-sec-content ul {
  margin: 0.35rem 0 0.5rem 1.25rem;
  padding: 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
}
.charter-sec-content li {
  margin-bottom: 0.25rem;
}

/* GRILLE DES SANCTIONS */
.charter-penalty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0.75rem 0 0.5rem 0;
}
@media (max-width: 600px) {
  .charter-penalty-grid {
    grid-template-columns: 1fr;
  }
}

.penalty-card {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.penalty-card strong {
  font-size: 0.85rem;
  font-weight: 800;
}
.penalty-card p {
  font-size: 0.76rem !important;
  line-height: 1.35 !important;
  color: #94a3b8 !important;
  margin: 0 !important;
}

.penalty-tag {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  width: fit-content;
  letter-spacing: 0.5px;
}

.p-warn {
  border-color: rgba(250, 204, 21, 0.3);
}
.p-warn .penalty-tag {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
}
.p-warn strong {
  color: #fde047;
}

.p-temp {
  border-color: rgba(249, 115, 22, 0.35);
}
.p-temp .penalty-tag {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}
.p-temp strong {
  color: #fb923c;
}

.p-perm {
  border-color: rgba(239, 68, 68, 0.4);
}
.p-perm .penalty-tag {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.p-perm strong {
  color: #f87171;
}

.charter-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 25, 0.85);
  flex-wrap: wrap;
}

.charter-footer-note {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

.charter-footer-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

/* Checkbox Row dans le formulaire d'inscription */
.auth-charter-acceptance-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  padding: 0.55rem 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.auth-charter-acceptance-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #facc15;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-charter-label {
  font-size: 0.82rem;
  color: #e2e8f0;
  cursor: pointer;
  user-select: none;
}

.btn-charter-trigger {
  background: none;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.btn-charter-trigger:hover {
  color: #facc15;
}

/* ==============================================================================
   DEDICATED MARKET INSPECT MODAL (#modal-market-card-detail)
   ============================================================================== */
.market-inspect-dialog {
  max-width: 860px;
  width: 95%;
  margin: auto;
  background: linear-gradient(180deg, #131726 0%, #0b0e17 100%);
  border: 1px solid rgba(250, 204, 21, 0.4);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.15);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.market-modal-header .modal-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.market-modal-header .modal-header-icon {
  font-size: 1.25rem;
}

.market-modal-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  margin: 0;
  color: #facc15;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.market-inspect-body {
  padding: 1.6rem 2rem;
  max-height: calc(90vh - 60px);
  max-height: calc(90dvh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.market-inspect-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 2.2rem;
  align-items: start;
}

.market-inspect-card-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 270px;
}

.market-inspect-card-col .card-preview-holder {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.market-inspect-card-col .card-container {
  width: 250px;
  height: 380px;
  margin: 0 auto;
  cursor: default;
  transition: transform 0.25s ease;
}

.market-inspect-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-width: 0;
}

.market-inspect-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.market-inspect-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.7rem;
  font-weight: 900;
  color: #f8fafc;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.market-inspect-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.market-inspect-badges .modal-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.market-inspect-badges .modal-badge-owned {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #6ee7b7 !important;
}

.market-inspect-badges .modal-badge-locked {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(250, 204, 21, 0.5) !important;
  color: #fde047 !important;
}

.market-inspect-info-col .modal-stats-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

.market-inspect-info-col .modal-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.market-inspect-info-col .modal-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.market-inspect-info-col .modal-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f1f5f9;
}

.market-deal-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mdb-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.market-pill-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-pill-type.direct {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
}

.market-pill-type.auction {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(250, 204, 21, 0.5);
}

.market-time-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.market-time-badge.urgent {
  color: #f87171;
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  animation: pulseUrgent 1.8s infinite;
}

.mdb-participants-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.45);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mdb-seller, .mdb-bidders {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.mdb-seller strong, .mdb-bidders strong {
  color: #38bdf8;
  font-weight: 700;
}

.mdb-seller .is-me, .mdb-bidders .is-me {
  color: #facc15;
}

.mdb-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.25rem;
  border-top: 1px dashed rgba(250, 204, 21, 0.3);
  border-bottom: 1px dashed rgba(250, 204, 21, 0.3);
}

.mdb-price-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mdb-price-val {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: 'Cinzel', serif;
  font-size: 1.7rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 14px rgba(250, 204, 21, 0.5);
}

.mdb-price-val .mcf-price-coin {
  font-size: 1.35rem;
}

.mdb-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.mdb-actions .btn-block {
  width: 100%;
  padding: 0.8rem 1.1rem;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 10px;
  box-sizing: border-box;
  letter-spacing: 0.3px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mdb-actions .btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid #fbbf24;
  color: #0f172a !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.mdb-actions .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.6);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.btn-market-wishlist-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.22s ease;
  width: 100%;
  box-sizing: border-box;
}

.wishlist-modal-rect {
  display: inline-block;
  width: 14px;
  height: 18px;
  border-radius: 3.5px;
  background: #090d16;
  border: 2px solid #64748b;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
  transition: all 0.22s ease;
  flex-shrink: 0;
}

.btn-market-wishlist-toggle:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.6);
  color: #fff;
}

.btn-market-wishlist-toggle:hover .wishlist-modal-rect {
  background: #1e293b;
  border-color: #94a3b8;
}

.btn-market-wishlist-toggle.is-wished {
  background: rgba(14, 165, 233, 0.22);
  border-color: #38bdf8;
  color: #7dd3fc;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.4);
}

.btn-market-wishlist-toggle.is-wished .wishlist-modal-rect,
.wishlist-modal-rect.is-wished {
  background: #0ea5e9;
  border-color: #e0f2fe;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.95);
}

.market-deal-sold-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

.market-inspect-footer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==============================================================================
   RESPONSIVE MOBILE / TABLETTE (<= 768px)
   ============================================================================== */
@media (max-width: 768px) {
  #modal-market-card-detail {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .market-inspect-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    max-height: 92dvh !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    margin: 0 !important;
    background: #0f131f !important;
  }

  .market-modal-header {
    padding: 0.75rem 1rem !important;
    border-radius: 20px 20px 0 0 !important;
  }

  .market-modal-header h3 {
    font-size: 1rem !important;
  }

  .market-inspect-body {
    padding: 1rem 1rem calc(25px + env(safe-area-inset-bottom, 0px)) 1rem !important;
    max-height: calc(92dvh - 54px) !important;
  }

  .market-inspect-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.15rem !important;
  }

  .market-inspect-card-col {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .market-inspect-card-col .card-preview-holder {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.25rem 0 !important;
  }

  /* Dimension royale et fidèle de la carte sur mobile (ratio 250 : 380) */
  .market-inspect-card-col .card-container {
    width: min(225px, calc(100vw - 48px)) !important;
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* Proportions et typographie parfaites pour la carte 225x338px */
  .market-inspect-card-col .card-face {
    padding: 6px !important;
    border-radius: 14px !important;
  }

  .market-inspect-card-col .card-top-bar {
    height: 26px !important;
    padding: 2px 8px !important;
    margin-bottom: 4px !important;
  }

  .market-inspect-card-col .card-name-title {
    font-size: 0.78rem !important;
    line-height: 1.2 !important;
  }

  .market-inspect-card-col .card-img-wrapper {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 170px !important;
    border-radius: 8px !important;
  }

  .market-inspect-card-col .card-country-flag {
    font-size: 0.62rem !important;
    padding: 1px 4px !important;
    bottom: 4px !important;
    right: 4px !important;
  }

  .market-inspect-card-col .card-combat-grid {
    gap: 3px !important;
    padding: 3px 6px !important;
    margin-top: 4px !important;
    border-radius: 6px !important;
  }

  .market-inspect-card-col .combat-stat-cell {
    padding: 2px 4px !important;
    font-size: 0.68rem !important;
  }

  .market-inspect-card-col .stat-tag {
    font-size: 0.62rem !important;
  }

  .market-inspect-card-col .stat-number {
    font-size: 0.72rem !important;
  }

  .market-inspect-card-col .card-bottom-bar {
    height: 24px !important;
    padding: 2px 8px !important;
    font-size: 0.7rem !important;
  }

  .market-inspect-info-col {
    width: 100% !important;
    gap: 0.85rem !important;
  }

  .market-inspect-header h2 {
    font-size: 1.3rem !important;
    text-align: center !important;
  }

  .market-inspect-badges {
    justify-content: center !important;
  }

  .market-inspect-info-col .modal-stats-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    padding: 0.75rem 0.85rem !important;
  }

  .market-inspect-info-col .modal-stat-label {
    font-size: 0.68rem !important;
  }

  .market-inspect-info-col .modal-stat-value {
    font-size: 0.95rem !important;
  }

  .market-deal-box {
    padding: 0.85rem !important;
    gap: 0.7rem !important;
  }

  .mdb-price-val {
    font-size: 1.45rem !important;
  }

  .mdb-actions .btn-block {
    padding: 0.75rem 0.9rem !important;
    font-size: 0.92rem !important;
  }

  .btn-market-wishlist-toggle {
    padding: 0.6rem 0.9rem !important;
    font-size: 0.84rem !important;
  }
}

@media (max-width: 400px) {
  .market-inspect-card-col .card-container {
    width: min(200px, calc(100vw - 32px)) !important;
    aspect-ratio: 250 / 380 !important;
    height: auto !important;
  }
  .market-inspect-card-col .card-img-wrapper {
    min-height: 145px !important;
  }
}

/* =============================================================================
   MOBILE "AUTRES" BOTTOM SHEET DRAWER
   ============================================================================= */
.mobile-more-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-more-drawer.open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.mobile-more-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 16, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-more-sheet {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  background: linear-gradient(180deg, #161b2e 0%, #0d111d 100%);
  border-top: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85);
  padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 0px)) 16px;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-more-drawer.open .mobile-more-sheet {
  transform: translateY(0);
}

.mobile-more-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 auto 4px auto;
}

.mobile-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-more-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-more-icon {
  font-size: 1.25rem;
}

.mobile-more-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #f8fafc;
}

.mobile-more-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.mobile-more-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.mobile-more-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 65vh;
  overflow-y: auto;
}

.mobile-more-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #f1f5f9;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
  width: 100%;
}

.mobile-more-item:hover,
.mobile-more-item:active {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.35);
  transform: translateX(4px);
}

.more-item-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.more-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.more-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.more-item-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more-item-arrow {
  font-size: 1.3rem;
  color: #64748b;
  padding-right: 4px;
}

/* =============================================================================
   TAB 0 : PROFIL DU JOUEUR (STATISTIQUES & COLLECTION TCG)
   ============================================================================= */
.profile-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hero Banner Profil */
.profile-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.6rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.profile-hero-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.profile-hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.profile-avatar-wrapper {
  position: relative;
}

.profile-avatar-large {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.25) 0%, rgba(245, 158, 11, 0.1) 100%);
  border: 2px solid rgba(250, 204, 21, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.25);
  flex-shrink: 0;
}

.profile-identity {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.profile-username {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0;
}

.profile-role-pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.profile-role-pill.role-guest {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.profile-role-pill.role-player {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.profile-role-pill.role-tester {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.profile-role-pill.role-admin {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.profile-status-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.profile-action-bar {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

/* Stats Clés Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.profile-stat-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(250, 204, 21, 0.3);
}

.psc-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.psc-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.psc-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.psc-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.psc-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.psc-pct, .psc-winrate {
  font-size: 0.85rem;
  font-weight: 700;
  color: #facc15;
}

.psc-sub {
  font-size: 0.75rem;
  color: #94a3b8;
}

.profile-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.profile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #facc15, #f59e0b);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Répartition Raretés & Éléments */
.profile-breakdown-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.2rem;
}

@media (max-width: 820px) {
  .profile-breakdown-row {
    grid-template-columns: 1fr;
  }
}

.profile-card-subpanel {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.pc-subpanel-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pc-subpanel-icon {
  font-size: 1.2rem;
}

.pc-subpanel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f1f5f9;
}

.profile-rarity-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.prb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  gap: 0.25rem;
}

.prb-bronze { border-color: rgba(205, 127, 50, 0.4); }
.prb-silver { border-color: rgba(192, 192, 192, 0.4); }
.prb-gold { border-color: rgba(250, 204, 21, 0.4); }

.prb-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.prb-bronze .prb-badge { background: rgba(205, 127, 50, 0.2); color: #cd7f32; }
.prb-silver .prb-badge { background: rgba(192, 192, 192, 0.2); color: #e2e8f0; }
.prb-gold .prb-badge { background: rgba(250, 204, 21, 0.2); color: #facc15; }

.prb-item strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.prb-item small {
  font-size: 0.72rem;
  color: #94a3b8;
}

.profile-elements-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 0.6rem;
}

.peb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem 0.4rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 2px;
  transition: all 0.15s ease;
}

.peb-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.peb-icon {
  font-size: 1.3rem;
}

.peb-name {
  font-size: 0.7rem;
  color: #94a3b8;
}

.peb-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

/* Sécurité Compte */
.profile-account-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.profile-password-section h4 {
  margin: 0 0 0.8rem 0;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.form-row-3col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.profile-links-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* =============================================================================
   SOUS-PANNEAU : BUREAU DE CHANGE (💎 ➔ BabeCoins)
   ============================================================================= */
.market-exchange-container {
  max-width: 680px;
  margin: 0.5rem auto 2rem auto;
  padding: 0 0.5rem;
}

.exchange-hero-card {
  background: linear-gradient(145deg, #161c2d 0%, #0e1322 100%);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.exchange-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exchange-icon {
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exchange-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: #f8fafc;
}

.exchange-subtitle {
  margin: 0.2rem 0 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.exchange-rate-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: rgba(250, 204, 21, 0.08);
  border: 1px dashed rgba(250, 204, 21, 0.4);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}

.rate-item {
  color: #f1f5f9;
}

.rate-item.rate-from {
  color: #67e8f9;
}

.rate-item.rate-to {
  color: #facc15;
}

.rate-arrow {
  color: #fbbf24;
  font-weight: 900;
}

.exchange-balances-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.exchange-bal-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ebal-label {
  font-size: 0.74rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.ebal-val-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ebal-icon {
  font-size: 1.15rem;
}

.ebal-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.exchange-presets-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.exchange-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
}

.btn-exchange-preset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #e2e8f0;
  padding: 0.55rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.btn-exchange-preset:hover {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.45);
  color: #facc15;
  transform: translateY(-1px);
}

.btn-preset-max {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.exchange-form-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

@media (max-width: 500px) {
  .exchange-form-box {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

.exchange-input-group, .exchange-output-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.exchange-input-group label, .exchange-output-group label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 700;
}

.exchange-input-wrap, .exchange-output-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.exchange-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  width: 100%;
  outline: none;
}

.exchange-input-unit, .exchange-output-unit {
  font-size: 1.1rem;
}

.exchange-arrow-center {
  font-size: 1.4rem;
  color: #fbbf24;
  font-weight: 900;
}

.exchange-output-wrap {
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.35);
  justify-content: space-between;
}

.exchange-output-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #facc15;
}

.btn-exchange-confirm {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(250, 204, 21, 0.3);
}

.exchange-feedback-message {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2rem;
}

.exchange-feedback-message.success {
  color: #4ade80;
}

.exchange-feedback-message.error {
  color: #f87171;
}

/* ==========================================================================
   UNIFIED SOBER & MODERN PAGE HEADER (TOUTES LES PAGES / TABS)
   ========================================================================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(56, 189, 248, 0.75);
  border-radius: 12px;
  padding: 0.55rem 1.1rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  width: 100%;
}

.page-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.page-header-icon-box {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.page-header-content {
  display: flex;
  align-items: center;
  min-width: 0;
}

.page-header-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.page-header-title {
  font-family: var(--font-main, 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.page-header-tagline {
  font-family: var(--font-main, 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  white-space: nowrap;
}

.page-header-desc {
  display: none !important; /* Élimine tout le blabla inutile */
}

.page-header-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.page-header-badge-admin {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.page-header-badge-reports {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Intégration de l'arène tally dans .page-header-actions */
.page-header-actions .arena-tally {
  margin: 0;
  padding: 0.3rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Intégration de l'horloge des quêtes dans .page-header-actions */
.page-header-actions .quests-reset-timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
}

.timer-digits {
  font-variant-numeric: tabular-nums !important;
  display: inline-block !important;
  min-width: 58px !important;
  text-align: center !important;
}

/* Ajustement pour boosters stage avec header sur desktop */
#tab-boosters .page-header {
  margin-bottom: 0.75rem;
}

#tab-boosters .booster-stage {
  padding-top: 0;
  min-height: auto;
}

#tab-boosters .pack-wrapper {
  gap: 0.85rem;
}

#tab-boosters .booster-pack-3d {
  width: min(270px, calc(48vh * 2 / 3));
  aspect-ratio: 2 / 3;
  height: auto;
  max-height: 48vh;
}

/* Responsive mobile pour le header unifié */
@media (max-width: 768px) {
  /* Masque l'en-tête de la page des boosters sur mobile pour laisser toute la place au booster 3D */
  #tab-boosters .page-header {
    display: none !important;
  }

  #tab-boosters .booster-pack-3d,
  .booster-pack-3d {
    width: min(180px, 50vw, calc(46vh * 2 / 3)) !important;
    aspect-ratio: 2 / 3 !important;
    height: auto !important;
    max-height: 46vh !important;
    margin: 0.2rem auto !important;
    border-radius: 12px;
  }

  .page-header {
    padding: 0.4rem 0.75rem;
    margin-bottom: 0.65rem;
    border-radius: 10px;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .page-header-main {
    gap: 0.55rem;
  }

  .page-header-icon-box {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 7px;
    font-size: 1rem;
  }

  .page-header-title {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
  }

  .page-header-tagline {
    font-size: 0.64rem;
    padding: 0.1rem 0.4rem;
  }

  .page-header-desc {
    display: none !important;
  }

  .page-header-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.4rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .page-header-actions .arena-tally {
    width: 100%;
    justify-content: space-around;
    padding: 0.25rem 0.5rem;
    font-size: 0.74rem;
    gap: 0.4rem;
  }
}

/* =============================================================================
   ID JOUEUR SIMPLIFIÉ (8 DIGITS HEXADÉCIMAL) & COPIE FLUIDE
   ============================================================================= */

.user-sub-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2px;
}

.user-id-chip {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #38bdf8;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.user-id-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

.user-id-chip .uic-label {
  color: #94a3b8;
  font-size: 0.56rem;
}

.user-id-chip .uic-copy-icon {
  font-size: 0.65rem;
  opacity: 0.75;
}

/* SETTINGS USER ID ROW */
.settings-user-id-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.suir-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.player-id-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  user-select: all;
}

.btn-copy-id-compact {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-id-compact:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.btn-copy-id-compact.copied,
.btn-copy-player-id.copied,
.user-id-chip.copied {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

/* SOCIAL HUB MY PLAYER ID BANNER / CARD */
.my-player-id-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.6) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.35);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mpid-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mpid-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e0e7ff;
  letter-spacing: 0.5px;
}

.mpid-sub {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.35;
}

.mpid-code-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.player-id-display {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #facc15;
  background: rgba(15, 7, 30, 0.9);
  padding: 0.45rem 1rem;
  border-radius: 8px;
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.15) inset;
  user-select: all;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-id-display:hover {
  border-color: #fde047;
  color: #fff;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.3) inset;
}

.btn-copy-player-id {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border: 1px solid #818cf8;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}

.btn-copy-player-id:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.5);
}

.friend-id-tag {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-left: 6px;
}



/* =============================================================================
   ID DU JOUEUR : AFFICHAGE EXCLUSIF DANS "MON PROFIL"
   ============================================================================= */

#user-id-chip,
#social-my-id-card,
.user-id-chip,
.my-player-id-card {
  display: none !important;
}

.profile-user-id-box {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  margin: 0.35rem 0 0.45rem 0;
  backdrop-filter: blur(8px);
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.puid-label {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.puid-code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #38bdf8;
  background: rgba(8, 14, 26, 0.95);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  user-select: all;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.btn-copy-puid {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(2, 132, 199, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-puid:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.45), rgba(2, 132, 199, 0.6));
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.35);
}

.btn-copy-puid:active {
  transform: translateY(0);
}

.toast-icon .babe-coin,
.toast-icon .babe-coin.toast-coin {
  width: 1.45rem;
  height: 1.45rem;
  vertical-align: middle;
}

/* Bouton Équipe Favorite (Défense PvP) - Compact et non encombrant */
.btn-fav-defense {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-fav-defense:hover {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.5);
  color: #facc15;
}

.btn-fav-defense.is-favorite {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.2) 100%);
  border-color: rgba(250, 204, 21, 0.7);
  color: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.25);
}

.slot-fav-star {
  color: #facc15;
  font-size: 0.75rem;
  margin-left: 2px;
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.6));
}

.team-slot-btn.is-defense-fav {
  border-color: rgba(250, 204, 21, 0.45);
}

/* =============================================================================
   RIVAUX DE LA COMMUNAUTÉ (ARÈNE - DÉFIS ASYNCHRONES 3v3)
   ============================================================================= */
.arena-rivals-panel {
  margin-top: 2rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 16px);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

.arena-rivals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.arena-rival-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md, 12px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.25s ease;
  position: relative;
}

.arena-rival-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(25, 35, 60, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.rival-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rival-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rival-avatar {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.rival-name-group {
  display: flex;
  flex-direction: column;
}

.rival-username {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rival-tag-bot {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  text-transform: uppercase;
}

.rival-team-name {
  font-size: 0.8rem;
  color: #94a3b8;
}

.rival-team-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rival-elements-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rival-element-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.rival-cost-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #facc15;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-rival-challenge {
  width: 100%;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.btn-rival-challenge:hover {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.5);
}

/* =============================================================================
   MODAL DÉFI DE DUEL AVEC PARI (HUB SOCIAL)
   ============================================================================= */
#modal-duel-wager.modal-backdrop {
  z-index: 1350 !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
}

.duel-wager-modal-card {
  z-index: 1351;
  background: #0f172a;
  border: 1.5px solid rgba(244, 63, 94, 0.45);
  border-radius: 18px;
  width: 95%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(244, 63, 94, 0.25);
  animation: modalFadeIn 0.2s ease-out;
}

.duel-wager-header {
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9));
}

.duel-wager-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.duel-wager-icon {
  font-size: 1.9rem;
  filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.5));
}

.duel-wager-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 800;
}

.duel-wager-header p {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.duel-wager-body {
  padding: 1.25rem 1.4rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.duel-wager-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.duel-type-tab {
  padding: 10px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.duel-type-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.duel-type-tab.active {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.3);
}

.duel-coins-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.duel-coins-summary strong {
  color: #facc15;
  font-size: 0.95rem;
}

.duel-input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.duel-coins-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.duel-coins-input-wrap input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

.duel-coins-input-wrap input:focus {
  border-color: #facc15;
  outline: none;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.input-currency-symbol {
  position: absolute;
  right: 14px;
  font-size: 1.2rem;
  pointer-events: none;
}

.duel-coins-quick-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-preset-coin {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-coin:hover {
  background: rgba(250, 204, 21, 0.15);
  border-color: #facc15;
  color: #facc15;
}

.duel-rule-notice {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0.75rem 0 0 0;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #38bdf8;
}

.duel-selected-card-preview {
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-card-empty-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.duel-card-empty-placeholder .placeholder-icon {
  font-size: 2rem;
}

.duel-card-chosen-cardlet {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #facc15;
  text-align: left;
}

.duel-card-chosen-thumb {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.duel-card-chosen-details {
  flex: 1;
}

.duel-card-chosen-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
}

.duel-card-chosen-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.75rem;
}

.duel-message-field {
  display: flex;
  flex-direction: column;
}

.duel-message-field input {
  padding: 9px 12px;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
}

.duel-wager-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.6);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* =============================================================================
   BULLES DE CHAT DÉFI DE DUEL (DUEL WAGER BUBBLE)
   ============================================================================= */
.duel-wager-bubble {
  border: 1.5px solid rgba(244, 63, 94, 0.55);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95)) !important;
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.25);
  max-width: 360px;
}

.duel-wager-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.6rem;
}

.duel-wager-badge-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: #f43f5e;
  display: flex;
  align-items: center;
  gap: 5px;
}

.duel-wager-status-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.duel-status-pending {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.duel-status-counter {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.duel-status-accepted {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.duel-status-resolved {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.5);
}

.duel-status-declined {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.duel-wager-stakes-display {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  color: #e2e8f0;
}

.duel-wager-coins-amount {
  font-size: 1.15rem;
  font-weight: 800;
  color: #facc15;
  display: flex;
  align-items: center;
  gap: 5px;
}

.duel-cards-clash-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.6rem;
}

.duel-clash-card-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 120px;
  text-align: center;
}

.duel-clash-thumb {
  width: 50px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.duel-clash-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.duel-clash-cost {
  font-size: 0.68rem;
  font-weight: 800;
  color: #facc15;
}

.duel-clash-vs-symbol {
  font-size: 1.1rem;
  font-weight: 900;
  color: #f43f5e;
}

.duel-actions-cluster {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0.5rem;
}

.duel-counter-input-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px;
  border-radius: 8px;
}

.duel-counter-input-row input {
  flex: 1;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

/* =============================================================================
   SOUS-ONGLETS DE L'ARÈNE (MODE IA VS MODE JOUEUR)
   ============================================================================= */
.arena-subtabs-nav {
  display: flex;
  gap: 8px;
  margin: 1rem 0 1.25rem 0;
  background: rgba(15, 23, 42, 0.7);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: fit-content;
}

.arena-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.arena-subtab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.arena-subtab-btn.active {
  background: rgba(244, 63, 94, 0.2);
  border-color: #f43f5e;
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.3);
}

.arena-subtab-btn .as-badge {
  background: rgba(244, 63, 94, 0.25);
  color: #f43f5e;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.system-notice-bubble {
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  font-size: 0.78rem;
  color: #7dd3fc;
  padding: 6px 12px !important;
  border-radius: 20px !important;
  margin: 6px auto !important;
  text-align: center;
  display: block;
  max-width: 90%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  /* Masquer l'étoile sur les boutons de slots du haut sur mobile */
  .slot-fav-star {
    display: none !important;
  }
  .btn-fav-defense {
    font-size: 0.75rem;
    padding: 6px 12px;
    min-height: 38px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ==================== CUSTOM DIALOG & POPUP QUALITATIVE ==================== */
#modal-custom-dialog {
  z-index: 25000 !important;
}

#modal-tcg-charter {
  z-index: 20000 !important;
}

.custom-dialog-card {
  width: min(440px, calc(100vw - 32px));
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 30, 0.98) 100%);
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg, 16px);
  padding: 1.75rem 1.5rem;
  box-sizing: border-box;
  animation: customDialogIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@keyframes customDialogIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.custom-dialog-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.custom-dialog-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.custom-dialog-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.custom-dialog-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
}

.custom-dialog-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a78bfa;
}

.custom-dialog-body {
  font-size: 0.90rem;
  line-height: 1.5;
  color: #cbd5e1;
  word-break: break-word;
}

.custom-dialog-input-wrap {
  width: 100%;
}

.custom-dialog-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  color: #fff;
  padding: 10px 14px;
  font-size: 0.92rem;
  outline: none;
}
.custom-dialog-input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}

.custom-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.custom-dialog-actions .btn {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
}

/* Energy Badge in Arena */
.arena-ai-energy-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}
.arena-ai-energy-banner .aeb-icon {
  font-size: 0.95rem;
}
.arena-ai-energy-banner .aeb-label {
  color: #94a3b8;
}
.arena-ai-energy-banner .aeb-count {
  color: #facc15;
  font-weight: 800;
}
.arena-ai-energy-banner .aeb-timer {
  color: #38bdf8;
  font-size: 0.75rem;
  margin-left: 4px;
}
.as-energy-badge {
  background: rgba(250, 204, 21, 0.25);
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fde047;
  font-weight: 800;
  font-size: 0.70rem;
  padding: 2px 7px;
  border-radius: 12px;
}
button.btn-exhausted {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background: #334155 !important;
  border-color: #475569 !important;
  box-shadow: none !important;
}

/* Landing / Welcome Screen in Auth Modal */
.auth-welcome-container {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.auth-hero-banner {
  text-align: center;
  padding: 0.5rem 0.25rem;
}
.auth-hero-badge {
  display: inline-block;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #c084fc;
  font-size: 0.70rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.auth-hero-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.45rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-hero-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #94a3b8;
}
.auth-pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
.auth-pillar-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.auth-pillar-card .ap-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.auth-pillar-card h4 {
  margin: 0 0 2px 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
}
.auth-pillar-card p {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.35;
}
.auth-charter-highlight-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
}
.auth-charter-highlight-box .ach-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-charter-highlight-box .ach-text strong {
  font-size: 0.82rem;
  color: #38bdf8;
}
.auth-charter-highlight-box .ach-text span {
  font-size: 0.72rem;
  color: #94a3b8;
}
.auth-welcome-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.auth-welcome-cta-row .btn {
  width: 100%;
  padding: 11px;
  font-size: 0.90rem;
  font-weight: 800;
  border-radius: 10px;
}

/* =========================================================================
   VRAIE PAGE D'ACCUEIL & PRÉSENTATION OFFICIELLE (LANDING PAGE)
   ========================================================================= */
.landing-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 17000;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 12%, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #f8fafc;
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.landing-page-overlay.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.landing-page-container {
  max-width: 1040px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  min-height: 100vh;
}

.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.landing-brand-icon {
  font-size: 2.2rem;
}

.landing-brand-titles {
  display: flex;
  flex-direction: column;
}

.landing-brand-title {
  font-family: 'Cinzel', serif;
  font-size: 1.65rem;
  font-weight: 900;
  color: #facc15;
  margin: 0;
  letter-spacing: 0.5px;
}

.landing-brand-badge {
  background: linear-gradient(135deg, #facc15, #ea580c);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.landing-brand-tagline {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.landing-quick-nav {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.btn-landing-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 1.15rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-landing-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.landing-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  max-width: 840px;
  margin: 0 auto;
}

.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6px 16px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #38bdf8;
  text-transform: uppercase;
}

.landing-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.85rem);
  font-weight: 900;
  line-height: 1.18;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  margin: 0;
}

.landing-hero-lead {
  font-size: clamp(0.96rem, 1.8vw, 1.12rem);
  color: #cbd5e1;
  line-height: 1.68;
  max-width: 740px;
  margin: 0;
}

.landing-cta-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 840px;
  margin-top: 0.8rem;
}

.btn-landing-cta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 14px 18px;
  border-radius: 12px;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.btn-landing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.btn-landing-cta .cta-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.btn-landing-cta .cta-content {
  display: flex;
  flex-direction: column;
}

/* 1. Bouton Primaire (Or / Jaune) : Contraste Parfait Noir sur Fond Or */
.btn-landing-cta.btn-primary {
  background: linear-gradient(135deg, #facc15 0%, #eab308 60%, #ca8a04 100%) !important;
  border: 1px solid #fef08a !important;
  box-shadow: 0 4px 18px rgba(234, 179, 8, 0.4) !important;
}

.btn-landing-cta.btn-primary:hover {
  background: linear-gradient(135deg, #fef08a 0%, #facc15 60%, #d97706 100%) !important;
  box-shadow: 0 6px 24px rgba(234, 179, 8, 0.6) !important;
}

.btn-landing-cta.btn-primary .cta-content strong {
  font-size: 0.98rem;
  color: #0f172a !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

.btn-landing-cta.btn-primary .cta-content small {
  font-size: 0.78rem;
  color: #451a03 !important;
  font-weight: 700 !important;
  margin-top: 2px;
}

.btn-landing-cta.btn-primary .cta-content .cta-bonus {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.5) !important;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
  font-weight: 900 !important;
  margin-top: 3px;
  letter-spacing: 0.2px;
}

/* 2. Bouton Secondaire (J'ai déjà un compte) : Fond Sombre + Cyan */
.btn-landing-cta.btn-secondary {
  background: rgba(30, 41, 59, 0.88) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

.btn-landing-cta.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.16) !important;
  border-color: #38bdf8 !important;
}

.btn-landing-cta.btn-secondary .cta-content strong {
  font-size: 0.96rem;
  color: #38bdf8 !important;
  font-weight: 800 !important;
}

.btn-landing-cta.btn-secondary .cta-content small {
  font-size: 0.78rem;
  color: #cbd5e1 !important;
  margin-top: 2px;
}

/* 3. Bouton Mode Invité : Fond Sombre + Blanc / Gris Net */
.btn-landing-cta.btn-outline {
  background: rgba(30, 41, 59, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

.btn-landing-cta.btn-outline:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  border-color: #cbd5e1 !important;
}

.btn-landing-cta.btn-outline .cta-content strong {
  font-size: 0.96rem;
  color: #f8fafc !important;
  font-weight: 800 !important;
}

.btn-landing-cta.btn-outline .cta-content small {
  font-size: 0.78rem;
  color: #94a3b8 !important;
  margin-top: 2px;
}

.landing-pillars-section {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 0.5rem;
}

.landing-section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: #facc15;
  text-align: center;
  margin: 0;
}

.landing-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

/* Keyframes et animations d'apparition de la Landing Page */
@keyframes landingCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-pillar-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: all 0.25s ease;
  animation: landingCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.landing-pillars-grid .landing-pillar-card:nth-child(1) { animation-delay: 0.05s; }
.landing-pillars-grid .landing-pillar-card:nth-child(2) { animation-delay: 0.12s; }
.landing-pillars-grid .landing-pillar-card:nth-child(3) { animation-delay: 0.19s; }
.landing-pillars-grid .landing-pillar-card:nth-child(4) { animation-delay: 0.26s; }

.landing-feature-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  animation: landingCardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.landing-features-row .landing-feature-item:nth-child(1) { animation-delay: 0.32s; }
.landing-features-row .landing-feature-item:nth-child(2) { animation-delay: 0.39s; }
.landing-features-row .landing-feature-item:nth-child(3) { animation-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
  .landing-pillar-card,
  .landing-feature-item {
    animation: none !important;
  }
}


.landing-pillar-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-4px);
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.pillar-icon-box {
  font-size: 1.8rem;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-pillar-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.landing-pillar-card p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
  flex-grow: 1;
}

.pillar-tag {
  align-self: flex-start;
  font-size: 0.70rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 8px;
  border-radius: 6px;
}

.landing-features-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
}

.landing-feature-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.lfi-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.lfi-text strong {
  font-size: 0.88rem;
  color: #f1f5f9;
  display: block;
}

.lfi-text span {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  display: block;
  margin-top: 2px;
}

.landing-charter-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.lcb-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: 720px;
}

.lcb-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.lcb-text strong {
  font-size: 0.98rem;
  color: #facc15;
  display: block;
  margin-bottom: 4px;
}

.lcb-text p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #64748b;
}

.landing-footer-actions {
  display: flex;
  gap: 0.8rem;
}

.landing-quick-nav .btn-primary,
.landing-footer-actions .btn-primary {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.landing-quick-nav .btn-secondary {
  background: rgba(30, 41, 59, 0.85) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.landing-footer-actions .btn-outline {
  background: rgba(30, 41, 59, 0.88) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

.auth-modal-top-helper {
  padding: 0 1.2rem 0.5rem;
  display: flex;
  justify-content: flex-start;
}

.auth-btn-back-landing {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.auth-btn-back-landing:hover {
  color: #7dd3fc;
}

.btn-top-landing-trigger {
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: #facc15;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-top-landing-trigger:hover {
  background: rgba(250, 204, 21, 0.25);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.3);
}
/* Responsive Adaptations for Landing Page on Mobile */
@media (max-width: 768px) {
  .landing-page-container {
    padding: 1.2rem 1rem 3.5rem;
    gap: 1.6rem;
  }
  .landing-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .landing-quick-nav {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .landing-quick-nav .btn {
    font-size: 0.76rem;
    padding: 6px 10px;
  }
  .landing-hero {
    width: 100%;
  }
  .landing-hero-badge {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    font-size: 0.70rem;
    padding: 6px 12px;
  }
  .landing-cta-group {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .landing-pillars-grid {
    grid-template-columns: 1fr;
  }
  .landing-features-row {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .landing-charter-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 1rem;
  }
  .landing-footer-actions {
    flex-direction: column;
    width: 100%;
  }
  .landing-footer-actions .btn {
    width: 100%;
    justify-content: center;
  }
}


/* =============================================================================
   SETTINGS LEGAL FOOTER, COPYRIGHT, BABEPEDIA DISCLAIMER & REGISTRATION DATE
   ============================================================================= */

.settings-user-reg-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.15rem;
  flex-wrap: wrap;
}

.settings-reg-label {
  font-weight: 600;
  color: #64748b;
}

.settings-reg-val {
  color: #38bdf8;
  font-weight: 600;
}

.settings-legal-footer {
  margin-top: 2.5rem;
  padding: 1.75rem 1rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 12px;
}

.settings-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
}

.settings-legal-link {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.settings-legal-link:hover {
  color: #ec4899;
  text-decoration: underline;
}

.settings-legal-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  user-select: none;
}

.settings-copyright {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.settings-disclaimer {
  font-size: 0.74rem;
  line-height: 1.55;
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 0.5rem;
}

@media (max-width: 768px) {
  .settings-legal-footer {
    margin-top: 1.5rem;
    padding: 1.25rem 0.75rem 2rem;
  }
  .settings-legal-links {
    gap: 0.5rem 0.75rem;
  }
  .settings-legal-link {
    font-size: 0.8rem;
  }
  .settings-disclaimer {
    font-size: 0.7rem;
    line-height: 1.45;
  }
}

/* =============================================================================
   AUDIT CORRECTIFS P0 & P1 : TOUCH TARGETS, PROFILE MOBILE & ACCESSIBILITÉ
   ============================================================================= */

/* A-2. Retrait définitif des pastilles avatars résiduelles sur PC & Mobile */
.user-avatar-badge,
.setting-user-avatar {
  display: none !important;
}

/* E-1 & A-1. Responsive Mobile Optimization (<= 768px) */
@media (max-width: 768px) {
  /* A-1. Allègement de l'encombrement de la zone profil sur mobile */
  .profile-container {
    padding: 0.65rem 0.5rem !important;
    gap: 0.75rem !important;
  }
  .profile-hero-card {
    padding: 0.85rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }
  .profile-hero-content {
    gap: 0.75rem !important;
  }
  .profile-username {
    font-size: 1.15rem !important;
  }
  .profile-identity {
    gap: 0.2rem !important;
  }
  .profile-status-desc {
    font-size: 0.72rem !important;
    margin: 0.15rem 0 0.35rem !important;
  }
  .profile-action-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }
  .profile-action-bar .btn {
    padding: 8px 10px !important;
    min-height: 38px !important;
    font-size: 0.75rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }
  .profile-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }
  .profile-stat-card {
    padding: 0.75rem 0.85rem !important;
    gap: 0.75rem !important;
  }
  .psc-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.4rem !important;
  }

  /* E-1. Accessibilité des cibles tactiles mobiles (Touch Targets >= 38px) */
  .filter-chip {
    min-height: 38px !important;
    padding: 6px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 0.78rem !important;
  }
  .btn-log-help {
    min-height: 38px !important;
    padding: 6px 12px !important;
    font-size: 0.76rem !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .team-card-footer button {
    min-height: 38px !important;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
  }
  #btn-sort-order {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
  #btn-open-diamond-store {
    min-height: 38px !important;
    padding: 6px 14px !important;
  }
  .btn-rival-challenge {
    min-height: 42px !important;
    padding: 8px 16px !important;
  }

  /* E-4. Prévention du zoom automatique destructeur sur Safari iOS (< 16px) */
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   TOUR DE CONTRÔLE - SUBTABS, ANNUAIRE MASTER-DETAIL & BANNISSEMENT
   ========================================================================== */

/* Subnav Bar & Tabs */
.admin-subnav-bar {
  display: flex;
  gap: 0.75rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
}

.admin-subnav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.admin-subnav-btn.active {
  color: #fff;
  border-bottom-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
}

.admin-subnav-btn .subnav-badge {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
}

/* Master Table Selection & Badges */
.admin-players-table tr.player-row {
  cursor: pointer;
  transition: background 0.15s ease, border-left 0.15s ease;
}

.admin-players-table tr.player-row:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.admin-players-table tr.player-row.row-selected {
  background: rgba(245, 158, 11, 0.1) !important;
  border-left: 3px solid var(--gold);
}

.player-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
  user-select: none;
}

.player-id-pill:hover {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
}

.badge-banned-mini {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-indicator-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator-banned {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-action-inspect {
  min-height: 32px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-inspecting {
  border-color: var(--gold) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

/* Master-Detail Pane (Fiche Détail du Joueur) */
.admin-player-detail-pane {
  margin-top: 1.5rem;
  background: rgba(13, 17, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  position: relative;
}

.admin-player-detail-pane .detail-placeholder {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
}

.admin-player-detail-pane .placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  display: block;
  opacity: 0.7;
}

.detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.dch-user-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dch-avatar {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.05);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dch-name-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.dch-username {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.dch-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dch-country-tag {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ban Alert Banner in Detail Pane */
.detail-ban-banner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.dbb-icon {
  font-size: 2rem;
}

.dbb-info {
  flex: 1;
  min-width: 250px;
}

.dbb-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.3rem;
  color: #ef4444;
  font-size: 0.92rem;
}

.dbb-expiry {
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 600;
}

.dbb-reason {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  color: #fff;
}

.dbb-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 3-Column Stats Grid */
.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.detail-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1.1rem;
}

.dsb-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.5rem;
}

.dsb-title h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold);
}

.dsb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.dsb-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.dsb-key {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.dsb-val {
  color: #fff;
  font-weight: 600;
  text-align: right;
}

.dsb-ip-hist {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsb-fraud-reason {
  color: #ef4444;
  font-size: 0.78rem;
  max-width: 180px;
  text-align: right;
}

.detail-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.2rem;
  margin-top: 0.5rem;
}

.dab-left, .dab-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-detail-reward {
  min-height: 40px;
  font-weight: 700;
}

.btn-detail-ban-temp {
  min-height: 40px;
  font-weight: 700;
}

.btn-detail-ban-perm {
  min-height: 40px;
  font-weight: 700;
}

.btn-detail-unban {
  min-height: 40px;
  font-weight: 700;
}

.btn-copy-id {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 0.4rem;
}

.btn-copy-id:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Ban Modal Styles */
.modal-admin-ban-content {
  max-width: 580px;
  width: 95%;
  background: #131722;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.admin-ban-target-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  border-left: 3px solid #ef4444;
}

.ban-target-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ban-target-name {
  font-size: 1.05rem;
  color: #fff;
}

.ban-target-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: monospace;
}

.ban-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.ban-type-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ban-type-option.active {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
}

.ban-type-option input[type="radio"] {
  margin-top: 0.25rem;
  accent-color: #ef4444;
}

.bto-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.bto-desc {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.ban-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.btn-ban-preset {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-ban-preset:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

.pulse-danger {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
  animation: pulseDanger 2s infinite;
}

@keyframes pulseDanger {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@media (max-width: 768px) {
  .ban-type-selector {
    grid-template-columns: 1fr;
  }
  .detail-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .dab-left, .dab-right {
    flex-direction: column;
    align-items: stretch;
  }
  .dab-left button, .dab-right button {
    width: 100%;
    justify-content: center;
  }
}


/* Tri interactif des colonnes de l'Annuaire Tour de Contrôle */
.admin-players-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.admin-players-table th.sortable-th:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #facc15 !important;
}

.admin-players-table th.sortable-th.sort-active {
  color: #facc15 !important;
  background: rgba(250, 204, 21, 0.08) !important;
}

.admin-players-table th .sort-icon {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
  transition: color 0.15s ease, transform 0.15s ease;
}

.admin-players-table th.sortable-th:hover .sort-icon {
  color: #facc15;
}

.admin-players-table th.sort-active .sort-icon {
  color: #facc15;
  font-weight: 900;
}


/* GRILLE ET CARTES KPIS GLOBAUX TOUR DE CONTRÔLE */
.admin-global-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.global-kpi-card {
  background: rgba(22, 27, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.global-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.global-kpi-card .gkc-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.global-kpi-card .gkc-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.global-kpi-card .gkc-label {
  font-size: 0.74rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.global-kpi-card .gkc-value {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

.global-kpi-card .gkc-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}


/* ==================== STYLES SOUS-ONGLET GRAPHIQUES ==================== */
.admin-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .admin-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-summary-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #facc15;
}

.chart-canvas-wrap {
  width: 100%;
  min-height: 200px;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-svg text {
  font-family: inherit;
}

.admin-ads-distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ads-dist-card {
  background: rgba(22, 27, 46, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ads-dist-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.ads-dist-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ads-dist-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.ads-dist-count {
  font-size: 1.15rem;
  font-weight: 900;
  color: #facc15;
}

.ads-dist-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.ads-dist-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.ads-dist-pct {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}


/* =============================================================================
   P2 & P3 AUDIT OPTIMIZATIONS (A-2, A-3, A-5)
   ============================================================================= */

/* A-2: Hide any residual user avatar elements across all views */
.user-avatar-badge,
.setting-user-avatar {
  display: none !important;
}

/* A-3: Touch Target Height & Styling for Defense Team Button */
.btn-fav-defense {
  min-height: 38px !important;
  height: auto !important;
  padding: 0.45rem 0.85rem !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* A-3 & WCAG: Ensure all team editor header action buttons meet >= 38px */
@media (max-width: 768px) {
  .team-editor-actions button {
    height: auto !important;
    min-height: 38px !important;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
  }

  /* A-5: Sticky bottom action bar in Card Inspect Modal for smartphones */
  #inspect-modal .modal-card-display {
    display: contents !important;
  }

  #inspect-modal .card-container {
    margin: 0 auto !important;
  }

  #inspect-modal .modal-card-actions {
    position: sticky !important;
    bottom: 0 !important;
    order: 10 !important;
    z-index: 120 !important;
    background: rgba(12, 16, 28, 0.97) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1.5px solid rgba(250, 204, 21, 0.4) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.85) !important;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 1rem !important;
    margin: 0 -1rem calc(-20px - env(safe-area-inset-bottom, 0px)) -1rem !important;
    width: calc(100% + 2rem) !important;
    max-width: none !important;
    border-radius: 16px 16px 0 0 !important;
    display: flex !important;
    gap: 0.75rem !important;
    justify-content: center !important;
  }

  #inspect-modal .modal-card-actions .btn {
    min-height: 44px !important;
    font-size: 0.9rem !important;
    padding: 0.65rem 1rem !important;
  }
}
