/* WAMEKA Core — App UI V1.3.9 (chargé uniquement en mobile ≤768px) */
#wameka-core-app-ui-v1,#wameka-core-app-ui-v1 *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}

/* --- Anciens éléments WPCode : masqués, jamais supprimés --- */
html body div#wameka-mobile-nav,
html body .wameka-mobile-nav,
html body #wameka-bottom-nav,
html body .wameka-bottom-nav,
html body #wameka-n29-drawer,
html body #wameka-mobile-drawer,
html body header#header{display:none!important}

/* L'ancien entête n'est pas masqué en display:none : il sert d'hôte invisible au panneau de notifications (#wameka-n24-*) */
html body #wameka-mobile-header{position:fixed!important;top:0!important;left:0!important;width:0!important;height:0!important;min-height:0!important;max-height:0!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;overflow:visible!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;transform:none!important;filter:none!important;pointer-events:none!important}
html body #wameka-mobile-header>*{display:none!important}
html body #wameka-mobile-header #wameka-mobile-bell-slot{display:block!important;width:0!important;height:0!important;min-height:0!important;overflow:visible!important}
html body #wameka-mobile-header #wameka-n24-bell{display:none!important}

html body{padding-top:calc(60px + env(safe-area-inset-top,0px));padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}

/* --- Badges (vide = masqué) --- */
.wameka-core-badge{position:absolute;top:-4px;right:-7px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#ff3b30;color:#fff;font:700 10px/13px system-ui,-apple-system,sans-serif;text-align:center;border:1.5px solid #fff;pointer-events:none;display:block}
.wameka-core-badge:empty{display:none!important}

/* --- Entête (sans flou : plus fluide sur Android d'entrée de gamme) --- */
#wameka-core-mobile-header{position:fixed;top:0;left:0;right:0;z-index:999990;height:calc(60px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 12px 0;display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.97);border-bottom:1px solid rgba(0,0,0,.06)}
#wameka-core-menu,#wameka-core-bell{position:relative;appearance:none;-webkit-appearance:none;border:0;background:transparent;padding:0;margin:0;width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;color:#171717;cursor:pointer;touch-action:manipulation;transition:transform .15s,background-color .2s}
#wameka-core-menu:active,#wameka-core-bell:active{transform:scale(.9);background:rgba(0,0,0,.06)}
#wameka-core-menu{flex-direction:column;gap:5px}
#wameka-core-menu span{width:21px;height:2px;background:currentColor;border-radius:2px}
#wameka-core-bell svg{width:23px;height:23px}
#wameka-core-bell .wameka-core-badge{top:5px;right:4px}
#wameka-core-logo{height:44px;display:flex;align-items:center}
#wameka-core-logo img{width:112px;height:auto;max-height:40px;object-fit:contain}

/* --- Overlay + drawer --- */
#wameka-core-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999995;background:rgba(10,10,10,.42);opacity:0;visibility:hidden;transition:opacity .22s ease,visibility 0s .22s}
#wameka-core-overlay.is-open{opacity:1;visibility:visible;transition:opacity .22s ease}
#wameka-core-drawer{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased;position:fixed;top:0;bottom:0;left:0;width:min(86vw,350px);z-index:999996;background:#fff;color:#171717;transform:translate3d(-105%,0,0);visibility:hidden;transition:transform .26s cubic-bezier(.22,.8,.3,1),visibility 0s .26s;overflow:hidden;box-shadow:10px 0 35px rgba(0,0,0,.16)}
#wameka-core-drawer.is-open{transform:translate3d(0,0,0);visibility:visible;transition:transform .26s cubic-bezier(.22,.8,.3,1)}
#wameka-core-drawer-scroll{height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))}
.wameka-core-drawer-head{height:64px;padding:0 15px;display:flex;align-items:center;gap:10px;border-bottom:1px solid rgba(0,0,0,.07);position:sticky;top:0;background:#fff;z-index:2}
.wameka-core-drawer-head img{width:38px;height:38px;border-radius:11px;object-fit:cover}
.wameka-core-drawer-head strong{flex:1;font-size:17px}
.wameka-core-drawer-head button{width:40px;height:40px;border:0;background:transparent;display:grid;place-items:center;border-radius:12px;color:inherit}
.wameka-core-drawer-head button:active{background:rgba(0,0,0,.06)}
.wameka-core-drawer-head button svg{width:21px;height:21px}

/* --- Recherche --- */
.wameka-core-search{padding:13px 14px 6px}
.wameka-core-search form{display:flex;align-items:center;gap:7px;height:42px;padding:0 5px 0 12px;border:1px solid rgba(0,0,0,.09);border-radius:14px;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.05);margin:0}
.wameka-core-search input[type=search]{flex:1;min-width:0;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;height:38px!important;padding:0!important;font-size:16px!important;-webkit-appearance:none;appearance:none}
.wameka-core-search button{flex:0 0 34px!important;width:34px!important;height:34px!important;min-width:34px!important;border:0!important;border-radius:10px!important;background:#ff7a00!important;color:#fff!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:0!important;appearance:none!important}
.wameka-core-search button svg{width:18px!important;height:18px!important;display:block!important}
.wameka-core-live{margin-top:8px;border:1px solid rgba(0,0,0,.08);border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.08);overflow:hidden}
.wameka-core-live[hidden]{display:none}
.wameka-core-live a{display:flex;align-items:center;gap:10px;padding:9px 12px;text-decoration:none!important;color:#222!important;font-size:13px;line-height:17px;border-bottom:1px solid rgba(0,0,0,.05)}
.wameka-core-live a:active{background:#f7f7f7}
.wameka-core-live a:last-child{border-bottom:0}
.wameka-core-live img{width:42px;height:42px;border-radius:10px;object-fit:cover;background:#f5f5f5;flex:0 0 42px}
.wameka-core-live .t{flex:1;min-width:0;display:flex;flex-direction:column}
.wameka-core-live .n{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.wameka-core-live .p{color:#ff7a00;font-weight:650;font-size:12px}
.wameka-core-live .all{justify-content:center;color:#ff7a00!important;font-weight:650}
.wameka-core-live .empty{padding:14px;text-align:center;font-size:13px;color:#777}

/* --- Contenu du drawer --- */
.wameka-core-title{padding:18px 16px 9px;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#8b8b93}
.wameka-core-categories{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 13px}
.wameka-core-categories a{text-decoration:none!important;color:inherit!important;text-align:center;font-size:10.5px;line-height:13px}
.wameka-core-categories a:active{opacity:.7}
.wameka-core-categories img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:13px;margin-bottom:5px;background:#f5f5f5}

/* --- Navigation & Aide : icônes colorées, police moderne, animations (V1.3.9) --- */
.wameka-core-links,.wameka-core-support{display:flex;flex-direction:column;padding:0 13px;gap:8px}
.wameka-core-links a,.wameka-core-support a{--c:#ff7a00;--b:#fff1e3;position:relative;display:flex;align-items:center;gap:12px;min-height:52px;padding:0 14px 0 8px;border-radius:16px;background:#f8f8fa;border:1px solid rgba(0,0,0,.04);text-decoration:none!important;color:#1d1d22!important;font-size:14.5px;font-weight:600;letter-spacing:-.01em;overflow:hidden;touch-action:manipulation;transition:transform .16s ease,background-color .2s,box-shadow .2s}
.wameka-core-links a>i,.wameka-core-support a>i{flex:0 0 38px;width:38px;height:38px;border-radius:12px;background:var(--b);color:var(--c);display:grid;place-items:center;font-style:normal;transition:transform .25s cubic-bezier(.34,1.56,.64,1),background-color .2s,color .2s}
.wameka-core-links a svg,.wameka-core-support a svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.wameka-core-links a>span,.wameka-core-support a>span{flex:1;min-width:0}
/* chevron (CSS pur, 0 octet de HTML) */
.wameka-core-links a::after,.wameka-core-support a::after{content:"";flex:0 0 7px;width:7px;height:7px;border-right:2px solid #b4b4bc;border-top:2px solid #b4b4bc;transform:rotate(45deg);transition:transform .2s,border-color .2s}
.wameka-core-links a:active,.wameka-core-support a:active{transform:scale(.97);background:var(--b);box-shadow:0 2px 10px rgba(0,0,0,.06)}
.wameka-core-links a:active>i,.wameka-core-support a:active>i{transform:scale(1.14) rotate(-6deg);background:var(--c);color:#fff}
.wameka-core-links a:active::after,.wameka-core-support a:active::after{transform:translateX(3px) rotate(45deg);border-color:var(--c)}
.wk-home{--c:#ff7a00;--b:#fff1e3}.wk-fresh{--c:#4d7c0f;--b:#ecf8d9}.wk-market{--c:#2563eb;--b:#e8f0fe}.wk-stories{--c:#db2777;--b:#fde8f2}
.wk-seller{--c:#059669;--b:#e1f5ec}.wk-account{--c:#7c3aed;--b:#efe8fd}.wk-help{--c:#0891b2;--b:#dff3f8}.wk-contact{--c:#ea580c;--b:#fdebe0}

/* Entrée en cascade à l'ouverture du drawer (transform/opacity uniquement : GPU, fluide) */
@keyframes wkIn{from{opacity:0;transform:translate3d(-14px,0,0)}to{opacity:1;transform:none}}
#wameka-core-drawer.is-open .wameka-core-links a,#wameka-core-drawer.is-open .wameka-core-support a{animation:wkIn .38s cubic-bezier(.22,.8,.3,1) both}
#wameka-core-drawer.is-open .wameka-core-links a:nth-child(1){animation-delay:.10s}
#wameka-core-drawer.is-open .wameka-core-links a:nth-child(2){animation-delay:.14s}
#wameka-core-drawer.is-open .wameka-core-links a:nth-child(3){animation-delay:.18s}
#wameka-core-drawer.is-open .wameka-core-links a:nth-child(4){animation-delay:.22s}
#wameka-core-drawer.is-open .wameka-core-links a:nth-child(5){animation-delay:.26s}
#wameka-core-drawer.is-open .wameka-core-support a:nth-child(1){animation-delay:.30s}
#wameka-core-drawer.is-open .wameka-core-support a:nth-child(2){animation-delay:.34s}

/* Chargement type « Ajax » au clic : loader sur la ligne + barre de progression en haut */
@keyframes wkSpin{to{transform:rotate(360deg)}}
@keyframes wkBar{0%{transform:scaleX(0)}60%{transform:scaleX(.7)}100%{transform:scaleX(.92)}}
.wameka-core-links a.is-loading,.wameka-core-support a.is-loading{background:var(--b);pointer-events:none}
.wameka-core-links a.is-loading>i,.wameka-core-support a.is-loading>i{background:var(--c);color:#fff}
.wameka-core-links a.is-loading::after,.wameka-core-support a.is-loading::after{width:16px;height:16px;flex-basis:16px;border:2px solid rgba(0,0,0,.1);border-top-color:var(--c);border-radius:50%;transform:none;animation:wkSpin .6s linear infinite}
#wameka-core-mobile-header::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:linear-gradient(90deg,#ff7a00,#ffb066);transform:scaleX(0);transform-origin:left;opacity:0;pointer-events:none}
#wameka-core-app-ui-v1.is-nav-loading #wameka-core-mobile-header::after{opacity:1;animation:wkBar 1.4s cubic-bezier(.2,.8,.2,1) forwards}

/* --- Barre du bas (sans flou, une seule ombre : léger à animer) --- */
#wameka-core-bottom-nav{position:fixed;left:0;right:0;margin:0 auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));width:calc(100% - 20px);max-width:520px;height:68px;padding:4px;display:flex;align-items:stretch;justify-content:space-between;gap:2px;border-radius:28px;border:1px solid rgba(0,0,0,.06);background:rgba(255,255,255,.97);box-shadow:0 8px 24px rgba(0,0,0,.14);z-index:999980;transition:transform .3s cubic-bezier(.22,.8,.3,1),opacity .22s ease;will-change:transform}
#wameka-core-bottom-nav.is-hidden,
#wameka-core-bottom-nav.is-kb,
#wameka-core-app-ui-v1.is-drawer #wameka-core-bottom-nav{transform:translate3d(0,calc(100% + 30px + env(safe-area-inset-bottom,0px)),0);opacity:0;pointer-events:none}
.wameka-core-nav-item{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 0;border-radius:22px;color:#4a4a4a!important;text-decoration:none!important;font-size:clamp(8.5px,2.45vw,10.5px);line-height:12px;white-space:nowrap;touch-action:manipulation;transition:transform .16s ease,background-color .2s,color .2s;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.wameka-core-nav-item:active{transform:scale(.9);background:rgba(255,122,0,.10)}
.wameka-core-nav-item.is-active{color:#ff7a00!important;font-weight:650;background:rgba(255,122,0,.10)}
.wameka-core-icon{position:relative;width:28px;height:28px;display:grid;place-items:center;transition:transform .2s ease}
.wameka-core-nav-item.is-active .wameka-core-icon{transform:translateY(-1px) scale(1.06)}
.wameka-core-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.wameka-core-icon img{width:26px;height:26px;border-radius:8px;object-fit:cover;display:block;box-shadow:0 0 0 2px transparent;transition:box-shadow .2s}
.wameka-core-nav-item.is-active .wameka-core-icon img{box-shadow:0 0 0 2px #ff7a00}

/* --- Verrouillage du scroll quand le drawer est ouvert (sans position:fixed : pas de saut ni de re-layout) --- */
html.wameka-core-lock,html.wameka-core-lock body{overflow:hidden!important}

@media(prefers-reduced-motion:reduce){
#wameka-core-app-ui-v1 *{transition-duration:.01ms!important}
}

/* Tuile « Fresh agricole » (catégories) */
.wameka-core-categories .wk-fresh-tile{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:1;border-radius:13px;margin-bottom:5px;background:linear-gradient(135deg,#ecf8d9,#bbf7a0);font-style:normal}
.wameka-core-categories .wk-fresh-tile svg{width:44%;height:44%;fill:none;stroke:#3f6212;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
