* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-image: url('media/background.svg');
    background-size: cover;
    background-attachment: fixed;
    background-position: bottom;

    font-family: 'Arial', sans-serif;

    display: flex;
    flex-direction: column;
    min-height: 100vh;

    z-index: 1;
    position: relative;
    top: 0;
}

header, footer{
    background-color: rgba(1, 100, 28, 0.8);
    padding: 20px;
    color: white;
}

header{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header > h1 {
    text-align: center;
}

header button{
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.2s;
}

header button:hover{
    transform: scale(1.1);
}

header ul{
    display: flex;
    gap: 20px;
}

main ul{
    margin: revert;
    padding: revert;
}

#overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#overlay.open{
    opacity: 1;
    visibility: visible;
}

#overlay.close{
    opacity: 0;
    visibility: hidden;
}

#burger_menu_close_button{
    align-self: flex-start;
}

nav{
    position: fixed;
    height: 100vh;
    top: 0;
    right: 0;
    background-color: rgba(1, 100, 28, 0.9);
    padding: 20px;
    z-index: 2;
    display: flex;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

nav.open{
    transform: translateX(0);
}

nav.close{
    transform: translateX(100%);
}

nav ul{
    list-style-type: none;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 50px;
    align-self: center;
}

nav a{
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}


nav a:hover{
    color: #19179a;
}

main {
    flex: 1;
    align-self: center;
    margin: 20px;
    max-width: 1200px;
}

main h2{
    margin-bottom: 10px;
    text-align: center;
}

p{
    margin-bottom: 20px;
}

h3{
    margin-bottom: 10px;
    text-align: center;
}

.green {
		color:#008000;
}

.flex-container{
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.flex-container>div{
    flex: 1 1 200px;
    text-align: center;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.386);
    padding: 10px;
    border-radius: 10px;
}

.flex-container img{
    width: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.2s;
}
.flex-container img:hover{
    transform: scale(1.05);
}
footer p{
    text-align: center;
}

/* Media queries - Version ordinateur (desktop) */
@media (min-width: 768px) {
    header {
        justify-content: space-between;
        gap: 40px;
    }

    /* Cacher les boutons burger en version desktop */
    #burger_menu_button,
    #burger_menu_close_button {
        display: none;
    }

    /* Cacher l'overlay en version desktop */
    #overlay {
        display: none;
    }

    /* Afficher la nav en horizontal dans le header */
    nav {
        position: static;
        height: auto;
        top: auto;
        right: auto;
        background-color: transparent;
        padding: 0;
        z-index: auto;
        transform: translateX(0);
        transition: none;
    }

    nav.open,
    nav.close {
        transform: translateX(0);
    }

    /* Afficher les liens horizontalement */
    nav ul {
        flex-direction: row;
        gap: 30px;
        align-self: auto;
    }

    nav a {
        font-size: 16px;
    }

    nav a:hover {
        color: #19179a;
    }
}
