<div x-data="stickyToggle()" x-ref="magicPaginationAnchor" class="relative pb-20">
    <div id="magic" x-intersect.threshold.30="enterSection('magic')">
        <div class="px-0 flex flex-col gap-14 md:gap-28 pt-20 md:pt-48 ">
            <div class="container">
                <div class="flex flex-col gap-6 w-4/5 mx-auto">
                    <svg xmlns="http://www.w3.org/2000/svg" width="96" height="25" viewBox="0 0 96 25" fill="none" class="h-6 md:h-8">
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M42.8762 12.3001C42.8762 18.5023 47.7302 24.1652 54.0672 24.1652C59.865 24.1652 64.4493 19.3113 64.8538 13.6484H54.6066V18.0978H57.8425C56.629 19.1765 55.5504 19.8506 53.9324 19.8506C49.6178 19.8506 45.8425 15.4012 45.8425 11.2214C45.8425 6.63713 48.9436 1.91803 53.9324 1.91803C57.1684 1.91803 59.9998 3.80567 61.7526 6.5023H59.9998C58.5167 4.61466 56.2245 3.40118 53.9324 3.40118C49.0785 3.40118 47.4605 8.25511 47.4605 12.4349H47.5953C47.5953 8.79443 50.0223 4.88432 53.9324 4.88432C56.0897 4.88432 57.9773 6.09781 59.1908 7.85061H64.1796C62.4268 3.53601 58.5167 0.300049 53.9324 0.300049C47.9998 0.300049 44.3594 5.55848 44.3594 11.2214C44.3594 16.345 48.5391 21.1989 53.9324 21.1989C57.0335 21.1989 59.4605 19.3113 60.9436 16.6147H56.0897V15.1315H63.1009C62.0223 19.3113 58.3818 22.6821 53.9324 22.6821C47.9998 22.6821 43.0111 18.5023 43.0111 12.3001H42.8762ZM20.4944 0.569702L11.3258 20.3899L2.83146 5.01914V22.5472H1.34832V2.05285H2.83146L11.191 17.154L18.8764 0.569702H17.2584L11.0562 13.918L3.77528 0.569702H0V24.0304H4.31461V10.6821L11.4607 23.6259L20.4944 4.07532V22.5472H19.0112V10.8169L17.5281 13.918V24.0304H21.9775V0.569702H20.4944ZM31.011 0.569702L23.0559 24.0304H27.775L29.7975 18.0978H36.8087L38.8312 24.0304H43.5503L36.5391 3.1315L35.7301 5.42364L41.5278 22.5472H39.9099L37.8874 16.6147H28.7188L26.6964 22.5472H25.0784L32.0896 2.05285H33.7076L32.4941 5.42364L35.3256 13.7832H31.2806L32.4941 10.1427L31.6851 7.71577L29.1233 15.1315H37.4829L34.1121 5.42364L35.7301 0.569702H31.011ZM67.4158 24.0304V0.569702H71.7304V2.05285H68.8989V22.5472H70.2472V3.40117H71.7304V24.0304H67.4158ZM85.483 4.74949C88.5841 4.74949 90.7414 6.36746 91.8201 9.33375H95.9999C94.7864 4.47982 90.4718 0.434875 85.3482 0.434875C78.6066 0.434875 75.7751 6.36746 75.7751 12.4349C75.7751 17.5585 80.4942 21.3338 85.3482 21.3338C87.6403 21.3338 89.7976 19.9854 91.2808 18.2326H93.1684C91.5504 20.7944 88.5841 22.8169 85.3482 22.8169C79.4156 22.8169 74.4268 18.5023 74.4268 12.3H74.292C74.292 18.5023 79.1459 24.3001 85.483 24.3001C90.0673 24.3001 94.1122 20.9293 95.7302 16.7495H90.7414C89.528 18.5023 87.6403 19.9854 85.483 19.9854C81.5729 19.9854 77.3931 16.6147 77.3931 12.4349C77.3931 7.31128 79.6852 1.91802 85.483 1.91802C89.2583 1.91802 92.6291 4.47982 94.1122 7.98544H92.6291C91.2808 5.15398 88.4493 3.40117 85.483 3.40117C80.6291 3.40117 79.0111 8.12027 79.0111 12.3H79.1459C79.1459 8.52477 81.4381 4.74949 85.483 4.74949Z" fill="currentColor" />
                    </svg>

                    <h2 class="font-medium text-4xl md:text-6xl">Autant de clips, autant de looks.</h2>
                </div>
            </div>

            <div class="video-container w-auto h-[500px] md:w-full md:h-auto ">

                <div x-data="videoAnimation( true )" class="plyr__video flex justify-center h-full ">
                    <video x-ref="videoPlayer" autoplay loop muted playsinline>
                        <source src="/videos/magic.mp4" type="video/mp4" media="(min-width: 768px)">
                        <source src="/videos/magic2.mp4" type="video/mp4" media="(max-width: 767px)">
                        <source src="/videos/magic.mp4" type="video/mp4">

                        Votre navigateur ne supporte pas la balise vidéo.
                    </video>
                </div>

                <script>
                    function videoAnimation(enableGsap = false) {
                        return {
                            enableGsap: enableGsap,
                            plyr: null,
                            init() {
                                // Initialisation de Plyr
                                this.plyr = new Plyr(this.$refs.videoPlayer, {
                                    autoplay: true,
                                    controls: ["play"]
                                });
                                if (this.enableGsap) {
                                    this.initGsap();
                                }
                            },
                            initGsap() {
                                gsap.registerPlugin(ScrollTrigger);
                                const video = this.$refs.videoPlayer;
                                const container = document.querySelector('.container');
                                if (video) {
                                    const containerWidth = container.offsetWidth;
                                    const trigger = gsap.fromTo(
                                        this.plyr.elements.container, {
                                            width: "100vw"
                                        }, {
                                            width: (containerWidth - 32),
                                            marginLeft: "16px",
                                            marginRight: "16px",
                                            ease: "power1.out",
                                            "border-radius": "8px",
                                            scrollTrigger: {
                                                trigger: video,
                                                start: 'top-=450 top',
                                                end: "top-=50 top",
                                                scrub: true,
                                                once: true,
                                                // markers: true, // Pour debug, à retirer en production
                                            }
                                        }
                                    );
                                } else {
                                    console.error("L'élément vidéo n'a pas été trouvé dans le DOM.");
                                }
                            }
                        };
                    }
                </script>
            </div>

            <div class="container px-0 flex flex-col gap-14 md:gap-28" x-data="{ shown: false }" x-intersect.threshold.50.once="shown = true">
                <div class="flex flex-col items-center gap-10 w-4/5 mx-auto" x-ref="buttonMagic" x-ref="sliderMagic" x-bind:class="{ 'invisible': !shown, 'visible': shown }" x-transition:enter="transition-opacity duration-300" x-transition:leave="transition-opacity duration-300">
                    <p class="font-medium text-xl tmd:ext-2xl self-start">MAGIC, un concept innovant et pratique pour ceux qui souhaitent avoir une seule paire de lunettes avec un style personnalisable et des fonctionnalités multiples.</p>

                    <div class="flex flex-col md:flex-row gap-4">

                        <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="mx-auto w-full md:w-auto justify-center  btn btn-dark ">
                            En savoir plus

                        </a>
                    </div>

                </div>
            </div>

            <div x-data="{ shown: false }" x-intersect.threshold.50.once="shown = true">
                <div class="container" x-ref="sliderMagic" x-bind:class="{ 'invisible': !shown, 'visible': shown }" x-transition:enter="transition-opacity duration-300" x-transition:leave="transition-opacity duration-300">

                    <div x-data="initCarouselcarousel66946247()" x-init="init()" class="relative w-full h-full mx-auto">

                        <div class="flex justify-between items-center mb-8 ">
                            <h2 class="text-3xl font-semibold ">La collection MAGIC</h2>

                            <div class="flex items-center justify-center space-x-4 ">
                                <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="hidden sm:inline-flex mx-auto  btn btn-dark-subtle ">
                                    Voir toute la collection

                                </a>

                                <div class=" hidden  sm:flex  flex space-x-2">
                                    <button type="button" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="carousel-button-prev-carousel-66946247 before:border-none  btn btn-dark-subtle  btn-only-icon">
                                        <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M9.46967 12.5303C9.17678 12.2374 9.17678 11.7626 9.46967 11.4697L13.4697 7.46967C13.7626 7.17678 14.2374 7.17678 14.5303 7.46967C14.8232 7.76256 14.8232 8.23744 14.5303 8.53033L11.0607 12L14.5303 15.4697C14.8232 15.7626 14.8232 16.2374 14.5303 16.5303C14.2374 16.8232 13.7626 16.8232 13.4697 16.5303L9.46967 12.5303Z" fill="currentColor" />
                                        </svg>

                                    </button>
                                    <button type="button" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="carousel-button-next-carousel-66946247 before:border-none  btn btn-dark-subtle  btn-only-icon">
                                        <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5303 11.4697C14.8232 11.7626 14.8232 12.2374 14.5303 12.5303L10.5303 16.5303C10.2374 16.8232 9.76256 16.8232 9.46967 16.5303C9.17678 16.2374 9.17678 15.7626 9.46967 15.4697L12.9393 12L9.46967 8.53033C9.17678 8.23744 9.17678 7.76256 9.46967 7.46967C9.76256 7.17678 10.2374 7.17678 10.5303 7.46967L14.5303 11.4697Z" fill="currentColor" />
                                        </svg>

                                    </button>
                                </div>
                            </div>
                        </div>

                        <div x-ref="swiperContainer" id="carousel-66946247" class="swiper md:h-full">
                            <div class="swiper-wrapper ">
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-66946247-0">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/productsSlider/magicProduct1.png" alt="MAGIC 262" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/productsSlider/hoverMagicProduct1.png" alt="MAGIC 262 - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 4.25C3.87665 4.25 1.75 6.37665 1.75 9V15C1.75 17.6234 3.87665 19.75 6.5 19.75H12.5C14.7589 19.75 16.6495 18.1732 17.1312 16.0603L19.8501 17.1478C20.9996 17.6076 22.25 16.7611 22.25 15.523V12V8.47706C22.25 7.239 20.9996 6.39242 19.8501 6.85223L17.1312 7.93976C16.6495 5.82679 14.7589 4.25 12.5 4.25H6.5ZM17.25 9.5078L20.4072 8.24494C20.5714 8.17925 20.75 8.30019 20.75 8.47706V12V15.523C20.75 15.6999 20.5714 15.8208 20.4072 15.7551L17.25 14.4923V9.5078ZM15.75 9.33854V14.6615V15C15.75 16.7949 14.2949 18.25 12.5 18.25H6.5C4.70507 18.25 3.25 16.7949 3.25 15V9C3.25 7.20507 4.70507 5.75 6.5 5.75H12.5C14.2949 5.75 15.75 7.20507 15.75 9V9.33854Z" fill="currentColor" />
                                                    </svg>

                                                </button>
                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">MAGIC 262</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Lunettes de vue MAGIC + 2 clips inclus</p>

                                            <p class="text-xs text-neutral-500 pt-2">3 couleurs disponibles</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        199,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-66946247-1">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/productsSlider/magicProduct2.png" alt="Enola" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/productsSlider/hoverMagicProduct2.png" alt="Enola - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 4.25C3.87665 4.25 1.75 6.37665 1.75 9V15C1.75 17.6234 3.87665 19.75 6.5 19.75H12.5C14.7589 19.75 16.6495 18.1732 17.1312 16.0603L19.8501 17.1478C20.9996 17.6076 22.25 16.7611 22.25 15.523V12V8.47706C22.25 7.239 20.9996 6.39242 19.8501 6.85223L17.1312 7.93976C16.6495 5.82679 14.7589 4.25 12.5 4.25H6.5ZM17.25 9.5078L20.4072 8.24494C20.5714 8.17925 20.75 8.30019 20.75 8.47706V12V15.523C20.75 15.6999 20.5714 15.8208 20.4072 15.7551L17.25 14.4923V9.5078ZM15.75 9.33854V14.6615V15C15.75 16.7949 14.2949 18.25 12.5 18.25H6.5C4.70507 18.25 3.25 16.7949 3.25 15V9C3.25 7.20507 4.70507 5.75 6.5 5.75H12.5C14.2949 5.75 15.75 7.20507 15.75 9V9.33854Z" fill="currentColor" />
                                                    </svg>

                                                </button>
                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Enola</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Lunettes de vue MAGIC</p>

                                            <p class="text-xs text-neutral-500 pt-2">5 couleurs disponibles</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        109,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-66946247-2">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/productsSlider/magicProduct3.png" alt="MAGIC 222" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/productsSlider/hoverMagicProduct3.png" alt="MAGIC 222 - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 4.25C3.87665 4.25 1.75 6.37665 1.75 9V15C1.75 17.6234 3.87665 19.75 6.5 19.75H12.5C14.7589 19.75 16.6495 18.1732 17.1312 16.0603L19.8501 17.1478C20.9996 17.6076 22.25 16.7611 22.25 15.523V12V8.47706C22.25 7.239 20.9996 6.39242 19.8501 6.85223L17.1312 7.93976C16.6495 5.82679 14.7589 4.25 12.5 4.25H6.5ZM17.25 9.5078L20.4072 8.24494C20.5714 8.17925 20.75 8.30019 20.75 8.47706V12V15.523C20.75 15.6999 20.5714 15.8208 20.4072 15.7551L17.25 14.4923V9.5078ZM15.75 9.33854V14.6615V15C15.75 16.7949 14.2949 18.25 12.5 18.25H6.5C4.70507 18.25 3.25 16.7949 3.25 15V9C3.25 7.20507 4.70507 5.75 6.5 5.75H12.5C14.2949 5.75 15.75 7.20507 15.75 9V9.33854Z" fill="currentColor" />
                                                    </svg>

                                                </button>
                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">MAGIC 222</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Lunettes de vue MAGIC + 2 clips inclus</p>

                                            <p class="text-xs text-neutral-500 pt-2">2 couleurs disponibles</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        179,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-66946247-3">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/productsSlider/magicProduct1.png" alt="Enola" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/productsSlider/hoverMagicProduct1.png" alt="Enola - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 4.25C3.87665 4.25 1.75 6.37665 1.75 9V15C1.75 17.6234 3.87665 19.75 6.5 19.75H12.5C14.7589 19.75 16.6495 18.1732 17.1312 16.0603L19.8501 17.1478C20.9996 17.6076 22.25 16.7611 22.25 15.523V12V8.47706C22.25 7.239 20.9996 6.39242 19.8501 6.85223L17.1312 7.93976C16.6495 5.82679 14.7589 4.25 12.5 4.25H6.5ZM17.25 9.5078L20.4072 8.24494C20.5714 8.17925 20.75 8.30019 20.75 8.47706V12V15.523C20.75 15.6999 20.5714 15.8208 20.4072 15.7551L17.25 14.4923V9.5078ZM15.75 9.33854V14.6615V15C15.75 16.7949 14.2949 18.25 12.5 18.25H6.5C4.70507 18.25 3.25 16.7949 3.25 15V9C3.25 7.20507 4.70507 5.75 6.5 5.75H12.5C14.2949 5.75 15.75 7.20507 15.75 9V9.33854Z" fill="currentColor" />
                                                    </svg>

                                                </button>
                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Enola</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Lunettes de vue MAGIC</p>

                                            <p class="text-xs text-neutral-500 pt-2">5 couleurs disponibles</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        109,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-66946247-4">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/productsSlider/magicProduct2.png" alt="MAGIC 222" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/productsSlider/hoverMagicProduct2.png" alt="MAGIC 222 - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                                <button type="button" class="group-hover:!btn-dark-ghost  btn btn-light-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 4.25C3.87665 4.25 1.75 6.37665 1.75 9V15C1.75 17.6234 3.87665 19.75 6.5 19.75H12.5C14.7589 19.75 16.6495 18.1732 17.1312 16.0603L19.8501 17.1478C20.9996 17.6076 22.25 16.7611 22.25 15.523V12V8.47706C22.25 7.239 20.9996 6.39242 19.8501 6.85223L17.1312 7.93976C16.6495 5.82679 14.7589 4.25 12.5 4.25H6.5ZM17.25 9.5078L20.4072 8.24494C20.5714 8.17925 20.75 8.30019 20.75 8.47706V12V15.523C20.75 15.6999 20.5714 15.8208 20.4072 15.7551L17.25 14.4923V9.5078ZM15.75 9.33854V14.6615V15C15.75 16.7949 14.2949 18.25 12.5 18.25H6.5C4.70507 18.25 3.25 16.7949 3.25 15V9C3.25 7.20507 4.70507 5.75 6.5 5.75H12.5C14.2949 5.75 15.75 7.20507 15.75 9V9.33854Z" fill="currentColor" />
                                                    </svg>

                                                </button>
                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">MAGIC 222</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Lunettes de vue MAGIC + 2 clips inclus</p>

                                            <p class="text-xs text-neutral-500 pt-2">2 couleurs disponibles</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        179,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div x-ref="pagination" class="swiper-pagination-carousel-66946247 swiper-pagination swiper-light" :class="isMagicDark ? 'swiper-dark' : 'swiper-light'"></div>
                            <div class="flex sm:hidden mt-6">
                                <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="mx-auto  btn btn-dark-subtle ">
                                    Voir toute la collection

                                </a>
                            </div>
                        </div>
                    </div>

                    <script>
                        function initCarouselcarousel66946247() {
                            return {
                                swiper: null,
                                options: {
                                    "color": "dark",
                                    "slidesPerView": {
                                        "mobile": 1.2,
                                        "tablet": 2.2,
                                        "desktop": 3
                                    },
                                    "spaceBetween": 30,
                                    "showPagination": true,
                                    "showNavigation": true,
                                    "showNavigationMobile": false,
                                    "showTitle": true,
                                    "title": "La collection MAGIC",
                                    "useDynamicTheming": true
                                },
                                componentId: 'carousel-66946247',
                                init() {
                                    this.initSwiper();
                                    if (typeof this.customFunction === 'function') {
                                        this.customFunction();
                                    }
                                },
                                initSwiper() {
                                    this.swiper = new Swiper(this.$refs.swiperContainer, {
                                        slidesPerView: this.options.slidesPerView.mobile,
                                        spaceBetween: this.options.spaceBetween,
                                        pagination: this.options.showPagination ? {
                                            el: '.swiper-pagination-' + this.componentId,
                                            clickable: true,
                                            bulletClass: 'bullet',
                                            bulletActiveClass: 'active',
                                        } : false,
                                        navigation: this.options.showNavigation ? {
                                            nextEl: '.carousel-button-next-' + this.componentId,
                                            prevEl: '.carousel-button-prev-' + this.componentId
                                        } : false,
                                        hashNavigation: {
                                            watchState: true,
                                        },
                                        breakpoints: {
                                            640: {
                                                slidesPerView: this.options.slidesPerView.tablet
                                            },
                                            1024: {
                                                slidesPerView: this.options.slidesPerView.desktop
                                            }
                                        },
                                        on: {
                                            slideChange: () => this.updateSliderTheme(),
                                        },
                                    });
                                    this.updateSliderTheme();
                                },
                                updateSliderTheme() {
                                    const activeSlide = this.swiper.slides[this.swiper.activeIndex];
                                    const theme = activeSlide.getAttribute('data-slider-theme');
                                    this.sliderTheme = theme || 'light';
                                },
                                customFunction() {
                                    // Custom function can be defined here and overridden outside.
                                }
                            };
                        }
                    </script>
                </div>
            </div>

        </div>
    </div>

    <div id="incognito" x-intersect.threshold.25="enterSection('incognito')">
        <div class="px-0 flex flex-col gap-14 md:gap-28 pt-20 md:pt-48 text-audio-700">
            <div class="container">
                <div class="flex flex-col gap-6 w-4/5 mx-auto">
                    <svg xmlns="http://www.w3.org/2000/svg" width="164" height="25" viewBox="0 0 164 25" fill="none" class="h-6 md:h-8">
                        <path d="M48.0002 5.22313C46.4618 3.68467 44.0002 3.06928 41.8464 3.06928C36.6156 3.06928 32.9233 7.37698 32.9233 12.3001C32.9233 17.2231 36.9233 21.5308 41.8464 21.5308C44.0002 21.5308 46.1541 20.6077 48.0002 19.0693V22.4539C46.1541 23.377 44.0002 23.9924 41.8464 23.9924C35.3848 23.9924 29.8464 18.7616 29.8464 12.3001C29.8464 5.53082 35.3848 0.300049 42.1541 0.300049C44.3079 0.300049 46.1541 0.915436 48.0002 1.83851V5.22313Z" fill="black" />
                        <path d="M3.69208 0.915283H0.922852V23.9922H3.69208V0.915283Z" fill="black" />
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M60.3079 24.3C66.7695 24.3 72.3079 19.0693 72.3079 12.3001C72.3079 5.83852 66.7695 0.300049 60.3079 0.300049C53.8464 0.300049 48.3079 5.83852 48.3079 12.3001C48.3079 19.0693 53.5387 24.3 60.3079 24.3ZM60.3079 3.06928C65.8464 3.06928 69.5387 7.37698 69.5387 12.3001C69.5387 17.5308 65.231 21.5308 60.3079 21.5308C55.3848 21.5308 51.0772 17.5308 51.0772 12.3001C51.0772 7.37698 54.7695 3.06928 60.3079 3.06928Z" fill="black" />
                        <path d="M96.0001 13.2231C96.0001 19.377 91.6924 24.3 85.2309 24.3C78.7693 24.3 73.5385 18.7616 73.5385 12.3001C73.5385 5.83852 78.7693 0.300049 85.5386 0.300049C89.2309 0.300049 92.6155 1.83851 94.7693 4.60775L92.6155 6.76159C91.077 4.60775 88.3078 3.06928 85.5386 3.06928C80.3078 3.06928 76.3078 7.37698 76.3078 12.3001C76.3078 17.2231 80.3078 21.5308 85.2309 21.5308C88.9232 21.5308 92.6155 18.4539 92.6155 14.7616H86.7693V11.9924H96.0001V13.2231Z" fill="black" />
                        <path d="M121.846 0.915283H124.615V23.9922H121.846V0.915283Z" fill="black" />
                        <path d="M134.461 23.6845H131.692V3.37682H126.153V0.915283H140V3.37682H134.461V23.6845Z" fill="black" />
                        <path fill-rule="evenodd" clip-rule="evenodd" d="M151.077 24.3C157.539 24.3 163.077 19.0693 163.077 12.3001C163.077 5.83852 157.539 0.300049 151.077 0.300049C144.616 0.300049 139.077 5.83852 139.077 12.3001C139.077 19.0693 144.308 24.3 151.077 24.3ZM151.077 3.06928C156.616 3.06928 160.308 7.37698 160.308 12.3001C160.308 17.5308 156 21.5308 151.077 21.5308C146.154 21.5308 141.846 17.5308 141.846 12.3001C141.846 7.37698 145.539 3.06928 151.077 3.06928Z" fill="black" />
                        <path d="M115.385 0.915283V17.8384L99.077 0.915283H98.1539V23.6845H100.923V6.76144L117.231 23.6845H118.154V0.915283H115.385Z" fill="black" />
                        <path d="M24.6155 17.8384V0.915283H27.3847V23.6845H26.4616L10.1539 6.76144V23.6845H7.38469V0.915283H8.30777L24.6155 17.8384Z" fill="black" />
                    </svg>

                    <h2 class="font-medium text-4xl md:text-6xl">Ni vu, ni connu !</h2>
                </div>
            </div>

            <div class="video-container w-auto h-[500px] md:w-full md:h-auto ">

                <div x-data="videoAnimation( true )" class="plyr__video flex justify-center h-full ">
                    <video x-ref="videoPlayer" autoplay loop muted playsinline>
                        <source src="/videos/incognito/incognito.mp4" type="video/mp4" media="(min-width: 768px)">
                        <source src="/videos/incognito/incognito.mp4" type="video/mp4" media="(max-width: 767px)">
                        <source src="/videos/magic.mp4" type="video/mp4">

                        Votre navigateur ne supporte pas la balise vidéo.
                    </video>
                </div>

                <script>
                    function videoAnimation(enableGsap = false) {
                        return {
                            enableGsap: enableGsap,
                            plyr: null,
                            init() {
                                // Initialisation de Plyr
                                this.plyr = new Plyr(this.$refs.videoPlayer, {
                                    autoplay: true,
                                    controls: ["play"]
                                });
                                if (this.enableGsap) {
                                    this.initGsap();
                                }
                            },
                            initGsap() {
                                gsap.registerPlugin(ScrollTrigger);
                                const video = this.$refs.videoPlayer;
                                const container = document.querySelector('.container');
                                if (video) {
                                    const containerWidth = container.offsetWidth;
                                    const trigger = gsap.fromTo(
                                        this.plyr.elements.container, {
                                            width: "100vw"
                                        }, {
                                            width: (containerWidth - 32),
                                            marginLeft: "16px",
                                            marginRight: "16px",
                                            ease: "power1.out",
                                            "border-radius": "8px",
                                            scrollTrigger: {
                                                trigger: video,
                                                start: 'top-=450 top',
                                                end: "top-=50 top",
                                                scrub: true,
                                                once: true,
                                                // markers: true, // Pour debug, à retirer en production
                                            }
                                        }
                                    );
                                } else {
                                    console.error("L'élément vidéo n'a pas été trouvé dans le DOM.");
                                }
                            }
                        };
                    }
                </script>
            </div>

            <div class="container px-0 flex flex-col gap-14 md:gap-28" x-data="{ shown: false }" x-intersect.threshold.50.once="shown = true">
                <div class="flex flex-col items-center gap-10 w-4/5 mx-auto" x-ref="buttonIncognito" x-ref="sliderIncognito" x-bind:class="{ 'invisible': !shown, 'visible': shown }" x-transition:enter="transition-opacity duration-300" x-transition:leave="transition-opacity duration-300">
                    <p class="font-medium text-xl tmd:ext-2xl self-start">INCOGNITO, une offre d'aides auditives alliant discrétion, performances et prix le plus juste pour vous permettre de bien entendre sans compromis.</p>

                    <div class="flex flex-col md:flex-row gap-4">

                        <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="mx-auto w-full md:w-auto justify-center  btn btn-audio-subtle ">
                            En savoir plus

                        </a>
                    </div>

                </div>
            </div>

            <div x-data="{ shown: false }" x-intersect.threshold.50.once="shown = true">
                <div class="container" x-ref="sliderIncognito" x-bind:class="{ 'invisible': !shown, 'visible': shown }" x-transition:enter="transition-opacity duration-300" x-transition:leave="transition-opacity duration-300">

                    <div x-data="initCarouselcarousel612361798()" x-init="init()" class="relative w-full h-full mx-auto">

                        <div class="flex justify-between items-center mb-8 ">
                            <h2 class="text-3xl font-semibold ">La gamme INCOGNITO</h2>

                            <div class="flex items-center justify-center space-x-4 ">
                                <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="hidden sm:inline-flex mx-auto  btn btn-audio-subtle ">
                                    Voir toute la collection

                                </a>

                                <div class=" hidden  sm:flex  flex space-x-2">
                                    <button type="button" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="carousel-button-prev-carousel-612361798 before:border-none  btn btn-audio-subtle  btn-only-icon">
                                        <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M9.46967 12.5303C9.17678 12.2374 9.17678 11.7626 9.46967 11.4697L13.4697 7.46967C13.7626 7.17678 14.2374 7.17678 14.5303 7.46967C14.8232 7.76256 14.8232 8.23744 14.5303 8.53033L11.0607 12L14.5303 15.4697C14.8232 15.7626 14.8232 16.2374 14.5303 16.5303C14.2374 16.8232 13.7626 16.8232 13.4697 16.5303L9.46967 12.5303Z" fill="currentColor" />
                                        </svg>

                                    </button>
                                    <button type="button" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="carousel-button-next-carousel-612361798 before:border-none  btn btn-audio-subtle  btn-only-icon">
                                        <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <path fill-rule="evenodd" clip-rule="evenodd" d="M14.5303 11.4697C14.8232 11.7626 14.8232 12.2374 14.5303 12.5303L10.5303 16.5303C10.2374 16.8232 9.76256 16.8232 9.46967 16.5303C9.17678 16.2374 9.17678 15.7626 9.46967 15.4697L12.9393 12L9.46967 8.53033C9.17678 8.23744 9.17678 7.76256 9.46967 7.46967C9.76256 7.17678 10.2374 7.17678 10.5303 7.46967L14.5303 11.4697Z" fill="currentColor" />
                                        </svg>

                                    </button>
                                </div>
                            </div>
                        </div>

                        <div x-ref="swiperContainer" id="carousel-612361798" class="swiper md:h-full">
                            <div class="swiper-wrapper ">
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-612361798-0">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/incognito/incognito1.png" alt="Incognito A.I BTE R 1600" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/incognito/hoverIncognito1.jpeg" alt="Incognito A.I BTE R 1600 - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-light-ghost  btn btn-dark-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Incognito A.I BTE R 1600</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Appareil auditif - Contour d'oreille</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        9,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-612361798-1">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/incognito/incognito2.png" alt="Incognito IC16 G7 SLIM RIC LI" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/incognito/hoverIncognito2.jpeg" alt="Incognito IC16 G7 SLIM RIC LI - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-light-ghost  btn btn-dark-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Incognito IC16 G7 SLIM RIC LI</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Appareil auditif - Mini contour d'oreille</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        109,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-612361798-2">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/incognito/incognito3.png" alt="Incognito A.I CIC 312 WL 2400" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/incognito/hoverIncognito3.png" alt="Incognito A.I CIC 312 WL 2400 - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-light-ghost  btn btn-dark-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Incognito A.I CIC 312 WL 2400</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Appareil auditif - Intra auriculaire</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        9,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-612361798-3">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/incognito/incognito1.png" alt="Incognito A.I BTE R 1600" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/incognito/hoverIncognito1.jpeg" alt="Incognito A.I BTE R 1600 - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-light-ghost  btn btn-dark-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Incognito A.I BTE R 1600</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Appareil auditif - Contour d'oreille</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        9,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div class="swiper-slide !transform-none " data-theme="light" data-hash="index-carousel-612361798-4">

                                    <div class="flex flex-col space-y-4 ">
                                        <a href="#" class="block relative aspect-square overflow-hidden bg-gray-100 rounded-lg group hover:after:!h-0 noAbsolute">
                                            <div class="relative w-full h-full">
                                                <img src="/img/incognito/incognito2.png" alt="Incognito IC16 G7 SLIM RIC LI" class="w-full h-full object-cover transition-all duration-300 absolute inset-0  group-hover:opacity-0 ">
                                                <img src="/img/incognito/hoverIncognito2.jpeg" alt="Incognito IC16 G7 SLIM RIC LI - Vue alternative" class="w-full h-full object-cover transition-all duration-300 absolute inset-0 opacity-0 group-hover:opacity-100">
                                            </div>

                                            <div class="absolute bottom-4 right-1/2 flex space-x-4 translate-x-2/4 duration-300 z-20">
                                                <button type="button" class="group-hover:!btn-light-ghost  btn btn-dark-ghost btn-size-sm btn-only-icon">
                                                    <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path fill-rule="evenodd" clip-rule="evenodd" d="M12.4907 20.5806C12.4538 20.603 12.4158 20.6259 12.3786 20.6477C12.1434 20.785 11.8519 20.7838 11.6176 20.645L11.5062 20.5774C11.4366 20.5345 11.3359 20.4717 11.2087 20.3901C10.9544 20.227 10.5934 19.9884 10.1613 19.6831C9.2984 19.0734 8.14487 18.193 6.98812 17.1121C4.71943 14.9921 2.25 11.9278 2.25 8.51266C2.25 5.58716 4.58441 3.25 7.5 3.25C9.03842 3.25 10.3421 4.16053 11.1962 4.9489C11.5116 5.24006 11.7824 5.53002 12 5.78205C12.2176 5.53002 12.4884 5.24006 12.8038 4.9489C13.6579 4.16053 14.9616 3.25 16.5 3.25C19.4142 3.25 21.75 5.58579 21.75 8.5C21.75 11.9589 19.283 15.0258 17.0112 17.1406C15.8539 18.218 14.6998 19.0918 13.8365 19.6958C13.4042 19.9983 13.043 20.2343 12.7885 20.3956C12.6612 20.4762 12.5604 20.5382 12.4907 20.5806ZM3.75 8.51266C3.75 11.2516 5.78075 13.9309 8.01225 16.0161C9.10559 17.0378 10.2022 17.8753 11.0268 18.458C11.4296 18.7425 11.7658 18.9651 12.0029 19.1175C12.2398 18.9672 12.5751 18.7476 12.9766 18.4667C13.8007 17.8902 14.8966 17.0598 15.9892 16.0427C18.2172 13.9686 20.25 11.2855 20.25 8.5C20.25 6.41421 18.5858 4.75 16.5 4.75C15.5384 4.75 14.5921 5.33947 13.8212 6.0511C13.4488 6.3949 13.1457 6.74102 12.9356 7.00175C12.8311 7.13154 12.7508 7.23868 12.6977 7.31179C12.6712 7.34831 12.6515 7.37623 12.6391 7.39411L12.626 7.41317L12.624 7.41603C12.4849 7.62448 12.2506 7.75 12 7.75C11.7496 7.75 11.5153 7.62451 11.3762 7.41634L11.374 7.41317L11.3609 7.39411C11.3485 7.37623 11.3288 7.34831 11.3023 7.31179C11.2492 7.23868 11.1689 7.13154 11.0644 7.00175C10.8543 6.74102 10.5512 6.3949 10.1788 6.0511C9.72644 5.63355 9.21372 5.25805 8.67296 5.01901C8.29212 4.85066 7.89737 4.75 7.5 4.75C5.41559 4.75 3.75 6.41284 3.75 8.51266Z" fill="currentColor" />
                                                    </svg>

                                                </button>

                                            </div>
                                        </a>

                                        <div class="px-2">
                                            <p class="text-xxs font-semibold text-neutral-500">ALAIN AFFLELOU</p>

                                            <h3 class="font-semibold text-neutral-800 pt-0.5">Incognito IC16 G7 SLIM RIC LI</h3>

                                            <p class="text-xs text-neutral-500 pt-1">Appareil auditif - Mini contour d'oreille</p>

                                            <div class="pt-3">
                                                <p class="text-[9px] text-neutral-500">PRIX WEB</p>

                                                <div class="flex items-center gap-2">
                                                    <p class="font-semibold text-neutral-800">
                                                        109,00 €
                                                    </p>

                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div x-ref="pagination" class="swiper-pagination-carousel-612361798 swiper-pagination swiper-audio" :class="isMagicDark ? 'swiper-dark' : 'swiper-light'"></div>
                            <div class="flex sm:hidden mt-6">
                                <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="mx-auto  btn btn-audio-subtle ">
                                    Voir toute la collection

                                </a>
                            </div>
                        </div>
                    </div>

                    <script>
                        function initCarouselcarousel612361798() {
                            return {
                                swiper: null,
                                options: {
                                    "color": "audio",
                                    "slidesPerView": {
                                        "mobile": 1.2,
                                        "tablet": 2.2,
                                        "desktop": 3
                                    },
                                    "spaceBetween": 30,
                                    "showPagination": true,
                                    "showNavigation": true,
                                    "showNavigationMobile": false,
                                    "showTitle": true,
                                    "title": "La gamme INCOGNITO",
                                    "useDynamicTheming": true,
                                    "paginationClass": "swiper-audio",
                                    "CTA": {
                                        "label": "Voir toute la collection",
                                        "href": "https://www.afflelou.com/",
                                        "external": true,
                                        "color": "audio"
                                    }
                                },
                                componentId: 'carousel-612361798',
                                init() {
                                    this.initSwiper();
                                    if (typeof this.customFunction === 'function') {
                                        this.customFunction();
                                    }
                                },
                                initSwiper() {
                                    this.swiper = new Swiper(this.$refs.swiperContainer, {
                                        slidesPerView: this.options.slidesPerView.mobile,
                                        spaceBetween: this.options.spaceBetween,
                                        pagination: this.options.showPagination ? {
                                            el: '.swiper-pagination-' + this.componentId,
                                            clickable: true,
                                            bulletClass: 'bullet',
                                            bulletActiveClass: 'active',
                                        } : false,
                                        navigation: this.options.showNavigation ? {
                                            nextEl: '.carousel-button-next-' + this.componentId,
                                            prevEl: '.carousel-button-prev-' + this.componentId
                                        } : false,
                                        hashNavigation: {
                                            watchState: true,
                                        },
                                        breakpoints: {
                                            640: {
                                                slidesPerView: this.options.slidesPerView.tablet
                                            },
                                            1024: {
                                                slidesPerView: this.options.slidesPerView.desktop
                                            }
                                        },
                                        on: {
                                            slideChange: () => this.updateSliderTheme(),
                                        },
                                    });
                                    this.updateSliderTheme();
                                },
                                updateSliderTheme() {
                                    const activeSlide = this.swiper.slides[this.swiper.activeIndex];
                                    const theme = activeSlide.getAttribute('data-slider-theme');
                                    this.sliderTheme = theme || 'light';
                                },
                                customFunction() {
                                    // Custom function can be defined here and overridden outside.
                                }
                            };
                        }
                    </script>
                </div>
            </div>

        </div>
    </div>

    <div id="telemedecine" x-intersect.threshold.30="enterSection('telemedecine')">
        <div class="px-0 flex flex-col gap-14 md:gap-28 pt-20 md:pt-48 ">
            <div class="container">
                <div class="flex flex-col gap-6 w-4/5 mx-auto">
                    <h3 class="text-3xl font-semibold text-left text-neutral-500 uppercase">Telemedecine</h3>
                    <h2 class="font-medium text-4xl md:text-6xl">Gagnez un temps précieux.</h2>
                </div>
            </div>

            <div class="flex justify-center w-auto h-[500px] md:w-full md:h-auto ">
                <picture x-data="imageAnimation( true )" class=" overflow-hidden">
                    <source srcset="/img/telemedecine/telemedecine.jpg" media="(min-width: 640px)" />
                    <img x-ref="image" src="/img/telemedecine/telemedecineMobile.png" alt="Description de l'image" class="object-cover w-full h-full" loading="lazy" />
                </picture>

                <script>
                    function imageAnimation(enableGsap = false) {
                        return {
                            enableGsap: enableGsap,
                            init() {
                                if (this.enableGsap) {
                                    this.initGsap();
                                }
                            },
                            initGsap() {
                                gsap.registerPlugin(ScrollTrigger);
                                const image = this.$refs.image;
                                const container = document.querySelector('.container');
                                if (image) {
                                    const containerWidth = container.offsetWidth;
                                    gsap.fromTo(
                                        image, {
                                            width: "100vw"
                                        }, {
                                            width: (containerWidth - 32),
                                            marginLeft: "16px",
                                            marginRight: "16px",
                                            ease: "power1.out",
                                            "border-radius": "8px",
                                            scrollTrigger: {
                                                trigger: image,
                                                start: 'top-=450 top',
                                                end: "top-=200 top",
                                                scrub: true,
                                                once: true,
                                                // markers: true, // Pour debug, à retirer en production
                                            }
                                        }
                                    );
                                } else {
                                    console.error("L'élément image n'a pas été trouvé dans le DOM.");
                                }
                            }
                        };
                    }
                </script>
            </div>

            <div class="container px-0 flex flex-col gap-14 md:gap-28" x-data="{ shown: false }" x-intersect.threshold.50.once="shown = true">
                <div class="flex flex-col items-center gap-10 w-4/5 mx-auto" x-ref="buttontelemedecine" x-ref="slidertelemedecine" x-bind:class="{ 'invisible': !shown, 'visible': shown }" x-transition:enter="transition-opacity duration-300" x-transition:leave="transition-opacity duration-300">
                    <p class="font-medium text-xl tmd:ext-2xl self-start">Téléconsultez avec un ophtalmologue depuis l’un de nos magasins.</p>
                    <h4 class="text-neutral-800">ALAIN AFFLELOU vous permet de bénéficier d'une téléconsultation avec un ophtalmologue qui réalisera à distance un examen complet de la vue. C'est un service innovant avec ou sans rendez-vous disponible dans nos magasins ALAIN AFFLELOU équipés près de chez vous.</h4>

                    <div class="flex flex-col md:flex-row gap-4">
                        <div class="flex items-center w-full min-h-[88px] border rounded-full gap-4 bg-neutral-50">
                            <img src="/img/telemedecine/telemedecine2.png" alt="Description de l'image" class="ml-4 rounded-full min-w-14 w-14 h-14 object-cover object-center" />
                            <span class="pr-8">Prise en charge par des ophtalmologues et orthoptistes diplômés.</span>
                        </div>
                        <div class="flex items-center w-full min-h-[88px] border rounded-full gap-4 bg-neutral-50">
                            <img src="/img/telemedecine/telemedecine3.jpg" alt="Description de l'image" class="ml-4 rounded-full min-w-14 w-14 h-14 object-cover object-center" />
                            <span class="pr-8">Tarifs conventionnés sans dépassement d'honoraires.</span>
                        </div>
                    </div>

                    <div class="flex flex-col md:flex-row gap-4">
                        <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="mx-auto w-full md:w-auto justify-center  btn btn-dark-subtle  btn-icons">
                            <svg class=" shrink-0" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.25C8.41421 1.25 8.75 1.58579 8.75 2V3.25H15.25V2C15.25 1.58579 15.5858 1.25 16 1.25C16.4142 1.25 16.75 1.58579 16.75 2V3.25H20C21.5188 3.25 22.75 4.48122 22.75 6V20C22.75 21.5188 21.5188 22.75 20 22.75H4C2.48122 22.75 1.25 21.5188 1.25 20V6C1.25 4.48122 2.48122 3.25 4 3.25H7.25V2C7.25 1.58579 7.58579 1.25 8 1.25ZM7.25 4.75H4C3.30964 4.75 2.75 5.30964 2.75 6V8.25H21.25V6C21.25 5.30964 20.6904 4.75 20 4.75H16.75V6C16.75 6.41421 16.4142 6.75 16 6.75C15.5858 6.75 15.25 6.41421 15.25 6V4.75H8.75V6C8.75 6.41421 8.41421 6.75 8 6.75C7.58579 6.75 7.25 6.41421 7.25 6V4.75ZM21.25 9.75H2.75V20C2.75 20.6904 3.30964 21.25 4 21.25H20C20.6904 21.25 21.25 20.6904 21.25 20V9.75ZM12 14.5C12.5523 14.5 13 14.0523 13 13.5C13 12.9477 12.5523 12.5 12 12.5C11.4477 12.5 11 12.9477 11 13.5C11 14.0523 11.4477 14.5 12 14.5ZM8 17.5C8 18.0523 7.55228 18.5 7 18.5C6.44772 18.5 6 18.0523 6 17.5C6 16.9477 6.44772 16.5 7 16.5C7.55228 16.5 8 16.9477 8 17.5ZM12 18.5C12.5523 18.5 13 18.0523 13 17.5C13 16.9477 12.5523 16.5 12 16.5C11.4477 16.5 11 16.9477 11 17.5C11 18.0523 11.4477 18.5 12 18.5ZM17 14.5C17.5523 14.5 18 14.0523 18 13.5C18 12.9477 17.5523 12.5 17 12.5C16.4477 12.5 16 12.9477 16 13.5C16 14.0523 16.4477 14.5 17 14.5ZM17 18.5C17.5523 18.5 18 18.0523 18 17.5C18 16.9477 17.5523 16.5 17 16.5C16.4477 16.5 16 16.9477 16 17.5C16 18.0523 16.4477 18.5 17 18.5Z" fill="currentColor" />
                            </svg>
                            Prendre rendez-vous

                        </a>

                        <a href="https://www.afflelou.com/" target="_blank" rel="noopenner noreferer" :class="isMagicDark ? 'btn-light-subtle' : 'btn-dark-subtle'" class="mx-auto w-full md:w-auto justify-center before:border-0  btn btn-dark-subtle ">
                            En savoir plus

                        </a>
                    </div>

                </div>
            </div>

        </div>
    </div>

    <div id="magic-toggle-container" :class="{
				'dark': isMagicDark,
				'light': !isMagicDark
			}" class="hidden md:flex justify-center mt-10 sticky bottom-4 w-full z-10" x-transition>
        <div class="flex flex-row justify-between align-middle gap-4 w-fit anchorMagic">
            <div class="flex flex-row justify-between items-center gap-1 p-1 rounded-full backdrop-blur-2xl dark" :class="{ 'dark': isMagicDark, 'light': !isMagicDark }">
                <div class="inline-flex items-center">
                    <a id="paginationAnchor-magic" href="#magic" class="toggle-magic toggle-magic-classic  ">
                        Magic
                    </a>
                </div>
                <div class="inline-flex items-center">
                    <a id="paginationAnchor-incognito" href="#incognito" class="toggle-magic toggle-magic-audio  ">
                        Incognito
                    </a>
                </div>
                <div class="inline-flex items-center">
                    <a id="paginationAnchor-telemedecine" href="#telemedecine" class="toggle-magic toggle-magic-classic  ">
                        Téléconsultation
                    </a>
                </div>
            </div>
            <div class="rounded-full  backdrop-blur-2xl p-1 dark" :class="{ 'dark': isMagicDark, 'light': !isMagicDark }">
                <div class="inline-flex items-center">
                    <a id="paginationAnchor-" href="#our-commitment" class="toggle-magic toggle-magic-classic  ">
                        Passer
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    function stickyToggle() {
        return {
            activeSection: null,
            isToggleSticky: false,
            isIntersecting: false,
            themeApplied: {}, // To track if a theme has already been applied once
            highestThemeApplied: 0, // Priority level of the highest theme already applied
            isMagicDark: false,
            // Associates each section with a priority level
            priorityMap: {
                magic: 1,
                incognito: 2,
                telemedecine: 3
            },
            enterSection(sectionId) {
                // Deactivates the previous active section if it exists
                if (this.activeSection && this.activeSection !== sectionId) {
                    const previousSection = document.querySelector(`#paginationAnchor-${this.activeSection}`);
                    if (previousSection) {
                        previousSection.classList.remove('active');
                    }
                }
                // Activates the new section
                this.activeSection = sectionId;
                const activationSection = document.querySelector(`#paginationAnchor-${sectionId}`);
                if (activationSection) {
                    activationSection.classList.add('active');
                }
                // Applies the theme for the section if not already done
                this.applyThemeForSection(sectionId);
                this.updateToggleState();
            },
            updateToggleState() {
                // Toggles sticky if activeSection is defined
                this.isToggleSticky = this.activeSection !== null;
                this.isIntersecting = this.activeSection === null;
            },
            applyThemeForSection(sectionId) {
                const currentPriority = this.priorityMap[sectionId];
                // Applies the theme only if the priority level of the section
                // is higher than the highest applied priority level
                if (this.themeApplied[sectionId] || currentPriority <= this.highestThemeApplied) return;
                const colorMap = {
                    magic: {
                        backgroundColor: '#262626',
                        color: '#FFFFFF'
                    },
                    incognito: {
                        backgroundColor: '#E5E5E5',
                        color: 'black'
                    },
                    telemedecine: {
                        backgroundColor: '#FFFFFF',
                        color: 'black'
                    },
                };
                const colors = colorMap[sectionId];
                if (colors) {
                    gsap.to(this.$refs.magicPaginationAnchor, {
                        backgroundColor: colors.backgroundColor,
                        color: colors.color,
                        duration: 2,
                    });
                    // Marks the section as "themed" to avoid repetition
                    this.themeApplied[sectionId] = true;
                    // Sets isMagicDark depending on the active section
                    this.isMagicDark = sectionId === 'magic';
                    // Updates the highest priority level applied
                    this.highestThemeApplied = currentPriority;
                }
            },
            init() {
                // Initializes default values
                this.activeSection = null;
                this.updateToggleState();
                this.themeApplied = {
                    magic: false,
                    incognito: false,
                    telemedecine: false,
                };
                this.highestThemeApplied = 0; // Initially, no theme has been applied
            },
        };
    }
