/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #405FF2;
    --secondary-color: #183B7E;
    --bg-color: #F5F6FA;
    --text-color: #333;
    --light-gray: #E5E7EB;
    --white: #FFFFFF;
    --success-color: #26B12F;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: 0;
    min-height: 100vh; /* Ensure body takes full viewport height */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* États de chargement de la page */
.page-loading {
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.page-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

/* Header */
header {
    display: flex;
    justify-content: center; /* Centrer le contenu */
    background-image: url('../assets/key_visual_2.jpg'); /* Same background as hero section */
    background-size: cover;
    background-position: center 20%; /* Position to show a good part of the background */
    background-repeat: no-repeat;
    background-attachment: fixed; /* Keep the background fixed while scrolling */
    position: fixed; /* Change to fixed instead of sticky for maximum compatibility */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Very high z-index to ensure it stays on top of everything */
    padding: 0; /* Pas de padding sur les côtés */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); /* Increased shadow for better visibility */
    backdrop-filter: blur(15px); /* More pronounced blur effect */
    -webkit-backdrop-filter: blur(15px); /* For Safari */
}

/* Add an overlay for better readability with the blurred background */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* More opaque white for better contrast */
    z-index: -1;
}

header .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
    padding: 15px 20px; /* Restore horizontal padding for header */
    position: relative; /* Ensure it sits above the overlay */
    z-index: 1; /* Above the ::before pseudo-element */
}

.header-promo-banner {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--secondary-color);
    border: 1px solid var(--light-gray);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.brand img.logo-image {
    max-height: 110px;
    width: auto;
}

.vehicle-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #1d4ed8;
    color: white;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    z-index: 2;
}

.vehicle-badge.offer-limited {
    background-color: #e63946;
}

.savings-text {
    display: block;
    margin-top: 8px;
    color: #2d6a4f;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Le header sera sticky sur toutes les tailles d'écran */

.contact-info a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
}

.brand img.logo-image {
    max-height: 110px;
    width: auto;
}

