/* 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-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 6px;
    z-index: 3;
    pointer-events: none;
}

.vehicle-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.vehicle-badge i {
    font-size: 0.75rem;
}

.badge-bestseller {
    background-color: #f59e0b;
}

.badge-custom {
    background-color: #1d4ed8;
}

/* Bannière "flag" sur le bord gauche — empilable */
.corner-ribbon {
    position: absolute;
    left: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 4;
}

.corner-ribbon span {
    display: inline-block;
    padding: 6px 18px 6px 14px;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
    /* Encoche triangulaire à droite (effet pennon) */
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
}

/* Position du 1er ruban (toujours en haut) */
.corner-ribbon {
    top: 14px;
}

/* Si un autre ruban suit, il se positionne juste en dessous */
.corner-ribbon ~ .corner-ribbon {
    top: 46px;
}

/* NEW : vert */
.corner-ribbon-new span {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

/* BEST VALUE : or premium */

.corner-ribbon-value span {
    background:
        linear-gradient(135deg,
            #b8862c 0%,
            #d4a857 28%,
            #f5d585 50%,
            #d4a857 72%,
            #a07020 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(0, 0, 0, 0.16);
    letter-spacing: 0.16em;
}

.price-on-request {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1d4ed8;
}

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

.special-offer-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    background-color: #fff7e6;
    color: #b45309;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    width: fit-content;
}

.special-offer-text i {
    color: #d97706;
}

.vehicles-legal-mention {
    margin: 24px 0 12px;
    padding: 0 16px;
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.5;
    text-align: left;
}

/* 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: 440px;
    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: 55px auto 20px auto; /* Top margin increased to leave room for badges */
}

.vehicle-image[style*="VW_CADDY"] {
    background-size: contain;
}

.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: 6px;
    min-height: 24px;
    line-height: 1.2;
}

.vehicle-finition {
    min-height: 18px;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9rem;
}

.vehicle-price {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.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: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    font-size: 0.75rem;
    min-height: 48px;
    min-width: 0;
}

.feature span {
    line-height: 1.2;
    white-space: nowrap;
}

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

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

.ft-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    background-color: #f0f4fb;
    color: #0b3c7c;
    border: 1px solid #d6e0f0;
    border-radius: var(--border-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.ft-download-btn:hover {
    background-color: #0b3c7c;
    color: #fff;
    border-color: #0b3c7c;
}

.ft-download-btn i {
    font-size: 0.9rem;
}

.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);
    text-align: center;
}

