/**
 * localisation: public/assets/css/components/guide.css
 * Role: Modale « Guide de démarrage » (étapes) + panneau de proposition (#guidePrompt)
 * Usage: templates/modals/guide.php ; piloté par /assets/js/core/guide.js
 * Dépendances: Bootstrap 5 (btn, modal), variables du thème
 */

/* ---------- Étapes de la modale ---------- */

#guideModal .modal-body {
    padding-bottom: 0.5rem;
}

.guide-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.guide-progress-bar {
    height: 100%;
    width: 0;
    background: var(--plf-green, #2e7d32);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.guide-step {
    display: none;
    animation: guideFadeIn 0.25s ease;
}

.guide-step.is-active {
    display: block;
}

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

.guide-step-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--plf-green, #2e7d32);
}

.guide-step-title i {
    margin-right: 0.4rem;
}

.guide-list {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.guide-list li {
    margin-bottom: 0.35rem;
}

.guide-screenshot {
    display: block;
    max-width: 100%;
    max-height: 320px;
    margin: 0.75rem auto 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    object-fit: contain;
}

#guideModal .guide-footer {
    display: flex;
    align-items: center;
    /* connexion.css impose justify-content: center !important → on doit le contrer */
    justify-content: space-between !important;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

/* Annule .auth-modal .btn-auth { display:block; width:100% } : boutons côte à côte */
#guideModal .guide-footer .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 0.5rem 1rem !important;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* .auth-modal .btn-auth (0,2,0) + !important bat .d-none : on renforce pour la modale Guide */
#guideModal .guide-footer .btn.d-none {
    display: none !important;
}

/* « Terminer » : présent à toutes les étapes, fond neutre */
#guideModal .guide-footer .btn-finish {
    background-color: #444 !important;
    border-color: #444 !important;
    color: #fff !important;
}

#guideModal .guide-footer .btn-finish:hover,
#guideModal .guide-footer .btn-finish:focus {
    background-color: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

.guide-counter {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
}

/* ---------- Panneau de proposition ---------- */

.guide-prompt {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    /* Sous les modales Bootstrap (backdrop 1050, modal 1055) : jamais au-dessus */
    z-index: 1040;
    width: 320px;
    max-width: calc(100vw - 2.5rem);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 1rem 1.1rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.guide-prompt.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.guide-prompt-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    border: 0;
    background: transparent;
    color: #888;
    font-size: 0.8rem;
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
}

.guide-prompt-close:hover {
    color: #333;
}

.guide-prompt-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.guide-prompt-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--plf-green, #2e7d32);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.guide-prompt-text strong {
    display: block;
    margin-bottom: 0.15rem;
}

.guide-prompt-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.35;
}

.guide-prompt-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 576px) {
    .guide-prompt {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        width: auto;
    }

    /* Footer : compteur seul en haut, boutons en dessous */
    #guideModal .guide-footer {
        flex-wrap: wrap;
        justify-content: space-between !important;
        gap: 0.5rem;
    }

    #guideModal .guide-counter {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }

    /* Boutons un peu plus compacts */
    #guideModal .guide-footer .btn {
        padding: 0.4rem 0.7rem !important;
        min-height: 38px !important;
        font-size: 0.85rem;
    }
}
