/* Styles pour le vérificateur de résultats */

.results-checker-section {
  margin-top: 40px;
  padding: 20px;
}

section.results-checker-section h2 {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 15px;
  text-align: center;
}

.results-checker-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* 1. Espacement uniforme entre chaque bloc de .results-checker-container */
.results-checker-container > * {
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .results-checker-container {
    grid-template-columns: 1fr 1fr;
  }

  .results-container {
    grid-column: 1 / 3;
  }
}

/* Section de saisie des résultats */
.draw-results-input {
  background-color: #f8f9fa3b;
  /* background-color: #f8f9fa; */
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.draw-input-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.draw-numbers-input {
  margin-bottom: 10px;
}

.numbers-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.winning-number-input {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid #fff;
  color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.winning-number-input:focus {
  border-color: #aa00ff;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 12px #aa00ff44;
  outline: none;
}

.complementary-input input {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid #27ae60;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #222;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.complementary-input input:focus {
  border-color: #219653;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 12px #27ae6044;
  outline: none;
}

.draw-date-input {
  margin-bottom: 10px;
}

.draw-date-input label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/* Styles du bouton */
.check-results-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 0, 167, 0.58) 0%,
    rgba(13, 0, 181, 0.63) 100%
  );
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
  font-size: 1.1rem;
}

.check-results-btn:hover {
  background-color: #2980b9;
}

/* Styles pour le bouton Recharger les tirages */
.refresh-draws-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refresh-draws-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(41, 128, 185, 0.3);
}

/* Section des grilles sauvegardées */
.saved-grids-container {
  background-color: #f8f9fa3b;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.saved-grids-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.saved-grids-table th,
.saved-grids-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.saved-grids-table th {
  background-color: #f2f2f2;
}

/* Section des résultats de vérification */
.results-container {
  background-color: #f8f9fa3b;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.draw-results {
  background-color: #fff;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.draw-numbers {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 15px;
}

.result-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #3498db;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  font-size: 1.2rem;
}

.result-complementary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #27ae60;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  font-size: 1.2rem;
  position: relative;
}

.result-complementary:before {
  content: "+";
  position: absolute;
  left: -17px;
  font-size: 1.5rem;
  color: #000000;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.results-table th {
  background-color: #f2f2f2;
}

.result-row-win {
  background-color: #d4edda;
}

.result-row-lost {
  background-color: #f8f9fa;
}

.matches {
  font-size: 0.9em;
  color: #666;
}

.status {
  font-weight: bold;
}

.status.win {
  color: #28a745;
}

.status.lost {
  color: #6c757d;
}

.matching-number {
  color: #1abc9c;
  font-weight: bold;
  animation: highlightFade 0.8s ease-in-out;
}

.regular-number {
  color: #000000;
}

@keyframes highlightFade {
  0% {
    background-color: #abf5de;
  }
  100% {
    background-color: transparent;
  }
}

/* Message - Utilise maintenant les styles globaux de error-messages.css */
.notification-text {
  padding: 15px;
  text-align: center;
  border-radius: 4px;
}

/* Styles pour l'affichage amélioré du numéro complémentaire */
.comp-match-cell {
  padding: 12px 8px !important;
}

.comp-correct {
  background-color: rgba(39, 174, 96, 0.1);
}

.comp-incorrect {
  background-color: rgba(231, 76, 60, 0.1);
}

.comp-numbers {
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  gap: 8px;
}

.comp-matching {
  color: #27ae60;
  font-weight: bold;
  background-color: #eafaf1;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #27ae60;
}

.comp-regular {
  color: #e74c3c;
  font-weight: bold;
  background-color: #fdedeb;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #e74c3c;
}

.comp-result {
  background-color: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.comp-separator {
  color: #7f8c8d;
}

/* Styles harmonisés pour les numéros complémentaires */
.comp-match-cell {
  padding: 12px 8px !important;
}

.comp-correct {
  background-color: rgba(39, 174, 96, 0.1);
}

.comp-incorrect {
  background-color: rgba(231, 76, 60, 0.1);
}

.comp-summary {
  font-weight: bold;
  margin-bottom: 5px;
}

.comp-numbers-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 5px;
}

