/* ===== VARIABLES & RESET ===== */
:root {
    --color-black: #000;
    --color-white: #fff;
    --color-blue: #00ADEF;
    --color-dark: #1A1A1A;
    --color-gray: #F5F5F5;
    --font-main: 'MercedesBenz', Arial, sans-serif;
    --font-text: Arial, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Reset optimisé */
html, body, div, span, h1, h2, h3, h4, p, a, img, ul, li {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body#mercedes-benzvoitures-particulieres {
    font-family: var(--font-text);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: var(--font-main);
    font-weight: 400;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    width: 180px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* NAVIGATION - Z-INDEX CONSERVÉ ICI */
.main-navigation {
    z-index: 9999; /* Z-index critique conservé */
}
.main-navigation ul ul a
 {
    width: 300px;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-menu {
    display: flex;
    list-style: none;
}

.main-menu > li {
    position: relative;
    margin: 0 8px;
}

.main-menu > li > a {
    display: flex;
    align-items: center;
    padding: 0 1.8rem;
    height: 90px;
    font-family: var(--font-main);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-black);
    position: relative;
    transition: var(--transition);
    font-weight: 500;
}

.main-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 1.8rem;
    right: 1.8rem;
    height: 3px;
    background: var(--color-blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.main-menu > li:hover > a {
    color: var(--color-blue);
    transform: translateY(-3px);
}

.main-menu > li:hover > a::after {
    transform: scaleX(1);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    background: var(--color-white);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100; /* Z-index pour sous-menus */
    padding: 12px 0;
}

.main-menu > li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.submenu li {
    transition: background 0.2s ease;
}

.submenu li:hover {
    background: rgba(0, 173, 239, 0.08);
}

.submenu a {
    display: block;
    padding: 14px 22px;
    font-size: 0.95rem;
    color: var(--color-dark);
    transition: var(--transition);
}

.submenu a:hover {
    color: var(--color-blue);
    padding-left: 28px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-black);
    padding: 12px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--color-blue);
    transform: scale(1.1);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background: var(--color-black);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    color: var(--color-white);
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    margin-bottom: 1.8rem;
    max-width: 700px;
    line-height: 1.15;
}

.hero-text {
    font-size: 1.3rem;
    max-width: 550px;
    margin-bottom: 2.8rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    background: var(--color-blue);
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: 4px;
    transition: var(--transition);
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-dark);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-white);
    margin-left: 1.5rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

/* ===== VEHICLES SECTION ===== */
.section {
    padding: 7rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--color-blue);
    margin: 2rem auto 0;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.vehicle-card {
    background: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}

.vehicle-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.vehicle-img {
    height: 240px;
    overflow: hidden;
}

.vehicle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.vehicle-card:hover .vehicle-img img {
    transform: scale(1.08);
}

.vehicle-info {
    padding: 1.8rem;
}

.vehicle-name {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    font-family: var(--font-main);
    font-weight: 500;
}

.vehicle-price {
    color: var(--color-blue);
    font-weight: bold;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.vehicle-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

.feature {
    background: var(--color-gray);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
}
	
	

/* ===== FOOTER ===== */
.footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 5rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.footer-col h4 {
    font-family: var(--font-main);
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
    color: var(--color-blue);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--color-blue);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col a {
    display: inline-block;
    padding: 5px 0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--color-blue);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 2rem;
}

.social-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--color-blue);
    transform: translateY(-5px) scale(1.1);
}

.copyright {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1rem;
    opacity: 0.8;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1200px) {
    .main-menu > li > a {
        padding: 0 1.5rem;
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }
}

@media (max-width: 992px) {
    .main-menu > li > a {
        padding: 0 1.2rem;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 80px;
    }
    
    .logo {
        width: 150px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 320px;
        height: calc(100vh - 80px);
        background: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition);
        overflow-y: auto;
        z-index: 9998; /* Z-index pour menu mobile */
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .main-menu > li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .main-menu > li > a {
        height: auto;
        padding: 1.3rem 0;
        font-size: 1.1rem;
        justify-content: space-between;
    }
    
    .submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        display: none;
        margin: 0;
        padding: 0;
        background: rgba(0, 0, 0, 0.03);
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        z-index: 9997; /* Z-index pour sous-menus mobiles */
    }
    
    .submenu li {
        border-bottom: none;
    }
    
    .submenu a {
        padding: 1rem 1.5rem 1rem 2.5rem;
        font-size: 1rem;
    }
    
    .main-menu > li.active .submenu {
        display: block;
    }
    
    .hero {
        min-height: 600px;
        height: auto;
        padding: 5rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
    }
    
    .btn, .btn-outline {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0.8rem 0;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* Menu mobile amélioré */
    .main-menu > li {
        position: relative;
    }
    
    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        top: 0;
        width: 50px;
        height: 100%;
        background: none;
        border: none;
        color: var(--color-black);
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .main-menu > li.active .submenu-toggle i {
        transform: rotate(180deg);
    }
    
    .main-menu > li .submenu-toggle i {
        transition: transform 0.3s ease;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== POLICES ===== */
@font-face {
    font-family: 'MercedesBenz';
    src: url('fonts/MercedesBenz.woff2') format('woff2'),
         url('fonts/MercedesBenz.woff') format('woff');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

/* ===== OPTIMISATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Optimisation des transitions */
a, button, .btn, .logo, .vehicle-card, .social-link {
    transition: var(--transition);
}

/* Optimisation du rendu */
.hero-content, .vehicle-card, .section-title {
    will-change: transform, opacity;
}

}