/* Reservation de table — toutes les classes commencent par tb- */
.tb { --tb-accent: #e55a29; --tb-accent-dark: #c4461a; --tb-ink: #1f2328; --tb-muted: #6b7280; --tb-line: #e7e2dd; --tb-soft: #fbf6f2;
  padding: 48px 0 80px; color: var(--tb-ink); }
.tb *, .tb *::before, .tb *::after { box-sizing: border-box; }
.tb-form { max-width: 760px; margin: 0 auto; }
.tb-intro { margin: 0 0 20px; font-size: 16px; color: var(--tb-muted); }
.tb-preview { max-width: 760px; margin: 0 auto 18px; padding: 10px 14px; border-radius: 10px; background: #fff4d6; color: #6b4e00; font-size: 14px; }
.tb-alert { margin: 0 0 18px; padding: 12px 16px; border-radius: 10px; background: #fdecea; color: #a12a1f; font-size: 14px; }
.tb-alert p { margin: 0; }
.tb-alert p + p { margin-top: 4px; }
.tb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tb-card { margin: 0 0 16px; padding: 22px 22px 18px; border: 1px solid var(--tb-line); border-radius: 16px; background: #fff; min-width: 0; }
.tb-step { display: flex; align-items: center; gap: 10px; float: none; width: auto; margin: 0 0 14px; padding: 0; font-size: 18px; font-weight: 700; color: var(--tb-ink); line-height: 1.3; }
.tb-step span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tb-accent); color: #fff; font-size: 14px; flex: none; }
.tb-muted { margin: 10px 0 0; font-size: 13px; color: var(--tb-muted); }
.tb-hint { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: #14613a; }
.tb-hint.is-warn { color: var(--tb-accent-dark); }

/* Restaurants */
.tb-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tb-store { position: relative; margin: 0; cursor: pointer; }
.tb-store input { position: absolute; opacity: 0; pointer-events: none; }
.tb-store__box { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 2px solid var(--tb-line); border-radius: 12px; transition: border-color .15s, background .15s; }
.tb-store__name { font-weight: 700; font-size: 15px; }
.tb-store__addr { font-size: 13px; color: var(--tb-muted); }
.tb-store__off { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: #eceff3; color: #556070; font-size: 11px; font-style: normal; font-weight: 600; }
.tb-store input:checked + .tb-store__box { border-color: var(--tb-accent); background: var(--tb-soft); }
.tb-store input:focus-visible + .tb-store__box { outline: 3px solid rgba(229, 90, 41, .35); outline-offset: 2px; }

/* Jours */
.tb-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.tb-day { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 2px solid var(--tb-line); border-radius: 12px; background: #fff; color: var(--tb-ink); cursor: pointer; scroll-snap-align: start; font: inherit; }
.tb-day__top { font-size: 12px; color: var(--tb-muted); text-transform: capitalize; white-space: nowrap; }
.tb-day__num { font-size: 22px; font-weight: 700; line-height: 1.1; }
.tb-day__month { font-size: 12px; color: var(--tb-muted); text-transform: capitalize; }
.tb-day:hover:not(:disabled) { border-color: #f0b49d; }
.tb-day.is-on { border-color: var(--tb-accent); background: var(--tb-accent); color: #fff; }
.tb-day.is-on .tb-day__top, .tb-day.is-on .tb-day__month { color: rgba(255, 255, 255, .9); }
.tb-day:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }

/* Personnes */
.tb-guests { display: inline-flex; align-items: center; border: 2px solid var(--tb-line); border-radius: 12px; overflow: hidden; }
.tb-guests__btn { width: 52px; height: 52px; border: 0; background: var(--tb-soft); color: var(--tb-ink); font-size: 24px; line-height: 1; cursor: pointer; }
.tb-guests__btn:hover { background: #f5e6dc; }
.tb-guests input { width: 72px; height: 52px; border: 0; text-align: center; font-size: 22px; font-weight: 700; color: var(--tb-ink); background: #fff; -moz-appearance: textfield; }
.tb-guests input::-webkit-outer-spin-button, .tb-guests input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Heures */
.tb-times__group + .tb-times__group { margin-top: 14px; }
.tb-times__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tb-muted); }
.tb-times__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.tb-time { height: 44px; border: 2px solid var(--tb-line); border-radius: 10px; background: #fff; color: var(--tb-ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.tb-time:hover { border-color: #f0b49d; }
.tb-time.is-on { border-color: var(--tb-accent); background: var(--tb-accent); color: #fff; }

/* Coordonnees */
.tb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.tb-field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 14px; font-weight: 600; }
.tb-field--wide { grid-column: 1 / -1; }
.tb-field input, .tb-field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid #d6d0ca; border-radius: 10px; background: #fff; color: var(--tb-ink); font: inherit; font-weight: 400; font-size: 16px; }
.tb-field input { height: 48px; }
.tb-field input:focus, .tb-field textarea:focus { outline: none; border-color: var(--tb-accent); box-shadow: 0 0 0 3px rgba(229, 90, 41, .18); }

/* Envoi */
.tb-submit { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; padding: 14px 16px; border: 1px solid var(--tb-line); border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 -6px 18px rgba(0, 0, 0, .06); }
.tb-summary { margin: 0; font-size: 14px; color: var(--tb-muted); }
.tb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; border: 2px solid var(--tb-accent); border-radius: 99px; background: var(--tb-accent); color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.tb-btn:hover { background: var(--tb-accent-dark); border-color: var(--tb-accent-dark); }
.tb-btn:disabled { opacity: .6; cursor: wait; }
.tb-btn--ghost { background: #fff; color: var(--tb-accent) !important; }
.tb-btn--ghost:hover { background: var(--tb-soft); color: var(--tb-accent-dark) !important; }

/* Pas de restaurant ouvert */
.tb-empty { max-width: 560px; margin: 0 auto; text-align: center; font-size: 16px; }
.tb-empty__phone { font-size: 22px; font-weight: 700; }
.tb-empty__phone a { color: var(--tb-accent); }

/* Confirmation */
.tb--conf { padding-top: 180px; }
.tb-conf { max-width: 560px; margin: 0 auto; padding: 32px 28px; text-align: center; }
.tb-conf__icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #dff5e8; color: #14613a; }
.tb-conf--pending .tb-conf__icon { background: #fff1e6; color: var(--tb-accent-dark); }
.tb-conf--declined .tb-conf__icon, .tb-conf--cancelled .tb-conf__icon { background: #eceff3; color: #556070; }
.tb-conf__title { margin: 16px 0 8px; font-size: 26px; font-weight: 800; color: var(--tb-ink); }
.tb-conf__text { margin: 0 0 22px; color: var(--tb-muted); font-size: 15px; }
.tb-recap { margin: 0 0 18px; text-align: left; border-top: 1px solid var(--tb-line); }
.tb-recap div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--tb-line); }
.tb-recap dt { font-weight: 400; color: var(--tb-muted); }
.tb-recap dd { margin: 0; text-align: right; }
.tb-conf__change { font-size: 14px; color: var(--tb-muted); }
.tb-conf__change a { color: var(--tb-accent); font-weight: 700; white-space: nowrap; }
.tb-conf__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

@media (max-width: 575px) {
  .tb { padding: 28px 0 40px; }
  .tb--conf { padding-top: 130px; }
  .tb-card { padding: 18px 14px 14px; border-radius: 14px; }
  .tb-fields { grid-template-columns: 1fr; }
  .tb-submit { flex-direction: column; align-items: stretch; border-radius: 14px 14px 0 0; margin: 6px -12px 0; }
  .tb-btn { width: 100%; }
  .tb-summary { text-align: center; }
  .tb-recap div { flex-direction: column; gap: 2px; }
  .tb-recap dd { text-align: left; }
}

/* Le site affiche un menu fixe en bas (.mobile-bottom-menu, 63 px) sous 576 px : la barre d'envoi reste au-dessus. */
@media (max-width: 575.98px) {
  .tb-submit { bottom: 64px; }
  .tb { padding-bottom: 90px; }
}
