/* ==========================================================================
   SOMMAIRE / TABLE DES MATIÈRES - STYLE.CSS
   ==========================================================================
   0. VARIABLES GLOBALES DU THÈME (:ROOT)
      0.1. Couleurs principales et secondaires (Pilotables depuis data.js)
   1. POLICES LOCALES ROBOTO CONDENSED (.TTF)
      1.1. Roboto Condensed Regular (400)
      1.2. Roboto Condensed Medium (500)
      1.3. Roboto Condensed Bold (700)
   2. RÉINITIALISATION, STYLES DE BASE ET VUE PANORAMIQUE
      2.1. Box-sizing global & reflets tactiles
      2.2. Styles généraux du document (HTML / BODY)
      2.3. Conteneur Marzipano (#pano)
   3. BANDEAUX SUPÉRIEUR ET INFÉRIEUR
      3.1. Structure commune (.header-bar & .footer-bar)
   4. BOUTONS DES BANDEAUX (.bar-btn) ET TITRES
      4.1. Boutons principaux des bandeaux
      4.2. Alignements selon l'ancrage
      4.3. Icônes d'état ON / OFF
      4.4. Titre de la scène (#titleBar) et état actif
   5. PANNEAUX LATÉRAUX (.side-panel) ET TOASTS
      5.1. Structure globale des panneaux
      5.2. Bouton de fermeture (.panel-close-btn)
      5.3. Typographie et contenu intérieur
      5.4. Notification Toast temporaire (.toast-notification)
   6. NAVIGATION, LISTES DE SCÈNES ET GRILLES DE LIENS
      6.1. Grille de la liste des scènes (#scenesListContainer)
      6.2. Grille du panneau "Plus loin" (#morePanel)
   7. BOUTONS DE TRANSITION ET CONTRÔLE DE VUE
      7.1. Mode de transition (.trans-btn)
      7.2. Contrôle manuel du panorama (.viewControlButton)
   8. BOUTONS INTERACTIFS ET MULTIMÉDIAS
      8.1. Sélecteur de filtres d'image (Grille 3x3)
      8.2. Action et réglages sonores (.action-buttons-row)
      8.3. Liste d'éléments du panneau Contenu Scène
   9. HOTSPOTS D'INFORMATION ET INFOBULLES
      9.1. Infobulles au survol (.link-hotspot-tooltip)
      9.2. Pastille d'information (.info-hotspot) - État fermé & ouvert
      9.3. En-tête du hotspot (Centrage de l'icône "i", titre, fermeture)
      9.4. Contenu texte, typographie, traits fins & légendes multi-médias
      9.5. Modale d'information plein écran (Smartphones)
      9.6. Boutons d'action (Liens / Téléchargements) et Badge de lien externe
   10. CARROUSEL D'IMAGES ET LIGHTBOX
       10.1. Carrousel d'images intégré (.carousel-container)
       10.2. Fenêtre modale Lightbox (.modal-overlay)
       10.3. Boutons de fermeture (#modalClose & #creditsCloseBtn)
       10.4. Image agrandie (#modalImagesContainer)
       10.5. Carrousel plein écran pour modale (.modal-carousel)
   11. LECTEURS MULTIMÉDIAS (AUDIO, VIDÉO, IFRAMES)
       11.1. Lecteur Audio personnalisé (.custom-audio-player)
       11.2. Intégrations Vidéo & Iframes
   12. EFFETS DE TRANSITION DE SCÈNE
       12.1. Overlay global (#transitionOverlay)
       12.2. Effet Fondu (.trans-fade)
       12.3. Effet Page tournante (.trans-page)
       12.4. Effet Paupières (.trans-paupiere)
   13. NOTICE D'ACCUEIL / CHARGEMENT
       13.1. Modale de chargement (#welcomeNotice)
   14. FILTRES VISUELS DU PANORAMIQUE
       14.1. Filtres chromatiques WebGL (#pano.filter-*)
   15. JAUGES ET STATISTIQUES DU BANDEAU SUPÉRIEUR
       15.1. Bandeau des jauges (.stats-bar)
   16. RESPONSIVE MOBILE (< 600px)
       16.1. Adaptation des bandeaux tactiles
       16.2. Jauges compactes
       16.3. Pastilles d'information sur mobile (Masquage pastille 3D)
   17. CORRECTIFS D'ANCRAGE 3D
       17.1. Positionnement absolu des hotspots
   18. HOTSPOTS 3D DE NAVIGATION ET MODALE D'ÉNIGME
       18.1. Ancrage et visuels du hotspot 3D (.link-hotspot)
       18.2. Badge discret du cadenas (.link-hotspot-lock)
       18.3. Modale d'énigme et boutons QCM
   19. MODE VR STÉRÉOSCOPIQUE & CORRECTIFS FINAUX
       19.1. Mode VR Stéréoscopique (Cardboard)
       19.2. Forçage des icônes en blanc pur et animations de pulsation
   ========================================================================== */

/* ==========================================================================
   0. VARIABLES GLOBALES DU THÈME (:ROOT)
   ========================================================================== */
