/* help.css */

/* Style du bouton Help */
#helpBtn {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  background: var(--glass);
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

#helpBtn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

#helpBtn .help-icon {
  width: 24px;
  height: 24px;
  color: var(--text);
}

#helpBtn:hover .help-icon {
  color: var(--primary);
}

/* Animation de clignotement doux (opacité + taille) */
#helpBtn.blink {
  animation: softBlink 2s ease-in-out infinite;
}

@keyframes softBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.1);
  }
}

/* Effet de survol spécifique pendant l'animation blink */
#helpBtn.blink:hover {
  transform: scale(1.3); /* Pulsation plus marquée au survol */
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5); /* Effet de glow */
  opacity: 1; /* Opacité maximale pour contrer le clignotement */
  animation: none; /* Arrête l'animation de clignotement au survol pour un effet clair */
}

#helpBtn.blink:hover .help-icon {
  color: var(--primary);
}

/* Désactiver l'animation pour les utilisateurs avec prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  #helpBtn.blink {
    animation: none;
  }
  #helpBtn.blink:hover {
    box-shadow: none; /* Supprime le glow pour réduire les effets */
    transform: none; /* Supprime la pulsation */
  }
}

/* Style du panneau d'aide */
.help-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 2500;
}

.help-panel.active {
  opacity: 1;
  visibility: visible;
}

.help-content {
  position: relative;
  width: 90%;
  max-width: 1600px;
  height: 90%;
  max-height: 900px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* Style des sections d'aide */
.help-section {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.help-section svg {
  flex-shrink: 0;
}

.help-section p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

/* Section gauche : Panneau de filtres */
.help-filters {
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
}

.help-filters .help-rect {
  width: 60px;
  height: 200px;
}

/* Section haute : Menu des catégories */
.help-menu {
  top: -10%;
  left: 80%;
  transform: translateX(-50%);
  flex-direction: column;
  text-align: center;
}

.help-menu .help-rect {
  width: 200px;
  height: 30px;
}

/* Section droite : Affichage des étages */
.help-floors {
  top: 50%;
  right: 1%;
  transform: translateY(-50%);
  flex-direction: row;
}

.help-floors .help-rect {
  width: 60px;
  height: 200px;
  order: 2;
}

.help-floors p {
  order: 1;
}

/* Section centre : Drag pour tourner */
.help-drag {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.help-drag .help-hand {
  width: 120px;
  height: 120px;
  stroke: none;
  fill: white;
  opacity: 0.6;
}

/* Section bas-droite : Mode plein écran et aide */
.help-modes {
  bottom: 2%;
  right: 1%;
  flex-direction: row;
}

.help-modes .help-square {
  width: 40px;
  height: 40px;
  order: 2;
}

.help-modes p {
  order: 1;
}

/* Section bas-centre : Raccourcis clavier */
.help-shortcuts {
  bottom: 2%;
  left: 30%;
  transform: translateX(-50%);
  text-align: center;
}

.help-shortcuts p {
  font-size: 0.9rem;
}

.help-shortcuts span {
  display: inline-block;
  background: var(--secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin: 0 0.2rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .help-content {
    width: 95%;
    height: 95%;
    max-height: none;
  }

  .help-section p {
    font-size: 0.8rem;
  }

  .help-filters {
    left: 0;
  }

  .help-filters .help-rect,
  .help-floors .help-rect {
    width: 40px;
    height: 140px;
  }

  .help-floors {
    right: 0;
  }

  .help-menu {
    top: 0;
  }

  .help-menu .help-rect {
    width: 120px;
    height: 20px;
  }

  .help-drag .help-hand {
    width: 80px;
    height: 80px;
  }

  .help-modes {
    right: 0;
    bottom: 15%;
  }

  .help-modes .help-square {
    width: 30px;
    height: 30px;
  }

  .help-shortcuts {
    bottom: 10%;
  }

  .help-shortcuts p {
    font-size: 0.7rem;
  }
}