.comp-matching {
  color: #27ae60;
  font-weight: bold;
  background-color: #eafaf1;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #27ae60;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

.comp-regular {
  color: #e74c3c;
  font-weight: bold;
  background-color: #fdedeb;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #e74c3c;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

.comp-result {
  background-color: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  min-width: 24px;
  text-align: center;
}

.comp-separator {
  color: #7f8c8d;
}

/* Styles harmonisés pour les numéros principaux */
.main-match-cell {
  padding: 12px 8px !important;
}

.has-matches {
  background-color: rgba(26, 188, 156, 0.1);
}

.no-matches {
  background-color: rgba(189, 195, 199, 0.1);
}

.match-summary {
  font-weight: bold;
  margin-bottom: 5px;
}

.main-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 5px;
}

.main-matching {
  color: #1abc9c;
  font-weight: bold;
  background-color: #e8f8f5;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #1abc9c;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

.main-regular {
  color: #7f8c8d;
  font-weight: bold;
  background-color: #f8f9fa;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid #bdc3c7;
  display: inline-block;
  min-width: 24px;
  text-align: center;
}

/* Style pour l'étoile au-dessus des numéros corrects */
.main-matching,
.comp-matching {
  position: relative;
}

.star-icon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffcc00;
  font-size: 12px;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  animation: star-shine 1.5s infinite alternate;
}

@keyframes star-shine {
  from {
    opacity: 0.7;
    transform: translateX(-50%) scale(1);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
  }
}

/* Styles pour la représentation des rangs avec des étoiles */
.rank-cell {
  text-align: center;
}

.simple-stars {
  font-size: 20px;
  color: #f1c40f;
  text-shadow: 0 0 3px rgba(241, 196, 15, 0.5);
  letter-spacing: 2px;
}

/* Styles pour les notifications avec tableau de résultats */
.winning-notification,
.jackpot-notification,
.lost-notification {
  text-align: center;
  padding: 10px 15px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
  position: relative;
  padding-top: 20px;
  color: white !important;
  border-radius: 12px;
}

/* Styles spécifiques pour notification de gain */
.winning-notification {
  background: linear-gradient(135deg, #2d5a2d 0%, #4a8f4a 100%);
  border: 2px solid #66cc66;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

.winning-notification h3 {
  color: #ffeb3b !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
  margin: 0 0 10px 0;
}

/* Styles spécifiques pour notification de jackpot */
.jackpot-notification {
  background: linear-gradient(135deg, #6a1b9a 0%, #9c27b0 50%, #e91e63 100%);
  border: 3px solid #ffd700;
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
  animation: jackpot-glow 2s ease-in-out infinite alternate;
}

.jackpot-notification h2 {
  color: #ffd700 !important;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
  margin: 0 0 15px 0;
  font-size: 1.8em;
}

/* Styles spécifiques pour notification de perte */
.lost-notification {
  background: linear-gradient(135deg, #424242 0%, #616161 100%);
  border: 2px solid #757575;
  box-shadow: 0 4px 15px rgba(66, 66, 66, 0.3);
}

.lost-notification h3 {
  color: #90caf9 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
  margin: 0 0 10px 0;
}

/* Animation pour le jackpot */
@keyframes jackpot-glow {
  0% {
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
  }
  100% {
    box-shadow: 0 6px 35px rgba(255, 215, 0, 0.9);
  }
}

/* Correction des couleurs de texte dans les notifications */
.winning-notification *,
.jackpot-notification *,
.lost-notification *,
.winning-notification-popup *,
.jackpot-notification-popup *,
.lost-notification-popup * {
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* Exceptions pour les boules et éléments spéciaux qui gardent leurs couleurs */
.winning-notification .lotto-ball,
.jackpot-notification .lotto-ball,
.lost-notification .lotto-ball,
.winning-notification .result-number,
.jackpot-notification .result-number,
.lost-notification .result-number,
.winning-notification .main-ball,
.jackpot-notification .main-ball,
.lost-notification .main-ball {
  color: white !important;
}

/* Tableau dans la notification popup */
.winning-grids-summary {
  margin-top: 15px;
  max-height: calc(80vh - 150px);
  overflow-y: auto;
  background: linear-gradient(
    145deg,
    rgba(45, 45, 45, 0.95),
    rgba(65, 65, 65, 0.95)
  );
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Styles améliorés pour les tableaux dans les popups */
.winning-grids-summary table,
.popup-results-table {
  color: white !important;
  background: transparent;
}

.winning-grids-summary th,
.winning-grids-summary td,
.popup-results-table th,
.popup-results-table td {
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.winning-grids-summary th,
.popup-results-table th {
  background: linear-gradient(
    145deg,
    rgba(76, 175, 80, 0.3),
    rgba(56, 142, 60, 0.3)
  );
  color: #e8f5e8 !important;
  font-weight: bold;
}

.popup-result-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.05);
}

.popup-result-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

/* Styles pour les animations dans les popups */
.confetti-animation {
  font-size: 1.5em;
  margin: 10px 0;
  animation: bounce 1.5s ease-in-out infinite;
}

.lost-animation {
  font-size: 1.2em;
  margin: 10px 0;
  color: #81c784 !important;
  opacity: 0.8;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Amélioration du style des étoiles dans les popups */
.simple-stars {
  color: #ffd700 !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  font-size: 1.1em;
}

/* Style pour le statut dans les popups */
.popup-status.win {
  color: #81c784 !important;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.popup-status.jackpot {
  color: #ffd700 !important;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  animation: pulse-gold 1.5s ease-in-out infinite alternate;
}

@keyframes pulse-gold {
  0% {
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  }
  100% {
    color: #ffecb3;
    text-shadow: 2px 2px 6px rgba(255, 215, 0, 0.5);
  }
}

.results-table td {
  background-color: white !important;
  color: #000000 !important;
}

/* Styles spécifiques pour le popup de notification */
.winning-notification-popup,
.jackpot-notification-popup,
.lost-notification-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  animation: popupAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.8);
  max-height: 90vh;
  max-width: 90vw;
  background: white !important;
  color: #000000 !important;
}

/* Titres dans les popups */
.winning-notification-popup h3,
.jackpot-notification-popup h3,
.lost-notification-popup h3 {
  color: #000000 !important;
  text-shadow: none !important;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Paragraphes dans les popups */
.winning-notification-popup p,
.jackpot-notification-popup p,
.lost-notification-popup p {
  color: #ffffff !important;
  text-shadow: none !important;
  line-height: 1.5;
}

.winning-notification-popup {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border: 2px solid #27ae60;
}

.jackpot-notification-popup {
  background: linear-gradient(135deg, #fff9c4, #ffeb3b);
  border: 2px solid #f1c40f;
}

.lost-notification-popup {
  background: linear-gradient(135deg, #f5f7fa, #e9e9e9);
  border: 2px solid #95a5a6;
  min-width: 300px;
  box-shadow: 0 5px 20px rgba(149, 165, 166, 0.5);
}

/* Animation d'apparition pour les popups de notification */
@keyframes popupAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.8);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Animation de disparition pour les popups */
.popup-disappear {
  animation: popupDisappear 0.3s forwards !important;
}

@keyframes popupDisappear {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.8);
  }
}

/* Style pour le bouton de fermeture personnalisé en forme de boule de loto */
.lotto-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  z-index: 10;
  width: 32px;
  height: 32px;
}

.lotto-close-btn .lotto-ball {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: radial-gradient(
    circle at 30% 30%,
    #fff,
    rgb(255, 78, 78) 30%,
    rgb(240, 27, 27) 60%,
    rgb(180, 10, 10) 100%
  );
  color: white;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  transform-origin: center;
}

.winning-notification-popup .lotto-close-btn .lotto-ball {
  background: radial-gradient(
    circle at 30% 30%,
    #fff,
    rgb(78, 191, 112) 30%,
    rgb(39, 174, 96) 60%,
    rgb(27, 123, 66) 100%
  );
}

.lost-notification-popup .lotto-close-btn .lotto-ball {
  background: radial-gradient(
    circle at 30% 30%,
    #fff,
    rgb(149, 165, 166) 30%,
    rgb(127, 140, 141) 60%,
    rgb(93, 109, 126) 100%
  );
}

/* Animation au survol de la croix de fermeture */
.lotto-close-btn:hover .lotto-ball {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.4);
}

/* Ajuster les conteneurs pour gérer correctement la position du bouton */
.winning-notification,
.jackpot-notification {
  position: relative;
  padding-top: 20px;
}

/* Styles pour l'affichage des résultats du Loto */
.latest-draws-results {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.draw-card {
  background: #ffffff24;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.lotto-fdj-draw .draw-header {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
  margin-bottom: 15px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lotto-fdj-draw .draw-header h4 {
  color: #ffffff;
  margin: 0;
  font-size: 1.1rem;
}

.lotto-fdj-draw .draw-balls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.lotto-ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.main-ball {
  background-color: #334a9c;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.complementary-ball {
  background-color: #e74c3c;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ball-separator {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #777;
}

/* Astuce : transition douce du gradient avec ::after */

.use-draw-btn {
  position: relative;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0.5px;
  width: 100%;
  margin-top: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 0;
  background: linear-gradient(135deg, #000000 0%, #aa00ff 100%, #000000 200%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  transition: box-shadow 2s cubic-bezier(0.4, 0.84, 0.6, 1.08),
    background-position 2s cubic-bezier(0.4, 0.84, 0.6, 1.08);
}

.use-draw-btn > * {
  position: relative;
  z-index: 1;
}

.use-draw-btn:hover {
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
  background-position: 100% 0%;
}

/* Styles pour la sélection multiple des grilles */
.grid-selection-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background: linear-gradient(135deg, #aa00ff 0%, #000000 100%);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
  border-radius: 5px;
}

.select-all-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: #000000;
}

.select-all-checkbox,
.grid-select-checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.delete-selected-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, opacity 0.3s;
}

.delete-selected-btn:hover:not(:disabled) {
  background-color: #c0392b;
}

.delete-selected-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.select-column {
  width: 30px;
}

/* Amélioration du tableau pour la sélection */
.saved-grids-table tr:hover {
  background-color: #f0f7ff;
}

/* Styles pour la popup des grilles non gagnantes */
.lost-notification-popup {
  background: linear-gradient(135deg, #f5f7fa, #e9e9e9);
  border: 2px solid #95a5a6;
  min-width: 300px;
  box-shadow: 0 5px 20px rgba(149, 165, 166, 0.7);
  animation: fadeInUp 0.5s ease forwards;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.lost-notification h3 {
  color: #34495e;
  font-size: 22px;
  margin-bottom: 10px;
}

.lost-notification p {
  color: #000000;
  font-size: 16px;
  margin: 10px 0;
}

.lost-animation {
  font-size: 20px;
  margin: 15px 0;
  color: #3498db;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, -30%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Styles spécifiques pour la notification de perte */
.lost-notification h3 {
  color: #34495e;
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: bold;
}

.lost-notification p {
  color: #000000;
  font-size: 16px;
  margin: 10px 0;
}

.lost-animation {
  font-size: 22px;
  margin: 15px 0;
  color: #3498db;
  animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.8;
  }
  to {
    transform: scale(1.05);
    opacity: 1;
  }
}

.top-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.export-draws-btn {
  background-color: #8e44ad;
}

.export-draws-btn:hover {
  background-color: #7d3c98;
}

.analyze-draws-btn {
  background-color: #16a085;
}

.analyze-draws-btn:hover {
  background-color: #138d75;
}

/* Désactive visuellement les boutons */
button.disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(0.5);
}

/* Active visuellement les boutons */
button.active {
  opacity: 1 !important;
  cursor: pointer !important;
  filter: none;
  pointer-events: auto;
}

/* Notification d'erreur pour la suppression protégée */
.protected-error {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  padding: 10px 15px;
  margin: 10px 0;
}

/* Style pour les fichiers CSV exportés */
.exported-csv-list {
  list-style-type: none;
  padding: 0;
  margin: 15px 0;
}

.exported-csv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa7a;
  /* background-color: #f8f9fa; */
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  border-left: 4px solid #16a085;
  transition: all 0.2s ease;
}

.exported-csv-item:hover {
  background-color: #f8f9fa0f;
  transform: translateX(5px);
  box-shadow: 0 2px 12px 0 rgba(255, 255, 255, 0.921);
}

.csv-filename {
  font-weight: bold;
  color: #ffffff;
}

.exported-csv-item:hover > .csv-filename {
  color: #fff;
}

.csv-actions {
  display: flex;
  gap: 10px;
}

.csv-actions button {
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.csv-view-btn {
  background-color: #16a085;
  color: white;
  border: none;
}

.csv-view-btn:hover {
  background-color: #138d75;
}

/* --- POPUP MODAL UNIFIÉ : Export CSV, Fusion, Confirmation, Gestion tirage --- */

/* Overlay du modal */
.popup-modal,
.export-modal {
  /* Overlay géré dans style.css (ne pas annuler ici) */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s, visibility 0.3s;
}

.popup-modal.hidden,
.export-modal.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Contenu principal du modal */
.popup-content,
.export-modal .popup-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(20, 40, 125, 0.08),
    0 2px 8px rgba(20, 40, 125, 0.06), 0 10px 30px rgba(0, 0, 0, 0.18);
  font-family: "Inter", Arial, sans-serif;
  min-width: 350px;
  max-width: 500px;
  padding: 32px 22px 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  opacity: 1 !important;
  border: 1px solid #e6e8ef;
}

.popup-content.wide {
  width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Titre du modal */
.popup-content h3,
.export-modal h3 {
  color: #14287d;
  font-size: 1.38rem;
  text-align: center;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e6e8ef;
  padding-bottom: 8px;
}

/* Section d'options d'export/fusion */
.export-options {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Section nom personnalisé */
.custom-filename-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 11px;
}
.custom-filename-section label {
  font-weight: 600;
  color: #27357c;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1rem;
}
#use-custom-filename {
  accent-color: #14287d;
  width: 19px;
  height: 19px;
  margin-right: 2px;
}
#custom-filename {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #dbe2ec;
  background: #f4f7fa;
  font-size: 0.97rem;
  transition: border-color 0.2s;
}
#custom-filename:focus {
  border-color: #14287d;
  background: #fff;
}
#custom-filename:disabled {
  background: #f6f6f8;
  color: #999;
}

/* Section plage de dates */
.date-range-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 4px;
  border-top: 1px solid #e6e8ef;
  padding-top: 12px;
}
.date-range-section label {
  font-weight: 500;
  color: #27357c;
  margin-bottom: 3px;
  font-size: 0.97rem;
}
.date-range-section input[type="date"] {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #dbe2ec;
  background: #f7fafd;
  font-size: 0.97rem;
  margin-bottom: 4px;
  transition: border-color 0.2s;
}
.date-range-section input[type="date"]:focus {
  border-color: #14287d;
  background: #fff;
}