/* 0.1. Couleurs principales et secondaires (Pilotables depuis data.js) */
:root {
  --color-accent: #D4A373;       /* Couleur principale (Ocre / Doré par défaut) */
  --color-accent-hover: #c09062; /* Couleur principale au survol */
  --color-bg: #1E232D;           /* Couleur de fond sombre et texte sur bouton actif */
}

/* ==========================================================================
   1. POLICES LOCALES ROBOTO CONDENSED (.TTF)
   ========================================================================== */
/* 1.1. Roboto Condensed Regular (400) */
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Roboto_Condensed-Regular.ttf') format('truetype');
}

/* 1.2. Roboto Condensed Medium (500) */
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Roboto_Condensed-Medium.ttf') format('truetype');
}

/* 1.3. Roboto Condensed Bold (700) */
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Roboto_Condensed-Bold.ttf') format('truetype');
}

/* ==========================================================================
   2. RÉINITIALISATION, STYLES DE BASE ET VUE PANORAMIQUE
   ========================================================================== */
/* 2.1. Box-sizing global & reflets tactiles */
*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 2.2. Styles généraux du document (HTML / BODY) */
html, body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: 'Roboto Condensed', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  background-color: #000000;
  color: #ffffff;
}

a, a:hover, a:active, a:visited {
  text-decoration: none;
  color: inherit;
}

/* 2.3. Conteneur Marzipano (#pano) */
#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transition: filter 0.4s ease-in-out;
}

/* ==========================================================================
   3. BANDEAUX SUPÉRIEUR ET INFÉRIEUR
   ========================================================================== */
/* 3.1. Structure commune (.header-bar & .footer-bar) */
.header-bar, .footer-bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: rgba(30, 35, 45, 0.85);
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
}

.header-bar { top: 0; }
.footer-bar { bottom: 0; }

/* ==========================================================================
   4. BOUTONS DES BANDEAUX (.bar-btn) ET TITRES
   ========================================================================== */
/* 4.1. Boutons principaux des bandeaux */
.bar-btn {
  background-color: rgba(58, 68, 84, 0.9);
  color: #ffffff;
  padding: 0 12px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 140px;
  height: 100%;
  transition: background-color 0.2s ease, width 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.bar-btn:hover {
  background-color: rgba(103, 115, 131, 0.9);
}

.bar-btn span {
  line-height: 1.15;
  white-space: normal;
}

/* 4.2. Alignements selon l'ancrage */
#helpBtn, #sceneListToggle {
  justify-content: flex-start;
  padding-left: 12px;
}
#helpBtn span, #sceneListToggle span { text-align: left; }

#sceneContentBtn, #moreBtn {
  justify-content: flex-end;
  padding-right: 12px;
}
#sceneContentBtn span, #moreBtn span { text-align: right; }

/* 4.3. Icônes d'état ON / OFF */
.bar-btn .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.bar-btn .icon.on { display: none !important; }
.bar-btn .icon.off { display: inline-block !important; }

.bar-btn.enabled .icon.on { display: inline-block !important; }
.bar-btn.enabled .icon.off { display: none !important; }

#fullscreenToggle, #autorotateToggle {
  display: none;
}

/* 4.4. Titre de la scène (#titleBar) et état actif */
#topBar #titleBar {
  position: relative;
  flex-grow: 1;
  height: 34px;
  margin: 0 15px;
  text-align: center;
}

#topBar #titleBar .sceneName {
  width: 100%;
  height: 100%;
  line-height: 24px;
  padding: 5px;
  background-color: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: text;
  margin: 0;
  font-size: 18px;
}

#bottomBar #sceneListToggle.enabled,
#bottomBar #moreBtn.enabled,
#topBar #helpBtn.enabled,
#topBar #sceneContentBtn.enabled,
#bottomBar #sceneListToggle.active,
#bottomBar #moreBtn.active,
#topBar #helpBtn.active,
#topBar #sceneContentBtn.active {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

/* ==========================================================================
   5. PANNEAUX LATÉRAUX (.side-panel) ET TOASTS
   ========================================================================== */
/* 5.1. Structure globale des panneaux */
.side-panel {
  position: absolute;
  width: fit-content;
  min-width: 280px;
  max-width: 420px;
  height: auto;
  max-height: calc(100% - 100px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: rgba(30, 35, 45, 0.95);
  z-index: 999;
  visibility: hidden;
  transition: transform 0.4s ease-in-out, visibility 0.4s;
  border: 1px solid rgba(255, 255, 255, 0.15);
  will-change: transform, visibility;
}

.side-panel.enabled {
  visibility: visible;
  transform: translateY(0) !important;
}

.panel-left { left: 0; right: auto; }
.panel-left .panel-subtitle { text-align: left; }

.panel-right { right: 0; left: auto; }
.panel-right .panel-subtitle { text-align: right; }

.panel-top {
  top: 50px;
  transform: translateY(-100%);
  border-top: none;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 6px;
}

.panel-bottom {
  bottom: 50px;
  transform: translateY(100%);
  border-bottom: none;
  border-top-right-radius: 6px;
  border-top-left-radius: 6px;
}

/* 5.2. Bouton de fermeture (.panel-close-btn) - Fixe en haut à droite du panneau */
.side-panel .panel-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  z-index: 20;
  opacity: 0.8;
  background: transparent;
  border: none;
  padding: 0;
  transition: opacity 0.2s ease;
}

