/* =====================================================
   VARIABLES & RESET
===================================================== */
:root {
  /* Couleurs principales */
  --primary: #6366f1;
  --primary-rgb: 99, 102, 241;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  
  --secondary: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Couleurs neutres */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Ombres */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* =====================================================
   ÉCRAN DE CONNEXION
===================================================== */
.join-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.join-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.join-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.join-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.logo-circle {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.join-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-bottom: var(--space-xs);
}

.join-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  outline: none;
  transition: var(--transition);
}

.input-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.input-group input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: white;
  transform: scale(1.02);
}

.btn-join {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-join::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-join:hover::before {
  width: 300px;
  height: 300px;
}

.btn-join:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6);
}

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

.btn-join span {
  position: relative;
  z-index: 1;
}

.join-footer {
  margin-top: var(--space-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* =====================================================
   ÉCRAN DE JEU - HEADER
===================================================== */
.game-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--bg-tertiary);
  padding: var(--space-sm) var(--space-md);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
}

.player-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.player-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-md);
}

.player-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.player-score {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.player-score span:first-child {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.game-mode-badge {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

/* =====================================================
   CHRONOMÈTRE
===================================================== */
.timer-container {
  position: relative;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 12;
}

.timer-bar {
  fill: none;
  stroke: var(--primary);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-container.warning .timer-bar {
  stroke: var(--warning);
}

.timer-container.danger .timer-bar {
  stroke: var(--danger);
  animation: timerPulsePlayer 0.5s ease-in-out infinite;
}

@keyframes timerPulsePlayer {
  0%, 100% { stroke-width: 12; }
  50% { stroke-width: 14; }
}

.timer-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

/* =====================================================
   MAIN CONTENT
===================================================== */
.game-main {
  flex: 1;
  padding: var(--space-md);
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.title-icon {
  font-size: 1.5rem;
}

/* =====================================================
   JOKERS
===================================================== */
.jokers-section {
  margin-bottom: var(--space-lg);
  transition: all 0.3s ease;
}

/* Version Mobile : On garde les jokers en haut pour qu'ils soient bien visibles */
@media (max-width: 768px) {
  .jokers-section {
    position: relative; /* On remet dans le flux normal */
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
  }

  /* On garde le titre pour que ce soit clair, mais plus petit */
  .jokers-section .section-title {
    display: flex;
    font-size: 1rem;
    margin-bottom: var(--space-xs);
  }

  .jokers-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .joker-card {
    padding: 8px 4px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-sm);
  }

  .joker-icon {
    font-size: 1.2rem;
  }

  .joker-name {
    font-size: 0.6rem;
    white-space: nowrap;
  }

  .joker-count {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  /* Espace pour la barre de navigation uniquement */
  body {
    padding-bottom: 80px; 
  }
}

.jokers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-sm);
}

/* Animation Pulsation pour Jokers disponibles */
@keyframes joker-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 15px 5px rgba(var(--primary-rgb), 0.2); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

.joker-card.available:not(:disabled) {
  animation: joker-pulse 2s infinite ease-in-out;
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

.joker-card.available:not(:disabled) .joker-count {
  background: #ffcc00;
  color: #000;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}

.joker-card {
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.joker-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: var(--transition);
}

.joker-card:not(:disabled):hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.joker-card:not(:disabled):hover::before {
  opacity: 0.1;
}

.joker-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.joker-card:not(:disabled):active {
  transform: translateY(-2px);
}

.joker-icon {
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

.joker-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.joker-count {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Spy Zone */
.spy-zone {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border: 2px solid var(--info);
  border-radius: var(--radius-md);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spy-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--info);
  margin-bottom: var(--space-xs);
}

.spy-stats {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =====================================================
   ACTION SECTIONS (Buzzer, Roue, etc.)
===================================================== */
.action-section {
  margin-bottom: var(--space-lg);
}

.action-card {
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.action-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.action-icon {
  font-size: 1.8rem;
}

.action-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.action-status {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  text-align: center;
}

/* =====================================================
   BUZZER
===================================================== */
.buzzer-card {
  border-color: var(--warning);
}

.btn-buzz {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  border: none;
  color: white;
  font-size: 2rem;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4);
  transition: var(--transition);
}

.btn-buzz:not(:disabled):hover {
  transform: scale(1.1);
  box-shadow: 0 12px 48px rgba(245, 158, 11, 0.6);
}

.btn-buzz:not(:disabled):active {
  transform: scale(0.95);
}

.btn-buzz:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.buzz-ripple {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 3px solid var(--warning);
  animation: ripple 1.5s ease-out infinite;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.buzz-text {
  position: relative;
  z-index: 1;
}

/* =====================================================
   QCM
===================================================== */
.qcm-section {
  margin-bottom: var(--space-lg);
}

.qcm-card {
  background: var(--bg-secondary);
  border: 2px solid var(--info);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.qcm-status {
  font-size: 0.9rem;
  color: var(--info);
  text-align: center;
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.question-box {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-left: 4px solid var(--primary);
}

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

.answers-grid {
  display: grid;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.btn-qcm-submit {
  width: 100%;
  margin-bottom: var(--space-md);
  padding: 1rem;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-qcm-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-qcm-submit:active {
  transform: translateY(0);
}

.answer-btn {
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.answer-btn:not(:disabled):hover {
  background: var(--bg-primary);
  border-color: var(--primary);
  transform: translateX(4px);
}

.answer-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.answer-btn.selected {
  background: var(--primary);
  border-color: var(--primary-light);
}

.answer-btn.correct {
  background: var(--success);
  border-color: var(--success);
  animation: bounce 0.5s ease;
}

.answer-btn.incorrect {
  background: var(--danger);
  border-color: var(--danger);
  animation: shake 0.5s ease;
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.answer-letter {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.answer-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.qcm-result {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =====================================================
   ROUE DE LA CHANCE
===================================================== */
.wheel-card {
  border-color: var(--secondary);
  text-align: center;
}

.btn-wheel {
  padding: 1.5rem 2.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  margin: 0 auto;
}

.btn-wheel:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5);
}

.btn-wheel:active {
  transform: translateY(-2px);
}

.wheel-icon {
  font-size: 1.5rem;
  animation: rotate 2s linear infinite;
}

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

.wheel-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 600;
  animation: fadeIn 0.3s ease-out;
}

/* =====================================================
   BLIND TEST
===================================================== */
.blindtest-card {
  border-color: var(--secondary);
}

.audio-player {
  margin-bottom: var(--space-lg);
}

.audio-player audio {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.blindtest-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.blindtest-form .input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.blindtest-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.blindtest-form input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.blindtest-form input:focus {
  border-color: var(--primary);
}

.btn-primary {
  padding: var(--space-md) var(--space-lg);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.blindtest-status,
.blindtest-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
}

/* =====================================================
   VOL DE POINTS
===================================================== */
.volpoints-card {
  border-color: var(--danger);
}

.victims-list {
  margin-top: var(--space-md);
}

.victims-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
}

#victims-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.victim-btn {
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 2px solid var(--danger);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.victim-btn:hover {
  background: var(--danger);
  color: white;
  transform: scale(1.02);
}

.volpoints-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
}

/* =====================================================
   NOTIFICATIONS
===================================================== */
.notification-container {
  position: fixed;
  top: 80px;
  right: var(--space-md);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
}

.notification {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification.notification-exchange {
  border-left-color: var(--warning);
}

.notification.notification-steal {
  border-left-color: var(--danger);
}

.notification.notification-gift {
  border-left-color: var(--success);
}

/* =====================================================
   FOOTER
===================================================== */
.game-footer {
  padding: var(--space-md);
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =====================================================
   CLASSEMENT
===================================================== */
.ranking-section {
  margin-bottom: var(--space-lg);
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 400px;
  overflow-y: auto;
}

/* Scrollbar personnalisé */
.ranking-list::-webkit-scrollbar {
  width: 8px;
}

.ranking-list::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.ranking-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-sm);
}

.ranking-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  transition: var(--transition);
  animation: slideInRanking 0.4s ease forwards;
  opacity: 0;
}

@keyframes slideInRanking {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ranking-item:nth-child(1) { animation-delay: 0.05s; }
.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.15s; }
.ranking-item:nth-child(4) { animation-delay: 0.2s; }
.ranking-item:nth-child(5) { animation-delay: 0.25s; }
.ranking-item:nth-child(6) { animation-delay: 0.3s; }
.ranking-item:nth-child(7) { animation-delay: 0.35s; }
.ranking-item:nth-child(8) { animation-delay: 0.4s; }

.ranking-item.is-me {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.ranking-item:hover {
  transform: translateX(4px);
}

/* Top 3 styling */
.ranking-item:nth-child(1) {
  border-color: #facc15;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1) 0%, rgba(234, 179, 8, 0.1) 100%);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.2);
}

.ranking-item:nth-child(2) {
  border-color: #cbd5e1;
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.1) 0%, rgba(148, 163, 184, 0.1) 100%);
}

.ranking-item:nth-child(3) {
  border-color: #f97316;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
}

.ranking-rank {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* Médailles pour le top 3 */
.ranking-item:nth-child(1) .ranking-rank {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  font-size: 1.5rem;
}

.ranking-item:nth-child(2) .ranking-rank {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  font-size: 1.5rem;
}

.ranking-item:nth-child(3) .ranking-rank {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  font-size: 1.5rem;
}

.ranking-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ranking-player-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ranking-item.is-me .ranking-player-name {
  color: var(--primary-light);
}

.ranking-player-name .you-badge {
  display: inline-block;
  margin-left: var(--space-xs);
  padding: 0.15rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ranking-score {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.ranking-empty {
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }
  
  .join-container {
    padding: var(--space-lg);
  }
  
  .join-title {
    font-size: 2rem;
  }
  
  .logo-circle {
    width: 60px;
    height: 60px;
  }
  
  .logo-text {
    font-size: 1.5rem;
  }
  
  .game-main {
    padding: var(--space-sm);
  }
  
  .jokers-section {
    position: sticky;
    top: 82px;
    z-index: 990;
    background: var(--bg-primary);
    padding: 0.5rem 0;
    margin-bottom: var(--space-md);
    border-bottom: 1px solid var(--bg-tertiary);
  }
  
  .jokers-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }
  
  .joker-card {
    padding: var(--space-sm);
    gap: 0.25rem;
  }
  
  .joker-icon {
    font-size: 1.5rem;
  }
  
  .joker-name {
    font-size: 0.7rem;
  }
  
  .joker-count {
    font-size: 0.75rem;
  }
  
  .qcm-card {
    padding: var(--space-md);
  }
  
  .question-box {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }
  
  .question-text {
    font-size: 0.95rem;
  }
  
  .answer-btn {
    padding: var(--space-sm);
    gap: 0.5rem;
    font-size: 0.9rem;
  }
  
  .answer-letter {
    font-size: 0.85rem;
    min-width: 25px;
  }
  
  .answer-text {
    font-size: 0.85rem;
  }
  
  .btn-buzz {
    width: 160px;
    height: 160px;
    font-size: 1.5rem;
  }
  
  .notification-container {
    right: var(--space-sm);
    left: var(--space-sm);
    max-width: none;
  }
  
  .player-score span:first-child {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 1.1rem;
  }

  .ranking-rank {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .ranking-item:nth-child(1) .ranking-rank,
  .ranking-item:nth-child(2) .ranking-rank,
  .ranking-item:nth-child(3) .ranking-rank {
    font-size: 1.3rem;
  }

  .ranking-player-name {
    font-size: 0.9rem;
  }

  .ranking-score {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 13px;
  }

  .game-header {
    padding: 0.5rem var(--space-sm);
  }

  .header-content {
    flex-direction: row;
    gap: var(--space-xs);
    justify-content: space-between;
  }
  
  .player-badge {
    gap: 0.5rem;
  }
  
  .player-avatar {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .player-details {
    gap: 0.1rem;
  }
  
  .player-name {
    font-size: 0.75rem;
  }
  
  .player-score {
    gap: 0.15rem;
  }
  
  .player-score span:first-child {
    font-size: 0.85rem;
  }
  
  .score-label {
    font-size: 0.6rem;
  }
  
  .game-mode-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  .jokers-section {
    position: sticky;
    top: 50px;
    z-index: 990;
    background: var(--bg-primary);
    padding: 0.5rem 0;
    margin-bottom: var(--space-sm);
    border-bottom: 1px solid var(--bg-tertiary);
  }
  
  .jokers-section .section-title {
    display: none;
  }
  
  .section-title {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
  
  .jokers-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.4rem;
  }
  
  .joker-card {
    padding: 0.5rem;
    gap: 0.15rem;
  }
  
  .joker-icon {
    font-size: 1.25rem;
  }
  
  .joker-name {
    font-size: 0.6rem;
    line-height: 1;
  }
  
  .joker-count {
    font-size: 0.65rem;
  }
  
  .qcm-section {
    margin-bottom: var(--space-sm);
  }

  .qcm-card {
    padding: var(--space-sm);
  }
  
  .qcm-status {
    font-size: 0.8rem;
    margin-bottom: var(--space-sm);
  }
  
  .question-box {
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    border-radius: 8px;
  }
  
  .question-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .answers-grid {
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
  }
  
  .answer-btn {
    padding: 0.6rem;
    gap: 0.4rem;
    font-size: 0.8rem;
    border-radius: 8px;
  }
  
  .answer-letter {
    font-size: 0.75rem;
    min-width: 22px;
    text-align: center;
  }
  
  .answer-text {
    font-size: 0.8rem;
    flex: 1;
    word-break: break-word;
  }

  .ranking-section {
    padding: var(--space-md);
  }

  .ranking-item {
    padding: var(--space-sm);
  }
}

/* =====================================================
   BLIND TEST - FORMULAIRE DE RÉPONSE
===================================================== */
.blindtest-form {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  animation: slideDown 0.3s ease-out;
}

.blindtest-form.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blindtest-input-group {
  margin-bottom: var(--space-sm);
}

.blindtest-input-group input {
  width: 100%;
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: var(--transition);
}

.blindtest-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.blindtest-input-group input::placeholder {
  color: var(--text-muted);
}

.btn-blindtest-submit {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
}

.btn-blindtest-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.btn-blindtest-submit:active {
  transform: translateY(0);
}

.btn-blindtest-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* =====================================================
   SÉLECTION DE PERSONNAGES
===================================================== */
.character-selection {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.character-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: var(--space-sm);
  max-height: 200px;
  overflow-y: auto;
}

.character-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
}

.character-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.character-btn .emoji {
  font-size: 2rem;
  transition: var(--transition);
}

.character-btn.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: white;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
  transform: scale(1.1);
}

.character-btn.selected .emoji {
  animation: bounce 0.6s ease;
}

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

/* Animations de chargement buzzer */
.buzzer-winner-loading,
.buzzer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--success);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--success);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  animation: pulse-opacity 1.5s ease-in-out infinite;
}

@media (max-width: 380px) {
  :root {
    font-size: 12px;
  }

  .game-header {
    padding: 0.4rem var(--space-xs);
  }

  .player-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .player-name {
    font-size: 0.7rem;
  }

  .player-score span:first-child {
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  .jokers-grid {
    gap: 0.3rem;
  }

  .joker-card {
    padding: 0.4rem;
    gap: 0.1rem;
  }

  .joker-icon {
    font-size: 1.1rem;
  }

  .joker-name {
    font-size: 0.55rem;
  }

  .joker-count {
    font-size: 0.6rem;
  }

  .question-text {
    font-size: 0.85rem;
  }

  .answer-btn {
    padding: 0.5rem;
    gap: 0.3rem;
    font-size: 0.75rem;
  }

  .answer-letter {
    min-width: 20px;
    font-size: 0.7rem;
  }

  .answer-text {
    font-size: 0.75rem;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.wheel-container-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.wheel-container-player.hidden {
  display: none;
}

.wheel-svg-player {
  filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.3));
  transform-origin: center;
  transition: transform 4s cubic-bezier(0.1, 0, 0.1, 1);
}

.wheel-result-player {
  text-align: center;
  padding: var(--space-md);
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  min-width: 200px;
  animation: fadeIn 0.5s ease-out;
}

.result-player {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.result-effect {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.result-score {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ===================== */
/* OVERLAY RÉSULTAT ROUE */
/* ===================== */
.wheel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(10px);
  padding: var(--space-md);
  animation: fadeIn 0.4s ease-out;
}

.wheel-result-card {
  background: var(--bg-secondary);
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.3);
  border: 2px solid var(--primary);
  animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.card-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: var(--space-md);
  color: white;
}

.header-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.card-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.card-body {
  padding: var(--space-xl) var(--space-md);
}

.lot-icon {
  font-size: 5rem;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.5));
  animation: float 3s ease-in-out infinite;
}

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

.card-body h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.divider {
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: var(--space-md) auto;
  border-radius: var(--radius-full);
}

.card-body p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.card-footer {
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--bg-tertiary);
}

.active-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--success);
  color: white;
  font-weight: 800;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =====================================================
   JOKERS VISIBILITY IMPROVEMENTS
===================================================== */
.joker-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: visible;
}

.joker-card:not(:disabled).available {
  animation: jokerPulse 2s infinite ease-in-out;
  border: 2px solid var(--primary-light);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
  background: rgba(var(--primary-rgb), 0.1);
}

@keyframes jokerPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.2); }
  50% { transform: scale(1.05); box-shadow: 0 0 25px rgba(var(--primary-rgb), 0.5); }
}

.joker-card:disabled {
  opacity: 0.5;
  filter: grayscale(0.8);
  cursor: not-allowed;
}

.joker-card .joker-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 2;
}

/* =====================================================
   MODE 3C IMPROVEMENTS
===================================================== */
.choice-3c-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 20px 0;
  width: 100%;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
  box-shadow: var(--shadow-md);
}

