/* ============================================================
   Visite virtuelle — Monument de la Renaissance Africaine
   Palette puisée dans les prises de vue : rouille du socle,
   sable du parvis, bleu de fin de journée sur Dakar.
   ============================================================ */

:root {
  --rust:      #9c4a32;
  --rust-dark: #6f331f;
  --sand:      #d9c7a3;
  --dusk:      #16283a;
  --dusk-2:    #0e1c29;
  --ink:       #120f0d;
  --bone:      #f4ecdd;
  --bone-dim:  rgba(244, 236, 221, 0.62);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-ui);
  overflow: hidden;
}

#pano {
  position: absolute;
  inset: 0;
  background: var(--ink);
}

/* ---------- Chargement ---------- */

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(156, 74, 50, 0.25), transparent 60%),
    linear-gradient(180deg, var(--dusk) 0%, var(--ink) 100%);
  transition: opacity 0.6s ease;
}
#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bone);
  text-align: center;
  padding: 0 24px;
}
.loading-sub {
  font-size: 0.85rem;
  color: var(--bone-dim);
  letter-spacing: 0.04em;
}
.loading-bar-track {
  width: 220px;
  height: 3px;
  background: rgba(244, 236, 221, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--rust);
  transition: width 0.3s ease;
}

/* ---------- Barre supérieure ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 26px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 12, 10, 0.55) 0%, rgba(14, 12, 10, 0) 100%);
}
.brand {
  pointer-events: auto;
}
.brand-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}
.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
  margin-top: 4px;
}

.topbar-controls {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(244, 236, 221, 0.25);
  background: rgba(18, 15, 13, 0.45);
  backdrop-filter: blur(6px);
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.icon-btn:hover { background: rgba(156, 74, 50, 0.45); border-color: var(--rust); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.active { background: var(--rust); border-color: var(--rust); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Info scène en cours ---------- */

.scene-caption {
  position: fixed;
  left: 26px;
  bottom: 118px;
  z-index: 20;
  max-width: 420px;
  pointer-events: none;
}
.scene-caption .num {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--bone-dim);
  margin-bottom: 6px;
}
.scene-caption h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.6vw, 2.1rem);
  margin: 0 0 6px 0;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.scene-caption p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--bone-dim);
  line-height: 1.4;
}

/* ---------- Hotspots de navigation ---------- */

.nav-hotspot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(18, 15, 13, 0.5);
  border: 1.5px solid rgba(244, 236, 221, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  animation: pulse-ring 2.6s ease-in-out infinite;
}
.nav-hotspot:hover {
  background: var(--rust);
  border-color: var(--bone);
  transform: scale(1.08);
}
.nav-hotspot svg {
  width: 22px;
  height: 22px;
  stroke: var(--bone);
}
.nav-hotspot.prev svg { transform: rotate(180deg); }

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(156, 74, 50, 0.0); }
  50% { box-shadow: 0 0 0 10px rgba(156, 74, 50, 0.0); }
}

/* ---------- Panneau de vignettes ---------- */

.thumb-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 14px 20px 20px;
  background: linear-gradient(0deg, rgba(14, 12, 10, 0.85) 0%, rgba(14, 12, 10, 0) 100%);
  transition: transform 0.35s ease;
}
.thumb-panel.collapsed {
  transform: translateY(calc(100% - 34px));
}
.thumb-panel-handle {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 10px;
  cursor: pointer;
}
.thumb-panel-handle .grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(244, 236, 221, 0.35);
}
.thumb-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.thumb-track::-webkit-scrollbar { height: 5px; }
.thumb-track::-webkit-scrollbar-thumb { background: rgba(244,236,221,0.25); border-radius: 4px; }

.thumb-item {
  flex: 0 0 auto;
  width: 128px;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.thumb-item:hover { transform: translateY(-3px); }
.thumb-item.active { border-color: var(--rust); }
.thumb-item img {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: cover;
  filter: brightness(0.8);
  transition: filter 0.2s ease;
}
.thumb-item.active img,
.thumb-item:hover img { filter: brightness(1); }
.thumb-item .label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 4px 6px 3px;
  font-size: 0.65rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .topbar { padding: 16px; }
  .scene-caption { left: 16px; bottom: 108px; max-width: calc(100% - 32px); }
  .thumb-item { width: 96px; }
  .thumb-item img { height: 52px; }
}
