/* =========================================================================
   XNOVA SYSTEMS — Globe 3D du bandeau de contact (.cta-band)
   Le canvas et l'étiquette sont injectés par src/assets/js/globe.js, qui ajoute
   .has-globe au bandeau. Sans JS (ou animations réduites), rien ne change.
   ========================================================================= */

.cta-band.has-globe {
  --globe-size: clamp(560px, 42vw, 620px);
}

/* Empilement (le bandeau isole son contexte) : fond → halo ::after (z -1, styles.css)
   → globe et étiquette (z 0) → texte et boutons (z 1). Aucun pseudo-élément utilisé ici. */
.cta-band.has-globe > :not(.cta-band__globe):not(.cta-band__place) {
  position: relative;
  z-index: 1;
}

.cta-band__globe {
  position: absolute;
  z-index: 0;
  right: calc(var(--globe-size) * -0.17);
  top: calc(53% - var(--globe-size) * 0.5);
  width: var(--globe-size);
  height: var(--globe-size);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

.cta-band__globe.is-ready {
  opacity: 1;
}

/* Petits écrans larges : le globe recule à droite, l'accroche passe sur deux lignes */
@media (min-width: 1024px) and (max-width: 1279px) {
  .cta-band__globe {
    right: calc(var(--globe-size) * -0.3);
  }

  .cta-band.has-globe .lead {
    max-width: 28rem;
  }
}

/* Étiquette de Niamey : pastille à droite du point projeté, reliée par un filet.
   Le coin haut-gauche de l'élément suit le point (transform mis à jour en JS). */
.cta-band__place {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-reveal) var(--ease-out);
  will-change: transform;
}

.cta-band__place.is-visible {
  opacity: 1;
}

.cta-band__place-tag {
  position: absolute;
  top: 0;
  left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  translate: 0 -50%;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.3;
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
}

.cta-band__place-tag::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: var(--space-3);
  height: 1px;
  background: var(--color-accent-border);
}

.cta-band__place.is-left .cta-band__place-tag {
  left: auto;
  right: var(--space-5);
}

.cta-band__place.is-left .cta-band__place-tag::before {
  right: auto;
  left: 100%;
}

.cta-band__place-city {
  color: var(--color-text);
  text-transform: uppercase;
}

.cta-band__place-coords {
  color: var(--color-text-muted);
}

/* Tablette : globe plus petit, plus discret, en bas à droite */
@media (max-width: 1023px) {
  .cta-band.has-globe {
    --globe-size: clamp(400px, 52vw, 500px);
  }

  .cta-band__globe {
    right: calc(var(--globe-size) * -0.38);
    top: auto;
    bottom: calc(var(--globe-size) * -0.4);
  }

  .cta-band__globe.is-ready {
    opacity: 0.5;
  }

  .cta-band__place {
    display: none;
  }
}

/* Mobile : un arc de planète discret derrière le bas du bandeau */
@media (max-width: 639px) {
  .cta-band.has-globe {
    --globe-size: 400px;
  }

  .cta-band__globe {
    right: calc(var(--globe-size) * -0.44);
    bottom: calc(var(--globe-size) * -0.38);
  }

  .cta-band__globe.is-ready {
    opacity: 0.45;
  }
}

/* Ceinture et bretelles : globe.js ne démarre pas dans ce cas */
@media (prefers-reduced-motion: reduce) {
  .cta-band__globe,
  .cta-band__place {
    display: none;
  }
}
