{"version":3,"file":"TextWithInlineImage.CFq_kUPL.mjs","names":[],"sources":["https:/framerusercontent.com/modules/wgMfY26sjYGDoga7KasT/4Jqo0z5B7XWbeNYMkuoX/eWCeQtntS.js","https:/framerusercontent.com/modules/tRk1H2oueO1keVTMP5mS/IdsSL5WW9HDz56IvxvaB/TextWithInlineImage.js"],"sourcesContent":["// Generated by Framer (71e6c31)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOMV2;Recoleta Regular\",\"CUSTOMV2;Recoleta Bold\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Recoleta Regular\",source:\"custom\",style:\"normal\",uiFamilyName:\"Recoleta\",url:\"https://framerusercontent.com/assets/RyrjXyH8VpmBtYTSJU3gK8KgM.woff2\",weight:\"400\"},{cssFamilyName:\"Recoleta Bold\",source:\"custom\",style:\"normal\",uiFamilyName:\"Recoleta\",url:\"https://framerusercontent.com/assets/AjCeATnNSlItvrHGF5JpXNyAZjU.woff2\",weight:\"700\"}]}];export const css=[\".framer-JYl0R .framer-styles-preset-18k6wwl:not(.rich-text-wrapper), .framer-JYl0R .framer-styles-preset-18k6wwl.rich-text-wrapper h3 { --framer-font-family: \\\"Recoleta Regular\\\", \\\"Recoleta Regular Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Recoleta Bold\\\", \\\"Recoleta Bold Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 48px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 100%; --framer-paragraph-spacing: 48px; --framer-text-alignment: left; --framer-text-color: var(--token-e45d293d-ce8c-4d96-bf7a-e52d565696ea, #1c1d1f); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }\",\"@media (max-width: 1199px) and (min-width: 810px) { .framer-JYl0R .framer-styles-preset-18k6wwl:not(.rich-text-wrapper), .framer-JYl0R .framer-styles-preset-18k6wwl.rich-text-wrapper h3 { --framer-font-family: \\\"Recoleta Regular\\\", \\\"Recoleta Regular Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Recoleta Bold\\\", \\\"Recoleta Bold Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 48px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 100%; --framer-paragraph-spacing: 48px; --framer-text-alignment: left; --framer-text-color: var(--token-e45d293d-ce8c-4d96-bf7a-e52d565696ea, #1c1d1f); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\",\"@media (max-width: 809px) and (min-width: 0px) { .framer-JYl0R .framer-styles-preset-18k6wwl:not(.rich-text-wrapper), .framer-JYl0R .framer-styles-preset-18k6wwl.rich-text-wrapper h3 { --framer-font-family: \\\"Recoleta Regular\\\", \\\"Recoleta Regular Placeholder\\\", sans-serif; --framer-font-family-bold: \\\"Recoleta Bold\\\", \\\"Recoleta Bold Placeholder\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv03' on, 'cv04' on, 'cv09' on, 'cv11' on; --framer-font-size: 32px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-letter-spacing: 0em; --framer-line-height: 100%; --framer-paragraph-spacing: 32px; --framer-text-alignment: left; --framer-text-color: var(--token-e45d293d-ce8c-4d96-bf7a-e52d565696ea, #1c1d1f); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }\"];export const className=\"framer-JYl0R\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// TextWithShape – Geoffrey Bacconnier\n// Texte responsive avec image overlay sur un mot cible, devant ou derrière le texte\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function TextWithShape(props){const{text,targetWord,caseSensitive,htmlTag,font,textColor,image,imageLayer,imageWidth,imageHeight,imageOffsetX,imageOffsetY}=props;if(!targetWord.trim()){const Tag=htmlTag;return /*#__PURE__*/_jsx(Tag,{style:{...font,color:textColor,margin:0},children:text});}const flags=caseSensitive?\"g\":\"gi\";const regex=new RegExp(`(${targetWord.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")})`,flags);const parts=text.split(regex);const Tag=htmlTag;const imgStyle={position:\"absolute\",left:\"50%\",top:\"50%\",transform:`translate(calc(-50% + ${imageOffsetX}px), calc(-50% + ${imageOffsetY}px))`,width:imageWidth,height:imageHeight,objectFit:\"contain\",pointerEvents:\"none\"};return /*#__PURE__*/_jsx(Tag,{style:{...font,color:textColor,margin:0,padding:0,width:\"100%\"},children:parts.map((part,i)=>{const isMatch=caseSensitive?part===targetWord:part.toLowerCase()===targetWord.toLowerCase();if(!isMatch)return part;// Technique : le span est position:relative et isole un stacking context.\n// \"Derrière\" : on affiche l'image en premier (zIndex:0), puis on\n// réaffiche le texte du mot par-dessus dans un span position:relative (zIndex:1).\n// \"Devant\"   : image seule avec zIndex:1, le texte est dans le flux normal.\nif(imageLayer===\"below\"){return /*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline\"},children:[image&&/*#__PURE__*/_jsx(\"img\",{src:image,style:{...imgStyle,zIndex:0}}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",zIndex:1},children:part})]},i);}// Devant : image au-dessus du texte\nreturn /*#__PURE__*/_jsxs(\"span\",{style:{position:\"relative\",display:\"inline\"},children:[part,image&&/*#__PURE__*/_jsx(\"img\",{src:image,style:{...imgStyle,zIndex:1}})]},i);})});}TextWithShape.defaultProps={text:\"Vos factures pay\\xe9es, vos relations pr\\xe9serv\\xe9es.\",targetWord:\"pay\\xe9es\",caseSensitive:false,htmlTag:\"p\",font:{fontFamily:\"Georgia\",fontSize:48,fontWeight:400,lineHeight:1.2,textAlign:\"left\"},textColor:\"#1a1a1a\",image:\"\",imageLayer:\"above\",imageWidth:140,imageHeight:60,imageOffsetX:0,imageOffsetY:0};addPropertyControls(TextWithShape,{text:{type:ControlType.String,title:\"Texte\",displayTextArea:true},targetWord:{type:ControlType.String,title:\"Mot cible\"},caseSensitive:{type:ControlType.Boolean,title:\"Casse exacte\",defaultValue:false},htmlTag:{type:ControlType.Enum,title:\"Balise HTML\",options:[\"p\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"],optionTitles:[\"p\",\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\"],defaultValue:\"p\"},font:{type:ControlType.Font,title:\"Police\",controls:\"extended\"},textColor:{type:ControlType.Color,title:\"Couleur texte\",defaultValue:\"#1a1a1a\"},image:{type:ControlType.Image,title:\"Forme (image)\"},imageLayer:{type:ControlType.SegmentedEnum,title:\"Calque\",options:[\"above\",\"below\"],optionTitles:[\"Devant\",\"Derri\\xe8re\"],defaultValue:\"above\",hidden:props=>!props.image},imageWidth:{type:ControlType.Number,title:\"↳ Largeur\",min:10,max:800,step:1,displayStepper:true,defaultValue:140,hidden:props=>!props.image},imageHeight:{type:ControlType.Number,title:\"↳ Hauteur\",min:4,max:400,step:1,displayStepper:true,defaultValue:60,hidden:props=>!props.image},imageOffsetX:{type:ControlType.Number,title:\"↳ Offset X\",min:-200,max:200,step:1,displayStepper:true,defaultValue:0,hidden:props=>!props.image},imageOffsetY:{type:ControlType.Number,title:\"↳ Offset Y\",min:-200,max:200,step:1,displayStepper:true,defaultValue:0,hidden:props=>!props.image}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextWithShape\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextWithInlineImage.map"],"mappings":"iMAC8B,GAAU,UAAU,CAAC,4BAA4B,yBAAyB,CAAC,CAAc,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,cAAc,mBAAmB,OAAO,SAAS,MAAM,SAAS,aAAa,WAAW,IAAI,uEAAuE,OAAO,MAAM,CAAC,CAAC,cAAc,gBAAgB,OAAO,SAAS,MAAM,SAAS,aAAa,WAAW,IAAI,yEAAyE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAc,EAAI,CAAC,+5BAAu6B,q9BAA69B,k9BAA09B,CAAc,EAAU,kBCC1xG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,aAAW,gBAAc,UAAQ,OAAK,YAAU,QAAM,aAAW,aAAW,cAAY,eAAa,gBAAc,EAAM,GAAG,CAAC,EAAW,MAAM,CAAoB,OAAoB,EAA5B,EAAqC,CAAC,MAAM,CAAC,GAAG,EAAK,MAAM,EAAU,OAAO,EAAE,CAAC,SAAS,EAAK,CAAC,CAAE,IAAM,EAAM,EAAc,IAAI,KAAW,EAAU,OAAO,IAAI,EAAW,QAAQ,sBAAsB,OAAO,CAAC,GAAG,EAAM,CAAO,EAAM,EAAK,MAAM,EAAM,CAAO,EAAI,EAAc,EAAS,CAAC,SAAS,WAAW,KAAK,MAAM,IAAI,MAAM,UAAU,yBAAyB,EAAa,mBAAmB,EAAa,MAAM,MAAM,EAAW,OAAO,EAAY,UAAU,UAAU,cAAc,OAAO,CAAC,OAAoB,EAAK,EAAI,CAAC,MAAM,CAAC,GAAG,EAAK,MAAM,EAAU,OAAO,EAAE,QAAQ,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