/* ===== Sidebar ===== */
.slider {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 0;
    padding-top: 130%; /* 9/16 = 0.5625 soit 56.25% */
    overflow: hidden;
    background-color: black;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;
    visibility: hidden;
    animation: fadeinout 30s infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.slide:nth-child(1) {
    animation-delay: 0s;
}

.slide:nth-child(2) {
    animation-delay: 5s;
}

.slide:nth-child(3) {
    animation-delay: 10s;
}

.slide:nth-child(4) {
    animation-delay: 15s;
}

.slide:nth-child(5) {
    animation-delay: 20s;
}

.slide:nth-child(6) {
    animation-delay: 25s;
}

@keyframes fadeinout {
    0% {
        opacity: 0;
        visibility: hidden;
    }
    10% {
        opacity: 1;
        visibility: visible;
    }
    30% {
        opacity: 1;
        visibility: visible;
    }
    40% {
        opacity: 0;
        visibility: hidden;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* ===== Visuels ===== */
.visuels {
    margin-top: 50px;
}

.grid {
    column-count: 5;
    column-gap: 20px;
    row-gap: 20px;
}

.grid-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 20px;
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    display: block;
    height: auto;
}

.grid-item input:checked + img {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    margin: 0;
    transition: all 0.3s ease;
}

.spip_doc_legende .spip_doc_titre,
.spip_doc_legende .spip_doc_credits {
    display: none; /* masque ceux du modèle */
}

.titre-video {
    font-weight: bold;
    margin-top: 0.4em;
    font-size: clamp(0.9rem, 1.5vw, 0.9rem)!important;
}

.star-rating-control {
    font-size: clamp(0.9rem, 1.5vw, 1rem)!important;
}

/* Tablettes */
@media (max-width: 1200px) {
    .grid {
        column-count: 4;
        padding : 10px;
    }
}

/* Petits écrans */
@media (max-width: 900px) {
    .grid {
        column-count: 3;

    }
}

/* Mobiles */
@media (max-width: 600px) {
    .grid {
        column-count: 1;
    }
}

