/* style.css */

/* --- Loader Styles --- */
.loader {
  position: fixed; /* Couvre toute la page */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 30, 0.95); /* Fond sombre semi-transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Au-dessus de tout le reste */
  opacity: 1;
  transition: opacity 0.6s ease-out; /* Pour la disparition en douceur */
  pointer-events: auto; /* Interagit au début */
}

.loader.hidden {
  opacity: 0;
  pointer-events: none; /* N'interagit plus quand caché */
  /* On ne le met pas en display:none pour laisser la transition d'opacité se faire */
}

.loader-content {
  text-align: center;
}

.loader-icon {
  font-size: 6rem; /* Grande taille pour l'emoji */
  display: inline-block; /* Permet l'animation transform */
  animation: bounceTilt 1.8s infinite ease-in-out;
  text-shadow: 0 0 15px rgba(255, 235, 59, 0.6); /* Légère lueur jaune */
}

.loader-text {
  margin-top: 20px;
  font-size: 1.6rem;
  color: #ffeb3b; /* Couleur jaune Picol'Up */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
  animation: pulseText 2s infinite ease-in-out;
}

/* Animation pour l'emoji */
@keyframes bounceTilt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(-8deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(8deg); }
}

/* Animation pour le texte */
@keyframes pulseText {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

/* --- Fin Loader Styles --- */

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Fredoka One', cursive;
  background: linear-gradient(270deg, #ff7e5f, #feb47b, #86a8e7, #91eae4);
  background-size: 800% 800%;
  animation: gradient 15s ease infinite;
  color: #fff;
  display: flex;
  justify-content: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#app {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* --- Menus --- */
.menu {
  display: none;
  flex-direction: column;
}
.menu.active {
    display: flex;
    flex: 1; /* <-- AJOUTER: Permet au menu actif de grandir */
    min-height: 0; /* <-- AJOUTER: Important pour le flex sizing correct */
}

/* --- Animations --- */
.fade-animation { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Header --- */
.header { padding-bottom: 10px; flex-shrink: 0; margin-bottom: 10px; }

.logo {
  margin-bottom: 20px;
}

.title-and-back {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header h1 { font-size: 1.8rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.header-game { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.header-buttons { display: flex; gap: 8px; }
.beer-icon { font-size: 2.2rem; }

/* --- Contenu des Menus --- */
.content {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 10px;
  overflow-y: auto; /* Garder ceci pour le défilement */
  margin-bottom: 10px;
  /* flex-shrink: 0; <-- Peut être retiré ou laissé, mais flex: 1 est plus important */
  flex: 1; /* <-- AJOUTER: Fait grandir le contenu dans l'espace restant du menu */
  min-height: 0; /* <-- AJOUTER: Important pour le flex sizing correct */
  position: relative;
  /* --- NOUVELLE Propriété MASK --- */
  /* Définit le masque par défaut (tout visible) */
  mask-image: linear-gradient(to bottom, black 100%, transparent 100%);
  /* La transition s'appliquera au changement de mask-image */
  transition: mask-image 0.5s ease-in-out;

  /* --- Styles Webkit pour compatibilité --- */
  -webkit-mask-image: linear-gradient(to bottom, black 100%, transparent 100%);
  -webkit-transition: -webkit-mask-image 0.5s ease-in-out;
}

/* --- Appliquer le masque de fondu quand la classe est présente --- */
.content.show-scroll-indicator {
   /* Le dégradé du masque :
      - Commence transparent en haut (laisse voir le contenu)
      - Devient progressivement noir opaque vers le bas (cache le contenu)
      - La transition se fait sur les 60 derniers pixels */
  mask-image: linear-gradient(
    to bottom,            /* Direction */
    black calc(100% - 60px), /* Opaque jusqu'à 60px du bas */
    transparent 100%     /* Complètement transparent tout en bas */
  );
  /* Taille et répétition non nécessaires pour ce type de masque simple */
  /* mask-size: 100% 100%; */
  /* mask-repeat: no-repeat; */

  /* --- Styles Webkit pour compatibilité --- */
   -webkit-mask-image: linear-gradient(
    to bottom,
    black calc(100% - 60px),
    transparent 100%
  );
}

/* --- Zone de jeu --- */
/* --- Assurer le contexte de positionnement --- */
#gameArea {
  position: relative; /* Important pour le positionnement absolu des enfants */
  overflow: hidden; /* Peut être utile pour contenir les éléments */
}
#gameContent {
  flex: 1;
  display: flex; /* Centrer la carte initialement */
  justify-content: center;
  align-items: center;
  position: relative; /* Référence pour la carte si non overlay */
  overflow: hidden; /* Empêche débordement SI pas d'overlay */
  padding: 10px 5px;
}

/* Carte Principale */
.card {
  background: rgba(40, 40, 40, 0.4);
  padding: 20px;
  border-radius: 15px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  font-size: 1.3rem;
  position: relative; /* Ou absolute si géré par JS pour centrage */
  opacity: 1;
  transition: opacity 0.4s ease-out, background 0.3s, transform 0.3s ease-out;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  pointer-events: auto;
  color: #fff;
  cursor: pointer; /* Curseur main par défaut pour la carte */
}
.card.hidden { /* Classe pour masquer la carte si overlay actif */
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute; /* Pour ne pas prendre de place */
}
/* --- NOUVEAU STYLE CARTE JACKPOT --- */

.card.jackpot-win {
    background: linear-gradient(145deg, #f1c40f, #ffeb3b, #f1c40f);
    border: 3px solid #fff;
    box-shadow: 0 0 15px rgba(255, 235, 59, 0.7);

}

.card.jackpot-win .card-header {
    color: #a07000; /* Couleur header plus sombre */
    text-shadow: 1px 1px 2px rgba(255,255,255,0.6);
}
.card.jackpot-win p .player-name {
    color: #c0392b; /* Nom joueur en rouge sur fond or ? Ou garder sombre ? */
     /* color: #555; */
    text-shadow: none; /* Pas d'ombre spécifique, ou une ombre claire */
}
/* --- FIN NOUVEAU STYLE --- */

.card p { text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); line-height: 1.5; }
.card.special { border: 2px solid rgba(255, 255, 255, 0.6); }
.card-header {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #ffeb3b;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}
#cardActionContainer { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* --- Pied de page du jeu --- */
.game-footer {
  /* display: flex; /* Ligne principale */
  /* justify-content: space-between; /* Fullscreen à gauche, Reste à droite */
  /* align-items: center; /* Centre verticalement sur la ligne */
  padding: 10px 10px 15px 10px; /* Un peu de padding global */
  flex-shrink: 0;
  position: relative; /* Contexte pour le panneau timer */
  /* flex-wrap: wrap; /* Au cas où l'écran est TRES petit */
  /* gap: 10px;
}

.footer-right-buttons {
    display: flex;
    flex-direction: column; /* *** ALIGNEMENT VERTICAL *** */
    align-items: flex-end; /* Aligne les boutons à droite dans leur colonne */
    gap: 10px; /* Espace entre Dé et Timer */
}

/* Si besoin d'ajuster l'espace des conteneurs Dé/Timer */
#diceContainer,
#timerContainer {
    display: flex; /* Permet au bouton d'avoir la taille de son contenu */
    /* justify-content: flex-end;
    width: 100%; /* Pour s'assurer qu'ils prennent la largeur nécessaire dans la colonne */
     position: relative; /* CONTEXTE important pour le panneau timer ABSOLU */
}

#diceContainer .dice-btn {
     margin-right: 12px; /* Ajuste pour aligner avec le dé qui apparait à droite */
	 margin-top: 6px;
	 max-height: 37px;
}


/* --- Bouton Principal Lancer Chrono --- */
.timer-btn {
    flex-shrink: 0; /* Empêche de rétrécir si manque de place (préfère wrap) */
	padding: 8px 12px !important;
}

.timer-btn:hover:not(:disabled) {
  transform: scale(1.05);
  background: #f1c40f;
}
.timer-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.timer-btn-time {
  font-weight: bold;
  font-variant-numeric: tabular-nums; /* Garde largeur fixe pour les chiffres */
}
.timer-btn-time.hidden {
    display: none;
}

/* État Bouton Chrono terminé */
.timer-btn.finished {
  animation: timerFinishedPulse 0.8s ease-in-out infinite;
  background-color: #2ecc71; /* Vert pour succès */
  color: white;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
}

@keyframes timerFinishedPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(46, 204, 113, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 15px rgba(46, 204, 113, 0.9); }
}

/* --- Panneau de Contrôle Timer --- */
.timer-controls {
  position: absolute;
   bottom: 25%; /* Au-dessus du bouton, légèrement plus proche */
 /*  right: 8px; /* Alignement initial à droite */
   width: 260px;
   margin: 10%;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  padding: 15px;
   z-index: 550;
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  pointer-events: none;
   /* Assurer marge par rapport aux bords de #app via right/left ou max-width */
   box-sizing: border-box; /* padding inclus dans width/max-width */
}
.timer-controls:not(.hidden) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Styles mobile - ajuster le positionnement si besoin */
@media (max-width: 340px) {
    .footer-right-buttons {
        width: auto; /* Laisse les boutons dicter la largeur */
    }
    .timer-controls {
        width: calc(100vw - 30px); /* Largeur presque complète moins padding app */
        max-width: 300px; /* Limite max même sur mobile */
        /* Recentre le panneau au dessus des boutons si l'écran est étroit */
         right: 80%;
         transform: translateX(50%) scale(0.95);
         transform-origin: bottom center;
         bottom: calc(100% + 8px); /* Reste au dessus */
    }
     .timer-controls:not(.hidden) {
         transform: translateX(50%) scale(1);
     }
     .timer-presets, .timer-actions {
         justify-content: center;
     }
}

.timer-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffeb3b;
    font-size: 1.1rem;
}

.timer-close-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
     transition: color 0.2s, transform 0.2s;
}
.timer-close-btn:hover {
    color: #fff;
     transform: rotate(90deg);
}

