/* 
  Styles pour l'iframe 3D en plein écran
  Utilisé sur la page activité
*/

/* Conteneur d'image en noir et blanc */
.iframe-preview-container {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.iframe-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
}
/* Bouton Explorer en 3D */
.explore-3d {
  position: absolute;
  bottom: 30px;
  right: 30px;
  background-color: #000;
  color: white;
  padding: 7px 15px;
  border-radius: 30px;
  border: 1px solid #000;
  display: flex;
  align-items: center;
  z-index: 10;
  transition: all 0.3s ease;
}

/* Style spécifique pour le texte du bouton */
.explore-3d span {
  font-size: clamp(0.5rem, 0.15rem + 3vw, 1.2rem);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.explore-3d svg {
  width: 24px;
  height: 24px;
  margin-left: 10px;
  transform: rotate(-45deg); /* Flèche pointant en haut à droite */
  transition: stroke 0.3s ease;
}

/* Effet de survol sur le bouton */
.explore-3d:hover {
  background-color: white !important;
  color: black;
}

.explore-3d:hover svg {
  stroke: black;
}

/* Effet de survol sur l'iframe */
.iframe-preview-container:hover .explore-3d {
  background-color: white !important;
  color: black;
}

.iframe-preview-container:hover .explore-3d svg {
  stroke: black;
}

/* Styles responsifs pour le bouton Explorer en 3D */
@media (max-width: 768px) {
  .iframe-preview-container {
    margin-bottom: 60px; /* Espace pour le bouton en dessous */
  }
  
  .explore-3d {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 15px;
    padding: 5px 10px;
    margin-left: auto; /* Positionne à droite */
    width: fit-content;
  }
  
  .iframe-preview-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  
  .iframe-preview-image {
    height: 100%;
    flex: 1;
  }
  .explore-3d svg {
    width: 16px;
    height: 16px;
  }
}

/* Conteneur iframe plein écran */
.fullscreen-iframe-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-iframe-container.active {
  display: flex;
  opacity: 1;
}

.fullscreen-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Styles pour le conteneur en plein écran et le bouton de fermeture */
#fullscreen-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 9999;
}

#close-fullscreen-button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  padding: 0;
}

#close-fullscreen-button svg {
  width: 30px;
  height: 30px;
  stroke: white;
  stroke-width: 2;
}

#close-fullscreen-button:hover {
  background-color: white;
  color: black;
}

#close-fullscreen-button:hover svg {
  stroke: black;
}

/* Indicateur de chargement */
.loading-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 20;
}

.loading-indicator span {
  margin-top: 15px;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