/* Preview nom du fichier */
.filename-preview {
  margin-top: 8px;
  margin-bottom: 8px;
}
.filename-preview label {
  font-weight: 600;
  color: #293a85;
  margin-bottom: 4px;
  display: block;
  font-size: 0.97rem;
}
.filename-display {
  background: #f6f7fa;
  border: 1px solid #e1e6ee;
  font-family: "Fira Mono", "Consolas", monospace;
  color: #27357c;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 1rem;
  margin-top: 1px;
  -webkit-user-select: all;
  user-select: all;
}

/* Section fusion CSV */
.export-modal .merge-csv-list p {
  font-size: 1.01rem;
  color: #27357c;
  margin-bottom: 7px;
}
.csv-files-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}
.csv-files-list li {
  margin-bottom: 6px;
  font-size: 1rem;
}
.csv-file-checkbox {
  margin-right: 8px;
}

/* Boutons du popup */
.popup-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e6e8ef;
}
.primary-button,
.secondary-button,
.cancel-button {
  font-size: 1.08rem;
  padding: 8px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
.primary-button {
  background: linear-gradient(90deg, #1565c0 0%, #192c7c 100%);
  color: #fff;
}
.primary-button:hover {
  background: linear-gradient(90deg, #193a85 0%, #14287d 100%);
}
.primary-button:disabled {
  background: #e4e7ec !important;
  color: #aaa !important;
  cursor: not-allowed !important;
}
.secondary-button {
  background: #e8eaf6;
  color: #14287d;
  border: 1px solid #dbe2ec;
}
.secondary-button:hover {
  background: #dbe2ec;
  color: #1a237e;
}
.cancel-button {
  background: #e4e7ec;
  color: #444;
}
.cancel-button:hover {
  background: #dde2f2;
  color: #222;
}

/* Responsive pour tous les modals */
@media (max-width: 600px) {
  .popup-content,
  .export-modal .popup-content {
    min-width: unset;
    max-width: 98vw;
    padding: 14px 4px 11px 4px;
  }
  .custom-filename-section {
    flex-direction: column;
    gap: 7px;
    align-items: stretch;
  }
  .date-range-section {
    gap: 4px;
    padding-top: 7px;
  }
  .popup-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .primary-button,
  .secondary-button,
  .cancel-button {
    font-size: 1.01rem;
    padding: 7px 0;
    width: 100%;
    min-width: 80px;
  }
}

/* Fallback pour largeur sur mobile */
@media (max-width: 400px) {
  .popup-content,
  .export-modal .popup-content {
    padding: 8px 2px 8px 2px;
  }
}

/* Animation d'apparition du modal */
@keyframes modalAppear {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.popup-content,
.export-modal .popup-content {
  animation: modalAppear 0.3s cubic-bezier(0.4, 0.84, 0.6, 1.08) 1;
}

/* Masque tous les tooltips de Plotly sans désactiver le clic */
.js-plotly-plot .hoverlayer {
  display: none !important;
}

/* Ajout : styles pour la sélection de source/fichier dans le popup d'export */
.csv-source-section {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.csv-source-section label {
  font-weight: 600;
  color: #27357c;
  margin-bottom: 2px;
}
#csv-source-select {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #dbe2ec;
  background: #f7fafd;
  font-size: 0.97rem;
  margin-bottom: 4px;
  transition: border-color 0.2s;
}
#csv-source-select:focus {
  border-color: #14287d;
  background: #fff;
}

.csv-file-select-section {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.csv-file-select-section label {
  font-weight: 600;
  color: #27357c;
  margin-bottom: 2px;
}
#csv-file-select {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #dbe2ec;
  background: #f7fafd;
  font-size: 0.97rem;
  margin-bottom: 4px;
  transition: border-color 0.2s;
}
#csv-file-select:focus {
  border-color: #14287d;
  background: #fff;
}

/* 2. Dégager la section des CSV exportés */
.exported-csv-section {
  margin-top: 20px;
}

/* 3. Améliorer le conteneur du calendrier (smart calendar) */
.draw-date-input .smart-calendar {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid #dbe2ec;
  background: #fff;
  border-radius: 6px;
  margin-top: 8px;
}

/* 4. Ajouter un petit écart entre les « boules » */
.draw-numbers .draw-ball,
.draw-numbers .comp-ball {
  margin: 0 6px;
}

/* 5. Un peu d’air entre les boutons d’action en haut */
.top-buttons button {
  margin-right: 8px;
}

/* 6. Limiter la hauteur de la popup et autoriser le scroll si nécessaire */
.popup-content {
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px; /* espace pour les boutons */
}

/* 7. Positionner les boutons en bas et permettre le wrapping */
.popup-buttons {
  margin-top: auto; /* pousse la barre de boutons en bas */
  flex-wrap: wrap; /* autorise plusieurs lignes si trop de boutons */
  justify-content: start;
  gap: 10px;
}