.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-popup-body p a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-popup-body .legal-section-title {
    margin: 32px 0 16px;
    padding-top: 20px;
    border-top: 2px solid #e6ecf5;
    font-size: 1.4rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.legal-link-inline {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
}

.legal-link-inline:hover {
    color: var(--secondary-color);
}

.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%;
    }
    
    /* Tablette : 2 cartes par ligne */
    .vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .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: 0 14px;
        overflow: visible;
        max-width: 100%;
    }

    /* 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: 8px;
        width: 100%;
    }

    .brand-logos .first-row {
        margin-bottom: 8px;
    }

    .first-row .search-all-btn {
        margin: 0;
        flex: 1 1 0;
        max-width: none;
        padding: 10px 6px;
    }

    .first-row .search-all-btn i {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .first-row .search-all-btn span {
        font-size: 0.72rem;
    }

    /* Logos répartis équitablement sur toute la largeur */
    .first-row .brand-logo,
    .second-row .brand-logo {
        flex: 1 1 0;
        max-width: none;
        width: auto;
        min-width: 0;
    }

    .brand-logo {
        padding: 10px 4px;
        margin-bottom: 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        min-height: 68px;
        justify-content: center;
    }

    .brand-logo img {
        height: 22px;
    }

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

    /* Filtres de recherche mobiles — 2 par ligne, plus aérés */
    .search-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 14px;
    }

    .filter-group {
        flex: 0 0 calc(50% - 4px);
        margin-bottom: 4px;
    }

    .search-btn {
        flex: 0 0 100%;
        margin-top: 4px;
        height: 44px;
        font-size: 0.9rem;
    }

    .filter-select {
        padding: 11px 12px;
        font-size: 0.88rem;
        width: 100%;
        border-radius: 8px;
    }

    /* Filtres de modèle : scrollables, avec padding latéral et style pilule */
    .model-filters {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 4px 14px 14px;
        margin: 0;
        width: 100%;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .model-filters::-webkit-scrollbar {
        display: none;
    }

    .model-filter {
        flex: 0 0 auto;
        white-space: nowrap;
        margin-right: 8px;
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .model-filter:last-child {
        margin-right: 0;
    }

    /* Section véhicules — marges latérales */
    .vehicles-section {
        padding: 0 4px;
    }

    .vehicles-section h2 {
        padding: 0 14px;
        font-size: 1.15rem;
        margin-bottom: 14px;
    }

    .vehicles-legal-mention {
        padding: 0 16px;
        font-size: 0.75rem;
    }
}

@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;
    }
    
    /* Mobile : 1 carte par ligne pour meilleure lisibilité */
    .vehicles-grid {
        grid-template-columns: 1fr;
        padding: 0 12px;
        gap: 14px;
    }

    .vehicle-card {
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        min-height: 0;
    }

    .vehicle-image {
        width: 100%;
        height: 210px;
        max-width: 100%;
        padding: 0;
        margin: 48px 0 12px;
        display: block;
        background-size: contain;
    }

    .vehicle-info {
        padding: 12px 16px 16px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }

    .vehicle-model {
        font-size: 1rem;
        margin-bottom: 2px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        width: 100%;
        min-height: 0;
    }

    .vehicle-finition {
        font-size: 0.88rem;
        margin-bottom: 10px;
        min-height: 0;
    }

    .vehicle-price {
        font-size: 1.1rem;
        margin-bottom: 12px;
        min-height: 0;
    }

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

    .promo-price {
        font-size: 1.15rem;
    }

    .original-price {
        font-size: 0.95rem;
    }

    .vehicle-features {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-bottom: 14px;
        justify-content: stretch;
        width: 100%;
    }

    .feature {
        flex-basis: auto;
        font-size: 0.72rem;
        text-align: center;
        min-height: 0;
    }

    .feature span {
        white-space: nowrap;
    }

    .feature i,
    .feature .feature-icon {
        height: 18px;
        margin-bottom: 4px;
    }

    .select-btn {
        padding: 11px 8px;
        font-size: 0.9rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }

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

    .vehicle-badges {
        top: 10px;
        left: 10px;
        right: 10px;
        gap: 5px;
    }

    .vehicle-badge {
        font-size: 0.65rem;
        height: 22px;
        padding: 0 8px;
    }

    .mobile-selection-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 14px;
        left: 14px;
        right: 14px;
        width: auto;
        padding: 14px 20px;
        background: linear-gradient(135deg, #1d4ed8 0%, #0b3c7c 100%);
        border: none;
        border-radius: 999px;
        z-index: 10000;
        box-shadow: 0 8px 24px rgba(11, 60, 124, 0.35), 0 2px 6px rgba(0,0,0,0.1);
        font-size: 1rem;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
        gap: 12px;
    }

    .mobile-selection-cta:active {
        transform: translateY(1px);
    }

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

    .mobile-selection-cta::before {
        content: "\f290";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 1.05rem;
        color: #fff;
    }

    .mobile-selection-cta[data-count="0"] {
        display: none;
    }

    /* Réserver de l'espace en bas pour le CTA flottant */
    main {
        padding-bottom: 90px;
    }

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

    /* Ajuster l'espacement dans le hero pour mobile */
    .hero-section {
        padding: 24px 16px 36px;
        min-height: auto;
    }

    .hero-text {
        padding: 0 8px;
        margin-bottom: 22px;
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }

    .hero-text h2 {
        font-size: 0.95rem;
    }

    .hero-slogan {
        max-width: 88%;
    }
    
    /* 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: 100%;
        height: 180px;
        max-width: 100%;
        background-size: contain;
    }

    .vehicle-model {
        font-size: 0.95rem;
    }

    .vehicle-price {
        font-size: 1rem;
    }

    .feature {
        font-size: 0.68rem;
    }
    
    .select-btn {
        margin-top: 5px;
    }
}

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

}