<div id="help-coach"><div class="cursor-pointer step-0"><div class="d-flex justify-content-center align-items-center gap-3 mobile-display-none" style="padding-right: 70px;"><div class="text-white">Un <b>coaching <br/>gratuit</b>avec Sacha ?</div><div class="position-absolute" style="right: -10px; bottom: -5px;"><img src="{{ asset('assets/media/sacha-reverse.png') }}" style="max-width: 100px; max-height: 150px; object-fit: contain;" /></div></div><div class="mobile-display-block"><div class="d-flex justify-content-end align-items-center gap-3"><div class="text-white" id="help-coach-mobile-text-animation">Parler<br/>avec <b>Sacha</b> ?</div><div><img src="{{ asset('assets/media/sacha-croped.png') }}" style="max-width: 40px; max-height: 40px; object-fit: contain; transform: rotateY(3.142rad);" /></div></div></div></div><div class="step step-1 shadow-xs bg-white border-radius10"><div class="text-primary fw-bolder text-center" style="font-size: 16px; line-height: 22px;">Bienvenue dans l'espace de coaching ZenDez-Vous</div><div class="mt-7"><div><button class="d-flex justify-content-between align-items-center talk-to-sacha" style="padding: 15px;"><div><img src="{{ asset('assets/media/sacha.png') }}" style="max-width: 60px; max-height: 70px; object-fit: contain;" /></div><div>Parler avec Sacha, c'est gratuit. Allons-y !</div></button></div><div class="mt-5"><a href="{{ path('default_conseils') }}"><button style="padding: 15px;">Prendre rendez-vous avec un coach professionnel</button></a></div></div></div><div class="close close1" style="display: none;"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 384 512"><path fill="#FFFFFF" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg></div><div class="expand expand2 tablet-display-none" style="display: none;"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 512 512"><path fill="#FFFFFF" d="M344 0H488c13.3 0 24 10.7 24 24V168c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512H24c-13.3 0-24-10.7-24-24V344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"/></svg></div><div class="close close2" style="display: none;"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 384 512"><path fill="#FFFFFF" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg></div><div class="step step-3 shadow-xs bg-white border-radius10"><div class="text-primary fw-bolder text-center" style="font-size: 16px; line-height: 22px;">Vous préférez parler à un humain ?</div><div class="mt-7"><div class="mt-5"><a href="{{ path('default_conseils') }}" target="_blank"><button style="padding: 15px;">Prendre rendez-vous avec un coach professionnel</button></a></div></div><div class="mt-3"><div class="text-center text-decoration-underline cursor-pointer close3">Non merci</div></div></div></div><script>(function() {var step0 = document.querySelector("#help-coach .step-0");var step1 = document.querySelector("#help-coach .step-1");var close1 = document.querySelector("#help-coach .close1");var talkToSachaBtn = document.querySelector("#help-coach .step-1 .talk-to-sacha");var close2 = document.querySelector("#help-coach .close2");var expand2 = document.querySelector("#help-coach .expand2");var step3 = document.querySelector("#help-coach .step-3");var close3= document.querySelector("#help-coach .close3");step0.addEventListener("click", (event) => {step0.style.display = "none";step1.style.maxWidth = "300px";step1.style.maxHeight = "initial";step1.style.padding = "25px";close1.style.display = "block";});talkToSachaBtn.addEventListener("click", (event) => {step1.style.maxWidth = "0";step1.style.maxHeight = "0";step1.style.padding = "0";close1.style.display = "none";close2.style.display = "block";expand2.style.display = "block";openTalkToSacha();});close1.addEventListener("click", (event) => {step0.style.display = "block";step1.style.maxWidth = "0";step1.style.maxHeight = "0";step1.style.padding = "0";close1.style.display = "none";});close2.addEventListener("click", (event) => {document.querySelector("#botmanWidgetRoot > div").insertAdjacentHTML('beforeend', '<div id="close-sacha">Étes-vous sûr de vouloir arrêter la conversation avec Sacha ?<div class="buttons"><a id="close-sacha-yes" href="#">Oui</a><a id="close-sacha-no" href="#">Non</a></div></div>');close2.style.display = "none";document.getElementById("close-sacha-yes").addEventListener("click", (event) => {document.getElementById("close-sacha").remove();step3.style.maxWidth = "300px";step3.style.maxHeight = "initial";step3.style.padding = "25px";expand2.style.display = "none";closeTalkToSacha();});document.getElementById("close-sacha-no").addEventListener("click", (event) => {document.getElementById("close-sacha").remove();close2.style.display = "block";});});expand2.addEventListener("click", (event) => {var botDivEl = document.querySelector("#botmanWidgetRoot > div");if (expand2.classList.contains('active')) {botDivEl.style.height = "initial";botDivEl.style.width = "370px";botDivEl.childNodes[1].style.height = "450px";} else {botDivEl.style.height = "650px";botDivEl.style.width = "600px";botDivEl.style.maxWidth = "100%";botDivEl.childNodes[1].style.height = "600px";}expand2.classList.toggle('active');});close3.addEventListener("click", (event) => {step0.style.display = "block";step3.style.maxWidth = "0";step3.style.maxHeight = "0";step3.style.padding = "0";});})();</script><script>var botmanWidget = {frameEndpoint: '{{ path("chat_frame") }}',chatServer: '{{ path("chat_message") }}?userId={{ random()~random() }}',introMessage: "Bonjour, je suis Sacha, en quoi puis-je vous aider ?",title: 'Parler avec Sacha',mobileWidth: "100%",headerTextColor: '#fff',mainColor: '#336c7a',color: '#ffffff',bubbleBackground: '#FFFFFF',aboutLink: '#',aboutText: '',placeholderText: 'Répondre ...',displayMessageTime: true};function openTalkToSacha() {botmanChatWidget.open();}function closeTalkToSacha() {botmanChatWidget.close();}</script><script src='https://cdn.jsdelivr.net/npm/botman-web-widget@0/build/js/widget.js'></script><script>// Prevent header on click closing(function() {function removeOnClick(element) {function onClickFunction(event) {event.preventDefault();event.stopPropagation();return false;}element.addEventListener('click', onClickFunction, true);}// Fonction à exécuter lors de l'observation des mutationsfunction observerCallback(mutationsList, observer) {// Parcourir les mutationsfor(let mutation of mutationsList) {if (mutation.type === 'childList' && mutation.addedNodes && mutation.addedNodes[0].id === 'botmanWidgetRoot') {const botmanWidgetRootDiv = document.querySelector('#botmanWidgetRoot > div');const config2 = { childList: true };const observer2 = new MutationObserver(observerCallback2);observer2.observe(botmanWidgetRootDiv, config2);}}}function observerCallback2(mutationsList, observer) {// Parcourir les mutationsfor(let mutation of mutationsList) {if (mutation.target) {const targettedDiv = mutation.target.querySelector('div');if (targettedDiv) {removeOnClick(targettedDiv);}}}}// Sélectionner l'élément à observerconst targetNode = document.body;const config = { childList: true };const observer = new MutationObserver(observerCallback);observer.observe(targetNode, config);})();</script><script>// Hide text on mobile(function() {setTimeout(function(){document.getElementById('help-coach-mobile-text-animation').style.maxWidth = '0';}, 3000);})();</script><style>#botmanWidgetRoot .desktop-closed-message-avatar {display: none !important;}#botmanWidgetRoot div {cursor: default !important;font-weight: 500 !important;font-family: "Montserrat", sans-serif !important;z-index: 99999 !important;}#botmanWidgetRoot svg {display: none !important;}#help-coach-mobile-text-animation {width: 100%;max-width: 100%;overflow: hidden;white-space: nowrap;transition: max-width 0.3s linear;}#botmanWidgetRoot #close-sacha {position: absolute;top: 0;left: 0;background-color: #e9e9e994;backdrop-filter: blur(10px);-webkit-backdrop-filter: blur(10px);height: 100%;width: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;font-size: 16px;text-align: center;padding: 30px;}#botmanWidgetRoot #close-sacha .buttons {margin-top: 15px;}#botmanWidgetRoot #close-sacha .buttons a {display: inline-block;margin-left: 20px;margin-right: 20px;}</style>