/**
 * Icônes jki redessinées, et animations du header et du menu mobile.
 *
 * Les modèles Elementor (header, menus mobiles, footer, popup Réserver,
 * page CGV) utilisent les icônes « jki » de l'extension Jeg Elementor Kit,
 * désactivée parce qu'elle faisait bugger le site : sans sa police, ces
 * icônes ne s'affichaient plus. Chaque classe jki reçoit ici un SVG en
 * masque, rempli avec currentColor : les couleurs et survols réglés dans
 * Elementor s'appliquent tels quels. Aucun modèle ni réglage n'est modifié.
 *
 * Le hamburger reste dessiné par le CSS additionnel (Personnaliser) ; on ne
 * fait qu'animer son ::before, sans toucher à ses couleurs.
 *
 * Animations reprises du site Barooder (durées et courbes), coupées si le
 * visiteur demande de réduire les animations.
 *
 * @package Gallery_Events
 */

/* ── Icônes jki ── */
.jki {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -.125em;
}
.jki::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask: var(--ge-jki) center / contain no-repeat;
          mask: var(--ge-jki) center / contain no-repeat;
}
.jki-x-line { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6'%3E%3Cpath d='M5 5l14 14M19 5L5 19'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-chevron-left-light { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'%3E%3Cpath d='M15.5 3.5L7 12l8.5 8.5'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-long-arrow-alt-down-solid { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4'%3E%3Cpath d='M12 3v17M6 14l6 6 6-6'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-long-arrow-alt-up-solid { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4'%3E%3Cpath d='M12 21V4M6 10l6-6 6 6'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-internet-light { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18M4.6 7.5h14.8M4.6 16.5h14.8'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-download-line { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'%3E%3Cpath d='M12 3.5v11M7 10l5 5 5-5M4 16.5V20h16v-3.5'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-file-pdf-solid { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23000' fill-rule='evenodd'%3E%3Cpath d='M6 2h8l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm7 1.5V8h4.5zM7 12.5h10v1.6H7zm0 3.4h10v1.6H7zm0 3.4h6v1.6H7z'/%3E%3C/g%3E%3C/svg%3E"); }
.jki-phone-call-light { --ge-jki: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.4'%3E%3Cpath d='M5.5 3.5h3l1.8 4.6-2.2 1.4a11.5 11.5 0 0 0 6.4 6.4l1.4-2.2 4.6 1.8v3a2 2 0 0 1-2.1 2A16.5 16.5 0 0 1 3.5 5.6a2 2 0 0 1 2-2.1z'/%3E%3C/g%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: no-preference) {

  /* ── Hamburger : survol, barre du milieu à 52 % ; clic, il pivote et se
        resserre. Le découpage (clip-path) laisse les couleurs au CSS
        additionnel ; « body » passe devant sa règle de transition. ── */
  body .menu-burger .elementor-icon::before {
    clip-path: polygon(0 -10px, 100% -10px, 100% -5px, 100% -5px, 100% 7px, 100% 7px, 100% 12px, 0 12px);
    transition: background .18s ease, box-shadow .18s ease,
                clip-path .34s cubic-bezier(.2, .8, .3, 1), transform .34s cubic-bezier(.2, .8, .3, 1);
  }
  body .menu-burger .elementor-icon:hover::before {
    clip-path: polygon(0 -10px, 100% -10px, 100% -5px, 52% -5px, 52% 7px, 100% 7px, 100% 12px, 0 12px);
  }
  body .menu-burger .elementor-icon:active::before {
    clip-path: polygon(0 -10px, 100% -10px, 100% -5px, 20% -5px, 20% 7px, 100% 7px, 100% 12px, 0 12px);
    transform: rotate(90deg) scaleY(.6);
  }

  /* ── Croix de fermeture : 90° au survol, 180° au clic ── */
  .jki-x-line::before { transition: transform .38s cubic-bezier(.2, .8, .3, 1); }
  .elementor-icon:hover .jki-x-line::before { transform: rotate(90deg); }
  .elementor-icon:active .jki-x-line::before { transform: rotate(180deg); }

  /* ── Chevron retour des sous-menus ── */
  .jki-chevron-left-light::before { transition: transform .3s cubic-bezier(.2, .8, .3, 1); }
  .elementor-icon:hover .jki-chevron-left-light::before { transform: translateX(-4px); }

  /* ── Flèches du mega-menu : descendent au survol de leur rubrique ── */
  .e-n-menu-dropdown-icon .jki::before { transition: transform .3s cubic-bezier(.2, .8, .3, 1); }
  .e-n-menu-title:hover .e-n-menu-dropdown-icon .jki-long-arrow-alt-down-solid::before { transform: translateY(3px); }
  .e-n-menu-title:hover .e-n-menu-dropdown-icon .jki-long-arrow-alt-up-solid::before { transform: translateY(-3px); }

  /* ── Menu mobile (popup 23) : le panneau se déroule du haut ── */
  #elementor-popup-modal-23 .dialog-widget-content.animated:not(.reverse) {
    animation: ge-menu-deroule .52s cubic-bezier(.16, 1, .3, 1) both !important;
  }

  /* ── Sous-menus : même glissement qu'avant, plus court, courbe Barooder ── */
  #elementor-popup-modal-27 .dialog-widget-content.animated:not(.reverse),
  #elementor-popup-modal-1647 .dialog-widget-content.animated:not(.reverse),
  #elementor-popup-modal-5891 .dialog-widget-content.animated:not(.reverse),
  #elementor-popup-modal-5892 .dialog-widget-content.animated:not(.reverse),
  #elementor-popup-modal-7583 .dialog-widget-content.animated:not(.reverse) {
    animation-duration: .52s !important;
    animation-timing-function: cubic-bezier(.16, 1, .3, 1) !important;
  }

  /* ── Rubriques et boutons des menus : remontent l'un après l'autre (les
        délais ne jouent que là où l'animation est posée) ── */
  :is(#elementor-popup-modal-23, #elementor-popup-modal-27, #elementor-popup-modal-1647, #elementor-popup-modal-5891, #elementor-popup-modal-5892, #elementor-popup-modal-7583)
    .dialog-widget-content.animated:not(.reverse) :is(.elementor-icon-list-item, .elementor-widget-button) {
    animation: ge-menu-remonte .55s cubic-bezier(.16, 1, .3, 1) both;
  }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(1) { animation-delay: 0.12s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(2) { animation-delay: 0.18s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(3) { animation-delay: 0.24s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(4) { animation-delay: 0.30s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(5) { animation-delay: 0.36s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(6) { animation-delay: 0.42s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(7) { animation-delay: 0.48s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(8) { animation-delay: 0.54s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(9) { animation-delay: 0.60s !important; }
  .elementor-popup-modal .elementor-icon-list-item:nth-child(10) { animation-delay: 0.66s !important; }
  .elementor-popup-modal .elementor-widget-button:nth-child(2) { animation-delay: 0.40s !important; }
  .elementor-popup-modal .elementor-widget-button:nth-child(3) { animation-delay: 0.46s !important; }
  .elementor-popup-modal .elementor-widget-button:nth-child(4) { animation-delay: 0.52s !important; }
  .elementor-popup-modal .elementor-widget-button:nth-child(5) { animation-delay: 0.58s !important; }
  .elementor-popup-modal .elementor-widget-button:nth-child(6) { animation-delay: 0.64s !important; }
  .elementor-popup-modal .elementor-widget-button:nth-child(7) { animation-delay: 0.70s !important; }

  /* ── Liens des menus mobiles : orange au repos, sable au survol ── */
  .elementor-popup-modal .elementor-icon-list-item .elementor-icon-list-text { transition: color .22s ease; }
  .elementor-popup-modal .elementor-icon-list-item a:hover .elementor-icon-list-text { color: #F3E6DA; }

  /* ── Boutons des menus mobiles : montent de 2 px au survol ── */
  .elementor-popup-modal .elementor-widget-button .elementor-button {
    transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
  }
  .elementor-popup-modal .elementor-widget-button .elementor-button:hover { transform: translateY(-2px); }
}

@keyframes ge-menu-deroule {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes ge-menu-remonte {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* Réduire les animations : l'entrée propre à Elementor est coupée aussi
   (la sortie reste, son minuteur décide de la fermeture). */
@media (prefers-reduced-motion: reduce) {
  .elementor-popup-modal .dialog-widget-content.animated:not(.reverse) { animation: none !important; }
}
