/* Contact screen — Camille Bardiau */ (function () { const NS = window.CamilleBardiauDesignSystem_92b58f; const { Button, Eyebrow, SectionHeading, Card, Input, FIELD_CSS } = NS; const Icon = (n, p) => window.CBKit.Icon(n, p); const D = window.CB_DATA; /* Inject shared field CSS for native elements */ (function() { if (typeof document === "undefined") return; if (document.getElementById("cb-field-styles")) return; var el = document.createElement("style"); el.id = "cb-field-styles"; el.textContent = FIELD_CSS || ""; document.head.appendChild(el); })(); function Contact() { const [status, setStatus] = React.useState('idle'); // idle | sending | sent | error const submit = (e) => { e.preventDefault(); setStatus('sending'); const form = e.target; const data = { prenom: form['c-prenom'].value, nom: form['c-nom'].value, tel: form['c-tel'].value, email: form['c-email'].value, motif: form['c-motif'] ? form['c-motif'].value : '', message: form['c-msg'].value, _subject: 'Nouveau message depuis le site — Camille Bardiau', _captcha: 'false', _template: 'table', }; fetch('https://formsubmit.co/ajax/contact.camillebardiau@gmail.com', { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, body: JSON.stringify(data), }) .then(function(res) { return res.json(); }) .then(function(json) { setStatus(json.success === 'true' || json.success === true ? 'sent' : 'error'); }) .catch(function() { setStatus('error'); }); }; const sent = status === 'sent'; const error = status === 'error'; const busy = status === 'sending'; return (
Faisons connaissance} intro="Une question, une envie de prendre rendez-vous ? Écrivez-moi — chaque message est lu avec attention et reçoit une réponse personnalisée." />
{/* Form */} {sent ? (
{Icon("check", { style: { width: 28, height: 28 } })}

Message envoyé !

Merci de votre confiance. Camille vous répond très vite.

) : error ? (

Une erreur est survenue. Veuillez réessayer ou :

) : (

Écrivez-moi

Je vous réponds personnellement sous 48 h.

{/* Name row */}
{/* Contact row */}
{/* Motif */}
{/* Message */}