/* Overlay de fond */
.youtube-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 40, 63, 0);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease;
}

.youtube-popup-overlay.active {
    display: flex;
    background-color: rgba(0, 40, 63, 0.85);
}

/* Container de la popup */
.youtube-popup {
    background: #ffffff;
    border-radius: 50px;
    padding: 50px 75px;
    max-width: 900px;
    width: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.youtube-popup-overlay.active .youtube-popup {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Bouton de fermeture */
.youtube-popup-close {
    position: absolute;
    top: 25px;
    right: 30px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 10;
}

.youtube-popup-close::before,
.youtube-popup-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #00283f;
    top: 50%;
    left: 50%;
}

.youtube-popup-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.youtube-popup-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.youtube-popup-close:hover::before,
.youtube-popup-close:hover::after {
    background-color: #5cbe95;
}

/* Contenu de la popup */
.youtube-popup-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Container de la vidéo */
.youtube-popup-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    border-radius: 40px;
    overflow: hidden;
    background-color: #00283f;
}

.youtube-popup-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 40px;
}

/* Description (optionnelle) */
.youtube-popup-description {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 16px;
    line-height: 20px;
    color: #00283f;
    text-align: center;
    margin: 0;
}

/* Responsive */
@media screen and (max-width: 991px) {
    .youtube-popup {
        padding: 40px 50px;
        max-width: 700px;
    }
    
    .youtube-popup-close {
        top: 20px;
        right: 25px;
    }
}

@media screen and (max-width: 767px) {
    .youtube-popup {
        padding: 30px;
        border-radius: 30px;
        width: 95%;
    }
    
    .youtube-popup-close {
        top: 15px;
        right: 20px;
        width: 18px;
        height: 18px;
    }
    
    .youtube-popup-close::before,
    .youtube-popup-close::after {
        width: 18px;
    }
    
    .youtube-popup-video-container {
        border-radius: 20px;
    }
    
    .youtube-popup-video-container iframe {
        border-radius: 20px;
    }
    
    .youtube-popup-description {
        font-size: 14px;
        line-height: 18px;
    }
}

@media screen and (max-width: 480px) {
    .youtube-popup {
        padding: 25px 20px;
        border-radius: 25px;
    }
    
    .youtube-popup-close {
        top: 12px;
        right: 15px;
    }
}
