/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.3.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ===========================================
   WooCommerce Message - Style Bleu & Jaune
   =========================================== */

.woocommerce-notices-wrapper {
    position: fixed !important;
    top: 100px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 9999 !important;
    max-width: 500px !important;
    width: calc(100% - 40px) !important;
}

.woocommerce-message {
    background: #f8fafc !important;
    border: none !important;
    border-left: 4px solid #2B4678 !important;
    border-radius: 8px !important;
    padding: 50px 24px 20px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    animation: wooSlideIn 0.3s ease-out !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    color: #242526 !important;
    position: relative !important;
}

.woocommerce-message::before {
    content: '✓' !important;
    min-width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #2B4678 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    position: absolute !important;
    top: 12px !important;
    left: 24px !important;
    transform: none !important;
}

.woocommerce-message .button.wc-forward {
    display: flex !important;
    height: 44px !important;
    padding: 2px 8px 2px 20px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    border-radius: 30px !important;
    background: #F7CA39 !important;
    border: 1px solid #D4A82E !important;
    color: #2B4678 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.woocommerce-message .button.wc-forward:hover {
    background: #ffffff !important;
    border-color: #F7CA39 !important;
    color: #2B4678 !important;
}

.woocommerce-message .button.wc-forward::after {
    content: '' !important;
    display: inline-block !important;
    width: 30px !important;
    height: 30px !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 27 12' fill='none'%3E%3Cpath d='M26.1451 4.96139L21.2852 0.248768C20.7374 -0.282901 19.8002 0.0942382 19.8002 0.845275V4.47727L1.10001 4.47727C0.491705 4.47727 0 4.96139 0 5.5579C0 6.1544 0.491705 6.63852 1.10001 6.63852L19.8002 6.63852V10.2705C19.8002 11.0216 20.7374 11.3987 21.2852 10.867L26.1451 6.1544C26.485 5.82481 26.485 5.29098 26.1451 4.96139Z' fill='%232B4678'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: all 0.3s ease !important;
}

.woocommerce-message .button.wc-forward:hover::after {
    background-color: #F7CA39 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 27 12' fill='none'%3E%3Cpath d='M26.1451 4.96139L21.2852 0.248768C20.7374 -0.282901 19.8002 0.0942382 19.8002 0.845275V4.47727L1.10001 4.47727C0.491705 4.47727 0 4.96139 0 5.5579C0 6.1544 0.491705 6.63852 1.10001 6.63852L19.8002 6.63852V10.2705C19.8002 11.0216 20.7374 11.3987 21.2852 10.867L26.1451 6.1544C26.485 5.82481 26.485 5.29098 26.1451 4.96139Z' fill='%232B4678'/%3E%3C/svg%3E") !important;
}

@keyframes wooSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive Tablet */
@media (max-width: 768px) {
    .woocommerce-notices-wrapper {
        top: 80px !important;
        right: 15px !important;
        max-width: 400px !important;
    }
}

