1import{r as i,j as e}from"./react-vendor-SL2CuwCp.js";import{Q as I,a as L,u as C,w as D,x as E,M as v,y}from"./index-B39jxOKW.js";import{u as A}from"./query-DEtUnGgE.js";import{P as S}from"./PageBreadcrumb-CIC2xIaB.js";import{P as w}from"./ParkMap-DXEPxmfI.js";import{R as z}from"./RouteSeo-bbP-dk1J.js";import{M as R}from"./map-2dnR8Mbd.js";import"./helmet-CdbWDaiJ.js";import"./router-CU9rlUgi.js";import"./motion-Dx0sOgyJ.js";import"./house-D9CFg9l9.js";import"./locate-fixed-B5C2coP4.js";import"./SEO-DQq7ctLP.js";const a={title:"Contactez-nous",subtitle:"Une question ? N'hésitez pas à nous écrire",phone:"01 23 45 67 89",email:"[email protected]",address:"",mapUrl:"",openingHours:"Du lundi au dimanche, 9h-19h (haute saison)",subjects:["Information générale","Réservation","Groupe / Ãvénement","Réclamation","Partenariat","Autre"]};function U(){const{data:n,isLoading:c,error:r}=A({queryKey:I.contact,queryFn:async()=>{try{const s=await L("contact");return{title:s.title||a.title,subtitle:s.subtitle||a.subtitle,phone:s.phone||a.phone,email:s.email||a.email,address:s.address||a.address,mapUrl:s.mapUrl||a.mapUrl,openingHours:s.openingHours||a.openingHours,subjects:s.subjects?.length?s.subjects:a.subjects}}catch{return a}}});return{data:n??a,loading:c,error:r,defaultData:a}}const O=(n,c,r,s)=>{const d=(r-n)*Math.PI/180,u=(s-c)*Math.PI/180,x=Math.sin(d/2)*Math.sin(d/2)+Math.cos(n*Math.PI/180)*Math.cos(r*Math.PI/180)*Math.sin(u/2)*Math.sin(u/2);return 6371*(2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x)))};function Z(){const{parks:n}=C(),{data:c}=U(),r=n.filter(t=>t.coordinates&&typeof t.coordinates.lat=="number"),[s,f]=i.useState(null),[d,u]=i.useState(null),[x,b]=i.useState(null),[T,l]=i.useState(null),[k,h]=i.useState(!1),[q,N]=i.useState(!1),M=t=>t.contact?.phone?t.contact.phone:t.phone||t.telephone||t.phone_number||t.contact_phone||null,P=t=>t.address||t.location||t.adresse||"Adresse non renseignée";return i.useCallback(()=>{if(!navigator.geolocation){l("La géolocalisation n'est pas supportée par votre navigateur.");return}h(!0),l(null),N(!1),navigator.geolocation.getCurrentPosition(t=>{const o={lat:t.coords.latitude,lng:t.coords.longitude};f(o);let m=1/0,p=null;r.forEach(g=>{const j=O(o.lat,o.lng,g.coordinates.lat,g.coordinates.lng);j<m&&(m=j,p=g)}),p&&(u(p),b(m),N(!0)),h(!1)},t=>{switch(h(!1),t.code){case t.PERMISSION_DENIED:l("Vous avez refusé l'accès à votre position.");break;case t.POSITION_UNAVAILABLE:l("Impossible de déterminer votre position.");break;case t.TIMEOUT:l("La demande de position a expiré.");break;default:l("Une erreur inconnue est survenue.")}},{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})},[r]),e.jsxs(e.Fragment,{children:[e.jsx(z,{routeKey:"contact",fallbackTitle:"Contact â NoLimit Aventure",fallbackDescription:"Contactez-nous pour toutes vos questions : réservations, groupes, team building, partenariats. On vous répond vite."}),e.jsxs("div",{className:"min-h-screen pt-28 pb-20 bg-gray-50",children:[e.jsx(S,{items:[{label:"Contact"}]}),e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-black text-green-800 mb-4",children:c.title}),e.jsx("p",{className:"text-xl text-gray-600 max-w-2xl mx-auto",children:c.subtitle})]}),e.jsx(w,{}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 mt-12",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-md",children:[e.jsx("h2",{className:"text-2xl font-black text-green-800 mb-6",children:"Laissez nous un message via notre formulaire"}),e.jsx(D,{html:E})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-8 shadow-md",children:[e.jsxs("h2",{className:"text-2xl font-black text-green-800 mb-6 flex items-center gap-2",children:[e.jsx(R,{className:"size-6"})," Nos parcs"]}),e.jsxs("div",{className:"space-y-5",children:[n.map(t=>{const o=M(t),m=P(t);return e.jsx("div",{className:"border-b border-gray-100 pb-4 last:border-0",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(v,{className:"size-5 text-green-600 flex-shrink-0 mt-1"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-gray-900 font-bold text-lg",children:t.name}),e.jsxs("div",{className:"flex items-start gap-2 mt-1",children:[e.jsx(v,{className:"size-3.5 text-gray-400 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-sm text-gray-600",children:m})]}),o?e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(y,{className:"size-3.5 text-gray-400"}),e.jsx("a",{href:`tel:${o.replace(/\s/g,"")}`,className:"text-sm text-orange-600 hover:underline",children:o})]}):e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx(y,{className:"size-3.5 text-gray-300"}),e.jsx("span",{className:"text-sm text-gray-400",children:"Téléphone non communiqué"})]})]})]})},t.id)}),n.length===0&&e.jsx("p",{className:"text-gray-500 text-center py-8",children:"Aucun parc disponible pour le moment."})]})]})]})]})})]})]})}export{Z as ContactPage};
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.