/* ============================================
   VIDEO MODAL - Lecteur vidéo réutilisable
   ============================================ */

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1400px;
    height: 85vh;
    background: #0a1628;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

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

.video-modal-body {
    display: flex;
    height: 100%;
    gap: 0;
}

/* Lecteur principal */
.video-modal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0a1628;
    overflow-y: auto;
}

.video-modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    background: #000;
}

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

.video-modal-info {
    padding: 30px;
    background: #0f1f35;
}

.video-modal-badge-wrapper {
    margin-bottom: 15px;
}

.video-modal-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(231,76,60,0.4);
}

.video-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.video-modal-date {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0 0 15px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-modal-description {
    font-size: 15px;
    color: #bdc3c7;
    line-height: 1.6;
    margin: 0;
}

/* Playlist */
.video-modal-playlist {
    width: 380px;
    background: #0f1f35;
    border-left: 1px solid #1a2942;
    display: flex;
    flex-direction: column;
}

.video-modal-playlist-header {
    padding: 25px;
    border-bottom: 1px solid #1a2942;
    background: #0a1628;
}

.video-modal-playlist-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-modal-playlist-items {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.video-modal-playlist-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #1a2942;
}

.video-modal-playlist-item:hover {
    background: #1a2942;
}

.video-modal-playlist-item.active {
    background: #1a2942;
    border-left: 3px solid #3498db;
}

.video-modal-playlist-thumbnail {
    position: relative;
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.video-modal-playlist-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-modal-playlist-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-modal-playlist-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.video-modal-playlist-category {
    font-size: 11px;
    color: #7f8c8d;
    margin: 0 0 3px 0;
    text-transform: uppercase;
    font-weight: 600;
}

.video-modal-playlist-date {
    font-size: 11px;
    color: #95a5a6;
    margin: 0;
}

/* Responsive modal */
@media (max-width: 1024px) {
    .video-modal-content {
        width: 95%;
        height: 90vh;
    }

    .video-modal-playlist {
        width: 320px;
    }
}

@media (max-width: 768px) {
    .video-modal-body {
        flex-direction: column;
    }

    .video-modal-playlist {
        width: 100%;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid #1a2942;
    }

    .video-modal-info {
        padding: 20px;
    }

    .video-modal-title {
        font-size: 20px;
    }

    .video-modal-playlist-thumbnail {
        width: 100px;
        height: 65px;
    }
}