.timer-display {
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  font-variant-numeric: tabular-nums;
  color: #eee;
  cursor: default;
}
.timer-editable {
    cursor: pointer;
    padding: 2px 5px; /* Léger padding pour zone cliquable */
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s, outline 0.2s;
  /*  display: inline-block; /* Pour contentEditable */
  /*  min-width: 50px; /* Donne un peu de largeur minimale *//
    text-align: center;
    vertical-align: baseline; /* Maintient l'alignement */
     /* Empêche le retour à la ligne pendant l'édition */
     white-space: nowrap;
     overflow: hidden;
}
.timer-editable:hover:not(.editing) { /* Ne pas appliquer au survol PENDANT l'édition */
    background-color: rgba(255, 255, 255, 0.1);
}
.timer-editable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
/* Style PENDANT l'édition */
.timer-editable.editing {
    background-color: rgba(0, 0, 0, 0.4); /* Fond sombre */
    color: #fff;                      /* Chiffres tapés en blanc */
    outline: 1px solid #ffeb3b;      /* Contour jaune */
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.5); /* Légère lueur */
    cursor: text; /* Curseur texte */
}
/* Cache le texte placeholder pendant l'édition active */
.timer-editable.editing::before {
     /* content: ''; */ /* On pourrait mettre les chiffres grisés ici si besoin, mais le simple contentEditable suffit souvent */
     /* color: #666; */
     /* position: absolute; */
}

/* Input manuel (initialement caché) */
#timer-manual-input-container {
    margin-bottom: 10px;
    position: relative; /* Pour positionner l'input si besoin */
    /* Initialement caché par la classe hidden */
}
#timer-manual-input-container.hidden {
    display: none;
}

