/* ===== Tour guidé ===== */

/* Les 4 divs du spotlight sont créées en JS (position:fixed inline) */

/* Bulle de texte */
.tour-bubble {
    position: fixed;
    z-index: 9100;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.12);
    padding: 20px 22px 16px;
    max-width: 320px;
    min-width: 240px;
    pointer-events: all;
    animation: tour-bubble-in .22s cubic-bezier(.34,1.56,.64,1);
}

@keyframes tour-bubble-in {
    from { opacity: 0; transform: scale(.92) translateY(6px); }
    to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.tour-bubble-step {
    font-size: .72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.tour-bubble-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.3;
}

.tour-bubble-body {
    font-size: .875rem;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 16px;
}

.tour-bubble-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tour-dots {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1d5db;
    transition: background .2s, width .2s;
    flex-shrink: 0;
}
.tour-dot.active {
    background: #2563eb;
    width: 18px;
    border-radius: 4px;
}

.tour-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-btn {
    border: none;
    border-radius: 7px;
    padding: 7px 14px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.tour-btn:hover { opacity: .85; }
.tour-btn:active { transform: scale(.96); }

.tour-btn-skip {
    background: transparent;
    color: #6b7280;
    padding: 7px 4px;
    font-size: .8rem;
    margin-right: auto;
}
.tour-btn-prev {
    background: #f3f4f6;
    color: #374151;
}
.tour-btn-next {
    background: #2563eb;
    color: #fff;
    margin-left: auto;
}
.tour-btn-finish {
    background: #16a34a;
    color: #fff;
    margin-left: auto;
}

/* Flèche de la bulle — offset calculé en JS via --tour-arrow-h et --tour-arrow-v */
.tour-bubble::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.tour-bubble[data-arrow="top"]::before {
    top: -6px;
    left: var(--tour-arrow-h, 24px);
    box-shadow: -2px -2px 4px rgba(0,0,0,.06);
}
.tour-bubble[data-arrow="bottom"]::before {
    bottom: -6px;
    left: var(--tour-arrow-h, 24px);
    box-shadow: 2px 2px 4px rgba(0,0,0,.06);
}
.tour-bubble[data-arrow="left"]::before {
    left: -6px;
    top: var(--tour-arrow-v, 20px);
    box-shadow: -2px 2px 4px rgba(0,0,0,.06);
}
.tour-bubble[data-arrow="right"]::before {
    right: -6px;
    top: var(--tour-arrow-v, 20px);
    box-shadow: 2px -2px 4px rgba(0,0,0,.06);
}
.tour-bubble[data-arrow="none"]::before { display: none; }

/* Bouton "?" flottant — au-dessus du bouton bug report (bottom: 24+44+12 = 80px) */
#tourHelpBtn {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 8900;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    border: none;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37,99,235,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, box-shadow .15s;
}
#tourHelpBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,99,235,.5);
}
#tourHelpBtn:active { transform: scale(.95); }

/* Masquer si le cookie banner est visible */
body.cookie-visible #tourHelpBtn { display: none; }
