/* ============================================================
   MENU MOBILE CUSTOM — Apple-Style Accordion
   Thème : Savoy (Child Theme)
   ============================================================ */

/* ----------------------------------------------------------
   1. Masquage du toggle natif Savoy
      IMPORTANT : uniquement sur les items qu'on gère soi-même
      (.menu-item-has-children). Les autres items (href="#" sans
      enfants WP) gardent leur nm-menu-toggle pour que Savoy
      puisse les gérer normalement → évite l'URL page/#.
   ---------------------------------------------------------- */
.nm-initialized .menu-item-has-children > span.nm-menu-toggle,
.nm-initialized .menu-item-has-children > span.nm-menu-toggle * {
  display: none !important;
}

/* Pseudo-éléments Savoy sur le <a> des items parents */
.nm-initialized .menu-item-has-children > a::after,
.nm-initialized .menu-item-has-children > a::before {
  display: none !important;
}

/* ----------------------------------------------------------
   2. Ligne de menu parent : toute la ligne est cliquable
   ---------------------------------------------------------- */
.nm-initialized .menu-item-has-children > a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100%;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* ----------------------------------------------------------
   3. Icône chevron (injectée par le JS)
   ---------------------------------------------------------- */
.nm-initialized .menu-item-has-children > a .nm-chevron {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  top: 0;
  margin-left: 8px;
  width: 20px;
  height: 20px;

  background-color: currentColor;
  opacity: 0.65;

  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 14px 14px;

  pointer-events: none;
  transform-origin: center center;

  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.35s ease;
  will-change: transform;
}

/* État ouvert : rotation ↓
   Utilise "lum-open" (notre classe) et PAS "nm-open" (classe Savoy) */
.nm-initialized .menu-item-has-children.lum-open > a .nm-chevron {
  transform: rotate(90deg);
  opacity: 1;
}

/* ----------------------------------------------------------
   4. Indentation sous-menu
   ---------------------------------------------------------- */
.nm-initialized .sub-menu .menu-item > a {
  padding-left: 1.5rem;
  opacity: 0.85;
}

.nm-initialized .sub-menu .sub-menu .menu-item > a {
  padding-left: 2.5rem;
  opacity: 0.7;
}