#timerManualInput {
    width: 100%;
    padding: 10px;
    font-size: 1.5rem;
    text-align: center;
    border: 1px solid #ffeb3b;
    background-color: #444;
    color: #fff;
    border-radius: 5px;
     /* Empêcher les flèches natives sur certains navigateurs */
     -moz-appearance: textfield;
}
#timerManualInput::-webkit-outer-spin-button,
#timerManualInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.preset-btn {
  font-size: 0.85rem;
  padding: 8px 10px;
  min-width: 50px; /* Pour un minimum de taille */
  flex-grow: 1; /* Occupe l'espace */
  background-color: rgba(255, 255, 255, 0.15);
  color: #eee;
  text-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.preset-btn:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.03);
}
.preset-btn.active { /* Si on veut montrer le preset actif */
    background-color: #ffeb3b;
    color: #333;
    border-color: #f1c40f;
}

/* Style des boutons du panneau (Reset/Start/Pause) */
.timer-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px; /* Ajout espace au dessus */
}
.timer-action-btn {
  flex-grow: 1;
  font-size: 1rem;
  padding: 10px 12px; /* Ajusté légèrement pour emojis */
  color: white; /* Texte blanc pour contraste */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  border: none;
  display: flex; /* Pour aligner emoji et texte */
  align-items: center;
  justify-content: center;
  gap: 6px; /* Espace entre emoji et texte */
}

#timerResetBtn {
    background-color: #e74c3c; /* Rouge */
}
#timerResetBtn:hover:not(:disabled) {
    background-color: #c0392b;
}
#timerResetBtn:disabled { /* Griser si désactivé */
    background-color: #a75a53;
    color: #d1a09c;
}
.timer-start-btn {
    background-color: #2ecc71 !Important; /* Vert */
}
.timer-start-btn:hover:not(:disabled) {
    background-color: #27ae60;
}
.timer-start-btn:disabled { /* Griser si désactivé (pendant édition) */
     background-color: #5dab7a;
     color: #b8e1ca;
}
/* Style spécifique quand c'est "Pause" */
#timerStartPauseBtn.pause-btn {
    background-color: #f39c12; /* Orange */
}
#timerStartPauseBtn.pause-btn:hover:not(:disabled) {
    background-color: #e67e22;
}
#timerStartPauseBtn.pause-btn:disabled { /* Pas normalement désactivé en pause, mais sécurité */
    background-color: #b7853f;
    color: #e7c99f;
}


/* --- Overlay Fin de Chrono --- */
.timer-end-overlay {
  position: fixed; /* Couvre TOUT le viewport */
  inset: 0; /* Raccourci pour top/right/bottom/left = 0 */
  width: 100%;
  height: 100%;
  background: rgba(46, 204, 113, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Au-dessus de la plupart des éléments, potentiellement sous les modals si besoin de z-index plus élevé */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  text-align: center;
  backdrop-filter: blur(4px);
}
.timer-end-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto; /* Reste auto pour permettre fermeture au clic si implémenté */
}

.timer-end-content {
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    animation: timerEndTextAppear 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    transform: scale(0.7);
    opacity: 0;
}
.timer-end-content p {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
}
.timer-end-content span {
    font-size: 3rem;
    display: inline-block;
    animation: timerEndEmojiSpin 2s linear infinite;
}
.timer-end-content span:last-child {
    animation-delay: -1s; /* Décalage pour le deuxième emoji */
}

