/* ============================================
   GUIDED TOUR - Tour interactif
   z-index: 1500 (entre modal=1000 et toast=2000)
   ============================================ */

/* Overlay sombre plein ecran */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* Spotlight — trou dans l'overlay via box-shadow geant */
.tour-spotlight {
    position: absolute;
    z-index: 1501;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    transition: all 0.4s ease;
    pointer-events: none;
}

/* Bulle tooltip */
.tour-bubble {
    position: absolute;
    z-index: 1502;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 380px;
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: tourFadeIn 0.3s ease;
    pointer-events: auto;
}

@keyframes tourFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Fleche CSS — direction selon la classe .pos-* */
.tour-bubble::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}
.tour-bubble.pos-bottom::before {
    top: -16px;
    left: 24px;
    border-bottom-color: #fff;
}
.tour-bubble.pos-top::before {
    bottom: -16px;
    left: 24px;
    border-top-color: #fff;
}
.tour-bubble.pos-left::before {
    right: -16px;
    top: 20px;
    border-left-color: #fff;
}
.tour-bubble.pos-right::before {
    left: -16px;
    top: 20px;
    border-right-color: #fff;
}

/* Contenu de la bulle */
.tour-bubble-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark, #2d3748);
    margin-bottom: 8px;
    padding-right: 20px;
}

.tour-bubble-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray, #718096);
    margin-bottom: 20px;
}

.tour-counter {
    font-size: 12px;
    color: var(--gray, #718096);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Navigation Precedent / Suivant */
.tour-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.tour-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.tour-btn-prev {
    background: var(--light, #f7fafc);
    color: var(--dark, #2d3748);
    border: 1px solid var(--border, #e2e8f0);
}
.tour-btn-prev:hover {
    background: var(--border, #e2e8f0);
}

.tour-btn-next {
    background: linear-gradient(135deg, var(--primary, #667eea), var(--secondary, #764ba2));
    color: #fff;
}
.tour-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Bouton fermer (x) */
.tour-btn-close {
    background: none;
    border: none;
    color: var(--gray, #718096);
    cursor: pointer;
    font-size: 20px;
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 4px;
    line-height: 1;
}
.tour-btn-close:hover {
    color: var(--dark, #2d3748);
}

/* Animation pulse pour attirer l'attention sur le bouton Guide */
@keyframes tour-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    50%      { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

/* Bouton Guide (?) dans la barre de navigation */
.tour-guide-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border, #e2e8f0);
    background: #fff;
    color: var(--primary, #667eea);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-left: auto;
    animation: tour-pulse 2.5s ease-in-out infinite;
}
.tour-guide-btn:hover {
    background: linear-gradient(135deg, var(--primary, #667eea), var(--secondary, #764ba2));
    color: #fff;
    border-color: var(--primary, #667eea);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: none;
}

/* Responsive */
@media (max-width: 768px) {
    .tour-bubble {
        max-width: calc(100vw - 40px);
        min-width: 240px;
    }
    .tour-guide-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}
