/* Styles pour le popup vidéo */
.video-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.video-popup-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-popup-overlay.active .video-popup-container {
    transform: scale(1);
}

.video-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.video-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-popup-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-popup-title {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.video-popup-content {
    padding: 0;
    background: #000;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Indicateur visuel pour les articles vidéo */
.format-video .entry-content-wrap::before,
.format-video .post-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #667eea;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.format-video:hover .entry-content-wrap::before,
.format-video:hover .post-thumbnail::after {
    opacity: 1;
}

.format-video {
    cursor: pointer;
    position: relative;
}

.format-video .post-thumbnail {
    position: relative;
}

/* Animation de chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .video-popup-container {
        width: 95%;
		height: 80%
        margin: 20px;
    }
    
	.video-wrapper{
        height: 100%;
        margin: auto;
    }
	
    .video-popup-header {
        padding: 15px 20px;
    }
    
    .video-popup-title {
        font-size: 18px;
    }
    
    .video-popup-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}