1import{r as h,s as f,j as e,t as v,a4 as _,a5 as z,a6 as J,Y as Z,a7 as B}from"./index-DT2isS-B.js";import{u as F}from"./admin-upload-CZ0UrFKR.js";import{L as Q}from"./LogoCropper-BMk3QtET.js";import{D as U,c as q,d as D,b as ee}from"./ContentPage-qk8DJaZN.js";import{b as I,N as se,M as re}from"./MenuCtasEditor-DESSHbbl.js";import{T as M}from"./trash-2-B5BqHYpk.js";import{P as X}from"./plus-D3jd3V9j.js";import{A as te}from"./arrow-down-vt73lz92.js";import{R as G}from"./RichTextEditor-CP9YQyTw.js";import{E as ae}from"./external-link-Ck7ptGJW.js";import"./utils-DaKibh3T.js";import"./i18n-content-8nzK2gBV.js";import"./custom-pages-D564KhPh.js";import"./chevron-down-BFY4FmaF.js";import"./EmojiPicker-B4UL_LnF.js";function ne(){const[s,r]=h.useState(U),[d,m]=h.useState(!1),[b,x]=h.useState(!1),[g,p]=h.useState(null);h.useEffect(()=>{(async()=>{const{data:a}=await f.from("site_settings").select("value").eq("key","preheader_config").maybeSingle();try{if(a?.value){const o=JSON.parse(a.value);r({...U,...o,cta:{...U.cta,...o.cta||{}},logos:Array.isArray(o.logos)?o.logos:[]})}}catch{}m(!0)})()},[]);const y=async()=>{x(!0);const a=JSON.stringify(s),{data:o}=await f.from("site_settings").select("key").eq("key","preheader_config").maybeSingle(),{error:i}=o?await f.from("site_settings").update({value:a}).eq("key","preheader_config"):await f.from("site_settings").insert({key:"preheader_config",value:a,description:"Configuration de la bannière supérieure (JSON)"});if(x(!1),i)return v.error(i.message);v.success("Pré-header enregistré. Rechargez le site pour voir le rendu.")},u=(a,o)=>{const i=[...s.logos];i[a]={...i[a],...o},r({...s,logos:i})},t=a=>r({...s,logos:s.logos.filter((o,i)=>i!==a)}),l=(a,o)=>{const i=a+o;if(i<0||i>=s.logos.length)return;const N=[...s.logos];[N[a],N[i]]=[N[i],N[a]],r({...s,logos:N})},c=()=>r({...s,logos:[...s.logos,{url:"",name:"",href:"",visible:!0}]}),n=async(a,o)=>{try{const i=await F({bucket:"partner-logos",folder:"preheader",file:a});u(o,{url:i})}catch(i){v.error(i instanceof Error?i.message:"Ãchec de l'upload")}};return d?e.jsxs("div",{className:"border-t border-border pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold",children:"Pré-header (bannière supérieure)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:'Bandeau dégradé tout en haut du site. Idéal pour "Un événement de" + logos institutionnels. Conseil : utilisez des PNG transparents, et activez la teinte blanche si vos logos sont en couleur.'})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>r(U),className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground
1/5",children:"Réinitialiser"}),e.jsx("button",{onClick:y,disabled:b,className:"px-5 py-2 rounded-full bg-gradient-to-r from-accent to-primary text-white font-bold text-sm disabled:opacity-50",children:b?"â¦":"Enregistrer"})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:s.enabled,onChange:a=>r({...s,enabled:a.target.checked})}),"Afficher le pré-header"]}),e.jsx(E,{label:"Phrase d'introduction (ex. « Un événement de »)",children:e.jsx(S,{value:s.label,onChange:a=>r({...s,label:a})})}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:s.whiteTint,onChange:a=>r({...s,whiteTint:a.target.checked})}),"Forcer les logos en blanc (recommandé sur dégradé coloré)"]}),e.jsx(E,{label:"Fond personnalisé (vide = dégradé thème)",children:e.jsx(S,{placeholder:"ex. linear-gradient(90deg, #ff6b35, #6c5ce7)",value:s.bgOverride,onChange:a=>r({...s,bgOverride:a})})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsx(E,{label:"Taille police (px)",children:e.jsx(T,{value:s.fontSize,min:10,max:24,onChange:a=>r({...s,fontSize:a})})}),e.jsx(E,{label:"Hauteur logos (px)",children:e.jsx(T,{value:s.logoHeight,min:16,max:80,onChange:a=>r({...s,logoHeight:a})})}),e.jsx(E,{label:"Largeur max par défaut (px)",children:e.jsx(T,{value:s.logoMaxWidth,min:60,max:480,onChange:a=>r({...s,logoMaxWidth:a})})})]}),e.jsxs("div",{className:"border border-border rounded-xl p-3 space-y-3 bg-background",children:[e.jsxs("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold",children:["Logos (",s.logos.length,")"]}),s.logos.map((a,o)=>{const i=a.visible!==!1;return e.jsxs("div",{className:`border border-border rounded-lg p-3 space-y-2 ${i?"":"opacity-60"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-12 w-24 grid place-items-center rounded border border-border bg-foreground
1/5 overflow-hidden",children:a.url?e.jsx("img",{src:a.url,alt:a.name,className:"max-h-full max-w-full object-contain"}):e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"aperçu"})}),e.jsxs("label",{className:"text-xs px-3 py-1.5 rounded-md border border-border cursor-pointer hover:bg-foreground/5",children:[a.url?"Remplacer":"Téléverser",e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:N=>{const $=N.target.files?.[0];$&&p({file:$,index:o}),N.target.value=""}})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx("button",{onClick:()=>u(o,{visible:!i}),title:i?"Masquer en front":"Afficher en front",className:"text-xs px-2 py-1 rounded-md border border-border hover:bg-foreground/5",children:i?"ð":"ð«"}),e.jsx("button",{onClick:()=>l(o,-1),disabled:o===0,title:"Monter",className:"text-xs px-2 py-1 rounded-md border border-border hover:bg-foreground/5 disabled:opacity-30 disabled:cursor-not-allowed",children:"â"}),e.jsx("button",{onClick:()=>l(o,1),disabled:o===s.logos.length-1,title:"Descendre",className:"text-xs px-2 py-1 rounded-md border border-border hover:bg-foreground
1/5 disabled:opacity-30 disabled:cursor-not-allowed",children:"â"}),e.jsx("button",{onClick:()=>t(o),className:"text-xs text-destructive hover:underline ml-2",children:"Suppr."})]})]}),!i&&e.jsx("div",{className:"text-[10px] uppercase tracking-wider px-2 py-0.5 rounded-full bg-foreground/10 text-muted-foreground inline-block",children:"Masqué en front"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[e.jsx(S,{placeholder:"Nom (alt)",value:a.name,onChange:N=>u(o,{name:N})}),e.jsx(S,{placeholder:"URL (optionnel)",value:a.href??"",onChange:N=>u(o,{href:N})}),e.jsx(T,{placeholder:`Largeur max (${s.logoMaxWidth})`,value:a.maxWidth??0,min:0,max:600,onChange:N=>u(o,{maxWidth:N>0?N:void 0})})]})]},o)}),e.jsx("button",{onClick:c,className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground/5",children:"+ Ajouter un logo"})]}),e.jsxs("div",{className:"border border-border rounded-xl p-3 space-y-2 bg-background",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:s.cta.enabled,onChange:a=>r({...s,cta:{...s.cta,enabled:a.target.checked}})}),"Afficher un bouton CTA à droite"]}),s.cta.enabled&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsx(S,{placeholder:"Libellé",value:s.cta.label,onChange:a=>r({...s,cta:{...s.cta,label:a}})}),e.jsx(S,{placeholder:"URL",value:s.cta.url,onChange:a=>r({...s,cta:{...s.cta,url:a}})})]})]}),g&&e.jsx(Q,{file:g.file,references:s.logos.map((a,o)=>o===g.index?"":a.url).filter(Boolean),onCancel:()=>p(null),onConfirm:async a=>{const o=g.index;p(null),await n(a,o)}})]}):null}function E({label:s,children:r}){return e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:s}),r]})}function S({value:s,onChange:r,placeholder:d}){return e.jsx("input",{type:"text",value:s,onChange:m=>r(m.target.value),placeholder:d,className:"w-full bg-background border border-border rounded-md px-2 py-1.5 text-sm outline-none focus:border-accent"})}function T({value:s,onChange:r,min:d,max:m,placeholder:b}){return e.jsx("input",{type:"number",value:s||"",min:d,max:m,placeholder:b,onChange:x=>r(parseInt(x.target.value,10)||0),className:"w-full bg-background border border-border rounded-md px-2 py-1.5 text-sm outline-none focus:border-accent"})}function le(){const[s,r]=h.useState([]),[d,m]=h.useState(!1),[b,x]=h.useState(!1);h.useEffect(()=>{(async()=>{const{data:t}=await f.from("site_settings").select("value").eq("key","custom_anchors").maybeSingle();try{if(t?.value){const l=JSON.parse(t.value);Array.isArray(l)&&r(l)}}catch{}m(!0)})()},[]);const g=()=>r(t=>[...t,{id:crypto.randomUUID(),label:"Nouvelle ancre",value:"#"}]),p=(t,l)=>r(c=>c.map(n=>n.id===t?{...n,...l}:n)),y=t=>r(l=>l.filter(c=>c.id!==t)),u=async()=>{x(!0);const t=s.map(a=>({...a,value:I(a.value)})).filter(a=>a.label.trim()&&a.value.length>1),l=JSON.stringify(t),{data:c}=await f.from("site_settings").select("key").eq("key","custom_anchors").maybeSingle(),{error:n}=c?await f.from("site_settings").update({value:l}).eq("key","custom_anchors"):await f.from("site_settings").insert({key:"custom_anchors",value:l,description:"Bibliothèque d'ancres personnalisées (JSON)"});if(x(!1),n)return v.error(n.message);r(t),v.success("Ancres enregistrées")};return d?e.jsxs("div",{className:"border-t border-border pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold",children:"Bibliothèque d'ancres"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Créez vos propres ancres (ex. ",e.jsx("span",{className:"font-mono",children:"#contact-form"}),") pour les utiliser dans les menus. L'ancre doit exister comme ",e.jsx("span",{className:"font-mono",children:'id="â¦"'})," dans une page pour fonctionner à la volée."]})]}),e.jsx("button",{onClick:u,disabled:b,className:"px-5 py-2 rounded-full bg-gradient-to-r from-accent to-primary text-white font-bold text-sm disabled:opacity-50",children:b?"â¦":"Enregistrer"})]}),e.jsxs("div",{className:"space-y-2",children:[s.map(t=>
1e.jsxs("div",{className:"flex items-center gap-2 bg-foreground/[0.03] border border-border rounded-xl p-2",children:[e.jsx("input",{value:t.label,onChange:l=>p(t.id,{label:l.target.value}),placeholder:"Nom (ex. Formulaire contact)",className:"flex-1 bg-background border border-border rounded-md px-3 py-1.5 text-sm outline-none focus:border-accent"}),e.jsx("input",{value:t.value,onChange:l=>p(t.id,{value:l.target.value}),onBlur:l=>p(t.id,{value:I(l.target.value)}),placeholder:"#mon-ancre",className:"flex-1 bg-background border border-border rounded-md px-3 py-1.5 text-sm font-mono outline-none focus:border-accent"}),e.jsx("button",{onClick:()=>y(t.id),className:"p-2 text-destructive hover:bg-destructive/10 rounded","aria-label":"Supprimer",children:e.jsx(M,{className:"h-4 w-4"})})]},t.id)),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Aucune ancre personnalisée pour l'instant."})]}),e.jsxs("button",{onClick:g,className:"px-4 py-2 rounded-full border border-dashed border-border text-sm font-semibold hover:bg-foreground
1/5 inline-flex items-center gap-1.5",children:[e.jsx(X,{className:"h-4 w-4"})," Ajouter une ancre"]})]}):null}const oe=["linkedin","twitter","youtube","instagram","facebook"],H=["organisateur","co-organisateur","soutien"];function ce(){const[s,r]=h.useState(_),[d,m]=h.useState(!1),[b,x]=h.useState(!1),[g,p]=h.useState("brand");h.useEffect(()=>{(async()=>{const{data:t}=await f.from("site_settings").select("value").eq("key","footer_config").maybeSingle();try{if(t?.value){const l=JSON.parse(t.value);r({..._,...l,newsletter:{..._.newsletter,...l.newsletter||{}},contact:{..._.contact,...l.contact||{}},appearance:{..._.appearance,...l.appearance||{}},organizers:l.organizers??_.organizers,columns:l.columns??_.columns,socials:l.socials??_.socials,legalLinks:l.legalLinks??_.legalLinks})}}catch{}m(!0)})()},[]);const y=async()=>{x(!0);const t=JSON.stringify(s),{data:l}=await f.from("site_settings").select("key").eq("key","footer_config").maybeSingle(),{error:c}=l?await f.from("site_settings").update({value:t}).eq("key","footer_config"):await f.from("site_settings").insert({key:"footer_config",value:t,description:"Configuration du pied de page (JSON)"});if(x(!1),c)return v.error(c.message);v.success("Pied de page enregistré. Rechargez le site pour voir le rendu.")},u=async t=>{try{return await F({bucket:"partner-logos",folder:"footer",file:t})}catch(l){return v.error(l instanceof Error?l.message:"Ãchec de l'upload"),null}};return d?e.jsxs("div",{className:"border-t border-border pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold",children:"Pied de page"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Contenu, logos organisateurs, colonnes de liens, réseaux sociaux, contact, mentions légales, apparence."})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>r(_),className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground
1/5",children:"Réinitialiser"}),e.jsx("button",{onClick:y,disabled:b,className:"px-5 py-2 rounded-full bg-gradient-to-r from-accent to-primary text-white font-bold text-sm disabled:opacity-50",children:b?"â¦":"Enregistrer"})]})]}),e.jsxs(L,{open:g,setOpen:p,id:"brand",title:"1. Identité & pitch",children:[e.jsx(k,{label:"Logo principal (optionnel)",children:e.jsx(Y,{value:s.logoUrl,onChange:t=>r({...s,logoUrl:t}),onUpload:u})}),e.jsxs(k,{label:"Marque ligne 1",children:[e.jsx(j,{value:s.brandLine1,onChange:t=>r({...s,brandLine1:t})}),e.jsx(C,{value:s.brandLine1_en??"",onChange:t=>r({...s,brandLine1_en:t})})]}),e.jsxs(k,{label:"Marque ligne 2 (accent)",children:[e.jsx(j,{value:s.brandLine2,onChange:t=>r({...s,brandLine2:t})}),e.jsx(C,{value:s.brandLine2_en??"",onChange:t=>r({...s,brandLine2_en:t})})]}),e.jsxs(k,{label:"Pitch",children:[e.jsx(W,{value:s.pitch,onChange:t=>r({...s,pitch:t})}),e.jsx(C,{multiline:!0,value:s.pitch_en??"",onChange:t=>r({...s,pitch_en:t})})]}),e.jsxs(k,{label:"Copyright (utiliser {year} pour l'année auto)",children:[e.jsx(j,{value:s.copyright,onChange:t=>r({...s,copyright:t})}),e.jsx(C,{value:s.copyright_en??"",onChange:t=>r({...s,copyright_en:t})})]})]}),e.jsxs(L,{open:g,setOpen:p,id:"newsletter",title:"2. Newsletter",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:s.newsletter.enabled,onChange:t=>r({...s,newsletter:{...s.newsletter,enabled:t.target.checked}})}),"Afficher le bloc newsletter"]}),s.newsletter.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs(k,{label:"Libellé",children:[e.jsx(j,{value:s.newsletter.label,onChange:t=>r({...s,newsletter:{...s.newsletter,label:t}})}),e.jsx(C,{value:s.newsletter.label_en??"",onChange:t=>r({...s,newsletter:{...s.newsletter,label_en:t}})})]}),e.jsxs(k,{label:"Placeholder",children:[e.jsx(j,{value:s.newsletter.placeholder,onChange:t=>r({...s,newsletter:{...s.newsletter,placeholder:t}})}),e.jsx(C,{value:s.newsletter.placeholder_en??"",onChange:t=>r({...s,newsletter:{...s.newsletter,placeholder_en:t}})})]}),e.jsxs(k,{label:"Texte du bouton",children:[e.jsx(j,{value:s.newsletter.cta,onChange:t=>r({...s,newsletter:{...s.newsletter,cta:t}})}),e.jsx(C,{value:s.newsletter.cta_en??"",onChange:t=>r({...s,newsletter:{...s.newsletter,cta_en:t}})})]})]})]}),e.jsxs(L,{open:g,setOpen:p,id:"organizers",title:`3. Organisateurs & partenaires institutionnels (${s.organizers.length})`,children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Recommandé : 3 à 5 logos. Ajoutez le logo, le nom, un lien optionnel et le type."}),e.jsxs("div",{className:"border border-border rounded-xl p-3 space-y-2 bg-background",children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold",children:"Libellés des catégories (affichés à gauche des logos)"}),H.map(t=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground w-32 shrink-0 capitalize",children:t}),e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx(j,{value:s.orgLabels?.[t]??"",onChange:l=>r({...s,orgLabels:{...s.orgLabels,[t]:l}})}),e.jsx(C,{value:s.orgLabels_en?.[t]??"",onChange:l=>r({...s,orgLabels_en:{...s.orgLabels_en??{},[t]:l}})})]})]},t))]}),s.organizers.map((t,l)=>{const c=t.visible!==!1;return e.jsx("div",{className:`border border-border rounded-xl p-3 space-y-2 bg-background ${c?"":"opacity-60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Y,{value:t.logoUrl,onChange:n=>w(s,r,"organizers",l,{logoUrl:n}),onUpload:u,references:s.organizers.map((n,a)=>a===l?"":n.logoUrl).filter(Boolean),compact:!0}),e.jsxs("div",{className:"flex-1 grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsx(j,{placeholder:"Nom",value:t.name,onChange:n=>w(s,r,"organizers",l,{name:n})}),e.jsx(j,{placeholder:"URL (optionnel)",value:t.url??"",onChange:n=>w(s,r,"organizers",l,{url:n})}),e.jsx("select",{value:t.type,onChange:n=>w(s,r,"organizers",l,{type:n.target.value}),className:"bg-background border border-border rounded-md px-2 py-1 text-sm",children:H.map(n=>e.jsx("option",{value:n,children:n},n))}),e.jsxs("div",{className:"flex gap-1 items-center",children:[e.jsx("button",{onClick:()=>w(s,r,"organizers",l,{visible:!c}),title:c?"Masquer en front":"Afficher en front",className:"text-xs px-2 py-1 rounded-md border border-border hover:bg-foreground
1/5",children:c?"ð":"ð«"}),!c&&e.jsx("span",{className:"text-[10px] uppercase tracking-wider px-2 py-0.5 rounded-full bg-foreground/10 text-muted-foreground",children:"Masqué"}),e.jsx(R,{dir:"up",onClick:()=>O(s,r,"organizers",l,-1)}),e.jsx(R,{dir:"down",onClick:()=>O(s,r,"organizers",l,1)}),e.jsx("button",{onClick:()=>K(s,r,"organizers",l),className:"ml-auto text-xs text-destructive hover:underline",children:"Suppr."})]})]})]})},l)}),e.jsx("button",{onClick:()=>r({...s,organizers:[...s.organizers,{logoUrl:"",name:"",url:"",type:"organisateur",visible:!0}]}),className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground/5",children:"+ Ajouter un logo"})]}),e.jsxs(L,{open:g,setOpen:p,id:"columns",title:`4. Colonnes de liens (${s.columns.length})`,children:[s.columns.map((t,l)=>e.jsxs("div",{className:"border border-border rounded-xl p-3 space-y-2 bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx(j,{placeholder:"Titre de la colonne",value:t.title,onChange:c=>w(s,r,"columns",l,{title:c})}),e.jsx(C,{value:t.title_en??"",onChange:c=>w(s,r,"columns",l,{title_en:c})})]}),e.jsx(R,{dir:"up",onClick:()=>O(s,r,"columns",l,-1)}),e.jsx(R,{dir:"down",onClick:()=>O(s,r,"columns",l,1)}),e.jsx("button",{onClick:()=>K(s,r,"columns",l),className:"text-xs text-destructive hover:underline",children:"Suppr."})]}),e.jsxs("div",{className:"space-y-2 pl-2 border-l-2 border-border",children:[t.links.map((c,n)=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx(j,{placeholder:"Libellé",value:c.label,onChange:a=>{const o=[...t.links];o[n]={...o[n],label:a},w(s,r,"columns",l,{links:o})}}),e.jsx(C,{value:c.label_en??"",onChange:a=>{const o=[...t.links];o[n]={...o[n],label_en:a},w(s,r,"columns",l,{links:o})}})]}),e.jsx(j,{placeholder:"URL ou #ancre",value:c.url,onChange:a=>{const o=[...t.links];o[n]={...o[n],url:a},w(s,r,"columns",l,{links:o})}}),e.jsx("button",{onClick:()=>{const a=t.links.filter((o,i)=>i!==n);w(s,r,"columns",l,{links:a})},className:"text-xs text-destructive",children:"Ã"})]},n)),e.jsx("button",{onClick:()=>w(s,r,"columns",l,{links:[...t.links,{label:"",url:""}]}),className:"text-xs text-muted-foreground hover:text-foreground",children:"+ lien"})]})]},l)),s.columns.length<4&&e.jsx("button",{onClick:()=>r({...s,columns:[...s.columns,{title:"Nouvelle colonne",links:[]}]}),className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground
1/5",children:"+ Ajouter une colonne"})]}),e.jsx(L,{open:g,setOpen:p,id:"socials",title:"5. Réseaux sociaux",children:oe.map(t=>{const l=s.socials.find(a=>a.network===t)??{network:t,url:"",enabled:!1},c=s.socials.findIndex(a=>a.network===t),n=a=>{const o=[...s.socials];c===-1?o.push({...l,...a}):o[c]={...o[c],...a},r({...s,socials:o})};return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",checked:l.enabled,onChange:a=>n({enabled:a.target.checked})}),e.jsx("span",{className:"w-20 text-sm font-semibold capitalize",children:t}),e.jsx(j,{placeholder:`URL ${t}`,value:l.url,onChange:a=>n({url:a})})]},t)})}),e.jsxs(L,{open:g,setOpen:p,id:"contact",title:"6. Contact & infos pratiques",children:[e.jsx(k,{label:"Email",children:e.jsx(j,{value:s.contact.email,onChange:t=>r({...s,contact:{...s.contact,email:t}})})}),e.jsx(k,{label:"Téléphone",children:e.jsx(j,{value:s.contact.phone,onChange:t=>r({...s,contact:{...s.contact,phone:t}})})}),e.jsxs(k,{label:"Adresse",children:[e.jsx(W,{value:s.contact.address,onChange:t=>r({...s,contact:{...s.contact,address:t}})}),e.jsx(C,{multiline:!0,value:s.contact.address_en??"",onChange:t=>r({...s,contact:{...s.contact,address_en:t}})})]})]}),e.jsxs(L,{open:g,setOpen:p,id:"legal",title:`7. Liens bas de footer (${s.legalLinks.length})`,children:[s.legalLinks.map((t,l)=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx(j,{placeholder:"Libellé",value:t.label,onChange:c=>{const n=[...s.legalLinks];n[l]={...n[l],label:c},r({...s,legalLinks:n})}}),e.jsx(C,{value:t.label_en??"",onChange:c=>{const n=[...s.legalLinks];n[l]={...n[l],label_en:c},r({...s,legalLinks:n})}})]}),e.jsx(j,{placeholder:"URL",value:t.url,onChange:c=>{const n=[...s.legalLinks];n[l]={...n[l],url:c},r({...s,legalLinks:n})}}),e.jsx("button",{onClick:()=>r({...s,legalLinks:s.legalLinks.filter((c,n)=>n!==l)}),className:"text-xs text-destructive",children:"Ã"})]},l)),e.jsx("button",{onClick:()=>r({...s,legalLinks:[...s.legalLinks,{label:"",url:""}]}),className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground
1/5",children:"+ Ajouter un lien"})]}),e.jsxs(L,{open:g,setOpen:p,id:"appearance",title:"8. Apparence",children:[e.jsx(k,{label:"Couleur de fond (vide = thème par défaut)",children:e.jsx(V,{value:s.appearance.bgColor,onChange:t=>r({...s,appearance:{...s.appearance,bgColor:t}})})}),e.jsx(k,{label:"Couleur du texte (vide = thème par défaut)",children:e.jsx(V,{value:s.appearance.textColor,onChange:t=>r({...s,appearance:{...s.appearance,textColor:t}})})}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:s.appearance.showGradientSeparator,onChange:t=>r({...s,appearance:{...s.appearance,showGradientSeparator:t.target.checked}})}),"Séparateur dégradé en haut du footer"]})]})]}):null}function w(s,r,d,m,b){const x=[...s[d]],g=x[m];x[m]={...g,...b},r({...s,[d]:x})}function K(s,r,d,m){const b=s[d].filter((x,g)=>g!==m);r({...s,[d]:b})}function O(s,r,d,m,b){const x=[...s[d]],g=m+b;g<0||g>=x.length||([x[m],x[g]]=[x[g],x[m]],r({...s,[d]:x}))}function k({label:s,children:r}){return e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:s}),r]})}function j({value:s,onChange:r,placeholder:d}){return e.jsx("input",{type:"text",value:s,onChange:m=>r(m.target.value),placeholder:d,className:"w-full bg-background border border-border rounded-md px-2 py-1.5 text-sm outline-none focus:border-accent"})}function C({value:s,onChange:r,multiline:d}){const m="w-full bg-background border border-accent/40 rounded-md px-2 py-1.5 text-sm outline-none focus:border-accent";return e.jsxs("div",{className:"flex items-start gap-1.5",children:[e.jsx("span",{className:"text-[11px] pt-1.5 shrink-0",title:"Version anglaise",children:"ð¬ð§"}),d?e.jsx("textarea",{rows:3,value:s,onChange:b=>r(b.target.value),placeholder:"English version (optional)",className:m}):e.jsx("input",{type:"text",value:s,onChange:b=>r(b.target.value),placeholder:"English version (optional)",className:m})]})}function L({id:s,title:r,children:d,open:m,setOpen:b}){const x=m===s;return e.jsxs("div",{className:"border border-border rounded-2xl overflow-hidden",children:[e.jsxs("button",{type:"button",onClick:()=>b(x?null:s),className:"w-full flex items-center justify-between px-4 py-3 bg-foreground
1/[0.03] hover:bg-foreground/[0.05] transition-colors text-left",children:[e.jsx("span",{className:"font-semibold text-sm",children:r}),e.jsx("span",{className:"text-xs text-muted-foreground",children:x?"â":"+"})]}),x&&e.jsx("div",{className:"p-4 space-y-3",children:d})]})}function W({value:s,onChange:r}){return e.jsx("textarea",{value:s,onChange:d=>r(d.target.value),rows:3,className:"w-full bg-background border border-border rounded-md px-2 py-1.5 text-sm outline-none focus:border-accent"})}function V({value:s,onChange:r}){return e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"color",value:s||"#000000",onChange:d=>r(d.target.value),className:"w-10 h-8 rounded border border-border bg-background"}),e.jsx("input",{type:"text",value:s,placeholder:"#hex ou linear-gradient(...)",onChange:d=>r(d.target.value),className:"flex-1 bg-background border border-border rounded-md px-2 py-1 text-xs font-mono"}),s&&e.jsx("button",{onClick:()=>r(""),className:"text-xs text-muted-foreground hover:text-destructive",children:"vider"})]})}function R({dir:s,onClick:r}){return e.jsx("button",{onClick:r,className:"size-7 rounded border border-border text-xs hover:bg-foreground
1/5",children:s==="up"?"â":"â"})}function Y({value:s,onChange:r,onUpload:d,compact:m,references:b=[]}){const[x,g]=h.useState(!1),[p,y]=h.useState(null);return e.jsxs("div",{className:`flex items-center gap-2 ${m?"":"w-full"}`,children:[e.jsx("div",{className:`${m?"size-14":"size-16"} rounded-lg border border-border bg-background grid place-items-center overflow-hidden shrink-0`,children:s?e.jsx("img",{src:s,alt:"",className:"max-h-full max-w-full object-contain"}):e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})}),e.jsxs("label",{className:`text-xs px-3 py-1.5 rounded-full border border-border cursor-pointer hover:bg-foreground/5 ${x?"opacity-50":""}`,children:[x?"â¦":s?"Changer":"Upload",e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:u=>{const t=u.target.files?.[0];t&&(y(t),u.currentTarget.value="")}})]}),s&&e.jsx("button",{onClick:()=>r(""),className:"text-xs text-muted-foreground hover:text-destructive",children:"Ã"}),p&&e.jsx(Q,{file:p,references:b,onCancel:()=>y(null),onConfirm:async u=>{y(null),g(!0);const t=await d(u);g(!1),t&&r(t)}})]})}const de=["scrollTop","linkedin","twitter","facebook","instagram","youtube","tiktok","github","email","telegram","inscription","espaces","custom"],P=["inscription","espaces"];function ie(s){return{id:crypto.randomUUID(),kind:s,size:44,enabled:!0,url:s==="scrollTop"?void 0:s==="inscription"?"/inscription":s==="espaces"?"/espaces":"",shape:P.includes(s)?"pill":"circle"}}function ue(){const[s,r]=h.useState(z),[d,m]=h.useState(!1),[b,x]=h.useState(!1);h.useEffect(()=>{(async()=>{const{data:n}=await f.from("site_settings").select("value").eq("key","floating_menu_config").maybeSingle();try{if(n?.value){const a=JSON.parse(n.value);r({...z,...a,items:Array.isArray(a.items)?a.items:z.items})}}catch{}m(!0)})()},[]);const g=async()=>{x(!0);const n=JSON.stringify(s),{data:a}=await f.from("site_settings").select("key").eq("key","floating_menu_config").maybeSingle(),{error:o}=a?await f.from("site_settings").update({value:n}).eq("key","floating_menu_config"):await f.from("site_settings").insert({key:"floating_menu_config",value:n,description:"Menu flottant (haut de page + réseaux sociaux)"});if(x(!1),o)return v.error(o.message);v.success("Menu flottant enregistré.")},p=(n,a)=>{const o=[...s.items];o[n]={...o[n],...a},r({...s,items:o})},y=n=>r({...s,items:s.items.filter((a,o)=>o!==n)}),u=(n,a)=>{const o=n+a;if(o<0||o>=s.items.length)return;const i=[...s.items];[i[n],i[o]]=[i[o],i[n]],r({...s,items:i})},t=n=>r({...s,items:[...s.items,ie(n)]});if(!d)return null;const l=new Set(s.items.map(n=>n.kind)),c=de.filter(n=>n==="custom"||!l.has(n));return e.jsxs("div",{className:"border-t border-border pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold",children:"Menu flottant (bas-droite)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:'Bouton "haut de page" + vignettes réseaux sociaux. Ordre = de haut en bas dans la pile flottante.'})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>r(z),className:"px-4 py-2 rounded-full border border-border text-sm font-semibold hover:bg-foreground
1/5",children:"Réinitialiser"}),e.jsx("button",{onClick:g,disabled:b,className:"px-5 py-2 rounded-full bg-gradient-to-r from-accent to-primary text-white font-bold text-sm disabled:opacity-50",children:b?"â¦":"Enregistrer"})]})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[e.jsx("input",{type:"checkbox",checked:s.enabled,onChange:n=>r({...s,enabled:n.target.checked})}),"Afficher le menu flottant"]}),e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:"Fond vignettes (vide = dégradé thème)"}),e.jsx("input",{type:"text",value:s.bgOverride,onChange:n=>r({...s,bgOverride:n.target.value}),placeholder:"ex. linear-gradient(135deg, #ff6b35, #6c5ce7)",className:"w-full bg-background border border-border rounded-md px-2 py-1.5 text-sm"})]}),e.jsx("div",{className:"space-y-2",children:s.items.map((n,a)=>{const o=J[n.kind];return e.jsxs("div",{className:"border border-border rounded-lg p-3 flex items-center gap-3 flex-wrap",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("button",{onClick:()=>u(a,-1),disabled:a===0,className:"p-1 rounded border border-border disabled:opacity-30",children:e.jsx(Z,{className:"h-3 w-3"})}),e.jsx("button",{onClick:()=>u(a,1),disabled:a===s.items.length-1,className:"p-1 rounded border border-border disabled:opacity-30",children:e.jsx(te,{className:"h-3 w-3"})})]}),e.jsx("div",{className:"rounded-full bg-gradient-to-r from-accent to-primary text-white grid place-items-center shrink-0",style:{width:n.size,height:n.size},children:e.jsx(o,{style:{width:n.size*.45,height:n.size*.45}})}),e.jsxs("div",{className:"flex-1 min-w-[200px] space-y-1",children:[e.jsx("div",{className:"text-sm font-semibold",children:B[n.kind]}),n.kind!=="scrollTop"&&e.jsx("input",{type:"text",value:n.url??"",onChange:i=>p(a,{url:i.target.value}),placeholder:n.kind==="email"?"[email protected]":"https://â¦",className:"w-full bg-background border border-border rounded-md px-2 py-1 text-xs"}),(n.kind==="custom"||P.includes(n.kind))&&e.jsx("input",{type:"text",value:n.label??"",onChange:i=>p(a,{label:i.target.value}),placeholder:"Libellé (ex. S'inscrire)",className:"w-full bg-background border border-border rounded-md px-2 py-1 text-xs"}),P.includes(n.kind)&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-1",children:[e.jsx("input",{type:"text",value:n.label_en??"",onChange:i=>p(a,{label_en:i.target.value}),placeholder:"ð¬ð§ English label",className:"bg-background border border-accent/40 rounded-md px-2 py-1 text-xs"}),e.jsx("input",{type:"text",value:n.bg??"",onChange:i=>p(a,{bg:i.target.value}),placeholder:"Fond (ex. #0f172a)",className:"bg-background border border-border rounded-md px-2 py-1 text-xs"}),e.jsx("input",{type:"text",value:n.textColor??"",onChange:i=>p(a,{textColor:i.target.value}),placeholder:"Texte (ex. #ffffff)",className:"bg-background border border-border rounded-md px-2 py-1 text-xs"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("input",{type:"checkbox",checked:n.shape==="pill",onChange:i=>p(a,{shape:i.target.checked?"pill":"circle"})}),"Pastille allongée avec libellé"]})]}),e.jsxs("label",{className:"text-xs flex flex-col gap-1 w-24",children:[e.jsxs("span",{className:"text-muted-foreground",children:["Taille ",n.size,"px"]}),e.jsx("input",{type:"range",min:40,max:72,value:n.size,onChange:i=>p(a,{size:parseInt(i.target.value,10)})})]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[e.jsx("input",{type:"checkbox",checked:n.enabled,onChange:i=>p(a,{enabled:i.target.checked})}),"Actif"]}),e.jsx("button",{onClick:()=>y(a),className:"p-2 text-destructive hover:bg-destructive/10 rounded",children:e.jsx(M,{className:"h-4 w-4"})})]},n.id)})}),e.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(n=>{const a=J[n];return e.jsxs("button",{onClick:()=>t(n),className:"px-3 py-1.5 rounded-full border border-border text-xs font-semibold hover:bg-foreground
1/5 flex items-center gap-1.5",children:[e.jsx(a,{className:"h-3.5 w-3.5"}),"+ ",B[n]]},n)})})]})}const A="menu_icon_url";function xe(){const[s,r]=h.useState(""),[d,m]=h.useState(""),[b,x]=h.useState(!1),[g,p]=h.useState(!1),[y,u]=h.useState(!1);h.useEffect(()=>{(async()=>{const{data:n}=await f.from("site_settings").select("key,value").in("key",[A,"favicon_url"]);for(const a of n??[])a.key===A&&r(a.value??""),a.key==="favicon_url"&&m(a.value??"");x(!0)})()},[]);const t=async()=>{p(!0);const{data:n}=await f.from("site_settings").select("key").eq("key",A).maybeSingle(),{error:a}=n?await f.from("site_settings").update({value:s}).eq("key",A):await f.from("site_settings").insert({key:A,value:s,description:"URL de l'icône utilisée dans la barre de menu"});if(p(!1),a)return v.error(a.message);v.success("Icône du menu enregistrée.")},l=async n=>{if(n.size>5e5){v.error("Fichier trop lourd (max 500 Ko)");return}u(!0);try{const a=await F({bucket:"partner-logos",folder:"menu-icon",file:n});r(a),v.success("Image uploadée. N'oubliez pas d'enregistrer.")}catch(a){v.error(a instanceof Error?a.message:"Ãchec de l'upload")}finally{u(!1)}};if(!b)return null;const c=s||d;return e.jsxs("div",{className:"border-t border-border pt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold",children:"Icône du menu"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Icône affichée dans la pastille de la barre de menu flottante. Si elle n'est pas définie, le favicon du site est utilisé. Carré recommandé (512Ã512 px)."})]}),e.jsx("button",{onClick:t,disabled:g,className:"px-5 py-2 rounded-full bg-gradient-to-r from-accent to-primary text-white font-bold text-sm disabled:opacity-50",children:g?"â¦":"Enregistrer"})]}),e.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[e.jsx("div",{className:"size-20 rounded-full border border-border bg-background grid place-items-center overflow-hidden shrink-0",children:c?e.jsx("img",{src:c,alt:"icône menu",className:"w-full h-full object-cover"}):e.jsx("span",{className:"text-[10px] text-muted-foreground text-center px-2",children:"ID"})}),e.jsxs("div",{className:"flex-1 min-w-[240px] space-y-2",children:[e.jsx("label",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:"URL de l'icône du menu"}),e.jsx("input",{type:"text",value:s,onChange:n=>r(n.target.value),placeholder:"Vide = utilise le favicon du site",className:"w-full bg-background border border-border rounded-lg px-3 py-2 text-sm outline-none focus:border-accent"}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsxs("label",{className:`text-xs px-3 py-1.5 rounded-full border border-border cursor-pointer hover:bg-foreground
1/5 ${y?"opacity-50":""}`,children:[y?"Uploadâ¦":"Uploader une image",e.jsx("input",{type:"file",accept:"image/png,image/svg+xml,image/x-icon,image/vnd.microsoft.icon,image/jpeg,image/webp",className:"hidden",onChange:n=>{const a=n.target.files?.[0];a&&l(a)}})]}),s&&e.jsx("button",{onClick:()=>r(""),className:"text-xs px-3 py-1.5 rounded-full border border-border hover:bg-foreground/5",children:"Retirer (revenir au favicon)"})]})]})]})]})}function pe({slug:s}){const[r,d]=h.useState(D[s]),[m,b]=h.useState(!1),[x,g]=h.useState(!1),p=ee[s];h.useEffect(()=>{(async()=>{const{data:u}=await f.from("site_settings").select("value").eq("key",p).maybeSingle();try{if(u?.value){const t=JSON.parse(u.value);d({...D[s],...t})}}catch{}b(!0)})()},[p,s]);const y=async()=>{g(!0);const u=JSON.stringify(r),{data:t}=await f.from("site_settings").select("key").eq("key",p).maybeSingle(),{error:l}=t?await f.from("site_settings").update({value:u}).eq("key",p):await f.from("site_settings").insert({key:p,value:u,description:`Contenu page ${q[s]}`});if(g(!1),l)return v.error(l.message);v.success("Page enregistrée")};return m?e.jsxs("div",{className:"border border-border rounded-2xl p-5 space-y-3 bg-foreground
1/[0.02]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold",children:q[s]}),e.jsxs("a",{href:`/${s}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:["/",s," ",e.jsx(ae,{className:"h-3 w-3"})]})]}),e.jsx("button",{onClick:y,disabled:x,className:"px-4 py-2 rounded-full bg-gradient-to-r from-accent to-primary text-white font-bold text-sm disabled:opacity-50",children:x?"â¦":"Enregistrer"})]}),e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:"Titre"}),e.jsx("input",{type:"text",value:r.title,onChange:u=>d({...r,title:u.target.value}),className:"w-full bg-background border border-border rounded-md px-3 py-2 text-sm"})]}),e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-accent font-semibold",children:"ð¬ð§ Title (English)"}),e.jsx("input",{type:"text",value:r.title_en??"",onChange:u=>d({...r,title_en:u.target.value}),placeholder:"Laissez vide pour reprendre le français",className:"w-full bg-background border-l-2 border-accent border border-border rounded-md px-3 py-2 text-sm"})]}),e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:"Chapô (optionnel)"}),e.jsx("textarea",{rows:2,value:r.intro??"",onChange:u=>d({...r,intro:u.target.value}),className:"w-full bg-background border border-border rounded-md px-3 py-2 text-sm"})]}),e.jsxs("label",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-accent font-semibold",children:"ð¬ð§ Standfirst (English)"}),e.jsx("textarea",{rows:2,value:r.intro_en??"",onChange:u=>d({...r,intro_en:u.target.value}),placeholder:"Laissez vide pour reprendre le français",className:"w-full bg-background border-l-2 border-accent border border-border rounded-md px-3 py-2 text-sm"})]}),e.jsxs("div",{className:"block text-sm space-y-1",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:"Contenu (mise en forme : gras, italique, couleur, liensâ¦)"}),e.jsx(G,{value:r.body,onChange:u=>d({...r,body:u})})]}),e.jsxs("div",{className:"block text-sm space-y-1 border-l-2 border-accent pl-3",children:[e.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-accent font-semibold",children:"ð¬ð§ Content (English) â laissez vide pour reprendre le français"}),e.jsx(G,{value:r.body_en??"",onChange:u=>d({...r,body_en:u})})]}),e.jsxs("div",{className:"space-y-2 border-t border-border pt-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold",children:"Ancres internes (utilisables dans les menus)"}),e.jsxs("button",{type:"button",onClick:()=>d({...r,anchors:[...r.anchors??[],{label:"Nouvelle ancre",anchor:"#"}]}),className:"px-3 py-1 rounded-full border border-dashed border-border text-[11px] font-semibold hover:bg-foreground
1/5 inline-flex items-center gap-1",children:[e.jsx(X,{className:"h-3 w-3"})," Ajouter"]})]}),(r.anchors??[]).map((u,t)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{value:u.label,onChange:l=>{const c=[...r.anchors??[]];c[t]={...c[t],label:l.target.value},d({...r,anchors:c})},placeholder:"Libellé (ex. Formulaire)",className:"flex-1 bg-background border border-border rounded-md px-2 py-1 text-xs"}),e.jsx("input",{value:u.anchor,onChange:l=>{const c=[...r.anchors??[]];c[t]={...c[t],anchor:l.target.value},d({...r,anchors:c})},onBlur:l=>{const c=[...r.anchors??[]];c[t]={...c[t],anchor:I(l.target.value)},d({...r,anchors:c})},placeholder:"#mon-ancre",className:"flex-1 bg-background border border-border rounded-md px-2 py-1 text-xs font-mono"}),e.jsx("button",{type:"button",onClick:()=>d({...r,anchors:(r.anchors??[]).filter((l,c)=>c!==t)}),className:"p-1.5 text-destructive hover:bg-destructive/10 rounded","aria-label":"Supprimer",children:e.jsx(M,{className:"h-3.5 w-3.5"})})]},t)),(r.anchors??[]).length===0&&e.jsx("p",{className:"text-[11px] text-muted-foreground italic",children:"Aucune ancre déclarée. Ces ancres apparaîtront dans le sélecteur du menu."})]})]}):null}function ge(){const s=Object.keys(q);return e.jsxs("div",{className:"space-y-6 max-w-3xl",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Pages"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Contenus éditoriaux : Presse, Contact, et pages légales (mentions, confidentialité, cookies, CGU)."})]}),e.jsx("div",{className:"space-y-4",children:s.map(r=>e.jsx(pe,{slug:r},r))})]})}function Ae(){return e.jsxs("div",{className:"space-y-8 max-w-3xl",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Header & pied de page"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Toutes les zones encadrant le site : bandeau supérieur, menus, hero, compte à rebours, pied de page et menu flottant."})]}),e.jsxs("section",{className:"space-y-6",children:[e.jsx(ne,{}),e.jsx(le,{}),e.jsx(se,{}),e.jsx(re,{}),e.jsx(xe,{})]}),e.jsxs("section",{className:"space-y-6",children:[e.jsx("h3",{className:"text-lg font-bold border-b border-border pb-2",children:"ð» Pied de page"}),e.jsx(ce,{}),e.jsx(ue,{})]}),e.jsxs("section",{className:"space-y-6",children:[e.jsx("h3",{className:"text-lg font-bold border-b border-border pb-2",children:"ð Pages légales & contenus liés"}),e.jsx("p",{className:"text-sm text-muted-foreground -mt-2",children:"Mentions légales, CGU, confidentialité, cookies, contact, presse⦠ces pages sont reliées au pied de page."}),e.jsx(ge,{})]})]})}export{Ae as component};
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.