/* ========================================
   VISITE GUIDÉE FULGUR'ZONE - STYLES CSS
   Version: 2.0 | Dossier: guide_tour/
   ======================================== */

/* Système conteneur */
#guided-tour-system {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    isolation: isolate;
    pointer-events: none;
}

/* Overlay principal (masque) */
#tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: auto;
}

/* Tooltip principal */
#tour-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1a2332, #2c3e50);
    border: 2px solid #4fc3f7;
    border-radius: 15px;
    padding: 20px;
    max-width: 400px;
    z-index: 2147483647;
    color: white;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    box-sizing: border-box;
    pointer-events: auto;
}

/* Header du tooltip */
.tour-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

/* Compteur d'étapes */
#tour-step-counter {
    color: #4fc3f7;
    font-weight: bold;
    font-size: 13px;
}

/* Bouton fermeture */
#tour-close-btn {
    background: #607d8b !important;
    color: white !important;
    border: none !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 16px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Titre */
#tour-title {
    color: #4fc3f7;
    margin: 0 0 10px 0;
    font-size: 17px;
    line-height: 1.3;
}

/* Description */
#tour-description {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: #eee;
    font-size: 14px;
}

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

#tour-prev,
#tour-next {
    border: none !important;
    padding: 9px 16px !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    flex: 1 !important;
    max-width: 150px !important;
    min-width: 80px !important;
    text-align: center !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
}

#tour-prev {
    background: #607d8b !important;
    color: white !important;
}

#tour-next {
    background: #4fc3f7 !important;
    color: #000 !important;
}

/* ── Mobile : full-width, pas de débordement ── */
@media (max-width: 768px) {
    #tour-tooltip {
        /* Le JS impose left:10px / right:10px / width:auto / maxWidth:none  */
        padding: 14px;
        border-radius: 12px;
    }

    #tour-title {
        font-size: 15px;
    }

    #tour-description {
        font-size: 13px;
        line-height: 1.5;
    }

    #tour-step-counter {
        font-size: 12px;
    }
}

/* ── Spotlight pulsé ── */
@keyframes tourPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(79, 195, 247, 0.55); }
    50%       { box-shadow: 0 0 28px rgba(79, 195, 247, 0.90); }
}

/* ── Surbrillance pour étapes noOverlay ── */
.tour-spotlight-target {
    box-shadow: 0 0 0 3px #4fc3f7, 0 0 18px rgba(79, 195, 247, 0.55) !important;
    border-radius: 8px !important;
    animation: tourPulse 2s infinite !important;
    position: relative !important;
    z-index: 100001 !important;
}

.tour-secondary-highlight {
    border-radius: 10px !important;
}

#fz-pc-sidebar .v7-item.tour-secondary-highlight {
    background: rgba(79, 195, 247, 0.16) !important;
    box-shadow: 0 0 18px rgba(79, 195, 247, 0.28) !important;
    color: #eefaff !important;
}

#fz-pc-sidebar .v7-item.tour-spotlight-target {
    background: rgba(79, 195, 247, 0.16) !important;
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.92), 0 0 18px rgba(79, 195, 247, 0.4) !important;
    color: #eefaff !important;
}

#fz-pc-sidebar .v7-item.tour-secondary-highlight .v7-label,
#fz-pc-sidebar .v7-item.tour-secondary-highlight .v7-ic,
#fz-pc-sidebar .v7-item.tour-spotlight-target .v7-label,
#fz-pc-sidebar .v7-item.tour-spotlight-target .v7-ic {
    opacity: 1 !important;
    filter: brightness(1.15);
}

/* ── Overlay de completion ── */
#completion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity .3s;
    pointer-events: auto;
}

#completion-popup {
    background: linear-gradient(135deg, #1a2332, #2c3e50);
    border: 3px solid #4fc3f7;
    border-radius: 15px;
    padding: 24px 20px 20px;
    max-width: 420px;
    width: 100%;
    color: white;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    animation: popupSlideIn 0.45s ease-out;
    box-sizing: border-box;
}

.completion-icon {
    font-size: 34px;
    margin-bottom: 12px;
    animation: bounce 2s infinite;
}

#completion-popup h2 {
    color: #4fc3f7;
    margin: 0 0 10px 0;
    font-size: 20px;
}

#completion-popup p {
    margin: 0 0 18px 0;
    line-height: 1.5;
    font-size: 14px;
    color: #eee;
}

#completion-popup strong {
    color: #4fc3f7;
}

#completion-popup > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#completion-popup button {
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    width: 100%;
}

#completion-popup button:first-child {
    background: linear-gradient(135deg, #4fc3f7, #03a9f4);
    color: #000;
}

#completion-popup button:last-child {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

@media (min-width: 480px) {
    #completion-popup { max-width: 400px; padding: 28px 24px 22px; }
    #completion-popup > div:last-child { flex-direction: row; gap: 12px; }
    #completion-popup button { flex: 1; }
}

/* ── Animations ── */
@keyframes popupSlideIn {
    from { opacity: 0; transform: scale(0.82); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40%  { transform: translateY(-7px); }
    60%  { transform: translateY(-3px); }
}

/* ── Cercles de couleur dans les descriptions ── */
.filter-circle {
    display: inline-block !important;
    width: 9px;
    height: 9px;
    border-radius: 50% !important;
    border: 2px solid currentColor !important;
    background: transparent !important;
    margin: 0 3px;
    vertical-align: middle;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .filter-circle {
        width: 10px !important;
        height: 10px !important;
        border-width: 2px !important;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.7; transform: scale(1.12); }
}
