/* ==========================================================================
   AGAPÉ-LOGOS — MODULE CARTOGRAPHIQUE HAUTE DÉFINITION (MIDNIGHT GOLD)
   Israël 1er Siècle ⇄ Moderne & Les 4 Voyages Missionnaires de Paul
   Charte Visuelle : Obsidian Glass, Or d\'Alliance (#c5a880) & Émeraude (#16a085)
   ========================================================================== */

:root {
  --bg-deep: #070b12;
  --bg-obsidian: rgba(8, 13, 26, 0.92);
  --bg-obsidian-solid: #0a1020;
  --bg-surface-elevated: rgba(18, 27, 46, 0.95);
  
  --gold-primary: #c5a880;
  --gold-bright: #ffd700;
  --gold-amber: #f59e0b;
  --gold-dark: #8c704d;
  --gold-glow: rgba(245, 158, 11, 0.45);
  --gold-border: rgba(197, 168, 128, 0.25);
  --gold-border-bright: rgba(197, 168, 128, 0.55);
  
  --cyan-modern: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.4);
  
  --emerald-accent: #16a085;
  --emerald-glow: rgba(22, 160, 133, 0.4);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-serif: \'Cinzel\', \'Playfair Display\', Georgia, serif;
  --font-sans: \'Inter\', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.carto-body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

.carto-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
  background: var(--bg-deep);
}

/* ==========================================================================
   1. EN-TÊTE SUPÉRIEUR (HEADER OBSIDIAN GLASS)
   ========================================================================== */
.carto-header {
  height: 64px;
  background: rgba(7, 11, 18, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.carto-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.carto-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--gold-glow));
  transition: var(--transition-smooth);
}

.carto-brand:hover .carto-logo {
  transform: scale(1.08);
}

.carto-title-col {
  display: flex;
  flex-direction: column;
}

.carto-main-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.carto-badge-version {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(197, 168, 128, 0.15);
  color: var(--gold-bright);
  border: 1px solid var(--gold-border);
  padding: 1px 7px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.carto-sub-title {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Sélecteur d\'Univers (Capsule Flottante) */
.scene-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 16, 32, 0.92);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--gold-border);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0,0,0,0.4);
}

.scene-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.scene-tab-btn:hover {
  color: var(--text-main);
  background: rgba(197, 168, 128, 0.1);
}

.scene-tab-btn.active {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.3) 0%, rgba(245, 158, 11, 0.18) 100%);
  color: #ffffff;
  border: 1px solid var(--gold-border-bright);
  box-shadow: 0 0 16px var(--gold-glow);
  font-weight: 600;
}

.scene-tab-btn .tab-icon {
  font-size: 14px;
}

/* Actions Rapides Haut Droite */
.carto-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-action-btn {
  background: rgba(18, 27, 46, 0.85);
  border: 1px solid var(--gold-border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.header-action-btn:hover {
  background: rgba(197, 168, 128, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

/* ==========================================================================
   2. VIEWPORT & MOTEUR LEAFLET HD
   ========================================================================== */
.carto-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #040811;
  user-select: none;
  -webkit-user-select: none;
}

.leaflet-map-stage,
#leaflet-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
  background: #070b12;
}

.leaflet-container {
  width: 100% !important;
  height: 100% !important;
  background: #070b12 !important;
  font-family: var(--font-sans) !important;
}

/* Scène 3 : Tabernacle 3D */
.tabernacle-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: radial-gradient(circle at 50% 40%, #151e33 0%, #070b12 85%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   3. COMPARATEUR TEMPOREL (TIME-SLIDER FLOTTANT AVEC BOUTONS & CURSEUR)
   ========================================================================== */
.time-slider-overlay {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.time-slider-capsule {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-obsidian);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 30px;
  padding: 6px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.time-slider-capsule:hover {
  border-color: var(--gold-border-bright);
}

/* Barre de préréglages temporels (Presets) */
.time-presets-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.preset-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.preset-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.preset-btn.active {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.35) 0%, rgba(245, 158, 11, 0.2) 100%);
  color: var(--gold-bright);
  border: 1px solid var(--gold-border-bright);
  font-weight: 600;
  box-shadow: 0 0 10px var(--gold-glow);
}

.time-slider-rail-wrap {
  position: relative;
  width: 130px;
  display: flex;
  align-items: center;
}

.time-slider-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--gold-amber) 0%, rgba(197,168,128,0.4) 50%, var(--cyan-modern) 100%);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.time-slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--gold-bright);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.9), 0 2px 6px rgba(0,0,0,0.8);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.time-slider-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 18px rgba(245, 158, 11, 1);
}

/* ==========================================================================
   4. HUD FLOTTANT GAUCHE (OBSIDIAN GLASS CISELÉ)
   ========================================================================== */
.carto-left-hud {
  position: absolute;
  top: 18px;
  left: 20px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
  pointer-events: auto;
}

.hud-card {
  background: var(--bg-obsidian);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-smooth);
}

.hud-card:hover {
  border-color: var(--gold-border-bright);
}

