/* ============================================
   Vidéothèque Page
   public/pages/videos/index.php
   ============================================ */

/* ---- Page Header ---- */
.videos-page-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.videos-page-header h1 {
    font-weight: 700;
    color: #1a1a2e;
}

/* ---- Nav Pills (Tabs catégories) ---- */
.nav-pills-videos {
    gap: 0.25rem;
}

.nav-pills-videos .nav-link {
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    transition: all 0.2s ease;
}

.nav-pills-videos .nav-link:hover {
    color: #495057;
    background: #f0f0f5;
}

.nav-pills-videos .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.nav-pills-videos .nav-link .badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-pills-videos .nav-link.active .badge {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}

/* ---- Video Card ---- */
.video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f5;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ---- Thumbnail ---- */
.video-card-thumbnail {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-card-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.video-card-category-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Play overlay */
.video-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.25s ease;
    opacity: 0;
}

.video-card:hover .video-card-play-overlay {
    opacity: 1;
    background: rgba(0,0,0,0.35);
}

.video-card-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #e74c3c;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.video-card-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    color: #c0392b;
}

/* ---- Card Body ---- */
.video-card-body {
    padding: 0.85rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-desc {
    font-size: 0.78rem;
    color: #6c757d;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.video-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #adb5bd;
    margin-top: auto;
}

.video-card-meta i {
    margin-right: 0.15rem;
}

.video-card-author,
.video-card-date {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* ---- Tags ---- */
.video-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.video-tag {
    font-size: 0.68rem;
    font-weight: 500;
    color: #6c757d;
    background: #f0f0f5;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.video-tag:hover {
    background: #e9ecef;
    color: #495057;
}

/* ---- Card Footer ---- */
.video-card-footer {
    padding: 0.5rem 0.85rem 0.85rem;
}

.video-card-footer .btn {
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 8px;
}

/* ---- Video Embed Container (Modal) ---- */
.video-embed-container {
    position: relative;
    width: 100%;
    background: #000;
    min-height: 300px;
}

.video-embed-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: none;
}

/* ---- Modal styling ---- */
.video-page-modal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.video-page-modal .modal-header {
    background: #1a1a2e;
    color: #fff;
    border-bottom: none;
}

.video-page-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.video-page-modal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .video-card-thumbnail {
        height: 200px;
    }

    .nav-pills-videos .nav-link {
        font-size: 0.78rem;
        padding: 0.3rem 0.7rem;
    }

    .videos-page-header h1 {
        font-size: 1.2rem;
    }

    .video-embed-container {
        min-height: 200px;
    }
}

@media (max-width: 575.98px) {
    .video-card-play-overlay {
        opacity: 1;
        background: rgba(0,0,0,0.2);
    }

    .video-card-play-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .video-card-thumbnail {
        height: 180px;
    }

    .nav-pills-videos {
        flex-wrap: wrap;
    }
}