/* Responsive Mobile */
@media (max-width: 480px) {
    .woocommerce-notices-wrapper {
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        width: auto !important;
    }
    
    .woocommerce-message {
        padding: 50px 16px 16px 16px !important;
        font-size: 14px !important;
        gap: 12px !important;
    }
    
    .woocommerce-message::before {
        left: 16px !important;
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 14px !important;
    }
    
    .woocommerce-message .button.wc-forward {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ===== FIX SCROLL HORIZONTAL MOBILE UNIQUEMENT ===== */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Mini-cart WooCommerce */
    .elementor-menu-cart__container {
        max-width: 100vw !important;
        right: 0 !important;
        left: auto !important;
    }

    /* Sliders Swiper */
    .swiper,
    .swiper-wrapper,
    .swiper-slide {
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    /* JetEngine Listing Grid */
    .jet-listing-grid,
    .jet-listing-grid__items,
    .jet-listing-grid__item {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Footer icon list */
    .elementor-icon-list-items.elementor-inline-items {
        flex-wrap: wrap !important;
        max-width: 100% !important;
    }

    /* Menu mobile Trafic */
    .trafic-mobile-menu,
    .trafic-mobile-menu__content,
    .trafic-subcategory-view,
    .trafic-subcategory-view__content,
    .trafic-menu-overlay {
        max-width: 100vw !important;
        width: 100% !important;
    }

    /* Search modal */
    .tps-modal,
    .tps-overlay {
        max-width: 100vw !important;
    }
}

/* === Fix scroll horizontal desktop === */

/* 1. Mini-cart WooCommerce - le plus gros fautif (1733px) */
.elementor-menu-cart__container {
    max-width: 100vw;
}

/* 2. Swiper produits phares - déborde à cause du container-max-width 1440px */
.elementor-element-bbfb13f,
.elementor-element-a17a98e {
    overflow: hidden;
}

/* 3. JetEngine listing grid - width: calc(100% + 24px) avec marges négatives */
.jet-listing-grid {
    overflow: hidden;
}

/* 4. Sécurité globale sur body (en dernier recours) */
body {
    overflow-x: clip;
}

/* === Header responsive - écrans intermédiaires (1024px - 1400px) === */
/* Classes custom trafic-* à ajouter dans Elementor (Avancé > Classes CSS) */
/* Fallback sur les anciens sélecteurs Elementor en attendant */
@media (max-width: 1400px) {
    /* Réduire le padding du header principal */
    .trafic-header-main,
    .elementor-162 .elementor-element.elementor-element-278c2de {
        --padding-left: 30px;
        --padding-right: 30px;
    }

    /* Réduire le padding du top bar */
    .trafic-topbar,
    .elementor-162 .elementor-element.elementor-element-e68dbf7 {
        --padding-left: 30px;
        --padding-right: 30px;
    }

    /* Réduire l'espacement du menu */
    .trafic-main-nav,
    .elementor-162 .elementor-element.elementor-element-c882642 {
        --n-menu-title-space-between: 6px;
        --n-menu-title-font-size: 13px;
    }

    /* Réduire la taille des boutons CTA */
    .trafic-cta-btn .elementor-button,
    .elementor-162 .elementor-element.elementor-element-c66fc28 .elementor-button,
    .elementor-162 .elementor-element.elementor-element-33e49da .elementor-button {
        font-size: 12px;
        padding: 8px 16px;
    }

    /* Réduire la taille du logo */
    .trafic-logo,
    .elementor-162 .elementor-element.elementor-element-8aa30a8 {
        --width: 180px;
    }
}

/* === Écrans plus petits (768px - 1024px) === */
@media (max-width: 1024px) {
    .trafic-header-main,
    .elementor-162 .elementor-element.elementor-element-278c2de {
        --padding-left: 20px;
        --padding-right: 20px;
    }

    .trafic-topbar,
    .elementor-162 .elementor-element.elementor-element-e68dbf7 {
        --padding-left: 20px;
        --padding-right: 20px;
    }

    .trafic-main-nav,
    .elementor-162 .elementor-element.elementor-element-c882642 {
        --n-menu-title-space-between: 4px;
        --n-menu-title-font-size: 12px;
    }

    .trafic-cta-btn .elementor-button,
    .elementor-162 .elementor-element.elementor-element-c66fc28 .elementor-button,
    .elementor-162 .elementor-element.elementor-element-33e49da .elementor-button {
        font-size: 11px;
        padding: 6px 12px;
    }

    /* Réduire les icônes */
    .trafic-header-icon .elementor-icon,
    .elementor-162 .elementor-element.elementor-element-c20d6ad .elementor-icon,
    .elementor-162 .elementor-element.elementor-element-1b2e36a .elementor-icon {
        font-size: 24px;
    }
    .trafic-header-icon .elementor-icon svg,
    .elementor-162 .elementor-element.elementor-element-c20d6ad .elementor-icon svg,
    .elementor-162 .elementor-element.elementor-element-1b2e36a .elementor-icon svg {
        height: 24px;
    }

    .trafic-logo,
    .elementor-162 .elementor-element.elementor-element-8aa30a8 {
        --width: 150px;
    }
}

/* ===========================================
   Fix cards articles blog — mobile
   =========================================== */
@media screen and (max-width: 720px) {
    .trafic-horizontal-link {
        flex-direction: column;
    }
    .trafic-horizontal-image {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 180px !important;
        border-radius: 24px 24px 0 0 !important;
    }
    .trafic-horizontal-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ===========================================
   Liens — Charte Trafic
   =========================================== */

/* Liens par défaut : bleu charte + souligné */
a {
    color: var(--e-global-color-primary, #2B4678);
    text-decoration: underline;
}
a:hover {
    color: var(--e-global-color-c0cf052, #F7CA39);
}

/* Liens sur fond bleu (top bar) : blanc */
.trafic-topbar a,
.trafic-topbar .elementor-heading-title,
.elementor-element-e68dbf7 a,
.elementor-element-e68dbf7 .elementor-heading-title {
    color: #FFFFFF;
    text-decoration: underline;
}
.trafic-topbar a:hover,
.elementor-element-e68dbf7 a:hover {
    color: var(--e-global-color-c0cf052, #F7CA39);
}

/* Footer — liens */
.elementor-location-footer a {
    text-decoration: underline;
}

/* Exceptions — pas de soulignement sur les éléments UI */
.elementor-button,
.elementor-button a,
.e-n-menu-title,
.e-n-menu-title a,
.elementor-nav-menu a,
.elementor-icon-list-text,
.elementor-icon-list-item a,
.elementor-icon a,
.elementor-image a,
.jet-listing-dynamic-link a,
.jet-woo-product-title a,
.jet-listing-dynamic-image__img-link,
.elementor-menu-cart__toggle a,
.elementor-heading-title a,
.site-logo a,
.custom-logo-link,
.elementor-widget-image a,
.trafic-mobile-menu a,
.elementor-menu-cart__container a,
nav a,
.e-n-menu a,
.breadcrumbs a {
    text-decoration: none !important;
}

/* ===========================================
   TPF — Hide filter dropdowns, keep label + results
   =========================================== */
.tpf-dropdowns,
.tpf-search-btn,
.tpf-mobile-trigger,
.tpf-active-tags,
.tpf-bottom-sheet,
.tpf-bar {
    display: none !important;
}

/* ===========================================
   Valeurs — Override couleur emoji badge
   =========================================== */
.trafic-valeur-emoji {
    background: #5A7FA6 !important;
}
