:root {
  /* Couleur principale (seed) */
  --primary: #106e5b;

  /* Variante plus claire et plus foncée pour dégradés ou hover */
  --primary-light: #1a8c74;
  --primary-dark: #0c584a;

  /* Couleur d’accentuation secondaire (inspirée Material 3) */
  --accent: #ffc107;

  /* Fond d’écran (scaffoldBackgroundColor) */
  --bg: #f6f7fb;

  /* Couleur des cartes et surfaces */
  --surface: #ffffff;

  /* Couleur du texte principal et secondaire */
  --text-primary: #0f2d2a;
  --text-secondary: #5b6b67;

  /* Ombres et bordures douces */
  --shadow: 0 8px 20px rgba(16, 110, 91, 0.15);
  --border-color: rgba(16, 110, 91, 0.1);
}

/* Overlay gate */
.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}
.gate__inner {
  background: #fff;
  color: #0d2956;
  border-radius: 16px;
  padding: 20px 22px;
  width: min(90vw, 520px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.gate__inner h2 {
  margin: 0.2rem 0 0.4rem;
}
.gate__inner p {
  margin: 0.2rem 0 0.8rem;
  color: #54627a;
}
.gate.hidden {
  display: none;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

/* Appbar */
.appbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + var(--safe-top)) 12px 8px;
  background: rgba(13, 41, 86, 0.96);
  color: #fff;
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 10;
}
.appbar__title {
  font-weight: 700;
}
.appbar__cta {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

/* Hero */
.hero {
  min-height: 44vh;
  display: grid;
  place-items: center;
  background: linear-gradient(
      to bottom,
      rgba(13, 41, 86, 0.55),
      rgba(13, 41, 86, 0.55)
    ),
    url("https://upload.wikimedia.org/wikipedia/commons/3/3a/Monument_de_la_Renaissance_Africaine_2010.jpg")
      center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 2.5rem 1rem;
}
.hero__overlay {
  max-width: 720px;
}
.hero h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.btn--primary {
  background: var(--accent);
}
.btn--floating {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
}
.btn.small {
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Tabs sticky */
.tabs {
  position: sticky;
  top: 56px;
  z-index: 9;
  background: #fff;
  border-bottom: 1px solid #e7edf5;
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 12px;
  overflow: auto;
}
.tab {
  flex: 0 0 auto;
  border: 1px solid #e7edf5;
  background: white;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
}

/* Layout */
.container {
  padding: 14px;
  max-width: 1000px;
  margin: 0 auto;
}
.block {
  margin: 16px 0;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 4px;
}
h2 {
  margin: 0.2rem 0 0.6rem;
  color: var(--primary);
  font-size: 1.22rem;
}
.credit {
  font-size: 0.9rem;
  color: #617aa4;
  margin: 0.5rem 0 0;
}

/* Media surfaces */
.surface {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #0b2350;
  border-radius: 12px;
  overflow: hidden;
}
.surface--tall {
  aspect-ratio: 3/4;
}
.iframe-wrapper iframe,
.yt-embed {
  width: 100%;
  height: 62vh; /* immersion mobile */
  max-height: 560px;
  border: 0;
  display: block;
  border-radius: 12px;
}

/* Bouton gyro flottant */
.gyro {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
}

/* Segmented controls & panels */
.segmented {
  display: flex;
  gap: 8px;
  background: #f1f5fb;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.segmented__btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-weight: 700;
  color: var(--primary);
}
.segmented__btn.is-active {
  background: #fff;
  box-shadow: var(--shadow);
}
.panels {
  position: relative;
}
.panel {
  display: none;
  animation: fade 0.25s ease;
}
.panel.is-visible {
  display: block;
}
@keyframes fade {
  from {
    opacity: 0.6;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* VR video controls */
.controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 16px calc(14px + var(--safe-bottom));
  text-align: center;
  color: #5d6d90;
}

/* Desktop tweaks */
@media (min-width: 880px) {
  .container {
    padding: 18px;
  }
  .surface {
    aspect-ratio: 16/9;
  }
  .iframe-wrapper iframe,
  .yt-embed {
    height: 560px;
  }
}
