:root {
  --bg0: #0b0d10;
  --bg1: #111418;
  --txt: #e6ebf0;
  --muted: #9aa1a9;
  --accent1: #22c55e;
  --accent2: #38bdf8;
  --accent3: #22c55e;
  --border: #1b2026;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--txt);
  background:
    radial-gradient(1200px 800px at 80% -20%, rgba(56, 189, 248, 0.12), transparent),
    radial-gradient(1000px 600px at 10% -10%, rgba(34, 197, 94, 0.1), transparent),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* 3D canvas plein écran */
#bg3d {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
}

/* Layout général */
header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(180%) blur(10px);
  background: rgba(11, 13, 16, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1100px;
  margin: auto;
  padding: 12px 20px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(27, 32, 38, 0.8);
}

.subtitle {
  color: var(--muted);
  opacity: 0.9;
  font-size: 14px;
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 20px 56px;
}

.kicker {
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  margin: 10px 0 16px;
  font-weight: 800;
}

.neon {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 12px rgba(34, 197, 94, 0.12),
    0 0 18px rgba(56, 189, 248, 0.12);
}

a.neon:hover span {
  background: linear-gradient(90deg, var(--accent2), var(--accent1));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 0 12px rgba(34, 94, 197, 0.12),
    0 0 18px rgba(56, 248, 189, 0.12);
}

#loading:hover {
  animation: rotation 0.5s infinite linear;
}

@keyframes rotation {
  50% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(720deg);
  }
}

.lead {
  max-width: 760px;
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--muted);
}

.cta {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--txt);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16) inset;
}

.btn.primary {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.2);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.08));
}

.sections {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 120vh;
}

section {
  margin: 80px 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17, 20, 24, 0.92), rgba(11, 13, 16, 0.92));
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
}

p {
  line-height: 1.65;
  color: var(--muted);
}

section strong {
  color: var(--txt);
}

/* Globe interactif */

.globe-section {
  margin-top: 90px;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.globe-section > p {
  margin-bottom: 18px;
}

.globe-shell {
  position: relative;
  margin-top: 24px;
  border-radius: 18px;
  overflow: visible;
  min-height: 0;
  /* Full-bleed to escape the centered .sections container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.globe-viewport {
  width: 100%;
  overflow: hidden;
}

/* Points HTML (10px) pour les villes */
.globe-viewport .city-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444; /* rouge */
  box-shadow: 0 0 6px rgba(239,68,68,.6);
  transform: translate(-50%, -50%); /* centre sur la coordonnée */
  pointer-events: auto;
  z-index: 3;
}

/* Forcer le conteneur interne Globe.gl sans padding et le décaler à gauche */
.globe-viewport .scene-container{
  padding: 0 !important;
}

/* Responsive: réduire/désactiver le décalage sur petits écrans */
/* Plus besoin de marges négatives en responsive: centrage géré en JS */

.parchment {
  position: absolute;
  top: 20px;
  right: 20px;
  width: min(320px, 70%);
  max-height: calc(100% - 40px);
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(121, 97, 57, 0.6);
  background: linear-gradient(180deg, rgba(255, 245, 205, 0.94), rgba(241, 220, 170, 0.9));
  color: #1f1a0f;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform: perspective(600px) rotateX(6deg);
}

.parchment.hidden {
  display: none;
}

.parchment-close {
  align-self: flex-end;
  border: none;
  background: transparent;
  color: rgba(31, 26, 15, 0.7);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.parchment-close:hover {
  color: rgba(31, 26, 15, 0.9);
}

.parchment-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.parchment-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.parchment-body:focus {
  outline: 2px solid rgba(34, 197, 94, 0.4);
  outline-offset: 2px;
}

.parchment-body::-webkit-scrollbar {
  width: 6px;
}

.parchment-body::-webkit-scrollbar-thumb {
  background: rgba(31, 26, 15, 0.35);
  border-radius: 6px;
}

.parchment-body::-webkit-scrollbar-track {
  background: transparent;
}

/* HUD flottant */
.hud {
  position: fixed;
  right: 16px;
  bottom: 16px;
  backdrop-filter: blur(8px);
  background: rgba(11, 13, 16, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.15);
}

.hud label {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Motion réduite */
@media (prefers-reduced-motion: reduce) {
  #bg3d {
    display: none;
  }

  body {
    background: linear-gradient(180deg, var(--bg0), var(--bg1));
  }
}
