/**
 * Styles pour la Roue de la Fortune Automne
 * Couleurs Bobosse : Rose #ffcaf2 et Marron #a0522d
 */

/* @import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&display=swap'); */

.digi-game-roue-automne {
  font-family: "Lora", serif;
  text-align: center;
  position: relative;
  padding: 20px;
  background: #fbf5e5;
  border-radius: 20px;
  overflow: hidden;
  min-height: 600px;
}

/* Applique le style au ::before seulement si le parent .digi-popup-content contient #wheel-container */
.digi-popup-content:has(.wheel-container)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fbf5e5 url("images/fond-jeu-bobosse.jpg") no-repeat center 80px /
    95% auto;
  background-attachment: scroll;
  opacity: 1;
  z-index: 2;
  pointer-events: none;
}

/*
.digi-popup-content::after {
  content: "";
  position: absolute;
  bottom: 5px;
  right: -5px;
  width: 150px;
  height: 150px;
  background: url("images/pig.png") no-repeat center / contain;
  opacity: 0.7;
  z-index: 2;
  pointer-events: none;
}
*/
/* Guirlandes de feuilles décoratives - SUPPRIMEES (animations désactivées) */
.autumn-decorations {
  display: none;
}

/* En-tête du jeu */
.game-header {
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}

.game-title {
  font-family: "Lora", serif;
  font-size: 1.5em;
  font-weight: 700;
  color: #393448;
  margin: 0 0 10px 0;
  text-shadow: 2px 2px 4px rgba(255, 202, 242, 0.5);
}

.game-subtitle {
  font-size: 1.2em;
  color: #393448;
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
}

.game-info-text {
  font-size: 1.1em;
  color: #892e41;
  margin: 0;
  line-height: 1.2;
  font-weight: 400;
}

/* Container de la roue */
.wheel-container {
  position: relative;
  width: 350px;
  height: 350px;
  margin: 0 auto 5px;
  z-index: 2;
}

#roue-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 10px rgba(39, 34, 48, 0.3);
  /* Transition désactivée par défaut, activée uniquement pour l'arrêt */
  transition: none;
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 50px solid #393448;
  z-index: 10;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

/*
.wheel-pointer::after {
  content: "";
  position: absolute;
  top: -55px;
  left: -8px;
  width: 16px;
  height: 16px;
  background: #ffcaf2;
  border-radius: 50%;
  border: 2px solid #a0522d;
}
*/

/* Contrôles du jeu */
.game-controls {
  position: relative;
  z-index: 2;
  margin-bottom: 0px;
}

/* Container du règlement - centré */
.reglement-container {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 10px !important;
}

/* Case à cocher règlement - cachée par défaut */
.reglement-container.reglement-hidden {
  display: none !important;
}

/* Case à cocher règlement - visible */
.reglement-container.reglement-visible {
  display: flex !important;
}

/* Label du règlement - alignement case à cocher et texte */
.reglement-label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-size: 0.7em !important;
  color: #393448 !important;
  font-family: "Lora", serif !important;
}

/* Case à cocher du règlement */
.reglement-checkbox {
  margin: 0 !important;
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #393448 !important;
}

/* Texte du règlement */
.reglement-text {
  line-height: 1.4 !important;
}

/* Lien du règlement */
.reglement-text a {
  color: #393448 !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
}

.reglement-text a:hover {
  color: #393448 !important;
}

.btn-spin {
  background: #393448;
  border: 3px solid #393448;
  border-radius: 50px;
  color: #f4acb7;
  font-family: "Lora", serif;
  font-size: 1.4em;
  font-weight: 700;
  padding: 0px 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-spin:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 202, 242, 0.4);
  background: #ffcad4;
}

.btn-spin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spin .btn-loader {
  animation: spin-loader 1s linear infinite;
}

@keyframes spin-loader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Informations du jeu */
.game-info {
  position: relative;
  z-index: 2;
  color: #393448;
  font-size: 0.7em;
}

.game-info p {
  margin: 5px 0;
}

/* Résultat du jeu */
.game-result {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  border: 2px solid #ffcaf2;
}

.result-icon {
  font-size: 3em;
  margin-bottom: 10px;
}

.result-title {
  font-family: "Lora", serif;
  font-size: 1.6em;
  font-weight: 700;
  color: #393448;
  margin: 0 0 15px 0;
}

.result-content {
  font-size: 1.1em;
  color: #393448;
  line-height: 1.5;
  margin-bottom: 15px;
}

.btn-retry {
  background: linear-gradient(145deg, #393448, #393448);
  border: 2px solid #654321;
  border-radius: 25px;
  color: white;
  font-family: "Lora", serif;
  font-size: 1em;
  font-weight: 600;
  padding: 10px 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-retry:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(160, 82, 45, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .digi-game-roue-automne {
    padding: 15px;
  }

  .game-title {
    font-size: 1.8em;
  }

  .game-subtitle {
    font-size: 1em;
  }

  .wheel-container {
    width: 300px;
    height: 300px;
  }

  .btn-spin {
    font-size: 1.2em;
    padding: 12px 30px;
  }

  .leaves-garland-top::before,
  .leaves-garland-bottom::before {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .wheel-container {
    width: 250px;
    height: 250px;
  }

  .game-title {
    font-size: 1.5em;
  }

  .btn-spin {
    font-size: 1.1em;
    padding: 10px 25px;
  }
}
