* { margin: 0; padding: 0; box-sizing: border-box; }
    
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: #0a0a1a;
  color: #fff;
  min-height: 100vh;
}

body.in-game {
  overflow: hidden;
}
    /* ========== MENU ========== */
    .menu-container {
      min-height: 100vh;
      background: 
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a1a 0%, #151530 50%, #0a0a1a 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }


    /* === MASCOT GRID SELECTOR === */
.mascot-preview-wrapper {
  position: relative;
}

.mascot-preview {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.mascot-preview:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.mascot-grid {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 10, 30, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  min-width: 280px;
}

.mascot-grid.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mascot-grid-item {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  object-fit: cover;
}

.mascot-grid-item:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.mascot-grid-item.selected {
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Scrollbar */
.mascot-grid::-webkit-scrollbar {
  width: 6px;
}

.mascot-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.mascot-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Flèche indicatrice */
.mascot-grid::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(10, 10, 30, 0.98);
}
    .menu-content {
      position: relative;
      z-index: 10;
      text-align: center;
      padding: 2rem;
    }

    .title {
      font-size: clamp(4rem, 12vw, 8rem);
      font-weight: 900;
      letter-spacing: -0.03em;
      line-height: 1;
      margin-bottom: 0.5rem;
    }

    .title-geo {
      background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .title-fus {
      background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .subtitle {
      color: rgba(255,255,255,0.5);
      font-size: 1.25rem;
      margin-bottom: 2rem;
    }

.menu-box {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(30px);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2rem;
  min-width: 900px;
  width: 95%;
  margin: 0 auto;
}

    .rules-section { text-align: left; margin-bottom: 2rem; }
    .rules-title {
      font-size: 1rem;
      font-weight: 600;
      color: rgba(255,255,255,0.9);
      margin-bottom: 1rem;
    }

    .rules-list {
      color: rgba(255,255,255,0.6);
      font-size: 0.9rem;
      line-height: 1.9;
      padding-left: 1.25rem;
    }

    .play-button {
      width: 100%;
      padding: 1.25rem 2rem;
      font-size: 1.1rem;
      font-weight: 700;
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      color: #fff;
      border: none;
      border-radius: 1px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      transition: all 0.3s;
      box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
      font-family: inherit;
      margin-top: 5px;
      z-index: 999;
    }

    .play-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
    }

    /* Sélecteur de difficulté */
    .difficulty-section {
      margin-bottom: 1.5rem;
    }

    .difficulty-title {
      font-size: 0.9rem;
      font-weight: 600;
      color: rgba(255,255,255);
      margin-bottom: 0.75rem;
      text-align: left;
    }

    .difficulty-options {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 0.5rem;
    }

.menu-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
}e

/* Colonne gauche : Options */
.menu-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.options-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.difficulty-btn {
      padding: 0.6rem 0.5rem;
      font-size: 0.85rem;
      font-weight: 600;
      background: rgba(255,255,255,0.05);
      color: rgba(255,255,255,0.6);
      border: 2px solid rgba(255,255,255,0.1);
      cursor: pointer;
      transition: all 0.2s;
      font-family: inherit;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }

    .difficulty-btn img {
      width: 22px;
      height: 22px;
      border-radius: 4px;
      object-fit: cover;
    }

    .difficulty-btn:hover {
      background: rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.8);
    }

    .difficulty-btn.selected {
      border-color: #3b82f6;
      background: rgba(59, 130, 246, 0.2);
      color: #fff;
    }

    .difficulty-btn.easy.selected {
      border-color: #22c55e;
      background: rgba(34, 197, 94, 0.2);
    }

    .difficulty-btn.medium.selected {
      border-color: #f59e0b;
      background: rgba(245, 158, 11, 0.2);
    }

    .difficulty-btn.hard.selected {
      border-color: #ef4444;
      background: rgba(239, 68, 68, 0.2);
    }

    .difficulty-btn.random.selected {
      border-color: #a855f7;
      background: rgba(168, 85, 247, 0.2);
    }

    /* Timer dans le HUD */
    .hud-timer {
      min-width: 80px;
    }

    .hud-timer .hud-value {
      font-variant-numeric: tabular-nums;
    }

    .hud-timer.warning .hud-value {
      color: #f59e0b;
    }

    .hud-timer.danger .hud-value {
      color: #ef4444;
      animation: pulse 0.5s infinite;
    }

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

    /* Image zoomée pour mode moyen/difficile */
    .game-image {
      transition: transform 1s ease-out;
    }
    .game-image.loading {
      opacity: 0;
    }

    .image-container.zoomed-3 .game-image {
      transform: scale(2);
    }

    .image-container.zoomed-2 .game-image {
      transform: scale(1.5);
    }

    .image-container.zoomed-1 .game-image {
      transform: scale(1.25);
    }

    /* Pas de classe = scale(1) normal */

    .mode-info {
      margin-top: 1.5rem;
      padding: 0.75rem 1rem;
      background: rgba(255,255,255,0.03);
      border-radius: 12px;
      color: rgba(255,255,255,0.4);
      font-size: 0.85rem;
    }

    .bg-grid {
      position: absolute;
      inset: 0;
      background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
      background-size: 60px 60px;
      pointer-events: none;
    }

    /* ========== GAME ========== */
    .game-container {
      position: fixed;
      inset: 0;
      background: #000;
      display: none;
    }

    .game-container.active { display: block; }

    .image-container {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a15 100%);
    }

