/* POP-UP */
/* ============================================
   POP-UP MOBILE & DESKTOP - VERSION FINALE
   ============================================ */

#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 44, 41, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}

#popup-overlay .popup-content {
    background: #e0d9cf;
    border: 3px solid #172c29;
    border-radius: 20px;
    padding: 25px;
    width: 100%;
    /* MOBILE: TRÈS LARGE - 95% de l'écran, max 500px */
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

#popup-overlay .popup-video-box {
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #172c29;
    position: relative;
}

/* MOBILE: Vidéo verticale en pleine largeur */
#popup-overlay .video-mobile {
    display: block !important;
    width: 100%;
    height: auto;
}

#popup-overlay .video-desktop {
    display: none !important;
}

#popup-overlay .popup-btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* MOBILE: BOUTONS ÉNORMES ET LISIBLES */
#popup-overlay .btn-popup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 22px 30px;
    font-size: 22px; /* TRÈS GROS TEXTE */
    font-weight: 700;
    text-decoration: none;
    border: 3px solid #172c29;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
    min-height: 70px; /* Bouton très haut */
    font-family: "Open Sans", sans-serif;
}

#popup-overlay .btn-primary {
    background: #172c29;
    color: whitesmoke;
}

#popup-overlay .btn-primary:hover {
    background: whitesmoke;
    color: #172c29;
    transform: scale(1.05);
}

#popup-overlay .btn-secondary {
    background: transparent;
    color: #172c29;
    border: 3px solid #172c29;
}

#popup-overlay .btn-secondary:hover {
    background: #172c29;
    color: whitesmoke;
    transform: scale(1.05);
}

#popup-overlay .btn-sound {
    background: none;
    border: none;
    color: #555;
    font-size: 16px;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px 0;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
}

/* ============================================
   DESKTOP (≥ 768px)
   ============================================ */
@media screen and (min-width: 768px) {
    
    #popup-overlay .popup-content {
        /* DESKTOP: Plus compact mais toujours lisible */
        max-width: 650px;
        padding: 30px;
    }

    #popup-overlay .popup-btn-group {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    #popup-overlay .btn-popup {
        width: auto;
        min-width: 220px;
        font-size: 17px;
        padding: 16px 32px;
        min-height: auto;
    }

    /* Inversion vidéos */
    #popup-overlay .video-mobile {
        display: none !important;
    }
    #popup-overlay .video-desktop {
        display: block !important;
        width: 100%;
        height: auto;
    }

    /* Format carré desktop */
    #popup-overlay .popup-video-box {
        padding-top: 100%;
        height: 0;
    }
    
    #popup-overlay .video-desktop {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}