1import{j as e}from"./vendor-react-De19kUq8.js";import{a as o,L as c}from"./vendor-app-DH33cvx6.js";import{cN as d,cm as m,cn as x,co as u,a5 as h,dg as p,dh as g,w as j,l as b,ct as f,cp as v,s as N}from"./index-fAhlbWPM.js";import{P as w}from"./PublicHeader-D_1U7rBb.js";import"./vendor-ui-pO556hdz.js";import"./vendor-supabase-Bm92Y2YK.js";function E(){const{data:a}=d(),{data:t=[],isLoading:i}=o({queryKey:["categories-list"],queryFn:async()=>{const{data:s,error:r}=await N.from("categories").select("id, name, slug, icon, color").order("display_order");if(r)throw r;return s||[]},staleTime:60*60*1e3}),n=t.map(s=>({...s,eventCount:(a==null?void 0:a.categoryEvents[s.id])??0}));return e.jsxs(e.Fragment,{children:[e.jsxs(m,{children:[e.jsx("title",{children:"Rubriques culturelles | Sortir"}),e.jsx("meta",{name:"description",content:"Explorez les événements culturels par rubrique : spectacles, concerts, expositions, jeune public et loisirs."}),e.jsx("link",{rel:"canonical",href:`${x}/categories`})]}),e.jsxs("div",{className:"min-h-screen flex flex-col bg-gradient-to-b from-background to-muted/20",children:[e.jsx(w,{}),e.jsx("div",{className:"py-4 bg-muted/30 border-b border-border/30",children:e.jsx("div",{className:"container max-w-6xl mx-auto px-4",children:e.jsx(u,{placementSlug:"category-top"})})}),e.jsx("main",{className:"flex-1",children:e.jsx("div",{className:"container max-w-6xl mx-auto px-4 py-8",children:e.jsxs("div",{className:"flex flex-col lg:flex-row gap-8",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"font-display text-3xl md:text-4xl font-bold mb-3",children:"Rubriques"}),e.jsx("p",{className:"text-muted-foreground text-lg",children:"Explorez les événements par type de sortie"})]}),i?e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:[...Array(6)].map((s,r)=>e.jsx(h,{className:"h-24 sm:h-32 rounded-xl sm:rounded-2xl"},r))}):e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:gap-4",children:n.map(s=>{const r=p(s.icon),l=g(s.color);return e.jsx(c,{to:`/categorie/${s.slug}`,className:"group",children:e.jsx("div",{className:"h-full p-3 sm:p-6 rounded-xl sm:rounded-2xl bg-card/80 backdrop-blur-sm border transition-all duration-200 shadow-sm hover:shadow-lg",style:{borderColor:`${l}30`},children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl mb-2 sm:mb-4",style:{backgroundColor:`${l}18`},children:e.jsx(r,{className:"h-5 w-5 sm:h-6 sm:w-6",style:{color:l}})}),e.jsx("h2",{className:"font-display font-semibold text-base sm:text-xl mb-1 sm:mb-2 group-hover:text-primary transition-colors line-clamp-1",children:s.name}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-1.5 text-xs sm:text-sm text-muted-foreground",children:[e.jsx(j,{className:"h-3 w-3 sm:h-3.5 sm:w-3.5 shrink-0"}),e.jsxs("span",{className:"truncate",children:[s.eventCount," évt",s.eventCount!==1?"s":""]})]})]}),e.jsx(b,{className:"hidden sm:block h-5 w-5 text-muted-foreground group-hover:text-primary group-hover:translate-x-0.5 transition-all shrink-0 mt-2"})]})})},s.id)})})]}),e.jsx("aside",{className:"hidden lg:block w-[300px] shrink-0",children:e.jsx("div",{className:"sticky top-20 space-y-6",children:e.jsx(f,{placementSlug:"categories-sidebar"})})})]})})}),e.jsx(v,{})]})]})}export{E as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.