body {
    background-color: #f4f4f4;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main,
.mainAccueil {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-color: #b1b0b0;
    padding: 40px 20px;
}




/*general haeder*/
header {
    background-color: #1d1c1c;
    color: black;
    padding: 0 0;
    text-align: center;
}

header .header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 0 10px;
    gap: 20px;
}

header .header-content a {
    text-decoration: none;
    margin-left: 20px;

}

header .slogan {
    flex-grow: 1;
    text-align: center;
    color: white;
    margin-top: 0;
    margin-left: 50px;
}

header .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header .contact-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 150px;
    color: white;
}

header h1 {
    margin-top: 10px;
    font-size: 20px;
    color: orange;
}

header img {
    max-width: 90px;
    height: auto;
    display: block;
    margin: 0px auto;
}

header .horaires {
    font-size: 14px;
    color: white;
    margin-top: 20px;
}

.header-content .slogan h2 {
    font-size: 18px;
    font-weight: normal;
    margin: 0;
}

.header-content .slogan {
    font-size: 14px;
    margin-left: 200px;
    margin-top: 20px;
}

.header-content .p {
    font-size: 14px;
    margin-top: 5px;
}

nav ul {
    list-style-type: none;
    margin-top: 130px;
    padding: 0;
    display: flex;
}

nav ul li {
    display: inline;
    margin: 0 5px;
}

nav ul li a {
    color: orange;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

nav ul li a:hover {
    text-decoration: none;
}

nav ul li a.active,
nav ul li a:hover {
    color: #ddc511;
}

/*general footer*/
footer {
    background-color: #1d1c1c;
    color: white;
    text-align: center;
    width: 100%;

}

footer .footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    max-width: auto;
    margin: 0 20px;
    gap: 30px;
}

footer .footer-content h1 {
    margin-top: 10px;
    font-size: 24px;
    color: orange;
}

footer .footer-content img {
    max-width: 90px;
    height: auto;
    display: block;
    margin: 5px 0 5px 20px
}

footer .footer-content .logo a {
    text-decoration: none;
}

footer .copy {
    margin: 5px 150px 0 250px;
    color: white;
}

footer .social-media a {
    margin: 0 10px;
    color: orange;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

footer .social-media a:hover {
    color: #ddc511;
}

/*main accueil*/

.mainAccueil {
    padding: 20px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: darkgrey;
}

.mainAccueil,
main {
    background-color: #b1b0b0;
    padding: 40px 20px;
}

.mainAccueil .description {
    margin-bottom: 15px;
    color: rgb(96, 95, 95);
}

.mainAccueil img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.mainAccueil .description {
    color: #333;
    text-align: center;
}

/*presentation*/
.presentation-texte {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
}

.presentation-texte .presentation {
    text-align: center;
    color: #333;
}

.presentation-texte .presentation ul {
    list-style-type: none;
    padding: 0;
}

.presentation-texte .presentation ul li {
    margin-bottom: 15px;
    color: #555;
}

.mainAccueil .avatar-image {
    max-width: 100px;
    height: auto;
    border-radius: 50%;
    display: block;
    margin: 20px auto;
}

.mainAccueil .avatar-image {
    border: 3px solid #FF8C00;
}

/*page contact */
.contact-section {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;

}

.contact-section h2 {
    text-align: center;
    color: #333;
}

.contact-section .form-group {
    margin-bottom: 15px;
}

.contact-section label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.contact-section input,
.contact-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.contact-section button {
    background-color: #FF8C00;
    color: black;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.contact-section button:hover {
    background-color: #e67e22;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #FF8C00;
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
}

/*page services*/
main {
    padding: 20px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: darkgrey;
}

.service-section {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
}

.service-section h2 {
    text-align: center;
    color: #333;
}

.mainAccueil .titre_occasion {
    color: black;
    font-size: 28px;
    text-align: center;
    font-weight: bold;
    animation: flash 1.5s infinite;
    margin-top: 40px;
    margin-bottom: 20px;
}

.grid-voitures {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.carte-voiture {
    width: 250px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    border: orange 3px solid;
    border-radius: 10px;
    background-color: #fff;
    padding: 10px;
}

.carte-voiture:hover {
    transform: scale(1.05);
}

/* Définition de l'animation */
@keyframes flash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

/* Le contenu de la modale */
.modal-content {
    background-color: #1d1c1c;
    color: white;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid orange;
    width: 50%;
    border-radius: 10px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    color: orange;
    font-size: 40px;
    cursor: pointer;
}

.btn-details {
    background: #444;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    flex: 1;
}

.btn-reserve {
    background: orange;
    color: black;
    border: none;
    padding: 10px;
    cursor: pointer;
    flex: 1;
    font-weight: bold;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {

    /* 1. Le Header */
    header .header-content {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 95%;
    }

    header .logo {
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }

    .header-content .slogan {
        margin-left: 0;
    }

    header .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    header .slogan {
        margin-top: 10px;
    }


    /* 2. Le Menu Burger & Navigation */
    .burger-menu {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        margin: 0 0 10px 20px;
    }

    .burger-menu span {
        width: 30px;
        height: 4px;
        background-color: orange;
        border-radius: 2px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1d1c1c;
        padding: 20px 0 !important;
        margin: 0 !important;
    }

    nav ul.active {
        display: flex !important;
        position: absolute;
        text-align: center;
        top: 100%;
        left: 0;
    }

    .grid-voitures {
        flex-direction: column;
        align-items: center;
    }

    .carte-voiture {
        width: 90% !important;
        margin: 10px 0;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
        padding: 15px;
    }

    /* 5. Le Footer */
    footer .footer-content {
        flex-direction: column;
        gap: 15px;
    }

    footer .copy {
        margin: 10px 0;
    }

    .footer-content .social-media {
        margin-bottom: 20px;
    }
}

@media (min-width : 768px) and (max-width: 1024px) {

    nav ul.active {
        display: flex !important;
        position: absolute;
        text-align: center;
        top: 100%;
        left: 15px;
    }

    header .header-content a {
        margin-left: 0;
    }
}