{"version":3,"file":"StickyCTA.Cy-PyUTh.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/zg4zrcVWK4eWtzYi1M4i/yNfYTh1cO87DOqpMv8jn/StickyCTA.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Bouton flottant mobile : apparaît après le hero, se cache sur la section contact.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function StickyCTA({label,link,after,hideOn,style}){const canvas=RenderTarget.current()===RenderTarget.canvas;const[show,setShow]=useState(false);useEffect(()=>{if(canvas)return;let hidden=false;const target=hideOn?document.getElementById(hideOn):null;const io=target&&\"IntersectionObserver\"in window?new IntersectionObserver(e=>{hidden=e[0].isIntersecting;on();},{threshold:.05}):null;if(io&&target)io.observe(target);function on(){setShow(window.scrollY>window.innerHeight*(after||.9)&&!hidden);}on();window.addEventListener(\"scroll\",on,{passive:true});return()=>{window.removeEventListener(\"scroll\",on);io&&io.disconnect();};},[canvas,after,hideOn]);const vis=canvas||show;return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",height:canvas?64:0},children:/*#__PURE__*/_jsx(\"div\",{style:{position:canvas?\"relative\":\"fixed\",left:0,right:0,bottom:0,zIndex:50,display:\"flex\",justifyContent:\"center\",padding:\"0 16px calc(12px + env(safe-area-inset-bottom))\",pointerEvents:vis?\"auto\":\"none\",opacity:vis?1:0,transform:vis?\"none\":\"translateY(16px)\",transition:\"opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1)\"},children:/*#__PURE__*/_jsxs(\"a\",{href:link,style:{display:\"inline-flex\",alignItems:\"center\",gap:10,height:50,padding:\"0 22px\",borderRadius:999,background:\"linear-gradient(135deg, #FF3B2F 0%, #FF6A1A 60%, #FF9A2E 100%)\",color:\"#FFFFFF\",fontFamily:\"Inter, system-ui, sans-serif\",fontSize:15.5,fontWeight:600,textDecoration:\"none\",boxShadow:\"0 14px 30px -12px rgba(255,74,31,.6)\",whiteSpace:\"nowrap\"},children:[label,/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":true,children:\"→\"})]})})});}StickyCTA.defaultProps={label:\"Parler de mon projet\",link:\"#contact\",after:.9,hideOn:\"contact\"};addPropertyControls(StickyCTA,{label:{type:ControlType.String,title:\"Texte\"},link:{type:ControlType.String,title:\"Lien\"},after:{type:ControlType.Number,title:\"Apr\\xe8s (\\xe9crans)\",min:0,max:3,step:.1},hideOn:{type:ControlType.String,title:\"Cacher sur (id)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StickyCTA\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyCTA.map"],"mappings":"6MAIG,SAAwB,EAAU,CAAC,QAAM,OAAK,QAAM,SAAO,SAAO,CAAC,IAAM,EAAO,EAAa,QAAQ,IAAI,EAAa,OAAY,CAAC,EAAK,GAASA,EAAS,EAAK,EAAE,MAAc,CAAC,GAAG,EAAO,OAAO,IAAI,EAAO,GAAY,EAAO,EAAO,SAAS,eAAe,CAAM,EAAE,KAAW,EAAG,GAAQ,yBAAyB,EAAO,IAAI,qBAAqB,GAAG,CAAC,EAAO,EAAE,EAAE,CAAC,eAAe,EAAG,CAAE,EAAE,CAAC,UAAU,GAAG,CAAC,EAAE,KAAQ,GAAI,GAAO,EAAG,QAAQ,CAAM,EAAE,SAAS,GAAI,CAAC,EAAQ,EAAO,QAAQ,EAAO,aAAa,GAAO,KAAK,CAAC,CAAM,CAAE,CAA0D,OAAzD,EAAG,EAAE,EAAO,iBAAiB,SAAS,EAAG,CAAC,QAAQ,EAAI,CAAC,MAAY,CAAC,EAAO,oBAAoB,SAAS,CAAE,EAAE,GAAI,EAAG,WAAW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