PageSourceSearch

https://codir.pro/assets/Contact-D23yAEDQ.js

js codir.pro collected 2026-10-02 02:06:04 UTC 4,622 bytes, 1 lines download raw bytes

1import{u as g,r as x,j as e,m as h,L as f,v as j,t as d,b as u}from"./index-B0sM48fE.js";import{A as w}from"./arrow-left-C0ILUW3s.js";import{S as v}from"./send-Cui5vdSF.js";function C(){const o=g(),[t,n]=x.useState({name:"",email:"",subject:"",message:""}),[s,l]=x.useState(!1),a=c=>{const{name:i,value:p}=c.target;n(b=>({...b,[i]:p}))},r=async c=>{if(c.preventDefault(),!t.name||!t.email||!t.subject||!t.message){d.error("Merci de remplir tous les champs");return}l(!0);try{const i=await u.entities.ContactMessage.create(t);u.functions.invoke("sendContactNotification",{messageId:i.id}).catch(()=>{}),d.success("Message envoyé — on te répond très vite."),n({name:"",email:"",subject:"",message:""})}catch(i){console.error(i),d.error("Échec de l'envoi. Réessaie.")}finally{l(!1)}};return e.jsxs("div",{className:"min-h-screen bg-black text-white",children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 z-40 bg-black/70 backdrop-blur-md border-b border-white/5",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-4 flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>o("/"),className:"flex items-center gap-2 text-white/60 hover:text-white transition-colors text-sm font-medium",children:[e.jsx(w,{className:"h-4 w-4"})," Retour"]}),e.jsx("span",{className:"font-space font-bold text-white tracking-tight",children:"CODIR"}),e.jsx("div",{className:"w-[80px]"})]})}),e.jsxs("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-[700px] overflow-hidden",children:[e.jsx("div",{className:"absolute top-32 left-1/2 -translate-x-1/2 w-[600px] h-[600px] bg-primary/10 rounded-full blur-[140px]"}),e.jsx("div",{className:"absolute top-64 right-0 w-[400px] h-[400px] bg-accent/5 rounded-full blur-[120px]"})]}),e.jsx("div",{className:"relative pt-32 pb-20 px-6",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs(h.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-16",children:[e.jsx("div",{className:"text-xs font-bold text-white/80 uppercase tracking-[0.2em] mb-4",children:"Contactez-nous"}),e.jsx("h1",{className:"font-space font-black text-3xl sm:text-6xl text-white tracking-tight mb-4",children:"Parlons-en."}),e.jsx("p",{className:"text-white/80 text-base sm:text-lg max-w-xl mx-auto",children:"Questions, retours, partenariats — on lit chaque message."})]}),e.jsx("div",{className:"max-w-2xl mx-auto",children:e.jsxs(h.form,{onSubmit:r,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},className:"bg-[#0a0a0a] border border-white/10 rounded-2xl p-8 sm:p-10 space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(m,{label:"Nom",name:"name",value:t.name,onChange:a,placeholder:"Ton nom",disabled:s}),e.jsx(m,{label:"Email",name:"email",type:"email",value:t.email,onChange:a,placeholder:"[email protected]",disabled:s})]}),e.jsx(m,{label:"Sujet",name:"subject",value:t.subject,onChange:a,placeholder:"De quoi s'agit-il ?",disabled:s}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-semibold text-white/80 uppercase tracking-wider mb-2",children:"Message"}),e.jsx("textarea",{name:"message",value:t.message,onChange:a,placeholder:"Dis-nous en plus...",disabled:s,rows:7,className:"w-full bg-black/40 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-white/25 focus:outline-none focus:border-white/30 transition-colors resize-none"})]}),e.jsx("button",{type:"submit",disabled:s,className:"w-full flex items-center justify-center gap-2 bg-white text-black font-semibold py-3.5 rounded-full hover:bg-white/90 transition-colors disabled:opacity-50",children:s?e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"h-4 w-4 animate-spin"}),"Envoi…"]}):e.jsxs(e.Fragment,{children:["Envoyer le message",e.jsx(v,{className:"h-4 w-4"})]})}),e.jsxs("p",{className:"text-center text-xs text-white/80",children:["En soumettant, tu acceptes nos"," ",e.jsx(j,{to:"/cgu",className:"text-white hover:text-white underline underline-offset-2",children:"conditions"}),"."]})]})})]})})]})}function m({label:o,name:t,type:n="text",value:s,onChange:l,placeholder:a,disabled:r}){return e.jsxs("div",{children:[e.jsx("label",{className:"block text-[11px] font-semibold text-white/80 uppercase tracking-wider mb-2",children:o}),e.jsx("input",{type:n,name:t,value:s,onChange:l,placeholder:a,disabled:r,className:"w-full bg-black/40 border border-white/10 rounded-xl px-4 py-3 text-white placeholder:text-white/25 focus:outline-none focus:border-white/30 transition-colors"})]})}
1export{C 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.