/* ═══════════════════════════════════════════════════════════
   ABILR WIZARD TOUR — Premium CSS
═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --tour-purple:     #7b68ee;
  --tour-purple-dk:  #5a4fcf;
  --tour-purple-lt:  #ede9ff;
  --tour-green:      #27ae60;
  --tour-radius:     16px;
  --tour-shadow:     0 24px 64px rgba(0,0,0,.22);
  --tour-transition: .3s cubic-bezier(.34,1.56,.64,1);
}

/* ── Overlay ────────────────────────────────────────────── */
#abilr-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  background: transparent;
  transition: background .4s ease;
}
#abilr-tour-overlay.active {
  pointer-events: all;
}

/* Spotlight hole via clip-path + box-shadow */
.abilr-spotlight {
  position: fixed;
  z-index: 99991;
  border-radius: 12px;
  box-shadow:
    0 0 0 9999px rgba(0,0,0,.62),
    0 0 0 3px var(--tour-purple),
    0 0 30px rgba(123,104,238,.5);
  pointer-events: none;
  transition: all .4s cubic-bezier(.25,.8,.25,1);
  animation: abilr-spotlight-pulse 2s ease-in-out infinite;
}
@keyframes abilr-spotlight-pulse {
  0%,100% { box-shadow: 0 0 0 9999px rgba(0,0,0,.62), 0 0 0 3px var(--tour-purple), 0 0 20px rgba(123,104,238,.4); }
  50%      { box-shadow: 0 0 0 9999px rgba(0,0,0,.62), 0 0 0 3px var(--tour-purple), 0 0 40px rgba(123,104,238,.7); }
}

/* ── Modal / Tooltip container ──────────────────────────── */
.abilr-tour-popup {
  position: fixed;
  z-index: 99999;
  background: #fff;
  border-radius: var(--tour-radius);
  box-shadow: var(--tour-shadow);
  width: 340px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  animation: abilr-popup-in var(--tour-transition) both;
  border: 1px solid rgba(123,104,238,.15);
}
@keyframes abilr-popup-in {
  from { opacity:0; transform: scale(.88) translateY(16px); }
  to   { opacity:1; transform: none; }
}

/* Center modal */
.abilr-tour-popup.center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  animation: abilr-modal-in var(--tour-transition) both;
}
@keyframes abilr-modal-in {
  from { opacity:0; transform: translate(-50%,-50%) scale(.88); }
  to   { opacity:1; transform: translate(-50%,-50%) scale(1); }
}

/* ── Arrow ──────────────────────────────────────────────── */
.abilr-tour-popup::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border: 1px solid rgba(123,104,238,.15);
  transform: rotate(45deg);
  z-index: -1;
}
.abilr-tour-popup.arrow-top::before    { top: -7px; left: 24px; border-bottom: none; border-right: none; }
.abilr-tour-popup.arrow-bottom::before { bottom: -7px; left: 24px; border-top: none; border-left: none; }
.abilr-tour-popup.arrow-left::before   { left: -7px; top: 24px; border-right: none; border-bottom: none; }
.abilr-tour-popup.arrow-right::before  { right: -7px; top: 24px; border-left: none; border-top: none; }
.abilr-tour-popup.center::before       { display: none; }

/* ── Header bar ─────────────────────────────────────────── */
.abilr-tour-header {
  background: linear-gradient(135deg, var(--tour-purple), #9b59b6);
  padding: 18px 20px 14px;
  position: relative;
  overflow: hidden;
}
.abilr-tour-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.abilr-tour-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.abilr-tour-step-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.abilr-tour-close {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  line-height: 1;
  padding: 0;
}
.abilr-tour-close:hover { background: rgba(255,255,255,.35); }

.abilr-tour-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
  animation: abilr-icon-bounce .6s var(--tour-transition);
}
@keyframes abilr-icon-bounce {
  0%   { transform: scale(0) rotate(-20deg); }
  80%  { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}

.abilr-tour-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

/* ── Progress bar ───────────────────────────────────────── */
.abilr-tour-progress-wrap {
  height: 3px;
  background: rgba(255,255,255,.25);
  position: relative;
  overflow: hidden;
}
.abilr-tour-progress-bar {
  height: 100%;
  background: #fff;
  transition: width .4s ease;
  border-radius: 3px;
}

/* ── Body ───────────────────────────────────────────────── */
.abilr-tour-body {
  padding: 18px 20px;
}
.abilr-tour-content {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0 0 14px;
}
.abilr-tour-content strong { color: var(--tour-purple); }

/* Tip box */
.abilr-tour-tip {
  background: #f8f6ff;
  border-left: 3px solid var(--tour-purple);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  font-size: 12px;
  color: #666;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.abilr-tour-tip::before {
  content: '💡';
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Choices ────────────────────────────────────────────── */
.abilr-tour-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.abilr-tour-choice-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--tour-purple-lt);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--tour-purple);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all .2s ease;
}
.abilr-tour-choice-btn:hover {
  background: var(--tour-purple);
  color: #fff;
  border-color: var(--tour-purple);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123,104,238,.3);
}

