/*
 * Fichier : style_validePannier.css
 * Gère tout le style de la page de validation du panier.
 */
body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f5f0;
  color: #666;
  line-height: 1.6;
}

nav {
  background-color: var(--gold-dark);
  box-shadow: 0 4px 20px rgba(139, 107, 74, 0.2);
  height: 70px;
}

input:disabled {
  background-color: #f0f0f0;
  cursor: not-allowed;
  opacity: 0.7;
}

.spa-validation-page {
  width: 100%;
  max-width: 100vw;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: row;
  padding: 80px 20px;
  min-height: 100vh;
  box-sizing: border-box;
  background-color: var(--gold-dark);

}

.spa-validation-form-container {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 30px;
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: row;
  gap: 40px;
  text-align: left;
  margin: 0 auto;
}

.spa-form-main-section {
  flex: 1;
  min-width: 300px;
}

.spa-form-main-section h2 {
  text-align: left;
  margin-bottom: 20px;
  color: #2a2a2a;
  font-weight: 600;
  font-size: 2rem;
  font-family: "Montserrat", sans-serif;
}

.spa-form-main-section>p {
  color: #777;
  font-size: 1rem;
  margin-bottom: 25px;
  font-weight: 300;
}

/* Nouveaux styles pour les lignes de formulaire */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  /* Espace entre les lignes */
}

.form-group-half {
  flex: 1;
  /* Permet aux groupes de grandir pour occuper l'espace disponible */
}

/* On retire les marges du bas des éléments de formulaire à l'intérieur de ces groupes pour éviter le double espacement */
.form-row .spa-form-group input,
.form-row .spa-form-group select,
.form-row .spa-form-group textarea {
  margin-bottom: 0;
}


.spa-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #2a2a2a;
  font-size: 0.95rem;
}

.spa-form-group label span {
  color: #dc3545;
  font-size: 1.1em;
  line-height: 1;
  vertical-align: middle;
}

.spa-form-group label.optional-field::after {
  content: " (Optionnel)";
  font-size: 0.8em;
  font-weight: normal;
  color: #888;
}

.spa-form-group input,
.spa-form-group select,
.spa-form-group textarea {
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 0.25rem;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
  color: #2a2a2a;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.spa-form-group input:focus,
.spa-form-group select:focus,
.spa-form-group textarea:focus {
  border-color: #c8a97e;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(200, 169, 126, 0.2);
}

.spa-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

#offreConditionalInputsContainer .spa-form-group {
  margin-bottom: 0;
}

#offreConditionalInputsContainer input[type="tel"] {
  margin-bottom: 0;
}

#earlyBookingEligibilityMsgContainer p {
  margin-top: 5px;
  margin-bottom: 10px;
  padding: 8px;
  background-color: #e6f7ff;
  border-left: 3px solid #1890ff;
  color: #0050b3;
  font-size: 0.9em;
}

.spa-horaires-link {
  font-size: 0.85rem;
  color: #777;
  margin-left: 10px;
  cursor: pointer;
}

.spa-horaires-link a {
  color: #c8a97e;
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 169, 126, 0.5);
  transition: border-color 0.3s ease;
}

.spa-horaires-link a:hover {
  border-bottom: 1px solid #c8a97e;
}

.spa-validated-cart-summary {
  width: 40%;
  background-color: white;
  border-radius: 0.25rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
  max-height: 600px;
  overflow-y: auto;
}

.spa-validated-cart-item {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
  box-sizing: border-box;
}

.spa-validated-cart-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.spa-validated-cart-item .spa-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.spa-validated-cart-item .spa-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.spa-validated-cart-item .spa-item-details p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.3;
}

.spa-validated-cart-item .spa-item-details p strong {
  color: #2a2a2a;
  font-weight: 500;
  font-size: 1rem;
}

.spa-remove-item-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.spa-remove-item-btn:hover {
  background-color: #c82333;
  transform: translateY(-2px);
}

.spa-total-price-container {
  width: 100%;
  text-align: right;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.spa-total-price-container p {
  margin: 5px 0;
  font-size: 1.1rem;
  color: #333;
}

.spa-total-price-container .spa-offer-applied p {
  color: green;
  font-size: 1rem;
}

.spa-total-price-container .spa-total-net p {
  font-weight: bold;
  font-size: 1.5rem;
  color: #2a2a2a;
}

.spa-btn-validate-panier,
#openCalendarBtn {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #c8a97e 0%, #8b6b4a 100%);
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(200, 169, 126, 0.2);
}

.spa-btn-validate-panier:hover,
#openCalendarBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(200, 169, 126, 0.4);
}

