/**
 * Consolidated CSS fixes
 * Sources:
 *   - <style id="trafic-fix-filter-bar"> (filter-bar.php)
 *   - <style id="trafic-jle-single-cta"> (jle-single-cta.php)
 *   - <style id="trafic-fix-mobile-swiper"> (mobile-swiper.php)
 *   - <style id="trafic-fix-search-modal"> (search-modal.php)
 *   - <style id="trafic-form-devis-fix"> (autofill-fix.php)
 *   - <style id="trafic-megamenu-order-fix"> (megamenu-order.php)
 * Condition: all front pages (loaded globally)
 *
 * NOTE: login-form.php CSS stays conditional (is_account_page()) via separate enqueue.
 * NOTE: category-blocks.php CSS stays inline (dynamic PHP image URLs).
 */

/* === Filter bar shrink-to-fit === */
.tpf-bar {
    max-width: none !important;
    width: fit-content !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.tpf-bar .tpf-dropdowns {
    flex-grow: 0 !important;
}

/* === JLE single CTA — hide duplicates === */
.jle-custom-block ~ .jle-custom-block {
    display: none !important;
}

/* === Mobile swiper overflow fix === */
@media (max-width: 1024px) {
    .swiper-wrapper {
        overflow: visible !important;
        max-width: none !important;
    }
    .swiper-slide {
        overflow: visible !important;
        max-width: none !important;
    }
}

/* === Search modal — remove shadow + hint === */
.tps-modal {
    box-shadow: none !important;
}
.tps-shortcut-hint {
    display: none !important;
}

/* === Devis form anti-autofill Chrome === */
.elementor-element-70aedd8 input:-webkit-autofill,
.elementor-element-70aedd8 input:-webkit-autofill:hover,
.elementor-element-70aedd8 input:-webkit-autofill:focus,
.elementor-element-70aedd8 textarea:-webkit-autofill,
#cmp-quote-form input:-webkit-autofill,
#cmp-quote-form input:-webkit-autofill:hover,
#cmp-quote-form input:-webkit-autofill:focus,
#cmp-quote-form textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #f8f8f8 inset !important;
    -webkit-text-fill-color: #333 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* === Supprimer soulignement bandeau header salon === */
.elementor-element-a1e71b1 .elementor-heading-title {
    text-decoration: none !important;
}

/* === Mega menu order fix — swap fluviale/industrielle === */
@media (min-width: 768px) {
    .trafic-megamenu-category-item[data-grid="fluviale"] {
        top: 87px !important;
    }
    .trafic-megamenu-category-item[data-grid="industrie"] {
        top: 149px !important;
    }
}

