<header id="header" class="w-full flex items-center justify-center px-4 fixed top-0 left-0 z-50 md:h-28 h-24 bg-header {% if app.request.attributes.get('_route') == 'home' %}entrance-header{% endif %}">
<div class="w-full flex items-center justify-between md:px-12 ">
<div {% if app.request.attributes.get('_route') == 'home' %}id="entrance-logo"{% endif %} class="{% if app.request.attributes.get('_route') == 'home' %}flex{% else %}hidden{% endif %} w-full justify-center items-center absolute top-0 left-0 md:h-28 h-24">
<img class="w-10 aspect-auto" alt="{% trans %}Logo{% endtrans %}" src="{{ asset('vitrine/logo/logo-k-white.png') }}">
</div>
<div {% if app.request.attributes.get('_route') == 'home' %}id="second-logo"{% endif %} class="{% if app.request.attributes.get('_route') == 'home' %}hidden{% else %}flex{% endif %} w-full justify-between items-center md:h-28 h-24 relative">
<a href="{{path('home')}}">
<img class="h-14 xl:hidden block" alt="{% trans %}Logo{% endtrans %}" src="{{ asset('vitrine/logo/logo-k-white.png') }}">
<img class="h-14 xl:block hidden" alt="{% trans %}Logo{% endtrans %}" src="{{ asset('vitrine/logo/logo-full-white.png') }}">
</a>
<div class="flex lg:gap-8 gap-4">
<ul class="hidden lg:flex gap-8 items-center font-poppins">
<li>
<a class="{% if app.request.attributes.get('_route') == 'home' %}text-vitrineOrange font-semibold{% endif %}" href="{{path('home')}}">{% trans %}Accueil{% endtrans %}</a>
</li>
<hr class="border-r border-white h-5">
<li>
<a class="{% if app.request.attributes.get('_route') == 'gallery' %}text-vitrineOrange font-semibold{% endif %} " href="{{path('gallery')}}">{% trans %}Galerie{% endtrans %}</a>
</li>
<hr class="border-r border-white h-5">
<li>
<a class="{% if app.request.attributes.get('_route') == 'about' %}text-vitrineOrange font-semibold{% endif %}" href="{{path('about')}}">{% trans %}À propos{% endtrans %}</a>
</li>
<hr class="border-r border-white h-5">
<li>
<a class="{% if app.request.attributes.get('_route') == 'franchise' %}text-vitrineOrange font-semibold{% endif %}" href="{{path('franchise')}}">{% trans %}Franchise{% endtrans %}</a>
</li>
<hr class="border-r border-white h-5">
<li>
<a class="{% if app.request.attributes.get('_route') == 'contact' %}text-vitrineOrange font-semibold{% endif %} " href="{{path('contact')}}">{% trans %}Contact{% endtrans %}</a>
</li>
<hr class="border-r border-white h-5">
</ul>
<div class="relative flex items-center">
<button id="language-selector" class="flex items-center gap-2 transition duration-100 hover:text-vitrineOrange">
<span class="text-base">{{ app.request.locale|upper }}</span>
<svg class="w-4 h-4 ml-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</button>
<div id="language-popup" class="hidden absolute -bottom-[250%] left-0 bg-vitrineBlackOpacity backdrop-filter backdrop-blur-xl shadow-md overflow-hidden">
{% for locale in locales %}
<a href="{{ path('change_locale', {'locale': locale}) }}" class="not-animate block text-white px-4 py-2 hover:bg-vitrineOrange transition duration-100">
<span class="text-sm not-animate">
{{ locale|upper }}
</span>
</a>
{% endfor %}
</div>
</div>
<div class="flex items-center gap-4">
<a href="{{ path('reservation_tunnel') }}" class="px-4 py-2 primary-btn relative">{% trans %}RÉSERVER{% endtrans %}</a>
<a href="{{ path('carte_cadeau_tunnel') }}" class="px-4 py-2 primary-btn relative">{% trans %}OFFRIR{% endtrans %}</a>
</div>
</div>
<svg id="burger-menu" class="lg:hidden block w-10 h-10 z-40 cursor-pointer" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</div>
</div>
</header>
<div id="menu" class="hidden bg-vitrineOrange h-dvh fixed top-0 right-0 w-full z-50 transition duration-300 overflow-hidden">
<div class="w-full h-dvh relative">
<svg id="close-menu" class="fixed top-5 right-2 w-14 h-14 cursor-pointer z-[70]" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
</svg>
<ul id="ul-menu" class="flex flex-col justify-center h-screen gap-6 p-4 md:p-8 relative">
<li>
<a href="{{path('home')}}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}Accueil{% endtrans %}</a>
</li>
<hr class="border-r border-white w-8 opacity-50 ">
<li>
<a href="{{path('gallery')}}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}Galerie{% endtrans %}</a>
</li>
<hr class="border-r border-white w-8 opacity-50 ">
<li>
<a href="{{path('about')}}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}À propos{% endtrans %}</a>
</li>
<hr class="border-r border-white w-8 opacity-50 ">
<li>
<a href="{{path('franchise')}}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}Franchise{% endtrans %}</a>
</li>
<hr class="border-r border-white w-8 opacity-50 ">
<li>
<a href="{{path('contact')}}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}Contact{% endtrans %}</a>
</li>
<hr class="border-r border-white w-8 opacity-50 ">
<li>
<a href="{{ path('reservation_tunnel') }}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}Réserver{% endtrans %}</a>
</li>
<hr class="border-r border-white w-8 opacity-50 ">
<li>
<a href="{{ path('carte_cadeau_tunnel') }}" class="text-white text-2xl font-semibold font-poppins not-animate">{% trans %}Offrir{% endtrans %}</a>
</li>
<div class="absolute bottom-8 right-8 w-max">
<div class="relative">
<svg id="menu-bulle-1" class="absolute top-[10px] right-[24px]" width="14" height="14" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.429966 12.61C1.05997 17.84 6.30998 22.19 12.01 21.63C14.84 21.37 17.63 19.96 19.48 17.64C21.29 15.25 22.11 12.17 21.69 9.15999C21.14 6.17999 19.3799 3.49 16.9099 1.82C14.4299 0.179998 11.32 -0.270005 8.55997 0.379995C2.97997 1.66 -0.630034 7.43998 0.429966 12.61ZM17.99 12.91C17.98 14.08 17.55 15.18 16.9 16.15C16.21 17.09 15.26 17.86 14.19 18.23C13.12 18.65 11.91 18.65 10.87 18.19L10.81 18.18C10.79 18.17 10.76 18.08 10.77 18.06C10.78 18.04 10.81 18 10.83 18C14.57 17.39 17.34 13.55 16.75 9.82C16.74 9.77 16.75 9.71 16.8 9.7C16.83 9.7 16.86 9.72998 16.88 9.73998" fill="white"/>
</svg>
<img class="w-12" src="{{asset('vitrine/logo/logo-k-white.png')}}" alt="logo taaka">
</div>
</div>
</ul>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Burger Menu
const burgerMenu = document.getElementById('burger-menu');
const closeMenu = document.getElementById('close-menu');
const menu = document.getElementById('menu');
const ulMenu = document.getElementById('ul-menu');
const menuBulle1 = document.getElementById('menu-bulle-1');
function showMenu() {
anime({
targets: menu,
width: '100vw',
height: '100vh',
borderBottomLeftRadius: ['100%', '0%'],
duration: 250,
easing: 'easeInOutQuad'
});
anime({
targets: ulMenu,
opacity: [0, 1],
duration: 150,
easing: 'easeInOutQuad',
delay: 250
});
anime({
targets: menuBulle1,
translateY: [0, -50],
opacity: [1, 0],
width: ['0', '14px'],
height: ['0', '14px'],
duration: 1500,
easing: 'linear',
delay: 150
});
}
function hideMenu() {
anime({
targets: ulMenu,
opacity: [1, 0],
duration: 150,
easing: 'easeInOutQuad'
});
setTimeout(() => {
anime({
targets: menu,
width: ['100vw', '0'],
height: ['100vh', '0'],
borderBottomLeftRadius: ['0%', '100%'],
duration: 250,
easing: 'easeInOutQuad',
complete: function() {
menu.classList.add('hidden');
}
});
}, 150);
}
burgerMenu.addEventListener('click', function () {
menu.classList.remove('hidden');
showMenu();
});
closeMenu.addEventListener('click', function () {
hideMenu();
});
const languageSelector = document.getElementById('language-selector');
const languagePopup = document.getElementById('language-popup');
languageSelector.addEventListener('click', function() {
languagePopup.classList.toggle('hidden');
});
// Fermer le pop-up si on clique en dehors
document.addEventListener('click', function(event) {
if (!languageSelector.contains(event.target) && !languagePopup.contains(event.target)) {
languagePopup.classList.add('hidden');
}
});
});
</script>