* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: Caviar Dream;
    src: url(font/CaviarDreams_Bold.ttf);
}

html {
    scroll-behavior: smooth;
}

header {
    padding: 25px 15px 15px 15px ;
    display: flex;
    justify-content: space-around ;
    align-items: center;
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: #333443;
    gap: 20px;
    padding: 10px 0;
}

nav.active {
    display: flex;
}

nav a {
    position: relative;
    display: flex;
    flex-direction: row; 
    padding: 10px 15px;
    text-align: center;
    white-space: nowrap; 
    font-size: 1.5rem;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

nav a:hover::after {
    transform: scaleX(1);
}

.burger {
    display: none;
    color: white;

}

body {
    background-color: #333443;
    overflow-x: hidden;

}

h1, p, a {
    font-family: Caviar Dream;
    color: #ffffff;
}

a {
    text-decoration: none;
}

#imagedefond picture{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#imagedefond picture img {
    object-fit: cover; 
}

#imagedefond h1 {
    position: absolute;
    font-size: 7rem;
    color: white; 
}

#imagedefond .image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#imagedefond .image-wrapper h1 {
    position: absolute;
    font-size: 7rem;
    color: white;
}

#apropos {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 50px; 
    text-align: left; 
    padding: 50px 100px ;
    margin: 50px;
}

#apropos img {
    border-radius: 10px;
}

#competence {
    display: flex;
    overflow: hidden; 
    white-space: nowrap;
    position: relative;
    width: 100%;
    padding: 0;
}

.scroll {
    display: flex;
    gap: 15px; 
    position: relative;
}

#competence img {
    height: auto;
    flex-shrink: 0; 
}

#travaux {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: 50px 0 25px 0;
}

#travaux a {
    text-decoration: none;
    display: flex;
    justify-content: center;
    width: calc(33.33%);
}

#travaux figure {
    padding: 50px 0px;
    text-align: center;
    transition: transform 0.3s ease;
}

#travaux a:hover figure {
    transform: scale(1.02);
}

#travaux img {
    border-radius: 10px;
}

footer {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 25px;
}

footer div a{
    display: flex;
    align-items: center;
    justify-content: center;
}

footer p {
    width: auto;
    padding: 10px;
}

.lazy-image {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.lazy-image.visible {
    opacity: 1;
    transform: translateY(0);
}



@media screen and (max-width: 768px) {

    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    nav.active {
        display: flex;
    }

    .burger {
    display: block;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    }

    #main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #333443;
        gap: 20px;
        padding: 10px 0;
    }

    #main-nav.active {
        display: flex;
    }

    #main-nav a {
        padding: 10px;
        font-size: 1rem;
    }

    #logo {
    height: 50px; 
    }

    #imagedefond h1 {
        font-size: 3rem;
        text-align: center;
    }

    #imagedefond {
        height: 250px;
    }

     #imagedefond img {
        width: 320px;
        height: 250px;
    }

        #imagedefond .image-wrapper h1 {
        font-size: 3rem;
        text-align: center;
    }

    #apropos {
        flex-direction: column;
        padding: 20px;
        margin: 20px 0;
        text-align: center;
    }

    #apropos img {
        width: 100%;
        max-width: 300px;
        margin-bottom: 20px;
    }

    #travaux {
        flex-direction: column;
        align-items: center;
    }

    #travaux a {
        width: 90%;
    }

    footer {
    flex-direction: column;
    align-items: center;
}
}


