*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    min-width: 0;
    margin: 0;
    padding: 0;
    background-image: url("/MEDIAS/FOND.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/*--------------------------*/
/* MENU */
/*--------------------------*/

#menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    min-height: 80px;
    margin: 0;
    padding: 0 clamp(1rem, 4vw, 3.125rem);
    border-bottom: solid white 2px;
    background-color: rgba(255, 255, 255, 0);
    box-shadow: 0 5px 5px #009a1f20;
    transition: background-color 0.05s linear;
    z-index: 1;
}

#menu ul {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 3.125rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

#menu ul li {
    margin: 0;
}

#menu ul li a {
    color: black;
    font-family: "Titillium Web", sans-serif;
    font-weight: 600;
    font-style: normal;
    text-decoration: none;
    white-space: nowrap;
}

.txtmenu {
    color: rgba(255, 255, 255, 255);
    transition: color 0.05s linear;
}

#menu ul li a:hover {
    text-decoration: underline;
}

.homeimg {
    flex: 0 0 auto;
}

.homeimg img {
    display: block;
    width: auto;
    height: clamp(2.5rem, 5vw, 3.125rem);
    margin: 0;
}

/*--------------------------*/
/* TITRE */
/*--------------------------*/

h1 {
    margin: clamp(2rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
    padding: 0 clamp(1rem, 8vw, 6.25rem);
    color: #009a1e;
    font-family: "Titillium Web", sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    font-style: normal;
    line-height: 1.1;
    text-decoration: underline;
}

/*--------------------------*/
/* PROJETS */
/*--------------------------*/

main {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.5rem, 1vw, 1rem);
    margin: 10px auto clamp(4rem, 10vw, 9.375rem);
    padding: 0 clamp(0.5rem, 1vw, 1rem);
}

.card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
}

.cardMain {
    width: 100%;
}

.cardMain img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.card footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 20%;
    padding: 0.5rem;
    opacity: 0;
    background-color: white;
    box-shadow: none;
    transition: opacity 0.2s ease;
}

.card:hover .cardMain img {
    filter: blur(2px);
    opacity: 0.9;
    transition: all 0.2s ease;
}

.card footer h2 {
    margin: 0;
    color: #009a1e;
    font-family: "Titillium Web", sans-serif;
    font-size: clamp(0.9rem, 1.6vw, 1.5rem);
    font-weight: 600;
    font-style: normal;
    line-height: 1.15;
    text-align: center;
}

.card:hover footer {
    opacity: 1;
}

/*--------------------------*/
/* FOOTER */
/*--------------------------*/

body > footer {
    min-height: 100px;
    height: auto;
    padding: 20px clamp(1rem, 3vw, 2rem);
    background-color: white;
    box-shadow: 0 -5px 5px #009a1f20;
}

footer .listefooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    font-family: "Titillium Web", sans-serif;
    font-weight: 700;
    font-style: normal;
}

footer .listefooter > li {
    width: auto;
    min-width: 0;
}

.contact,
.reseaux {
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact {
    padding-left: 2.5rem;
}

.reseaux li {
    width: auto;
    margin-top: 5px;
}

.imgreseaux {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.imgreseaux li img {
    display: block;
    width: 30px;
    max-width: 100%;
}

/*--------------------------*/
/* TABLETTE */
/*--------------------------*/

@media (max-width: 900px) {
    main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card footer {
        position: static;
        min-height: 0;
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.92);
    }

    .card:hover .cardMain img {
        filter: none;
        opacity: 1;
    }

    .card footer h2 {
        font-size: clamp(1rem, 2.5vw, 1.35rem);
    }

    footer .listefooter {
        flex-wrap: wrap;
        justify-content: space-around;
    }
}

/*--------------------------*/
/* MOBILE */
/*--------------------------*/

@media (max-width: 600px) {
    body {
        background-attachment: scroll;
    }

    #menu {
        flex-direction: column;
        justify-content: center;
        gap: 0.75rem;
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    #menu ul {
        justify-content: center;
        gap: clamp(0.75rem, 6vw, 1.5rem);
        width: 100%;
    }

    h1 {
        margin-top: 2rem;
        text-align: center;
    }

    main {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        padding: 0 0.75rem;
    }

    .card footer h2 {
        font-size: clamp(1rem, 5vw, 1.35rem);
    }

    body > footer {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    footer .listefooter {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }

    .contact {
        padding-left: 0;
    }

    .reseaux {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .imgreseaux {
        justify-content: center;
    }
}