/* Styles pour la galerie */
:root {
    --color-bg-light: rgba(16, 13, 12, 0.8);
    --color-accent: #bd8f39;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

/* Styles pour limiter la galerie à 2 lignes initiales */
.gallery-limited .gallery-item:nth-child(n+7) {
    display: none;
}

.gallery-grid.show-all .gallery-item:nth-child(n+7) {
    display: block;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bouton pour afficher plus d'images */
.gallery-toggle {
    text-align: center;
    margin: 30px 0;
}

.gallery-show-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: 30px;
    font-family: var(--font-primary);
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-show-more span {
    margin-right: 10px;
}

.gallery-show-more i {
    transition: transform 0.3s ease;
}

.gallery-show-more:hover {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.gallery-show-more.active i {
    transform: rotate(180deg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 10px;
    background-color: var(--color-background);
    color: var(--color-text);
    font-size: 0.9em;
}

.gallery-caption h4 {
    margin: 0 0 5px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.85em;
    opacity: 0.9;
}

/* Événements */
.event-gallery {
    display: none;
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.event-gallery.active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

.event-category {
    cursor: pointer;
    padding: 20px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.event-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.event-category h3 {
    margin-top: 0;
    color: var(--color-accent);
}

.events-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Styles pour Swiper */
.swiper {
    width: 100%;
    padding-bottom: 40px;
}

.swiper-slide {
    height: auto;
    text-align: center;
}

.swiper-slide img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Styles pour le lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.lightbox-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2em;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

.lightbox-prev,
.lightbox-next {
    color: white;
    font-size: 2em;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Media Queries */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        display: none; /* Cacher la grille standard sur mobile */
    }
    
    /* Masquer le bouton "Voir plus" sur mobile */
    .gallery-toggle {
        display: none;
    }
    
    .mobile-gallery-carousel {
        display: block;
        width: 100%;
        margin: 20px 0 30px;
        position: relative;
        overflow: hidden; /* Assurer que l'effet de flou ne déborde pas */
    }
    
    /* Effet de flou horizontal sur les côtés */
    .mobile-gallery-carousel::before,
    .mobile-gallery-carousel::after {
        content: '';
        position: absolute;
        top: 0;
        height: 100%;
        width: 15%;
        z-index: 10;
        pointer-events: none;
    }
    
    /* Flou à gauche */
    .mobile-gallery-carousel::before {
        left: 0;
        background: linear-gradient(to right, 
            rgba(16, 13, 12, 0.8) 0%, 
            rgba(16, 13, 12, 0.4) 50%, 
            rgba(16, 13, 12, 0) 100%);
    }
    
    /* Flou à droite */
    .mobile-gallery-carousel::after {
        right: 0;
        background: linear-gradient(to left, 
            rgba(16, 13, 12, 0.8) 0%, 
            rgba(16, 13, 12, 0.4) 50%, 
            rgba(16, 13, 12, 0) 100%);
    }
    
    .mobile-gallery-carousel .swiper {
        width: 100%;
        padding-bottom: 40px;
        position: relative;
        z-index: 1;
    }
    
    .mobile-gallery-carousel .swiper-slide {
        width: 85%;
        height: auto;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 1;
    }
    
    .mobile-gallery-carousel .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        aspect-ratio: 1;
        display: block;
        transition: transform 0.5s ease;
    }
    
    .mobile-gallery-carousel .swiper-pagination {
        bottom: 0px;
    }
    
    .mobile-gallery-carousel .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        background-color: rgba(189, 143, 57, 0.5);
        opacity: 1;
    }
    
    .mobile-gallery-carousel .swiper-pagination-bullet-active {
        background-color: var(--color-accent);
        transform: scale(1.2);
    }
    
    /* Style pour le bouton "Voir plus" sur mobile */
    .mobile-gallery-carousel + .gallery-toggle {
        margin-top: 10px;
    }
    
    .gallery-caption {
        padding: 8px;
    }
    
    .gallery-caption h4 {
        font-size: 0.95em;
    }
    
    .gallery-caption p {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .mobile-gallery-carousel .swiper-slide {
        width: 75%;
    }
}

/* Desktop seulement */
@media (min-width: 769px) {
    .mobile-gallery-carousel {
        display: none;
    }
}

/* Style de base pour la section "Au quotidien" */
#au-quotidien .three-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

#au-quotidien .three-images-grid .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Standardisation de la taille */
    aspect-ratio: 1;
    height: auto;
}

#au-quotidien .three-images-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style de base pour l'image horizontale */
#au-quotidien .full-width-image {
    position: relative;
    overflow: hidden;
    height: 1000px;
}

#au-quotidien .full-width-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Media Queries pour la responsivité */
@media (max-width: 576px) {
    #au-quotidien .three-images-grid {
        grid-template-columns: 1fr;
    }
} 