@keyframes timerEndTextAppear {
  from { opacity: 0; transform: scale(0.7) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes timerEndEmojiSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-around; /* Ou space-between */
  margin-bottom: 15px;
}

/* --- Boutons --- */
.btn {
  background: #ffeb3b;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  transition: transform 0.15s ease-out, background 0.3s, opacity 0.3s;
  color: #333;
  white-space: nowrap;
  text-shadow: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; background: #bdc3c7; color: #7f8c8d; }
.btn:hover:not(:disabled) { transform: scale(1.05); background: #f1c40f; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.small-btn { font-size: 0.85rem; padding: 8px 12px; }
.next-btn { width: calc(100% - 10px); margin-top: 20px; padding: 15px 20px; font-size: 1.1rem; }
.add-btn { font-size: 1.6rem; width: 45px; height: 45px; border-radius: 50%; padding: 0; line-height: 45px; flex-shrink: 0; }
.back-btn { color: #333; }
.back-btn:hover:not(:disabled) { background: #f1c40f; }

/* --- Listes Joueurs / Règles --- */
.player-input { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.player-input input { flex-grow: 1; padding: 12px; border-radius: 8px; border: none; font-family: 'Fredoka One', cursive; font-size: 1rem; color: #333; }
#playerList, #ruleList { margin: 15px 0; padding: 0; list-style: none; }
#playerList li, #ruleList li { background: rgba(255, 255, 255, 0.2); margin: 8px 0; padding: 10px 15px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; }
.delete-player-btn {
  background-color: #ffeb3b; color: #333; border: none; border-radius: 6px;
  width: 28px; height: 28px; font-size: 1.1rem; font-weight: bold;
  line-height: 28px; text-align: center; cursor: pointer; padding: 0;
  margin-left: 10px; flex-shrink: 0; transition: background-color 0.2s, transform 0.1s;
  text-shadow: none;
}
.delete-player-btn:hover { background-color: #f1c40f; transform: scale(1.1); }
.delete-player-btn:active { transform: scale(1); }

/* --- Boutons de mode (1 par ligne) --- */
.modes {
  display: flex; /* Empile verticalement */
  flex-direction: column;
  gap: 10px; /* Espace entre boutons */
  margin-bottom: 20px;
}
.mode-btn {
  border: 2px solid transparent;
  transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.2s;
  padding: 15px 10px;
  font-size: 0.95rem;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 55px;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  margin: 0; /* Pas de marge externe */
  width: 100%; /* Prend toute la largeur */
}
.mode-btn:hover:not(.active) { background: rgba(0,0,0,0.4); transform: translateY(-2px); }
.mode-btn.active { border-color: #fff; background: rgba(255,255,255,0.35); color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.7); transform: scale(1.02); }

/* --- Options (Robot / Fée / Bombe Atomique) --- */
.theme-selection { padding: 8px 0; border-radius: 5px; }
.theme-selection label { display: flex; align-items: center; cursor: pointer; padding: 8px 5px; font-size: 1.05rem; transition: background-color 0.2s; border-radius: 5px; }
.theme-selection label:hover { background-color: rgba(255, 255, 255, 0.1); }
.theme-selection input[type="checkbox"] { margin-right: 10px; width: 20px; height: 20px; cursor: pointer; accent-color: #ffeb3b; }

/* --- Dé (Général et Mini-Jeu) --- */
.dice-btn { padding: 8px 12px; } /* Style bouton dé */
.dice {
  width: 50px; height: 50px; background: #fff; color: #2c3e50; font-size: 2rem;
  display: flex; justify-content: center; align-items: center; border-radius: 8px;
  opacity: 0; transform: scale(0.8) rotate(-90deg);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  text-shadow: none;
  margin-bottom: 12px;
}
.dice.show { opacity: 1; transform: scale(1) rotate(0deg); }
@keyframes shakeDice { 0%, 100% { transform: translateX(0) rotate(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-4px) rotate(-3deg); } 20%, 40%, 60%, 80% { transform: translateX(4px) rotate(3deg); } }
.shake-animation { animation: shakeDice 0.6s cubic-bezier(.36,.07,.19,.97) both; }

/* --- Modal Règles --- */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.75); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; transition: opacity 0.3s ease-out; pointer-events: none; }
.modal:not(.hidden) { opacity: 1; pointer-events: auto; }
.modal-content { background: #3a3a3a; padding: 25px; border-radius: 12px; width: 90%; max-width: 420px; color: #fff; transform: translateY(-20px) scale(0.95); transition: transform 0.3s ease-out, opacity 0.3s ease-out; opacity: 0; position: relative; }
.modal:not(.hidden) .modal-content { transform: translateY(0) scale(1); opacity: 1; }
.close { cursor: pointer; font-size: 1.6rem; color: #ccc; transition: color 0.2s, transform 0.2s; text-shadow: none; position: absolute; top: 10px; right: 15px; }
.close:hover { color: #fff; transform: rotate(90deg); }
.modal h2 { margin-bottom: 20px; font-size: 1.5rem; text-align: center; }
.modal textarea { width: 100%; min-height: 90px; padding: 12px; border-radius: 8px; border: none; margin-bottom: 20px; font-family: sans-serif; font-size: 1rem; color: #333; background-color: #f0f0f0; line-height: 1.4; }
.modal button { width: 100%; padding: 14px; font-size: 1.1rem; }
#ruleList { margin-top: 20px; }
#ruleList li { font-size: 1rem; padding: 8px 12px; background: rgba(255, 255, 255, 0.15); }

/* --- GÉNÉRAL Intervention Fée/Robot --- */

/* Overlay général (apparaît derrière l'animation) */
.intervention-overlay {
  position: fixed; /* Couvre tout */
  inset: 0;
  z-index: 850; /* Juste en dessous de l'animation */
  opacity: 0;
  transition: opacity 0.3s ease-in-out; /* Fade in/out doux */
  pointer-events: none; /* Ne bloque pas les clics en dessous (normalement) */
  display: flex; /* Pour centrer le conteneur d'anim */
  justify-content: center;
  align-items: center;
}
.intervention-overlay.visible {
  opacity: 1;
}

/* Conteneur de l'animation (icône + texte) */
.intervention-anim-container {
  position: relative; /* Changé en relative pour positionner dedans */
  z-index: 900; /* Au-dessus de l'overlay */
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0; /* Géré par l'animation */
  transform: scale(0.5); /* Commence petit */
}

/* Icône Grosse */
.intervention-anim-icon {
  font-size: 8rem; /* ENCORE PLUS GROS */
  line-height: 1;
  display: block;
  margin-bottom: 10px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.5); /* Ombre générique */
}

/* Texte Explicatif Grosse & Claire */
.intervention-anim-explanation {
  font-size: 2.2rem; /* Très lisible */
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 8px;
  text-align: center;
  opacity: 0; /* Apparition gérée par keyframes */
  transform: translateY(15px); /* Commence un peu bas */
}

/* --- Styles Spécifiques ROBOT (Œil Rouge) --- */
.robot-eye-overlay {
  background: radial-gradient(ellipse at center, rgba(30, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 70%); /* Centre rouge sombre vers noir */
  /* Option: ajouter une bordure pulsante */
  /* box-shadow: inset 0 0 30px 10px rgba(255, 0, 0, 0.5); */
  /* animation: pulseRedBorder 1.5s infinite ease-in-out; */
}
/* @keyframes pulseRedBorder { 0%, 100% { box-shadow: inset 0 0 20px 5px rgba(255, 0, 0, 0.4); } 50% { box-shadow: inset 0 0 40px 15px rgba(255, 0, 0, 0.7); } } */

.robot-eye-animation {
  animation: robotEyeAppear 1.5s forwards ease-in-out;
}
.robot-eye-animation .intervention-anim-icon {
  color: #ff0000; /* Couleur rouge de l'oeil */
  text-shadow: 0 0 15px #ff0000, 0 0 25px #ff4d4d; /* Lueur rouge */
}
.robot-eye-animation .intervention-anim-explanation {
  color: #ababab; /* Gris clair pour le texte */
  background-color: rgba(10, 10, 10, 0.85); /* Fond très sombre */
  border: 1px solid #444;
  text-shadow: 1px 1px 1px #000;
  animation: robotTextAppear 0.4s 0.6s forwards ease-out; /* Apparaît après 0.6s */
}

@keyframes robotEyeAppear {
  0% { opacity: 0; transform: scale(0.2) rotate(180deg); }
  40% { opacity: 1; transform: scale(1.1) rotate(0deg); } /* Arrive et dépasse */
  60% { transform: scale(1); } /* Stabilise */
  /* Reste visible jusqu'à 90% */
  90% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.7); } /* Disparaît en rétrécissant */
}
@keyframes robotTextAppear {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}


/* --- Styles Spécifiques FÉE (Tourbillon Paillettes) --- */
.fairy-sparkle-overlay {
  background: radial-gradient(ellipse at center, rgba(255, 223, 186, 0.6) 0%, rgba(255, 182, 193, 0.4) 100%); /* Dégradé doré pâle vers rose pâle */
  backdrop-filter: blur(3px); /* Flou léger */
}

/* Animation du CONTENEUR (mouvement, opacité générale) */
.fairy-sparkle-animation {
  animation: fairySparkleAppear 2.0s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animation SPÉCIFIQUE à l'ICÔNE (couleur/scintillement ET flou final) */
.fairy-sparkle-animation .intervention-anim-icon {
   animation: fairyIconEffects 2.0s forwards linear; /* Applique couleur ET flou final */
}

/* Styles du texte (inchangé, mais l'animation d'apparition est séparée) */
.fairy-sparkle-animation .intervention-anim-explanation {
  color: #b48c2c;
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.8), rgba(255, 235, 205, 0.8));
  border: 1px solid rgba(255, 215, 0, 0.7);
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.7);
  /* L'animation d'apparition du texte */
  animation: fairyTextAppear 0.6s 0.7s forwards ease-out;
}

/* Keyframes pour le CONTENEUR (SANS le filter: blur final) */
@keyframes fairySparkleAppear {
   0% { opacity: 0; transform: scale(0.3) rotate(-360deg); /* Pas de flou ici, géré par l'icône */ }
   50% { opacity: 1; transform: scale(1.05) rotate(10deg); } /* Arrive en tournant */
   70% { transform: scale(1) rotate(-5deg); } /* Flotte légèrement */
   /* Reste visible jusqu'à 90% */
   90% { opacity: 1; transform: scale(1) rotate(0deg); }
   100% { opacity: 0; transform: scale(0.5) rotate(90deg); /* Disparait (opacité + transform), MAIS PAS de flou */ }
}

/* Keyframes pour l'apparition du TEXTE (inchangé) */
@keyframes fairyTextAppear {
  from { opacity: 0; transform: translateY(15px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* Keyframes pour les effets de l'ICÔNE FÉE (couleur/scintillement + flou final) */
@keyframes fairyIconEffects {
    0%   { filter: blur(5px) drop-shadow(0 0 10px #ffd700); color: #fff8dc; opacity: 0; } /* Commence floue et invisible (synchro avec conteneur)*/
    10%  { opacity: 1; filter: blur(0px) drop-shadow(0 0 10px #ffd700); color: #fff8dc; } /* Devient nette et visible */
    25%  { filter: blur(0px) drop-shadow(0 0 12px #ffb6c1); color: #ffebf0; }
    50%  { filter: blur(0px) drop-shadow(0 0 10px #add8e6); color: #f0f8ff; }
    75%  { filter: blur(0px) drop-shadow(0 0 12px #98fb98); color: #f0fff0; }
    90%  { opacity: 1; filter: blur(0px) drop-shadow(0 0 10px #ffd700); color: #fff8dc; } /* Reste nette juste avant la fin */
    100% { opacity: 0; filter: blur(8px) drop-shadow(0 0 10px #ffd700); } /* Devient floue JUSTE en disparaissant (synchro opacité avec conteneur) */
}

/* --- NOUVEAU Style pour les gorgées modifiées --- */
.modified-sips-value {
  /* color: #55efc4; /* Vert clair / turquoise */
  font-weight: bold;
  /* Optionnel : légère animation d'apparition ou pulse */
  /* animation: pulseGreen 0.6s ease-out; */
}
.hidden { display: none !important; opacity: 0 !important; pointer-events: none !important; visibility: hidden !important; }
.player-name { color: #ffeb3b; font-weight: bold; }

/* Style Robot : Gris très sombre + lueur rouge pure */
.modified-sips-value.robot-modified {
  color: #333333; /* Gris un peu moins écrasant que #2b2b2b, mais toujours sombre */
  /* Plusieurs couches de lueur ROUGE, pas de blanc ! */
  text-shadow:
    /* Lueur interne rouge plus vive */
    0 0 3px rgba(255, 0, 0, 0.9),
    /* Lueur principale rouge */
    0 0 8px rgba(255, 0, 0, 0.7),
    /* Lueur externe rouge plus diffuse */
    0 0 12px rgba(255, 0, 0, 0.5),
    /* Ombre noire très subtile pour détacher (optionnel) */
    1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* Style Fée : Texte Bleu (gardé) + Lueur Dorée/Blanche */
.modified-sips-value.fairy-modified {
  color: #1780b3; /* On garde ton bleu pour l'instant */
  /* Combinaison de lueurs dorées et blanches, pas de vert */
  text-shadow:
    /* Éclat blanc interne net */
    0 0 2px rgba(255, 255, 255, 0.9),
    /* Lueur dorée principale */
    0 0 7px rgba(255, 215, 0, 0.85), /* #FFD700 */
    /* Halo doré plus large et doux */
    0 0 15px rgba(255, 223, 186, 0.6); /* #FFDFBA (Pale Gold) */
}
/* --- Overlays Généraux (Plein Écran) --- */
.overlay {
  position: fixed; /* !Important: Pour couvrir tout l'écran */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8); /* Fond par défaut */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 500; /* Au dessus de #gameArea mais sous le modal */
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  pointer-events: none;
  padding: 20px;
  overflow-y: auto; /* Scroll si contenu dépasse */
}
.overlay:not(.hidden) { opacity: 1; pointer-events: auto; }
.overlay.hidden { display: none !important; } /* Force la disparition */

/* Styles communs pour textes/boutons dans overlays */
.overlay h2 { color: #fff; margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); font-size: 1.8rem; text-align: center; }
.overlay-instruction { font-size: 1.2rem; margin-bottom: 20px; color: #eee; text-align: center; line-height: 1.5; }
.overlay-instruction strong, .overlay-instruction .player-name { color: #ffeb3b; }
.overlay-message { font-size: 1.2rem; min-height: 2.5em; text-align: center; padding: 0 15px; color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.6); line-height: 1.4; margin-bottom: 15px; }
.overlay-message strong { color: #ffeb3b; }
.result-text { font-size: 1.3rem; margin-top: 15px; margin-bottom: 15px; text-align: center; color: #fff; line-height: 1.5; }
.result-text strong, .result-text .player-name { color: #ffeb3b; font-size: 1.5rem; }
.overlay-action-container { margin-top: 15px; display: flex; justify-content: center; }
.continue-btn { margin-top: 20px; font-size: 1.1rem; }

/* --- Jeu de la Bouteille --- */
#bottleOverlay { background: rgba(0,0,0,0.85); /* Fond sombre pour contraste */ }
.bottle { font-size: clamp(120px, 40vw, 250px); line-height: 1; transform-origin: center center; transform: rotate(0deg); text-shadow: 0 0 20px rgba(255,255,255,0.3); }
#bottleResultContainer {
  width: 90%; max-width: 340px; background: rgba(30, 30, 30, 0.95); color: #fff;
  padding: 20px; border-radius: 10px; text-align: center; z-index: 11; opacity: 0;
  pointer-events: none; transform: translateY(20px); transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
#bottleResultContainer.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#bottleResultContainer p { font-size: 1.4rem; margin-bottom: 15px; line-height: 1.4; }
#bottleResultContainer strong { color: #ffeb3b; font-size: 1.7rem; }
#bottleResultButtons { display: flex; justify-content: center; gap: 15px; margin-top: 15px; }
#bottleResultButtons .btn { font-size: 1rem; padding: 10px 20px; }
#bottleRestartBtn { background-color: #e74c3c; color: white; }
#bottleRestartBtn:hover:not(:disabled) { background-color: #c0392b; }

/* --- Machine à Sous --- */
.slot-machine-overlay { background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%); border: 6px ridge #ffd700; border-radius: 20px; justify-content: space-evenly; }
.slot-machine-overlay h2 { color: #ffd700; margin-bottom: 10px; }
.slot-reels { display: flex; gap: 15px; margin-bottom: 15px; background: #222; padding: 20px 15px; border-radius: 15px; box-shadow: inset 0 4px 10px rgba(0,0,0,0.6); width: auto; }
.reel {
  width: 75px; height: 100px; background: #f0f0f0; border: 4px solid #777;
  border-radius: 10px; overflow: hidden; position: relative;
}
.reel .icons-wrapper {
  position: absolute; top: 0; left: 0; width: 100%;
  /* La transformation et la transition sont gérées par JS */
}
.reel .icon {
  font-size: 50px; height: 100px; line-height: 100px;
  text-align: center; display: block; text-shadow: none;
  color: #333; flex-shrink: 0;
}
#slotMessage { /* utilise .overlay-message */ }
#slotActionContainer { /* utilise .overlay-action-container */ }
.slot-button { background: linear-gradient(180deg, #ff416c, #ff4b2b); color: white; font-size: 1.25rem; padding: 14px 30px; border: 2px solid #fff; border-radius: 10px; text-transform: uppercase; text-shadow: 1px 1px 2px rgba(0,0,0,0.4); }
.slot-button:hover:not(:disabled) { background: linear-gradient(180deg, #ff4b2b, #ff416c); transform: scale(1.03); }
#initialSlotRollBtn { background: #ffeb3b; color: #333; border: none; border-radius: 8px; font-size: 1rem; padding: 12px 20px; text-transform: none; text-shadow: none; }
#initialSlotRollBtn:hover:not(:disabled) { background: #f1c40f; transform: scale(1.05); }
.jackpot-anim-text { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%) scale(0); font-size: 3.5rem; color: #ffd700; text-shadow: 0 0 10px #ffd700, 0 0 25px #ffdd00, 0 0 40px #ff0000, 0 0 70px #ff0000; animation: jackpotZoom 1.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; z-index: 21; text-align: center; pointer-events: none; width: 100%; }
@keyframes jackpotZoom { 0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0; } 60% { transform: translate(-50%, -50%) scale(1.3) rotate(8deg); opacity: 1; } 80% { transform: translate(-50%, -50%) scale(0.9) rotate(-4deg); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; } }

/* --- Bombe Classique (Overlay généré par JS) --- */
.bomb-overlay { background: rgba(10, 0, 0, 0.85); /* Fond très sombre, légèrement rouge */ cursor: default; /* Pas de curseur main par défaut */ }
.bomb-overlay.clickable { cursor: pointer; } /* Curseur main quand cliquable */
.chrono-text { color: #ff4d4d; margin-bottom: 25px; font-size: 4.5rem; text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000; font-variant-numeric: tabular-nums; }
.chrono-text.stress { animation: stressPulse 0.8s infinite ease-in-out; }
@keyframes stressPulse { 0% { color: #ff4d4d; transform: scale(1);} 50% { color: #ffffff; transform: scale(1.15);} 100% { color: #ff4d4d; transform: scale(1);} }
.explosion { font-size: 12rem; animation: explode 0.6s ease-out forwards; line-height: 1; text-shadow: 0 0 15px rgba(255,165,0,0.8), 0 0 30px rgba(255,69,0,0.6); }
@keyframes explode { 0% { transform: scale(0.5) rotate(0deg); opacity: 0; } 50% { transform: scale(1.8) rotate(10deg); opacity: 1; } 100% { transform: scale(1.5) rotate(-5deg); opacity: 1; } }
.explosion-text { font-size: 2.8rem; margin-top: 15px; text-align: center; color: #ffcc00; animation: fadeInResult 0.5s 0.4s forwards; line-height: 1.4; }
@keyframes fadeInResult { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.bomb-continue-text { font-size: 1rem; color: #aaa; margin-top: 20px; animation: fadeIn 1s 0.6s forwards; opacity: 0; } /* Apparait après le texte BOOM */

/* --- Rouge ou Noir --- */
.rouge-noir-overlay { background: linear-gradient(to bottom right, #0f2027, #203a43, #2c5364); }
.rouge-noir-overlay h2 { color: #e0e0e0; margin-bottom: 10px; }
.card-deck {
    perspective: 1000px; margin-bottom: 25px; width: 110px; height: 160px; /* Dimensions fixes pour positionnement */
    position: relative; /* Pour positionner placeholder et revealed */
}
.card-placeholder, .revealed-card-container {
    width: 100%; height: 100%; position: absolute; top: 0; left: 0;
    transition: transform 0.6s; transform-style: preserve-3d;
}
.card-placeholder {
    background: linear-gradient(135deg, #666, #333); border: 3px solid #aaa; border-radius: 10px;
    display: flex; justify-content: center; align-items: center; font-size: 3rem; color: #aaa;
    cursor: default; /* Pas cliquable directement */
    transform: rotateY(0deg); /* Face visible au début */
    backface-visibility: hidden; /* Cache le dos */
    z-index: 1;
}
.revealed-card-container {
    transform: rotateY(180deg); /* Caché au début */
    backface-visibility: hidden; /* Cache le dos */
    z-index: 2;
}
.revealed-card { /* Style de la carte interne */
    width: 100%; height: 100%; background: #fff; border-radius: 10px;
    color: #333; display: flex; flex-direction: column; justify-content: space-around;
    align-items: center; padding: 10px;
}
.revealed-card.red { color: #e74c3c; border: 3px solid #e74c3c; }
.revealed-card.black { color: #333; border: 3px solid #333; }
.revealed-card .rank { font-size: 2.8rem; font-weight: bold; }
.revealed-card .suit { font-size: 2rem; }
/* Animation */
.card-deck.flipped .card-placeholder { transform: rotateY(-180deg); } /* Tourne vers l'arrière */
.card-deck.flipped .revealed-card-container { transform: rotateY(0deg); } /* Tourne vers l'avant */

.button-group { display: flex; gap: 15px; margin-bottom: 15px; justify-content: center; flex-wrap: wrap; } /* justify et wrap */
.color-btn { padding: 12px 25px; font-size: 1.1rem; color: white; border: 2px solid white; }
.color-btn.red { background-color: #c0392b; }
.color-btn.red:hover:not(:disabled) { background-color: #e74c3c; }
.color-btn.black { background-color: #34495e; }
.color-btn.black:hover:not(:disabled) { background-color: #506a83; }
#rougeNoirResult.win { color: #2ecc71; }
#rougeNoirResult.lose { color: #e74c3c; }
/* Styles spécifiques boutons symboles */
.suit-btn { /* << NOUVEAU */
    padding: 10px 18px; /* Ajuster padding */
    font-size: 1.8rem; /* Taille symbole */
    min-width: 60px; /* Largeur minimale */
    color: #333; /* Couleur symbole noir par défaut */
    background-color: #fff; /* Fond blanc */
    border: 2px solid #555;
    line-height: 1; /* Ajuster hauteur ligne */
}
.suit-btn.red { /* << NOUVEAU */
    color: #e74c3c; /* Couleur symbole rouge */
    border-color: #e74c3c;
}
.suit-btn:hover:not(:disabled) { /* << NOUVEAU */
   transform: scale(1.08);
   border-color: #ffeb3b;
}

/* Masquer les groupes de boutons non actifs */
#rougeNoirColorButtons.hidden,
#rougeNoirSuitButtons.hidden {
    display: none;
}

/* --- Lancé de Dé Mini-Jeu --- */
.dice-roll-game-overlay { background: linear-gradient(45deg, #43cea2, #185a9d); }
#diceGamePlayerList { width: 80%; max-width: 350px; margin-bottom: 20px; background: rgba(0, 0, 0, 0.2); padding: 10px; border-radius: 8px; max-height: 40vh; overflow-y: auto; }
.dice-game-player-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; margin: 4px 0; border-radius: 5px; background: rgba(255, 255, 255, 0.1); transition: background-color 0.3s; }
.dice-game-player-item.current-turn { background: rgba(255, 235, 59, 0.3); }
.dice-game-player-item span { font-size: 1.1rem; }
.dice-game-player-item .score { font-weight: bold; font-size: 1.2rem; color: #ffeb3b; min-width: 30px; text-align: right; }
#diceGameAction { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
#diceGameAction .dice-btn { font-size: 1.1rem; padding: 10px 20px; }
#diceGameDice { /* Utilise le style .dice existant */ }
#diceGameResult strong { font-size: 1.4rem; }
.dice-game-rule { /* << NOUVEAU */
    font-size: 1.1rem;
    color: #ffeb3b;
    margin-top: -10px; /* Rapproche du titre */
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

/* --- Bombe Atomique --- */
.atomic-overlay { background: radial-gradient(ellipse at center, #ff4e00 0%, #ff0000 40%, #3d0000 100%); z-index: 600; /* Maximum au dessus */ overflow: hidden; animation: screenShakeHard 0.8s 4 ease-in-out; }
@keyframes screenShakeHard { 0%, 100% { transform: translateX(0) translateY(0); } 10%, 30%, 50%, 70%, 90% { transform: translateX(-12px) translateY(8px) rotate(-1deg); } 20%, 40%, 60%, 80% { transform: translateX(12px) translateY(-8px) rotate(1deg); } }
.atomic-rocket { position: absolute; bottom: -200px; left: 50%; transform: translateX(-50%); font-size: 100px; animation: rocketFly 3s ease-in forwards; z-index: 601; }
@keyframes rocketFly { 0% { bottom: -200px; transform: translateX(-50%) rotate(0deg); } 20% { transform: translateX(-55%) rotate(-5deg); } 40% { transform: translateX(-45%) rotate(5deg); } 100% { bottom: 50%; transform: translate(-50%, 50%) rotate(0deg); } }
.atomic-explosion { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; background-color: #fff; border-radius: 50%; opacity: 0; transform: translate(-50%, -50%) scale(0); animation: atomicExplodeEffect 1.5s 3s ease-out forwards; z-index: 602; }
@keyframes atomicExplodeEffect { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; background-color: #fff; } 50% { transform: translate(-50%, -50%) scale(50); opacity: 0.8; background-color: #ffeb3b; } 100% { transform: translate(-50%, -50%) scale(150); opacity: 0; background-color: #ff4e00; } }
#atomicResultText { z-index: 603; color: #fff; font-size: 2.5rem; text-align: center; opacity: 0; animation: fadeInResult 1s 4s forwards; text-shadow: 0 0 10px #000, 0 0 20px #000; padding: 20px; }
#atomicResultText .player-name { display: block; margin: 5px 0; color: #ffeb3b; } /* Noms sur lignes séparées si plusieurs */
.atomic-continue-btn { z-index: 604; opacity: 0; animation: fadeIn 1s 5s forwards; position: absolute; bottom: 5%; }

/* --- Utilitaires --- */
.hidden { display: none !important; opacity: 0 !important; pointer-events: none !important; visibility: hidden !important; }
.player-name { color: #ffeb3b; font-weight: bold; }
.old-number { text-decoration: line-through; color: #ff7675; opacity: 0.8; margin-right: 5px; }
.new-number { color: #55efc4; font-weight: bold; margin-left: 5px; }
#fullscreenBtn {
	width: 100%;
	font-size: 1.1rem;
	margin-top: 15px;
	margin-bottom: -10px;
	background-color: #4caf50;
  color: white;
  text-shadow: none;
}
#fullscreenBtn:hover:not(:disabled) { background: #388e3c; }
.two-step-button { margin-top: 15px; font-size: 1.1rem; }

/* --- Responsive (simplifié) --- */
@media (max-width: 340px) {
    .header h1 { font-size: 1.6rem; }
    .beer-icon { font-size: 2rem; }
    .card { padding: 15px; font-size: 1.2rem; min-height: 160px; }
    .card-header { font-size: 1.1rem; }
    .btn { padding: 10px 15px; font-size: 0.95rem; }
    .next-btn { padding: 12px 15px; font-size: 1rem; }
    .add-btn { width: 40px; height: 40px; font-size: 1.4rem; line-height: 40px; }
    #playerList li { font-size: 1rem; padding: 8px 12px; }
    .delete-player-btn { width: 24px; height: 24px; font-size: 1rem; line-height: 24px; }
    .mode-btn { font-size: 0.9rem; min-height: 50px; padding: 12px 8px; }
    .theme-selection label { font-size: 1rem; }
    .theme-selection input[type="checkbox"] { width: 18px; height: 18px; }
    .overlay h2 { font-size: 1.5rem; }
    .result-text { font-size: 1.2rem; }
    .result-text strong, .result-text .player-name { font-size: 1.4rem; }
    .continue-btn { font-size: 1rem; }
    .bottle { font-size: clamp(100px, 35vw, 200px); }
    #bottleResultContainer p { font-size: 1.3rem; }
    #bottleResultContainer strong { font-size: 1.5rem; }
    .slot-reels { gap: 10px; padding: 15px 10px; }
    .reel { width: 65px; height: 90px; }
    .reel .icon { font-size: 45px; height: 90px; line-height: 90px; }
    #slotMessage { font-size: 1.1rem; }
    .slot-button { font-size: 1.1rem; padding: 12px 25px; }
    .chrono-text { font-size: 3.5rem; }
    .explosion { font-size: 10rem; }
    .explosion-text { font-size: 2.2rem; }
    .card-deck { width: 90px; height: 135px; }
    .card-placeholder { font-size: 2.5rem; }
    .revealed-card .rank { font-size: 2.5rem; }
    .revealed-card .suit { font-size: 1.8rem; }
    .dice { width: 45px; height: 45px; font-size: 1.8rem; }
    #diceGamePlayerList { width: 90%; }
    .dice-game-player-item span { font-size: 1rem; }
    .atomic-rocket { font-size: 80px; }
    #atomicResultText { font-size: 2rem; }
}
/* --- Styles pour le bouton Plein Écran des menus --- */
.menu-fullscreen-btn {
  width: 100%; /* Prend toute la largeur de #app */
  padding: 15px 20px; /* Padding généreux */
  font-size: 1.1rem; /* Taille de police */
  margin-top: 15px; /* Espace au-dessus */
  margin-bottom: 10px; /* Espace en dessous (ajuste si besoin) */
  background-color: #4caf50; /* Couleur verte (différente de l'autre ?) */
  color: white;
  text-shadow: none;
  /* Cache le bouton par défaut via la classe hidden */
}

.menu-fullscreen-btn.hidden {
    display: none; /* Cache complètement */
}

.menu-fullscreen-btn:hover:not(:disabled) {
    background-color: #388e3c; /* Assombrit au survol */
}