/* ==================================================
   GALERIE
================================================== */

.gallery{

    padding:120px 0;

    background:#fff;

    position:relative;

    overflow:hidden;

}

/* ==================================================
   TITRE
   (.section-tag hérite maintenant de global.css —
   ne plus le redéfinir ici)
================================================== */

.gallery .section-header{

    max-width:760px;

    margin:0 auto 60px;

    text-align:center;

}

.gallery .section-title{

    font-size:clamp(2.2rem,4vw,3.3rem);

    line-height:1.15;

    margin-bottom:20px;

}

.gallery .highlight{

    color:var(--color-primary);

}

.gallery .section-subtitle{

    max-width:650px;

    margin:auto;

    font-size:1.08rem;

    line-height:1.8;

    color:var(--color-text-light);

}

/* ==================================================
   FILTRES
================================================== */

.gallery__filters{

    display:flex;

    justify-content:center;

    align-items:center;

    flex-wrap:wrap;

    gap:15px;

    margin-bottom:60px;

}

.gallery__filters button{

    border:none;

    background:#F7F6F2;

    color:#555;

    padding:14px 26px;

    border-radius:50px;

    cursor:pointer;

    font-size:.95rem;

    font-weight:600;

    transition:.35s;

    box-shadow:0 6px 16px rgba(0,0,0,.05);

}

.gallery__filters button:hover{

    background:var(--color-primary);

    color:#fff;

    transform:translateY(-3px);

}

.gallery__filters button.active{

    background:var(--color-primary);

    color:#fff;

    box-shadow:0 12px 24px rgba(107,110,74,.25);

}
/* ==================================================
   GRILLE
================================================== */

.gallery__grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:28px;

}

/* ==================================================
   CARTES
================================================== */

.gallery-card{

    position:relative;

    overflow:hidden;

    border-radius:24px;

    background:#fff;

    box-shadow:0 12px 35px rgba(0,0,0,.08);

    transition:.35s;

}

.gallery-card:hover{

    transform:translateY(-8px);

    box-shadow:0 22px 55px rgba(0,0,0,.15);

}

/* ==================================================
   IMAGES
================================================== */

.gallery-card img{

    display:block;

    width:100%;

    height:320px;

    object-fit:cover;

    transition:.6s ease;

}

.gallery-card:hover img{

    transform:scale(1.08);

}

/* ==================================================
   OVERLAY
================================================== */

.gallery-card__overlay{

    position:absolute;

    inset:0;

    display:flex;

    flex-direction:column;

    justify-content:flex-end;

    padding:30px;

    background:linear-gradient(
        to top,
        rgba(0,0,0,.82) 0%,
        rgba(0,0,0,.45) 45%,
        rgba(0,0,0,0) 100%
    );

    opacity:0;

    transition:.35s;

}

.gallery-card:hover .gallery-card__overlay{

    opacity:1;

}

/* ==================================================
   TEXTE
================================================== */

.gallery-card__overlay h3{

    color:#fff;

    font-size:1.4rem;

    margin-bottom:10px;

}

.gallery-card__overlay span{

    display:inline-flex;

    align-items:center;

    width:max-content;

    padding:10px 18px;

    border-radius:50px;

    background:var(--color-primary);

    color:#fff;

    font-size:.9rem;

    font-weight:600;

}
/* ==================================================
   CTA
================================================== */

.gallery__cta{

    display:flex;

    justify-content:center;

    margin-top:70px;

}

/* ==================================================
   ANIMATIONS
================================================== */

.gallery-card,
.gallery-card img,
.gallery-card__overlay,
.gallery__filters button{

    transition:all .35s ease;

}

/* ==================================================
   LIGHTBOX
================================================== */

.lightbox{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.88);

    backdrop-filter:blur(10px);

    display:flex;

    justify-content:center;

    align-items:center;

    opacity:0;

    visibility:hidden;

    transition:.35s;

    z-index:9999;

}

.lightbox.active{

    opacity:1;

    visibility:visible;

}

.lightbox img{

    max-width:85vw;

    max-height:85vh;

    border-radius:20px;

    box-shadow:0 30px 80px rgba(0,0,0,.45);

    transform:scale(.92);

    transition:.35s ease;

}

.lightbox.active img{

    transform:scale(1);

}

.lightbox-close{

    position:absolute;

    top:30px;

    right:40px;

    color:#fff;

    font-size:46px;

    cursor:pointer;

    user-select:none;

    transition:.3s;

}

.lightbox-close:hover{

    transform:rotate(90deg);

}

/* ==================================================
   FLECHES
================================================== */

.lightbox-arrow{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    color:#fff;

    font-size:60px;

    cursor:pointer;

    user-select:none;

    padding:20px;

    transition:.3s;

}

.lightbox-arrow:hover{

    transform:translateY(-50%) scale(1.15);

}

.lightbox-prev{

    left:35px;

}

.lightbox-next{

    right:35px;

}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width:1200px){

    .gallery__grid{

        grid-template-columns:repeat(2,1fr);

    }

}

@media (max-width:768px){

    .gallery{

        padding:80px 0;

    }

    .gallery__filters{

        gap:12px;

    }

    .gallery__filters button{

        padding:12px 18px;

        font-size:.9rem;

    }

    .gallery__grid{

        grid-template-columns:1fr;

        gap:22px;

    }

    .gallery-card img{

        height:280px;

    }

    .lightbox-arrow{

        font-size:42px;

    }

    .lightbox-close{

        font-size:36px;

        right:20px;

        top:20px;

    }

}
