/* =============================================================
   Page Vidéos — thème moderne (Breakersdojo)
   ============================================================= */

/* ---------- Barre de filtres ---------- */
.videos-filters {
    border-radius: 14px;
    background: var(--bd-bg-2);
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow);
}
.videos-filters .bd-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--bd-text-muted);
}
.videos-filters .bd-select select {
    border-radius: 8px;
    height: 2.5rem;
}
.videos-filters-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bd-border);
    margin-top: 0.75rem;
}
.videos-count {
    margin: 0;
    color: var(--bd-text-muted);
}
.videos-count strong {
    color: var(--bd-accent);
    font-size: 1.05rem;
}

/* ---------- Grille de cartes ---------- */
.videos-grid {
    /* Centre les cartes (lignes pleines ou partielles) indépendamment de
       la largeur du gouttière. */
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
}
.video-column {
    display: flex;
}
.video-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bd-bg-2);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--bd-border);
    box-shadow: var(--bd-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--bd-border-strong);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.video-card .bd-card-content {
    height: auto;
    padding: 1rem 1.25rem 0.75rem;
    flex: 1;
}
.video-card .bd-card-footer {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--bd-border);
    background: var(--bd-bg-3);
    border-radius: 0 0 14px 14px;
}
.video-card .bd-image {
    position: relative;
}

/* ---------- Vignette YouTube + survol ---------- */
.video-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}
.video-thumb img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}
.video-card:hover .video-thumb img {
    transform: scale(1.05);
}
.video-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.video-thumb-overlay .fa {
    font-size: 4.5rem;
    color: #fff;
    transform: scale(0.7);
    transition: transform 0.25s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}
.video-card:hover .video-thumb-overlay,
.video-thumb:focus .video-thumb-overlay,
.video-thumb:focus-visible .video-thumb-overlay {
    opacity: 1;
}
.video-card:hover .video-thumb-overlay .fa,
.video-thumb:focus .video-thumb-overlay .fa,
.video-thumb:focus-visible .video-thumb-overlay .fa {
    transform: scale(1);
}

/* ---------- Contenu de la carte ---------- */
.video-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.video-category {
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    font-weight: 700;
}
.video-winner-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.65rem;
    font-weight: 700;
    background: #48c78e;
    color: #fff;
}
.video-tag-icon {
    font-size: 0.95rem;
}
.video-winner-unknown {
    background: #b5b5b5;
}
.video-winner-char {
    color: #297a56;
    font-weight: 700;
}
.video-matchup {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    line-height: 1.25;
}
.video-player {
    font-weight: 600;
}
.video-char {
    color: var(--bd-text-muted);
    font-weight: 400;
    font-size: 0.85em;
}
.video-vs {
    color: var(--bd-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.video-desc {
    color: var(--bd-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Alignements spécifiques de la carte ---------- */
.video-card .video-tags {
    justify-content: space-between;
}
.video-card .video-matchup {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
}
.video-card .video-matchup p {
    margin: 0;
}
.video-card .video-player--1 {
    text-align: left;
}
.video-card .video-vs {
    text-align: center;
}
.video-card .video-player--2 {
    text-align: right;
}
.video-card .video-desc {
    display: block;
    max-height: 4.5em; /* ~3 lignes (line-height 1.5) */
    overflow: hidden;
    text-align: center;
}

/* ---------- Pied de carte ---------- */
.video-watch {
    width: 100%;
    text-align: center;
    justify-content: center;
    color: var(--bd-accent);
    font-weight: 600;
    background: transparent;
}
.video-watch:hover,
.video-watch:focus {
    background: var(--bd-accent-soft);
}
.video-card-actions {
    display: flex;
    gap: 0.5rem;
}
.video-admin-action {
    padding: 0.6rem 0.5rem;
    text-align: center;
    justify-content: center;
    color: var(--bd-text-muted);
}
.video-card-actions .video-admin-action {
    flex: 1 1 0;
}
.video-admin-action:hover,
.video-admin-action:focus {
    background: var(--bd-bg-4);
}
.video-admin-danger:hover,
.video-admin-danger:focus {
    color: var(--bd-accent);
    background: var(--bd-accent-soft);
}

/* ---------- État vide ---------- */
.videos-empty {
    text-align: center;
    padding: 3.5rem 2rem;
    border-radius: 14px;
    background: var(--bd-bg-2);
    border: 1px dashed var(--bd-border-strong);
    box-shadow: none;
}
.videos-empty .fa {
    font-size: 4.5rem;
    color: var(--bd-text-muted);
}
.videos-empty .bd-title {
    margin-bottom: 0.25rem;
}
.videos-empty .bd-subtitle {
    margin-bottom: 1.5rem;
}

/* ---------- Pagination ---------- */
.videos-pagination {
    margin: 1.5rem 0 0;
}
.videos-pagination a {
    border-radius: 8px;
    border-color: var(--bd-border);
}
.videos-pagination a:hover {
    border-color: var(--bd-accent);
    color: var(--bd-accent);
}
.videos-pagination .bd-current {
    background: var(--bd-accent);
    border-color: var(--bd-accent);
    color: #fff;
    font-weight: 700;
}

/* ---------- Modale vidéo ---------- */
.video-modal .bd-modal-card {
    width: min(92vw, 880px);
    max-width: none;
}
.video-modal-box {
    background: var(--bd-bg-2);
    border: 1px solid var(--bd-border);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}
.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}
.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-modal-meta {
    margin-top: 1rem;
}
.video-modal-meta .bd-title {
    margin-bottom: 0.5rem;
}
.video-modal-content {
    color: var(--bd-text-muted);
    line-height: 1.6;
}
.video-modal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ---------- Responsive ---------- */

/* Grand écran : 4 colonnes de cartes, selects bornés */
@media screen and (min-width: 1280px) {
    .videos-grid .bd-column {
        flex: 0 1 calc(25% - 1.5rem);
        max-width: calc(25% - 1.5rem);
    }
    .videos-filters .bd-select select {
        max-width: 24rem;
    }
}

/* Tablette / petit écran */
@media screen and (max-width: 768px) {
    .videos-filters-actions {
        justify-content: center;
    }
    .video-watch {
        text-align: center;
    }
}

/* Petit téléphone */
@media screen and (max-width: 480px) {
    .videos-filters {
        padding: 1rem;
    }
    .videos-filters-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .videos-filters-actions .bd-buttons {
        width: 100%;
    }
    .videos-filters-actions .bd-buttons .bd-button {
        flex: 1;
    }
    .video-card .bd-card-content {
        padding: 0.85rem 1rem 0.6rem;
    }
    .video-tags {
        gap: 0.4rem;
    }
    .video-thumb-overlay .fa {
        font-size: 3rem;
    }
    .videos-pg-end {
        display: none;
    }
    .video-modal-box {
        padding: 1rem;
    }
    .video-modal-actions {
        width: 100%;
    }
    .video-modal-actions .bd-button {
        flex: 1;
    }
}
