import{r as i,j as e}from"./vendor-react-Ci7aBfa0.js";import{b as he,f as pe,h as ge,c as H,u as be}from"./index-1nmTAddF.js";import{s as fe}from"./prerender-CvGl2zE9.js";import{b as je,S as Ne}from"./SEO-_JstgKNN.js";import{T as ve,a as I}from"./tabs-DSZ6FD6M.js";import{c as ye,L as A}from"./vendor-Dk4E_gAD.js";import{m as we,X as Z,A as Y,D as Ae,E as Ce,J as w,s as K,k as ke,W as Fe,M as Se}from"./vendor-icons-E4bjBzSn.js";import"./vendor-helmet-nH3Guqws.js";import"./vendor-ui-CESaN49K.js";import"./utils-C8w6qDsC.js";const De={auto:"Automobile",moto:"Moto",camion:"Camion & Poids lourd",machine:"Machine & Engin",animaux:"Animaux & Bétails",conteneurs:"Conteneurs",portable:"Portable"},Pe={securite:"Sécurité",surveillance:"Surveillance",connectivite:"Connectivité",confort:"Confort"};function Le({product:t,categoryLabel:d}){const u=d??t.category,h=(t.categories||[]).map(l=>l.label).filter(l=>l&&l!==u),m=typeof t.stock=="number"?t.stock:10,r=m<=0,o=m>0&&m<=(t.stockAlert??3),c=t.salePrice!=null&&Number(t.salePrice)<Number(t.price),j=c?Math.round((1-Number(t.salePrice)/Number(t.price))*100):0;return e.jsxs("div",{className:"group overflow-hidden rounded-xl border border-gray-100 bg-white shadow-sm transition-all duration-300 hover:-translate-y-1 hover:shadow-xl",children:[e.jsxs(A,{to:`/produit/${t.id}`,className:"block relative","aria-label":t.name,children:[e.jsx("div",{className:"aspect-square bg-[#F2F2F2] overflow-hidden",children:e.jsx("img",{src:t.image,alt:`${t.name} à Abidjan`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),(c||t.badge)&&e.jsx("span",{className:"absolute left-2 top-2 rounded-full bg-[#D45A00] px-2 py-0.5 text-[10px] font-bold text-white md:left-3 md:top-3 md:px-3 md:py-1 md:text-xs",children:c?`-${j}%`:t.badge}),t.installationRequired===!1&&e.jsxs("span",{className:"absolute right-2 top-2 flex items-center gap-0.5 rounded-full bg-green-500 px-2 py-0.5 text-[10px] font-bold text-white md:right-3 md:top-3 md:gap-1 md:px-3 md:py-1 md:text-xs",children:[e.jsx(w,{className:"h-3 w-3"})," ",e.jsx("span",{className:"md:hidden",children:"Sans pose"}),e.jsx("span",{className:"hidden md:inline",children:"Sans installation"})]})]}),e.jsxs("div",{className:"p-2.5 md:p-4",children:[e.jsxs("div",{className:"mb-1 flex flex-wrap items-center gap-1 md:gap-2",children:[t.brand&&e.jsx("span",{className:"text-[10px] px-2 py-0.5 bg-blue-50 text-blue-600 rounded-full font-medium",children:t.brand}),e.jsxs("span",{className:"text-[10px] px-2 py-0.5 bg-[#F2F2F2] rounded-full text-gray-500 font-medium",children:["Pour ",u]}),h.map(l=>e.jsx("span",{className:"hidden rounded-full bg-blue-50 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-blue-700 md:inline",children:l},l))]}),e.jsx(A,{to:`/produit/${t.id}`,children:e.jsx("h3",{className:"mb-1 min-h-10 line-clamp-2 text-sm font-semibold leading-5 text-[#333333] transition-colors group-hover:text-[#D45A00] md:min-h-0 md:text-base",children:t.name})}),e.jsx("p",{className:"mb-3 hidden text-xs text-gray-500 md:line-clamp-2",children:t.description}),e.jsx("div",{className:"mb-2 flex flex-col gap-0.5 md:mb-3",children:t.salePrice?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"hidden text-xs font-medium text-green-600 md:block",children:"Prix promo"}),e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:gap-2",children:[e.jsxs("p",{className:"text-base font-bold text-[#D45A00] md:text-lg",children:[t.salePrice.toLocaleString()," FCFA"]}),e.jsxs("p",{className:"text-[10px] text-gray-400 line-through md:text-sm","aria-label":"Ancien prix",children:[t.price.toLocaleString()," FCFA"]})]})]}):e.jsxs("p",{className:"text-base font-bold text-[#D45A00] md:text-lg",children:[t.price.toLocaleString()," FCFA"]})}),e.jsx("div",{className:"mb-2 md:mb-3",children:r?e.jsx("span",{className:"text-xs font-medium text-red-600",children:"Rupture de stock"}):o?e.jsxs("span",{className:"text-xs font-medium text-amber-600",children:["Stock limité (",m,")"]}):e.jsx("span",{className:"text-xs font-medium text-green-600",children:"En stock"})}),r?e.jsxs("span",{className:"flex w-full cursor-not-allowed items-center justify-center gap-1 rounded-lg bg-gray-200 py-2 text-xs font-medium text-gray-500 md:gap-2 md:py-2.5 md:text-base",children:[e.jsx(K,{className:"h-4 w-4"})," Indisponible"]}):e.jsxs(A,{to:`/produit/${t.id}`,className:"flex w-full items-center justify-center gap-1 rounded-lg bg-[#D45A00] py-2 text-xs font-semibold text-white transition-colors hover:bg-[#E55A00] md:gap-2 md:py-2.5 md:text-base",children:[e.jsx(K,{className:"h-4 w-4"})," ",e.jsx("span",{children:"Choisir ce GPS"})]})]})]})}function $e({accessory:t,categoryLabel:d}){const{addItem:u}=be(),h=d??t.category;return e.jsxs("div",{className:"group overflow-hidden rounded-xl border border-gray-100 bg-white shadow-sm transition-all duration-300 hover:-translate-y-1 hover:shadow-xl",children:[e.jsxs(A,{to:`/accessoire/${t.id}`,className:"block relative","aria-label":t.name,children:[e.jsx("div",{className:"aspect-square bg-[#F2F2F2] overflow-hidden",children:e.jsx("img",{src:t.image,alt:`${t.name} à Abidjan`,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),t.badge&&e.jsx("span",{className:"absolute top-3 left-3 px-3 py-1 bg-[#D45A00] text-white text-xs font-bold rounded-full",children:t.badge})]}),e.jsxs("div",{className:"p-2.5 md:p-4",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider px-2 py-0.5 bg-[#F2F2F2] rounded-full text-gray-500 font-medium",children:h}),e.jsx(A,{to:`/accessoire/${t.id}`,children:e.jsx("h3",{className:"mt-1 mb-1 min-h-10 line-clamp-2 text-sm font-semibold leading-5 text-[#333333] transition-colors group-hover:text-[#D45A00] md:min-h-0 md:text-base",children:t.name})}),e.jsx("p",{className:"mb-3 hidden text-xs text-gray-500 md:line-clamp-2",children:t.description}),e.jsxs("p",{className:"mb-2 text-base font-bold text-[#D45A00] md:mb-3 md:text-lg",children:[t.price.toLocaleString()," FCFA"]}),e.jsxs("button",{onClick:()=>u({productId:t.id,name:t.name,price:t.price,quantity:1,image:t.image,type:"accessory"}),className:"flex w-full items-center justify-center gap-1 rounded-lg bg-[#D45A00] py-2 text-xs font-semibold text-white transition-colors hover:bg-[#E55A00] md:gap-2 md:py-2.5 md:text-base",children:[e.jsx(ke,{className:"h-4 w-4"})," ",e.jsx("span",{className:"md:hidden",children:"Ajouter"}),e.jsx("span",{className:"hidden md:inline",children:"Ajouter au panier"})]})]})]})}function Te({service:t}){const d=t.type==="INSTALLATION"?Fe:Se;return e.jsxs("div",{className:"bg-white border border-gray-100 rounded-xl p-6 hover:shadow-lg transition-all duration-300",children:[e.jsx("div",{className:"w-14 h-14 rounded-full bg-[#D45A00]/10 flex items-center justify-center mb-4",children:e.jsx(d,{className:"w-7 h-7 text-[#D45A00]"})}),e.jsx("h3",{className:"font-semibold text-[#333333] text-lg mb-2",children:t.name}),e.jsx("p",{className:"text-gray-500 text-sm mb-4",children:t.description}),e.jsx("p",{className:"text-xs text-gray-500 -mt-2 mb-4",children:"À sélectionner avec le traceur adapté."}),e.jsx("p",{className:"text-xl font-bold text-[#D45A00] mb-4",children:t.price>0?`${t.price.toLocaleString()} FCFA${t.priceUnit?` ${t.priceUnit}`:""}`:t.priceUnit||"Sur devis"}),e.jsx(A,{to:"/boutique",className:"block w-full py-2.5 text-center border border-[#D45A00] text-[#D45A00] rounded-lg font-medium hover:bg-[#D45A00] hover:text-white transition-colors",children:"Choisir et configurer un traceur"})]})}function X({isOpen:t,onClose:d,isMobile:u,categories:h,brands:m,catFilter:r,setCatFilter:o,installFilter:c,setInstallFilter:j,brandFilter:l,setBrandFilter:p,priceRange:g,setPriceRange:C,resultCount:k}){const T=()=>{o("all"),j("all"),p("all"),C("all")},P=r!=="all"||c!=="all"||l!=="all"||g!=="all",F=e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{className:"w-5 h-5 text-[#D45A00]"}),e.jsx("h3",{className:"font-bold text-[#333333]",children:"Filtres"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[P&&e.jsx("button",{onClick:T,className:"text-sm text-[#D45A00] hover:underline",children:"Réinitialiser"}),u&&e.jsx("button",{onClick:d,className:"p-1.5 hover:bg-[#F2F2F2] rounded-lg",children:e.jsx(Z,{className:"w-5 h-5"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm text-[#333333] mb-3 uppercase tracking-wider",children:"Catégories"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:`flex items-center gap-3 p-2 rounded-lg cursor-pointer transition-colors ${r==="all"?"bg-[#D45A00]/10":"hover:bg-[#F2F2F2]"}`,children:[e.jsx("div",{className:`w-4 h-4 rounded border-2 flex items-center justify-center ${r==="all"?"bg-[#D45A00] border-[#D45A00]":"border-gray-300"}`,children:r==="all"&&e.jsx(w,{className:"w-3 h-3 text-white"})}),e.jsx("input",{type:"radio",name:"cat",className:"sr-only",checked:r==="all",onChange:()=>o("all")}),e.jsx("span",{className:"text-sm",children:"Toutes"})]}),h.map(({key:a,label:M})=>e.jsxs("label",{className:`flex items-center gap-3 p-2 rounded-lg cursor-pointer transition-colors ${r===a?"bg-[#D45A00]/10":"hover:bg-[#F2F2F2]"}`,children:[e.jsx("div",{className:`w-4 h-4 rounded border-2 flex items-center justify-center ${r===a?"bg-[#D45A00] border-[#D45A00]":"border-gray-300"}`,children:r===a&&e.jsx(w,{className:"w-3 h-3 text-white"})}),e.jsx("input",{type:"radio",name:"cat",className:"sr-only",checked:r===a,onChange:()=>o(a)}),e.jsx("span",{className:"text-sm",children:M})]},a))]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm text-[#333333] mb-3 uppercase tracking-wider",children:"Installation"}),e.jsx("div",{className:"space-y-2",children:[{key:"all",label:"Tous"},{key:"recommended",label:"Installation recommandée"},{key:"self",label:"Utilisable sans installation"}].map(a=>e.jsxs("label",{className:`flex items-center gap-3 p-2 rounded-lg cursor-pointer transition-colors ${c===a.key?"bg-[#D45A00]/10":"hover:bg-[#F2F2F2]"}`,children:[e.jsx("div",{className:`w-4 h-4 rounded border-2 flex items-center justify-center ${c===a.key?"bg-[#D45A00] border-[#D45A00]":"border-gray-300"}`,children:c===a.key&&e.jsx(w,{className:"w-3 h-3 text-white"})}),e.jsx("input",{type:"radio",name:"install",className:"sr-only",checked:c===a.key,onChange:()=>j(a.key)}),e.jsx("span",{className:"text-sm",children:a.label})]},a.key))})]}),m.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm text-[#333333] mb-3 uppercase tracking-wider",children:"Marques"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:`flex items-center gap-3 p-2 rounded-lg cursor-pointer transition-colors ${l==="all"?"bg-[#D45A00]/10":"hover:bg-[#F2F2F2]"}`,children:[e.jsx("div",{className:`w-4 h-4 rounded border-2 flex items-center justify-center ${l==="all"?"bg-[#D45A00] border-[#D45A00]":"border-gray-300"}`,children:l==="all"&&e.jsx(w,{className:"w-3 h-3 text-white"})}),e.jsx("input",{type:"radio",name:"brand",className:"sr-only",checked:l==="all",onChange:()=>p("all")}),e.jsx("span",{className:"text-sm",children:"Toutes"})]}),m.map(a=>e.jsxs("label",{className:`flex items-center gap-3 p-2 rounded-lg cursor-pointer transition-colors ${l===a?"bg-[#D45A00]/10":"hover:bg-[#F2F2F2]"}`,children:[e.jsx("div",{className:`w-4 h-4 rounded border-2 flex items-center justify-center ${l===a?"bg-[#D45A00] border-[#D45A00]":"border-gray-300"}`,children:l===a&&e.jsx(w,{className:"w-3 h-3 text-white"})}),e.jsx("input",{type:"radio",name:"brand",className:"sr-only",checked:l===a,onChange:()=>p(a)}),e.jsx("span",{className:"text-sm",children:a})]},a))]})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-sm text-[#333333] mb-3 uppercase tracking-wider",children:"Prix"}),e.jsx("div",{className:"space-y-2",children:[{key:"all",label:"Tous les prix"},{key:"0-50000",label:"Moins de 50 000 FCFA"},{key:"50000-100000",label:"50 000 - 100 000 FCFA"},{key:"100000+",label:"Plus de 100 000 FCFA"}].map(a=>e.jsxs("label",{className:`flex items-center gap-3 p-2 rounded-lg cursor-pointer transition-colors ${g===a.key?"bg-[#D45A00]/10":"hover:bg-[#F2F2F2]"}`,children:[e.jsx("div",{className:`w-4 h-4 rounded border-2 flex items-center justify-center ${g===a.key?"bg-[#D45A00] border-[#D45A00]":"border-gray-300"}`,children:g===a.key&&e.jsx(w,{className:"w-3 h-3 text-white"})}),e.jsx("input",{type:"radio",name:"price",className:"sr-only",checked:g===a.key,onChange:()=>C(a.key)}),e.jsx("span",{className:"text-sm",children:a.label})]},a.key))})]})]}),u&&e.jsx("div",{className:"p-4 border-t",children:e.jsxs("button",{onClick:d,className:"w-full py-3 bg-[#D45A00] text-white rounded-lg font-bold hover:bg-[#E55A00]",children:["Voir ",k," résultat",k>1?"s":""]})})]});return u?e.jsxs(e.Fragment,{children:[t&&e.jsx("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:d}),e.jsx("div",{className:`fixed inset-y-0 left-0 w-80 max-w-[85vw] bg-white z-50 shadow-2xl transform transition-transform duration-300 ${t?"translate-x-0":"-translate-x-full"}`,children:F})]}):e.jsx("aside",{className:"hidden lg:block w-64 shrink-0",children:e.jsx("div",{className:"sticky top-24 bg-white rounded-xl border shadow-sm overflow-hidden",children:F})})}function Ve(){const[t]=ye(),[d,u]=i.useState(()=>t.get("tab")||"traceurs"),[h,m]=i.useState(()=>t.get("category")||"all"),[r,o]=i.useState(()=>t.get("install")||"all"),[c,j]=i.useState("all"),[l,p]=i.useState("all"),[g,C]=i.useState("all"),[k,T]=i.useState("all"),[P,F]=i.useState(!1),[a,M]=i.useState([]),[_,ee]=i.useState([]),[se,te]=i.useState([]),[E,q]=i.useState(()=>t.get("search")||""),[L,ae]=i.useState("recommended"),[O,B]=i.useState(!0),[G,le]=i.useState(Object.entries(De).map(([s,n])=>({key:s,label:n}))),[z,re]=i.useState(Object.entries(Pe).map(([s,n])=>({key:s,label:n}))),R=i.useCallback(async()=>{try{B(!0);const[s,n,b,v,y]=await Promise.all([he(),pe(),ge(),H("product").catch(()=>[]),H("accessory").catch(()=>[])]);M(s),ee(n),te(b),v&&v.length>0&&le(v.map(f=>({key:f.key,label:f.label}))),y&&y.length>0&&re(y.map(f=>({key:f.key,label:f.label})))}catch(s){console.error("Erreur chargement boutique:",s)}finally{B(!1)}},[]);i.useEffect(()=>{window.scrollTo(0,0);const s=window.setTimeout(()=>{R()},0);return()=>window.clearTimeout(s)},[R]),i.useEffect(()=>{const s=window.setTimeout(()=>{m(t.get("category")||"all"),o(t.get("install")||"all"),q(t.get("search")||""),C(t.get("accessory")||"all"),u(t.get("tab")||"traceurs")},0);return()=>window.clearTimeout(s)},[t]),i.useEffect(()=>{O||fe()},[O]);const U=Object.fromEntries(G.map(s=>[s.key,s.label])),ne=Object.fromEntries(z.map(s=>[s.key,s.label])),V=Array.from(new Set(a.map(s=>s.brand).filter(s=>!!s))).sort(),x=E.toLowerCase().trim(),S=h==="all"?[]:h.split(",").filter(Boolean),J=S.map(s=>U[s]??s),ie=S.join(",")==="auto,moto"?"GPS Auto et Moto":S.join(",")==="camion,machine"?"GPS Camion et Engins":J.length>0?`GPS ${J.join(" et ")}`:"Tous les traceurs GPS",ce=d==="accessoires"?"Accessoires GPS":d==="services"?"Services GPS":ie,N=a.filter(s=>{const n=S.length===0||S.some(D=>s.category===D||s.categoryKeys?.some(ue=>ue===D)),b=r==="all"||r==="recommended"&&s.installationRequired||r==="self"&&!s.installationRequired,v=c==="all"||s.brand===c;let y=!0;const f=s.salePrice||s.price;l==="0-50000"?y=f<5e4:l==="50000-100000"?y=f>=5e4&&f<=1e5:l==="100000+"&&(y=f>1e5);const xe=!x||s.name?.toLowerCase().includes(x)||s.description?.toLowerCase().includes(x)||s.category?.toLowerCase().includes(x)||s.categories?.some(D=>D.label?.toLowerCase().includes(x)||D.key?.toLowerCase().includes(x))||s.brand?.toLowerCase().includes(x);return n&&b&&v&&y&&xe}),oe=[...N].sort((s,n)=>{const b=Number(s.salePrice||s.price)||0,v=Number(n.salePrice||n.price)||0;return L==="price-asc"?b-v:L==="price-desc"?v-b:L==="name"?String(s.name).localeCompare(String(n.name),"fr"):+!!(n.featured||n.bestseller)-+!!(s.featured||s.bestseller)}),Q=_.filter(s=>{const n=g==="all"||s.category===g,b=!x||s.name?.toLowerCase().includes(x)||s.description?.toLowerCase().includes(x);return n&&b}),W=se.filter(s=>{const n=k==="all"||(k==="installation"?s.type==="INSTALLATION":s.type==="ABONNEMENT"),b=!x||s.name?.toLowerCase().includes(x)||s.description?.toLowerCase().includes(x);return n&&b}),$=[h,r,c,l].filter(s=>s!=="all").length,de=je([{name:"Accueil",url:"/"},{name:"Boutique",url:"/boutique"}]),me={"@context":"https://schema.org","@type":"ItemList",name:"Traceurs GPS AbidjanGPS",itemListElement:N.map((s,n)=>({"@type":"ListItem",position:n+1,name:s.name,url:`https://abidjangps.com/produit/${s.id}`}))};return e.jsxs("main",{className:"min-h-screen pt-20 md:pt-24 pb-16 bg-white",children:[e.jsx(Ne,{title:"Boutique traceurs GPS — Voiture, moto, camion | AbidjanGPS",description:"Comparez nos traceurs GPS pour voiture, moto, camion, engin, conteneur et usage portable. Prix en FCFA, livraison et installation à Abidjan.",url:"/boutique",jsonLd:[de,me]}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mb-6",children:[e.jsxs("nav",{className:"text-sm text-gray-500 mb-4",children:[e.jsx(A,{to:"/",className:"hover:text-[#D45A00]",children:"Accueil"}),e.jsx("span",{className:"mx-2",children:"/"}),e.jsx("span",{className:"text-[#333333] font-medium",children:"Boutique"})]}),e.jsx("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-extrabold text-[#333333] md:text-4xl",children:ce}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Trouvez rapidement le GPS adapté à votre besoin."})]})}),e.jsx("div",{className:"mt-4 max-w-xl",children:e.jsxs("div",{className:"relative",children:[e.jsx(we,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),e.jsx("input",{type:"text",value:E,onChange:s=>q(s.target.value),placeholder:"Rechercher un traceur, accessoire, service...",className:"w-full pl-11 pr-4 py-3 border rounded-xl focus:ring-2 focus:ring-[#D45A00] outline-none bg-[#F2F2F2] border-transparent focus:bg-white transition-all"}),E&&e.jsx("button",{onClick:()=>q(""),className:"absolute right-3 top-1/2 -translate-y-1/2 p-1 hover:bg-gray-200 rounded-full transition-colors",children:e.jsx(Z,{className:"w-4 h-4 text-gray-400"})})]})})]}),O?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-4 border-[#D45A00] border-t-transparent rounded-full animate-spin"})}):e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs(ve,{value:d,onValueChange:u,className:"w-full",children:[e.jsx(I,{value:"traceurs",className:"animate-in fade-in duration-300",children:e.jsxs("div",{className:"flex gap-8",children:[e.jsx(X,{isOpen:P,onClose:()=>F(!1),isMobile:!1,categories:G,brands:V,catFilter:h,setCatFilter:m,installFilter:r,setInstallFilter:o,brandFilter:c,setBrandFilter:j,priceRange:l,setPriceRange:p,resultCount:N.length}),e.jsx(X,{isOpen:P,onClose:()=>F(!1),isMobile:!0,categories:G,brands:V,catFilter:h,setCatFilter:m,installFilter:r,setInstallFilter:o,brandFilter:c,setBrandFilter:j,priceRange:l,setPriceRange:p,resultCount:N.length}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>F(!0),className:"flex min-h-11 items-center justify-center gap-2 rounded-lg border px-3 text-sm font-semibold text-[#333333] transition-colors hover:bg-[#F2F2F2] lg:hidden",children:[e.jsx(Y,{className:"h-4 w-4"})," Filtres",$>0&&e.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-[#D45A00] text-xs font-bold text-white",children:$})]}),e.jsxs("div",{className:"hidden min-w-0 flex-1 items-center gap-2 text-sm text-gray-500 sm:flex",children:[e.jsx(Ae,{className:"h-4 w-4"}),e.jsxs("span",{children:[N.length," produit",N.length>1?"s":""]}),$>0&&e.jsx("button",{onClick:()=>{m("all"),o("all"),j("all"),p("all")},className:"ml-1 text-[#D45A00] hover:underline",children:"Effacer"})]}),e.jsxs("label",{className:"relative ml-auto flex min-h-11 min-w-0 flex-1 items-center sm:max-w-[220px]",children:[e.jsx(Ce,{className:"pointer-events-none absolute left-3 h-4 w-4 text-gray-500"}),e.jsx("span",{className:"sr-only",children:"Trier les produits"}),e.jsxs("select",{value:L,onChange:s=>ae(s.target.value),className:"h-11 w-full appearance-none rounded-lg border bg-white pl-9 pr-3 text-sm font-medium text-[#333333] outline-none focus:ring-2 focus:ring-[#D45A00]",children:[e.jsx("option",{value:"recommended",children:"Recommandés"}),e.jsx("option",{value:"price-asc",children:"Prix croissant"}),e.jsx("option",{value:"price-desc",children:"Prix décroissant"}),e.jsx("option",{value:"name",children:"Nom A–Z"})]})]})]}),e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3 sm:hidden",children:[e.jsxs("p",{className:"text-xs text-gray-500",children:[N.length," produit",N.length>1?"s":"",$>0?" selon vos filtres":""]}),e.jsx("span",{className:"text-xs font-semibold text-[#D45A00]",children:"Trier"})]}),e.jsx("div",{className:"-mx-4 mb-4 flex gap-2 overflow-x-auto px-4 pb-1 lg:hidden scrollbar-hide",children:[{label:"Tous",active:r==="all"&&l==="all",onClick:()=>{o("all"),p("all")}},{label:"Sans installation",active:r==="self",onClick:()=>o("self")},{label:"Installation disponible",active:r==="recommended",onClick:()=>o("recommended")},{label:"Moins de 50 000 FCFA",active:l==="0-50000",onClick:()=>p("0-50000")}].map(s=>e.jsx("button",{onClick:s.onClick,className:`shrink-0 rounded-full px-3 py-2 text-xs font-semibold transition-colors ${s.active?"bg-[#D45A00] text-white":"bg-[#F2F2F2] text-[#333333]"}`,children:s.label},s.label))}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:gap-6 xl:grid-cols-3",children:oe.map(s=>e.jsx(Le,{product:s,categoryLabel:U[s.category]??s.category},s.id))}),N.length===0&&e.jsxs("div",{className:"text-center py-12 text-gray-500",children:[e.jsx("p",{className:"mb-2",children:"Aucun produit ne correspond aux filtres."}),e.jsx("button",{onClick:()=>{m("all"),o("all"),j("all"),p("all")},className:"text-[#D45A00] hover:underline",children:"Réinitialiser les filtres"})]})]})]})}),e.jsxs(I,{value:"accessoires",className:"animate-in fade-in duration-300",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[z.map(({key:s,label:n})=>e.jsx("button",{onClick:()=>C(s),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${g===s?"bg-[#D45A00] text-white":"bg-[#F2F2F2] text-gray-600 hover:bg-[#D45A00]/10"}`,children:n},s)),e.jsx("button",{onClick:()=>C("all"),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${g==="all"?"bg-[#D45A00] text-white":"bg-[#F2F2F2] text-gray-600 hover:bg-[#D45A00]/10"}`,children:"Tous"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:gap-6 lg:grid-cols-3 xl:grid-cols-4",children:Q.map(s=>e.jsx($e,{accessory:s,categoryLabel:ne[s.category]??s.category},s.id))}),Q.length===0&&e.jsx("div",{className:"text-center py-12 text-gray-500",children:"Aucun accessoire trouvé."})]}),e.jsxs(I,{value:"services",className:"animate-in fade-in duration-300",children:[e.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:["all","installation","abonnement"].map(s=>e.jsx("button",{onClick:()=>T(s),className:`px-4 py-2 rounded-full text-sm font-medium transition-colors ${k===s?"bg-[#D45A00] text-white":"bg-[#F2F2F2] text-gray-600 hover:bg-[#D45A00]/10"}`,children:s==="all"?"Tous":s.charAt(0).toUpperCase()+s.slice(1)},s))}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:W.map(s=>e.jsx(Te,{service:s},s.id))}),W.length===0&&e.jsx("div",{className:"text-center py-12 text-gray-500",children:"Aucun service trouvé."})]})]})})]})}export{Ve as default};