import{r as a,j as e}from"./vendor-react-Ci7aBfa0.js";import{b as g,a as u,S as b}from"./SEO-DMWyZzYz.js";import{B as j}from"./index-Bc-jHh02.js";import{s as f}from"./prerender-CvGl2zE9.js";import{c as N,L as t}from"./vendor-Clsy4qE9.js";import{ae as m,U as v,a1 as w,h as A,ac as y,d as D}from"./vendor-icons-4GGNjGXS.js";import"./vendor-helmet-X7vXU3pT.js";import"./vendor-ui-X4tvFhT0.js";function I(){const{slug:l}=N(),[s,n]=a.useState(null),[o,i]=a.useState(!0);a.useEffect(()=>{window.scrollTo(0,0),l&&x(l)},[l]),a.useEffect(()=>{o||f()},[o]);async function x(r){try{i(!0);const c=await j(r);n(c)}catch{n(null)}finally{i(!1)}}if(o)return e.jsx("main",{className:"min-h-screen pt-20 md:pt-24 pb-16 bg-white flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 border-4 border-[#D45A00] border-t-transparent rounded-full animate-spin"})});if(!s)return e.jsx("main",{className:"min-h-screen pt-20 md:pt-24 pb-16 bg-white",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold text-[#333333] mb-4",children:"Article introuvable"}),e.jsx("p",{className:"text-gray-500 mb-6",children:"L'article que vous recherchez n'existe pas ou n'est plus disponible."}),e.jsxs(t,{to:"/blog",className:"inline-flex items-center gap-2 px-6 py-3 bg-[#D45A00] text-white rounded-lg font-semibold hover:bg-[#E55A00]",children:[e.jsx(m,{className:"w-4 h-4"})," Retour au blog"]})]})});const d=g([{name:"Accueil",url:"/"},{name:"Blog",url:"/blog"},{name:s.title,url:`/blog/${s.slug}`}]),p=u({title:s.metaTitle||s.title,description:s.metaDescription||s.excerpt,image:s.coverImage,publishedAt:s.publishedAt,updatedAt:s.updatedAt,slug:s.slug}),h=Math.max(1,Math.ceil((s.content?.replace(/<[^>]*>/g,"").length||0)/1200));return e.jsxs("main",{className:"min-h-screen pt-20 md:pt-24 pb-16 bg-[#F8F9FA]",children:[e.jsx(b,{title:s.metaTitle||`${s.title} | Blog AbidjanGPS`,description:s.metaDescription||s.excerpt,url:`/blog/${s.slug}`,image:s.coverImage,jsonLd:[d,p],type:"article"}),e.jsx("div",{className:"bg-[#333333] text-white py-12 md:py-16",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("nav",{className:"text-sm text-gray-400 mb-6",children:[e.jsx(t,{to:"/",className:"hover:text-[#D45A00] transition-colors",children:"Accueil"}),e.jsx("span",{className:"mx-2",children:"/"}),e.jsx(t,{to:"/blog",className:"hover:text-[#D45A00] transition-colors",children:"Blog"}),e.jsx("span",{className:"mx-2",children:"/"}),e.jsx("span",{className:"text-white font-medium",children:s.title})]}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-extrabold leading-tight mb-6",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-lg md:text-xl text-gray-300 leading-relaxed max-w-3xl",children:s.excerpt}),e.jsxs("div",{className:"flex flex-wrap items-center gap-6 mt-8 text-sm text-gray-400",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(v,{className:"w-4 h-4 text-[#D45A00]"}),"AbidjanGPS"]}),e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(w,{className:"w-4 h-4 text-[#D45A00]"}),new Date(s.publishedAt).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"})]}),e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(A,{className:"w-4 h-4 text-[#D45A00]"}),h," min de lecture"]})]})]})}),e.jsxs("article",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 -mt-8",children:[s.coverImage&&e.jsx("div",{className:"aspect-[16/9] rounded-2xl overflow-hidden shadow-2xl mb-10",children:e.jsx("img",{src:s.coverImage,alt:s.title,className:"w-full h-full object-cover",width:"1200",height:"675",loading:"lazy"})}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-sm p-6 md:p-10 lg:p-12",children:[Array.isArray(s.tags)&&s.tags.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[e.jsx(y,{className:"w-4 h-4 text-[#D45A00]"}),s.tags.map(r=>e.jsx(t,{to:`/blog?tag=${encodeURIComponent(r)}`,className:"text-xs px-3 py-1 bg-[#FFF5ED] text-[#D45A00] rounded-full font-medium hover:bg-[#D45A00] hover:text-white transition-colors",children:r},r))]}),e.jsx("div",{className:`prose prose-lg prose-slate max-w-none
              prose-headings:text-[#333333]
              prose-headings:font-bold
              prose-h2:text-2xl prose-h2:mt-10 prose-h2:mb-4 prose-h2:pt-4 prose-h2:border-t prose-h2:border-gray-100
              prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-3
              prose-p:text-gray-600 prose-p:leading-relaxed prose-p:mb-5
              prose-a:text-[#D45A00] prose-a:no-underline hover:prose-a:underline
              prose-strong:text-[#333333]
              prose-ul:my-6 prose-ul:space-y-2
              prose-li:text-gray-600 prose-li:marker:text-[#D45A00]
              prose-blockquote:border-l-[#D45A00] prose-blockquote:bg-[#FFF5ED] prose-blockquote:py-3 prose-blockquote:px-5 prose-blockquote:rounded-r-lg
              prose-img:rounded-xl prose-img:shadow-md
              prose-hr:border-gray-200`,dangerouslySetInnerHTML:{__html:s.content}}),e.jsx("div",{className:"mt-12 pt-8 border-t border-gray-100",children:e.jsxs("div",{className:"bg-[#FFF5ED] rounded-xl p-6 md:p-8",children:[e.jsx("h3",{className:"text-xl font-bold text-[#333333] mb-2",children:"Besoin d'aide pour choisir votre traceur GPS ?"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Les experts AbidjanGPS vous conseillent et installent votre solution à Abidjan. Devis gratuit."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsx(t,{to:"/boutique",className:"inline-flex items-center justify-center px-6 py-3 bg-[#D45A00] text-white rounded-lg font-semibold hover:bg-[#E55A00] transition-colors",children:"Voir la boutique"}),e.jsxs("a",{href:"https://wa.me/2250170090932?text=Bonjour%20AbidjanGPS%2C%20j'ai%20une%20question%20après%20avoir%20lu%20votre%20article",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-6 py-3 border-2 border-[#25D366] text-[#25D366] rounded-lg font-semibold hover:bg-[#25D366] hover:text-white transition-colors",children:[e.jsx(D,{className:"w-5 h-5 mr-2"}),"Nous écrire sur WhatsApp"]})]})]})}),e.jsx("div",{className:"mt-10",children:e.jsxs(t,{to:"/blog",className:"inline-flex items-center gap-2 text-[#D45A00] font-semibold hover:underline",children:[e.jsx(m,{className:"w-4 h-4"})," Retour au blog"]})})]})]})]})}export{I as default};