/* ============================================
   RESPONSIVE.CSS — Media Queries Mobile First
   H&H AUTO & PLUS
   ============================================ */

/* ============ TABLET (max 1024px) ============ */
@media (max-width: 1024px) {
    :root { --section-py: 60px; }

    /* Header */
    .main-nav { display: none; }
    .hamburger { display: flex; }
    .header-cta { display: none; }
    /* overlay display is JS-controlled */

    /* Hero */
    .hero { min-height: 85vh; }
    .hero h1 { font-size: 2.5rem; }

    /* Trust */
    .trust-grid { grid-template-columns: 1fr; gap: 2px; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-badge { bottom: -16px; right: 16px; }

    /* Services grid */
    .services-grid { grid-template-columns: repeat(2, 1fr); }

    /* Why us */
    .why-grid { grid-template-columns: repeat(2, 1fr); }

    /* Testimonials */
    .testimonial-card { flex: 0 0 calc(50% - 12px); width: calc(50% - 12px); }

    /* Map */
    .map-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

    /* Service hub */
    .service-block { grid-template-columns: 1fr; }
    .service-block:nth-child(even) .service-block-img { order: unset; }
    .service-block:nth-child(even) .service-block-content { order: unset; }

    /* Service detail */
    .service-detail-grid { grid-template-columns: 1fr; }
    .service-sidebar { position: static; top: auto; }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr; }

    /* Gallery */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }

    /* Accordion list */
    .accordion-content ul { grid-template-columns: 1fr; }
}

