/** ======== BASE ======== **/
/* Police globale, fond sombre, couleur du texte */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #f0f0f0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/** ======== NAVIGATION ======== **/
/* Barre de navigation principale avec logo centré */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #000;
    border-bottom: 1px solid #e60023;
    position: relative;
    flex-wrap: wrap;
}

.nav-left, .nav-right {
    display: flex;
    gap: 24px;
}

/* Logo centré dans la barre de navigation */
.logo-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    width: 160px;
    cursor: pointer;
}

/* Boutons de navigation */
.nav-left button,
.nav-right button {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f0f0f0;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Effet hover sur les boutons */
.nav-left button:hover,
.nav-right button:hover {
    color: #e60023;
    transform: scale(1.05);
}

/* Hamburger styles (hidden by default) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 4px 0;
    background: #e60023;
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile menu hidden by default */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #181818;
    z-index: 99;
    padding: 20px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.mobile-menu button {
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 1.1em;
    padding: 16px 0;
    text-align: center;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}
.mobile-menu button:hover {
    background: #222;
}

/* Responsive: show only logo and hamburger, hide navs */
@media (max-width: 768px) {
    .nav-left,
    .nav-right {
        display: none !important;
    }
    .hamburger {
        display: flex;
        position: absolute;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
    }
    .logo-wrapper {
        position: static;
        transform: none;
        margin: 0 auto;
    }
    .mobile-menu {
        display: none;
    }
    .mobile-menu.open {
        display: flex;
    }
}

/** ======== VEHICLE CONTAINER ======== **/
/* Conteneur principal de la fiche véhicule */
.vehicule-container {
    max-width: 1100px;
    margin: 40px auto;
    background: #181818;
    border-radius: 24px;
    box-shadow: 0 6px 32px 0 rgba(0,0,0,0.3);
    padding: 40px 36px 36px 36px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/** ======== CAROUSEL AGRANDI ======== **/
/* Galerie d'images du véhicule */
.carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    position: relative;
}

.carousel-main-img {
    width: 100%;
    max-width: 780px;
    height: 470px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 2px 24px 0 rgba(0,0,0,0.4);
    border: none;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, #181818 60%, #232323 100%);
    padding: 0;
}

/* Miniatures sous le carousel */
.carousel-thumbnails {
    display: flex;
    gap: 22px;
    margin-top: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.carousel-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border 0.2s, transform 0.2s;
}
.carousel-thumb:hover,
.carousel-thumb.active {
    border: 2px solid #e60023;
    transform: scale(1.08);
}

/** ======== VEHICLE INFO ======== **/
/* Informations principales du véhicule */
.vehicule-infos {
    text-align: left;
    margin-top: 12px;
}

.vehicule-infos h1 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #fff;
}

/* Détails du véhicule sous forme de tags */
.vehicule-details {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.vehicule-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.13rem;
    font-weight: 600;
    background: #222;
    color: #f0f0f0;
    padding: 14px 24px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.17);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Effet hover sur un détail */
.vehicule-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

.vehicule-detail svg {
    flex-shrink: 0;
}

/* Description détaillée du véhicule */
.vehicule-description {
    background: #1b1b1b;
    border-radius: 14px;
    padding: 18px 24px;
    margin-top: 24px;
    border: 1px solid #333;
}

.vehicule-description h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #e60023;
}

.vehicule-description p {
    color: #ececec;
    font-size: 1.07rem;
    line-height: 1.6;
}

/* Prix du véhicule */
.vehicule-prix {
    font-size: 2.2rem;
    font-weight: bold;
    color: #e60023;
    margin: 18px 0 0 0;
    text-align: left;
}

/** ======== FOOTER ======== **/
/* Pied de page sombre et centré */
.footer {
    background-color: #000;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e60023;
    font-size: 14px;
    color: #f0f0f0;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/** ======== LIGHTBOX STYLES ======== **/
/* Styles pour la lightbox d'images */
.lightbox-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.93);
    flex-direction: column;
    transition: opacity 0.2s;
}
.lightbox-img {
    max-width: 92vw;
    max-height: 85vh;
    border-radius: 18px;
    box-shadow: 0 4px 32px #000;
    margin-bottom: 18px;
    background: #181818;
}
.lightbox-close {
    position: absolute;
    top: 32px; right: 38px;
    color: #fff;
    font-size: 2.7rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    background: rgba(0,0,0,0.3);
    border: none;
    font-size: 3rem;
    padding: 10px 18px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.2s, color 0.2s;
}
.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }

/** ======== RESPONSIVE ======== **/
/* Adaptation mobile et tablette */
@media (max-width: 700px) {
    html, body {
        font-size: 15px;
    }
    .topbar {
        flex-direction: column;
        padding: 8px 2vw;
        gap: 6px;
    }
    .logo-wrapper {
        position: static;
        transform: none;
        margin: 6px 0;
    }

    .nav-left, .nav-right {
        gap: 10px;
    }
    .nav-left button,
    .nav-right button {
        font-size: 13px;
        padding: 7px 10px;
    }
    .vehicule-container {
        margin: 12px 0;
        border-radius: 10px;
        box-shadow: none;
        padding: 6vw 2vw 8vw 2vw;
        gap: 12px;
    }
    .carousel-main-img {
        height: 44vw;
        min-height: 120px;
        max-width: 100vw;
        border-radius: 10px;
    }
    .carousel-thumbnails {
        gap: 8px;
        margin-top: 8px;
    }
    .carousel-thumb {
        width: 22vw;
        height: 15vw;
        min-width: 44px;
        min-height: 30px;
        border-radius: 7px;
    }
    .vehicule-infos h1 {
        font-size: 1.15rem;
        margin-bottom: 10px;
    }
    .vehicule-details {
        flex-direction: column;
        gap: 6px;
    }
    .vehicule-detail {
        font-size: 0.98rem;
        padding: 6px 8px;
        border-radius: 8px;
    }
    .vehicule-description {
        padding: 8px 6px;
        font-size: 0.97rem;
        margin-top: 10px;
        border-radius: 8px;
    }
    .vehicule-prix {
        font-size: 1.2rem;
        margin: 10px 0 0 0;
    }
    .footer {
        font-size: 11px;
        padding: 10px 2px;
        border-radius: 0 0 8px 8px;
    }
    .lightbox-modal {
        padding: 0;
    }
    .lightbox-img {
        max-width: 98vw;
        max-height: 60vh;
        border-radius: 8px;
    }
    .lightbox-close {
        top: 10px;
        right: 16px;
        font-size: 2rem;
    }
    .lightbox-prev, .lightbox-next {
        font-size: 2.2rem;
        padding: 6px 10px;
        top: 55%;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .vehicule-container,
    .vehicule-description,
    .vehicule-detail,
    .vehicule-infos h1,
    .vehicule-prix {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
    .vehicule-description p {
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }
}
@media (max-width: 1100px) {
    .vehicule-container {
        max-width: 98vw;
        padding: 18px 2vw 24px 2vw;
    }
    .carousel-main-img {
        max-width: 96vw;
        height: 37vw;
        min-height: 180px;
    }
    .carousel-thumb {
        width: 21vw;
        height: 14vw;
        min-width: 70px;
        min-height: 50px;
    }
    .btn-retour-wrapper {
        margin-bottom: 18px;
    }
    .vehicule-infos h1 {
        font-size: 1.5rem;
    }
    .vehicule-detail {
        font-size: 1rem;
        padding: 8px 13px;
    }
    .vehicule-details {
        gap: 13px;
    }
    .vehicule-prix {
        font-size: 1.3rem;
    }
}
@media (max-width: 700px) {
    .vehicule-detail {
        flex-wrap: wrap;
    }
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        background: none !important;
        box-shadow: none !important;
    }
}

/* Ajoutez à la fin du fichier */

.contact-btn-wrapper {
    text-align: center;
    margin: 32px 0 0 0;
    /* Ajout d'une légère animation d'apparition */
    animation: fadeInUp 0.6s;
}

.btn-contact {
    display: inline-block;
    background: linear-gradient(90deg, #e60023 60%, #ff3b47 100%);
    color: #fff;
    padding: 16px 44px;
    border-radius: 12px;
    font-size: 1.18rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 4px 18px rgba(230,0,35,0.13), 0 1.5px 6px rgba(0,0,0,0.10);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-contact:hover, .btn-contact:focus {
    background: linear-gradient(90deg, #c5001f 60%, #e60023 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 28px rgba(230,0,35,0.18), 0 2px 10px rgba(0,0,0,0.13);
    outline: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}
.modal.open {
    display: flex;
}
.modal-card {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 40px 28px;
    max-width: 350px;
    width: 92vw;
    text-align: center;
    animation: zoomIn 0.3s ease;
    position: relative;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.modal-card h2 {
    color: #e60023;
    font-size: 1.5em;
    margin-bottom: 18px;
}
.modal-card p {
    color: #ddd;
    font-size: 1.08em;
    margin-bottom: 10px;
}
.modal-card .contact-link {
    color: #e60023;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.modal-card .contact-link:hover {
    text-decoration: underline;
    color: #c5001f;
}
.modal-card .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 26px;
    color: #fff;
    cursor: pointer;
}
@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
