/*
 * Hi’Falafel — Navigation mobile commune.
 * Le menu conserve le HTML et le JavaScript existants ; seul le rendu change.
 * Les règles sont ciblées sur les petits écrans pour ne pas modifier le desktop.
 */
@media (max-width: 900px) {
  body .site-header .menu-toggle {
    display: flex !important;
    width: 44px !important;
    height: 44px !important;
    padding: 11px 9px !important;
    margin: 0 !important;
    flex: 0 0 44px !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: 7px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    position: relative;
    z-index: 102;
  }

  body .site-header .menu-toggle span {
    display: block !important;
    width: 26px !important;
    height: 1.5px !important;
    margin: 0 !important;
    border-radius: 1px;
    background-color: #35291f !important;
    transform-origin: center;
    transition: transform .25s ease, width .25s ease, background-color .25s ease !important;
  }

  body .site-header .menu-toggle span:last-child { width: 19px !important; }

  /* On the photograph, preserve the light header icon. */
  body.home-page:not(.menu-open) .site-header:not(.scrolled) .menu-toggle span {
    background-color: #f8f1e7 !important;
  }

  body .site-header .menu-toggle.open span:first-child {
    transform: translateY(4.25px) rotate(45deg) !important;
  }
  body .site-header .menu-toggle.open span:last-child {
    width: 26px !important;
    transform: translateY(-4.25px) rotate(-45deg) !important;
  }

  body .mobile-menu {
    display: block !important;
    inset: 0 !important;
    z-index: 85 !important;
    background: #f6efe5 !important;
    color: #35291f !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
  }
  body .mobile-menu.open { pointer-events: auto; }
  body.menu-open { overflow: hidden; }

  body .mobile-menu .mobile-menu-inner {
    box-sizing: border-box;
    min-height: 100%;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: clamp(112px, 17vh, 155px) 8vw max(38px, env(safe-area-inset-bottom)) !important;
  }
  body .mobile-menu .mobile-menu-inner > a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: clamp(10px, 1.9vh, 17px) 0 !important;
    border-bottom: 1px solid rgba(70, 55, 43, .15) !important;
    background: transparent !important;
    color: #35291f !important;
    -webkit-text-fill-color: #35291f !important;
    font-family: "Newsreader", Georgia, serif !important;
    font-size: clamp(32px, 8.4vw, 41px) !important;
    font-weight: 400 !important;
    line-height: 1.06 !important;
    letter-spacing: .005em !important;
    text-decoration: none !important;
    text-shadow: none !important;
  }
  body .mobile-menu .mobile-menu-inner > a:hover,
  body .mobile-menu .mobile-menu-inner > a:focus-visible {
    color: #6a7559 !important;
    -webkit-text-fill-color: #6a7559 !important;
  }
  body .mobile-menu .hf-lang-mobile {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 24px !important;
    margin-top: clamp(25px, 5vh, 48px) !important;
  }
  body .mobile-menu .hf-lang-mobile a {
    color: #35291f !important;
    -webkit-text-fill-color: #35291f !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    opacity: .57 !important;
    padding: 0 0 4px !important;
    letter-spacing: .08em !important;
  }
  body .mobile-menu .hf-lang-mobile a.active {
    opacity: 1 !important;
    text-decoration: underline !important;
    text-underline-offset: 5px !important;
  }

  /* Header sits above the open menu: use dark logo and controls on ivory. */
  body.menu-open header.site-header,
  body.home-page.menu-open header.site-header:not(.scrolled) {
    background: #f6efe5 !important;
    background-color: #f6efe5 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body.menu-open .site-header .brand .brand-logo,
  body.home-page.menu-open .site-header:not(.scrolled) .brand .brand-logo {
    filter: none !important;
  }
  body.menu-open .site-header .menu-toggle span,
  body.home-page.menu-open .site-header:not(.scrolled) .menu-toggle span {
    background-color: #35291f !important;
  }
  body.menu-open .site-header .hf-lang-switch a,
  body.menu-open .site-header .hf-lang-switch a span,
  body.home-page.menu-open .site-header:not(.scrolled) .hf-lang-switch a,
  body.home-page.menu-open .site-header:not(.scrolled) .hf-lang-switch a span {
    color: #35291f !important;
    -webkit-text-fill-color: #35291f !important;
  }

  body .site-header .menu-toggle:focus-visible,
  body .mobile-menu a:focus-visible {
    outline: 2px solid #697256;
    outline-offset: 4px;
  }
}
@media (max-width: 370px) {
  body .mobile-menu .mobile-menu-inner > a { font-size: 31px !important; }
  body .mobile-menu .mobile-menu-inner { padding-top: 108px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body .site-header .menu-toggle span,
  body .mobile-menu { transition: none !important; }
}