/* ============ MOBILE (max 768px) ============ */
@media (max-width: 768px) {
    :root { --section-py: 44px; }

    /* ---- Topbar — hidden on mobile ---- */
    .topbar { display: none; }

    /* ---- Header — fixed on mobile ---- */
    .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
    #page-wrapper { padding-top: 72px; }
    .header-inner { padding: 0 16px; height: 64px; }
    .logo-name { font-size: 1.15rem; }
    .logo-tag { display: none; }

    /* ---- Hero ---- */
    .hero { min-height: 100svh; padding: 56px 0 48px; }
    .hero h1 { font-size: 1.85rem; line-height: 1.15; }
    .hero-sub { font-size: 0.95rem; }
    .hero-actions { flex-direction: column; gap: 12px; }
    .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }
    .hero-scroll { display: none; }
    .hero-badge { font-size: 0.78rem; padding: 6px 12px; }
    .hero-trust { gap: 12px; flex-wrap: wrap; }

    /* ---- Trust banner ---- */
    .trust-item { padding: 18px 16px; }
    .trust-content h3 { font-size: 0.9rem; }
    .trust-content p { font-size: 0.78rem; }
    .trust-icon { width: 44px; height: 44px; }

    /* ---- About ---- */
    .about-img-placeholder { height: 240px; }
    .about-badge { display: none; }
    .about-content h2 { font-size: 1.5rem; }

    /* ---- Services grid (home) ---- */
    .services-grid { grid-template-columns: 1fr; gap: 14px; }
    .service-card { padding: 24px 20px; }

    /* ---- Accordion ---- */
    .accordion-content ul { grid-template-columns: 1fr; }
    .accordion-content.open { padding: 14px 16px; }
    .accordion-trigger { padding: 16px 18px; font-size: 0.92rem; }
    .accordion-icon { width: 24px; height: 24px; font-size: 1rem; }

    /* ---- Why ---- */
    .why-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .why-card { padding: 20px 16px; }
    .why-num { font-size: 2rem; }

    /* ---- Testimonials ---- */
    .testimonial-card { flex: 0 0 100%; width: 100%; padding: 24px 20px; }
    .slider-btn { width: 38px; height: 38px; }

    /* ---- CTA Banner ---- */
    .cta-banner { padding: 48px 0; }
    .cta-banner h2 { font-size: 1.5rem; }
    .cta-banner p { font-size: 0.92rem; }
    .cta-banner .btn-group { flex-direction: column; align-items: center; gap: 12px; }
    .cta-banner .btn { width: 100%; max-width: 340px; justify-content: center; }

    /* ---- Map (home) ---- */
    .map-embed { min-height: 260px; border-radius: var(--radius); }
    .map-embed iframe { min-height: 260px; height: 260px; }
    .map-info h2 { font-size: 1.3rem; }
    .contact-info-card { padding: 20px; }

    /* ---- Footer ---- */
    .footer-main { padding: 40px 0 28px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-col h4 { font-size: 0.78rem; margin-bottom: 14px; }
    .footer-links { gap: 8px; }
    .footer-links a { font-size: 0.88rem; }
    .footer-contact-item { margin-bottom: 12px; }
    .footer-bottom { padding: 14px 0; }
    .footer-bottom .container { flex-direction: column; text-align: center; gap: 6px; }
    .footer-copyright { font-size: 0.78rem; }
    .footer-legal { gap: 14px; justify-content: center; }
    .footer-legal a { font-size: 0.78rem; }

    /* ---- Inner hero (services, about, contact, galerie) ---- */
    .inner-hero { padding: 52px 0 32px; }
    .inner-hero h1 { font-size: 1.7rem; }
    .inner-hero p { font-size: 0.92rem; }
    .breadcrumb { font-size: 0.78rem; }

    /* ---- Section header ---- */
    .section-header { margin-bottom: 28px; }
    .section-header h2 { font-size: 1.45rem; }
    .section-header p { font-size: 0.9rem; }

    /* ======================================
       PAGE SERVICES — Hub (page-services.php)
       ====================================== */
    .services-hub { padding: 40px 0; }
    .services-hub-grid { gap: 20px; }
    .services-hub-page .service-block { padding: 22px 20px; }
    .services-hub-page .service-block-content h2 { font-size: 1.3rem; }
    .service-tags-list { gap: 6px; flex-wrap: wrap; }
    .service-tag-chip { font-size: 0.75rem; padding: 4px 10px; }
    .service-img-wrap { aspect-ratio: 3/1; }

    /* Services hub — icône au-dessus du texte sur mobile
       (inline style overridé avec !important) */
    .services-hub-page .service-block,
    .service-block[style] {
        grid-template-columns: 1fr !important;
        padding: 22px 18px !important;
        gap: 16px !important;
        align-items: start !important;
    }
    /* L'icône: reste sa taille mais centrée */
    .service-block .service-icon {
        width: 60px !important;
        height: 60px !important;
        border-radius: 12px !important;
        margin: 0 !important;
    }
    .service-block .service-icon svg {
        width: 28px !important;
        height: 28px !important;
    }
    /* Titre des services hub */
    .service-block h2[style] {
        font-size: 1.25rem !important;
        margin-bottom: 10px !important;
    }
    /* Bouton du service */
    .service-block .btn {
        width: 100%;
        justify-content: center;
    }

    /* ======================================
       PAGES SERVICES — Détail (templates)
       ====================================== */
    .service-detail { padding: 36px 0; }
    .service-detail-grid { grid-template-columns: 1fr; gap: 28px; }
    .service-detail-content h2 {
        font-size: 1.2rem;
        margin-top: 32px;
        padding-top: 28px;
    }
    .service-detail-content .intro-text { font-size: 0.95rem; margin-bottom: 24px; padding-bottom: 24px; }
    .service-detail-list { grid-template-columns: 1fr; gap: 4px; }
    .service-detail-list li { font-size: 0.88rem; padding: 6px 8px; }

    /* Sidebar sur mobile — vient APRÈS le contenu, pas sticky */
    .service-sidebar {
        position: static;
        top: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .sidebar-cta-card { padding: 24px 20px; text-align: center; }
    .sidebar-cta-card h3 { font-size: 1rem; }
    .sidebar-cta-card .btn { font-size: 0.88rem; }
    .sidebar-phone { font-size: 1.15rem; margin-bottom: 14px; }
    .sidebar-services-card { padding: 20px; }
    .sidebar-services-list a { font-size: 0.88rem; padding: 10px; }

    /* CTA inline dans service content */
    .service-detail-content .cta-banner {
        margin-top: 32px !important;
        border-radius: var(--radius-lg) !important;
        padding: 28px 20px;
    }

    /* ======================================
       PAGE CONTACT
       ====================================== */
    .contact-section { padding: 36px 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 28px; }
    .contact-form-wrap { padding: 20px; border-radius: var(--radius); }
    .contact-form-wrap h2 { font-size: 1.3rem; }
    .form-row { grid-template-columns: 1fr; }
    .form-control { padding: 11px 14px; font-size: 0.92rem; }
    .contact-info-wrap { gap: 16px; }
    .contact-info-wrap h2 { font-size: 1.3rem; margin-bottom: 14px; }
    .contact-card { padding: 20px; }
    .contact-card-item { gap: 12px; padding: 12px 0; }
    .contact-card-icon { width: 38px; height: 38px; }
    .contact-note-box { padding: 12px 14px; }

    /* Contact map */
    .contact-map-section { padding: 0 0 36px; }
    .contact-map-section h2 { font-size: 1.3rem; }
    .contact-map-embed { border-radius: var(--radius); }
    .contact-map-embed iframe { height: 260px; }

    /* ======================================
       PAGE GALERIE
       ====================================== */
    .gallery-section { padding: 36px 0; }
    .gallery-filters { gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 24px; }
    .filter-btn { padding: 7px 14px; font-size: 0.8rem; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }

    /* ======================================
       PAGE À PROPOS
       ====================================== */
    .about-grid { gap: 28px; }
    .why-card .why-num { font-size: 2.2rem; }

    /* ======================================
       BLOG (single, archive)
       ====================================== */
    .blog-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .blog-grid-recent { grid-template-columns: 1fr !important; gap: 14px !important; }
    .blog-card { border-radius: var(--radius) !important; }
    .single-post { padding: 36px 0; }
    .post-featured-img { border-radius: var(--radius); margin-bottom: 24px; }

    /* Single post — article + sidebar empilés */
    .single-post-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    .single-post-sidebar {
        position: static !important;
        top: auto !important;
    }
    /* H1 article sur mobile */
    .single-post-grid h1 { font-size: 1.5rem !important; }
    /* CTA post */
    .single-post-grid .btn-primary { width: 100%; justify-content: center; }

    /* ======================================
       FORMULAIRE CONTACT
       ====================================== */
    .form-submit .btn-submit { padding: 14px; font-size: 0.95rem; }

    /* ======================================
       FIXED CALL BUTTON
       ====================================== */
    .fixed-call { bottom: 16px; right: 14px; padding: 13px; border-radius: 50%; width: 50px; height: 50px; justify-content: center; }
    .fixed-call .label-text { display: none; }
    .fixed-call::before { border-radius: 50%; }

    /* ======================================
       ADMIN BAR
       ====================================== */
    .admin-bar .site-header { top: 46px; }
    .admin-bar #page-wrapper { padding-top: 118px; }
}

/* ============ SMALL MOBILE (max 480px) ============ */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.05rem; }
    .btn { padding: 12px 18px; font-size: 0.87rem; }
    .btn-lg { padding: 14px 22px; font-size: 0.9rem; }

    /* Hero */
    .hero h1 { font-size: 1.6rem; }
    .hero-badge { display: none; }

    /* Grids */
    .why-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-grid .gallery-item { aspect-ratio: 16/9; }

    /* Footer */
    .footer-grid { gap: 22px; }
    .footer-main { padding: 32px 0 24px; }

    /* Service detail */
    .service-detail-content h2 { font-size: 1.1rem; }
    .service-detail-list li { font-size: 0.85rem; }

    /* Accordion */
    .accordion-trigger { font-size: 0.88rem; padding: 14px 14px; }
    .accordion-content.open { padding: 12px 14px; }
    .accordion-content ul li { font-size: 0.85rem; }

    /* Sidebar */
    .sidebar-phone { font-size: 1.05rem; }
    .sidebar-cta-card { padding: 20px 16px; }

    /* Testimonial */
    .testimonial-card { padding: 20px 16px; }
    .testimonial-card blockquote { font-size: 0.9rem; }

    /* Contact */
    .contact-form-wrap { padding: 16px; }
    .contact-card { padding: 16px; }
    .contact-map-embed iframe { height: 220px; }
}

/* ============ LARGE DESKTOP (min 1400px) ============ */
@media (min-width: 1400px) {
    :root { --container: 1360px; }
    .hero h1 { font-size: 4rem; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .testimonials-track { gap: 32px; }
}

/* ============ PRINT ============ */
@media print {
    .site-header, .site-footer, .hero-scroll,
    .cta-banner, .slider-controls, .hamburger,
    .fixed-call { display: none !important; }
    body { color: #000; }
    a { color: #000; text-decoration: underline; }
    #page-wrapper { padding-top: 0; }
}