</script>
<div x-data="stickyToggle()" x-ref="magicPaginationAnchor" class="relative pb-20">
	<div
			id="magic"
			x-intersect.threshold.30="enterSection('magic')"
	>
		{% render "@magic--default" %}
	</div>

	<div
			id="incognito"
			x-intersect.threshold.25="enterSection('incognito')"
	>
		{% render "@magic--incognito" %}
	</div>

	<div
			id="telemedecine"
			x-intersect.threshold.30="enterSection('telemedecine')"
	>
		{% render "@magic--telemedecine" %}
	</div>

	<div
			id="magic-toggle-container"
			:class="{
				'dark': isMagicDark,
				'light': !isMagicDark
			}"
			class="hidden md:flex justify-center mt-10 sticky bottom-4 w-full z-10"
			x-transition
	>
		{% render "@magic-toggle" %}
	</div>
</div>

<script>
	function stickyToggle() {
		return {
			activeSection: null,
			isToggleSticky: false,
			isIntersecting: false,
			themeApplied: {},  // To track if a theme has already been applied once
			highestThemeApplied: 0,  // Priority level of the highest theme already applied
			isMagicDark: false,

			// Associates each section with a priority level
			priorityMap: {
				magic: 1,
				incognito: 2,
				telemedecine: 3
			},

			enterSection(sectionId) {
				// Deactivates the previous active section if it exists
				if (this.activeSection && this.activeSection !== sectionId) {
					const previousSection = document.querySelector(`#paginationAnchor-${this.activeSection}`);
					if (previousSection) {
						previousSection.classList.remove('active');
					}
				}

				// Activates the new section
				this.activeSection = sectionId;
				const activationSection = document.querySelector(`#paginationAnchor-${sectionId}`);
				if (activationSection) {
					activationSection.classList.add('active');
				}

				// Applies the theme for the section if not already done
				this.applyThemeForSection(sectionId);
				this.updateToggleState();
			},
			updateToggleState() {
				// Toggles sticky if activeSection is defined
				this.isToggleSticky = this.activeSection !== null;
				this.isIntersecting = this.activeSection === null;
			},
			applyThemeForSection(sectionId) {
				const currentPriority = this.priorityMap[sectionId];

				// Applies the theme only if the priority level of the section
				// is higher than the highest applied priority level
				if (this.themeApplied[sectionId] || currentPriority <= this.highestThemeApplied) return;

				const colorMap = {
					magic: { backgroundColor: '#262626', color: '#FFFFFF' },
					incognito: { backgroundColor: '#E5E5E5', color: 'black' },
					telemedecine: { backgroundColor: '#FFFFFF', color: 'black' },
				};

				const colors = colorMap[sectionId];
				if (colors) {
					gsap.to(this.$refs.magicPaginationAnchor, {
						backgroundColor: colors.backgroundColor,
						color: colors.color,
						duration: 2,
					});

					// Marks the section as "themed" to avoid repetition
					this.themeApplied[sectionId] = true;

					// Sets isMagicDark depending on the active section
					this.isMagicDark = sectionId === 'magic';

					// Updates the highest priority level applied
					this.highestThemeApplied = currentPriority;
				}
			},

			init() {
				// Initializes default values
				this.activeSection = null;
				this.updateToggleState();
				this.themeApplied = {
					magic: false,
					incognito: false,
					telemedecine: false,
				};
				this.highestThemeApplied = 0;  // Initially, no theme has been applied
			},
		};
	}
</script>
/* No context defined. */

No notes defined.