.game-image {
      width: 100%;
      height: 100%;
      object-fit: contain;
      user-select: none;
      pointer-events: none;
    }

    /* HUD */
    .hud {
      position: absolute;
      top: 1rem;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 0.75rem;
      z-index: 100;
    }

    .hud-box {
      background: rgba(0,0,0,0.7);
      backdrop-filter: blur(15px);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 14px;
      padding: 0.6rem 1.25rem;
      text-align: center;
      min-width: 100px;
    }

    .hud-label {
      color: rgba(255,255,255,0.4);
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
    }

    .hud-value {
      color: #fff;
      font-size: 1.35rem;
      font-weight: 700;
    }

    /* ========== MAP ========== */
    .map-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      z-index: 999;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s;
    }

    .map-overlay.active {
      opacity: 1;
      pointer-events: all;
    }

    .map-wrapper {
      position: absolute;
      bottom: 1.5rem;
      right: 1.5rem;
      width: 500px;
      height: 425px;
      min-width: 280px;
      min-height: 200px;
      background: rgba(10, 10, 30, 0.98);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.12);
      overflow: hidden;
      z-index: 100;
      box-shadow: 0 20px 60px rgba(0,0,0,0.5);
      display: flex;
      flex-direction: column;
      resize: both;
      user-select: none;
    }



.hide-btn {
      width: 28px;
      height: 28px;
      border-radius: 6px;
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: #f87171;
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      margin-left: 0.5rem;
    }

    .hide-btn:hover {
      background: rgba(239, 68, 68, 0.4);
      border-color: rgba(239, 68, 68, 0.6);
      color: #fff;
    }

    .map-btn.home-btn {
      width: 32px;
      height: 32px;
      font-size: 1.1rem;
      background: rgba(59, 130, 246, 0.15);
      border: 1px solid rgba(59, 130, 246, 0.3);
      color: #60a5fa;
    }

    .map-btn.home-btn:hover {
      background: rgba(59, 130, 246, 0.3);
      border-color: rgba(59, 130, 246, 0.5);
      color: #fff;
    }

    .show-map-btn {
      position: fixed;
      bottom: 20px;
      right: 20px;
      padding: 12px 20px;
      background: rgba(0, 0, 0, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      color: #fff;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      display: none;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
      z-index: 100;
      font-family: inherit;
    }

    .show-map-btn:hover {
      background: rgba(59, 130, 246, 0.8);
      border-color: rgba(59, 130, 246, 1);
      transform: scale(1.05);
    }

    .show-map-btn.visible {
      display: flex;
    }

    .map-wrapper.hidden {
      display: none !important;
    }



    .map-wrapper.expanded {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 90vw;
      height: 90vh;
      bottom: auto;
      right: auto;
      z-index: 1000;
      resize: none;
      /* PERF: Désactiver backdrop-filter en mode expanded - cause du lag */
      backdrop-filter: none;
      background: rgb(8, 8, 24);
    }

.resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: nw-resize;
  z-index: 10;
}

.resize-handle::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-left: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid rgba(255,255,255,0.3);
}

    .map-wrapper.expanded .resize-handle { display: none; }

