/* ==========================================================================
   Galerie photos d'une actualité
   Page : front-end/pages/sous-pages/sousActus.blade.php
   ========================================================================== */

.actu-galerie {
    margin-top: 3rem;
}

.actu-galerie h3 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--greenO);
    margin-bottom: 1.6rem;
}

.actu-galerie h3::after {
    content: '';
    display: block;
    height: 3px;
    width: 5rem;
    margin-top: 0.7rem;
    background: var(--green);
    border-radius: 2px;
}

.actu-galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.4rem;
}

.actu-galerie-item {
    display: block;
    padding: 0;
    height: 14rem;
    overflow: hidden;
    cursor: pointer;
    background: #edf4f3;
    border: 1px solid #e5ebea;
    border-radius: 1rem;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.actu-galerie-item:hover {
    transform: translateY(-0.4rem);
    box-shadow: 0 1.4rem 3rem rgba(10, 40, 45, 0.18);
}

.actu-galerie-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* ---------- Visionneuse ---------- */

.actu-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    padding: 4rem 2rem;
    background: rgba(8, 30, 35, 0.92);
    backdrop-filter: blur(4px);
}

.actu-lightbox.open {
    display: grid;
}

.actu-lightbox img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.8rem;
}

.actu-lightbox-close,
.actu-lightbox-nav {
    position: absolute;
    display: grid;
    place-items: center;
    height: 4.6rem;
    width: 4.6rem;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: background 0.25s ease;
}

.actu-lightbox-close:hover,
.actu-lightbox-nav:hover {
    background: var(--green);
}

.actu-lightbox-close {
    top: 2rem;
    right: 2rem;
}

.actu-lightbox-nav.prev {
    left: 2rem;
}

.actu-lightbox-nav.next {
    right: 2rem;
}

@media (max-width: 768px) {
    .actu-galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    }

    .actu-galerie-item {
        height: 11rem;
    }

    .actu-lightbox {
        padding: 2rem 1rem;
    }

    .actu-lightbox-nav {
        height: 3.8rem;
        width: 3.8rem;
        font-size: 1.6rem;
    }

    .actu-lightbox-nav.prev {
        left: 0.8rem;
    }

    .actu-lightbox-nav.next {
        right: 0.8rem;
    }
}