.spa-btn-validate-panier:disabled {
  background: linear-gradient(90deg, #aaa 0%, #888 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- CALENDRIER ET CRÉNEAUX HORAIRES --- */
.selected-datetime-display {
  border: 1px solid #e0e0e0;
  border-radius: 0.25rem;
  padding: 10px 15px;
  margin-bottom: 15px;
  font-size: 1rem;
  background-color: #fafafa;
  color: #2a2a2a;
  display: flex;
  justify-content: space-between;
}

/* Nouveaux styles pour la modale */
.spa-booking-modal,
.spa-opening-hours-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spa-booking-modal.active,
.spa-opening-hours-modal.active {
  display: flex;
}

.spa-booking-modal .spa-modal-dialog,
.spa-opening-hours-modal .spa-modal-dialog {
  background-color: white;
  padding: 30px;
  border-radius: 0.25rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  max-width: 800px;
  width: 95%;
  max-height: 80vh;
  font-family: "Montserrat", sans-serif;
  overflow-y: auto;
}

.spa-booking-modal .spa-modal-dialog h2,
.spa-opening-hours-modal .spa-modal-dialog h2 {
  font-size: 1.8rem;
  color: #2a2a2a;
  margin-bottom: 20px;
  font-weight: 600;
}

.spa-opening-hours-modal ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.spa-opening-hours-modal ul li {
  font-size: 1rem;
  margin: 8px 0;
  color: #666;
}

.spa-booking-modal .spa-modal-close-small,
.spa-opening-hours-modal .spa-modal-close-small {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  color: #777;
  transition: color 0.3s ease;
}

.spa-booking-modal .spa-modal-close-small:hover,
.spa-opening-hours-modal .spa-modal-close-small:hover {
  color: #2a2a2a;
}

.booking-calendar {
  margin-top: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: auto;
  margin-bottom: 20px;
  max-width: 900px;
}

.calendar-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #c8a97e;
  transition: color 0.2s;
}

.calendar-nav-btn:hover {
  color: #8b6b4a;
}

.header-months-container {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.header-month {
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: capitalize;
  color: #2a2a2a;
}

.calendar-body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.month-view {
  flex: 1;
  max-width: 350px;
}

.weekdays-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  color: #777;
  margin-bottom: 10px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  font-size: 0.9rem;
}

.calendar-days .day {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  margin: auto;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

/* Couleurs spécifiques au calendrier */
.calendar-days .day.available-day {
  background-color: #e6f9e6;
  color: #0050b3;
}

.calendar-days .day.partially-booked-day {
  background-color: #ffebd2;
  color: #d46b08;
  cursor: pointer;
}




.calendar-days .day.partially-booked-day,
.calendar-days .day.full-day-blocked {
  background-color: #ffebd2;
  color: #d46b08;
}


.calendar-days .day.closed-day,
.calendar-days .day.disabled {
  background-color: #ffe6e6;
  color: #ffc0c0;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.7;
}

.calendar-days .day.selected {
  background-color: #c8a97e;
  color: white;
}

.calendar-days .day:not(.disabled):hover {
  background-color: #f0e0d0;
}

.time-slots-container {
  margin-top: 20px;
}

.time-slots-container .loading-message,
.time-slots-container .error-message,
.time-slots-container .closed-message {
  text-align: center;
  color: #777;
  font-style: italic;
}

.hourly-slots {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 900px;
  margin: auto;
}

.hourly-slots .hourly-slot {
  padding: 8px 15px;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  background-color: #e6f9e6;
  color: #0050b3;
  border: 1px solid #c0eac0;
  transition: background-color 0.2s;
}

.hourly-slots .hourly-slot.available:hover {
  background-color: #c0eac0;
}

.hourly-slots .hourly-slot.reserved {
  background-color: #ffebd2;
  color: #d46b08;
  border-color: #ffdbb4;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.6;
}

.hourly-slots .hourly-slot.selected {
  background-color: #c8a97e;
  color: white;
  border-color: #c8a97e;
}

#bookingModalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

#bookingModalActions .spa-btn-confirm {
  background: linear-gradient(90deg, #c8a97e 0%, #8b6b4a 100%);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 600;
}

#bookingModalActions .spa-btn-confirm:disabled {
  background: linear-gradient(90deg, #aaa 0%, #888 100%);
  cursor: not-allowed;
}

#bookingModalActions .spa-btn-cancel {
  background-color: #f44336;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 600;
}

/* --- FIN DU STYLE AJOUTÉ --- */

@media (min-width: 769px) {
  .form-row {
    flex-wrap: nowrap;
  }
}


@media (max-width: 1200px) {
  .spa-validation-form-container {
    flex-direction: column;
    gap: 30px;
  }

  .spa-form-main-section,
  .spa-validated-cart-summary {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .spa-validation-page {
    padding: 60px 15px;
  }

  .spa-validation-form-container {
    padding: 20px;
    gap: 25px;
  }

  /* Les éléments repassent sur une seule colonne */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .spa-booking-modal .spa-modal-dialog {
    padding: 20px;
    max-width: 95%;
  }

  .spa-opening-hours-modal .spa-modal-dialog {
    max-width: 300px;
  }

  .spa-opening-hours-modal .spa-modal-dialog h2 {
    font-size: 1.4rem;
  }

  .calendar-body {
    flex-direction: column;
    gap: 20px;
  }
}