
/* Mobile and tablet menu */
/* Settings */
.menu-mobile,
.menu-mobile-header,
.e-off-canvas:has(.menu-mobile) {
  --menu-card-background: rgb(255 255 255 / 0.75);               /* Fond de la première couche, un peu transparent */
  --menu-card-blur: 20px;                                        /* Flou de la page derrière la première couche */
  --menu-card-start: #1800AD;                                    /* Fond de la carte au départ : celui du bouton Menu */
  --menu-card-margin: 16px;                                      /* Espace entre le haut de l'écran et la carte */
  --menu-color: #1800AD;                                         /* Couleur du texte actif et des flèches */
  --menu-color-inactive: color-mix(in srgb, #1800AD 75%, #fff);  /* Couleur du texte des autres options */
  --menu-highlight: rgb(24 0 173 / 0.2);                         /* Fond de l'option survolée ou de la page en cours */
  --menu-highlight-border: rgb(24 0 173 / 0.08);                 /* Bordure de ce fond */
  --menu-highlight-radius: 8px;
  --menu-arrow-gap: 16px;                                        /* Espace entre le texte et la flèche */
  --menu-panel-background: #fff;                                 /* Fond de la seconde couche, le sous-menu : opaque */
  --menu-panel-padding: 20px;                                    /* Marge intérieure du panneau */
  --menu-panel-radius: 16px;
  --menu-duration: 450ms;
  --menu-easing: cubic-bezier(0.25, 0.1, 0, 0.98);               /* Courbe des animations d'entrée du site */
}

/* Layout */
/* The page keeps its scroll while the menu is open or closing: Elementor would lock it on the body and make the
   page jump. The card contains its own scroll with overscroll-behavior */
body.e-off-canvas__no-scroll:has(.e-off-canvas .menu-mobile),
body.e-off-canvas__no-scroll-animation:has(.e-off-canvas .menu-mobile) {
  overflow: visible !important;
}

/* Card of the Off-Canvas, a little away from the top of the screen. Its background is the morph layer below */
.e-off-canvas__content:has(.menu-mobile) {
  position: relative;
  max-height: calc(100dvh - var(--menu-card-margin) * 2);
  margin-top: var(--menu-card-margin) !important;
  overflow: hidden auto !important; /* Scrolls when the screen is too short for the menu */
  overscroll-behavior: contain;
  background: transparent !important;
  box-shadow: none !important;
}

/* Dark backdrop in the site's béton, not Elementor's black */
.e-off-canvas:has(.menu-mobile) .e-off-canvas__overlay {
  background-color: color-mix(in srgb, var(--beton) 80%, transparent) !important;
}

/* Background that morphs from the Menu button to the card, under the content. Placed and sized by the script */
.menu-mobile-morph {
  position: absolute;
  overflow: hidden;
  background: var(--menu-card-background);
  -webkit-backdrop-filter: blur(var(--menu-card-blur));
  backdrop-filter: blur(var(--menu-card-blur));
  box-shadow: 2px 8px 23px 3px rgb(0 0 0 / 0.2);
  pointer-events: none;
}

/* Picture of the Menu button, which fades out as the background grows from it */
.menu-mobile-morph img {
  position: absolute;
  top: 0;
  right: 0;
  max-width: none;
}

/* On tablet Elementor puts the card against the right edge: same gap as at the top. On mobile it is centered */
@media (width >= 768px) {
  .e-off-canvas__content:has(.menu-mobile) {
    margin-right: var(--menu-card-margin) !important;
  }
}

/* The sub-menu panel covers this container. Its own background is dropped so the whole card has the same glass */
.menu-mobile {
  position: relative !important;
  overflow: hidden;
  background: transparent !important;
}

/* Nothing in between may be positioned, otherwise the panel would only cover its own item */
.menu-mobile .elementor-widget-nav-menu,
.menu-mobile .elementor-widget-nav-menu > .elementor-widget-container,
.menu-mobile .elementor-nav-menu--main,
.menu-mobile .elementor-nav-menu--main .elementor-nav-menu,
.menu-mobile .elementor-nav-menu--main .elementor-nav-menu > li {
  position: static !important;
}

/* Components */
/* Options: lighter colour at rest, a rounded tinted box when hovered, pressed or on the current page */
.menu-mobile .elementor-nav-menu--main :is(.elementor-item, .elementor-sub-item) {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: var(--menu-arrow-gap);
  border: 1px solid transparent !important;
  border-radius: var(--menu-highlight-radius);
  background: transparent !important;
  color: var(--menu-color-inactive) !important;
  transition:
    background-color var(--menu-duration) var(--menu-easing),
    border-color var(--menu-duration) var(--menu-easing),
    color var(--menu-duration) var(--menu-easing);
}

.menu-mobile .elementor-nav-menu--main :is(.elementor-item, .elementor-sub-item):is(:active, :focus-visible, .elementor-item-active) {
  border-color: var(--menu-highlight-border) !important;
  background: var(--menu-highlight) !important;
  color: var(--menu-color) !important;
}

@media (hover: hover) {
  .menu-mobile .elementor-nav-menu--main :is(.elementor-item, .elementor-sub-item):hover {
    border-color: var(--menu-highlight-border) !important;
    background: var(--menu-highlight) !important;
    color: var(--menu-color) !important;
  }
}

/* Category arrow: the triangle of the design replaces Elementor's caret, and never turns */
.menu-mobile .elementor-nav-menu--main .sub-arrow {
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.menu-mobile .elementor-nav-menu--main .sub-arrow > :not(.menu-mobile__arrow) {
  display: none !important;
}

.menu-mobile .menu-mobile__arrow {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 11px;
  color: var(--menu-color);
}

/* Sub-menu: a panel over the whole container, waiting on the right. The values set inline by SmartMenus are overridden */
.menu-mobile .elementor-nav-menu--main .sub-menu {
  position: absolute !important;
  inset: 0 !important;
  z-index: 10 !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: var(--menu-panel-padding) !important;
  overflow-y: auto;
  border: 0 !important;
  border-radius: var(--menu-panel-radius);
  background: var(--menu-panel-background) !important;
  box-shadow: none !important;
  box-sizing: border-box;
  transform: translateX(100%);
  visibility: hidden;
  /* Hidden only once it has slid out, so its links leave the tab order without cutting the animation */
  transition:
    transform var(--menu-duration) var(--menu-easing),
    visibility 0s linear var(--menu-duration);
}

.menu-mobile .elementor-nav-menu--main .menu-mobile__open > .sub-menu {
  transform: none;
  visibility: visible;
  transition: transform var(--menu-duration) var(--menu-easing);
}

/* Back button at the top of the panel, with the name of the category */
.menu-mobile .menu-mobile__back {
  display: flex;
  align-items: center;
  gap: var(--menu-arrow-gap);
  width: 100%;
  margin: 0 0 8px;
  padding: 8px;
  border: 0;
  border-radius: var(--menu-highlight-radius);
  background: none;
  color: var(--menu-color);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.menu-mobile .menu-mobile__back .menu-mobile__arrow {
  rotate: 180deg;
}

.menu-mobile .menu-mobile__back:focus-visible {
  outline: 2px solid var(--menu-color);
  outline-offset: 2px;
}

/* Top row of the Off-Canvas: site name on the left, close button on the right.
   It takes the place of the top margin of the menu container */
.menu-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 8px;
}

.menu-mobile-header + .menu-mobile {
  margin-top: 0 !important;
}

.menu-mobile-header__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--menu-color) !important;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none !important;
}

.menu-mobile-header__title img {
  display: block;
  width: 152px;
  height: 20px;
}

/* The !important rules resist the theme's button styles */
.menu-mobile-header__close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 4px !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--menu-color) !important;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-mobile-header__close::before {
  content: "";
  width: 14px;
  height: 2px;
  background: currentColor;
}

.menu-mobile-header__close:focus-visible {
  outline: 2px solid var(--menu-color);
  outline-offset: 2px;
}

/* Motion */
/* The script animates the opening and closing. Elementor keeps playing its animation, now empty, because
   it times the showing and hiding of the Off-Canvas on it */
.e-off-canvas:has(.menu-mobile) .e-off-canvas__main.animated.slideInRight {
  animation-name: menu-card-hold;
}

@keyframes menu-card-hold {
}

@media (prefers-reduced-motion: reduce) {
  .menu-mobile {
    --menu-duration: 0ms;
  }
}
