#portfolio_section {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding-bottom: 5vh;
    scroll-snap-type: y mandatory;
    background-color: #e7ebec;
}

#portfolio_container {
    display: grid;
    margin: 1vh 2vw 0;
    grid-template-columns: repeat(2,1fr);
    grid-auto-flow: row dense;
    grid-gap: 2vw;
}


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

#portfolio_container .portrait {
    grid-row-end: span 2;
}

#portfolio_container .landscape {

}

#title_portfolio {
    position: relative;
    padding: 2vh;
    font-size: 3vh;
    font-weight: bold;
    color: #1A1A1A;
    z-index: 9;
}

#order_images {
    position: absolute;
    display: flex;
    color: #1A1A1A;
    top: 0;
    right: 0;
    padding: 2vh;
    gap: 1vh;
    cursor: pointer;
}

#order_images svg {
    height: 3vh;
    aspect-ratio: 1/1;
    z-index: 1000;
}

#order_images svg:hover {
    fill: #666666;
}

.image_portfolio {
    width: 100%;
    border-radius: .5vh;
    overflow: hidden;
    cursor: pointer;
}

.image_portfolio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/*Overlay*/

#image_overlay {
    position: relative;
    display: none;
    padding: 0 2vh;
    height: 100%;
    background: #e7ebec;
    flex-direction: column;
    justify-content: center;
    z-index: 1001;
}

#title_image_overlay {
    position: relative;
    margin-bottom: 1vh;
    font-size: 3vh;
    font-weight: bold;
    color: #1A1A1A;
    z-index: 9;
}

#place_image_overlay {
    display: flex;
    margin-bottom: 1vh;
    width: fit-content;
    padding: .6vh;
    gap: .5vh;
    font-size: 1.5vh;
    align-items: center;
    border-radius: .5vh;
    background: rgba(0,0,0,.1);
}

#place_image_overlay svg{
    fill: #1A1A1A;
    height: 1.5vh;
}

#picture_image_overlay {
    position: relative;
    margin-top: 1vh;
    border-radius: .5vh;
    overflow: hidden;
}

.cinema #informations_image {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    padding: 2vh;
    background: rgb(0,0,0);
    background: linear-gradient(180deg, rgba(38,38,38,0.5) 32%, rgba(38,38,38,0.3) 48%, rgba(38,38,38,0) 100%);
}

.cinema #title_image_overlay {
    color: #fcfcfc;
}

.cinema  #place_image_overlay {
    display: flex;
    width: fit-content;
    background: rgba(255,255,255,.1);
    color: #fcfcfc;
}

.cinema #place_image_overlay svg {
    fill: #fcfcfc;
}

.cinema {
    height: 93%!important;
    padding: 0!important;
    /* background: #1A1A1A!important; */
}

.cinema #picture_image_overlay{
    width: auto;
    margin: 0;
    height: 100%;
    height: 100%;
    z-index: -1;
    overflow-x: scroll;
    overflow-y: hidden;
}

.portrait_overlay{
    margin-bottom: 1vh;
    aspect-ratio: 2000/1333;
}

.paysage_overlay{
    margin: 2vh 4vh 1vh;
    aspect-ratio: 1333/2000;
}

.cinema .portrait_overlay{
    margin: 0;
    aspect-ratio: 2000/1333;
}

.cinema .paysage_overlay{
    margin: 0;
    aspect-ratio: 1333/2000;
}

#picture_image_overlay img{
    height: 100%;
}

#description_image_overlay {
    position: relative;
    font-size: 2vh;
    margin-bottom: 1vh;
    color: #1A1A1A;
}

#author_overlay {
    font-size: 2vh;
    text-align: right;
    color: #1A1A1A;
}

.cinema #description_image_overlay {
    color: #fcfcfc;
}

.cinema #author_overlay {
    position: absolute;
    color: #fcfcfc;
    display: none;
}

#author_overlay:before{
    content: "Par ";
}

#top_right_buttons {
    display: flex;
    position: absolute;
    gap: 5vw;
    height: 3vh;
    top:2vh;
    right: 2vh;
    z-index: 5000;
}

#top_right_buttons > * {
    cursor: pointer;
    z-index: 1200;
}

#top_right_buttons > *:hover {
    color: #666666;
}

.cinema #top_right_buttons {
    padding: 2vw;
    border-radius: 1vh;
    color: white;
}

.cinema #top_right_buttons > *:hover {
    color: #cfcfcf;
}


#button_overlay_container{
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 3vh;
    font-size: 2vh;
}

.cinema #button_overlay {
    height: fit-content;
    margin: 0;
}

.cinema #button_overlay_container {
    display: flex;
    position: absolute;
    justify-content: center;
    align-items: center;
    padding: 5vh 0;
    margin: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(38,38,38,0.5) 32%, rgba(38,38,38,0.3) 48%, rgba(38,38,38,0) 100%);
}


#button_overlay{
    color: white;
    background: #1A1A1A;
    border-radius: 3vh;
    margin-top: 2vh;
    padding: 1vh 3vh;
    cursor: pointer;
}

#button_overlay:hover {
    background: #343434;
}

.return {
    display: none;
}

.return:hover {
    color: #666666;
}

@media screen and (min-aspect-ratio: 8/9) {

    #portfolio_container {
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 1vw;
    }

    .grid-portfolio {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .portrait_overlay {
        width: 100vh;
    }

    .paysage_overlay {
        height: 72vh;
    }

    .menu_overlay {
        display: none;
    }

    #image_overlay {
        width: fit-content;
        margin: auto;
    }
    
    .cinema {
        width: 100%!important;
        height: 100%!important;
    }

    .cinema ::-webkit-scrollbar * {
        background: transparent;
    }

    .cinema #informations_image {
        padding: 6vh;
    }

    .cinema #picture_image_overlay img{
        width: 100%;
        height: auto;
    }

    .cinema #picture_image_overlay{
        overflow-x: hidden;
        overflow-y: scroll;
    }

    #top_right_buttons {
        position: fixed;
        gap: 2vw;
        top : 3vh;
    }
    

    #button_overlay {
        font-size: 2vh;
    }
    #portfolio_section {
        min-height: 68vh;
        margin-bottom: 2vh;
    }

    .return {
        display: inline;
        height: 1vw;
        aspect-ratio: 1/1;
        margin-right: 1vw;
        cursor: pointer;
    }
}