/*-- 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;
    background-attachment: fixed; /* Fixe l'arrière-plan */
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: url(../ASSETS/img/tunning_et_modification4.jpg) center/cover no-repeat; /* Image de fond */
    background-attachment: fixed; /* Fixe l'arrière-plan */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Espacement entre les sections */
}

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

#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;
}

.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;
    position: absolute;
    right: 30px;
    top: 40px;
    width: 35px;
    z-index: 3;
}

/* Section "Intro" */
.intro {
    color: white;
    background-color: #534b4b;
    padding: 7px 15px;
    border-radius: 5px;
    margin-left: 50px;
    margin-right: 50px;
    margin-top: 70px;
    margin-bottom: 200px;
}

.intro p {
    margin: 10px;
}

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

/* Styles des articles */
.article-container div {
    background-color: #534b4b;
    color: white;
    border-radius: 10px;
    padding: 20px;
    flex-basis: calc(27.5%);
    height: auto;
    box-sizing: border-box;
    margin-right: 10px;
    margin-bottom: 100px;
    font-size: large;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.article-container div img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    margin-top: 20px;
}

.article-container div h2 {
    margin-bottom: 12.5px;
}

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

/* Styles pour les écrans de petite taille (mobiles) */
@media screen and (max-width: 900px) {

    /* Ajustement de la section Intro pour les écrans petits */
    .intro {
        margin-top: 200px;
    }

    .navbar {
        padding: 0;
    }

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

    .navbar .menu-hamburger {
        display: block; /* Affiche le menu hamburger sur mobile */
    }

    .nav-links {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        background: rgba(255, 255, 255, 0.256);
        backdrop-filter: blur(7px); /* Ajoute un effet flou au menu mobile */
        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;
    }

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

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

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

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

}

/* Styles pour les écrans moyens (tablettes) */
@media screen and (max-width: 1323px) {
    .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;
    }

    /* Ajustement de la section Intro pour les écrans moyens */
    .intro {
        margin-bottom: 50px;
    }

}

/* Styles pour les écrans plus petits (mobiles) */
@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }

    /* Réduction des marges et ajustement de la taille de l'Intro */
    .intro {
        margin-left: 60px;
        margin-right: 20px;
        margin-top: 200px;
        width: auto;
    }

    .article-container {
        flex-direction: column;
        gap: 10px;
    }

    .article-container {
        justify-content: center;
        align-items: center;
    }

    .article-container div {
        width: 60%;
        height: 75%;
        padding: 15px;
        margin-bottom: 20px;
        justify-content: center;
        align-items: center;
    }

    .article-container div img {
        width: 100%;
        height: auto;
    }
}

/* Styles pour les très petits écrans */
@media screen and (max-width: 500px) {
    .navbar {
        flex-direction: column;
        align-items: center;
    }

    .article-container div {
        width: 50%;
        height: 75%;
        padding: 15px;
        margin-bottom: 20px;
        justify-content: center;
        align-items: center;
    }

    /* Réduction des marges de l'Intro sur les très petits écrans */
    .intro {
        margin-left: 150px;
    }
}
