/* Maison Solane — panneau réservation (logements) */

.ms-logement-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(380px, 34vw);
  gap: 40px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 44px 40px;
  align-items: start;
}

.ms-logement-main {
  min-width: 0;
}

.ms-logement-booking {
  position: sticky;
  top: 96px;
  z-index: 20;
  align-self: start;
  padding-top: 70px;
}

.ms-book-panel {
  border: 1px solid rgba(63, 66, 75, 0.22);
  border-radius: 20px;
  padding: 26px 24px 22px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(63, 66, 75, 0.08);
}

.ms-book-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
}

.ms-book-title {
  margin: 8px 0 0;
  font-family: 'Loubag', cursive;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

.ms-book-meta {
  margin: 10px 0 0;
  font-size: 13px;
  opacity: 0.72;
  line-height: 1.5;
}

.ms-book-price {
  margin: 22px 0 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(63, 66, 75, 0.12);
}

.ms-book-price-from {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 4px;
}

.ms-book-price-amount {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.ms-book-price-unit {
  font-size: 14px;
  opacity: 0.65;
}

.ms-book-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ms-book-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-book-field-full {
  grid-column: 1 / -1;
}

.ms-book-field span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
}

.ms-book-field input,
.ms-book-field select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid rgba(63, 66, 75, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: #3f424b;
  background: #fff;
  appearance: none;
}

.ms-book-field input:focus,
.ms-book-field select:focus {
  outline: none;
  border-color: #3f424b;
  box-shadow: 0 0 0 1px #3f424b;
}

.ms-book-summary {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(254, 246, 166, 0.35);
  font-size: 13.5px;
  line-height: 1.55;
}

.ms-book-summary strong {
  font-weight: 500;
}

.ms-book-pms-mount {
  margin-top: 14px;
  min-height: 0;
}

.ms-book-pms-mount:not(:empty) {
  min-height: 80px;
  border-top: 1px solid rgba(63, 66, 75, 0.1);
  padding-top: 14px;
}

.ms-book-submit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 18px;
  padding: 15px 20px;
  border: 1px solid #3f424b;
  border-radius: 40px;
  background: #3f424b;
  color: #f8f5e7;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ms-book-submit:hover {
  background: #f8f5e7;
  color: #3f424b;
}

.ms-book-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ms-book-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  opacity: 0.55;
}

.ms-book-contact {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 12.5px;
  opacity: 0.65;
  border-bottom: 1px solid rgba(63, 66, 75, 0.35);
  padding-bottom: 2px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.ms-book-contact:hover {
  opacity: 1;
}

.ms-book-loading {
  padding: 40px 10px;
  text-align: center;
  font-size: 14px;
  opacity: 0.6;
}

/* Barre mobile fixe (style Velvet House) */
.ms-book-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(63, 66, 75, 0.16);
  box-shadow: 0 -8px 32px rgba(63, 66, 75, 0.1);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
}

.ms-book-mobile-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.ms-book-mobile-from {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
  line-height: 1.3;
}

.ms-book-mobile-amount-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
  line-height: 1.15;
  min-width: 0;
  max-width: 100%;
}

.ms-book-mobile-amount {
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #3f424b;
  white-space: nowrap;
}

.ms-book-mobile-unit {
  font-size: 13px;
  opacity: 0.65;
}

.ms-book-mobile-total {
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #3f424b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-book-mobile-sub {
  font-size: 11.5px;
  opacity: 0.5;
  line-height: 1.35;
}

.ms-book-mobile-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid #3f424b;
  border-radius: 30px;
  background: #3f424b;
  color: #f8f5e7;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
  max-width: 42%;
}

.ms-book-mobile-btn:active {
  transform: scale(0.98);
}

body.ms-has-booking-bar {
  scroll-padding-bottom: 88px;
}

@media (max-width: 1080px) {
  body.ms-has-booking-bar {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden;
  }

  .ms-book-mobile-bar {
    display: flex;
  }

  .ms-logement-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 44px 24px;
  }

  .ms-logement-booking {
    display: none;
  }

  .ms-book-sheet .ms-book-panel {
    padding: 4px 0 8px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ms-book-sheet .ms-book-title {
    font-size: clamp(22px, 6vw, 28px);
    padding-right: 36px;
  }

  .ms-book-sheet .ms-book-fields {
    grid-template-columns: 1fr;
  }

  .ms-book-sheet .ms-book-field input,
  .ms-book-sheet .ms-book-field select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .ms-book-sheet .ms-book-field input[type="date"] {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .ms-book-sheet .ms-book-pms-mount {
    max-width: 100%;
    overflow-x: auto;
  }
}

body.ms-book-sheet-open {
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100vw;
}

.ms-book-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(38, 40, 46, 0.45);
}

.ms-book-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(63, 66, 75, 0.18);
}

.ms-book-sheet [data-ms-book-sheet-body] {
  min-width: 0;
  max-width: 100%;
  padding-top: 32px;
  box-sizing: border-box;
}

.ms-book-sheet.is-open,
.ms-book-sheet-backdrop.is-open {
  display: block;
}

.ms-book-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(63, 66, 75, 0.2);
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 760px) {
  .ms-logement-layout {
    padding: 0 20px 24px;
  }

  .ms-book-mobile-bar {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .ms-book-mobile-btn {
    padding: 11px 14px;
    font-size: 9px;
    letter-spacing: 0.08em;
    max-width: 38%;
  }

  .ms-book-mobile-sub {
    font-size: 10.5px;
  }

  .ms-book-sheet {
    padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  }
}
