/* =========================================================
   XR EXPLORER — GLOBE IFRAME (VERSION ISOLÉE)
   ========================================================= */

html, body { overflow: hidden; /* empêche tout scroll dans l’iframe */ background-color: #0a0a0a; /* fond identique au site */ }

/* ===============================
   TYPOGRAPHIE GLOBALE
   =============================== */
body {
  font-family: 'Roboto', 'Segoe UI', sans-serif;
  color: #e0e0e0;
  line-height: 1.6;
}

/* ===============================
   TYPO POUR LE TEXTE COURANT
   (panels, tooltip, légende)
   =============================== */
.panel,
.help-panel,
#legendBar,
#tooltip {
  font-family: 'Roboto', 'Segoe UI', sans-serif;
}

/* ===============================
   TYPO POUR LES TITRES / ACCENTS
   =============================== */
.panel-header h2,
.help-header,
#legendBar span {
  font-family: 'Yantramanav', sans-serif;
}


/* ---------------------------------------------------------
   1. CONTAINER GLOBAL
--------------------------------------------------------- */

.globe-container {
  position: relative;
  width: 100%;
  height: 100vh; /* plus stable que 100svh dans un iframe */
  overflow: hidden;
  display: block;
  background-color: #0a0a0a; /* fond du site */
}

/* ---------------------------------------------------------
   2. CADRE PREMIUM
--------------------------------------------------------- */
.globe-container.framed-mode .globe-frame {
  position: absolute;
  inset: 1vh 4vw;
  border-radius: 22px;
  border: 1px solid rgba(3, 233, 244, 0.18);
  box-shadow:
    0 0 22px rgba(3, 233, 244, 0.08),
    inset 0 0 18px rgba(3, 233, 244, 0.05);
  background: rgba(0, 10, 25, 0.25);
  backdrop-filter: blur(6px);
  overflow: hidden;
  z-index: 1;
}

/* ---------------------------------------------------------
   3. GLOBE CANVAS
--------------------------------------------------------- */
#globeViz {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#globeViz canvas {
  pointer-events: auto;
  background: transparent !important;
}

/* ---------------------------------------------------------
   4. NETWORK CANVAS
--------------------------------------------------------- */
#networkCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  background: transparent;
}

/* ---------------------------------------------------------
   5. TOOLTIP
--------------------------------------------------------- */
#tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  pointer-events: auto;
  display: none;
  z-index: 30;
  border: 1px solid #03e9f4;
  box-shadow: 0 0 5px #03e9f4, 0 0 10px #03e9f4, 0 0 20px #03e9f4;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}

#tooltip.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------------------
   6. LEGEND BAR
--------------------------------------------------------- */
#legendBar {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  z-index: 20;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(3, 233, 244, 0.25);
}

/* ---------------------------------------------------------
   7. PANEL (MEMBRES / VILLES)
--------------------------------------------------------- */
.panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  max-height: 70vh;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  pointer-events: none;

  background: rgba(0, 10, 25, 0.65);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  border: 1px solid rgba(3, 233, 244, 0.25);
  box-shadow: 0 0 22px rgba(3, 233, 244, 0.15);

  color: #fff;
  padding: 0;
  z-index: 9000;

  transition: 0.35s ease;
  overflow: hidden;
}

.panel.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 10, 25, 0.35);
  border-bottom: 1px solid rgba(3, 233, 244, 0.15);
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
  color: #03e9f4;
}

.panel-header button {
  background: transparent;
  border: none;
  color: #03e9f4;
  font-size: 20px;
  cursor: pointer;
}

.panel-body {
  padding: 18px;
  max-height: calc(70vh - 70px);
  overflow-y: auto;
}

/* ---------------------------------------------------------
   8. PANEL — CITY BLOCKS
--------------------------------------------------------- */
.panel-city {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #111;
  border: 1px solid #222;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.25s;
  animation: fadeSlide 0.35s ease forwards;
  opacity: 0;
  transform: translateY(6px);
}

.panel-city:hover {
  background: #0d0d0d;
  border-color: #03e9f4;
  transform: translateX(4px);
}

