{"version":3,"file":"ImmersiveBlocks.dChMymLX.mjs","names":["_Fragment","useRef"],"sources":["https:/framerusercontent.com/modules/xIefrAm9OzA9deNMW4Lt/Cc4foKM7gi6NvydriHct/ImmersiveBlocks.js"],"sourcesContent":["// Section immersive avec 3 blocs qui apparaissent au scroll avec effet scale in\n// Vidéo de fond avec overlay personnalisable\n// Texte personnalisable pour chaque bloc\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef}from\"react\";import{motion,useInView}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ImmersiveBlocks(props){const{blocks=[{text:\"Premier bloc\"},{text:\"Deuxi\\xe8me bloc\"},{text:\"Troisi\\xe8me bloc\"}],videoFile=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",showVideo=true,overlayColor=\"#000000\",overlayOpacity=.5,blockBackground=\"#FFFFFF\",blockTextColor=\"#000000\",blockPadding=40,blockBorderRadius=16,blockGap=40,animationDuration=.6,animationDelay=.2,blockFont,style}=props;// Responsive values\nconst containerPadding=typeof window!==\"undefined\"&&window.innerWidth<768?20:40;const responsiveGap=typeof window!==\"undefined\"&&window.innerWidth<768?blockGap*.5:blockGap;const responsivePadding=typeof window!==\"undefined\"&&window.innerWidth<768?blockPadding*.6:blockPadding;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\"},children:[showVideo&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"video\",{src:videoFile,autoPlay:true,loop:true,muted:true,playsInline:true,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",zIndex:0}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:overlayColor,opacity:overlayOpacity,zIndex:1}})]}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",zIndex:2,width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",gap:responsiveGap,padding:containerPadding},children:blocks.map((block,index)=>/*#__PURE__*/_jsx(AnimatedBlock,{text:block.text,index:index,blockBackground:blockBackground,blockTextColor:blockTextColor,blockPadding:responsivePadding,blockBorderRadius:blockBorderRadius,animationDuration:animationDuration,animationDelay:animationDelay,blockFont:blockFont},index))})]});}function AnimatedBlock({text,index,blockBackground,blockTextColor,blockPadding,blockBorderRadius,animationDuration,animationDelay,blockFont}){const ref=useRef(null);const isInView=useInView(ref,{once:true,amount:.5});// Responsive font size\nconst isMobile=typeof window!==\"undefined\"&&window.innerWidth<768;const responsiveFontSize=blockFont?.fontSize?isMobile?`calc(${blockFont.fontSize} * 0.75)`:blockFont.fontSize:undefined;return /*#__PURE__*/_jsx(motion.div,{ref:ref,initial:{scale:.8,opacity:0,y:50,rotateX:-15},animate:isInView?{scale:1,opacity:1,y:0,rotateX:0}:{scale:.8,opacity:0,y:50,rotateX:-15},transition:{duration:animationDuration,delay:index*animationDelay,ease:[.25,.46,.45,.94]},style:{backgroundColor:blockBackground,color:blockTextColor,padding:blockPadding,borderRadius:blockBorderRadius,width:\"100%\",maxWidth:isMobile?\"100%\":600,textAlign:\"center\",boxShadow:`\n                    0 1px 2px rgba(0, 0, 0, 0.05),\n                    0 4px 12px rgba(0, 0, 0, 0.1),\n                    0 16px 48px rgba(0, 0, 0, 0.15),\n                    inset 0 1px 0 rgba(255, 255, 255, 0.1)\n                    0 0 20px rgba(34, 197, 94, 0.6),\n                    0 0 40px rgba(34, 197, 94, 0.4),\n                    0 0 60px rgba(34, 197, 94, 0.2),\n                    inset 0 0 20px rgba(34, 197, 94, 0.1)\n                `,border:\"2px solid rgba(34, 197, 94, 0.8)\",backdropFilter:\"blur(10px)\",WebkitBackdropFilter:\"blur(10px)\",position:\"relative\",zIndex:10-index,marginTop:index>0?isMobile?-10:-20:0,...blockFont,fontSize:responsiveFontSize},children:text});}addPropertyControls(ImmersiveBlocks,{blocks:{type:ControlType.Array,title:\"Blocs\",control:{type:ControlType.Object,controls:{text:{type:ControlType.String,title:\"Texte\",defaultValue:\"Texte du bloc\",displayTextArea:true}}},defaultValue:[{text:\"Premier bloc\"},{text:\"Deuxi\\xe8me bloc\"},{text:\"Troisi\\xe8me bloc\"}]},showVideo:{type:ControlType.Boolean,title:\"Vid\\xe9o\",defaultValue:true,enabledTitle:\"Afficher\",disabledTitle:\"Masquer\"},videoFile:{type:ControlType.File,title:\"Fichier vid\\xe9o\",allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],hidden:({showVideo})=>!showVideo},overlayColor:{type:ControlType.Color,title:\"Couleur overlay\",defaultValue:\"#000000\",hidden:({showVideo})=>!showVideo},overlayOpacity:{type:ControlType.Number,title:\"Opacit\\xe9 overlay\",defaultValue:.5,min:0,max:1,step:.1,hidden:({showVideo})=>!showVideo},blockBackground:{type:ControlType.Color,title:\"Fond bloc\",defaultValue:\"rgba(255, 255, 255, 0.1)\"},blockTextColor:{type:ControlType.Color,title:\"Couleur texte\",defaultValue:\"#000000\"},blockFont:{type:ControlType.Font,title:\"Police\",defaultValue:{fontSize:\"22px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},blockPadding:{type:ControlType.Number,title:\"Padding bloc\",defaultValue:40,min:10,max:100,step:5,unit:\"px\"},blockBorderRadius:{type:ControlType.Number,title:\"Arrondi bloc\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},blockGap:{type:ControlType.Number,title:\"Espacement\",defaultValue:40,min:10,max:100,step:5,unit:\"px\"},animationDuration:{type:ControlType.Number,title:\"Dur\\xe9e animation\",defaultValue:.6,min:.1,max:2,step:.1,unit:\"s\"},animationDelay:{type:ControlType.Number,title:\"D\\xe9lai entre blocs\",defaultValue:.2,min:0,max:1,step:.1,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImmersiveBlocks\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImmersiveBlocks.map"],"mappings":"8PAMG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,SAAO,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,KAAK,gBAAmB,CAAC,CAAC,KAAK,iBAAoB,CAAC,CAAC,YAAU,uEAAuE,YAAU,GAAK,eAAa,UAAU,iBAAe,GAAG,kBAAgB,UAAU,iBAAe,UAAU,eAAa,GAAG,oBAAkB,GAAG,WAAS,GAAG,oBAAkB,GAAG,iBAAe,GAAG,YAAU,SAAO,EAC3a,EAAwB,IAAS,QAAa,EAAO,WAAW,IAAI,GAAG,GAAS,EAAqB,IAAS,QAAa,EAAO,WAAW,IAAI,EAAS,GAAG,EAAe,EAAyB,IAAS,QAAa,EAAO,WAAW,IAAI,EAAa,GAAG,EAAa,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,SAAS,CAAC,SAAS,CAAC,GAAwB,EAAMA,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,IAAI,EAAU,SAAS,GAAK,KAAK,GAAK,MAAM,GAAK,YAAY,GAAK,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ,OAAO,EAAE,CAAC,CAAC,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,gBAAgB,EAAa,QAAQ,EAAe,OAAO,EAAE,CAAC,CAAC,CAAC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