/* Menu mobile en bas d'écran (Agence Vendredi). Rien ne s'affiche au-dessus de 767 px. */
.av-mm-barre,
.av-mm-panneau,
.av-mm-voile { display: none; }

@media (max-width: 767px) {
  :root {
    --av-mm-h: 62px;
    --av-mm-bas: env(safe-area-inset-bottom, 0px);
    --av-mm-vert: #637B72;
    --av-mm-rose: #8A6F74;
  }
  /* La barre ne doit rien cacher : la page se termine au-dessus d'elle */
  html { scroll-padding-bottom: calc(var(--av-mm-h) + var(--av-mm-bas)); }
  body { padding-bottom: calc(var(--av-mm-h) + var(--av-mm-bas)); }
  html.av-mm-ouvert { overflow: hidden; }

  /* En-tête : la barre remplace le hamburger et le bouton « Réserver », le logo reste seul, centré */
  .elementor-location-header .elementor-element-368aa14 { display: none; }
  /* « body » : pour passer devant la règle d'Elementor, de même poids et chargée après */
  body .elementor-location-header .elementor-element.elementor-element-e3a7a3e { --justify-content: center; }

  /* ----- Barre ----- */
  .av-mm-barre {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    box-sizing: border-box;
    height: calc(var(--av-mm-h) + var(--av-mm-bas));
    padding: 0 4px var(--av-mm-bas);
    background: #fff;
    box-shadow: 0 -2px 16px rgba(40, 50, 46, 0.12);
    font-family: "Montserrat", sans-serif;
  }
  .av-mm-barre .av-mm-lien {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 0 2px;
    color: var(--av-mm-vert);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .av-mm-barre .av-mm-picto { flex: none; width: 23px; height: 23px; }
  /* Page en cours : trait vieux rose au-dessus de la case */
  .av-mm-barre .av-mm-lien[aria-current="page"] { color: var(--av-mm-rose); }
  .av-mm-barre .av-mm-lien[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 28px;
    height: 3px;
    margin-left: -14px;
    border-radius: 0 0 3px 3px;
    background: var(--av-mm-rose);
  }
  /* Case mise en avant : pastille pleine */
  .av-mm-barre .av-mm-lien.av-mm-vedette {
    margin: 7px 2px;
    border-radius: 14px;
    background: var(--av-mm-vert);
    color: #fff;
    gap: 4px;
  }
  .av-mm-barre .av-mm-lien.av-mm-vedette::before { content: none; }
  .av-mm-barre .av-mm-vedette .av-mm-picto { width: 21px; height: 21px; }
  .av-mm-barre .av-mm-lien:focus-visible {
    outline: 2px solid var(--av-mm-rose);
    outline-offset: -5px;
    border-radius: 12px;
  }
  .av-mm-barre .av-mm-vedette:focus-visible { outline-offset: 2px; }
  /* « Menu » devient « Fermer » quand le panneau est ouvert */
  .av-mm-barre .av-mm-picto-fermer { display: none; }
  .av-mm-ouvert .av-mm-barre .av-mm-picto-menu { display: none; }
  .av-mm-ouvert .av-mm-barre .av-mm-picto-fermer { display: block; }

  /* ----- Panneau « Menu » : il monte de derrière la barre ----- */
  .av-mm-voile {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9980;
    background: rgba(40, 50, 46, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.25s;
  }
  .av-mm-panneau {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--av-mm-h) + var(--av-mm-bas));
    z-index: 9985;
    box-sizing: border-box;
    max-height: calc(100vh - var(--av-mm-h) - var(--av-mm-bas) - 60px);
    max-height: calc(100svh - var(--av-mm-h) - var(--av-mm-bas) - 60px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 24px 12px;
    border-radius: 22px 22px 0 0;
    background: #fff;
    font-family: "Montserrat", sans-serif;
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0s 0.28s;
  }
  /* À l'ouverture, « visible » tout de suite (sans délai) : sinon le premier lien ne peut pas recevoir le focus */
  .av-mm-ouvert .av-mm-voile { opacity: 1; visibility: visible; transition-delay: 0s; }
  .av-mm-ouvert .av-mm-panneau { transform: none; visibility: visible; transition-delay: 0s; }

  .av-mm-panneau .av-mm-liste,
  .av-mm-panneau .av-mm-liste ul { list-style: none; margin: 0; padding: 0; }
  .av-mm-panneau .av-mm-liste a {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 4px 2px;
    border-bottom: 1px solid #e8ecea;
    color: var(--av-mm-vert);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
  }
  .av-mm-panneau .av-mm-liste > li:last-child > a,
  .av-mm-panneau .av-mm-liste > li:last-child > ul > li:last-child > a { border-bottom: 0; }
  .av-mm-panneau .av-mm-liste a[aria-current="page"] { color: var(--av-mm-rose); font-weight: 700; }
  .av-mm-panneau .av-mm-groupe > span {
    display: block;
    padding: 20px 2px 4px;
    color: var(--av-mm-rose);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .av-mm-panneau .av-mm-groupe ul a { padding-left: 16px; }
  .av-mm-panneau .av-mm-liste a:focus-visible { outline: 2px solid var(--av-mm-rose); outline-offset: -2px; border-radius: 8px; }

  /* Moteur de réservation : l'iframe s'arrête au-dessus de la barre (réglage d'origine : écran moins 100 px) */
  body iframe[src*="connect.superhote.com/integrations/iframes/"] {
    height: calc(100vh - 100px - var(--av-mm-h));
    height: calc(100svh - 100px - var(--av-mm-h) - var(--av-mm-bas));
    min-height: 440px;
  }
}

/* Calendrier de la barre de recherche Superhote : sous 600 px c'est un panneau fixé en bas de l'écran,
   il se pose au-dessus de la barre au lieu de passer dessous */
@media (max-width: 600px) {
  .shp-form-search-standalone .shp-datepicker { bottom: calc(var(--av-mm-h) + var(--av-mm-bas)); }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .av-mm-voile,
  .av-mm-panneau { transition: none; }
}
@media print {
  .av-mm-barre,
  .av-mm-panneau,
  .av-mm-voile { display: none !important; }
}