.side-panel .panel-close-btn:hover { opacity: 1; }

.side-panel .panel-close-btn img {
  width: 100%;
  height: 100%;
  display: block;
}

/* 5.3. Zone de défilement interne, typographie et contenu */
.side-panel .panel-content {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 20px 42px 20px 20px;
  color: #ffffff;
}

.side-panel .panel-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #eceff1;
  margin: 0;
}

.side-panel .thin-line {
  border: 0;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 8px 0 12px 0;
}

.side-panel .panel-spacer { height: 24px; }

.side-panel .panel-text {
  font-size: 14px;
  line-height: 1.5;
  color: #d1d5db;
  margin: 0;
}

/* 5.4. Notification Toast temporaire (.toast-notification) */
.toast-notification {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(30, 35, 45, 0.95);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: 500;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   6. NAVIGATION, LISTES DE SCÈNES ET GRILLES DE LIENS
   ========================================================================== */
/* 6.1. Grille de la liste des scènes (#scenesListContainer) */
#scenesListContainer {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 0 !important;
  list-style: none !important;
}

#scenesListContainer .scene.scene-list-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px 6px !important;
  margin: 0 !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background-color: rgba(58, 68, 84, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

#scenesListContainer .scene.scene-list-btn:hover {
  background-color: rgba(103, 115, 131, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

#scenesListContainer .scene.scene-list-btn.current {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

#scenesListContainer .scene.scene-list-btn .text {
  text-align: center !important;
  line-height: 1.2 !important;
  width: 100% !important;
}

#scenesListContainer .scene.scene-list-btn:last-child:nth-child(odd) {
  grid-column: span 2 !important;
}

#scenesListContainer .scene.scene-list-btn.current .scene-list-icon {
  filter: none !important;
}

.scene-list-icon {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  display: block !important;
  filter: invert(1);
}

/* 6.2. Grille du panneau "Plus loin" (#morePanel) */
#morePanel .link-buttons-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

#morePanel .link-buttons-grid .scene.link-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px 6px !important;
  margin: 0 !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background-color: rgba(58, 68, 84, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
}

#morePanel .link-buttons-grid .scene.link-btn:hover {
  background-color: rgba(103, 115, 131, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

#morePanel .link-buttons-grid .scene.link-btn .text {
  text-align: center !important;
  line-height: 1.2 !important;
}

#morePanel .link-buttons-grid .scene.link-btn:last-child:nth-child(odd) {
  grid-column: span 2 !important;
}

.link-btn-icon {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  display: block !important;
  filter: invert(1);
}

/* ==========================================================================
   7. BOUTONS DE TRANSITION ET CONTRÔLE DE VUE
   ========================================================================== */
/* 7.1. Mode de transition (.trans-btn) */
.transition-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
}

.trans-btn {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  background-color: rgba(58, 68, 84, 0.8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.trans-btn:hover { background-color: rgba(103, 115, 131, 0.9); }

.trans-btn.active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

.trans-btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: invert(1);
}

/* 7.2. Contrôle manuel du panorama (.viewControlButton) */
.viewControlButton {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgba(103, 115, 131, 0.8);
  border: none;
  cursor: pointer;
}

body.view-control-buttons .viewControlButton { display: block; }

@media (max-width: 600px) {
  body.view-control-buttons .viewControlButton { display: none; }
}

.viewControlButton .icon {
  position: absolute;
  top: 5px; right: 5px;
  width: 30px; height: 30px;
}

.viewControlButton-1 { margin-left: -145px; }
.viewControlButton-2 { margin-left: -95px; }
.viewControlButton-3 { margin-left: -45px; }
.viewControlButton-4 { margin-left: 5px; }
.viewControlButton-5 { margin-left: 55px; }
.viewControlButton-6 { margin-left: 105px; }

/* ==========================================================================
   8. BOUTONS INTERACTIFS ET MULTIMÉDIAS
   ========================================================================== */
/* 8.1. Sélecteur de filtres d'image (Grille 3x3) */
.scenes-buttons.filter-buttons-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 6px !important;
  width: 100%;
}

.scenes-buttons.filter-buttons-grid .scene.filter-btn {
  width: 100% !important;
  padding: 8px 2px !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 4px;
  background-color: rgba(58, 68, 84, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
}

.scenes-buttons.filter-buttons-grid .scene.filter-btn .text {
  font-size: 12px;
  line-height: 1.1;
  white-space: normal;
}

.scenes-buttons.filter-buttons-grid .scene.filter-btn.active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

.scenes-buttons.filter-buttons-grid .scene.filter-btn.active .text {
  color: var(--color-bg);
}

/* 8.2. Action et réglages sonores (.action-buttons-row) */
.scenes-buttons.action-buttons-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 8px;
  width: 100%;
}

