/* 
 * 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 standard sur mobile/tablette */
    footer,
    .site-footer,
    .site-footer-wrap,
    .footer-wrap,
    .footer-adv,
    .elementor-location-footer,
    #colophon,
    #footer {
        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: 100%;
        bottom: 0 !important;
        z-index: 9999 !important; /* Pour passer au dessus de tout */
        padding: 0 max(10px, env(safe-area-inset-left, 0px))
            calc(8px + env(safe-area-inset-bottom, 0px))
            max(10px, env(safe-area-inset-right, 0px));
        background: transparent;
        overflow: visible;
        transform: translateZ(0); /* Bugfix iOS Safari */
        -webkit-transform: translateZ(0);
    }

    .pataka-mobile-bottom-nav::before {
        content: none;
    }

    .pataka-mobile-bottom-nav-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 88px minmax(0, 1.3fr) minmax(0, 1fr);
        align-items: end;
        width: min(100%, 760px);
        min-height: 78px;
        margin: 0 auto;
        padding: 0 8px;
        position: relative;
        z-index: 1;
        background: #ffffff;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    }

    .pataka-mobile-bottom-link {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        padding: 12px 4px 10px;
        color: #9aa8bc;
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        line-height: 1.08;
        text-align: center;
        position: relative;
        transition: color 0.3s ease;
    }

    .pataka-mobile-bottom-link.is-active,
    .pataka-mobile-bottom-link:active {
        color: #13af33;
    }

    .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 {
        display: block;
        max-width: 100%;
        line-height: 1.08;
        white-space: normal;
        text-wrap: balance;
    }

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

    /* Le bouton qui dépasse */
    .pataka-mobile-bottom-center-btn {
        position: absolute;
        top: -24px;
        width: 72px;
        height: 72px;
        background: #13af33;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 6px solid #ffffff;
        box-sizing: border-box;
        text-decoration: none;
        z-index: 3;
        transform: scale(1);
        box-shadow: 0 12px 24px rgba(19, 175, 51, 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(19, 175, 51, 0.4);
        transform: scale(1.04);
        filter: saturate(1.04);
    }

    .pataka-mobile-bottom-center-label {
        position: absolute;
        left: 50%;
        bottom: 8px;
        transform: translateX(-50%);
        color: #7f8b9b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        pointer-events: none;
    }

    .pataka-mobile-bottom-center-wrapper.is-active .pataka-mobile-bottom-center-label {
        color: #13af33;
    }

    @media (min-width: 768px) and (max-width: 1024px) {
        .pataka-mobile-bottom-nav {
            padding: 0;
        }

        .pataka-mobile-bottom-nav-inner {
            width: 100%;
            max-width: none;
            min-height: 88px;
            padding: 0 18px;
            border-radius: 0;
        }

        .pataka-mobile-bottom-link {
            font-size: 11px;
            padding: 14px 6px 12px;
        }

        .pataka-mobile-bottom-center-wrapper {
            width: 94px;
        }

        .pataka-mobile-bottom-center-btn {
            top: -26px;
            width: 76px;
            height: 76px;
        }
    }

    @media (max-width: 420px) {
        .pataka-mobile-bottom-nav-inner {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 80px minmax(0, 1.15fr) minmax(0, 1fr);
            min-height: 74px;
            padding: 0 4px;
        }

        .pataka-mobile-bottom-link {
            font-size: 9px;
            gap: 4px;
            padding-left: 2px;
            padding-right: 2px;
        }

        .pataka-mobile-bottom-link svg {
            width: 17px;
            height: 17px;
        }

        .pataka-mobile-bottom-center-wrapper {
            width: 80px;
        }

        .pataka-mobile-bottom-center-btn {
            top: -22px;
            width: 68px;
            height: 68px;
        }

        .pataka-mobile-bottom-center-btn svg {
            width: 24px;
            height: 24px;
        }
    }
}

/* ==========================================================================
   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;
    }
}
