body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #000; /* <-- Couleur / Transition / Arrière plan = #000 (noir) OU #fff (blanc) */
}

a-scene {
  width: 100%;
  height: 100%;
}

/* --- Bouton principal de bascule temporelle en bas --- */
.toggle-button {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(0, 104, 55, 0.9);
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 12px 28px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.25s ease;
}

.toggle-button:hover {
  background: rgba(123, 185, 11, 0.9);
  transform: translateX(-50%) scale(1.03);
}

/* --- Interface de démarrage Gyroscope & Logo --- */
#gyro-welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}

.gyro-bounce-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  justify-content: center;
  outline: none;
}

/* Uniquement le logo rebondit */
.gyro-bounce-btn img {
  width: 90px;
  height: auto;
  filter: drop-shadow(0px 4px 12px rgba(0,0,0,0.5));
  animation: logoBounce 2s infinite ease-in-out;
}

/* Le texte est fixé proprement tout en bas de la page */
.gyro-tip {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  background: rgba(0, 104, 55, 0.95);
  padding: 12px 24px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

@keyframes logoBounce {
  0%, 100% { 
    transform: scale(1); 
    filter: drop-shadow(0px 4px 12px rgba(0,0,0,0.5));
  }
  50% { 
    transform: scale(1.15); /* Le logo grandit pour venir vers l'avant */
    filter: drop-shadow(0px 12px 24px rgba(0,0,0,0.35)); /* L'ombre s'estompe et s'agrandit */
  }
}

/* --- Bouton d'Aide (?) --- */
.help-button {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.help-button:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

/* --- Menu Burger & Dropdown Haut Gauche --- */
.menu-container {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 9999;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.burger-button {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
}

.burger-button span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  transition: all 0.3s ease;
}

.burger-button.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-button.open span:nth-child(2) { opacity: 0; }
.burger-button.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.dropdown-content {
  position: absolute;
  top: 60px;
  left: 0;
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: none;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  color: #ddd;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.dropdown-content a:hover, .dropdown-content a.active {
  background: rgba(0, 104, 55, 0.8);
  color: #fff;
}

.dropdown-loading {
  color: #888;
  padding: 12px 16px;
  font-size: 13px;
  font-style: italic;
}

/* --- Système de Lightbox --- */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  background: #ffffff;
  padding: 20px;
  border-radius: 16px;
  width: 80%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #2b2b2b;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
}

.lightbox-close:hover { color: #000; }
.lightbox-content h2 { margin-top: 0; font-size: 20px; font-weight: 700; border-bottom: 2px solid #f3f3f3; padding-bottom: 12px; color: #111; }
.lightbox-content p { font-size: 14.5px; line-height: 1.6; color: #555; margin-bottom: 0; }

/* Correctif d'affichage iOS */
html, body, a-scene {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  width: 100% !important; height: 100% !important;
  height: -webkit-fill-available !important; overflow: hidden;
}