/* 📱 CORRECTION DU SCROLL MOBILE POUR POPUPS */

/* Scroll complet pour les overlays de popup */
#unified-game-over-popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  z-index: 15000 !important;
}

/* Container du popup avec scroll sécurisé */
#unified-game-over-popup > div {
  width: 95% !important;
  max-width: 450px !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  position: relative !important;
  box-sizing: border-box !important;
  padding-bottom: 50px !important; /* Espace en bas pour voir les boutons */
}

/* Assurer que tous les boutons sont visibles */
#unified-game-over-popup button {
  width: 80% !important;
  max-width: 280px !important;
  margin: 10px auto !important;
  display: block !important;
  touch-action: manipulation !important;
  min-height: 50px !important;
  font-size: 16px !important;
}

/* Style spécifique pour boutons principaux */
#save-online-btn,
#save-local-btn {
  padding: 15px 30px !important;
  margin-bottom: 15px !important;
}

/* Bouton voir classement */
#view-leaderboard-btn {
  padding: 12px 25px !important;
  margin-bottom: 20px !important;
}

/* Bouton fermer */
#close-popup-btn {
  padding: 10px 20px !important;
  margin-top: 20px !important;
  margin-bottom: 30px !important;
}

/* Zone de saisie responsive */
#player-name-input {
  width: 80% !important;
  max-width: 280px !important;
  padding: 12px 15px !important;
  font-size: 16px !important;
  margin-bottom: 20px !important;
}

/* Forcer l'affichage en colonne sur mobile */
@media screen and (max-width: 768px) {
  #unified-game-over-popup .button-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }
  
  #unified-game-over-popup button {
    width: 90% !important;
    max-width: 300px !important;
  }
}