.scenes-buttons.action-buttons-row .scene.half-btn {
  flex: 1;
  width: auto !important;
  margin: 0;
  padding: 8px 4px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: rgba(58, 68, 84, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.scenes-buttons.action-buttons-row .scene.half-btn:hover {
  background-color: rgba(103, 115, 131, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

.scenes-buttons.action-buttons-row .scene.half-btn.active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

.scenes-buttons.action-buttons-row .scene.half-btn.active .text {
  color: var(--color-bg);
}

.scenes-buttons.action-buttons-row .scene.btn-vertical {
  flex-direction: column !important;
  padding: 14px 6px !important;
  gap: 8px;
}

.scenes-buttons.action-buttons-row .scene.btn-vertical .text {
  text-align: center;
  line-height: 1.2;
}

.action-btn-icon,
.sound-btn-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: invert(1);
}
.action-btn-icon { width: 22px; height: 22px; }
.sound-btn-icon { margin-right: 8px; }

/* 8.3. Liste d'éléments du panneau Contenu Scène */
#sceneContentPanel .scenes-buttons .scene {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  margin-bottom: 6px !important;
  background-color: rgba(58, 68, 84, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

#sceneContentPanel .scenes-buttons .scene:hover {
  background-color: rgba(103, 115, 131, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
}

#sceneContentPanel .scenes-buttons .scene .text {
  text-align: left;
  flex: 1;
  font-size: 14px;
}

.content-list-icon {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  flex-shrink: 0;
  object-fit: contain;
  filter: invert(1);
}

/* ==========================================================================
   9. HOTSPOTS D'INFORMATION ET INFOBULLES
   ========================================================================== */
/* 9.1. Infobulles au survol (.link-hotspot-tooltip) */
.link-hotspot-tooltip {
  position: absolute;
  left: 100%;
  top: 14px;
  margin-left: 3px;
  font-size: 16px;
  max-width: 250px;
  width: max-content; 
  padding: 8px 10px;
  border-radius: 5px;
  background-color: rgba(58, 68, 84, 0.8);
  color: #ffffff;
  white-space: normal;
  line-height: 1.3;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 10;
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.tooltip-fallback .link-hotspot-tooltip { display: none; }
.no-touch .tooltip-fallback .link-hotspot:hover .link-hotspot-tooltip { display: block; }

/* 9.2. Pastille d'information (.info-hotspot) - État fermé & ouvert */
.info-hotspot {
  line-height: 1.2em;
  opacity: 0.9;
  transition: opacity 0.2s 0.2s ease;
}

.no-touch .info-hotspot:hover,
.info-hotspot.visible {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.info-hotspot .info-hotspot-header {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background-color: #0376BB !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.info-hotspot.visible .info-hotspot-header,
.no-touch .info-hotspot .info-hotspot-header:hover {
  width: 440px !important;
  border-radius: 6px 6px 0 0 !important;
}

/* 9.3. En-tête du hotspot (Centrage de l'icône "i", titre, fermeture) */
.info-hotspot .info-hotspot-icon-wrapper {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 2;
}

.info-hotspot-icon {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  filter: brightness(0) invert(1) !important;
}

.info-hotspot .info-hotspot-title-wrapper {
  position: absolute !important;
  left: 36px !important;
  right: 36px !important;
  top: 0 !important;
  height: 36px !important;
  padding: 0 8px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
}

.info-hotspot .info-hotspot-title {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
}

.info-hotspot .info-hotspot-close-wrapper {
  position: absolute;
  right: 0 !important;
  left: auto !important;
  top: 0;
  height: 40px;
  width: 40px;
  border-top-right-radius: 6px;
  background-color: rgb(78, 88, 104);
  display: none;
}

.info-hotspot.visible .info-hotspot-close-wrapper {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.info-hotspot .info-hotspot-close-icon {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

/* 9.4. Contenu texte, typographie, traits fins & légendes multi-médias */
.info-hotspot .info-hotspot-text {
  position: absolute;
  width: 440px !important;
  height: auto;
  max-height: 580px;
  top: 40px;
  left: 0;
  padding: 12px;
  background-color: rgb(58, 68, 84);
  border-radius: 0 0 6px 6px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none !important;
  user-select: text;
  text-align: center;
}

.info-hotspot.visible .info-hotspot-text {
  display: block !important;
  text-align: center !important;
}

.info-hotspot-text strong,
.info-hotspot-text b,
.info-hotspot-modal strong,
.info-hotspot-modal b {
  font-weight: 700 !important;
  color: var(--color-accent) !important;
  letter-spacing: 0.8px;
}

.hotspot-thin-line {
  border: 0 !important;
  height: 1px !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  margin: 8px 0 !important;
  width: 100% !important;
}

.hotspot-captions-wrapper {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 2px 6px !important;
  text-align: center !important;
}

.hotspot-caption-item {
  font-size: 13px !important;
  font-style: italic !important;
  color: #d1d5db !important;
  line-height: 1.35 !important;
}

.hotspot-caption-item strong {
  font-style: normal !important;
  color: var(--color-accent) !important;
}

/* 9.5. Modale d'information plein écran (Smartphones) */
.desktop .info-hotspot-modal { display: none !important; }

.info-hotspot-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 11000 !important;
  background-color: rgba(0, 0, 0, 0.6);
  line-height: 1.2em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out 0.5s, visibility 0s 0.7s;
}

.info-hotspot-modal.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.2s ease-in-out, visibility 0s 0s;
}

.info-hotspot-modal .info-hotspot-header {
  position: absolute;
  top: 60px;
  left: 10px;
  right: 10px;
  width: auto !important;
  height: 50px !important;
  border-radius: 6px 6px 0 0 !important;
  background-color: #0376BB !important;
  opacity: 0;
  transition: opacity 0.3s ease-in-out 0.2s;
  display: flex !important;
  align-items: center !important;
}

.info-hotspot-modal.visible .info-hotspot-header { opacity: 1 !important; }

.info-hotspot-modal .info-hotspot-icon-wrapper {
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.info-hotspot-modal .info-hotspot-icon {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  filter: invert(1) !important;
  display: block !important;
}

.info-hotspot-modal .info-hotspot-title-wrapper {
  position: absolute !important;
  top: 0 !important;
  left: 50px !important;
  right: 50px !important;
  width: auto !important;
  height: 50px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  transition: none !important;
}

.info-hotspot-modal .info-hotspot-title {
  display: block !important;
  vertical-align: middle !important;
  user-select: text !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.info-hotspot-modal .info-hotspot-close-wrapper {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 50px !important;
  height: 50px !important;
  background-color: rgb(78, 88, 104) !important;
  border-top-right-radius: 6px !important;
  cursor: pointer !important;
  visibility: visible !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.info-hotspot-modal .info-hotspot-close-icon {
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  display: block !important;
}

.info-hotspot-modal .info-hotspot-text {
  position: absolute !important;
  top: 110px !important;
  bottom: 10px !important;
  left: 10px !important;
  right: 10px !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  padding: 12px !important;
  background-color: rgb(58, 68, 84) !important;
  border-radius: 0 0 6px 6px !important;
  overflow-y: auto !important;
  opacity: 0;
  visibility: visible !important;
  transform: none !important;
  transition: opacity 0.3s ease-in-out;
  user-select: text !important;
  text-align: center !important;
}

.info-hotspot-modal.visible .info-hotspot-text {
  opacity: 1 !important;
  transition: opacity 0.3s ease-in-out 0.4s;
}

/* 9.6. Boutons d'action (Liens / Téléchargements) et Badge de lien externe */
.hotspot-actions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  align-items: center;
  width: 100%;
}

.hotspot-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-accent);
  color: var(--color-bg) !important;
  padding: 12px 20px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
}

.hotspot-action-btn:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
}

.hotspot-action-btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0);
  display: block;
}

.link-hotspot-ext-badge {
  position: absolute;
  bottom: -8px !important;
  left: -8px !important;
  width: 24px !important;
  height: 24px !important;
  background-color: rgb(103, 115, 131) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 10 !important;
  overflow: hidden;
}

.link-hotspot-ext-badge img {
  width: 14px !important;
  height: 14px !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
}

.info-hotspot.visible .link-hotspot-ext-badge {
  display: none !important;
}

/* ==========================================================================
   10. CARROUSEL D'IMAGES ET LIGHTBOX
   ========================================================================== */
/* 10.1. Carrousel d'images intégré (.carousel-container) */
.info-hotspot-text > .hotspot-media-container > img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 12px auto;
  border-radius: 4px;
  object-fit: contain;
}

.carousel-container {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 140px !important;
  max-height: 450px !important;
  overflow: hidden !important;
  border-radius: 4px !important;
  margin-bottom: 12px !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.carousel-track {
  display: flex !important;
  width: 100% !important;
  height: auto !important;
  transition: transform 0.3s ease-in-out !important;
  align-items: center !important;
}

.carousel-slide {
  width: 100% !important;
  flex-shrink: 0 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.carousel-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 350px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
  display: block !important;
  margin: 0 auto !important;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(30, 35, 45, 0.9) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  font-size: 16px !important;
  width: 32px !important;
  height: 32px !important;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.carousel-btn:hover {
  background-color: var(--color-accent) !important;
  color: var(--color-bg) !important;
}

.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

.carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex !important;
  gap: 6px;
  z-index: 10 !important;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 10px;
}

.carousel-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background-color: rgba(255, 255, 255, 0.6) !important;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background-color: var(--color-accent) !important;
  transform: scale(1.2);
}

/* 10.2. Fenêtre modale Lightbox (.modal-overlay) */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 12000 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-overlay.enabled {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: auto;
  max-width: 90vw;
  max-height: 90vh;
  background-color: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 40px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* 10.3. Boutons de fermeture (#modalClose & #creditsCloseBtn) */
#modalClose, #creditsCloseBtn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  width: 32px !important;
  height: 32px !important;
  background-color: rgba(58, 68, 84, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 50% !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 5000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  transition: background-color 0.2s ease !important;
}

#modalClose:hover, #creditsCloseBtn:hover {
  background-color: var(--color-accent) !important;
  color: var(--color-bg) !important;
}

#modalClose img, #creditsCloseBtn img {
  width: 14px !important;
  height: 14px !important;
  object-fit: contain !important;
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

#modalClose:hover img, #creditsCloseBtn:hover img {
  filter: brightness(0) !important;
}

/* 10.4. Image agrandie (#modalImagesContainer) */
#modalImagesContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#modalImagesContainer img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: block;
}

/* 10.5. Carrousel plein écran pour modale (.modal-carousel) */
.modal-carousel {
  position: relative !important;
  width: 75vw !important;
  max-width: 750px !important;
  height: 70vh !important;
  max-height: 600px !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: 6px !important;
  background-color: var(--color-bg) !important;
}

.modal-carousel .carousel-btn {
  width: 40px !important;
  height: 40px !important;
  font-size: 18px !important;
}

.modal-carousel .carousel-btn.prev { left: 12px; }
.modal-carousel .carousel-btn.next { right: 12px; }

.modal-carousel .carousel-dots {
  bottom: 12px;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   11. LECTEURS MULTIMÉDIAS (AUDIO, VIDÉO, IFRAMES)
   ========================================================================== */
/* 11.1. Lecteur Audio personnalisé (.custom-audio-player) */
.custom-audio-player {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  height: 42px !important;
  padding: 0 12px !important;
  background-color: rgba(30, 35, 45, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
  margin-bottom: 12px !important;
  box-sizing: border-box !important;
}

.custom-audio-player .audio-play-btn {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 14px !important;
  cursor: pointer !important;
  padding: 0 !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: color 0.2s ease !important;
}

.custom-audio-player .audio-play-btn:hover {
  color: var(--color-accent) !important;
}

.custom-audio-player .audio-time {
  font-family: 'Roboto Condensed', system-ui, sans-serif !important;
  font-size: 13px !important;
  color: #d1d5db !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.custom-audio-player .audio-slider {
  flex: 1 !important;
  height: 4px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 2px !important;
  outline: none !important;
  cursor: pointer !important;
}

.custom-audio-player .audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background: var(--color-accent) !important;
  cursor: pointer !important;
}

.custom-audio-player .audio-slider::-moz-range-thumb {
  width: 12px !important;
  height: 12px !important;
  border: none !important;
  border-radius: 50% !important;
  background: var(--color-accent) !important;
  cursor: pointer !important;
}

/* 11.2. Intégrations Vidéo & Iframes */
.hotspot-media-container {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 12px 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.hotspot-media-container video,
.info-hotspot-text video {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 380px !important;
  object-fit: contain !important;
  background-color: transparent !important;
  margin: 0 auto !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
}

.hotspot-media-container iframe {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  background-color: #000000 !important;
  margin: 0 auto !important;
  border-radius: 4px;
  box-sizing: border-box !important;
}

/* ==========================================================================
   12. EFFETS DE TRANSITION DE SCÈNE
   ========================================================================== */
/* 12.1. Overlay global (#transitionOverlay) */
#transitionOverlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2000;
  overflow: hidden;
}

.trans-layer {
  position: absolute;
  background-color: #000000;
}

/* 12.2. Effet Fondu (.trans-fade) */
.trans-fade {
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  will-change: opacity;
}
#transitionOverlay.fondu-in .trans-fade { opacity: 1; pointer-events: all; }
#transitionOverlay.fondu-out .trans-fade { opacity: 0; }

/* 12.3. Effet Page tournante (.trans-page) */
.trans-page {
  top: 0; left: 0; width: 100%; height: 100%;
  transform: translateX(100%);
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}
#transitionOverlay.page-in .trans-page { transform: translateX(0%); pointer-events: all; }
#transitionOverlay.page-out .trans-page { transform: translateX(-100%); }
#transitionOverlay.page-reset .trans-page { transition: none; transform: translateX(100%); }

/* 12.4. Effet Paupières (.trans-paupiere) */
.trans-paupiere {
  left: 0; width: 100%; height: 0%;
  transition: height 0.5s ease-in-out;
  will-change: height;
}
.trans-paupiere.top { top: 0; }
.trans-paupiere.bottom { bottom: 0; }

#transitionOverlay.paupiere-in .trans-paupiere { height: 50%; pointer-events: all; }
#transitionOverlay.paupiere-out .trans-paupiere { height: 0%; }

/* ==========================================================================
   13. NOTICE D'ACCUEIL / CHARGEMENT
   ========================================================================== */
/* 13.1. Modale de chargement (#welcomeNotice) */
.welcome-notice-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.welcome-notice-overlay.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

.welcome-notice-box {
  background-color: rgba(30, 35, 45, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.welcome-notice-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #d1d5db;
}

.welcome-notice-text strong { color: var(--color-accent); }

#welcomeNoticeCloseBtn {
  background-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  border: 1px solid var(--color-accent);
  border-radius: 5px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

/* ==========================================================================
   14. FILTRES VISUELS DU PANORAMIQUE
   ========================================================================== */
/* 14.1. Filtres chromatiques WebGL (#pano.filter-*) */
#pano.filter-sepia {
  filter: sepia(0.85) contrast(1.1) brightness(0.95);
}

#pano.filter-fusain {
  filter: grayscale(100%) contrast(250%) brightness(85%) !important;
}

#pano.filter-fusain::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='charcoalFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23charcoalFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

#pano.filter-lithographie {
  filter: grayscale(100%) contrast(230%) brightness(95%) sepia(15%) !important;
}

