html,
body {
    margin: 0;
    padding: 0;
    font-family: "Lexend", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    overflow-x: clip;
}

body {
    position: relative;
}

:root {
    --black-bg: rgba(0, 0, 0, 0.734);
    --white-bg: rgba(255, 255, 255, 0.562);
}

h1 {
    margin: 2rem;
    padding: 0;
    text-align: center;
}

h2 {
    position: relative;
}


p {
    padding: 0 1rem;
    text-align: justify;
}

ul {
    padding: 0;
    margin: 0;
}

a {
    text-decoration: none;
    position: relative;
}

.lien-logo {
    color: white;
}

.nav-desktop li a {
    color: white;
}

header {
    margin: 0;
    height: 5rem;
    display: flex;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.562);
    position: fixed;
    top: 0;
    width: 100%;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

li {
    text-decoration: none;
    list-style: none;
    outline: none;
}

nav div {
    width: 90vw;
    display: flex;
    justify-content: space-between;
}

nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5vw;
}

nav a {
    font-size: 1rem;
}

nav {
    align-items: center;
    justify-items: center;
}


.bt-volet {
    content: url("../images/b-menu-blanc.svg");
    height: 2rem;
    width: 2rem;
}

.bt-volet.noire {
    content: url("../images/b-menu-noire.svg");
}

.volet {
    margin: 0;
    padding: 0;
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    gap: 5rem;
    font-size: 1.4rem;
    top: -100vh;
    transition: 0.3s;
    font-weight: bold;
    z-index: 5;
}

.volet li a {
    color: black;
}

section {
    margin: 0;
    padding: 0;
    min-height: 80dvh;
    display: flex;
    align-items: center;
    flex-direction: column;
}

section a {
    color: white;
    background-color: var(--black-bg);
    padding: 0.625rem;
    border-radius: 1.25rem;
}

.haut-page {
    min-height: 100dvh;
    background-color: rgb(0, 0, 0);
    color: white;
    align-items: center;
    justify-content: center;
    position: relative;
}

/*index*/

.presentation {
    padding-top: 5rem;
    justify-content: center;
    position: relative;
}

.presentation div {
    flex-direction: column;
    gap: 1rem;
    margin: 0 1rem;
    display: flex;
    position: relative;
    align-items: center;
}

.presentation div a {
    display: flex;
    align-items: center;
    position: absolute;
    right: 2.5rem;
    bottom: -1.875rem;
    gap: 0.5rem;
}

.presentation a::after {
    content: url("../images/fleche-blanc.svg");
    width: 1rem;
    height: 1rem;
}

.projets {
    padding-top: 7rem;
    width: 100%;
    display: flex;
    position: relative;
    justify-content: flex-end;
}

.projets h2 {
    padding-left: 2rem;
    width: 100%;
    text-align: left;
}

.projets a {
    display: flex;
    align-items: center;
    position: absolute;
    right: 2.5rem;
    bottom: 1rem;
    gap: 0.5rem;
}

.projets a::after {
    content: url("../images/fleche-blanc.svg");
    width: 1rem;
    height: 1rem;
}

/*page projet*/
.cache{
    display: none;
}

.overlay {
    box-sizing: border-box;
    padding: 5rem 0 1rem 0;
    z-index: 1;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    height: 100vh;
    width: 100vw;
    color: white;
    background-color: var(--black-bg);
    cursor: pointer;
}

.overlay div {
    padding: 2rem 0;
    display: flex;
    align-items: center;
}

.overlay div div {
    display: flex;
    flex-direction: column;
}


.overlay img {
    max-width: 100vw;
    max-height: 80vh;
}

.img-1 {
    aspect-ratio: 16/9;
}

.img-2,
.img-3 {
    aspect-ratio: 9/16;
    height: 50vh;
}

.list-filter {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0rem;
    padding: 0;
}

.btn-filter {
    z-index: 2;
    background-color: var(--black-bg);
    padding: 0.5rem 1rem;
    color: white;
    border-radius: 10px;
    cursor: pointer;
}

.projet-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(1, 1fr);
    padding: 0 1rem 2.5rem 1rem;
}

.projet-item {
    background-color: var(--white-bg);
    border: black solid 1px;
    align-items: center;
    cursor: pointer;
}