.hud-card-label {
  font-family: var(--font-serif);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* 1. Recherche */
.hud-search-card {
  position: relative;
}

.hud-search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-obsidian);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 14px;
  padding: 8px 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
  transition: var(--transition-smooth);
}

.hud-search-input-wrapper:focus-within {
  border-color: var(--gold-bright);
  box-shadow: 0 0 18px var(--gold-glow);
}

.hud-search-icon {
  font-size: 14px;
  color: var(--gold-primary);
}

.hud-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12.5px;
  outline: none;
}

.hud-search-input::placeholder {
  color: var(--text-dim);
}

.hud-search-clear {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

.hud-search-clear:hover {
  color: #ffffff;
}

.hud-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: rgba(10, 16, 32, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 10px 35px rgba(0,0,0,0.8);
  z-index: 200;
}

.hud-search-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition-smooth);
}

.hud-search-item:last-child {
  border-bottom: none;
}

.hud-search-item:hover {
  background: rgba(197, 168, 128, 0.18);
}

.hud-search-ancient {
  font-weight: 600;
  color: var(--gold-primary);
  font-size: 12.5px;
}

.hud-search-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 2. Sélecteur de Fond de Carte */
.hud-segmented-control {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hud-segment-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 4px;
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.hud-segment-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.hud-segment-btn.active {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.3) 0%, rgba(245, 158, 11, 0.2) 100%);
  color: #ffffff;
  border: 1px solid var(--gold-border-bright);
  font-weight: 600;
  box-shadow: 0 0 10px var(--gold-glow);
}

/* 3. Filtres de Calques */
.hud-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.hud-chip-toggle {
  background: rgba(18, 27, 46, 0.7);
  border: 1px solid rgba(197, 168, 128, 0.18);
  color: var(--text-muted);
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.hud-chip-toggle:hover {
  border-color: var(--gold-primary);
  color: var(--text-main);
}

.hud-chip-toggle.active {
  background: rgba(197, 168, 128, 0.2);
  color: var(--gold-bright);
  border-color: var(--gold-border-bright);
  font-weight: 600;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-ancient { background: var(--emerald-accent); }
.dot-gold { background: var(--gold-bright); }
.dot-cyan { background: var(--cyan-modern); }
.dot-amber { background: var(--gold-amber); }

/* ==========================================================================
   5. PLAYER D\'ÉPOPÉE DE PAUL (CONSOLE FLOTTANTE EN BAS)
   ========================================================================== */
.paul-journey-player {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(880px, calc(100vw - 40px));
  background: var(--bg-obsidian);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 18px;
  padding: 14px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(197, 168, 128, 0.15);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-smooth);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.journey-selector-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.journey-chip {
  background: rgba(18, 27, 46, 0.85);
  border: 1px solid var(--gold-border);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.journey-chip:hover {
  color: var(--text-main);
  border-color: var(--gold-primary);
}

.journey-chip.active {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.35) 0%, rgba(245, 158, 11, 0.25) 100%);
  color: #ffffff;
  border-color: var(--gold-bright);
  font-weight: 600;
  box-shadow: 0 0 12px var(--gold-glow);
}

.journey-meta-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--gold-primary);
}

.player-controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.playback-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #c5a880 100%);
  border: none;
  color: #070b12;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 16px var(--gold-glow);
  transition: var(--transition-smooth);
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.9);
}

.step-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(18, 27, 46, 0.9);
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-nav-btn:hover {
  background: rgba(197, 168, 128, 0.2);
  color: #ffffff;
}

.timeline-track-wrapper {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.timeline-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-primary) 0%, var(--gold-bright) 100%);
  box-shadow: 0 0 10px var(--gold-glow);
  transition: width 0.3s ease;
}

.active-stage-banner {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(197, 168, 128, 0.15);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stage-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
}

.stage-event-snippet {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   6. OUTILS FLOTTANTS CARTE (BAS DROIT)
   ========================================================================== */
.map-floating-tools {
  position: absolute;
  bottom: 24px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.map-tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-obsidian);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: var(--transition-smooth);
}

.map-tool-btn:hover {
  background: rgba(197, 168, 128, 0.25);
  color: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: scale(1.08);
}

/* ==========================================================================
   7. TIROIR D\'ÉTUDE PHILOLOGIQUE (STUDY DRAWER LATÉRAL)
   ========================================================================== */
.study-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: rgba(8, 13, 26, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 2px solid var(--emerald-accent);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.85);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.study-drawer.hidden {
  transform: translateX(105%);
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(18, 27, 46, 0.5);
}

