{"version":3,"file":"BlogCard.LGSFohMR.mjs","names":[],"sources":["https:/framerusercontent.com/modules/u6gk4brfQkCh7cozvlBd/OfZt5jXxEQ9K8E04oMLh/BlogCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * BlogCard — composant single-card pour Framer CollectionList Item Template.\n *\n * Usage Framer :\n *   1. Sélectionner le CollectionList sur la home (lié à la collection blog)\n *   2. \"Sort by Published, descending\" + \"Limit 4\"\n *   3. Item Template : drag BlogCard depuis le panneau composants\n *   4. Binder les props : Title → {{Title}}, Excerpt → {{Description}},\n *      Cover → {{Cover}}, Slug → {{Slug}}, Date → {{Published}},\n *      Category → fixe (ou nouveau field CMS si besoin)\n *\n * URL hardcoded /blog/{slug} (jamais d'override).\n */const C={jaune:\"rgb(253, 227, 59)\",noir:\"rgb(19, 16, 14)\",blanc:\"rgb(255, 255, 255)\",noirSoft:\"rgba(19, 16, 14, 0.65)\"};const FONT_STACK='Montserrat, \"Helvetica Neue\", Helvetica, Arial, sans-serif';const STYLE_ID=\"tdt-blog-card-v1\";function useStyles(){useEffect(()=>{if(typeof document===\"undefined\")return;if(document.getElementById(STYLE_ID))return;const style=document.createElement(\"style\");style.id=STYLE_ID;style.textContent=`\n.tdt-blogcard {\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  height: 100%;\n  background: ${C.blanc};\n  border: 1.5px solid ${C.noir};\n  text-decoration: none;\n  color: ${C.noir};\n  overflow: hidden;\n  transition: transform 200ms ease, box-shadow 200ms ease;\n  cursor: pointer;\n}\n.tdt-blogcard:hover {\n  transform: translateY(-4px);\n  box-shadow: 8px 8px 0 ${C.noir};\n}\n.tdt-blogcard-cover {\n  width: 100%;\n  aspect-ratio: 16 / 10;\n  background-size: cover;\n  background-position: center;\n  background-repeat: no-repeat;\n  background-color: ${C.jaune};\n  position: relative;\n  flex-shrink: 0;\n}\n.tdt-blogcard-date {\n  position: absolute;\n  top: 12px;\n  left: 12px;\n  background: ${C.blanc};\n  color: ${C.noir};\n  font-family: ${FONT_STACK};\n  font-weight: 700;\n  font-size: 11px;\n  letter-spacing: 0.06em;\n  text-transform: uppercase;\n  padding: 6px 10px;\n}\n.tdt-blogcard-body {\n  padding: 20px 18px 22px 18px;\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  flex: 1;\n}\n.tdt-blogcard-eyebrow {\n  font-family: ${FONT_STACK};\n  font-weight: 700;\n  font-size: 11px;\n  letter-spacing: 0.08em;\n  text-transform: uppercase;\n  color: ${C.noir};\n  margin: 0;\n}\n.tdt-blogcard-title {\n  font-family: ${FONT_STACK};\n  font-weight: 800;\n  font-size: 18px;\n  line-height: 1.25;\n  letter-spacing: -0.01em;\n  text-transform: uppercase;\n  color: ${C.noir};\n  margin: 0;\n  text-wrap: balance;\n}\n.tdt-blogcard-excerpt {\n  font-family: ${FONT_STACK};\n  font-weight: 400;\n  font-size: 13px;\n  line-height: 1.5;\n  color: ${C.noirSoft};\n  margin: 0;\n  flex: 1;\n  display: -webkit-box;\n  -webkit-line-clamp: 4;\n  -webkit-box-orient: vertical;\n  overflow: hidden;\n}\n.tdt-blogcard-cta {\n  font-family: ${FONT_STACK};\n  font-weight: 700;\n  font-size: 12px;\n  letter-spacing: 0.06em;\n  text-transform: uppercase;\n  color: ${C.noir};\n  margin-top: 4px;\n}\n\n@container (max-width: 380px) {\n  .tdt-blogcard-body { padding: 16px 14px 18px 14px; gap: 10px; }\n  .tdt-blogcard-title { font-size: 17px; }\n  .tdt-blogcard-excerpt { font-size: 13px; }\n}\n`;document.head.appendChild(style);},[]);}const MONTHS=[\"JAN\",\"F\\xc9V\",\"MAR\",\"AVR\",\"MAI\",\"JUI\",\"JUL\",\"AO\\xdb\",\"SEP\",\"OCT\",\"NOV\",\"D\\xc9C\"];function formatDate(input){if(!input)return\"\";if(/^\\d{4}-\\d{2}-\\d{2}/.test(input)){const d=new Date(input);if(!Number.isNaN(d.getTime())){return`${String(d.getDate()).padStart(2,\"0\")} ${MONTHS[d.getMonth()]} ${d.getFullYear()}`;}}return input;}function buildBlogHref(slugInput){if(!slugInput)return\"/blog\";let s=slugInput.trim();s=s.replace(/^\\/+/,\"\");s=s.replace(/^blog\\//,\"\");s=s.replace(/\\/+$/,\"\");if(!s)return\"/blog\";return`/blog/${s}`;}function stripHtml(input){if(!input)return\"\";if(typeof document!==\"undefined\"){const div=document.createElement(\"div\");div.innerHTML=input;return(div.textContent||\"\").trim();}return input.replace(/<[^>]*>/g,\"\").trim();}/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function BlogCard(props){const{title=\"Titre de l'article\",excerpt=\"\",cover=\"\",slug=\"\",category=\"ACTUALIT\\xc9\",date=\"\",ctaLabel=\"Lire l'article →\"}=props;useStyles();const href=buildBlogHref(slug);const formattedDate=formatDate(date);const cleanExcerpt=stripHtml(excerpt);const coverStyle=cover?{backgroundImage:`url(${cover})`}:{};return /*#__PURE__*/_jsxs(\"a\",{className:\"tdt-blogcard\",href:href,\"data-framer-name\":\"tdt-blog-card\",children:[/*#__PURE__*/_jsx(\"div\",{className:\"tdt-blogcard-cover\",style:coverStyle,children:formattedDate&&/*#__PURE__*/_jsx(\"span\",{className:\"tdt-blogcard-date\",children:formattedDate})}),/*#__PURE__*/_jsxs(\"div\",{className:\"tdt-blogcard-body\",children:[category&&/*#__PURE__*/_jsx(\"p\",{className:\"tdt-blogcard-eyebrow\",children:category}),/*#__PURE__*/_jsx(\"h3\",{className:\"tdt-blogcard-title\",children:title}),cleanExcerpt&&/*#__PURE__*/_jsx(\"p\",{className:\"tdt-blogcard-excerpt\",children:cleanExcerpt}),/*#__PURE__*/_jsx(\"span\",{className:\"tdt-blogcard-cta\",children:ctaLabel})]})]});}addPropertyControls(BlogCard,{title:{type:ControlType.String,title:\"Titre\",defaultValue:\"Titre de l'article\",description:\"Binder \\xe0 {{Title}} dans le CollectionList.\"},excerpt:{type:ControlType.String,title:\"Excerpt\",displayTextArea:true,defaultValue:\"\",description:\"Binder \\xe0 {{Description}} (string).\"},cover:{type:ControlType.Image,title:\"Cover\",description:\"Binder \\xe0 {{Cover}}.\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\",description:\"Binder \\xe0 {{Slug}}. URL → /blog/{slug}.\"},category:{type:ControlType.String,title:\"Cat\\xe9gorie\",defaultValue:\"ACTUALIT\\xc9\",description:\"Texte fixe ou nouveau field CMS si besoin.\"},date:{type:ControlType.String,title:\"Date\",defaultValue:\"\",description:\"Binder \\xe0 {{Published}} (auto-formatt\\xe9e FR).\"},ctaLabel:{type:ControlType.String,title:\"CTA label\",defaultValue:\"Lire l'article →\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogCard.map"],"mappings":"iLAY2O,SAAS,GAAW,CAAC,MAAc,CAAyC,GAArC,OAAO,SAAW,KAAsB,SAAS,eAAe,EAAS,CAAC,OAAO,IAAM,EAAM,SAAS,cAAc,QAAQ,CAAC,EAAM,GAAG,EAAS,EAAM,YAAY;;;;;;gBAMna,EAAE,MAAM;wBACA,EAAE,KAAK;;WAEpB,EAAE,KAAK;;;;;;;0BAOQ,EAAE,KAAK;;;;;;;;sBAQX,EAAE,MAAM;;;;;;;;gBAQd,EAAE,MAAM;WACb,EAAE,KAAK;iBACD,EAAW;;;;;;;;;;;;;;;iBAeX,EAAW;;;;;WAKjB,EAAE,KAAK;;;;iBAID,EAAW;;;;;;WAMjB,EAAE,KAAK;;;;;iBAKD,EAAW;;;;WAIjB,EAAE,SAAS;;;;;;;;;iBASL,EAAW;;;;;WAKjB,EAAE,KAAK;;;;;;;;;EAShB,SAAS,KAAK,YAAY,EAAM,EA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