/* ==========================================================
   Barre mobile fixe (réserver / première visite, ou inscription)
   Apparaît une fois le haut de page dépassé. Cachée sur grand écran.
   ========================================================== */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 248, 245, 0.97);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -10px 24px -18px rgba(35, 40, 46, 0.35);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}

.mobile-bar.is-visible {
  transform: translateY(0);
}

.mobile-bar__inner {
  display: flex;
  gap: 0.6rem;
  max-width: 30rem;
  margin: 0 auto;
}

/* Boutons plus bas que d’habitude, texte sur une ligne ;
   chaque bouton prend la largeur de son texte (le plus long a plus de place) */
.mobile-bar__btn {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem; /* zone tactile 44 px */
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.08em;
  padding: 0.7rem 0.6rem 0.58rem;
}

/* Très petits écrans : texte un peu plus petit pour tenir sur une ligne */
@media (max-width: 22.5em) {
  .mobile-bar__btn {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}

.mobile-bar__btn--full {
  flex: 1 1 100%;
}

/* Pages Horaires : « Première visite » seule, sur toute la largeur,
   avec une ligne qui dit ce qu'on y trouve, et une flèche.
   Contour seulement, jamais plein : le bouton plein est réservé à la réservation */
.mobile-bar__first {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.1rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-primary);
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}

/* Survol : léger fond teinté, le texte garde sa couleur */
.mobile-bar__first:hover,
.mobile-bar__first:focus-visible {
  background: var(--color-tint);
  color: var(--color-primary);
}

.mobile-bar__first-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.mobile-bar__first-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}

.mobile-bar__first-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Très petits écrans : un peu plus petit pour tenir sur une ligne */
@media (max-width: 22.5em) {
  .mobile-bar__first-sub {
    font-size: 0.85rem;
  }
}

.mobile-bar__first-arrow {
  flex: 0 0 auto;
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s var(--ease);
}

.mobile-bar__first:hover .mobile-bar__first-arrow {
  transform: translateX(3px);
}

/* Croix pour masquer la barre (zone tactile 44 px) */
.mobile-bar__close {
  flex: 0 0 auto;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-bar__close:hover,
.mobile-bar__close:focus-visible {
  color: var(--color-ink);
}

/* Laisse la place à la barre pour ne pas masquer le bas de page */
@media (max-width: 63.99em) {
  body.has-mobile-bar {
    padding-bottom: 4rem;
  }
}

@media (min-width: 64em) {
  .mobile-bar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bar {
    transition: none;
  }
}
