{"version":3,"file":"ScrollEffects.D2UsuRkL.mjs","names":["_Fragment","useRef","React.useState","React.useCallback","__esmMin","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","l","_e","p","J","init_jsx_runtime","ce","de","useInView","useReducedMotion","init_framer_motion_DhsWWWsN","heroIn","HERO_CSS","Component","props","step","useAppear","local","reduce","inView","done","setDone","r","setRef","el","ref","anim","from","to","duration","delay","APPEAR_EASE","t","x","k","appear","APPEAR","kind","lead","gap","hidden","withHero0","withHero1","withHero2","withAppearTitle0","withAppearMedia1","withAppearMedia2","withHeroGlowFixed","read","base","raf","card","first","big","c","list","cards","grid","lastK","tick","b","on","ro","GLOW_IN","init_ScrollEffects"],"sources":["https:/framerusercontent.com/modules/6JD6Lus5foOQXPUvaBq2/qieaBXNrntKXTbutxS2U/ScrollEffects.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{forwardRef,useRef}from\"react\";import{useScroll,useTransform,useReducedMotion,useInView}from\"framer-motion\";// Hero light: anchored to the hero but scrolls at ~60% speed (drifts down 0.4px per px\n// scrolled), so it reads as a distant backdrop. Static under reduced motion.\n// Fade-in for the hero light, applied from the first paint. Reduced motion: shown at once.\nconst GLOW_IN=\"@keyframes nd-glow-in{from{filter:opacity(0)}to{filter:opacity(1)}}@media (prefers-reduced-motion:reduce){[style*=nd-glow-in]{animation:none!important}}\";export function withParallaxGlow(Component){return /*#__PURE__*/forwardRef(function ParallaxGlow(props,ref){const reduce=useReducedMotion();const{scrollY}=useScroll();const y=useTransform(scrollY,[0,1600],[0,640],{clamp:true});if(reduce)return /*#__PURE__*/_jsx(Component,{...props,ref:ref});return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,y,willChange:\"transform\"}});});}// Hero entrance in pure CSS: it starts at first paint (server HTML), not after hydration,\n// so the hero never shows up and then hides itself. Same element survives hydration, so the\n// animation is not restarted. Reduced motion: no animation, content shown as is.\n// Mêmes valeurs que Apparition.tsx (pages en code) : 300 ms, 12 px, 4 px de flou, blocs à 100 ms d'écart.\n// Mouvement réduit : fondu d'opacité seul.\nconst HERO_CSS=\"@keyframes nd-hero-in{from{opacity:.02;translate:0 10px}}@keyframes nd-hero-fade{from{opacity:.02}}@media (prefers-reduced-motion:reduce){[style*=nd-hero-in]{animation-name:nd-hero-fade!important;animation-duration:300ms!important}}\";function heroIn(step){return Component=>/*#__PURE__*/forwardRef(function HeroIn(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:HERO_CSS}}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,animation:\"nd-hero-in 600ms ease \"+(60+step*100)+\"ms backwards\"}})]});});}// Hero title: the usual hero entrance (step 1), then the highlighted words get a marker\n// sweep from left to right a beat after the title has landed (0.6s in, 550ms, ease-in-out).\nexport function withHeroTitle(Component){const Base=heroIn(1)(Component);return /*#__PURE__*/forwardRef(function HeroTitle(props,ref){const local=useRef(null);const reduce=useReducedMotion();const setRef=React.useCallback(el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);React.useEffect(()=>{const el=local.current;if(!el||reduce)return;const spans=Array.from(el.querySelectorAll(\"mark, span\")).filter(sp=>{const c=getComputedStyle(sp).backgroundColor;return c&&c!==\"transparent\"&&!/rgba\\(0, 0, 0, 0\\)/.test(c);});const anims=[];spans.forEach(sp=>{const c=getComputedStyle(sp).backgroundColor;sp.style.backgroundColor=\"transparent\";sp.style.backgroundImage=\"linear-gradient(\"+c+\", \"+c+\")\";sp.style.backgroundRepeat=\"no-repeat\";sp.style.backgroundSize=\"0% 100%\";sp.style.webkitBoxDecorationBreak=\"clone\";sp.style.boxDecorationBreak=\"clone\";if(sp.animate)anims.push(sp.animate([{backgroundSize:\"0% 100%\"},{backgroundSize:\"100% 100%\"}],{duration:500,delay:150,easing:\"cubic-bezier(0.77, 0, 0.175, 1)\",fill:\"forwards\"}));else sp.style.backgroundSize=\"100% 100%\";});return()=>anims.forEach(a=>a.cancel());},[reduce]);return /*#__PURE__*/_jsx(Base,{...props,ref:setRef});});}// Hero light: fades in slowly after the text, like the sky brightening (decorative, so\n// longer than UI motion). Uses filter: opacity() so the layer's own opacity stays the dial.\nexport function withGlowIn(Component){return /*#__PURE__*/forwardRef(function GlowIn(props,ref){const local=useRef(null);const reduce=useReducedMotion();const setRef=React.useCallback(el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);// CSS animation in the server-rendered style: it starts with the first paint, so the\n// image never shows, vanishes at hydration, then fades back in.\nreturn /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:GLOW_IN}}),/*#__PURE__*/_jsx(Component,{...props,ref:setRef,style:{...props.style,animation:\"nd-glow-in 900ms cubic-bezier(0.23, 1, 0.32, 1) 200ms backwards\"}})]});});}// Fixed ambient image under the page: invisible over the hero (which has its own light),\n// fades in as the hero scrolls away so the lower sections are not pitch black.\nexport function withAmbientIn(Component){return /*#__PURE__*/forwardRef(function AmbientIn(props,ref){const{scrollY}=useScroll();const filter=useTransform(scrollY,[250,1e3],[\"opacity(0)\",\"opacity(1)\"],{clamp:true});// Not drawn at all while fully transparent (over the hero).\nconst visibility=useTransform(scrollY,y=>y<=252?\"hidden\":\"visible\");return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,filter,visibility}});});}// Horizon glued to the bottom of the screen: off over the hero (it has its own horizon),\n// lights up once the visitor scrolls, and warms a little more at the very end of the page.\nexport function withBottomHorizon(Component){return /*#__PURE__*/forwardRef(function BottomHorizon(props,ref){const{scrollY,scrollYProgress}=useScroll();const a=useTransform(scrollY,[200,700],[0,.78],{clamp:true});const b=useTransform(scrollYProgress,[.86,1],[0,.22],{clamp:true});const opacity=useTransform([a,b],([x,y])=>x+y);const visibility=useTransform(opacity,o=>o<.005?\"hidden\":\"visible\");return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,opacity,visibility}});});}// Same reading fill as ScrollFillText (line 0.6, dim 0.28, band = 1.1 line), for a\n// one-line block like the editable heading: a left-to-right mask follows the scroll.\n// The mask is dropped while the visitor hovers or edits, so the toolbar stays fully visible.\nexport function withScrollFillLine(Component){return /*#__PURE__*/forwardRef(function ScrollFillLine(props,ref){const local=useRef(null);const reduce=useReducedMotion();const setRef=React.useCallback(el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);React.useEffect(()=>{const el=local.current;if(!el||reduce)return;const LINE=.6,DIM=.28;let shown=null,raf=0,active=false,lastP=NaN,lh=36;const measure=()=>{const ed=el.querySelector(\"[contenteditable]\");lh=Math.max(28,Math.min(ed?parseFloat(getComputedStyle(ed).fontSize)*1.15:36,90));};measure();const paint=pRaw=>{if(active){lastP=NaN;el.style.webkitMaskImage=el.style.maskImage=\"none\";el.style.setProperty(\"--nuage-fill\",\"1\");return;}const band=lh*1.1;// Fully dim above, fully lit below: clamp and skip identical repaints of the mask.\nconst p=Math.round(Math.max(-band,Math.min(lh+band,pRaw))*2)/2;if(p===lastP)return;lastP=p;const stops=[];for(let k=0;k<=6;k++){const f=k/6;const o=Math.min(1,Math.max(DIM,DIM+(p-f*lh)/band*(1-DIM)));stops.push(\"rgba(0,0,0,\"+o.toFixed(3)+\") \"+Math.round(f*100)+\"%\");}const m=\"linear-gradient(90deg, \"+stops.join(\", \")+\")\";el.style.webkitMaskImage=m;el.style.maskImage=m;el.style.webkitMaskClip=\"no-clip\";el.style.maskClip=\"no-clip\";el.style.webkitMaskSize=\"100% 100%\";el.style.maskSize=\"100% 100%\";el.style.webkitMaskRepeat=\"repeat-y\";el.style.maskRepeat=\"repeat-y\";// fully lit at the end of the line -> details (dotted underline) may show\nconst end=Math.min(1,Math.max(DIM,DIM+(p-lh)/band*(1-DIM)));el.style.setProperty(\"--nuage-fill\",String(Math.max(0,Math.min(1,(end-.85)/.15)).toFixed(3)));};const target=()=>window.innerHeight*LINE-el.getBoundingClientRect().top;const tick=()=>{raf=0;const tg=target();shown=shown===null?tg:shown+(tg-shown)*.18;paint(shown);if(Math.abs(tg-shown)>.5)raf=requestAnimationFrame(tick);};const on=()=>{if(!raf)raf=requestAnimationFrame(tick);};// Only a mouse lifts the mask on hover: a finger scrolling across the heading fires\n// pointerenter too, and on phones that left the line lit before the fill reached it.\nconst enter=e=>{if(e&&e.pointerType&&e.pointerType!==\"mouse\")return;active=true;paint(shown||0);};const leave=e=>{if(e&&e.pointerType&&e.pointerType!==\"mouse\")return;if(el.matches(\":focus-within\"))return;active=false;on();};el.addEventListener(\"pointerenter\",enter);el.addEventListener(\"pointerleave\",leave);el.addEventListener(\"focusin\",enter);el.addEventListener(\"focusout\",()=>{active=false;on();});window.addEventListener(\"resize\",()=>{measure();lastP=NaN;});on();window.addEventListener(\"scroll\",on,{passive:true});window.addEventListener(\"resize\",on);return()=>{window.removeEventListener(\"scroll\",on);window.removeEventListener(\"resize\",on);el.removeEventListener(\"pointerenter\",enter);el.removeEventListener(\"pointerleave\",leave);if(raf)cancelAnimationFrame(raf);el.style.webkitMaskImage=el.style.maskImage=\"\";};},[reduce]);return /*#__PURE__*/_jsx(Component,{...props,ref:setRef});});}export function withGoldVeil(Component){return /*#__PURE__*/forwardRef(function GoldVeil(props,ref){const{scrollYProgress}=useScroll();const opacity=useTransform(scrollYProgress,[.45,1],[0,1]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,opacity,willChange:\"opacity\"}});});}export function withVeilDepth(Component){return /*#__PURE__*/forwardRef(function VeilDepth(props,ref){return /*#__PURE__*/_jsx(Component,{...props,ref:ref});});}export function withFocusPull(Component){return /*#__PURE__*/forwardRef(function FocusPull(props,_ref){const local=useRef(null);const reduce=useReducedMotion();const{scrollYProgress}=useScroll({target:local,offset:[\"start end\",\"center center\"]});const scale=useTransform(scrollYProgress,[0,1],[reduce?1:.94,1]);const opacity=useTransform(scrollYProgress,[0,1],[reduce?1:.55,1]);return /*#__PURE__*/_jsx(Component,{...props,ref:local,style:{...props.style,scale,opacity,willChange:\"transform, opacity\"}});});}// ---- Appear choreography ----\n// Modelled on a calm agency hero: each level of the hierarchy has its own move and the\n// levels arrive in order, 70ms apart. Titles travel a bit further and clear a soft blur,\n// body text and controls rise less, images and cards only rise (blurring large areas is\n// costly and muddy). One shot per element, triggered when it enters the viewport.\nconst APPEAR={// Body text and blocks rise and fade without blur: blurring large areas was the costliest\n// part of scrolling. Titles keep their soft blur.\n// Softer since the audit: shorter travel, so a page full of reveals reads as one calm motion.\n// Novembre 2026 : retour du flou sur les textes (4 px, petites surfaces), mêmes valeurs que Apparition.tsx.\ntext:{y:10,blur:0,dur:.6},title:{y:10,blur:0,dur:.6},media:{y:10,blur:0,dur:.6},nav:{y:-10,blur:0,dur:.5},// Keep the initial hero copy readable while its short entrance runs.\nhero:{y:8,blur:0,dur:.3}};// One ease-out curve for every entrance on the site (same as hovers and UI transitions).\n// Apparitions : courbe ease, plus douce que l'ease-out des interactions (réglage du 27/11, d'après benji.org et paco.me).\nconst APPEAR_EASE=\"ease\";// The hidden state uses CSS properties Framer’s hover effects never touch: `filter: opacity()`\n// instead of `opacity`, and the standalone `translate` / `scale` / `rotate` properties instead\n// of `transform`. The entrance runs with the Web Animations API, then the override drops its\n// styles entirely, so a layer’s own hover (opacity, scale, fill) works exactly as designed.\nfunction useAppear(from,to,duration,delay,ref){const local=useRef(null);const reduce=useReducedMotion();const inView=useInView(local,{once:true,margin:\"0px 0px 12% 0px\"});const[done,setDone]=React.useState(false);// Seul le premier écran s'anime : un bloc plus bas que la hauteur de la fenêtre au chargement s'affiche directement.\nReact.useEffect(()=>{const r=local.current?.getBoundingClientRect?.();if(r&&r.top>=window.innerHeight)setDone(true);},[]);const setRef=React.useCallback(el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);React.useEffect(()=>{const el=local.current;if(!inView||done||!el)return;if(reduce||!el.animate){setDone(true);return;}const anim=el.animate([from,to],{duration:duration*1e3,delay:delay*1e3,easing:APPEAR_EASE,fill:\"forwards\"});anim.onfinish=()=>setDone(true);anim.oncancel=()=>setDone(true);// Safety net: never leave content hidden if the animation is throttled or dropped.\nconst t=setTimeout(()=>setDone(true),(duration+delay)*1e3+600);return()=>{anim.onfinish=null;anim.oncancel=null;clearTimeout(t);};},[inView,reduce,done]);// If the wrapped layer never hands us a DOM node (some component instances), or the\n// element is already on screen but the observer stays silent, show it anyway.\nReact.useEffect(()=>{const t=setTimeout(()=>{const el=local.current;if(!el){setDone(true);return;}const r=el.getBoundingClientRect?.();if(r&&r.top<window.innerHeight&&r.bottom>0)setDone(true);},1600);return()=>clearTimeout(t);},[]);// Once the styles are gone the end state equals the natural state, so cancelling is seamless.\nReact.useEffect(()=>{if(done)local.current?.getAnimations?.().forEach(x=>{if(x.effect?.getKeyframes?.().some(k=>\"translate\"in k||\"filter\"in k||\"rotate\"in k))x.cancel();});},[done]);return{setRef,hidden:!done&&!reduce};}function appear(kind,step,gap=.1,lead=0){const k=APPEAR[kind];// Départ à 2 % d'opacité (invisible à l'œil) plutôt qu'à 0, pour que le navigateur compte textes et images comme\n// affichés dès le premier rendu (le LCP n'attend plus la fin de l'hydratation et de l'animation).\nconst from={filter:\"opacity(0.02)\"+(k.blur?\" blur(\"+k.blur+\"px)\":\"\"),translate:\"0px \"+k.y+\"px\"};const to={filter:\"opacity(1)\"+(k.blur?\" blur(0px)\":\"\"),translate:\"0px 0px\"};return Component=>/*#__PURE__*/forwardRef(function Appear(props,ref){const{setRef,hidden}=useAppear(from,to,k.dur,lead+step*gap,ref);return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,style:hidden?{...props.style,...from}:props.style});});}// The sparkle above the contact title turns in from a small, tilted state.\nconst SPARK_FROM={filter:\"opacity(0)\",scale:\"0.6\",rotate:\"-45deg\"};const SPARK_TO={filter:\"opacity(1)\",scale:\"1\",rotate:\"0deg\"};export function withAppearSpark(Component){return /*#__PURE__*/forwardRef(function AppearSpark(props,ref){const{setRef,hidden}=useAppear(SPARK_FROM,SPARK_TO,.6,0,ref);return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,style:hidden?{...props.style,...SPARK_FROM}:props.style});});}export function withHero0(Component){return heroIn(0)(Component);}export function withHero1(Component){return heroIn(1)(Component);}export function withHero2(Component){return heroIn(2)(Component);}export function withHero3(Component){return heroIn(3)(Component);}export function withHero4(Component){return heroIn(4)(Component);}const NAV_CSS=\"@keyframes nd-nav-in{from{opacity:0;translate:0 -10px}}@media (prefers-reduced-motion:reduce){[style*=nd-nav-in]{animation:none!important}}\";export function withAppearNav(Component){return /*#__PURE__*/forwardRef(function NavIn(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:NAV_CSS}}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,animation:\"nd-nav-in 500ms cubic-bezier(0.23, 1, 0.32, 1) 60ms backwards\"}})]});});}export function withAppearText0(Component){return appear(\"text\",0)(Component);}export function withAppearText1(Component){return appear(\"text\",1)(Component);}export function withAppearText2(Component){return appear(\"text\",2)(Component);}export function withAppearText3(Component){return appear(\"text\",3)(Component);}export function withAppearText4(Component){return appear(\"text\",4)(Component);}export function withAppearText5(Component){return appear(\"text\",5)(Component);}export function withAppearTitle0(Component){return appear(\"title\",0)(Component);}export function withAppearTitle1(Component){return appear(\"title\",1)(Component);}export function withAppearTitle2(Component){return appear(\"title\",2)(Component);}export function withAppearMedia0(Component){return appear(\"media\",0)(Component);}export function withAppearMedia1(Component){return appear(\"media\",1)(Component);}export function withAppearMedia2(Component){return appear(\"media\",2)(Component);}export function withAppearMedia3(Component){return appear(\"media\",3)(Component);}export function withAppearMedia4(Component){return appear(\"media\",4)(Component);}export function withAppearMedia5(Component){return appear(\"media\",5)(Component);}export function withAppearMedia6(Component){return appear(\"media\",6)(Component);}// ---- Nav scroll-spy ----\n// Sections of the home page, in scroll order. Only the ones in the nav get highlighted.\nconst ORDER=[\"etude\",\"projets\",\"services\",\"methode\",\"avis\",\"apropos\",\"atelier\",\"faq\",\"contact\"];let current=\"accueil\";let started=false;const subs=new Set;function compute(){const line=window.innerHeight*.35;// The section whose top is the closest above the line wins, whatever the DOM order.\nlet c=\"accueil\",best=-Infinity;for(const id of ORDER){const el=document.getElementById(id);if(!el)continue;const top=el.getBoundingClientRect().top;if(top<=line&&top>best){best=top;c=id;}}if(c===\"etude\")c=\"projets\";if(c!==current){current=c;subs.forEach(f=>f());}}function start(){if(started)return;started=true;let raf=0;const on=()=>{if(raf)return;raf=requestAnimationFrame(()=>{raf=0;compute();});};window.addEventListener(\"scroll\",on,{passive:true});window.addEventListener(\"resize\",on);compute();}function useSpy(){const[s,set]=React.useState(null);React.useEffect(()=>{// Separate pages light up their own nav item.\nconst p=window.location.pathname;if(!document.getElementById(\"services\")){const key=/^\\/atelier/.test(p)?\"atelier\":/^\\/parcours/.test(p)?\"apropos\":/^\\/(projets|travaux|etudes)/.test(p)?\"projets\":\"none\";set(key);return;}start();const f=()=>set(current);subs.add(f);f();return()=>{subs.delete(f);};},[]);return s;}// Sliding indicator: one absolutely positioned div, created inside the nav pill and moved\n// under the active item with a CSS transition on transform and width only.\nfunction useNavIndicator(item,enabled){const s=useSpy();const reduce=useReducedMotion();React.useEffect(()=>{const pill=item.current?.parentElement;if(!enabled||!pill||s===null)return;// One indicator per pill, reused even if the nav item re-mounts, so it always\n// starts from where it last was and the move can animate.\nlet d=pill.querySelector(\":scope > [data-nav-indicator]\");if(d)d.style.boxShadow=\"0px 1px 1px 0px rgba(0, 0, 0, 0.35), inset 0px 1px 2px 0px rgba(255, 255, 255, 0.12)\";const fresh=!d;if(!d){d=document.createElement(\"div\");d.setAttribute(\"aria-hidden\",\"true\");d.dataset.navIndicator=\"\";Object.assign(d.style,{position:\"absolute\",left:\"0px\",top:\"0px\",width:\"0px\",height:\"0px\",borderRadius:\"2px\",background:\"rgba(255, 255, 255, 0.2)\",boxShadow:\"0px 1px 1px 0px rgba(0, 0, 0, 0.35), inset 0px 1px 2px 0px rgba(255, 255, 255, 0.12)\",pointerEvents:\"none\",opacity:\"0\"});pill.prepend(d);}const el=d;const place=instant=>{const t=pill.querySelector('[data-nav-key=\"'+s+'\"]');if(!t){el.style.opacity=\"0\";return;}const ease=\"cubic-bezier(0.23, 1, 0.32, 1)\";el.style.transition=instant||reduce?\"none\":\"transform 260ms \"+ease+\", width 260ms \"+ease+\", opacity 150ms ease\";void el.offsetWidth// commit the transition before moving\n;el.style.transform=\"translate(\"+t.offsetLeft+\"px, \"+t.offsetTop+\"px)\";el.style.width=t.offsetWidth+\"px\";el.style.height=t.offsetHeight+\"px\";el.style.opacity=\"1\";};place(fresh);const again=()=>place(true);window.addEventListener(\"resize\",again);// Re-measure once fonts are in, but only on first placement: fonts.ready is already\n// resolved later on, and re-placing instantly would cut the slide short.\nif(fresh)document.fonts?.ready?.then(again);return()=>window.removeEventListener(\"resize\",again);},[s,reduce,enabled]);}// The ▾ next to \"Projets\" flips up while its menu is open (hover or keyboard) and settles\n// back when it closes. It follows the menu itself, so moving the pointer into the menu\n// keeps it up.\nfunction useMenuArrow(item,enabled){const reduce=useReducedMotion();React.useEffect(()=>{const el=item.current;if(!enabled||!el)return;const leaf=Array.from(el.querySelectorAll(\"p\")).find(p=>(p.textContent||\"\").trim()===\"▾\");const arrow=(leaf?.closest(\"[data-framer-component-type]\"))||leaf;if(!arrow)return;arrow.style.transition=reduce?\"none\":\"transform 220ms cubic-bezier(0.23, 1, 0.32, 1)\";arrow.style.transformOrigin=\"50% 50%\";let hover=false;const update=()=>{const open=hover||!!document.querySelector('[data-framer-name=\"Menu Projets\"]');arrow.style.transform=open?\"rotate(180deg)\":\"none\";};const enter=()=>{hover=true;update();};const leave=()=>{hover=false;requestAnimationFrame(update);};el.addEventListener(\"mouseenter\",enter);el.addEventListener(\"mouseleave\",leave);const mo=new MutationObserver(update);mo.observe(document.body,{childList:true,subtree:true});return()=>{el.removeEventListener(\"mouseenter\",enter);el.removeEventListener(\"mouseleave\",leave);mo.disconnect();};},[enabled,reduce]);}function make(key){// Items tag themselves; the first item (Accueil) also owns the sliding indicator.\nreturn Component=>/*#__PURE__*/forwardRef((props,ref)=>{const s=useSpy();const local=useRef(null);const setRef=React.useCallback(el=>{local.current=el;if(el)el.dataset.navKey=key;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);useNavIndicator(local,key===\"accueil\");useMenuArrow(local,key===\"projets\");if(s===null)return /*#__PURE__*/_jsx(Component,{...props,ref:setRef});return /*#__PURE__*/_jsx(Component,{...props,ref:setRef,\"aria-current\":s===key?\"location\":undefined,style:{...props.style,backgroundColor:\"rgba(255, 255, 255, 0)\"}});});}export function withNavAccueil(Component){return make(\"accueil\")(Component);}export function withNavServices(Component){return make(\"services\")(Component);}export function withNavProjets(Component){return make(\"projets\")(Component);}export function withNavMethode(Component){return make(\"methode\")(Component);}export function withNavApropos(Component){return make(\"apropos\")(Component);}export function withNavAtelier(Component){return make(\"atelier\")(Component);}// Hero light, now a real fixed layer at page level (no per-scroll movement, so no jitter):\n// centred at its original 2640px width, fades in like withGlowIn, and fades out while the\n// first project goes by (fully gone once that project's bottom reaches 35% of the screen).\nexport function withHeroGlowFixed(Component){return /*#__PURE__*/forwardRef(function HeroGlowFixed(props,ref){const local=useRef(null);const reduce=useReducedMotion();const setRef=React.useCallback(el=>{local.current=el;if(typeof ref===\"function\")ref(el);else if(ref)ref.current=el;},[ref]);React.useEffect(()=>{const el=local.current;if(!el)return;let a=null;const read=parseFloat(getComputedStyle(el).opacity);const base=read>.05?read:.5;let raf=0;// The card is looked up once and kept; searching the DOM on every scroll frame forced\n// a layout pass each time.\nlet card=null;const first=()=>{if(card&&card.isConnected&&card.getBoundingClientRect().height>160)return card;card=null;const big=c=>{const r=c.getBoundingClientRect();return r.height>160&&r.width>160;};const lists=Array.from(document.querySelectorAll('[data-framer-name=\"Projets\"]'));const list=lists.find(l=>l.getBoundingClientRect().height>300)// not the nav link of the same name\n;const cards=list?Array.from(list.querySelectorAll(\"[data-framer-name]\")):[];// Fallback: the first card of the ProjetsIndex grid, when the big gallery is hidden.\nconst grid=Array.from(document.querySelectorAll(\".pi-card\"));card=cards.find(big)||grid.find(big)||null;return card;};let lastK=-1;const tick=()=>{raf=0;const p=first();let k=1;if(p){const b=p.getBoundingClientRect().bottom/window.innerHeight;k=Math.max(0,Math.min(1,(b-.35)/.4));}if(Math.abs(k-lastK)<.002)return;lastK=k;// Never fully gone: a trace of the hero light stays behind the whole page.\nel.style.opacity=String(base*(.26+.74*k));el.style.visibility=\"visible\";};const on=()=>{if(!raf)raf=requestAnimationFrame(tick);};tick();window.addEventListener(\"scroll\",on,{passive:true});window.addEventListener(\"resize\",on);window.addEventListener(\"load\",on);const ro=typeof ResizeObserver!==\"undefined\"?new ResizeObserver(()=>{card=null;on();}):null;ro?.observe(document.body);return()=>{window.removeEventListener(\"scroll\",on);window.removeEventListener(\"resize\",on);window.removeEventListener(\"load\",on);ro?.disconnect();if(raf)cancelAnimationFrame(raf);a?.cancel();};},[reduce]);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:GLOW_IN}}),/*#__PURE__*/_jsx(Component,{...props,ref:setRef,style:{...props.style,animation:\"nd-glow-in 1400ms cubic-bezier(0.23, 1, 0.32, 1) 350ms backwards\",left:\"50%\",right:\"auto\",width:2640,marginLeft:-1320,willChange:\"opacity\"}})]});});}// A link to a section (\"/#etude\") scrolls to that section when it exists on the page being\n// viewed, so it also works on the test pages; elsewhere the link behaves normally.\nexport function withSectionLink(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const onClickCapture=e=>{const a=e.target?.closest?.(\"a\");const href=a?.getAttribute(\"href\")||\"\";const m=href.match(/#(.+)$/);if(!m||e.metaKey||e.ctrlKey||e.shiftKey||e.button!==0)return;const el=document.getElementById(decodeURIComponent(m[1]));if(!el)return;e.preventDefault();e.stopPropagation();const reduce=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;const target=el.getBoundingClientRect().top+window.scrollY-(parseFloat(getComputedStyle(el).scrollMarginTop)||0);if(reduce){window.scrollTo(0,target);return;}// Own easing (ease-in-out), so the move is the same in every browser.\nconst from=window.scrollY,dist=target-from,dur=Math.min(900,380+Math.abs(dist)*.25),t0=performance.now();const ease=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2;const step=now=>{const t=Math.min(1,(now-t0)/dur);window.scrollTo(0,from+dist*ease(t));if(t<1)requestAnimationFrame(step);};requestAnimationFrame(step);};return /*#__PURE__*/_jsx(Component,{...props,ref:ref,onClickCapture:onClickCapture});});}// Same fade as withGlowIn, but the hero image waits a little longer, after the title and the buttons.\nexport function withGlowInLate(Component){return /*#__PURE__*/forwardRef(function GlowInLate(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:GLOW_IN}}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,animation:\"nd-glow-in 900ms cubic-bezier(0.23, 1, 0.32, 1) 300ms backwards\"}})]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAppearTitle1\":{\"type\":\"reactHoc\",\"name\":\"withAppearTitle1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroGlowFixed\":{\"type\":\"reactHoc\",\"name\":\"withHeroGlowFixed\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSectionLink\":{\"type\":\"reactHoc\",\"name\":\"withSectionLink\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearText4\":{\"type\":\"reactHoc\",\"name\":\"withAppearText4\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearText0\":{\"type\":\"reactHoc\",\"name\":\"withAppearText0\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearNav\":{\"type\":\"reactHoc\",\"name\":\"withAppearNav\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAmbientIn\":{\"type\":\"reactHoc\",\"name\":\"withAmbientIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withParallaxGlow\":{\"type\":\"reactHoc\",\"name\":\"withParallaxGlow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavProjets\":{\"type\":\"reactHoc\",\"name\":\"withNavProjets\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGlowIn\":{\"type\":\"reactHoc\",\"name\":\"withGlowIn\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearText3\":{\"type\":\"reactHoc\",\"name\":\"withAppearText3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia6\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia6\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHeroTitle\":{\"type\":\"reactHoc\",\"name\":\"withHeroTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBottomHorizon\":{\"type\":\"reactHoc\",\"name\":\"withBottomHorizon\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia3\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavApropos\":{\"type\":\"reactHoc\",\"name\":\"withNavApropos\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia5\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia5\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavAccueil\":{\"type\":\"reactHoc\",\"name\":\"withNavAccueil\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHero3\":{\"type\":\"reactHoc\",\"name\":\"withHero3\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearSpark\":{\"type\":\"reactHoc\",\"name\":\"withAppearSpark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGoldVeil\":{\"type\":\"reactHoc\",\"name\":\"withGoldVeil\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia0\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia0\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavAtelier\":{\"type\":\"reactHoc\",\"name\":\"withNavAtelier\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHero0\":{\"type\":\"reactHoc\",\"name\":\"withHero0\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollFillLine\":{\"type\":\"reactHoc\",\"name\":\"withScrollFillLine\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavMethode\":{\"type\":\"reactHoc\",\"name\":\"withNavMethode\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGlowInLate\":{\"type\":\"reactHoc\",\"name\":\"withGlowInLate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearText5\":{\"type\":\"reactHoc\",\"name\":\"withAppearText5\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearText2\":{\"type\":\"reactHoc\",\"name\":\"withAppearText2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia1\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHero4\":{\"type\":\"reactHoc\",\"name\":\"withHero4\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearTitle2\":{\"type\":\"reactHoc\",\"name\":\"withAppearTitle2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearText1\":{\"type\":\"reactHoc\",\"name\":\"withAppearText1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHero2\":{\"type\":\"reactHoc\",\"name\":\"withHero2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFocusPull\":{\"type\":\"reactHoc\",\"name\":\"withFocusPull\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearTitle0\":{\"type\":\"reactHoc\",\"name\":\"withAppearTitle0\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withNavServices\":{\"type\":\"reactHoc\",\"name\":\"withNavServices\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVeilDepth\":{\"type\":\"reactHoc\",\"name\":\"withVeilDepth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHero1\":{\"type\":\"reactHoc\",\"name\":\"withHero1\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia2\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAppearMedia4\":{\"type\":\"reactHoc\",\"name\":\"withAppearMedia4\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollEffects.map"],"mappings":"A,kOAQ0P,SAASmB,EAAO,EAAK,CAAC,MAAO,IAAwB,gBAAW,SAAgB,EAAM,EAAI,CAAC,MAAoB,gBAAMnB,EAAU,CAAC,SAAS,CAAc,gBAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAOoB,CAAQ,CAAC,CAAC,EAAe,gBAAKC,EAAU,CAAC,GAAGC,EAAU,MAAI,MAAM,CAAC,GAAGA,EAAM,MAAM,UAAU,0BAA0B,GAAGC,EAAK,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAE,CAkCxlB,SAASC,EAAU,EAAK,EAAG,EAAS,EAAM,EAAI,CAAC,IAAMC,EAAMxB,EAAO,IAAI,EAAQyB,EAAOT,EAAiB,EAAQU,EAAOX,EAAUS,EAAM,CAAC,KAAK,GAAK,OAAO,iBAAiB,CAAC,EAAO,CAACG,EAAKC,GAAS3B,EAAe,EAAK,EACnNY,MAAoB,CAAC,IAAMgB,EAAEL,EAAM,SAAS,wBAAwB,EAAKK,GAAGA,EAAE,KAAKtB,EAAO,aAAYqB,EAAQ,EAAI,CAAE,EAAE,CAAC,CAAC,EAAE,IAAME,EAAO5B,EAAkB,GAAI,CAAC,EAA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