html,
body {
    margin: 0;
    min-height: 100%;
}

:root{
    --white-transparent:rgba(255, 255, 255, 0.95);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html {
    margin: auto;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
    list-style: none;
    text-decoration-skip-ink: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

button{
    cursor: pointer;
}

img{
    width: 100%;
}

p{
    margin: 0;
}

ul{
    list-style: none;
}

.flex-column{
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.project__image-container {
    position: relative;
    display: inline-block;
    margin: 0;
}

.project__image img, .project__image-container img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.arrow.prev { left: 10px; }
.arrow.next { right: 10px; }

.project__image-container:hover .arrow {
    opacity: 1;
}

.project__data{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.credits-block{
    background-color: var(--white-transparent);
    z-index: 1000;
    width: 40%;
    height: 100%;
    position: fixed;
    bottom: 0;
}

.credits-block__content{
    position: fixed;
    bottom: 0;
    padding: 1rem;
    display: flex;
    flex-direction: row;
}

.info-block {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;         
    background-color: var(--white-transparent);
    z-index: 1000;
}

.info-block--close{
    z-index: 100;
}

.project {
    display: flex;
    flex-direction: column;
    gap: 0!important;
    margin: 0 !important;
    align-items: stretch; 
}

.project__video {
    width: 100%;
    margin: 0;
}

.project__video iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
    margin: 0;
}


/*************************************** MOBILE ********************************************************/
/*******************************************************************************************************/
@media (max-width: 780px) {

    main{
        display:flex;
        flex-direction: column;
        margin: 0.75rem; 
        }

    nav{
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 0.4rem;
        position: fixed;
        bottom: 0;
        left: 0;
        background-color: white;
        padding: 1rem;
        z-index: 100;
    }

    .info-block {
        flex-direction: column;
        z-index: 999;
    }

    .project__data{
        padding-top: 0.5rem;
        padding-bottom: 1rem;
    }

    .projects{
        width: 100%;
        padding-inline: 0;
    }

    .projects{
        margin-bottom: 35%;
    }

    .logo {
        width: 40%;
        height: auto;
    }

    .infos__footer{
        display: none;
    }

    ul.menu {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .info-block--close{
        align-self: flex-end;
    }

    .info-block__content--mobile {
        align-items: flex-start;
        margin: 1.4rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        justify-content: space-between;
        height: calc(100% - 2.8rem);   
    }

    .info-block__about{
        gap: 1rem;
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
    }

    .info-block__contact{
        display: flex;
        flex-direction: column;
        gap: 0rem;
    }

    .small-logo{
        width: 100%;
        height: auto;
    }
    
    .info-block__copyright{
        position: absolute;
        bottom:1.2rem;
        opacity: 0.4;
        font-size: 0.6rem;
    }

    .info-block__content--desktop {
        display: none;
        opacity: 0;
    } 

    .credits-block{
        background-color: var(--white-transparent);
        z-index: 1000;
        width: 100%;
        height: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
    }

    .credits-block__content {
        display: flex;
        flex-direction: column;
        width: 100vw;
    }

    .credits-block__content > div:last-child {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    .credits-block--close {
        padding: 0.4rem;
    }

    .project__image-container {
        position: relative;
        display: block;                
        width: 100%;                   
        margin: 0;
    }
}


/*************************************** INTERMEDIATE MEDIA QUERIES ******************************************/
/*************************************************************************************************************/

@media only screen and (min-width: 781px) and (max-width:1000px) {
    nav{
        display: flex;
        flex-direction: row;
        gap: 0.6rem;
    }

    .logo{
        max-width: 12%;
        height: 100%;
    }
}

@media only screen and (max-width: 1100px) {
    .info-block {
        position: fixed;
        inset: 0;
        margin: 0;
        z-index: 9999;
    }
}

@media only screen and (min-width: 1001px) and (max-width:1310px) {
    .logo{
        max-width: 40%;
        height: 100%;
    }

    nav{
        display: flex;
        flex-direction: row;
        gap: 0.6rem;
    }
}

@media only screen and (min-width: 1311px) {
    .logo {
        width: 43%;
        height: auto;
    }
}

@media only screen and (min-width: 1990px) {
    .logo {
        width: 49%;
        height: auto;
    }

}

/*************************************** DESKTOP *******************************************************/
/*******************************************************************************************************/
@media only screen and (min-width: 781px) {

    nav{
        display: flex;
        flex-direction: row;
        position: fixed;
        top: 0;
        background-color: transparent;
        padding: 0;
        margin-top: 1.2rem;
        width: 60dvw;
        gap: 0.6rem;
    }

    main{
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin: 1.2rem;
    }

    .small-logo{
        width: 9%;
        height: auto;
    }

    .project__data{
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .projects{
        width: 37dvw;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    ul.menu{
        display: flex;
        flex-direction: row;
        gap: 0.6rem;
        line-height: 1.4;
    }

    .infos__footer{
        position: fixed;
        bottom: 1rem;
        line-height: 1.4;
    }

    div.about__content {
        width: 124ch;
    }

    .info-block__content--desktop{
        align-items: flex-start;
        margin: 1rem;
    }

    .info-block__content--desktop {
        align-items: flex-start;
        margin: 1rem;
        display: flex;
        justify-content: space-between;
    }

    .info-block__column{
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        width: 70%;
    }

    .info-block__content--mobile {
        display: none;
        opacity: 0;
    }  

    .info-block__copyright{
        position: absolute;
        left: 1rem;
        bottom: 1rem;
        opacity: 0.4;
        font-size: 0.6rem;
    }

    .credits-block__content {
        display: flex;
        flex-direction: row;
        gap: 0.4rem;
    }

    .credits-block__content {
        display: flex;
        flex-direction: row;
        width: 37dvw;
        justify-content: space-between;
    }

    .credits-block{
        background-color: var(--white-transparent);
        z-index: 1000;
        width: 37dvw;
        height: 100%;
        position: fixed;
        bottom: 0;
    }

    .info-button{
        line-height: 1.4;
    }

    .credits-button{
        cursor: pointer;
        z-index: 100;
    }    
}

.is-hidden{
    display: none;
}

.info-block {
    overscroll-behavior: contain;  
}

/* Bloque le scroll de la page quand l'info-block est ouvert */
html:has(.info-block:not(.is-hidden)),
html:has(.info-block:not(.is-hidden)) body {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Empêche les gestes de scroll de démarrer sur l'overlay */
.info-block {
    touch-action: none;
}

html:has(.credits-block:not(.is-hidden)),
html:has(.credits-block:not(.is-hidden)) body {
    overflow: hidden;
    overscroll-behavior: none;
}

.credits-block {
    touch-action: none;
    box-shadow: 0 50vh 0 0 var(--white-transparent);
}

.info-block {
    box-shadow: 0 50vh 0 0 var(--white-transparent);
}