/*-- Créé par Joachim Espin / le 20.02.2025 */

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
}

html,
body {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: url(../ASSETS/img/img_voiture_voiture_emblem.webp) center/cover no-repeat; /* Image de fond */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Espacement entre les sections */
    background-attachment: fixed; /* Fixe l'image en arrière-plan */
    background-size: cover; /* L'image couvre toute la fenêtre */
    background-position: center center; /* Positionnement centré de l'image */
    background-repeat: no-repeat; /* Empêche la répétition de l'image de fond */
}

/* Styles pour la barre de navigation */
.navbar {
    padding: 50px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    bottom: 1000px; /* Positionnement ajusté */
}

#actuelle {
    color: #ffd900; /* Couleur du lien actif */
    font-weight: 600;
}

.navbar a .logo {
    color: white;
    font-size: 2em;
    font-weight: bold;
    margin-left: 50px;
}

.navbar a .img-logo {
    position: absolute;
    left: 60px;
    width: 150px;
    height: 100px;
    margin-top: 40px;
}

.navbar a {
    color: white;
    font-size: 15px;
    transition: color 0.6s ease; /* Effet de transition pour le changement de couleur */
}

.navbar .nav-links {
    display: flex;
    justify-content: center;
}

.navbar .nav-links ul {
    display: flex;
    margin: 0;
}

.navbar .nav-links ul li {
    margin: 0 25px;
}

.navbar .nav-links ul li a:hover {
    color: #ffd900; /* Changement de couleur au survol */
    font-weight: 600;
}

.navbar .menu-hamburger {
    display: none; /* Cache le menu hamburger sur les grands écrans */
    position: absolute;
    right: 30px;
    top: 40px;
    width: 35px;
    z-index: 3;
}

/* Section principale */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    flex-grow: 1;
    margin-top: 50px;
}

/* Description principale */
main h3.description {
    margin-bottom: 50px;
    padding: 10px;
    background-color: #534b4b;
    color: rgb(202, 184, 184);
    border-radius: 15px;
    text-align: center;
    width: 80%;
    font-size: 1.1em;
}

/* Conteneur des articles */
.article-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    width: 100%;
}

/* Styles des articles */
.article-container .article {
    width: 30%;
    background-color: #534b4b;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    min-height: 350px;
    color: white;
    font-size: 0.9em;
}

/* Styles des images dans les articles */
.article-container .article img {
    width: 100%;
    height: auto;
    object-fit: cover; /* Couvre l'espace tout en maintenant l'aspect de l'image */
    border-radius: 10px;
    max-height: 250px;
    display: block;
    margin: auto;
}

/* Espacement autour du texte des articles */
.article-container .article h4,
.article-container .article p {
    padding-top: 10px;
}

/* Pied de page */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: auto;
}

/* Styles du menu hamburger (non visible sur grands écrans) */
.navbar .menu-hamburger {
    display: none;
    position: absolute;
    right: 30px;
    top: 40px;
    width: 35px;
    z-index: 3;
}

/* Styles pour les écrans petits (mobiles) */
@media screen and (max-width: 600px) {
    /* Les articles occupent toute la largeur sur petits écrans */
    .article-container .article {
        width: 100%;
    }

    main h3.description {
        width: 100%;
    }

    html,
    body {
        background-size: cover;
        background-position: center center;
        background-attachment: fixed;
    }

    /* Espacement entre les articles */
    .article-container .article {
        margin-bottom: 20px;
    }
}

/* Styles pour les écrans moyens (tablettes, petites résolutions) */
@media screen and (max-width: 900px) {
    .navbar {
        padding: 0;
    }

    /* Affichage du menu hamburger sur petits écrans */
    .navbar .menu-hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        background: rgba(255, 255, 255, 0.256);
        backdrop-filter: blur(7px); /* Flou en arrière-plan */
        width: 100%;
        height: 100vh;
        flex-direction: column;
        align-items: center;
        margin-left: -100%;
        transition: margin 0.5s ease;
    }

    .nav-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-links.mobile-menu {
        margin-left: 0;
        position: fixed;
    }

    /* Espacement des éléments du menu */
    .navbar .nav-links ul li {
        margin: 25px 0;
    }

    .navbar a {
        font-size: 1.2em;
    }

    .navbar a .logo {
        position: absolute;
        top: 40px;
        left: -10px;
    }

    .navbar a .img-logo {
        margin-top: 15px;
        width: 225px;
        height: 200px;
        padding-left: 45px;
    }

    /* Espacement pour la description sur petits écrans */
    .description {
        margin-top: 130px;
    }
}

/* Ajustement des articles pour des écrans plus grands (tablettes, petites résolutions) */
@media screen and (max-width: 1339px) {
    .article-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: 20px;
        padding: 20px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .article {
        background-color: #534b4b;
        width: 300px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        text-align: center;
        padding: 10px;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        width: 45%;
    }

    .article img {
        width: 100%;
        height: auto;
        border-radius: 5px;
    }

    .navbar a .logo {
        color: white;
        font-size: 2em;
        font-weight: bold;
        margin-left: 50px;
    }

    .navbar a .img-logo {
        position: absolute;
        left: 35px;
        width: 150px;
        height: 100px;
        margin-top: 80px;
    }
}

/* Styles pour les écrans plus petits */
@media screen and (max-width: 768px) {
    .article {
        width: 100%; /* Les articles occupent toute la largeur de l'écran */
    }
}