.projet-item img {
    border-radius: 0px;
    width: 80vw;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.projet-item ul {
    display: flex;
    margin: 0.5rem 1rem;
    justify-content: space-between;
}

.index-img {
    border-radius: 10px;
    width: 40vw;
    max-height: 60vh;
    object-fit: cover;
}

picture img {
    border-radius: 0;
    height: 70vh;
    object-fit: cover;
    object-position: center;
}

img,
textarea,
input,
picture {
    max-width: 100%;
}

fieldset {
    width: 70vw;
    border: none;
    display: grid;
    grid-gap: 1rem;
}

fieldset div {
    display: flex;
    flex-direction: column;
}

input,
textarea {
    background-color: var(--white-bg);
    font-family: "Lexend", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    border: 2px solid black;
}

.contact {
    justify-content: center;
    position: relative;
    min-height: calc(100vh - 4rem);
}

textarea {
    resize: none;
    overflow: hidden;
}

.submit {
    display: flex;
    justify-items: center;
    color: white;
    background-color: var(--black-bg);
    padding: 0.625rem;
    border-radius: 1.25rem;
    border: none;
}

footer {
    margin: 0;
    padding: 0;
    height: 4rem;
    display: flex;
    background-color: var(--black-bg);
    justify-content: center;
    color: white;
    position: relative;
    overflow: visible;
}

@media (max-width: 480px) {

    /* version telephone */
    nav ul {
        display: none;
    }

    /*vecteurs*/
    .haut-page::after {
        width: 130vw;
        position: absolute;
        content: url("../images/vecteurs-portable/hp-bas-droite.svg");
        bottom: -9rem;
        left: -4rem;
    }

    .haut-page::before {
        width: 50vw;
        position: absolute;
        content: url("../images/vecteurs-portable/hp-haut-gauche.svg");
        top: -5rem;
        left: -8rem;
    }

    .presentation div a::after {
        z-index: -1;
        width: 200vw;
        position: absolute;
        content: url("../images/vecteurs-portable/p-bas.svg");
        right: -5rem;
        top: -3rem;
    }

    .projets::after {
        z-index: -1;
        width: 250vw;
        position: absolute;
        content: url("../images/vecteurs-portable/projet.svg");
        top: 5rem;
        right: -10rem;
    }

    body::before {
        z-index: 1;
        width: 50vw;
        position: absolute;
        content: url("../images/vecteurs-portable/f-gauche.svg");
        left: -3rem;
        bottom: -3rem;
        z-index: 1;
    }

    body::after {
        width: 100vw;
        position: absolute;
        content: url("../images/vecteurs-portable/f-droite.svg");
        left: 10rem;
        bottom: -3rem;
        z-index: -1;
    }
}

@media (min-width: 480px) and (max-width: 1024px) {

    /*version tablette*/

    .list-filter {
        grid-template-columns: repeat(3, 1fr);
    }

    .projet-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 480px) {

    /* version tablette et pc */
    html {
        scroll-behavior: smooth;
    }

    .presentation div {
        gap: 2rem;
        margin: 0 3rem;
    }

    nav div {
        display: none;
    }

    .volet {
        display: none;
    }

    .projet-img {
        height: 80vh;
    }

    /*page projet*/

    .img-2,
    .img-3 {
        aspect-ratio: 9/16;
        height: 80vh;
    }


    /*vecteurs*/

}

@media (min-width: 1024px) {

    /* version pc */

    .presentation div {
        flex-direction: row;
    }

    .index-img {
        height: 60vh;
        width: auto;
    }

    p {
        font-size: 1.6em;
    }

    h2 {
        font-size: 2em;
    }

    footer {
        height: 6rem;
    }

    .contact {
        justify-content: center;
    }

    .message {
        grid-area: 1/2/4/3;
        display: flex;
        flex-direction: column;
    }

    .message textarea {
        flex: 1;
        height: 100%;
    }

    .soumettre {
        grid-area: 4 / 1 / 5 / 3;
        display: flex;
        align-items: center;
    }

    .submit {
        padding: 0.5rem 6rem;
    }

    fieldset {
        grid-template-columns: repeat(2, 1fr);
    }

    /*page projet*/

    .list-filter {
        grid-template-columns: repeat(4, 1fr);
    }

    .projet-list {
        grid-template-columns: repeat(3, 1fr);
    }

    /*vecteurs*/
    .haut-page::after {
        width: 30vw;
        position: absolute;
        content: url("../images/vecteurs/hp-droite.svg");
        bottom: -5rem;
        right: -2rem;
    }

    .presentation::before {
        width: 110vw;
        position: absolute;
        content: url("../images/vecteurs/p-haut.svg");
        top: -9rem;
        left: -5rem;
    }

    .projets h2::before {
        z-index: -1;
        width: 110vw;
        position: absolute;
        content: url("../images/vecteurs/p-bas.svg");
        top: -24rem;
        left: -5rem;
    }

    .projets::after {
        z-index: -1;
        width: 120vw;
        position: absolute;
        content: url("../images/vecteurs/projet.svg");
        top: 5rem;
    }

    body::after {
        width: 60vw;
        position: absolute;
        content: url("../images/vecteurs/f-droite.svg");
        right: -20rem;
        bottom: -3rem;
        z-index: -1;
    }

    body::before {
        z-index: 1;
        width: 20vw;
        position: absolute;
        content: url("../images/vecteurs/f-gauche.svg");
        left: -8rem;
        bottom: -3rem;
    }
}