@media (min-width: 480px) {
  .choice-3c-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.btn-3c {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background-color: #1e293b;
  border: 3px solid #334155;
  border-radius: var(--radius-md);
  color: #ffffff !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 120px;
  box-sizing: border-box;
}

.btn-3c:hover {
  background-color: #334155;
  transform: translateY(-2px);
}

.btn-3c:active {
  transform: scale(0.95);
}

.btn-3c.duo { border-color: #3b82f6; box-shadow: 0 4px 0 #1d4ed8; }
.btn-3c.carre { border-color: #8b5cf6; box-shadow: 0 4px 0 #6d28d9; }
.btn-3c.cash { border-color: #ef4444; box-shadow: 0 4px 0 #b91c1c; }

.btn-3c .mode-emoji {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.btn-3c .mode-title {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-3c .mode-pts {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 600;
  margin-top: 4px;
}

/* =====================================================
   NAVIGATION MOBILE
===================================================== */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-tertiary);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.nav-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  gap: 4px;
}

.nav-item.active {
  color: var(--primary-light);
}

.nav-item.active .nav-icon {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 8px rgba(var(--primary-rgb), 0.5));
}

.nav-icon {
  font-size: 1.5rem;
  transition: var(--transition);
}

.nav-text {
  font-size: 0.75rem;
  font-weight: 600;
}

.nav-item .badge {
  position: absolute;
  top: 10px;
  right: calc(50% - 25px);
  background: var(--danger);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

/* =====================================================
   ACHIEVEMENTS VIEW
===================================================== */
.achievements-view {
  padding-bottom: 100px; /* Espace pour la nav */
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.achievements-summary {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.summary-item {
  flex: 1;
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--bg-tertiary);
}

.summary-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-light);
}

.summary-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.player-achievements-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.player-achievement-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border: 2px solid var(--bg-tertiary);
  transition: var(--transition);
  opacity: 0.6;
  filter: grayscale(1);
}

.player-achievement-card.unlocked {
  opacity: 1;
  filter: grayscale(0);
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(var(--primary-rgb), 0.1) 100%);
  box-shadow: var(--shadow-sm);
}

.player-achievement-emoji {
  width: 60px;
  height: 60px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.unlocked .player-achievement-emoji {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.player-achievement-info {
  flex: 1;
}

.player-achievement-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.player-achievement-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.player-achievement-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.unlocked .player-achievement-category {
  color: var(--primary-light);
}

.game-footer {
  padding-bottom: 90px; /* Plus d'espace pour la nav */
}