.drawer-ancient-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.drawer-polytonic-name {
  font-size: 14px;
  color: var(--gold-primary);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

.drawer-modern-match {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.drawer-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-province {
  background: rgba(22, 160, 133, 0.2);
  border: 1px solid var(--emerald-accent);
  color: #2dd4bf;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}

.badge-strong {
  background: rgba(197, 168, 128, 0.18);
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
}

.drawer-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-section {
  background: rgba(18, 27, 46, 0.6);
  border: 1px solid rgba(197, 168, 128, 0.15);
  border-left: 2px solid var(--gold-primary);
  border-radius: 10px;
  padding: 14px;
}

.drawer-section-title {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.drawer-section-content {
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ==========================================================================
   8. MARQUEURS & POPUPS LEAFLET AGAPÉ-LOGOS
   ========================================================================== */
/* Marqueur Ville Antique (Sceau Doré Lumineux) */
.custom-pin-ancient {
  background: radial-gradient(circle at 35% 35%, #ffd700 0%, #d97706 70%, #92400e 100%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.95), 0 2px 6px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-pin-ancient:hover {
  transform: scale(1.4);
  box-shadow: 0 0 24px rgba(245, 158, 11, 1);
}

/* Marqueur Ville Contemporaine (Micro-Balise Cyan) */
.custom-pin-modern {
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 80%, #0369a1 100%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85), 0 2px 6px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-pin-modern:hover {
  transform: scale(1.35);
  box-shadow: 0 0 20px rgba(56, 189, 248, 1);
}

/* Marqueur Étape Paul (Médaille Or Numérotée) */
.custom-pin-step {
  background: radial-gradient(circle at 35% 35%, #ffd700 0%, #d97706 80%, #78350f 100%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #070b12;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(245, 158, 11, 1), 0 3px 8px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-pin-step.active {
  transform: scale(1.3);
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ffd700 60%, #d97706 100%);
  box-shadow: 0 0 26px rgba(255, 215, 0, 1);
}

/* Popups Leaflet Obsidian Glass */
.leaflet-popup-content-wrapper {
  background: rgba(8, 13, 26, 0.96) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border-bright) !important;
  border-radius: 14px !important;
  color: var(--text-main) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(197, 168, 128, 0.2) !important;
  padding: 6px !important;
}

.leaflet-popup-tip {
  background: rgba(8, 13, 26, 0.96) !important;
  border: 1px solid var(--gold-border-bright) !important;
}

.leaflet-popup-close-button {
  color: var(--gold-primary) !important;
  padding: 8px !important;
}

.leaflet-popup-close-button:hover {
  color: var(--gold-bright) !important;
}

/* Tooltips Leaflet */
.leaflet-tooltip {
  background: rgba(8, 13, 26, 0.92) !important;
  border: 1px solid var(--gold-border) !important;
  color: var(--gold-primary) !important;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 11.5px;
  border-radius: 8px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75) !important;
  padding: 4px 10px !important;
}

/* ==========================================================================
   9. RESPONSIVE DESIGN (SMARTPHONE & TABLETTE)
   ========================================================================== */
@media (max-width: 900px) {
  .carto-header {
    height: 56px;
    padding: 0 12px;
  }

  .carto-sub-title {
    display: none;
  }

  .scene-tab-btn span.tab-label {
    display: none;
  }

  .carto-left-hud {
    top: 66px;
    left: 12px;
    width: calc(100vw - 24px);
  }

  .study-drawer {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100vw;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 2px solid var(--emerald-accent);
  }

  .study-drawer.hidden {
    transform: translateY(105%);
  }

  .paul-journey-player {
    bottom: 12px;
    padding: 10px 14px;
    width: calc(100vw - 24px);
  }

  .time-slider-overlay {
    top: 10px;
  }
}

/* ==========================================================================
   10. CAPSULE NARRATIVE FLOTTANTE (STORY VIGNETTE EN STYLE A)
   ========================================================================== */
.paul-story-vignette {
  position: absolute;
  top: 76px;
  right: 24px;
  width: 280px;
  background: rgba(8, 13, 26, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border-bright);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(197, 168, 128, 0.18);
  z-index: 450;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.paul-story-vignette.minimized .vignette-body {
  display: none;
}

.vignette-header {
  padding: 10px 14px;
  background: rgba(18, 27, 46, 0.75);
  border-bottom: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vignette-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vignette-badge-step {
  font-size: 10px;
  font-weight: 900;
  padding: 3px 7px;
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-bright) 100%);
  color: #0b0c10;
  border-radius: 6px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.vignette-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vignette-location-name {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vignette-bible-ref {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-primary);
}

.vignette-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--gold-border);
  color: var(--gold-primary);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.vignette-toggle-btn:hover {
  background: rgba(197, 168, 128, 0.2);
  color: var(--gold-bright);
  border-color: var(--gold-bright);
}

.vignette-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vignette-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(197, 168, 128, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  background: #000;
}

.vignette-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.vignette-image-wrapper:hover .vignette-image {
  transform: scale(1.03);
}

.vignette-glow-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 70%, rgba(8, 13, 26, 0.7) 100%);
}

.vignette-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vignette-event-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  margin: 0;
  line-height: 1.35;
}

.vignette-grace-key {
  font-size: 11px;
  font-style: italic;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.vignette-action-btn {
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.25) 0%, rgba(245, 158, 11, 0.2) 100%);
  border: 1px solid var(--gold-border-bright);
  color: var(--gold-bright);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.vignette-action-btn:hover {
  background: linear-gradient(135deg, rgba(197, 168, 128, 0.4) 0%, rgba(245, 158, 11, 0.35) 100%);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

@media (max-width: 900px) {
  .paul-story-vignette {
    top: 66px;
    right: 12px;
    width: 240px;
  }
}

