/* ==================== MOBILE OPTIMISÉ - VERSION FINALE ==================== */
/* Un seul fichier pour gérer tout le mobile proprement */

/* ==================== RÈGLES GLOBALES ==================== */
@media (max-width: 768px) {
    
    /* Empêcher débordement horizontal */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100%;
    }
    
    * {
        box-sizing: border-box;
    }
    
    /* Images toujours contenues */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Désactiver zoom sur inputs */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Touch optimization */
    button, a, .filter-pill, .vehicle-card {
        -webkit-tap-highlight-color: rgba(197, 160, 89, 0.2);
    }
    
    /* ==================== HEADER ==================== */
    .header {
        padding: 12px 16px !important;
        background: transparent !important;
        backdrop-filter: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        transition: background 0.3s ease, backdrop-filter 0.3s ease !important;
    }
    
    .header.scrolled {
        background: rgba(0, 0, 0, 0.85) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .logo {
        width: 100px !important;
        height: auto !important;
    }
    
    .header-scrolled .logo,
    .header.scrolled .logo {
        width: 80px !important;
    }
    
    .nav-menu {
        display: none; /* Menu burger à implémenter si besoin */
    }
    
    /* ==================== HERO ==================== */
    .hero {
        min-height: 100vh !important;
        height: 100vh !important;
        padding: 0 !important;
        display: flex !important;
        align-items: stretch !important;
        justify-content: space-between !important;
        position: relative !important;
    }
    
    .hero-content {
        padding: 0 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 100% !important;
        height: 100% !important;
        padding-top: 120px !important;
        padding-bottom: 120px !important;
    }
    
    .hero-text-top {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .hero-eyebrow {
        font-size: 0.5rem !important;
        letter-spacing: 2px !important;
        margin-bottom: 0.3rem !important;
    }
    
    .hero-title {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.4rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-ctas {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }
    
    .hero-cta {
        width: 100% !important;
        max-width: 280px !important;
        padding: 0.8rem 1.6rem !important;
        font-size: 0.65rem !important;
    }
    
    .hero-scroll-indicator {
        display: none !important;
    }
    
    /* ==================== SECTIONS GÉNÉRALES ==================== */
    .section-title {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
    }
    
    .about-section,
    .process-section,
    .reviews-section,
    .faq-section,
    .contact-section {
        padding: 2.5rem 1rem !important;
    }
    
    /* ==================== PHILOSOPHIE ==================== */
    .philosophy-section {
        padding: 2rem 1rem !important;
    }
    
    .philosophy-text {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
    
    /* ==================== ABOUT ==================== */
    .about-quote {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
    }
    
    .about-text {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
    }
    
    .about-pillars {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .about-pillar {
        padding: 1.5rem !important;
    }
    
    .about-pillar-title {
        font-size: 0.75rem !important;
    }
    
    .about-pillar-text {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
    }
    
    /* ==================== PROCESS STEPS ==================== */
    .process-steps {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .process-connector {
        display: none !important;
    }
    
    .process-num {
        font-size: 1.8rem !important;
    }
    
    .process-step-title {
        font-size: 1rem !important;
    }
    
    .process-step-text {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
    }
    
    /* ==================== STATS ==================== */
    .stats-section {
        padding: 2rem 1rem !important;
    }
    
    .stats-container {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .stat-divider {
        display: none !important;
    }
    
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
    
    /* ==================== FILTRES ==================== */
    .filters-section {
        padding: 1rem !important;
        position: relative !important;
    }
    
    .toggle-filtres-btn {
        margin: 0.5rem auto !important;
        padding: 0.7rem 1.5rem !important;
        font-size: 0.7rem !important;
    }
    
    .filters-container {
        padding: 1rem 0.5rem !important;
    }
    
    .filter-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .filter-label-prefix {
        font-size: 0.65rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .filter-pills {
        width: 100% !important;
        gap: 0.5rem !important;
    }
    
    .filter-pill {
        font-size: 0.65rem !important;
        padding: 0.5rem 1rem !important;
        letter-spacing: 1px !important;
    }
    
    .filter-search-input {
        font-size: 0.9rem !important;
        padding: 0.7rem 2.5rem !important;
    }
    
    /* ==================== COMPTEUR VÉHICULES ==================== */
    .counter-section {
        padding: 1rem !important;
    }
    
    .counter-text {
        font-size: 0.85rem !important;
    }
    
    /* ==================== GRILLE VÉHICULES ==================== */
    .gallery-section {
        padding: 1.5rem 1rem !important;
        padding-right: 1rem !important;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 !important;
    }
    
    /* ==================== CARTES VÉHICULES ==================== */
    .vehicle-card {
        border-radius: 12px !important;
        margin-bottom: 0 !important;
    }
    
    .vehicle-image-container {
        height: auto !important;
        aspect-ratio: 16 / 10 !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .vehicle-image,
    .slide-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .vehicle-info {
        padding: 1rem !important;
    }
    
    .vehicle-title {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .vehicle-pills {
        gap: 0.4rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .vehicle-pill {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.7rem !important;
        letter-spacing: 0.5px !important;
    }
    
    .vehicle-price-row {
        margin-top: 0.75rem !important;
        padding-top: 0.75rem !important;
    }
    
    .vehicle-price {
        font-size: 1.2rem !important;
    }
    
    .vehicle-flag {
        font-size: 1.3rem !important;
    }
    
    .status-badge {
        font-size: 0.6rem !important;
        padding: 0.35rem 0.7rem !important;
        top: 10px !important;
        right: 10px !important;
    }
    
    .malus-badge {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.6rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* ==================== MODALE ==================== */
    .modal-overlay {
        padding: 0 !important;
        align-items: flex-start !important;
        overflow-y: auto !important;
    }
    
    .modal-container {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .modal-body {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        overflow: hidden !important;
    }
    
    .modal-close {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3rem !important;
        z-index: 100001 !important;
        background: rgba(0, 0, 0, 0.85) !important;
        border: 2px solid var(--accent-champagne) !important;
    }
    
    /* Photo modale */
    .modal-left {
        flex-shrink: 0 !important;
        height: 300px !important;
        min-height: 300px !important;
        border-radius: 0 !important;
        position: relative !important;
    }
    
    .modal-photo-wrap {
        height: 300px !important;
        min-height: 300px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #000 !important;
    }
    
    .modal-gallery .modal-image,
    #modalMainImage {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Thumbnails */
    .modal-thumbs {
        padding: 0.5rem !important;
        gap: 0.5rem !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .modal-thumb {
        min-width: 60px !important;
        width: 60px !important;
        height: 60px !important;
        flex-shrink: 0 !important;
    }
    
    /* Flèches */
    .modal-arrow {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.4rem !important;
    }
    
    .modal-arrow-prev {
        left: 10px !important;
    }
    
    .modal-arrow-next {
        right: 10px !important;
    }
    
    /* Infos modale */
    .modal-right {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 1.5rem 1rem 2rem 1rem !important;
    }
    
    .modal-title {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .modal-price-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .modal-price {
        font-size: 1.5rem !important;
    }
    
    .modal-cta {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 0.85rem !important;
        text-align: center !important;
    }
    
    .modal-specs-list {
        margin-top: 1.5rem !important;
        gap: 0.5rem !important;
    }
    
    .modal-specs-list li {
        font-size: 0.85rem !important;
        padding: 0.6rem 0 !important;
    }
    
    .modal-malus-badge {
        font-size: 0.75rem !important;
        padding: 0.6rem 0.8rem !important;
        margin-top: 1rem !important;
    }
    
    .modal-options {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
        margin-top: 1rem !important;
    }
    
    /* ==================== AVIS ==================== */
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .review-card {
        padding: 1.5rem !important;
    }
    
    .review-name {
        font-size: 0.9rem !important;
    }
    
    .review-date {
        font-size: 0.75rem !important;
    }
    
    .review-text {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
    }
    
    .reviews-score {
        font-size: 2.5rem !important;
    }
    
    /* ==================== FAQ ==================== */
    .faq-eyebrow {
        font-size: 0.65rem !important;
    }
    
    .faq-subtitle {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
    
    .faq-question {
        font-size: 0.9rem !important;
        padding: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .faq-answer {
        padding: 0 !important;
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease !important;
    }
    
    .faq-item.active .faq-answer {
        max-height: 800px !important;
        padding: 1rem !important;
        opacity: 1 !important;
    }
    
    .faq-icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* ==================== CONTACT / FORMULAIRE ==================== */
    .contact-content {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .contact-content::before {
        display: none !important;
    }
    
    .contact-info {
        width: 100% !important;
    }
    
    .mandate-form {
        width: 100% !important;
    }
    
    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }
    
    .form-input,
    .form-select {
        font-size: 0.9rem !important;
        padding: 0.8rem !important;
    }
    
    .mandate-btn {
        padding: 0.9rem 1.5rem !important;
        font-size: 0.8rem !important;
    }
    
    /* ==================== FOOTER ==================== */
    .footer {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
    
    .footer-logo {
        width: 120px !important;
        margin-bottom: 1rem !important;
    }
    
    .footer p {
        font-size: 0.75rem !important;
        line-height: 1.6 !important;
    }
    
    .footer-legal-link {
        font-size: 0.75rem !important;
    }
    
    /* ==================== BOUTONS FLOTTANTS ==================== */
    .back-to-top {
        width: 48px !important;
        height: 48px !important;
        bottom: 20px !important;
        left: 20px !important;
        font-size: 1.2rem !important;
    }
    
    .social-sidebar {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        right: 10px !important;
        bottom: 90px !important;
        gap: 10px !important;
        z-index: 9998 !important;
    }
    
    .social-label {
        transition: opacity 0.3s ease, transform 0.3s ease !important;
    }
    
    .social-label.hidden {
        opacity: 0 !important;
        transform: translateY(-10px) !important;
        pointer-events: none !important;
    }
    
    .social-sidebar a {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .whatsapp-widget-left {
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .whatsapp-widget-btn {
        width: 60px !important;
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .whatsapp-widget-btn img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    .whatsapp-widget-label {
        display: block !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
    }
    
    .whatsapp-rgpd-mention {
        display: none !important;
    }
    
    /* ==================== MARQUEE ==================== */
    .marquee-bandeau {
        font-size: 0.65rem !important;
        padding: 0.6rem 0 !important;
    }
    
    /* ==================== Z-INDEX MOBILE ==================== */
    .header {
        z-index: 9999 !important;
    }
    
    .modal-overlay {
        z-index: 99999 !important;
    }
    
    .modal-container {
        z-index: 100000 !important;
    }
    
    .modal-close {
        z-index: 100001 !important;
    }
    
    .filters-section {
        z-index: 100 !important;
    }
    
    .back-to-top,
    .whatsapp-widget-left {
        z-index: 9998 !important;
    }
}

/* ==================== TRÈS PETITS ÉCRANS (< 480px) ==================== */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.4rem !important;
    }
    
    .section-title {
        font-size: 1.6rem !important;
    }
    
    .modal-left,
    .modal-photo-wrap {
        height: 250px !important;
        min-height: 250px !important;
    }
    
    .vehicle-pill {
        font-size: 0.6rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    .back-to-top {
        width: 44px !important;
        height: 44px !important;
    }
}
