/*==================================================
    PORTFOLIO HERO
==================================================*/

#portfolio-hero{
    position:relative;
    min-height:400px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    overflow:hidden;
    padding-top:180px;
    padding-bottom:120px;
    background:
        linear-gradient(
            180deg,
            #101010 0%,
            #0b0b0b 100%
        );
}

.portfolio-hero-overlay{
    position:absolute;
    inset:0;
    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,.05),
            transparent 70%
        );
    pointer-events:none;
}

#portfolio-hero .container{
    position:relative;
    z-index:2;
    max-width:900px;
}

#portfolio-category{
    margin-bottom:20px;
}

#portfolio-title{
    margin-bottom:25px;
}

#portfolio-description{
    max-width:700px;
    margin:0 auto;
    font-size:1.1rem;
    line-height:1.8;
}

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

#portfolio-gallery{
    padding-top:0px;
}

#portfolio-gallery .container{
    width:min(1800px,96%);
    max-width:none;
}

#gallery-grid{
    display:grid;
    grid-template-columns:
        repeat(5,minmax(0,1fr));
    align-items:start;
    gap:14px;
}

/*==================================================
    CARTE PHOTO
==================================================*/

.gallery-item{
    position:relative;
    width:100%;
    overflow:hidden;
    border-radius:10px;
    cursor:zoom-in;
    background:#111;
}

.gallery-item img{
    display:block;
    width:100%;
    aspect-ratio:2 / 3;
    object-fit:cover;
    object-position:center;
    transition:
        transform .35s ease,
        filter .35s ease;
}

.gallery-item:hover img{
    transform:scale(1.03);
    filter:brightness(.92);
}

/*==================================================
    OVERLAY AU SURVOL
==================================================*/

.gallery-item::after{
    content:"";
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.45),
            rgba(0,0,0,0)
        );
    opacity:0;
    transition:opacity .35s ease;
    pointer-events:none;
}

.gallery-item:hover::after{
    opacity:1;
}

/*==================================================
    LÉGENDE
==================================================*/

.gallery-caption{
    position:absolute;
    left:24px;
    right:24px;
    bottom:22px;
    z-index:2;
    color:white;
    opacity:0;
    transform:translateY(15px);
    transition:
        opacity .35s ease,
        transform .35s ease;
}

.gallery-item:hover .gallery-caption{
    opacity:1;
    transform:translateY(0);
}

.gallery-caption h3{
    margin:0 0 6px;
    font-family:"Cormorant Garamond",serif;
    font-size:1.8rem;
    font-weight:500;
    color:white;
}

.gallery-caption p{
    margin:0;
    color:rgba(255,255,255,.82);
    font-size:.9rem;
}

/*==================================================
    APPARITION DES IMAGES
==================================================*/

.gallery-item{
    opacity:0;
    transform:translateY(40px);
    transition:
        opacity .7s ease,
        transform .7s ease;
}

.gallery-item.visible{
    opacity:1;
    transform:translateY(0);
}

/*==================================================
    IMAGE ACTIVE
==================================================*/

.gallery-item.active{
    outline:2px solid rgba(255,255,255,.25);
    outline-offset:4px;
}

/*==================================================
    ÉTAT DE CHARGEMENT
==================================================*/

.gallery-loading{
    width:100%;
    padding:120px 0;
    text-align:center;
    color:var(--color-text-secondary);
    letter-spacing:.15em;
    text-transform:uppercase;
    font-size:.8rem;
}

/*==================================================
    MESSAGE SI AUCUNE IMAGE
==================================================*/

.gallery-empty{
    width:100%;
    padding:120px 0;
    text-align:center;
}

.gallery-empty h3{
    font-family:"Cormorant Garamond",serif;
    font-size:2.5rem;
    font-weight:400;
    margin-bottom:20px;
}

.gallery-empty p{
    max-width:600px;
    margin:0 auto;
}

/*==================================================
    ACCESSIBILITÉ
==================================================*/

.gallery-item:focus-visible{
    outline:3px solid white;
    outline-offset:6px;
}

/*==================================================
    RESPONSIVE DE LA GALERIE
==================================================*/

@media (min-width:1800px){
    #gallery-grid{
        grid-template-columns:
            repeat(6,minmax(0,1fr));
    }
}

@media (max-width:1400px){
    #gallery-grid{
        grid-template-columns:
            repeat(4,minmax(0,1fr));
    }
}