/* ============================================================
   RESERVATION.CSS
   ============================================================ */

body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-text);
}

/* ============================================================
   EN-TÊTE DE PAGE
   ============================================================ */

.resa-header {
  position: relative;
  padding: 7rem 2rem 4rem;
  overflow: hidden;
  text-align: center;
}

.resa-header__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 70%, rgba(92,107,58,0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(192,122,74,0.18) 0%, transparent 50%),
    linear-gradient(150deg, #2e1a0c 0%, #4a3020 55%, #3a4a28 100%);
  z-index: 0;
}

.resa-header__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.018'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}

.resa-header__content {
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.resa-header__label {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f0c896;
  margin-bottom: 0.75rem;
}

.resa-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: #faf7f2;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.resa-header__title em {
  color: var(--color-clay);
  font-style: italic;
}

.resa-header__sub {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--color-light);
  line-height: 1.7;
}

/* ============================================================
   CORPS PRINCIPAL : formulaire + aside
   ============================================================ */

.resa-body {
  padding: 3rem 2rem 5rem;
}

.resa-body__inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

/* ============================================================
   FORMULAIRE
   ============================================================ */

.resa-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Fieldset */
.resa-form__group {
  border: none;
  padding: 0;
}

.resa-form__legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--color-bark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  width: 100%;
  display: block;
}

/* Lignes de champs */
.resa-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.resa-form__row:last-child { margin-bottom: 0; }

.resa-form__row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Champ individuel */
.resa-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resa-form__field label {
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.req {
  color: var(--color-clay);
}

/* Inputs, selects, textarea */
.resa-form__field input,
.resa-form__field select,
.resa-form__field textarea {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

/* Flèche select custom */
.resa-form__field select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a6552' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

.resa-form__field input:focus,
.resa-form__field select:focus,
.resa-form__field textarea:focus {
  outline: none;
  border-color: var(--color-clay);
  box-shadow: 0 0 0 3px rgba(192, 122, 74, 0.12);
}

/* État erreur */
.resa-form__field input.is-error,
.resa-form__field select.is-error {
  border-color: #c0503a;
  box-shadow: 0 0 0 3px rgba(192, 80, 58, 0.1);
}

.resa-form__field .error-msg {
  font-size: 0.7rem;
  color: #c0503a;
  margin-top: 2px;
  display: none;
}

.resa-form__field.has-error .error-msg {
  display: block;
}

/* Durée dynamique */
.resa-form__duration {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--color-moss);
  font-style: italic;
  min-height: 1.2em;
}

/* Textarea */
.resa-form__field textarea {
  resize: vertical;
  min-height: 110px;
}

/* RGPD */
.resa-form__rgpd {
  font-size: 0.73rem;
  color: var(--color-muted);
  line-height: 1.6;
  padding: 0.75rem 1rem;
  background: var(--color-warm);
  border-left: 3px solid var(--color-clay);
  border-radius: 0 4px 4px 0;
}

/* Bouton submit */
.resa-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 32px;
  background: var(--color-clay);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.resa-form__submit:hover {
  background: var(--color-clay-light);
}

.resa-form__submit:active {
  transform: scale(0.98);
}

.resa-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.resa-form__submit-arrow {
  font-size: 1rem;
  transition: transform 0.2s;
}

.resa-form__submit:hover .resa-form__submit-arrow {
  transform: translateX(4px);
}

/* ============================================================
   MESSAGE SUCCÈS
   ============================================================ */

.resa-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  gap: 1rem;
  animation: fadeUp 0.6s ease both;
}

.resa-success.is-visible {
  display: flex;
}

.resa-success__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-moss);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resa-success h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--color-bark);
}

.resa-success p {
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 380px;
}

.btn-back {
  margin-top: 0.5rem;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--color-clay);
  border-bottom: 1px solid rgba(192,122,74,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.btn-back:hover {
  color: var(--color-bark);
  border-color: var(--color-bark);
}

/* ============================================================
   ASIDE RÉCAPITULATIF
   ============================================================ */

.resa-aside {
  position: sticky;
  top: 80px;
}

.resa-aside__card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.resa-aside__label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-clay);
  margin-bottom: 0.4rem;
}

.resa-aside__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-bark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.resa-aside__title em {
  color: var(--color-clay);
  font-style: italic;
}

.resa-aside__divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: 1.25rem 0;
}

.resa-aside__details {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.resa-aside__details li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.83rem;
  color: var(--color-text);
  line-height: 1.5;
}

.resa-aside__icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.resa-aside__note {
  font-size: 0.78rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.resa-aside__airbnb {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: #FF5A5F;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255,90,95,0.35);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.resa-aside__airbnb:hover {
  color: #e0484d;
  border-color: #e0484d;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .resa-body__inner {
    grid-template-columns: 1fr;
  }

  .resa-aside {
    position: static;
    order: -1; /* Afficher le récap au-dessus sur mobile */
  }

  .resa-form__row,
  .resa-form__row--3 {
    grid-template-columns: 1fr;
  }
}