#pano.filter-vitrail {
  filter: saturate(350%) contrast(1.4) hue-rotate(15deg);
}

#pano.filter-inversion {
  filter: invert(100%) hue-rotate(180deg);
}

#pano.filter-nocturne {
  filter: grayscale(100%) sepia(100%) hue-rotate(90deg) saturate(600%) brightness(0.8) contrast(1.3);
}

#pano.filter-sature,
#pano.filter-saturé {
  filter: saturate(250%) contrast(1.2) brightness(1.05) !important;
}

#pano.filter-chaud {
  filter: sepia(60%) saturate(210%) brightness(1.08) hue-rotate(-15deg) contrast(1.1) !important;
}

/* ==========================================================================
   15. JAUGES ET STATISTIQUES DU BANDEAU SUPÉRIEUR
   ========================================================================== */
/* 15.1. Bandeau des jauges (.stats-bar) */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: rgba(30, 35, 45, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 4px 14px;
  backdrop-filter: blur(4px);
}

.stats-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stats-group-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #a0aec0;
  font-weight: 600;
  line-height: 1;
}

.stats-group-items {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.25);
  margin: 0 4px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
}

.stat-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: invert(1);
}

.stat-text {
  font-family: monospace, monospace;
  font-size: 13px;
  color: var(--color-accent);
}

