/* ============================================
   AlbionCash — Onboarding tour guidé
   ============================================ */

/* Overlay assombri */
.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
  opacity: 0;
  transition: opacity .3s cubic-bezier(.2,.8,.2,1);
}

.ob-overlay.show {
  opacity: 1;
}

/* Le mask SVG est rendu directement par le script */
.ob-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Spotlight ring autour de l'élément ciblé */
.ob-ring {
  position: fixed;
  z-index: 9001;
  border: 2px solid var(--gold, #F2C84D);
  border-radius: 12px;
  pointer-events: none;
  box-shadow:
    0 0 0 4px rgba(242, 200, 77, 0.15),
    0 0 32px rgba(242, 200, 77, 0.4);
  transition: all .4s cubic-bezier(.2,.8,.2,1);
  animation: obPulse 2s ease-in-out infinite;
}

@keyframes obPulse {
  0%, 100% {
    box-shadow:
      0 0 0 4px rgba(242, 200, 77, 0.15),
      0 0 32px rgba(242, 200, 77, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(242, 200, 77, 0.05),
      0 0 48px rgba(242, 200, 77, 0.6);
  }
}

/* Tooltip / bulle d'aide */
.ob-tip {
  position: fixed;
  z-index: 9002;
  background: var(--surface, #14141D);
  border: 1px solid var(--border, #292938);
  border-radius: 14px;
  padding: 22px 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(242, 200, 77, 0.15);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s cubic-bezier(.2,.8,.2,1), transform .3s cubic-bezier(.2,.8,.2,1);
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text, #F2F2F7);
}

.ob-tip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Pointeur (flèche) — direction adaptable */
.ob-tip::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--surface, #14141D);
  border: 1px solid var(--border, #292938);
  transform: rotate(45deg);
}
.ob-tip[data-arrow="left"]::before {
  left: -8px;
  top: 50%;
  margin-top: -7px;
  border-right: none;
  border-top: none;
}
.ob-tip[data-arrow="right"]::before {
  right: -8px;
  top: 50%;
  margin-top: -7px;
  border-left: none;
  border-bottom: none;
}
.ob-tip[data-arrow="top"]::before {
  top: -8px;
  left: 32px;
  border-right: none;
  border-bottom: none;
}
.ob-tip[data-arrow="bottom"]::before {
  bottom: -8px;
  left: 32px;
  border-left: none;
  border-top: none;
}
.ob-tip[data-arrow="none"]::before { display: none; }

/* Header tooltip : numéro + skip */
.ob-tip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ob-tip-step {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: var(--gold, #F2C84D);
}

.ob-tip-skip {
  background: none;
  border: none;
  color: var(--text-dim, #66667A);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .15s;
  font-family: inherit;
}
.ob-tip-skip:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text, #F2F2F7);
}

/* Contenu */
.ob-tip-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.ob-tip-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted, #A6A6B2);
  margin-bottom: 18px;
}
.ob-tip-body strong { color: var(--text, #F2F2F7); }

/* Footer : progression + boutons */
.ob-tip-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ob-dots {
  display: flex;
  gap: 6px;
}

.ob-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all .2s;
}
.ob-dot.active {
  background: var(--gold, #F2C84D);
  width: 18px;
  border-radius: 100px;
}

.ob-tip-actions {
  display: flex;
  gap: 8px;
}

.ob-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.ob-btn-prev {
  background: transparent;
  color: var(--text-muted, #A6A6B2);
  border: 1px solid var(--border, #292938);
}
.ob-btn-prev:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #F2F2F7);
}
.ob-btn-next {
  background: var(--gold, #F2C84D);
  color: #000;
}
.ob-btn-next:hover {
  background: #FFD56C;
  transform: translateY(-1px);
}

/* Welcome / End modal — centré */
.ob-modal-tip {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 460px;
  text-align: center;
}
.ob-modal-tip.show {
  transform: translate(-50%, -50%) scale(1) !important;
}
.ob-modal-tip::before { display: none; }

.ob-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFD56C, #C68A1F);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #000;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(242, 200, 77, 0.25);
}

/* Bouton d'aide (relance le tour de l'outil actuel) */
#obRelaunchBtn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  height: 40px;
  padding: 0 14px 0 14px;
  border-radius: 100px;
  background: var(--surface, #14141D);
  border: 1px solid var(--border, #292938);
  color: var(--text-muted, #A6A6B2);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  z-index: 100;
  transition: all .25s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}
#obRelaunchBtn::before {
  content: "Aide";
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all .25s cubic-bezier(.2,.8,.2,1);
}
#obRelaunchBtn:hover {
  background: linear-gradient(180deg, var(--gold-bright, #FFD56C), var(--gold, #F2C84D));
  border-color: var(--gold);
  color: #1a1208;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 176, 74, 0.35);
}
#obRelaunchBtn:hover::before {
  opacity: 1;
  width: auto;
  color: #1a1208;
  margin-right: 2px;
}
#obRelaunchBtn.visible {
  display: flex;
}

/* Pulse animation pour attirer l'attention a la 1ere visite d'un onglet */
@keyframes obPulseRing {
  0% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 0 0 rgba(232, 176, 74, 0.6),
      0 0 0 0 rgba(232, 176, 74, 0.4);
  }
  60% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 0 10px rgba(232, 176, 74, 0),
      0 0 0 20px rgba(232, 176, 74, 0);
  }
  100% {
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 0 0 rgba(232, 176, 74, 0),
      0 0 0 0 rgba(232, 176, 74, 0);
  }
}

@keyframes obPulseBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

#obRelaunchBtn.ob-pulse {
  animation: obPulseRing 1.6s ease-out infinite, obPulseBounce 1.6s ease-in-out infinite;
  border-color: var(--gold, #F2C84D) !important;
  color: var(--gold, #F2C84D) !important;
}
/* Affiche aussi le label "Aide" pendant le pulse */
#obRelaunchBtn.ob-pulse::before {
  opacity: 1 !important;
  width: auto !important;
  color: var(--gold, #F2C84D) !important;
  margin-right: 2px;
}