.map-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.5rem 0.75rem;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      flex-shrink: 0;
      cursor: grab;
      user-select: none;
    }

    .map-header:active {
      cursor: grabbing;
    }

    .map-wrapper.expanded .map-header {
      cursor: default;
    }

    .map-title {
      color: rgba(255,255,255,0.6);
      font-size: 0.75rem;
      font-weight: 600;
    }

    .map-header-actions {
      display: flex;
      gap: 0.4rem;
      align-items: center;
    }

    .map-btn {
      background: rgba(255,255,255,0.05);
      border: none;
      color: rgba(255,255,255,0.5);
      width: 28px;
      height: 28px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.9rem;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .map-btn:hover {
      background: rgba(255,255,255,0.15);
      color: #fff;
    }

    .zoom-display {
      color: rgba(255,255,255,0.4);
      font-size: 0.65rem;
      min-width: 36px;
      text-align: center;
    }

    .map-container {
      position: relative;
      flex: 1;
      overflow: hidden;
      cursor: grab;
      background: #0d1a0d;
      user-select: none;
    }

    .map-container.dragging { cursor: grabbing; }

    .map-inner {
      position: absolute;
      top: 0;
      left: 0;
      transform-origin: 0 0;
      will-change: transform;
    }

    .map-tiles {
      display: grid;
      position: absolute;
      top: 0;
      left: 0;
      will-change: auto;
    }

    .map-tile {
      width: 100%;
      height: 100%;
      display: block;
      pointer-events: none;
      /* PERF: Optimisation rendu images */
      image-rendering: auto;
      backface-visibility: hidden;
    }

    /* Canvas pour grille et interactions */
    .map-canvas {
      position: absolute;
      top: 0;
      left: 0;
      pointer-events: none;
      /* PERF: Accélération GPU */
      will-change: auto;
    }

    /* Zone d'interaction invisible */
    .map-interaction {
      position: absolute;
      top: 0;
      left: 0;
      cursor: crosshair;
    }

    .coords-tooltip {
      position: absolute;
      bottom: 0.5rem;
      left: 0.5rem;
      background: rgba(0,0,0,0.9);
      color: #fff;
      padding: 0.35rem 0.7rem;
      border-radius: 6px;
      font-size: 0.8rem;
      font-family: monospace;
      font-weight: 600;
      pointer-events: none;
      z-index: 10;
      opacity: 0;
      transition: opacity 0.15s;
    }

    .coords-tooltip.visible { opacity: 1; }

    .guess-button {
      width: 100%;
      padding: 0.85rem;
      font-size: 0.95rem;
      font-weight: 600;
      border: none;
      cursor: pointer;
      transition: all 0.2s;
      font-family: inherit;
      flex-shrink: 0;
    }

    .guess-button.active {
      background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
      color: #fff;
    }

    .guess-button.disabled {
      background: rgba(255,255,255,0.05);
      color: rgba(255,255,255,0.25);
      cursor: not-allowed;
    }

    .guess-button.next {
      background: linear-gradient(135deg, #3b82f6 0%, #d81d1d 100%);
      color: #fff;
    }

    /* ========== RESULT POPUP ========== */
    .round-result-overlay {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 500;
      display: none;
    }

    .round-result-overlay.visible {
      display: block;
      animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes popIn {
      from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
      to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }

    .round-result-box {
      background: rgba(10, 10, 30, 0.97);
      backdrop-filter: blur(30px);
      border-radius: 24px;
      border: 1px solid rgba(255,255,255,0.15);
      padding: 2rem 3rem;
      text-align: center;
      box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    }

    .result-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
    .result-title { font-size: 1.5rem; font-weight: 700; color: #fff; }
    .result-location { color: rgba(255,255,255,0.5); margin-bottom: 1.5rem; }

    .result-stats {
      display: flex;
      gap: 3rem;
      justify-content: center;
      margin-bottom: 1.5rem;
    }

    .stat-label {
      color: rgba(255,255,255,0.4);
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .stat-value { color: #fff; font-size: 1.75rem; font-weight: 700; }
    .stat-value.points { color: #22c55e; }

    .legend-row { display: flex; gap: 2rem; justify-content: center; }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      color: rgba(255,255,255,0.5);
      font-size: 0.8rem;
    }

    .legend-dot { width: 12px; height: 12px; border-radius: 50%; }
    .legend-dot.red { background: #ef4444; }
    .legend-dot.green { background: #22c55e; }

    /* ========== RESULTS ========== */
    /* ========== RESULTS ========== */
    .results-container {
      min-height: 100vh;
      background: 
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a1a 0%, #151530 50%, #0a0a1a 100%);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 2rem;
      position: relative;
    }

    .results-container::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
      background-size: 60px 60px;
      pointer-events: none;
    }

    .results-container.active { display: flex; }

    .results-content { 
      text-align: center; 
      max-width: 700px; 
      width: 100%; 
      position: relative;
      z-index: 1;
    }

    .results-header {
      margin-bottom: 2rem;
    }

    .results-title { 
      font-size: clamp(2rem, 5vw, 3rem); 
      font-weight: 900; 
      margin-bottom: 0.5rem;
      line-height: 1.1;
    }

    .results-title .title-geo {
      background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .results-title .title-fus {
      background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .results-subtitle {
      color: rgba(255,255,255,0.5);
      font-size: 1rem;
    }

    .score-box {
      background: rgba(255,255,255,0.03);
      backdrop-filter: blur(20px);
      border-radius: 24px;
      border: 1px solid rgba(255,255,255,0.08);
      padding: 2rem;
      margin-bottom: 1.5rem;
    }

.score-main {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      margin-bottom: 1.5rem;
    }

    .rank-emoji { 
      font-size: 4.5rem; 
      filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.3));
      line-height: 1;
    }

    .score-info {
      text-align: center;
    }

    .total-score { 
      font-size: clamp(3rem, 8vw, 4.5rem); 
      font-weight: 900; 
      color: #fff; 
      line-height: 1;
      background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .total-max { 
      color: rgba(255,255,255,0.4); 
      font-size: 1rem; 
      margin-top: 0.25rem;
    }

    .rank-badge {
      display: inline-block;
      padding: 0.5rem 1.5rem;
      border-radius: 100px;
      color: #000;
      font-weight: 700;
      font-size: 0.9rem;
    }

.score-stats {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid rgba(255,255,255,0.08);
    }

    .score-stats.solo {
      grid-template-columns: repeat(2, 1fr);
    }

    .score-stat {
      text-align: center;
    }

    .score-stat-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: #fff;
    }

    .score-stat-value.time {
      color: #60a5fa;
    }

    .score-stat-value.accuracy {
      color: #22c55e;
    }

    .score-stat-value.avg {
      color: #f59e0b;
    }

    .score-stat-label {
      font-size: 0.7rem;
      color: rgba(255,255,255,0.4);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-top: 0.25rem;
    }

    /* Stats détaillées multi */
    .multi-stats-table {
      width: 100%;
      margin-top: 1rem;
    }

    .multi-stats-header {
      display: grid;
      grid-template-columns: 1fr repeat(4, 80px);
      gap: 0.5rem;
      padding: 0.75rem;
      background: rgba(255,255,255,0.03);
      border-radius: 10px 10px 0 0;
      font-size: 0.65rem;
      color: rgba(255,255,255,0.4);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .multi-stats-header > div:not(:first-child) {
      text-align: center;
    }

    .multi-stats-row {
      display: grid;
      grid-template-columns: 1fr repeat(4, 80px);
      gap: 0.5rem;
      padding: 0.75rem;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      font-size: 0.85rem;
      align-items: center;
    }

    .multi-stats-row:last-child {
      border-bottom: none;
    }

    .multi-stats-row.is-me {
      background: rgba(59, 130, 246, 0.1);
      border-radius: 8px;
    }

    .multi-stats-row > div:not(:first-child) {
      text-align: center;
    }

    .multi-stats-name {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: 600;
      color: #fff;
    }

    .multi-stats-medal {
      font-size: 1.1rem;
    }

    .multi-stats-you {
      font-size: 0.65rem;
      color: #60a5fa;
      background: rgba(59, 130, 246, 0.2);
      padding: 2px 6px;
      border-radius: 4px;
    }

    .multi-stats-value {
      color: rgba(255,255,255,0.7);
      font-variant-numeric: tabular-nums;
    }

    .multi-stats-value.score {
      color: #22c55e;
      font-weight: 700;
    }

    .multi-stats-value.time {
      color: #60a5fa;
    }

    .multi-stats-value.distance {
      color: #f59e0b;
    }

    /* Détail par round pour un joueur */
    .player-rounds-detail {
      margin-top: 0.5rem;
      padding: 0.75rem;
      background: rgba(0,0,0,0.2);
      border-radius: 8px;
      display: none;
    }

    .player-rounds-detail.visible {
      display: block;
    }

    .player-rounds-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
      gap: 0.5rem;
    }

    .player-round-item {
      text-align: center;
      padding: 0.5rem;
      background: rgba(255,255,255,0.03);
      border-radius: 6px;
      font-size: 0.75rem;
    }

    .player-round-num {
      color: rgba(255,255,255,0.4);
      font-size: 0.65rem;
      margin-bottom: 0.25rem;
    }

    .player-round-points {
      color: #22c55e;
      font-weight: 600;
    }

    .player-round-time {
      color: rgba(255,255,255,0.5);
      font-size: 0.65rem;
    }

    .rounds-recap {
      background: rgba(255,255,255,0.02);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,0.06);
      padding: 1.25rem;
      margin-bottom: 1.5rem;
      text-align: left;
    }

    .recap-title {
      font-size: 0.85rem;
      font-weight: 700;
      margin-bottom: 1rem;
      padding-bottom: 0.75rem;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      color: rgba(255,255,255,0.9);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .recap-header {
      display: grid;
      grid-template-columns: 60px 1fr 70px 70px 80px;
      gap: 0.5rem;
      padding: 0.5rem 0;
      font-size: 0.65rem;
      color: rgba(255,255,255,0.3);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .recap-row {
      display: grid;
      grid-template-columns: 60px 1fr 70px 70px 80px;
      gap: 0.5rem;
      padding: 0.75rem 0;
      border-bottom: 1px solid rgba(255,255,255,0.04);
      font-size: 0.85rem;
      align-items: center;
    }

    .recap-row:last-child {
      border-bottom: none;
    }

    .recap-round { 
      color: rgba(255,255,255,0.5);
      font-weight: 600;
    }

    .recap-name { 
      color: #fff; 
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .recap-distance { 
      color: rgba(255,255,255,0.5); 
      text-align: right;
      font-size: 0.8rem;
    }

    .recap-time { 
      text-align: right;
      font-size: 0.8rem;
      color: #60a5fa;
      font-variant-numeric: tabular-nums;
    }

    .recap-points { 
      color: #22c55e; 
      font-weight: 700; 
      text-align: right;
    }

    .recap-row.perfect .recap-points {
      color: #fbbf24;
    }

    .recap-row.timeout .recap-time {
      color: #ef4444;
    }

    .results-actions { 
      display: flex; 
      gap: 1rem; 
      justify-content: center;
    }

    .btn-primary, .btn-secondary {
      padding: 1rem 2rem;
      font-size: 0.95rem;
      font-weight: 600;
      border-radius: 14px;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.3s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .btn-primary {
      background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
      color: #fff;
      border: none;
      box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }

    .btn-secondary {
      background: rgba(255,255,255,0.05);
      color: rgba(255,255,255,0.7);
      border: 1px solid rgba(255,255,255,0.15);
    }

    .btn-secondary:hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
    }

    /* Multi results specific */
    .multi-podium {
      display: flex;
      justify-content: center;
      align-items: flex-end;
      gap: 0.5rem;
      margin-bottom: 1.5rem;
    }

    .podium-place {
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      padding: 1rem;
      text-align: center;
      transition: all 0.3s;
    }

    .podium-place.first {
      background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
      border-color: rgba(255, 215, 0, 0.3);
      transform: scale(1.05);
      padding: 1.25rem;
    }

    .podium-place.second {
      background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0.05));
      border-color: rgba(192, 192, 192, 0.3);
    }

    .podium-place.third {
      background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.05));
      border-color: rgba(205, 127, 50, 0.3);
    }

    .podium-medal {
      font-size: 2rem;
      margin-bottom: 0.5rem;
    }

    .podium-name {
      color: #fff;
      font-weight: 700;
      font-size: 0.9rem;
      margin-bottom: 0.25rem;
    }

    .podium-score {
      color: rgba(255,255,255,0.6);
      font-size: 0.8rem;
    }

    .podium-you {
      font-size: 0.65rem;
      color: #60a5fa;
      margin-top: 0.25rem;
    }

/* ===== MULTIJOUEUR - NOUVEAU DESIGN ===== */

    .mp-section-divider {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin: 1.75rem 0;
    }

    .mp-section-divider::before,
    .mp-section-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    }

    .mp-section-divider span {
      color: rgba(255,255,255,0.4);
      font-size: 0.8rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .mp-container {
      margin-top: 1.5rem;
    }

    .mp-tabs {
      display: flex;
      background: rgba(255,255,255,0.03);
      border-radius: 14px;
      padding: 4px;
      margin-bottom: 1.25rem;
    }

    .mp-tab {
      flex: 1;
      padding: 0.75rem 1rem;
      border: none;
      background: transparent;
      color: rgba(255,255,255,0.5);
      font-family: inherit;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      border-radius: 10px;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }

.has-tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4);
  display: inline;
}

.has-tooltip .bonus-info-popup {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: rgba(15, 15, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.8rem;
  min-width: 300px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: all 0.2s ease;
  z-index: 100;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.has-tooltip:hover .bonus-info-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bonus-info-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #fbbf24;
  font-size: 0.85rem;
}

.bonus-table {
  width: 100%;
  border-collapse: collapse;
}

.bonus-table th, 
.bonus-table td {
  padding: 0.4rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bonus-table th {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  font-size: 0.7rem;
}

.bonus-table td:first-child {
  text-align: left;
}

.bonus-table tr:last-child td {
  border-bottom: none;
}

.bonus-table .no-bonus {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

    .mp-tab:hover {
      color: rgba(255,255,255,0.8);
      background: rgba(255,255,255,0.05);
    }

    .mp-tab.active {
      background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
      color: #fff;
    
    }

    .mp-tab-content {
      display: none;
    }

    .mp-tab-content.active {
      display: block;
      animation: fadeIn 0.3s ease;
    }

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

    .mp-card {
      background: rgba(255,255,255,0.02);
      border: 1px solid rgba(255,255,255,0.08);
      padding: 1.25rem;
    }

.mp-card-header {
      text-align: center;
      margin-bottom: 1.25rem;
    }

.mp-card-title {
      font-size: 1.1rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 0.25rem;
    }

    .mp-card-desc {
      font-size: 0.85rem;
      color: rgba(255,255,255,0.5);
    }

    .mp-form-group {
      margin-bottom: 1rem;
    }

    .mp-form-label {
      display: block;
      font-size: 0.75rem;
      font-weight: 600;
      color: rgba(255,255,255,0.6);
      margin-bottom: 0.5rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .mp-form-row {
      display: flex;
      gap: 0.75rem;
    }

    .mp-input {
      flex: 1;
      padding: 0.85rem 1rem;
      border-radius: 12px;
      background: rgba(0,0,0,0.3);
      border: 1px solid rgba(255,255,255,0.1);
      color: #fff;
      font-family: inherit;
      font-size: 0.9rem;
      transition: all 0.2s;
    }

    .mp-input:focus {
      outline: none;
      border-color: rgba(59, 130, 246, 0.5);
      background: rgba(0,0,0,0.4);
    }

    .mp-input::placeholder {
      color: rgba(255,255,255,0.3);
    }

    .mp-input.code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 1.1rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      text-align: center;
    }

    .mp-select {
      padding: 0.85rem 1rem;
      border-radius: 12px;
      background: rgba(0,0,0,0.3);
      border: 1px solid rgba(255,255,255,0.1);
      color: #fff;
      font-family: inherit;
      font-size: 0.9rem;
      cursor: pointer;
      min-width: 130px;
    }

    .mp-select:focus {
      outline: none;
      border-color: rgba(59, 130, 246, 0.5);
    }

    .mp-btn {
      width: 100%;
      padding: 1rem 1.5rem;
      border: none;
      border-radius: 12px;
      font-family: inherit;
      font-size: 0.95rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }

    .mp-btn.primary {
      background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
      color: #fff;
      border-radius: 0%;
    }

    .mp-btn.primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    }

    .mp-btn.success {
      background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
      color: #fff;
      box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
      border-radius: 0%;

    }

    .mp-btn.success:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    }

    /* ===== LOBBY ===== */

    .mp-lobby {
      display: none;
    }

    .mp-lobby.active {
      display: block;
    }

    .mp-lobby-card {
      background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
      border: 1px solid rgba(59, 130, 246, 0.2);
      border-radius: 16px;
      padding: 1.5rem;
    }

    .mp-lobby-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 1.25rem;
    }

    .mp-lobby-title {
      font-size: 0.85rem;
      font-weight: 600;
      color: rgba(255,255,255,0.5);
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .mp-lobby-code-box {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-top: 0.5rem;
    }

    .mp-lobby-code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 1.75rem;
      font-weight: 800;
      color: #fff;
      letter-spacing: 0.15em;
      background: linear-gradient(135deg, #3b82f6, #8b5cf6);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .mp-copy-btn {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.15);
      background: rgba(255,255,255,0.05);
      color: rgba(255,255,255,0.7);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      transition: all 0.2s;
    }

    .mp-copy-btn:hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
    }

    .mp-copy-btn.copied {
      background: rgba(34, 197, 94, 0.2);
      border-color: rgba(34, 197, 94, 0.4);
      color: #22c55e;
    }

    .mp-badges {
      display: flex;
      gap: 0.5rem;
    }

    .mp-badge {
      padding: 0.4rem 0.75rem;
      border-radius: 8px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      color: rgba(255,255,255,0.7);
      font-size: 0.75rem;
      font-weight: 600;
    }

    .mp-badge.difficulty {
      border-color: rgba(245, 158, 11, 0.3);
      background: rgba(245, 158, 11, 0.1);
      color: #f59e0b;
    }

    .mp-badge.rounds {
      border-color: rgba(139, 92, 246, 0.3);
      background: rgba(139, 92, 246, 0.1);
      color: #a78bfa;
    }

    .mp-players-section {
      margin-top: 1.25rem;
      padding-top: 1.25rem;
      border-top: 1px solid rgba(255,255,255,0.08);
    }

    .mp-players-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.75rem;
    }

    .mp-players-title {
      font-size: 0.8rem;
      font-weight: 700;
      color: rgba(255,255,255,0.6);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .mp-players-count {
      font-size: 0.8rem;
      color: rgba(255,255,255,0.4);
    }

    .mp-players-list {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .mp-player {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.75rem 1rem;
      background: rgba(0,0,0,0.2);
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.05);
    }

    .mp-player-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .mp-player-avatar {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
    }

    .mp-player-name {
      font-weight: 600;
      color: #fff;
    }

    .mp-player-you {
      font-size: 0.7rem;
      color: rgba(255,255,255,0.4);
      margin-left: 0.5rem;
      background: rgba(255,255,255,0.1);
      padding: 2px 6px;
      border-radius: 4px;
    }

    .mp-player-status {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.8rem;
      font-weight: 600;
    }

    .mp-player-status.ready {
      color: #22c55e;
    }

    .mp-player-status.waiting {
      color: rgba(255,255,255,0.4);
    }


    /* ===== TRANSITION ENTRE ROUNDS ===== */
    
    .mp-next-round-overlay {
      position: fixed;
      bottom: 2rem;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 0, 0, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 16px;
      padding: 1rem 1.75rem;
      display: none;
      align-items: center;
      gap: 1rem;
      z-index: 600;
      animation: slideUp 0.3s ease;
    }

    .mp-next-round-overlay.visible {
      display: flex;
    }

    @keyframes slideUp {
      from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(20px); 
      }
      to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
      }
    }

    .mp-next-round-spinner {
      width: 24px;
      height: 24px;
      border: 3px solid rgba(255, 255, 255, 0.1);
      border-top-color: #3b82f6;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }

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

    .mp-next-round-text {
      color: rgba(255, 255, 255, 0.9);
      font-size: 0.9rem;
      font-weight: 600;
    }

    .mp-next-round-countdown {
      background: rgba(59, 130, 246, 0.2);
      border: 1px solid rgba(59, 130, 246, 0.3);
      color: #60a5fa;
      font-size: 0.85rem;
      font-weight: 700;
      padding: 0.3rem 0.6rem;
      border-radius: 8px;
      min-width: 28px;
      text-align: center;
      font-variant-numeric: tabular-nums;
    }

    .mp-status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: currentColor;
    }

    .mp-lobby-actions {
      margin-top: 1.25rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .mp-btn.ready {
      background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    }

    .mp-btn.ready.done {
      background: rgba(34, 197, 94, 0.2);
      border: 1px solid rgba(34, 197, 94, 0.3);
      color: #22c55e;
      cursor: default;
      transform: none;
      box-shadow: none;
    }

    .mp-btn.start {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    }

    .mp-btn.start:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }

    .mp-btn-leave {
      background: transparent;
      border: none;
      color: rgba(255,255,255,0.4);
      font-family: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      padding: 0.5rem;
      transition: color 0.2s;
    }

    .mp-btn-leave:hover {
      color: #ef4444;
    }


    /* ===== MASCOT SELECTOR ===== */
    .mascot-selector {
      display: flex;
      align-items: center;
      gap: 0.3rem;
    }
    .mascot-title,
.rounds-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}