/* ==========================================================================
   16. RESPONSIVE MOBILE (< 600px)
   ========================================================================== */
@media (max-width: 600px) {
  /* 16.1. Adaptation des bandeaux tactiles */
  .bar-btn {
    width: 50px;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .bar-btn.enabled {
    background-color: var(--color-accent);
    color: var(--color-bg);
  }
  .bar-btn span { display: none; }

  .side-panel, .mobile .side-panel {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    /* Verrouille strictement le panneau entre le bandeau haut (50px) et le bandeau bas (50px) */
    max-height: calc(100% - 100px) !important;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Empêche tout débordement sous le bandeau opposé sur smartphone */
  .side-panel.panel-bottom, .mobile .side-panel.panel-bottom {
    bottom: 50px !important;
    top: auto !important;
  }

  .side-panel.panel-top, .mobile .side-panel.panel-top {
    top: 50px !important;
    bottom: auto !important;
  }

  /* Autorise le glissement du doigt sur tous les boutons et liens du menu sur mobile */
  .side-panel .panel-content,
  .side-panel .panel-content * {
    touch-action: pan-y !important;
    -webkit-user-drag: none !important;
  }

  /* 16.2. Jauges compactes */
  .stats-bar {
    gap: 16px;
    padding: 6px 12px;
  }

  .stat-item {
    flex-direction: column-reverse;
    gap: 4px;
  }

  .stat-text {
    font-size: 11px;
    line-height: 1;
  }

  .stat-icon {
    width: 14px;
    height: 14px;
  }

  /* 16.3. Pastilles d'information sur mobile */
  .mobile .info-hotspot .info-hotspot-header {
    width: 32px !important;
    height: 32px !important;
    border-radius: 16px !important;
  }

  .mobile .info-hotspot .info-hotspot-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
    left: -2px !important;
    top: -2px !important;
  }

  .info-hotspot-icon {
    width: 24px !important;
    height: 24px !important;
  }

  .mobile .info-hotspot.visible .info-hotspot-header {
    width: 32px !important;
    height: 32px !important;
    border-radius: 16px !important;
  }

  .mobile .info-hotspot.visible .info-hotspot-text,
  .mobile .info-hotspot.visible .info-hotspot-close-wrapper {
    display: none !important;
  }
}

/* ==========================================================================
   CORRECTIF DÉFILEMENT MOBILE
   ========================================================================== */
.side-panel .scene,
.side-panel .trans-btn,
.side-panel a,
.side-panel button {
  /* Autorise explicitement le geste de balayage vertical pour faire défiler le menu */
  touch-action: pan-y !important;
  
  /* Empêche le navigateur mobile d'essayer de "glisser/déposer" le lien/bouton */
  -webkit-user-drag: none !important;
  user-drag: none !important;
}

/* ==========================================================================
   17. CORRECTIFS D'ANCRAGE 3D
   ========================================================================== */
/* 17.1. Positionnement absolu des hotspots */
.hotspot {
  position: absolute;
  pointer-events: auto;
}

.info-hotspot {
  position: absolute;
  width: 40px;
  height: 40px;
  margin-left: -20px !important;
  margin-top: -20px !important;
}

/* ==========================================================================
   18. HOTSPOTS 3D DE NAVIGATION ET MODALE D'ÉNIGME
   ========================================================================== */
/* 18.1. Ancrage et visuels du hotspot 3D (.link-hotspot) */
.link-hotspot {
  position: absolute;
  width: 40px !important;
  height: 40px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: none !important;
  animation: none !important;
}

.link-hotspot-icon-container {
  position: absolute;
  top: 0 !important;
  left: 0 !important;
  width: 40px !important;
  height: 40px !important;
  background: transparent !important;
  border: none !important;
  background-color: #009966 !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.link-hotspot-icon {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  display: block !important;
  filter: brightness(0) invert(1) !important;
}

/* 18.2. Badge discret du cadenas (.link-hotspot-lock) */
.link-hotspot-lock {
  position: absolute;
  top: -8px !important;
  right: -8px !important;
  width: 24px !important;
  height: 24px !important;
  background-color: rgb(103, 115, 131) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 10 !important;
  overflow: hidden;
}

.link-hotspot-lock img {
  width: 12px !important;
  height: 12px !important;
  object-fit: contain !important;
}

.link-hotspot-lock.locked img {
  filter: brightness(0) saturate(100%) invert(73%) sepia(28%) saturate(792%) hue-rotate(341deg) brightness(96%) contrast(89%) !important;
}

.link-hotspot-lock.unlocked img {
  filter: brightness(0) saturate(100%) invert(79%) sepia(21%) saturate(1064%) hue-rotate(65deg) brightness(93%) contrast(88%) !important;
}

.info-hotspot.visible .info-hotspot-lock {
  display: none !important;
}

/* 18.3. Modale d'énigme et boutons QCM */
.enigma-overlay {
  z-index: 13000 !important;
  pointer-events: auto !important;
}

.enigma-box {
  border: 1px solid var(--color-accent) !important;
  pointer-events: auto !important;
}

.enigma-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: var(--color-accent);
  font-weight: 600;
}

