/* ===== STRUCTURE DE BASE ===== */
#sections_container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.section {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 3rem;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2rem;
}

/* ===== STYLE DES BOUTONS/DOCUMENTS ===== */
.buttons {
    display: grid;
    gap: 1.5rem;
    padding: 0 2rem;
}

.buttons.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    width: 250px !important;

}

.buttons.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.flex-row {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.no-image {
    width: 200px !important;
}

.flex-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.button-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1.5rem;
    transition: transform 0.3s;
}

.flex-row:hover .button-image {
    transform: scale(1.05);
}

.titrebutton {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* ===== STYLE DES CARROUSELS ===== */
.carousel {
    position: relative;
    margin: 3rem auto;
    max-width: 90vw;
    width: 100%;
}

.carousel h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #444;
}

.carousel-images,
.carousel-videos {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-images::-webkit-scrollbar,
.carousel-videos::-webkit-scrollbar {
    display: none;
}

/* Images dans les carrousels */
.carousel-images img {
    width: 218px;
    height: 218px;
    min-width: 218px;
    min-height: 218px;
    border-radius: 50%;
    object-fit: cover;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-images img:hover {
    filter: brightness(0.85);
    transform: scale(1.03);
}

/* Vidéos dans les carrousels */
.carousel-videos iframe {
    width: 400px;
    height: 225px;
    min-width: 400px;
    min-height: 225px;
    border: none;
    border-radius: 12px;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-videos iframe:hover {
    filter: brightness(0.85);
    transform: scale(1.03);
}

/* Boutons de navigation */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: white;
    border: none;
    font-size: 3rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-prev {
    left: -3rem;
}

.carousel-next {
    right: -3rem;
}

.carousel-prev:hover,
.carousel-next:hover {
    opacity: 1;
    color: #fff;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.8);
}

/* ===== BOUTON "VOIR PLUS" ===== */
.show-more-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 0.8rem 2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.show-more-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===== LAZY LOADING ===== */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-img.loaded {
    opacity: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .carousel-prev {
        display: none;
    }

    .carousel-next {
        display: none;
    }
}

@media (max-width: 768px) {
    .buttons.grid-2,
    .buttons.grid-3 {
        grid-template-columns: 1fr;
    }

    .flex-row {
        flex-direction: column;
        text-align: center;
    }

    .button-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .carousel-videos iframe {
        width: 300px;
        height: 169px;
        min-width: 300px;
        min-height: 169px;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 2.5rem;
        padding: 0.5rem;
    }
}

@media (max-width: 568px) {
    .carousel {
        width: 80%;
        padding: 0 1rem;
    }

    .carousel-images {
        width: 100%;
    }

    .carousel-images img {
        width: 180px;
        height: 180px;
        min-width: 180px;
        min-height: 180px;
    }

    .close-lightbox {
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
    }
}