/*
 * NowYouSea — Onboarding tour guidé
 * Vanilla CSS, zéro dépendance. Tout préfixé "nystour-" pour cohabiter
 * sans conflit avec Tailwind / Leaflet déjà présents sur le site.
 */

/* ---------- Bouton flottant de relance ---------- */
.nystour-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  background: #0d1b2a;
  color: #e6f1f7;
  border: 1px solid #1b3047;
  border-radius: 999px;
  padding: 10px 16px;
  font: 500 13px/1.2 Inter, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.nystour-fab:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* ---------- Bloqueur plein écran (avale les clics pendant le tour) ---------- */
.nystour-blocker {
  position: fixed;
  inset: 0;
  z-index: 99991;
  background: transparent;
  cursor: default;
}

/* ---------- Spotlight (highlight de la cible) ---------- */
.nystour-highlight {
  position: fixed;
  z-index: 99992;
  border: 2px solid #38bdf8;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(3, 8, 14, 0.80),
    0 0 20px rgba(56, 189, 248, 0.5);
  pointer-events: none;
  transition: top 0.15s ease, left 0.15s ease, width 0.15s ease, height 0.15s ease;
}

/* ---------- Carte du tour (tooltip de l'étape) ---------- */
.nystour-card {
  position: fixed;
  z-index: 99993;
  width: min(340px, calc(100vw - 32px));
  background: #0d1b2a;
  color: #e6f1f7;
  border: 1px solid #1b3047;
  border-radius: 12px;
  padding: 16px 18px 14px;
  font-family: Inter, system-ui, sans-serif;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.nystour-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.nystour-meta {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7fa8c0;
}

.nystour-close {
  background: none;
  border: none;
  color: #7fa8c0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.nystour-close:hover {
  color: #e6f1f7;
  background: #1b3047;
}

.nystour-card h3 {
  margin: 4px 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #e6f1f7;
}

.nystour-card-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: #e6f1f7;
}
.nystour-card-body code {
  background: #1b3047;
  color: #38bdf8;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12.5px;
}
.nystour-card-body a {
  color: #38bdf8;
  text-decoration: underline;
}
.nystour-card-body b,
.nystour-card-body strong {
  color: #f5b642;
  font-weight: 600;
}

/* ---------- Barre de progression ---------- */
.nystour-progress {
  height: 3px;
  background: #1b3047;
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0 12px;
}
.nystour-progress-fill {
  height: 100%;
  background: #38bdf8;
  transition: width 0.2s ease;
}

/* ---------- Boutons de navigation ---------- */
.nystour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.nystour-btn {
  white-space: nowrap;
  font: 500 12.5px/1 Inter, system-ui, sans-serif;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #1b3047;
  background: transparent;
  color: #e6f1f7;
  cursor: pointer;
}
.nystour-btn:hover {
  background: #1b3047;
}
.nystour-btn-primary {
  background: #38bdf8;
  color: #060d16;
  border-color: #38bdf8;
  font-weight: 600;
}
.nystour-btn-primary:hover {
  background: #2dd4a7;
  border-color: #2dd4a7;
}

/* ---------- Modale (étape sans cible, bienvenue, fin) ---------- */
.nystour-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99994;
  background: rgba(3, 8, 14, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nystour-modal {
  width: min(420px, 100%);
  background: #0d1b2a;
  color: #e6f1f7;
  border: 1px solid #1b3047;
  border-radius: 14px;
  padding: 22px 24px 18px;
  font-family: Inter, system-ui, sans-serif;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.nystour-modal h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.nystour-modal .nystour-card-body {
  margin-bottom: 16px;
}

.nystour-modal .nystour-actions {
  justify-content: flex-end;
}

/* Modale de bienvenue : deux boutons égaux, alignés à gauche/droite */
.nystour-welcome-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.nystour-welcome-actions .nystour-btn {
  flex: 1;
  text-align: center;
}

/* ---------- Responsive : bandeau fixe en bas sous 720px ---------- */
@media (max-width: 720px) {
  .nystour-card {
    left: 0 !important;
    right: 0;
    bottom: 0;
    top: auto !important;
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    padding: 14px 16px 16px;
  }

  .nystour-fab {
    right: 12px;
    bottom: 12px;
    padding: 9px 14px;
    font-size: 12.5px;
  }
}

.nystour-welcome-more {
  margin-top: .75rem;
  text-align: center;
  font-size: .78rem;
}
.nystour-welcome-more a {
  color: rgba(226, 240, 255, .5);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nystour-welcome-more a:hover { color: #7dd3fc; }
