Files
afrov2/.next/static/chunks/00a35d812540ce44.js
2026-04-08 14:46:10 +02:00

1 line
17 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94196,e=>{"use strict";let s=(0,e.i(75840).default)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);e.s(["Share2",()=>s],94196)},66599,e=>{"use strict";let s=(0,e.i(75840).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>s],66599)},99891,e=>{"use strict";let s=(0,e.i(75840).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>s],99891)},51809,e=>{"use strict";let s=(0,e.i(75840).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",()=>s],51809)},98003,73667,89844,35774,e=>{"use strict";var s=e.i(75840);let r=(0,s.default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["Star",()=>r],98003);let a=(0,s.default)("facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]);e.s(["Facebook",()=>a],73667);let t=(0,s.default)("linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);e.s(["Linkedin",()=>t],89844);let l=(0,s.default)("instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);e.s(["Instagram",()=>l],35774)},46314,e=>{"use strict";let s=(0,e.i(75840).default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);e.s(["MapPin",()=>s],46314)},5763,e=>{"use strict";let s=(0,e.i(75840).default)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);e.s(["Phone",()=>s],5763)},75531,e=>{"use strict";let s=(0,e.i(75840).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",()=>s],75531)},43252,e=>{"use strict";let s=(0,e.i(75840).default)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);e.s(["Award",()=>s],43252)},14828,e=>{"use strict";var s=e.i(5974),r=e.i(32653),a=e.i(42500),t=e.i(23862),l=e.i(66599),i=e.i(46314),d=e.i(99891),n=e.i(75840);let c=(0,n.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);var o=e.i(5763),m=e.i(75531),x=e.i(98003),h=e.i(73667),u=e.i(89844),f=e.i(35774),g=e.i(51809),p=e.i(94196);let b=(0,n.default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var y=e.i(43252);let v=(0,n.default)("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);var j=e.i(67810),N=e.i(57348);e.s(["default",0,()=>{let e,{id:n}=(0,t.useParams)(),w=j.MOCK_BUSINESSES.find(e=>e.id===n),[k,M]=(0,r.useState)({name:"",email:"",message:""}),[S,C]=(0,r.useState)("idle"),E=(0,r.useMemo)(()=>j.MOCK_OFFERS.filter(e=>e.businessId===n&&e.active),[n]);if((0,r.useEffect)(()=>{window.scrollTo(0,0)},[n]),!w)return(0,s.jsxs)("div",{className:"min-h-[60vh] flex flex-col items-center justify-center",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Entreprise introuvable"}),(0,s.jsxs)(a.default,{href:"/directory",className:"text-brand-600 hover:text-brand-700 font-medium flex items-center",children:[(0,s.jsx)(l.ArrowLeft,{className:"w-4 h-4 mr-2"})," Retour à l'annuaire"]})]});let P=w.videoUrl&&(e=w.videoUrl.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/))&&11===e[2].length?`https://www.youtube.com/embed/${e[2]}`:null;return(0,s.jsxs)("div",{className:"bg-gray-50 min-h-screen pb-12",children:[(0,s.jsxs)("div",{className:"h-48 md:h-64 bg-gradient-to-r from-gray-900 to-gray-800 relative overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 opacity-20 bg-[url('https://www.transparenttextures.com/patterns/cubes.png')]"}),(0,s.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-full flex flex-col justify-between py-6",children:(0,s.jsxs)(a.default,{href:"/directory",className:"inline-flex items-center text-white/80 hover:text-white transition-colors w-fit",children:[(0,s.jsx)(l.ArrowLeft,{className:"w-4 h-4 mr-2"})," Retour"]})})]}),(0,s.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 -mt-20 relative z-10",children:[(0,s.jsx)("div",{className:"bg-white rounded-xl shadow-lg border border-gray-100 overflow-hidden",children:(0,s.jsx)("div",{className:"p-6 md:p-8",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row gap-6 items-start",children:[(0,s.jsxs)("div",{className:"w-32 h-32 md:w-40 md:h-40 rounded-xl bg-white p-1 shadow-md -mt-16 md:-mt-24 border border-gray-100 flex-shrink-0 relative",children:[(0,s.jsx)("img",{src:w.logoUrl,alt:w.name,className:"w-full h-full object-cover rounded-lg bg-gray-50"}),w.isFeatured&&(0,s.jsx)("div",{className:"absolute -top-3 -right-3 bg-yellow-400 text-yellow-900 rounded-full p-2 shadow-md",title:"Entrepreneur du Mois",children:(0,s.jsx)(y.Award,{className:"w-6 h-6"})})]}),(0,s.jsxs)("div",{className:"flex-1 w-full",children:[(0,s.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h1",{className:"text-3xl font-serif font-bold text-gray-900 flex items-center gap-2",children:w.name}),w.verified&&(0,s.jsx)("span",{title:"Entreprise Vérifiée",children:(0,s.jsx)(m.CheckCircle,{className:"w-6 h-6 text-blue-500"})})]}),(0,s.jsx)("div",{className:"text-brand-600 font-medium mt-1 uppercase tracking-wide text-sm",children:w.category}),w.isFeatured&&(0,s.jsxs)("div",{className:"inline-flex items-center px-2 py-1 rounded bg-yellow-100 text-yellow-800 text-xs font-bold mt-2",children:[(0,s.jsx)(y.Award,{className:"w-3 h-3 mr-1"})," ENTREPRENEUR DU MOIS"]})]}),(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsxs)("button",{className:"inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50",children:[(0,s.jsx)(p.Share2,{className:"w-4 h-4 mr-2"})," Partager"]}),(0,s.jsx)("a",{href:"#contact-form",className:"inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-brand-600 hover:bg-brand-700",children:"Contacter"})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-4 mt-6 text-sm text-gray-500 border-t border-gray-100 pt-4",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.MapPin,{className:"w-4 h-4 mr-1 text-gray-400"}),w.location]}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(x.Star,{className:"w-4 h-4 mr-1 text-yellow-400 fill-current"}),(0,s.jsx)("span",{className:"font-bold text-gray-700 mr-1",children:w.rating}),"(",w.viewCount," vues)"]}),w.tags.map(e=>(0,s.jsxs)("span",{className:"bg-gray-100 text-gray-600 px-2 py-1 rounded text-xs",children:["#",e]},e))]})]})]})})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 mt-8",children:[(0,s.jsxs)("div",{className:"lg:col-span-2 space-y-8",children:[(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-6 md:p-8",children:[(0,s.jsx)("h2",{className:"text-xl font-bold font-serif text-gray-900 mb-4",children:"À propos"}),(0,s.jsx)("p",{className:"text-gray-600 leading-relaxed whitespace-pre-line",children:w.description})]}),(w.founderName||w.founderImageUrl)&&(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-6 md:p-8 overflow-hidden relative",children:[(0,s.jsx)("div",{className:"absolute top-0 right-0 p-4 opacity-10",children:(0,s.jsx)(v,{className:"w-24 h-24 text-brand-500"})}),(0,s.jsx)("h2",{className:"text-xl font-bold font-serif text-gray-900 mb-6 relative z-10",children:"Le Fondateur"}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row gap-6 items-center sm:items-start relative z-10",children:[w.founderImageUrl&&(0,s.jsx)("img",{src:w.founderImageUrl,alt:w.founderName,className:"w-32 h-32 rounded-full object-cover border-4 border-gray-50 shadow-md"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-bold text-gray-900",children:w.founderName}),(0,s.jsx)("p",{className:"text-brand-600 text-sm font-medium mb-3",children:"CEO & Fondateur"}),(0,s.jsx)("p",{className:"text-gray-600 italic",children:"\"Notre mission est d'apporter des solutions concrètes et adaptées aux réalités locales, tout en visant l'excellence internationale.\""}),w.keyMetric&&(0,s.jsxs)("div",{className:"mt-4 inline-block bg-brand-50 text-brand-700 px-3 py-1 rounded-full text-xs font-bold",children:["🚀 ",w.keyMetric]})]})]})]}),P&&(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-6 md:p-8",children:[(0,s.jsxs)("h2",{className:"text-xl font-bold font-serif text-gray-900 mb-4 flex items-center",children:[(0,s.jsx)(g.Play,{className:"w-5 h-5 mr-2 text-brand-600"})," Présentation Vidéo"]}),(0,s.jsx)("div",{className:"aspect-w-16 aspect-h-9 bg-gray-100 rounded-lg overflow-hidden",children:(0,s.jsx)("iframe",{src:P,title:`Pr\xe9sentation de ${w.name}`,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-64 md:h-96 rounded-lg"})})]}),E.length>0&&(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-6 md:p-8",children:[(0,s.jsx)("h2",{className:"text-xl font-bold font-serif text-gray-900 mb-6",children:"Produits & Services"}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:E.map(e=>(0,s.jsxs)("div",{className:"border border-gray-200 rounded-lg overflow-hidden hover:shadow-md transition-shadow",children:[(0,s.jsxs)("div",{className:"h-40 bg-gray-100 relative",children:[(0,s.jsx)("img",{src:e.imageUrl,alt:e.title,className:"w-full h-full object-cover"}),(0,s.jsx)("span",{className:`absolute top-2 right-2 px-2 py-1 text-xs font-bold rounded uppercase ${e.type===N.OfferType.PRODUCT?"bg-blue-100 text-blue-800":"bg-purple-100 text-purple-800"}`,children:e.type===N.OfferType.PRODUCT?"Produit":"Service"})]}),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("h3",{className:"font-bold text-gray-900 line-clamp-1",children:e.title}),(0,s.jsxs)("p",{className:"text-brand-600 font-bold mt-1",children:[new Intl.NumberFormat("fr-FR").format(e.price)," ",e.currency]}),(0,s.jsx)("button",{className:"mt-3 w-full block text-center bg-gray-50 text-gray-700 py-2 rounded text-sm font-medium hover:bg-gray-100 transition-colors",children:"Commander"})]})]},e.id))})]})]}),(0,s.jsxs)("div",{className:"space-y-8",children:[(0,s.jsxs)("div",{id:"contact-form",className:"bg-white rounded-xl shadow-sm border border-gray-100 p-6 sticky top-24",children:[(0,s.jsx)("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Contact"}),(0,s.jsxs)("div",{className:"space-y-4 mb-6",children:[(0,s.jsxs)("a",{href:`mailto:${w.contactEmail}`,className:"flex items-center text-gray-600 hover:text-brand-600 transition-colors",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-brand-50 flex items-center justify-center mr-3 text-brand-600 flex-shrink-0",children:(0,s.jsx)(c,{className:"w-4 h-4"})}),(0,s.jsx)("span",{className:"text-sm truncate",children:w.contactEmail})]}),w.contactPhone&&(0,s.jsxs)("a",{href:`tel:${w.contactPhone}`,className:"flex items-center text-gray-600 hover:text-brand-600 transition-colors",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-brand-50 flex items-center justify-center mr-3 text-brand-600 flex-shrink-0",children:(0,s.jsx)(o.Phone,{className:"w-4 h-4"})}),(0,s.jsx)("span",{className:"text-sm",children:w.contactPhone})]}),w.socialLinks?.website&&(0,s.jsxs)("a",{href:w.socialLinks.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center text-gray-600 hover:text-brand-600 transition-colors",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-full bg-brand-50 flex items-center justify-center mr-3 text-brand-600 flex-shrink-0",children:(0,s.jsx)(d.Globe,{className:"w-4 h-4"})}),(0,s.jsx)("span",{className:"text-sm truncate",children:"Site Web"})]})]}),(0,s.jsxs)("div",{className:"border-t border-gray-100 pt-6",children:[(0,s.jsx)("h4",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Envoyer un message"}),"success"===S?(0,s.jsx)("div",{className:"bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded-md text-sm",children:"Message envoyé avec succès !"}):(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),C("sending"),setTimeout(()=>{C("success"),M({name:"",email:"",message:""}),setTimeout(()=>C("idle"),3e3)},1500)},className:"space-y-3",children:[(0,s.jsx)("div",{children:(0,s.jsx)("input",{type:"text",placeholder:"Votre nom",required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-1 focus:ring-brand-500",value:k.name,onChange:e=>M({...k,name:e.target.value})})}),(0,s.jsx)("div",{children:(0,s.jsx)("input",{type:"email",placeholder:"Votre email",required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-1 focus:ring-brand-500",value:k.email,onChange:e=>M({...k,email:e.target.value})})}),(0,s.jsx)("div",{children:(0,s.jsx)("textarea",{placeholder:"Votre message...",required:!0,rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-1 focus:ring-brand-500 resize-none",value:k.message,onChange:e=>M({...k,message:e.target.value})})}),(0,s.jsx)("button",{type:"submit",disabled:"sending"===S,className:"w-full flex justify-center items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-gray-900 hover:bg-gray-800 focus:outline-none transition-colors disabled:opacity-70",children:"sending"===S?"Envoi...":(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b,{className:"w-3 h-3 mr-2"})," Envoyer"]})})]})]}),(0,s.jsx)("div",{className:"mt-6 pt-6 border-t border-gray-100",children:(0,s.jsxs)("div",{className:"flex justify-center space-x-6",children:[w.socialLinks?.facebook&&(0,s.jsx)("a",{href:w.socialLinks.facebook,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-[#1877F2] transition-colors",children:(0,s.jsx)(h.Facebook,{className:"w-5 h-5"})}),w.socialLinks?.linkedin&&(0,s.jsx)("a",{href:w.socialLinks.linkedin,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-[#0A66C2] transition-colors",children:(0,s.jsx)(u.Linkedin,{className:"w-5 h-5"})}),w.socialLinks?.instagram&&(0,s.jsx)("a",{href:w.socialLinks.instagram,target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-[#E4405F] transition-colors",children:(0,s.jsx)(f.Instagram,{className:"w-5 h-5"})})]})})]}),(0,s.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-100 p-6",children:[(0,s.jsx)("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Dans la même catégorie"}),(0,s.jsx)("div",{className:"space-y-4",children:j.MOCK_BUSINESSES.filter(e=>e.category===w.category&&e.id!==w.id).slice(0,3).map(e=>(0,s.jsxs)(a.default,{href:`/directory/${e.id}`,className:"flex items-center group",children:[(0,s.jsx)("div",{className:"w-12 h-12 rounded bg-gray-100 overflow-hidden flex-shrink-0",children:(0,s.jsx)("img",{src:e.logoUrl,alt:e.name,className:"w-full h-full object-cover"})}),(0,s.jsxs)("div",{className:"ml-3 overflow-hidden",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-gray-900 truncate group-hover:text-brand-600 transition-colors",children:e.name}),(0,s.jsx)("p",{className:"text-xs text-gray-500 truncate",children:e.location})]})]},e.id))})]})]})]})]})]})}],14828)}]);