/* ---------------------------------------------------------
   9. PANEL — MEMBER LIST
--------------------------------------------------------- */
.member-row {
  list-style: none;
  margin: 4px 0;
}

.member-row a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-left: 2px solid rgba(3, 233, 244, 0.4);
  background: rgba(0, 10, 25, 0.25);
  color: #03e9f4;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s ease;
}

.member-row a:hover {
  background: rgba(3, 233, 244, 0.12);
  border-left-color: #03e9f4;
  padding-left: 14px;
}

.member-dot {
  width: 6px;
  height: 6px;
  background: #03e9f4;
  border-radius: 50%;
  opacity: 0.8;
}

/* ---------------------------------------------------------
   10. HELP PANEL + button et toolbox
--------------------------------------------------------- */
/* ===============================
   TOOLBOX (Zoom + / Zoom -)
   =============================== */
/* Colonne à droite */
.side-controls {
  position: absolute;
  bottom: 6vh;
  right: 6vw;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

/* Boutons zoom + / - */
.tool-btn,
.help-button {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(3, 233, 244, 0.4);
  background: rgba(0, 10, 25, 0.4);
  backdrop-filter: blur(6px);
  color: #03e9f4;
  font-size: 20px;
  cursor: pointer;
  transition: 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* tu peux garder ton .help-button:hover existant si tu veux */

/* ---------------------------------------------------------
   10. HELP PANEL 
--------------------------------------------------------- */

.help-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  padding: 24px;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  pointer-events: none;
  border-radius: 18px;
  background: rgba(0, 10, 25, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(3, 233, 244, 0.25);
  box-shadow: 0 0 22px rgba(3, 233, 244, 0.15);
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  z-index: 9998;
  transition: 0.35s ease;
  max-height: 70vh;
  overflow-y: auto;
}

.help-panel.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.help-header {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  gap: 8px;
}

.help-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  background: rgba(3, 233, 244, 0.1);
  border: 1px solid rgba(3, 233, 244, 0.25);
  border-radius: 6px;
  color: #03e9f4;
  cursor: pointer;
  transition: 0.25s;
}

.help-tab.active {
  background: rgba(3, 233, 244, 0.25);
  border-color: rgba(3, 233, 244, 0.4);
}

.help-close {
  background: rgba(3, 233, 244, 0.1);
  border: 1px solid rgba(3, 233, 244, 0.25);
  border-radius: 6px;
  color: #03e9f4;
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------------------------------------------------------
   11. ANIMATIONS
--------------------------------------------------------- */
@keyframes fadeSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   MOBILE — PANELS RESSERRÉS (SANS TOUCHER DESKTOP)
   ========================================================= */
@media screen and (max-width: 768px) {

  /* Panel membres */
  .panel {
    width: 82%;
    max-width: 320px;
    max-height: 78vh;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 9999; /* reste au-dessus du globe */
  }

  /* Panel menu (help) */
  .help-panel {
    width: 82%;
    max-width: 320px;
    max-height: 78vh;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 9999; /* reste au-dessus du globe */
  }
}

/* =========================================================
   BOUTON OK (help panel)
   ========================================================= */
.help-ok {
  width: 100%;
  margin-top: 18px;
  padding: 10px 0;
  text-align: center;
  background: rgba(3, 233, 244, 0.15);
  border: 1px solid rgba(3, 233, 244, 0.35);
  border-radius: 10px;
  color: #03e9f4;
  font-size: 16px;
  cursor: pointer;
  transition: 0.25s ease;
}

.help-ok:hover {
  background: rgba(3, 233, 244, 0.25);
  box-shadow: 0 0 10px rgba(3, 233, 244, 0.35);
}


/* =========================================================
   BOUTON MODE NUIT (onglet Options)
   ========================================================= */
.option-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 0;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: 0.25s ease;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.option-btn.active-night {
  background: rgba(3, 233, 244, 0.25);
  border-color: rgba(3, 233, 244, 0.5);
  color: #03e9f4;
}

/* =========================================================
   MOBILE — Ajustement des boutons
   ========================================================= */
@media screen and (max-width: 768px) {
  .help-ok,
  .option-btn {
    font-size: 14px;
    padding: 9px 0;
  }
}


