/* ── GUIDED TOUR ───────────────────────────────────────── */

/* Overlay sombre */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9990;
    transition: opacity 0.2s ease;
}

/* Spotlight : trou lumineux autour de l'élément cible */
.tour-spotlight {
    position: absolute;
    z-index: 9991;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Tooltip */
.tour-tooltip {
    position: absolute;
    z-index: 9992;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px 24px 16px;
    width: 360px;
    max-width: calc(100vw - 24px);
    animation: tourFadeIn 0.25s ease;
}

.tour-tooltip--center {
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

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

/* Flèche (pseudo-element) */
.tour-tooltip--bottom::before,
.tour-tooltip--top::after,
.tour-tooltip--left::after,
.tour-tooltip--right::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
}

.tour-tooltip--bottom::before {
    top: -7px;
    left: 32px;
}

.tour-tooltip--top::after {
    bottom: -7px;
    left: 32px;
}

.tour-tooltip--left::after {
    right: -7px;
    top: 24px;
}

.tour-tooltip--right::before {
    left: -7px;
    top: 24px;
}

/* Header */
.tour-tooltip__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tour-tooltip__counter {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 2px 10px;
    border-radius: 99px;
    letter-spacing: 0.02em;
}

.tour-tooltip__close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.tour-tooltip__close:hover {
    color: #374151;
}

/* Title */
.tour-tooltip__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.3;
}

/* Content */
.tour-tooltip__content {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 16px;
}
.tour-tooltip__content strong {
    color: #111827;
    font-weight: 600;
}

/* Footer (buttons) */
.tour-tooltip__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
}

/* Buttons */
.tour-btn {
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.tour-btn--primary {
    background: #6366f1;
    color: #fff;
}
.tour-btn--primary:hover {
    background: #4f46e5;
}

.tour-btn--secondary {
    background: #f3f4f6;
    color: #374151;
}
.tour-btn--secondary:hover {
    background: #e5e7eb;
}

/* Bouton "?" pour relancer le tour */
.tour-trigger-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tour-trigger__label {
    background: #fff;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.tour-trigger__label--hidden {
    opacity: 0;
    transform: translateX(8px);
}

.tour-trigger {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    border: none;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
    flex-shrink: 0;
}
.tour-trigger:hover {
    background: #4f46e5;
    transform: scale(1.08);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 480px) {
    .tour-tooltip {
        width: calc(100vw - 24px);
        padding: 16px 18px 12px;
    }
    .tour-trigger-wrap {
        bottom: 12px;
        right: 12px;
    }
    .tour-trigger__label {
        display: none;
    }
    .tour-trigger {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}
