/* ===================== FORMULAIRE DE RÉSERVATION ===================== */

#booking-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1a3a5c;
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

#booking-bar * {
  box-sizing: border-box;
}

/* ---------- Bouton toggle (uniquement visible sur mobile) ---------- */
#resa-toggle {
  display: none;
  width: 100%;
  background: #e8b23a;
  color: #1a3a5c;
  border: none;
  padding: 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#resa-toggle .resa-arrow {
  transition: transform 0.3s ease;
  display: inline-block;
}

#booking-bar.resa-open #resa-toggle .resa-arrow {
  transform: rotate(180deg);
}

/* ---------- Formulaire ---------- */
#resa-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

#resa-form .field {
  display: flex;
  flex-direction: column;
}

#resa-form label {
  font-size: 11px;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#resa-form input,
#resa-form select {
  padding: 7px 8px;
  border: none;
  border-radius: 3px;
  font-size: 13px;
  min-width: 90px;
  font-family: inherit;
}

#resa-form button[type="submit"] {
  background: #e8b23a;
  color: #1a3a5c;
  border: none;
  padding: 9px 22px;
  border-radius: 3px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
}

#resa-form button[type="submit"]:hover {
  background: #f5c451;
}

/* Champ âges enfants généré dynamiquement */
#resa-ages-fields {
  display: flex;
  gap: 5px;
}

#resa-ages-fields > div {
  display: flex;
  flex-direction: column;
}

#resa-ages-fields label {
  font-size: 10px;
  margin-bottom: 2px;
}

/* Espace en bas de page pour ne pas masquer le contenu */
body.has-booking-bar {
  padding-bottom: 140px;
}

/* ===================== RESPONSIVE MOBILE ===================== */
@media (max-width: 768px) {

  #booking-bar {
    padding: 10px 12px;
  }

  /* Affiche le bouton toggle */
  #resa-toggle {
    display: flex;
  }

  /* Formulaire masqué par défaut, glissé vers le bas */
  #resa-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.3s ease;
    margin-top: 0;
  }

  /* Quand le panneau est ouvert */
  #booking-bar.resa-open #resa-form {
    max-height: 600px;
    opacity: 1;
    margin-top: 12px;
  }

  #resa-form .field {
    width: 100%;
  }

  #resa-form input,
  #resa-form select {
    width: 100%;
    min-width: 0;
    font-size: 14px;
    padding: 9px 10px;
  }

  #resa-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 4px;
  }

  #resa-ages-fields {
    flex-wrap: wrap;
  }

  #resa-ages-fields > div {
    flex: 1 1 45%;
  }

  /* Réserve l'espace en bas uniquement quand le panneau est fermé */
  body.has-booking-bar {
    padding-bottom: 70px;
  }

  body.has-booking-bar.resa-mobile-open {
    padding-bottom: 480px;
  }
}