.enigma-hint {
  font-size: 13px;
  color: #a0aec0;
  margin: 5px 0 10px 0;
  font-style: italic;
}

.enigma-options-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0 10px 0;
}

.enigma-option-btn {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(58, 68, 84, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.enigma-option-btn:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
}

.enigma-error {
  display: none;
  color: #e53e3e;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

.enigma-error.show { display: block; }

.enigma-success {
  display: none;
  color: #48bb78 !important;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 600;
}

.enigma-success.show { display: block !important; }

.enigma-btn.cancel {
  background-color: rgba(58, 68, 84, 0.8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
}

.enigma-btn.cancel:hover {
  background-color: rgba(103, 115, 131, 0.9);
}

@keyframes enigmaShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.welcome-notice-box.shake {
  animation: enigmaShake 0.4s ease-in-out;
}

/* ==========================================================================
   19. MODE VR STÉRÉOSCOPIQUE & CORRECTIFS FINAUX
   ========================================================================== */
/* 19.1. Mode VR Stéréoscopique (Cardboard) */
#pano-right {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

#exitVrBtn {
  display: none;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background-color: rgba(229, 62, 62, 0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 16px;
  border: 2px solid white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-family: inherit;
}

body.vr-mode #pano {
  width: 50% !important;
  left: 0 !important;
}

body.vr-mode #pano-right,
body.vr-mode #exitVrBtn {
  display: block !important;
}

body.vr-mode #topBar,
body.vr-mode #bottomBar,
body.vr-mode .hotspot,
body.vr-mode .toast-notification,
body.vr-mode #welcomeNotice {
  display: none !important;
}

