{"version":3,"file":"FAQSection_v3.BRBjsHum.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/fl265kFbOHmoaiyRsNKZ/eA6mxzneB0QvU4g5kniy/FAQSection_v3.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useRef,useEffect}from\"react\";// ── Animated height (useRef pattern — no max-height lag) ─────────────────────\nfunction AnimatedHeight({isOpen,children}){const innerRef=useRef(null);const[height,setHeight]=useState(0);useEffect(()=>{if(innerRef.current)setHeight(innerRef.current.scrollHeight);});return /*#__PURE__*/_jsx(\"div\",{style:{height:isOpen?height:0,overflow:\"hidden\",transition:\"height 300ms cubic-bezier(0.4, 0, 0.2, 1)\"},children:/*#__PURE__*/_jsx(\"div\",{ref:innerRef,children:children})});}// ── Chevron icon ─────────────────────────────────────────────────────────────\nfunction ChevronIcon({isOpen,accentColor}){return /*#__PURE__*/_jsx(\"span\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:30,height:30,borderRadius:\"50%\",flexShrink:0,border:`1px solid ${isOpen?accentColor:\"rgba(255,255,255,0.15)\"}`,background:isOpen?accentColor+\"22\":\"transparent\",transition:\"border-color 250ms ease, background 250ms ease\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"13\",height:\"13\",viewBox:\"0 0 14 14\",fill:\"none\",style:{transform:isOpen?\"rotate(180deg)\":\"rotate(0deg)\",transition:\"transform 250ms cubic-bezier(0.4, 0, 0.2, 1)\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M2.5 5L7 9.5L11.5 5\",stroke:\"white\",strokeWidth:\"1.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})});}// ── FAQ item ─────────────────────────────────────────────────────────────────\nfunction FAQItem({question,answer,isOpen,onToggle,accentColor,isLast}){const[hovered,setHovered]=useState(false);return /*#__PURE__*/_jsxs(\"div\",{style:{borderBottom:isLast?\"none\":\"1px solid rgba(255,255,255,0.08)\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:onToggle,onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),style:{background:hovered?\"rgba(255,255,255,0.025)\":\"transparent\",border:\"none\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:16,padding:\"20px 10px\",borderRadius:6,textAlign:\"left\",transition:\"background 150ms ease\",margin:\"0 -10px\",width:\"calc(100% + 20px)\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{fontSize:15,fontWeight:600,color:isOpen?accentColor:\"#ffffff\",lineHeight:1.45,fontFamily:\"inherit\",transition:\"color 250ms ease\"},children:question}),/*#__PURE__*/_jsx(ChevronIcon,{isOpen:isOpen,accentColor:accentColor})]}),/*#__PURE__*/_jsx(AnimatedHeight,{isOpen:isOpen,children:/*#__PURE__*/_jsx(\"p\",{style:{fontSize:14,fontWeight:400,color:\"rgba(255,255,255,0.65)\",lineHeight:1.8,fontFamily:\"inherit\",margin:0,paddingBottom:22,paddingRight:48},children:answer})})]});}export default function FAQSection({accentColor=\"#E8500A\",sectionLabel=\"Questions fr\\xe9quentes\",faq1Question=\"\",faq1Answer=\"\",faq2Question=\"\",faq2Answer=\"\",faq3Question=\"\",faq3Answer=\"\",faq4Question=\"\",faq4Answer=\"\",faq5Question=\"\",faq5Answer=\"\",faq6Question=\"\",faq6Answer=\"\",faq7Question=\"\",faq7Answer=\"\",faq8Question=\"\",faq8Answer=\"\",style}){const[openIndex,setOpenIndex]=useState(-1);const items=[{q:faq1Question,a:faq1Answer},{q:faq2Question,a:faq2Answer},{q:faq3Question,a:faq3Answer},{q:faq4Question,a:faq4Answer},{q:faq5Question,a:faq5Answer},{q:faq6Question,a:faq6Answer},{q:faq7Question,a:faq7Answer},{q:faq8Question,a:faq8Answer}].filter(item=>item.q&&item.a);const toggle=i=>setOpenIndex(openIndex===i?-1:i);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",backgroundColor:\"#09090B\",fontFamily:\"inherit\",...style},children:[sectionLabel&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:16,fontWeight:600,letterSpacing:\"0.1em\",textTransform:\"uppercase\",color:accentColor,margin:\"0 0 32px\",fontFamily:\"inherit\"},children:sectionLabel}),/*#__PURE__*/_jsx(\"div\",{style:{borderTop:\"1px solid rgba(255,255,255,0.08)\",paddingTop:4},children:items.map((item,i)=>/*#__PURE__*/_jsx(FAQItem,{question:item.q,answer:item.a,isOpen:openIndex===i,onToggle:()=>toggle(i),accentColor:accentColor,isLast:i===items.length-1},i))})]});}addPropertyControls(FAQSection,{accentColor:{type:ControlType.Color,title:\"Couleur accent\",defaultValue:\"#E8500A\"},sectionLabel:{type:ControlType.String,title:\"Label section\",defaultValue:\"Questions fr\\xe9quentes\"},faq1Question:{type:ControlType.String,title:\"FAQ 1 — Question\",defaultValue:\"\"},faq1Answer:{type:ControlType.String,title:\"FAQ 1 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq2Question:{type:ControlType.String,title:\"FAQ 2 — Question\",defaultValue:\"\"},faq2Answer:{type:ControlType.String,title:\"FAQ 2 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq3Question:{type:ControlType.String,title:\"FAQ 3 — Question\",defaultValue:\"\"},faq3Answer:{type:ControlType.String,title:\"FAQ 3 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq4Question:{type:ControlType.String,title:\"FAQ 4 — Question\",defaultValue:\"\"},faq4Answer:{type:ControlType.String,title:\"FAQ 4 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq5Question:{type:ControlType.String,title:\"FAQ 5 — Question\",defaultValue:\"\"},faq5Answer:{type:ControlType.String,title:\"FAQ 5 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq6Question:{type:ControlType.String,title:\"FAQ 6 — Question\",defaultValue:\"\"},faq6Answer:{type:ControlType.String,title:\"FAQ 6 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq7Question:{type:ControlType.String,title:\"FAQ 7 — Question\",defaultValue:\"\"},faq7Answer:{type:ControlType.String,title:\"FAQ 7 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"},faq8Question:{type:ControlType.String,title:\"FAQ 8 — Question\",defaultValue:\"\"},faq8Answer:{type:ControlType.String,title:\"FAQ 8 — R\\xe9ponse\",displayTextArea:true,defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQSection\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQSection_v3.map"],"mappings":"0LACA,SAAS,EAAe,CAAC,SAAO,YAAU,CAAC,IAAM,EAASA,EAAO,KAAK,CAAM,CAAC,EAAO,GAAWC,EAAS,EAAE,CAAgF,OAA/E,MAAc,CAAI,EAAS,SAAQ,EAAU,EAAS,QAAQ,aAAa,EAAG,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAO,EAAO,EAAE,SAAS,SAAS,WAAW,4CAA4C,CAAC,SAAsB,EAAK,MAAM,CAAC,IAAI,EAAkB,WAAS,CAAC,CAAC,CAAC,CACtY,SAAS,EAAY,CAAC,SAAO,eAAa,CAAC,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,GAAG,OAAO,GAAG,aAAa,MAAM,WAAW,EAAE,OAAO,aAAa,EAAO,EAAY,2BAA2B,WAAW,EAAO,EAAY,KAAK,cAAc,WAAW,iDAAiD,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,CAAC,UAAU,EAAO,iBAAiB,eAAe,WAAW,+CAA+C,CAAC,SAAsB,EAAK,OAAO,CAAC,EAAE,sBAAsB,OAAO,QAAQ,YAAY,MAAM,cAAc,QAAQ,eAAe,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