.mascot-selector-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.mascot-selector-main .mascot-preview {
  width: 80px;
  height: 80px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}

.mascot-selector-main .mascot-preview:hover {
  border-color: #fbbf24;
  transform: scale(1.05);
}

    .mascot-arrow {
      background: rgba(255,255,255,0.1);
      border: 1px solid rgba(255,255,255,0.2);
      color: rgba(255,255,255,0.7);
      width: 20px;
      height: 20px;
      border-radius: 1px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.7rem;
      transition: all 0.2s;
      font-family: inherit;
    }

    .mascot-arrow:hover {
      background: rgba(255,255,255,0.2);
      color: #fff;
    }

    .mascot-preview {
      width: 80px;
      height: 80px;
      border-radius: 1px;
      border: 2px solid rgba(255,255,255,0.2);
      object-fit: cover;
      background: rgba(0,0,0,0.3);
    }

    .mp-form-row-mascot {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .mp-form-row-mascot .mp-input {
      flex: 1;
    }

    /* Mascot in lobby */
    .mp-player-mascot {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      object-fit: cover;
      border: 2px solid rgba(255,255,255,0.15);
    }

    /* Mascot in results */
    .multi-stats-mascot {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      object-fit: cover;
      margin-right: 0.5rem;
    }

    .podium-mascot {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      object-fit: cover;
      margin-bottom: 0.5rem;
      border: 2px solid rgba(255,255,255,0.2);
    }

    .podium-place.first .podium-mascot {
      border-color: rgba(255, 215, 0, 0.5);
    }
        .zoom-bonus {
      display: inline-block;
      background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
      color: #fff;
      font-size: 0.75em;
      font-weight: 700;
      padding: 0.2em 0.5em;
      border-radius: 6px;
      margin-left: 0.5rem;
      animation: bonusPop 0.4s ease-out;
    }



/* ===== ROUNDS SELECTOR ===== */
.rounds-section {
  flex: 1;
}

.mascot-section {
  flex: 1;
}

    .rounds-title {
      font-size: 0.85rem;
      font-weight: 600;
      color: rgba(255,255,255,0.6);
      margin-bottom: 0.75rem;
    }

    .rounds-select {
      width: 100%;
      max-width: 200px;
      padding: 0.75rem 1rem;
      font-size: 1rem;
      font-weight: 600;
      font-family: inherit;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 12px;
      color: #fff;
      cursor: pointer;
      transition: all 0.2s;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 1rem center;
    }

    .rounds-select:hover {
      border-color: rgba(255,255,255,0.3);
      background-color: rgba(255,255,255,0.08);
    }

    .rounds-select:focus {
      outline: none;
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .rounds-select option {
      background: #1a1a2e;
      color: #fff;
    }

    /* Barre de préchargement */
    .preload-bar {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 4px;
      background: rgba(0, 0, 0, 0.3);
      z-index: 9999;
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .preload-bar.hidden {
      opacity: 0;
      transform: translateY(-100%);
      pointer-events: none;
    }
    
    .preload-progress {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #22c55e, #4ade80);
      box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
      transition: width 0.1s ease;
    }
    
    .preload-text {
      position: fixed;
      top: 12px;
      left: 50%;
      transform: translateX(-50%);
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.7);
      background: rgba(0, 0, 0, 0.5);
      padding: 4px 12px;
      border-radius: 20px;
      z-index: 9999;
      transition: opacity 0.5s ease;
      font-family: 'Outfit', sans-serif;
    }
    
    .preload-bar.hidden .preload-text {
      opacity: 0;
    }

    /* === LEADERBOARD MODAL === */
.leaderboard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.leaderboard-modal-content {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #ffd700;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
}

.leaderboard-modal-header {
  margin-bottom: 16px;
}

.leaderboard-trophy {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
  animation: bounce 0.6s ease infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.leaderboard-modal-header h2 {
  color: #ffd700;
  font-size: 24px;
  margin: 0;
}

.leaderboard-score-info {
  color: #ccc;
  margin-bottom: 24px;
}

.leaderboard-score-info strong {
  color: #fff;
  font-size: 1.2em;
}

.leaderboard-input-group {
  margin-bottom: 24px;
}

.leaderboard-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #333;
  border-radius: 8px;
  background: #0a0a15;
  color: #fff;
  text-align: center;
  transition: border-color 0.2s;
}

.leaderboard-input:focus {
  outline: none;
  border-color: #ffd700;
}

.leaderboard-error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}

.leaderboard-modal-buttons {
  display: flex;
  gap: 12px;
}

.leaderboard-btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.leaderboard-btn.submit {
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  color: #000;
}

.leaderboard-btn.submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

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

.leaderboard-btn.skip {
  background: transparent;
  border: 2px solid #444;
  color: #888;
}

.leaderboard-btn.skip:hover {
  border-color: #666;
  color: #aaa;
}

/* Toast */
.leaderboard-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: #fff;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10001;
  box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
}