/* 19.2. Forçage des icônes en blanc pur et animations de pulsation */
.inline-icon {
  width: 20px !important;
  height: 20px !important;
  vertical-align: -2px !important;
  object-fit: contain !important;
  display: inline-block !important;
  filter: invert(1);
  margin: 0 2px;
}

@keyframes subtlePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent); }
  50% { box-shadow: 0 0 14px 6px color-mix(in srgb, var(--color-accent) 95%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 60%, transparent); }
}

.link-hotspot .link-hotspot-icon-container,
.info-hotspot:not(.visible) .info-hotspot-header {
  animation: subtlePulse 1.8s infinite ease-in-out !important;
}

.no-touch .info-hotspot .info-hotspot-header:hover {
  animation: none !important;
}

.info-hotspot-close-icon,
.modal-close-icon,
.bar-btn .icon,
.panel-close-btn img,
#morePanelClose img {
  filter: brightness(0) invert(1) !important;
}

.bar-btn.enabled .icon,
.bar-btn.active .icon {
  filter: brightness(0) !important;
}

/* --- Masquage conditionnel des cadenas d'énigmes --- */
body.hide-info-enigmas .info-hotspot-lock {
  display: none !important;
}
body.hide-nav-enigmas .nav-hotspot-lock {
  display: none !important;
}

/* ==========================================================================
   20. CORRECTIF TACTILE & SCROLL MOBILE (SURCHARGE RESET.MIN.CSS)
   ========================================================================== */
/* 1. Autorise le défilement vertical partout dans les panneaux et la modale mobile */
.side-panel,
.side-panel *,
.info-hotspot-modal .info-hotspot-text,
.info-hotspot-modal .info-hotspot-text * {
  touch-action: pan-y !important;
  -ms-touch-action: pan-y !important;
  -webkit-user-drag: none !important;
}

/* 2. Rend les icônes et textes internes des boutons "transparents" au toucher 
      pour que le doigt fasse glisser le panneau sans accrocher l'image ou le texte */
.side-panel button *,
.side-panel a *,
.side-panel .scene * {
  pointer-events: none !important;
}

/* 3. Garde la croix de fermeture toujours visible en haut du panneau même quand on scrolle */
.side-panel .panel-close-btn {
  position: sticky !important;
  top: 12px !important;
  float: right !important;
  margin-top: 12px !important;
  margin-right: 12px !important;
}