/* ==========================================
   1. VOILE DE LA VISITE GUIDÉE
========================================== */

#onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;

    background: rgba(0, 0, 0, 0);

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

#onboarding-overlay.actif {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   2. SPOTLIGHT
========================================== */

#onboarding-spotlight {
    position: fixed;
    z-index: 9999;

    border: 3px solid #f5c542;
    border-radius: 10px;

    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.325),
        0 0 18px rgba(245, 197, 66, 0.8);

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transition:
        top 0.3s ease,
        left 0.3s ease,
        width 0.3s ease,
        height 0.3s ease,
        opacity 0.25s ease;
}

#onboarding-spotlight.actif {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   3. INFO-BULLE
========================================== */

#onboarding-infobulle {
    position: absolute;
    z-index: 10000;

    max-width: calc(100vw - 32px);
    box-sizing: border-box;

    padding: 20px;

    background: #ffffff;
    color: #252525;

    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);

    opacity: 0;
    visibility: hidden;

    transform: translateY(8px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

#onboarding-infobulle.actif {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================
   4. EN-TÊTE DE L'INFO-BULLE
========================================== */

.onboarding-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 12px;
}

#onboarding-numero {
    font-size: 0.85rem;
    font-weight: bold;

    color: #9a7410;
}

#onboarding-fermer {
    border: none;
    background: transparent;

    color: #555555;

    font-size: 1.7rem;
    line-height: 1;

    cursor: pointer;
}

/* ==========================================
   5. TITRE ET DESCRIPTION
========================================== */

#onboarding-titre {
    margin: 0 0 10px;

    font-size: 1.3rem;
    color: #252525;
}

#onboarding-description {
    margin: 0 0 18px;

    font-size: 0.95rem;
    line-height: 1.5;

    color: #444444;
}

/* ==========================================
   6. BARRE DE PROGRESSION
========================================== */

.onboarding-progression {
    width: 100%;
    height: 7px;

    margin-bottom: 18px;

    overflow: hidden;

    background: #e5e5e5;
    border-radius: 10px;
}

#onboarding-progression-barre {
    width: 0;
    height: 100%;

    background: #d6a91e;

    border-radius: 10px;

    transition: width 0.3s ease;
}

/* ==========================================
   7. BOUTONS
========================================== */

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 8px;
    flex-wrap: wrap;
}

.onboarding-actions button {
    padding: 9px 13px;

    border: none;
    border-radius: 6px;

    font-size: 0.85rem;
    font-weight: bold;

    cursor: pointer;

    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}

#onboarding-precedent {
    background: #e5e5e5;
    color: #333333;
}

#onboarding-ignorer {
    background: transparent;
    color: #777777;
}

#onboarding-suivant {
    background: #d6a91e;
    color: #222222;
}

.onboarding-actions button:hover {
    opacity: 0.8;
}

.onboarding-actions button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================
   8. PETITS ÉCRANS
========================================== */

@media (max-width: 480px) {

    #onboarding-infobulle {
        padding: 16px;
    }

    #onboarding-titre {
        font-size: 1.1rem;
    }

    #onboarding-description {
        font-size: 0.9rem;
    }

    .onboarding-actions button {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

}
/* ==========================================
   9. MENU LATÉRAL DE L'ONBOARDING
========================================== */

#onboarding-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;

    width: 270px;
    padding: 20px;

    box-sizing: border-box;
    overflow-y: auto;

    background: #ffffff;
    color: #252525;

    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);

    z-index: 10001;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

#onboarding-menu.actif {
    opacity: 1;
    visibility: visible;
}

#onboarding-menu h3 {
    margin: 0 0 18px;
    font-size: 1.15rem;
}

.onboarding-menu-section {
    margin-bottom: 18px;
}

.onboarding-menu-section h4 {
    margin: 0 0 8px;
    padding-bottom: 6px;

    font-size: 0.95rem;
    color: #9a7410;

    border-bottom: 1px solid #eeeeee;
}

.onboarding-menu-etape {
    display: flex;
    align-items: center;
    gap: 9px;

    width: 100%;
    padding: 9px 10px;
    margin-bottom: 4px;

    border: none;
    border-radius: 6px;

    background: transparent;
    color: #444444;

    text-align: left;
    font-size: 0.85rem;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.onboarding-menu-etape:hover {
    background: #f5f0df;
}

.onboarding-menu-etape.active {
    background: #d6a91e;
    color: #222222;
    font-weight: bold;
}

.onboarding-menu-etape.terminee {
    color: #27834b;
}

.onboarding-menu-etape .numero {
    flex-shrink: 0;
    font-weight: bold;
}

.onboarding-menu-etape .statut {
    margin-left: auto;
    font-weight: bold;
}

/* ==========================================
   10. MENU SUR PETITS ÉCRANS
========================================== */

@media (max-width: 768px) {

    #onboarding-menu {
        top: 10px;
        left: 10px;
        bottom: 10px;

        width: min(270px, calc(100vw - 20px));
    }

}