/* ===== Onboarding Tour ===== */

/* Désactive le scroll du body quand le tour est actif */
body.tour-active {
  overflow: hidden;
}

/* Backdrop : voile semi-opaque qui cache tout sauf le spotlight */
.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
  /* Le voile est dessiné par la spotlight via box-shadow géant */
  background: transparent;
  animation: tour-fade 0.25s ease;
}
@keyframes tour-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Spotlight : un cadre lumineux qui détoure l'élément cible.
   Le voile noir est obtenu via un box-shadow giant (technique classique). */
.tour-spotlight {
  position: fixed;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(8, 14, 11, 0.74),
    0 0 0 1.5px rgba(74, 222, 128, 0.85),
    0 0 12px rgba(34, 197, 94, 0.35);
  transition: top 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Tooltip : carte flottante avec le contenu de l'étape */
.tour-tooltip {
  position: fixed;
  z-index: 9100;
  width: 420px;
  max-width: calc(100vw - 24px);
  background: var(--bg-card-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px 26px 20px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(34, 197, 94, 0.18);
  font-family: var(--font-sans);
  animation: tour-pop 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes tour-pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.tour-tooltip-center {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: 460px;
}
.tour-tooltip-center.tour-tooltip {
  /* Re-applique l'animation depuis le centre */
  animation: tour-pop-center 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes tour-pop-center {
  from { transform: translate(-50%, -50%) scale(0.94); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.tour-tooltip-step {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-bright);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}

.tour-tooltip-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--text-bright);
  line-height: 1.3;
}

.tour-tooltip-body {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.tour-tooltip-body strong {
  color: var(--accent-bright);
  font-weight: 600;
}

.tour-tooltip-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.tour-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.tour-skip:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.tour-nav {
  display: flex;
  gap: 6px;
}
.tour-tooltip .btn-primary,
.tour-tooltip .btn-secondary {
  padding: 8px 16px;
  font-size: 0.88rem;
}

@media (max-width: 600px) {
  .tour-tooltip { width: calc(100vw - 24px); padding: var(--sp-md); }
}
