.hotspot {
  position: absolute;
  width: 30px;
  height: 30px;
  background: rgba(255, 59, 48, 0.8);
  border: 3px solid white;
  border-radius: 50%;
  cursor: pointer;
  animation: pulse 2s infinite;
  z-index: 10;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(255, 59, 48, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

.image-container {
  position: relative;
  display: block;
  background: #000;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.zoom-panel {
  position: relative;
  background: #000;
  width: 100%;
  /* Hauteur sera définie par JavaScript adaptatif */
  overflow: hidden; /* ✅ AJOUT pour éviter les débordements */
}

.zoom-panel-bg {
  position: absolute; /* ✅ CHANGÉ de sticky à absolute */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* ✅ AJOUT de la hauteur */
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.zoom-panel-overlay {
  position: fixed; /* ✅ GARDER fixed pour l'animation */
  width: 150px;
  height: 225px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center;
  z-index: 100;
  border: 2px solid #ffd700;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
  opacity: 0;
  /* ✅ OPTIMISATIONS pour un scroll fluide */
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0); /* Force l'accélération matérielle */
}

.zoom-mode-active {
  /* Optionnel: styles visuels quand en mode zoom */
  outline: 3px solid rgba(255, 215, 0, 0.5);
}

.zoom-scroll-indicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 25px;
  z-index: 1000;
  font-size: 14px;
  text-align: center;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.zoom-scroll-indicator.show {
  opacity: 1;
}

/* ✅ OPTIONNEL: Barre de progression pour l'animation */
.zoom-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  z-index: 1001;
  width: 0%;
  transition: width 0.15s ease-out; /* ✅ Transition plus fluide */
  opacity: 0;
  will-change: width; /* ✅ Optimisation pour la largeur */
}

.zoom-mode-active .zoom-progress-bar {
  opacity: 1;
}

/* ✅ AMÉLIORATIONS pour une meilleure UX */
.zoom-panel.entering {
  box-shadow: inset 0 0 0 3px rgba(255, 215, 0, 0.6);
  transition: box-shadow 0.3s ease;
}

.zoom-panel.active {
  box-shadow: inset 0 0 0 5px rgba(255, 215, 0, 0.8);
}

/* ✅ NOUVEAU: Styles pour les panels complétés */
.zoom-panel.completed {
  position: relative;
}

.zoom-panel.completed::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(34, 197, 94, 0.1) 0%,
    rgba(34, 197, 94, 0.05) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.completion-indicator {
  animation: completion-appear 0.5s ease-out;
}

@keyframes completion-appear {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ✅ RESPONSIVE: Ajustements pour mobile */
@media (max-width: 768px) {
  .zoom-panel-overlay {
    width: 120px;
    height: 180px;
  }

  .zoom-scroll-indicator {
    bottom: 20px;
    padding: 12px 20px;
    font-size: 12px;
  }
}

.inventory-slot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #ffd700;
  border-radius: 8px;
  z-index: 100;
}

.inventory-slot::before {
  content: "🎒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

.zoom-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.5);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 95vw;
  max-height: 95vh;
  overflow-y: auto;
  transform: scale(0.8);
}

.iframe-modal .modal-content {
  width: 95vw;
  height: 95vh;
  max-width: none;
  max-height: none;
}

.quiz-option {
  transition: all 0.3s ease;
}

.quiz-option:hover {
  background-color: #f3f4f6;
}

.quiz-option.selected {
  background-color: #3b82f6;
  color: white;
}

.quiz-option.correct {
  background-color: #10b981;
  color: white;
}

.quiz-option.incorrect {
  background-color: #ef4444;
  color: white;
}

body.no-scroll {
  overflow: hidden;
}

.checkpoint-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px;
  border-radius: 8px;
  z-index: 100;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.checkpoint-indicator.show {
  opacity: 1;
  visibility: visible;
}

.hotspot.checkpoint {
  background: rgba(255, 193, 7, 0.9);
  border-color: #ff6b35;
}

.hotspot.checkpoint.completed {
  background: rgba(34, 197, 94, 0.9);
  border-color: #059669;
  animation: none;
}

.hotspot.checkpoint.completed::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 16px;
}