.leaderboard-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === LEADERBOARD VIEW === */
.leaderboard-view-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  padding: 1rem;
}

.leaderboard-view-content {
  background: linear-gradient(145deg, #12122a 0%, #1a1a3e 100%);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.15);
}

.leaderboard-view-header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-view-header h2 {
  color: #ffd700;
  font-size: 1.5rem;
  margin: 0 0 0.25rem 0;
}

.leaderboard-view-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  margin: 0;
}

.leaderboard-view-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.leaderboard-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.leaderboard-empty span {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.leaderboard-empty p {
  margin: 0;
  font-size: 1rem;
}

.leaderboard-empty-sub {
  font-size: 0.85rem !important;
  margin-top: 0.5rem !important;
  opacity: 0.6;
}

/* Table */
.leaderboard-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-header {
  display: grid;
  grid-template-columns: 50px 1fr 90px 70px;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lb-row {
  display: grid;
  grid-template-columns: 50px 1fr 90px 70px;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.lb-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.lb-row.top-three {
  background: rgba(255, 215, 0, 0.05);
}

.lb-row.top-three:hover {
  background: rgba(255, 215, 0, 0.1);
}

.lb-row.current-player {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.lb-col.rank {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.lb-row.top-three .lb-col.rank {
  font-size: 1.1rem;
}

.lb-col.pseudo {
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-col.score {
  color: #22c55e;
  font-weight: 700;
  text-align: right;
}

.lb-col.time {
  color: #60a5fa;
  text-align: right;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* Pagination */
.leaderboard-pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.lb-page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}

.lb-page-btn:hover:not(.disabled):not(.active) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.lb-page-btn.active {
  background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

.lb-page-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Close button */
.leaderboard-view-close {
  width: 100%;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.leaderboard-view-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Scrollbar */
.leaderboard-view-body::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-view-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.leaderboard-view-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.leaderboard-view-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* === SPECTATOR PANEL === */
.spectator-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem;
  min-width: 200px;
  max-width: 280px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.spectator-panel.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.spectator-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.spectator-players {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
}

.spectator-player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  transition: all 0.2s;
}

.spectator-player.answered {
  background: rgba(34, 197, 94, 0.1);
}

.spectator-player.waiting {
  opacity: 0.6;
}

.spectator-player.is-me {
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.1);
}

.spectator-mascot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.spectator-name {
  flex: 1;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spectator-status {
  font-size: 0.9rem;
}

.spectator-player.answered .spectator-status {
  color: #22c55e;
}

.spectator-player.waiting .spectator-status {
  color: rgba(255, 255, 255, 0.4);
}

.spectator-tip {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1rem;
  font-weight: 600;
  color: #60a5fa;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.spectator-tip.warning {
  color: #f59e0b;
}

.spectator-tip.critical {
  color: #ef4444;
  animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
  from { opacity: 1; }
  to { opacity: 0.6; }
}

/* Scrollbar */
.spectator-players::-webkit-scrollbar {
  width: 4px;
}

.spectator-players::-webkit-scrollbar-track {
  background: transparent;
}

.spectator-players::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* Mobile */
@media (max-width: 768px) {
  .spectator-panel {
    top: 70px;
    right: 10px;
    left: auto;
    max-width: 200px;
  }
}

  


    @keyframes bonusPop {
      0% { transform: scale(0); opacity: 0; }
      50% { transform: scale(1.2); }
      100% { transform: scale(1); opacity: 1; }
    }


    /* Colonne droite : Jouer */
.menu-play {
  border-left: 1px solid rgba(255,255,255,0.1);
  padding-left: 2rem;
}

.play-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.play-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-align: center;
  margin-bottom: 0.5rem;
}

.play-button.solo {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.play-button.solo:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.mp-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.mp-divider::before,
.mp-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}

/* Multi compact */
.mp-container {
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 1rem;
}

.mp-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mp-tab {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.mp-tab.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.mp-tab-content {
  display: none;
}

.mp-tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mp-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mp-input {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  width: 100%;
}

.mp-input.code {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}



/* Responsive */
@media (max-width: 768px) {
  .menu-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .menu-play {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-left: 0;
    padding-top: 1.5rem;
  }

  .options-row {
    flex-direction: column;
    gap: 1rem;
  }
}
.lb-col.pseudo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lb-mascot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

/* === BOUTON CLASSEMENT ACCUEIL === */


.home-leaderboard-btn {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  padding: 0.5rem 0.3rem;
}
.home-leaderboard-btn-container{
  margin-top: -1.1rem;

  }

.home-leaderboard-btn:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.2);
}

/* === MODAL LEADERBOARD === */
.home-lb-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.home-lb-modal.visible {
  opacity: 1;
  visibility: visible;
}

.home-lb-modal-content {
  background: #0f0f23;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

.home-lb-modal.visible .home-lb-modal-content {
  transform: translateY(0);
}

.home-lb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.home-lb-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fbbf24;
  margin: 0;
}

.home-lb-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.home-lb-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.home-lb-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.home-lb-select {
  flex: 1;
  background: rgba(26,26,46,1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.home-lb-select:focus {
  outline: none;
  border-color: #3b82f6;
}

.home-lb-content {
  min-height: 200px;
}

.home-lb-loading {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem;
}

.home-lb-empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  padding: 2rem;
  font-style: italic;
}

/* Table des scores */
.home-lb-table {
  width: 100%;
  border-collapse: collapse;
}

.home-lb-table th,
.home-lb-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-lb-table th {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-lb-table td {
  font-size: 0.9rem;
}

.home-lb-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.home-lb-table .rank {
  width: 50px;
  text-align: center;
  font-weight: 700;
}

.home-lb-table .rank-1 { color: #ffd700; }
.home-lb-table .rank-2 { color: #c0c0c0; }
.home-lb-table .rank-3 { color: #cd7f32; }

.home-lb-table .player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.home-lb-table .player-mascot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.home-lb-table .player-name {
  font-weight: 500;
}

.home-lb-table .score {
  font-weight: 700;
  color: #60a5fa;
}

.home-lb-table .time {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* Scrollbar modal */
.home-lb-modal-content::-webkit-scrollbar {
  width: 6px;
}

.home-lb-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.home-lb-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
  .home-lb-modal-content {
    padding: 1rem;
    max-height: 90vh;
  }

  .home-lb-filters {
    flex-direction: column;
  }

  .home-lb-table th,
  .home-lb-table td {
    padding: 0.6rem 0.35rem;
    font-size: 0.8rem;
  }

  .home-lb-table .player-mascot {
    width: 24px;
    height: 24px;
  }
}

/* Catégories (vue toutes difficultés) */
.home-lb-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.home-lb-category {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 1rem;
}

.home-lb-category-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-lb-mini-table {
  width: 100%;
}

.home-lb-mini-table td {
  padding: 0.4rem 0.25rem;
  font-size: 0.8rem;
  border: none;
}

.home-lb-mini-table .rank {
  width: 30px;
}

.home-lb-mini-table .player-mascot {
  width: 22px;
  height: 22px;
}

@media (max-width: 768px) {
  .home-lb-categories {
    grid-template-columns: 1fr;
  }
}

/* Boutons difficulté leaderboard */
.home-lb-difficulty-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.home-lb-diff-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.home-lb-diff-btn img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.home-lb-diff-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.home-lb-diff-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #fff;
}

.home-lb-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* === MODE SURVIE === */
.survival-section {
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.play-button.survival {
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
  position: relative;
  z-index: 999;
}

.play-button.survival:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.survival-lb-btn {

    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: -0.3rem;
}

.survival-lb-btn:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.3), rgba(153, 27, 27, 0.2)) !important;
}

/* HUD Survie */
.hud-box.survival-mode {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(153, 27, 27, 0.1));
  border-color: rgba(220, 38, 38, 0.3);
}

.hud-box.survival-mode .hud-value {
  color: #f87171;
}

/* Écran Game Over Survie */
.survival-gameover {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.survival-gameover.visible {
  opacity: 1;
  visibility: visible;
}

.survival-gameover-content {
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 100%);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.survival-gameover-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.survival-gameover-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 0.5rem;
}

.survival-gameover-streak {
  font-size: 3rem;
  font-weight: 900;
  color: #fbbf24;
  margin: 1rem 0;
}

.survival-gameover-streak span {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  font-weight: 500;
}

.survival-gameover-location {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.survival-gameover-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.survival-gameover-actions button {
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.survival-retry-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
}

.survival-retry-btn:hover {
  transform: translateY(-2px);
}

.survival-home-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.survival-home-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Streak indicator pendant le jeu */
.survival-streak-display {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 0.75rem 2rem;
  text-align: center;
  z-index: 500;
  display: none;
}

.survival-streak-display.visible {
  display: block;
  animation: streakPop 0.3s ease;
}

.survival-streak-display .streak-number {
  font-size: 2rem;
  font-weight: 900;
  color: #fbbf24;
}

.survival-streak-display .streak-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes streakPop {
  0% { transform: translateX(-50%) scale(0.8); }
  50% { transform: translateX(-50%) scale(1.1); }
  100% { transform: translateX(-50%) scale(1); }
}
/* === FOOTER === */
.site-footer {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-contact {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: #60a5fa;
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-legal {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  line-height: 1.5;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* S'assurer que le footer reste en bas */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.menu-screen {
  flex: 1;
}