/* ---------- Section « Vidéos » ---------- */

.boutons-carrousel {
    display: flex;
    gap: 0.5rem;
    margin-top: .5rem;
    justify-content: right;
}

.boutons-carrousel button {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--encre);
    border-radius: 50%;
    background: transparent;
    color: var(--encre);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.boutons-carrousel button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.carrousel {
    --ecart: 1.5rem;
    --visibles: 4; /* nombre de vidéos visibles à la fois */

    display: flex;
    gap: var(--ecart);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carrousel::-webkit-scrollbar {
    display: none;
}

.video {
    flex: 0 0 calc((100% - (var(--visibles) - 1) * var(--ecart)) / var(--visibles));
    min-width: 0;
    scroll-snap-align: start;
}

/* Portrait : une vidéo à la fois dans le carrousel */
@media (orientation: portrait) {
    .carrousel {
        --visibles: 1;
    }
}

.video-lien {
    display: block;
    color: inherit;
    text-decoration: none;
}

.miniature {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0.75rem;
    background: var(--filet);
}

.video-titre {
    margin: 0.75rem 0 0.5rem;
    min-height: 2.6em; /* réserve 2 lignes pour aligner les statistiques */
    font-size: 1.05rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-lien:hover .video-titre {
    color: var(--accent);
}

.video-stats {
    display: flex;
    justify-content: space-between;
    margin: 0;
    font-size: 0.85rem;
    color: var(--texte-discret);
}