/* ── Footer ─────────────────────────────────────────────── */
.abilr-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 18px;
  gap: 10px;
}

/* Dots */
.abilr-tour-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.abilr-tour-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #e0e0e0;
  transition: all .25s ease;
  cursor: pointer;
}
.abilr-tour-dot.active {
  background: var(--tour-purple);
  width: 20px;
  border-radius: 4px;
}
.abilr-tour-dot:hover:not(.active) {
  background: #bbb;
}

/* Buttons */
.abilr-tour-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.abilr-tour-btn-skip {
  background: none;
  border: none;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .2s;
}
.abilr-tour-btn-skip:hover { color: #666; }

.abilr-tour-btn-prev {
  background: none;
  border: 1.5px solid #e0e0e0;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all .2s;
}
.abilr-tour-btn-prev:hover {
  border-color: var(--tour-purple);
  color: var(--tour-purple);
}

.abilr-tour-btn-next {
  background: linear-gradient(135deg, var(--tour-purple), #9b59b6);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 6px;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(123,104,238,.35);
}
.abilr-tour-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(123,104,238,.45);
}
.abilr-tour-btn-next:active { transform: none; }

/* CTA button (last step) */
.abilr-tour-cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--tour-purple), #9b59b6);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-decoration: none !important;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(123,104,238,.35);
  transition: all .2s;
}
.abilr-tour-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(123,104,238,.45);
}

/* ── Replay trigger button — bottom LEFT (avoid GTranslate bottom-right) ── */
#abilr-tour-trigger {
  position: fixed;
  bottom: 24px;
  left: 24px;       /* ← gauche, loin de GTranslate */
  right: auto;
  z-index: 9999;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tour-purple), #9b59b6);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(123,104,238,.45);
  transition: all .25s ease;
  animation: abilr-trigger-in .5s var(--tour-transition) 2s both;
}
@keyframes abilr-trigger-in {
  from { transform: scale(0) rotate(-180deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
#abilr-tour-trigger:hover {
  transform: scale(1.12) rotate(15deg);
  box-shadow: 0 8px 24px rgba(123,104,238,.55);
}

/* Tooltip label au hover */
#abilr-tour-trigger::before {
  content: 'Platform Tour';
  position: absolute;
  left: 56px;
  background: #1a1a2e;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#abilr-tour-trigger:hover::before { opacity: 1; }

/* Pulse ring */
#abilr-tour-trigger::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--tour-purple);
  animation: abilr-trigger-ring 2s ease-in-out infinite;
}
@keyframes abilr-trigger-ring {
  0%   { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 480px) {
  #abilr-tour-trigger { bottom: 24px; left: 16px; }
}

/* ── Confetti (done step) ───────────────────────────────── */
.abilr-confetti-piece {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 2px;
  z-index: 100000;
  pointer-events: none;
  animation: abilr-confetti-fall 2.5s ease-out forwards;
}
@keyframes abilr-confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .abilr-tour-popup { width: calc(100vw - 24px); }
  .abilr-tour-popup.center {
    top: auto; bottom: 12px;
    left: 12px; right: 12px;
    transform: none;
    width: auto;
    animation: abilr-modal-mobile-in var(--tour-transition) both;
  }
  @keyframes abilr-modal-mobile-in {
    from { opacity:0; transform: translateY(40px); }
    to   { opacity:1; transform: none; }
  }
  #abilr-tour-trigger { bottom: 80px; }
}
