/* ==========================================================================
   [reservation_multisalle_2] — grille de réservation multisalle
   Fond clair. Oswald (titres, horaires, prix) et Open Sans sont déjà chargées par le thème.
   ========================================================================== */

.lb-ms {
  --lb-off: #f1f1ed;
  --lb-ink: #1d1d1b;
  --lb-muted: #6d6d68;
  --lb-line: #e2e2dc;
  --lb-line-strong: #c9c9c2;
  --lb-accent: var(--nectar-accent-color, #7c8c03);
  --lb-accent-dark: #66730a;
  --lb-err: #b8391f;
  --lb-display: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --lb-max-width: 1300px;   /* largeur du module dans une rangée pleine largeur ; à aligner sur le conteneur du site si besoin */

  max-width: var(--lb-max-width);
  margin-inline: auto;
  color: var(--lb-ink);
  font-size: 14px;
  line-height: 1.5;
}
.lb-ms *, .lb-ms *::before, .lb-ms *::after { box-sizing: border-box; }
.lb-ms button { font: inherit; color: inherit; }
.lb-ms button:focus-visible, .lb-ms input:focus-visible { outline: 2px solid var(--lb-accent); outline-offset: 2px; }

/* ---------- date ---------- */
.lb-ms-datebar { display: grid; justify-items: center; gap: 6px; position: relative; }
.lb-ms-daterow { display: flex; align-items: center; gap: 10px; }
.lb-ms .lb-ms-nav {
  width: 42px; height: 42px; padding: 0; margin: 0;
  border: 1px solid var(--lb-line-strong); border-radius: 50%;
  background: #fff; cursor: pointer; display: grid; place-items: center;
}
.lb-ms .lb-ms-nav:hover:not(:disabled) { border-color: var(--lb-ink); }
.lb-ms .lb-ms-nav:disabled { opacity: .3; cursor: default; }
.lb-ms .lb-ms-nav svg { width: 18px; height: 18px; }
/* Largeur minimale sur le libellé : la date la plus longue (« mercredi 30 septembre 2026 »)
   tient dedans, donc les flèches ne bougent pas d'un jour à l'autre. En em, pour suivre le clamp(). */
.lb-ms .lb-ms-date-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin: 0;
  padding: 8px 12px 6px; border: 0; border-bottom: 2px solid var(--lb-accent); border-radius: 0;
  background: none; box-shadow: none; cursor: pointer;
  font-family: var(--lb-display); font-weight: 500; font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.1; letter-spacing: .01em; text-transform: uppercase; color: var(--lb-ink);
}
.lb-ms-date-label { display: inline-block; min-width: 14em; text-align: center; }
.lb-ms .lb-ms-date-main svg { width: 20px; height: 20px; color: var(--lb-muted); flex: none; }
.lb-ms .lb-ms-date-main:hover svg { color: var(--lb-ink); }
.lb-ms-date-sub {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--lb-muted);
}
.lb-ms-date-sub.is-first { color: var(--lb-accent); }
.lb-ms-date-sub.is-first::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lb-accent); }
.lb-ms .lb-ms-today {
  margin: 0 0 0 6px; padding: 8px 12px; border: 1px solid var(--lb-line-strong); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 12.5px; font-weight: 600; line-height: 1.2;
}
.lb-ms .lb-ms-today:hover { border-color: var(--lb-ink); }
.lb-ms .lb-ms-native-date { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- bandeau 7 jours ---------- */
.lb-ms-strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  width: min(100%, 640px); margin: 18px auto 0;
}
.lb-ms .lb-ms-day {
  display: grid; gap: 3px; justify-items: center; margin: 0; padding: 9px 4px 8px;
  border: 1px solid var(--lb-line); border-radius: 10px; background: #fff; cursor: pointer; line-height: 1.2;
}
.lb-ms .lb-ms-day:hover { border-color: var(--lb-ink); }
.lb-ms-day .dow { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lb-muted); }
.lb-ms-day .num { font-family: var(--lb-display); font-weight: 500; font-size: 20px; line-height: 1; }
.lb-ms-day .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lb-line-strong); }
.lb-ms-day.has-free .dot { background: var(--lb-accent); }
.lb-ms-day.is-none .num { color: var(--lb-muted); }
.lb-ms .lb-ms-day.is-selected { background: var(--lb-accent); border-color: var(--lb-accent); color: #fff; }
.lb-ms-day.is-selected .dow, .lb-ms-day.is-selected .num { color: #fff; }
.lb-ms-day.is-selected .dot { background: #fff; }

/* ---------- filtres ---------- */
.lb-ms-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 15px; margin-top: 28px; }
.lb-ms .lb-ms-pill {
  display: inline-flex; align-items: baseline; gap: 8px; margin: 0;
  padding: 10px 28px; border: 0; border-radius: 50px; background: var(--lb-off);
  font-weight: 600; line-height: 1.3; cursor: pointer; transition: background .15s, color .15s;
}
.lb-ms-pill .n { font-family: var(--lb-display); font-weight: 500; font-size: 13px; color: var(--lb-muted); }
.lb-ms .lb-ms-pill.is-on { background: var(--lb-accent); color: #fff; }
.lb-ms-pill.is-on .n { color: #fff; opacity: .85; }
.lb-ms-summary { width: 100%; text-align: center; font-size: 13px; color: var(--lb-muted); }
.lb-ms-summary:empty { display: none; }

/* ---------- état vide ---------- */
.lb-ms-empty {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 22px; padding: 18px 22px; border: 1.5px dashed var(--lb-line-strong);
}
.lb-ms-empty[hidden] { display: none; }
.lb-ms-empty p { margin: 0; padding: 0; }
.lb-ms-empty strong { font-family: var(--lb-display); font-weight: 500; font-size: 19px; text-transform: uppercase; letter-spacing: .01em; }
.lb-ms-empty .sub { display: block; color: var(--lb-muted); font-size: 13px; margin-top: 2px; }
.lb-ms .lb-ms-link {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 11px 18px; border: 0; border-radius: 0;
  background: var(--lb-accent); color: #fff; font-family: var(--lb-display); font-weight: 500; font-size: 15px;
  letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; cursor: pointer;
}
.lb-ms .lb-ms-link:hover { background: var(--lb-accent-dark); }
.lb-ms .lb-ms-link[hidden] { display: none; }
.lb-ms-link svg { width: 16px; height: 16px; }

/* ---------- lignes salles ---------- */
.lb-ms-rooms { display: grid; gap: 12px; margin-top: 22px; transition: opacity .15s; }
.lb-ms.is-loading .lb-ms-rooms { opacity: .4; pointer-events: none; }
.lb-ms-room { display: grid; grid-template-columns: 230px 1fr; border: 1px solid var(--lb-line); }
.lb-ms-room[hidden] { display: none; }
.lb-ms-room-img {
  position: relative; min-height: 190px; display: grid; place-items: center; padding: 34px 16px;
  color: #fff; background: #333 center / cover no-repeat;
}
.lb-ms-room-img::after { content: ""; position: absolute; inset: 0; background: #000; opacity: .28; }
.lb-ms-room-img > * { position: relative; z-index: 1; }
.lb-ms-type {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  padding: 5px 18px; background: var(--lb-accent); color: #fff;
  font-family: var(--lb-display); font-weight: 500; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
/* Taille forcée : Salient impose la sienne aux h3 (surtout sur mobile) avec des règles plus fortes */
.lb-ms .lb-ms-room-img .lb-ms-room-name {
  margin: 0 !important; padding: 0 !important; color: #fff !important;
  font-family: var(--lb-display) !important; font-weight: 500 !important; font-size: 20px !important;
  line-height: 1.15 !important; letter-spacing: 0 !important; text-align: center; text-transform: none;
  text-shadow: 0 1px 10px rgba(0,0,0,.4); text-wrap: balance;
}
.lb-ms-cap {
  position: absolute; bottom: 0; left: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; background: var(--lb-accent); color: #fff;
  font-family: var(--lb-display); font-weight: 500; font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
}
.lb-ms-cap svg { width: 13px; height: 13px; fill: #fff; }

/* auto-fit (et non auto-fill) : les colonnes vides disparaissent, les créneaux se partagent toute la largeur */
.lb-ms-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.lb-ms-slot { display: flex; flex-direction: column; border-left: 1px solid var(--lb-line); border-bottom: 1px solid var(--lb-line); margin-bottom: -1px; }
.lb-ms-slot-time {
  padding: 12px 8px 4px; text-align: center;
  font-family: var(--lb-display); font-weight: 500; font-size: 16px; letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
.lb-ms-slot.is-off { background: var(--lb-off); }
.lb-ms-slot.is-off .lb-ms-slot-time { color: var(--lb-muted); }
.lb-ms-slot.is-past .lb-ms-slot-time { text-decoration: line-through; text-decoration-thickness: 1px; }
.lb-ms-off { flex: 1; display: grid; place-items: center; padding: 24px 12px; color: var(--lb-muted); font-size: 15px; }

.lb-ms .lb-ms-form { display: flex; flex-direction: column; flex: 1; margin: 0; padding: 0; }
.lb-ms-slot-body { flex: 1; display: grid; gap: 6px; justify-items: center; align-content: start; padding: 4px 12px 12px; }

/* participants */
.lb-ms-persons { display: grid; gap: 4px; justify-items: center; }
.lb-ms .lb-ms-persons label { margin: 0; font-size: 12px; font-weight: 400; color: var(--lb-muted); }
.lb-ms-stepper {
  display: inline-grid; grid-template-columns: 30px 56px 30px;
  border: 1px solid var(--lb-line-strong); border-radius: 6px; overflow: hidden; background: #fff;
}
.lb-ms .lb-ms-stepper button {
  margin: 0; padding: 0; height: 36px; border: 0; border-radius: 0; background: none; box-shadow: none;
  font-size: 18px; line-height: 1; color: var(--lb-muted); cursor: pointer;
}
.lb-ms .lb-ms-stepper button:hover:not(:disabled) { background: var(--lb-off); color: var(--lb-ink); }
.lb-ms .lb-ms-stepper button:disabled { opacity: .3; cursor: default; }
.lb-ms .lb-ms-stepper input[type="number"] {
  width: 56px !important; height: 36px !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-inline: 1px solid var(--lb-line) !important; border-radius: 0 !important; box-shadow: none !important;
  background: #fff; text-align: center;
  font-family: var(--lb-display); font-weight: 500; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--lb-ink);
  -moz-appearance: textfield; appearance: textfield;
}
.lb-ms .lb-ms-stepper input::-webkit-outer-spin-button,
.lb-ms .lb-ms-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lb-ms-stepper.is-err { border-color: var(--lb-err); }
.lb-ms-bounds { font-size: 11px; color: var(--lb-muted); font-variant-numeric: tabular-nums; }
.lb-ms-bounds.is-err { color: var(--lb-err); font-weight: 600; }

/* prix */
.lb-ms-price { display: grid; justify-items: center; margin-top: 2px; text-align: center; transition: opacity .15s; }
.lb-ms-price.is-updating { opacity: .35; }
.lb-ms-price-total,
.lb-ms-price-total .woocommerce-Price-amount {
  font-family: var(--lb-display); font-weight: 600; font-size: 19px; line-height: 1.1; color: var(--lb-ink); font-variant-numeric: tabular-nums;
}
.lb-ms-price-total .woocommerce-Price-currencySymbol { font-weight: 500; }
.lb-ms-price-sub { font-size: 11px; color: var(--lb-muted); }
.lb-ms-price.is-unavailable .lb-ms-price-total { font-size: 14px; font-weight: 500; color: var(--lb-err); }

/* bouton réserver : prime sur les styles WooCommerce / Salient du .single_add_to_cart_button */
.lb-ms .lb-ms-form .lb-ms-book {
  display: block; width: 100% !important; margin: auto 0 0 !important; padding: 11px 10px !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: var(--lb-accent) !important; color: #fff !important;
  font-family: var(--lb-display) !important; font-weight: 500 !important; font-size: 15px !important;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1.3 !important; cursor: pointer;
}
.lb-ms .lb-ms-form .lb-ms-book:hover:not(:disabled) { background: var(--lb-accent-dark) !important; }
.lb-ms .lb-ms-form .lb-ms-book:disabled { background: var(--lb-line-strong) !important; cursor: not-allowed; opacity: 1 !important; }

/* message d'erreur réseau */
.lb-ms-notice { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--lb-err); background: #fbf1ee; font-size: 13.5px; }
.lb-ms-notice[hidden] { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  /* Sur mobile, le libellé prend toute la largeur entre les flèches, qui restent collées aux bords */
  .lb-ms-daterow { width: 100%; flex-wrap: wrap; justify-content: center; }
  .lb-ms .lb-ms-date-main { flex: 1 1 0; min-width: 0; padding-inline: 4px; }
  .lb-ms-date-label { min-width: 0; }
  .lb-ms-daterow::after { content: ""; flex-basis: 100%; height: 0; order: 4; }   /* saut de ligne avant « Aujourd'hui » */
  .lb-ms .lb-ms-today { flex: 0 0 auto; order: 5; margin: 6px 0 0; }
  .lb-ms-room { grid-template-columns: 1fr; }
  .lb-ms-room-img { min-height: 0; aspect-ratio: 16 / 6; padding: 34px 16px 32px; }
  .lb-ms .lb-ms-room-img .lb-ms-room-name { font-size: 28px !important; }   /* bandeau pleine largeur : un peu plus grand qu'en colonne */
  .lb-ms-slots { grid-template-columns: repeat(2, 1fr); }
  .lb-ms-slot:nth-child(odd) { border-left: 0; }
  .lb-ms-strip { gap: 4px; }
  .lb-ms .lb-ms-pill { padding: 9px 18px; }
}
@media (max-width: 450px) {
  .lb-ms .lb-ms-room-img .lb-ms-room-name { font-size: 26px !important; }
  .lb-ms-room-img { aspect-ratio: 16 / 7; }   /* un peu plus haut : le titre tient sur deux lignes sans toucher les badges */
}
@media (prefers-reduced-motion: reduce) {
  .lb-ms * { transition: none !important; }
}
