/* 
 * CSS spécifique pour la version mobile (Web App)
 * Ce fichier permet d'alléger le CSS principal et de gérer uniquement l'affichage sur smartphone.
 */

/* ==========================================================================
   AFFICHAGE MOBILE ET TABLETTE UNIQUEMENT (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .menupataka {
        margin-top: -4em !important;
    }
    
    
    /* Marge en bas pour ne pas cacher les produits sous la barre de navigation */
    .pataka-menu-wrapper {
        margin-top: 0 !important;
        padding-bottom: 140px !important;
    }

    /* Suppression du footer et du header standard sur mobile/tablette */
    footer,
    .site-footer,
    .site-footer-wrap,
    .footer-wrap,
    .footer-adv,
    .elementor-location-footer,
    #colophon,
    #footer,
    header,
    [role="banner"],
    .main-header,
    .main-header-bar,
    .top-bar,
    .navbar,
    .site-header,
    .site-header-wrap,
    .site-header-focus-item,
    #masthead,
    .main-navigation,
    #site-navigation,
    .ast-primary-header-bar,
    .ast-primary-header,
    .ast-above-header-wrap,
    .ast-above-header,
    .ast-below-header-wrap,
    .ast-below-header,
    .ast-main-header-wrap,
    .ast-mobile-header-wrap,
    .ast-mobile-header-bar,
    .ast-mobile-header-content,
    #ast-desktop-header,
    #ast-mobile-header,
    .ast-mobile-menu-buttons,
    .ast-mobile-menu-trigger,
    .ast-button-wrap,
    .ast-builder-menu,
    .ast-builder-layout-element,
    .ast-builder-grid-row,
    .ast-builder-grid-row-container,
    .elementor-location-header {
        display: none !important;
    }

    /* Masquer les selecteurs de langue sur mobile/tablette */
    .trp-language-switcher,
    .trp-language-switcher-container,
    .wpml-ls,
    .wpml-ls-legacy-dropdown,
    .wpml-ls-legacy-list-horizontal,
    .polylang_langswitcher,
    .pll-parent-menu-item,
    .gtranslate_wrapper,
    .gt_float_switcher,
    .goog-te-gadget,
    .goog-te-banner-frame,
    .weglot-container,
    .weglot_switcher,
    .language-switcher,
    .lang-switcher,
    .lang_selector,
    .language-selector,
    #top-to-bottom {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Sur mobile/tablette, seule la bottom navigation doit rester visible */
    .pataka-mobile-floating-cart,
    .pataka-floating-cart {
        display: none !important;
    }

    /* Reafficher l'entete personnalise du menu mobile */
    .pataka-menu-wrapper .welcome-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .pataka-mobile-cart-badge {
        min-width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.22);
        color: #fff;
        font-size: 0.8rem;
        font-weight: 900;
        padding: 0 6px;
    }

    /* Barre de navigation bas de page (Bottom Nav) */
    .pataka-mobile-bottom-nav {
        position: fixed !important;
        left: 0;
        right: 0;
        width: 100vw;
        bottom: 0 !important;
        z-index: 9999 !important; /* Pour passer au dessus de tout */
        background: #ffffff;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
        overflow: visible;
        transform: translateZ(0); /* Bugfix iOS Safari */
        -webkit-transform: translateZ(0);
    }

    .pataka-mobile-bottom-nav::before {
        content: '';
        position: absolute;
        left: 50%;
        top: -22px;
        width: 164px;
        height: 54px;
        transform: translateX(-50%);
        background: #ffffff;
        border-radius: 80px 80px 0 0;
        z-index: 0;
    }

    .pataka-mobile-bottom-nav-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 14px env(safe-area-inset-bottom, 0px);
        height: 60px;
        position: relative;
        z-index: 1;
    }

    .pataka-mobile-bottom-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: #9aa8bc;
        text-decoration: none;
        font-size: 0.62rem;
        font-weight: 500;
        position: relative;
        transition: color 0.3s ease;
    }

    .pataka-mobile-bottom-link.is-active,
    .pataka-mobile-bottom-link:active {
        color: #7fbf4d;
    }

    .pataka-mobile-bottom-link.is-active::after {
        content: none !important;
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
    }

    .pataka-mobile-bottom-link svg {
        width: 18px;
        height: 18px;
        fill: currentColor; /* Les nouvelles icônes sont des chemins remplis */
    }

    .pataka-mobile-bottom-link span {
        line-height: 1;
        white-space: nowrap;
    }

    /* Le conteneur du bouton central */
    .pataka-mobile-bottom-center-wrapper {
        position: relative;
        width: 92px;
        height: 100%;
        display: flex;
        justify-content: center;
        z-index: 2;
    }

    /* Le bouton qui dépasse */
    .pataka-mobile-bottom-center-btn {
        position: absolute;
        top: -28px;
        width: 66px;
        height: 66px;
        background: linear-gradient(135deg, #7fbf4d, #629c37);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 5px solid #ffffff;
        box-sizing: border-box;
        text-decoration: none;
        z-index: 3;
        transform: scale(1);
        box-shadow: 0 12px 24px rgba(127, 191, 77, 0.3);
        transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    }

    .pataka-mobile-bottom-center-btn svg {
        width: 26px;
        height: 26px;
        fill: #ffffff; /* L'icône menu est aussi remplie */
    }

    .pataka-mobile-bottom-center-btn.is-active {
        box-shadow: 0 14px 28px rgba(127, 191, 77, 0.4);
        transform: scale(1.04);
        filter: saturate(1.04);
    }
}

/* ==========================================================================
   MASQUER LES ELEMENTS MOBILES SUR ORDINATEUR (> 1024px)
   ========================================================================== */
@media (min-width: 1025px) {
    .menupataka {
        margin-top: -5em !important;
    }

    .pataka-mobile-floating-cart,
    .pataka-mobile-bottom-nav {
        display: none !important;
    }

    .site-branding,
    .ast-site-identity,
    .site-header .site-branding,
    .logo-brand {
        display: inline-flex !important;
        align-items: center !important;
        gap: 18px !important;
        background: #ffffff !important;
        padding: 14px 24px !important;
        min-height: 96px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .custom-logo-link img,
    .site-branding img,
    .ast-site-identity img,
    .custom-logo,
    .main-logo {
        max-height: 74px !important;
        width: auto !important;
    }

    .site-title,
    .site-title a,
    .ast-site-identity .site-title,
    .ast-site-identity .site-title a,
    .brand-name {
        margin: 0 !important;
        color: #000000 !important;
        font-size: 1.5rem !important;
        line-height: 1.05 !important;
        font-weight: 700 !important;
        letter-spacing: 0.06em !important;
    }

    .site-description,
    .ast-site-identity .site-description,
    .slogan {
        margin-top: 6px !important;
        color: #ff6f61 !important;
        font-size: 0.70rem !important;
        line-height: 1.25 !important;
        letter-spacing: 0.08em !important;
        text-transform: uppercase !important;
    }

    .brand-text,
    .slogan-box {
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;
    }
}