.selection-button button {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.selection-button button:hover {
    background-color: var(--light-gray);
}

.selection-button .icon-car {
    height: 18px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

.mobile-selection-cta {
    display: none;
}

.count-badge {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    transition: all 0.3s ease;
}

.count-badge.vehicle-added-animation {
    animation: vehicleAddedAnimation 0.5s ease;
    background-color: #ff4a4a;
}

/* Selection Drawer */
.selection-drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
}

.selection-drawer.open {
    right: 0;
    z-index:9999;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.drawer-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.drawer-header h2 .icon-car {
    height: 18px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.drawer-header button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
}

.drawer-content {
    padding: 20px;
}

.empty-selection .browse-vehicles-btn {
    animation: pulseButton 2s infinite;
}

.drawer-info {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.selected-vehicles {
    margin-bottom: 30px;
}

.selected-vehicle {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.selected-vehicle-image {
    width: 120px;
    height: 80px;
    object-fit: contain;
    margin-right: 15px;
}

.selected-vehicle-info {
    flex: 1;
}

.selected-vehicle-model {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 5px;
}

.selected-vehicle-price {
    font-weight: 600;
    color: var(--secondary-color);
}

.selected-vehicle-price .price-prefix {
    font-size: 0.7rem;
    margin-bottom: 0;
    line-height: 1;
}

.selected-vehicle-price .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.selected-vehicle-price .promo-price {
    color: #e63946;
    font-weight: 700;
    font-size: 1rem;
}

.selected-vehicle-remove {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.selected-vehicle-remove:hover {
    background-color: var(--light-gray);
}

/* Message pour aucun véhicule sélectionné */
.no-vehicle-selected {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 20px;
    display: none;
}

/* Icône supprimée */

.no-vehicle-selected h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.no-vehicle-selected p {
    margin-bottom: 20px;
    color: #666;
}

.browse-vehicles-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.browse-vehicles-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Message de remerciement */
.thank-you-message {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 20px;
    display: none;
}

.thank-you-icon {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 15px;
}

.thank-you-message h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: var(--secondary-color);
}

.thank-you-message p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.thank-you-extra {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.back-to-site-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.back-to-site-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    display: none;
}

.contact-form h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
}

/* Styles pour intl-tel-input */
.iti {
    width: 100%;
    margin-bottom: 5px;
}

.iti__flag-container {
    z-index: 10;
}

.iti__selected-flag {
    padding: 0 12px;
}

input.error {
    border: 1px solid #ff4646;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
    margin-top: 3px;
}

.checkbox-group label {
    font-size: 0.8rem;
    flex: 1;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Animation d'ajout au panier */
@keyframes vehicleAddedAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes pulseButton {
    0% { transform: scale(1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    50% { transform: scale(1.05); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25); }
    100% { transform: scale(1); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
}

.vehicle-added-animation {
    animation: vehicleAddedAnimation 0.5s ease;
}

/* Animation d'ajout flottante vers le panier */
.flying-vehicle {
    position: fixed;
    width: 50px;
    height: 50px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 1;
}

/* Main Content */
main {
    padding-top: 95px; /* Add padding to compensate for fixed header + ticker */
}

/* Hero Section */
.hero-section {
    padding: 20px 0 80px;
    background-color: var(--white);
    background-image: url('../assets/key_visual_2.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-bottom: 40px;
    position: relative;
    min-height: 400px; /* Reduced height */
    margin-top: 0;
    padding-top: 20px; /* Reduced padding */
}

.hero-text {
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-text h2 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.hero-text h1 {
    font-size: 2.4rem;
    color: var(--secondary-color);
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Brand Logos */
.brand-logos {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Pour les écrans de bureau, ces éléments sont masqués */
.brand-logos .first-row,
.brand-logos .second-row {
    display: none;
}

.search-all-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 15px;
    width: 150px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.search-all-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-all-btn i {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.search-all-btn span {
    font-size: 0.8rem;
    line-height: 1.2;
    font-weight: 500;
}

.logos {
    display: flex;
    gap: 15px;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0.7;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin: 0 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Fixed width for all brand logos */
    width: 120px;
    min-width: 120px;
}

.brand-logo:hover, .brand-logo.active {
    transform: translateY(-5px);
    opacity: 1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.brand-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 8px;
    object-fit: contain;
}

.brand-logo span {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

/* Search Filters */
.search-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 0 auto;
    max-width: 800px;
}

.filter-group {
    flex: 1;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    background-color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    width: 50px;
    height: 45px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.search-btn .search-icon {
    height: 18px;
    width: auto;
}

/* Vehicles Section */
.vehicles-section {
    margin-bottom: 40px;
    position: relative;
    transition: all 0.3s ease;
}

.vehicles-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

/* Animation pour la mise à jour des résultats */
@keyframes highlightResults {
    0% { background-color: transparent; }
    10% { background-color: rgba(64, 95, 242, 0.1); }
    90% { background-color: rgba(64, 95, 242, 0.1); }
    100% { background-color: transparent; }
}

.results-updated {
    animation: highlightResults 1.5s ease;
}

/* État vide - Aucun résultat */
.no-results {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 50px 40px;
    text-align: center;
    margin: 40px auto;
    max-width: 500px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.no-results p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.reset-filters-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.reset-filters-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.reset-filters-btn i {
    margin-right: 8px;
}

.model-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    position: relative;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.model-filter {
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.model-filter:hover, .model-filter.active {
    background-color: var(--primary-color);
    color: white;
}

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

.vehicle-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    min-height: 397px; /* Adjusted minimum height as requested */
    display: flex;
    flex-direction: column;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.electric-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.electric-badge i {
    margin-right: 5px;
}

.vehicle-image {
    width: 270px;
    height: 120px;
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 0;
    margin: 20px auto; /* Center the image and add some vertical margin */
}

.vehicle-info {
    padding: 15px;
    flex: 1; /* Allow this section to grow and fill available space */
    display: flex;
    flex-direction: column;
}

.vehicle-model {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}

.vehicle-price {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.price-prefix {
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    display: block;
    margin-bottom: 2px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
}

.promo-price {
    color: #e63946;
    font-weight: 700;
    font-size: 1.2rem;
}

.vehicle-features {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
}

.feature i,
.feature .feature-icon {
    height: 20px;
    width: auto;
    margin-bottom: 5px;
    color: #666;
}

.vehicle-actions {
    display: flex;
    width: 100%;
    margin-top: auto; /* Push to bottom of the flex container */
    padding-top: 15px; /* Add some space above the button */
}

.select-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid transparent;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.select-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.select-btn i {
    margin-right: 5px;
}

.select-btn.selected {
    background-color: #222;
    font-weight: 600;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid #444;
}

.select-btn.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.6s ease;
    z-index: 1;
}

.select-btn.selected:hover::before {
    left: 100%;
}

.select-btn.selected i, 
.select-btn i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.select-btn.selected:hover i {
    transform: scale(1.2);
}

/* Style du bouton de sélection supprimé car non utilisé */

/* Event Section */
.event-section {
    margin-bottom: 40px;
}

.event-promo {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.event-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.event-title span {
    font-weight: 400;
}

.event-map {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.map-container {
    width: 100%;
    height: 450px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

.city-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--white);
    border-top: 1px solid var(--light-gray);
    width: 100%;
    position: relative;
    left: 0;
    bottom: 0;
    padding: 0; /* Pas de padding sur les côtés */
    display: flex;
    justify-content: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px; /* Padding déplacé au conteneur */
}

.legal-links a {
    color: var(--text-color);
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

/* Popup de confirmation de sélection */
.selection-confirm-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.selection-confirm-popup.active {
    display: block;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.selection-confirm-content {
    padding: 15px;
}

.selection-confirm-content p {
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

.selection-confirm-content p i {
    color: var(--success-color);
    margin-right: 8px;
    font-size: 1.2rem;
}

.selection-confirm-buttons {
    display: flex;
    gap: 10px;
}

.continue-btn, .finalize-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.continue-btn {
    background-color: var(--light-gray);
    color: var(--text-color);
}

.finalize-btn {
    background-color: var(--primary-color);
    color: white;
}

.continue-btn:hover {
    background-color: #d0d3da;
}

.finalize-btn:hover {
    background-color: var(--secondary-color);
}

/* Legal Popup */
.legal-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.legal-popup.active {
    display: flex;
}

.legal-popup-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.legal-popup-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
}

.legal-popup-header h2 {
    margin: 0;
    color: var(--secondary-color);
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: var(--transition);
}

.close-popup-btn:hover {
    color: var(--primary-color);
}

.legal-popup-body {
    padding: 20px;
}

.legal-popup-body h3 {
    margin: 20px 0 10px;
    color: var(--secondary-color);
}

.legal-popup-body p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.legal-links a {
    color: var(--primary-color);
    transition: var(--transition);
}

.legal-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .brand-logos {
        flex-direction: column;
        align-items: center;
    }
    
    .search-all-btn {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .logos {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-filters {
        flex-wrap: wrap;
        overflow: visible;
    }
    
    .filter-group {
        flex-basis: calc(50% - 10px);
    }
    
    .search-btn {
        flex-basis: 100%;
        width: 100%;
        margin-top: 10px;
    }
    
    /* Ces styles sont maintenant dans la section des media queries pour mobile */
}

@media (max-width: 768px) {
    .selection-drawer {
        width: 100%;
        right: -100%;
    }
    
    /* Afficher 2 cartes de véhicule par ligne sur mobile */
    .vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    /* Ajustement des logos de marque sur deux lignes en mobile */
    .brand-logos {
        flex-direction: column;
        padding-bottom: 0;
        overflow: visible;
    }
    
    /* Cacher l'affichage desktop en mobile */
    .brand-logos > .search-all-btn,
    .brand-logos > .logos {
        display: none;
    }
    
    /* Montrer les rows en mobile */
    .brand-logos .first-row,
    .brand-logos .second-row {
        display: flex;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    
    .brand-logos .first-row {
        margin-bottom: 10px;
    }
    
    .first-row .search-all-btn {
        margin: 0;
        width: calc(33.333% - 7px);
        max-width: none;
        padding: 8px 5px;
    }
    
    .first-row .search-all-btn i {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    
    .first-row .search-all-btn span {
        font-size: 0.7rem;
    }
    
    /* Premier rang : 2 logos à droite du bouton search */
    .first-row .brand-logo,
    .second-row .brand-logo {
        flex: 0 0 calc(33.333% - 7px);
        max-width: calc(33.333% - 7px);
        /* Fixed width for mobile */
        width: calc(33.333% - 7px);
        min-width: auto;
    }
    
    .brand-logo {
        padding: 8px 5px;
        margin-bottom: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        min-height: 70px;
        justify-content: center;
    }
    
    .brand-logo img {
        height: 25px;
    }
    
    .brand-logo span {
        font-size: 0.7rem;
        text-align: center;
        width: 100%;
    }
    
    /* Ajustements des filtres de recherche - 2 par ligne */
    .search-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 15px;
    }
    
    .filter-group {
        flex: 0 0 calc(50% - 4px); /* 2 par ligne avec espace entre */
        margin-bottom: 8px;
    }
    
    /* Le bouton de recherche prend toute la largeur */
    .search-btn {
        flex: 0 0 100%;
        margin-top: 5px;
        height: 40px;
    }
    
    .filter-select {
        padding: 10px;
        font-size: 0.8rem;
        width: 100%;
    }
    
    /* Filtres de modèle horizontalement scrollables */
    .model-filters {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 15px;
        padding-left: 15px;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .model-filters::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .model-filter {
        flex: 0 0 auto;
        white-space: nowrap;
        margin-right: 8px;
    }
    
    .model-filter:last-child {
        margin-right: 15px;
    }
}

@media (max-width: 576px) {
    /* Ajustement du corps de page en tenant compte du header sticky */
    body {
        padding-top: 0;
    }
    
    /* Header en mode mobile */
    header {
        position: fixed; /* Keep consistent with desktop */
        top: 0;
        padding: 0;
        backdrop-filter: blur(6px); /* Slightly less blur for mobile */
        -webkit-backdrop-filter: blur(6px); /* For Safari */
    }
    
    header::before {
        background-color: rgba(255, 255, 255, 0.75); /* Slightly more opaque for mobile */
    }
    
    main {
        padding-top: 95px; /* Less padding for mobile screens */
    }
    
    header .container {
        flex-direction: column;
        gap: 10px;
        padding-top: 0px;
        padding-bottom: 15px;

    }
    
    .brand img.logo-image {
        max-height: 30px;
        margin: 10px 0;
    }
    
    .contact-info {
        order: 3;
        font-size: 0.8rem;
    }
    
    .selection-button {
        order: 2;
        align-self: stretch;
        margin-top: 5px;
    }
    
    .selection-button button {
        width: 100%;
        justify-content: center;
    }
    
    /* Conserver les 2 filtres par ligne */
    .vehicles-grid {
        padding: 0 10px;
    }
    
    /* Optimiser l'apparence des cartes de véhicules en mobile avec 2 par ligne */
    .vehicle-card {
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrer le contenu */
        text-align: center; /* Centrer le texte */
    }
    
    .vehicle-image {
        width: 162px;
        height: 70px;
        max-width: 100%;
        padding: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .vehicle-info {
        padding: 10px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .vehicle-model {
        font-size: 0.85rem;
        margin-bottom: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%; /* Permet au texte de remplir l'espace disponible */
    }
    
    .vehicle-price {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .price-prefix {
        font-size: 0.65rem;
    }
    
    .vehicle-features {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .feature {
        flex-basis: 45%;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .feature i,
    .feature .feature-icon {
        height: 15px;
        margin-bottom: 2px;
    }
    
    .select-btn {
        padding: 8px 5px;
        font-size: 0.8rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .vehicle-features .feature:nth-child(n+4) {
        display: none;
    }

    .mobile-selection-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 14px 18px;
        background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
        border-top: 1px solid rgba(0,0,0,0.08);
        z-index: 10000;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
        font-size: 1rem;
        color: var(--secondary-color);
        font-weight: 700;
        cursor: pointer;
        border: none;
    }

    .mobile-selection-cta span:first-child {
        flex: 1;
        text-align: left;
    }

    .mobile-count-badge {
        background-color: var(--primary-color);
        color: white;
        min-width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-size: 0.8rem;
        margin-left: 12px;
        padding: 0 10px;
    }

    .vehicle-card {
        margin-bottom: 10px;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrer le contenu */
        text-align: center; /* Centrer le texte */
    }

    .vehicle-image {
        width: 162px;
        height: 70px;
        max-width: 100%;
        padding: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .vehicle-info {
        padding: 10px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .vehicle-model {
        font-size: 0.85rem;
        margin-bottom: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%; /* Permet au texte de remplir l'espace disponible */
    }
    
    .vehicle-price {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .price-prefix {
        font-size: 0.65rem;
    }

    .vehicle-features {
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .feature {
        flex-basis: 45%;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .feature i,
    .feature .feature-icon {
        height: 15px;
        margin-bottom: 2px;
    }
    
    .select-btn {
        padding: 8px 5px;
        font-size: 0.8rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    /* Ajuster l'espacement dans le hero pour mobile */
    .hero-section {
        padding: 30px 0 40px;
        min-height: auto;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-text h2 {
        font-size: 1rem;
    }
    
    /* Ajustements du tiroir en mobile */
    .drawer-header {
        padding: 15px;
        position: sticky;
        top: 0;
        background-color: white;
        z-index: 10;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }
    
    .drawer-content {
        padding: 15px;
    }
    
    .selected-vehicle {
        flex-wrap: wrap;
        position: relative;
        padding-bottom: 35px;
    }
    
    .selected-vehicle-image {
        width: 90px;
        height: 70px;
    }
    
    .selected-vehicle-info {
        width: calc(100% - 100px);
    }
    
    .selected-vehicle-remove {
        position: absolute;
        bottom: 10px;
        right: 0;
    }
    
    .thank-you-message, 
    .no-vehicle-selected {
        padding: 20px 15px;
    }
    
    .contact-form h3 {
        font-size: 1.1rem;
    }
    
    /* Ajuster le formulaire en mobile */
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        margin-bottom: 3px;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px 10px;
    }
    
    .checkbox-group label {
        font-size: 0.75rem;
    }
    
    /* Ajustements pour la carte */
    .event-promo {
        padding: 20px 15px;
    }
    
    .event-title {
        font-size: 1.1rem;
    }
    
    .map-container {
        height: 250px;
    }
    
    /* Tel Input en mobile */
    .iti__country-list {
        white-space: normal;
    }
}

/* Ajustements pour les très petits écrans */
@media (max-width: 360px) {
    .brand-logo span {
        font-size: 0.65rem;
    }
    
    .brand-logo {
        min-height: 60px;
        padding: 5px 3px;
    }
    
    .brand-logo img {
        height: 20px;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-text h2 {
        font-size: 0.9rem;
    }
    
    .first-row, .second-row {
        gap: 5px;
    }
    
    .first-row .search-all-btn span {
        font-size: 0.65rem;
    }
    
    .first-row .search-all-btn i {
        font-size: 0.9rem;
    }
    
    /* Ajustements spécifiques pour les cartes de véhicules sur très petit écran */
    .vehicle-image {
        width: 140px;
        height: 60px;
        max-width: 100%;
    }
    
    .vehicle-model {
        font-size: 0.75rem;
    }
    
    .vehicle-price {
        font-size: 0.8rem;
    }
    
    .vehicle-features {
        display: none; /* Masquer les caractéristiques pour gagner de l'espace */
    }
    
    .select-btn {
        margin-top: 5px;
    }
}

.gm-style-iw-chr{
    display: none;

}