/* =========================================================
   Snowtailors — selecteur de plage de dates
   Habillage aux tokens de la marque (navy / gold / paper).
   ========================================================= */

.stdp { position: relative; }

/* ---------- Les deux champs ---------- */
.stdp__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 640px) { .stdp__fields { grid-template-columns: 1fr; gap: 24px; } }

.stdp__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 12px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color var(--duration, .4s) var(--ease-luxe);
}
.stdp__field:hover { border-bottom-color: var(--gold-dark); }
.stdp__field.is-active,
.stdp__field:focus-visible { outline: none; border-bottom-color: var(--gold); }

.stdp__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--navy);
}
.stdp__value {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--txt);
}
.stdp__value.is-empty {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--grey-light);
}

/* ---------- Le panneau ---------- */
.stdp__panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 14px);
  left: 0;
  min-width: 620px;
  padding: 28px 28px 22px;
  background: var(--paper);
  border: 1px solid rgba(15, 27, 60, .10);
  box-shadow: 0 24px 60px -20px rgba(15, 27, 60, .28),
              0 4px 12px -4px rgba(15, 27, 60, .10);
  animation: stdpIn .32s var(--ease-out-expo, cubic-bezier(.16,1,.3,1)) both;
}
.stdp__panel[hidden] { display: none; }

@keyframes stdpIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .stdp__panel { animation: none; } }

@media (max-width: 720px) {
  .stdp__panel {
    position: fixed;
    inset: auto 0 0 0;
    min-width: 0;
    max-height: 82vh;
    overflow-y: auto;
    padding: 24px 20px 20px;
    border-left: none; border-right: none; border-bottom: none;
  }
}

/* ---------- Navigation ---------- */
.stdp__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.stdp__arrow {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid rgba(15, 27, 60, .16);
  color: var(--navy);
  cursor: pointer;
  font-size: 15px;
  transition: all .25s var(--ease-luxe, ease);
}
.stdp__arrow:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-dark); }
.stdp__arrow:disabled { opacity: .28; cursor: not-allowed; }
.stdp__nav-title {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Les mois ---------- */
.stdp__months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}
@media (max-width: 720px) {
  .stdp__months { grid-template-columns: 1fr; gap: 26px; }
}

.stdp__month-name {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--navy);
  text-align: center;
  margin-bottom: 14px;
}
.stdp__dow,
.stdp__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.stdp__dow {
  margin-bottom: 6px;
}
.stdp__dow span {
  text-align: center;
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--grey-light);
  padding-bottom: 6px;
}

/* ---------- Les jours ---------- */
.stdp__day {
  position: relative;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--txt);
  cursor: pointer;
  transition: color .2s ease;
}
.stdp__day span {
  position: relative; z-index: 2;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .22s var(--ease-luxe, ease), color .22s ease;
}
.stdp__day--vide { cursor: default; }

.stdp__day:not(.is-disabled):not(.is-start):not(.is-end):hover span {
  background: rgba(201, 169, 97, .18);
}

.stdp__day.is-disabled {
  color: var(--grey-light);
  cursor: not-allowed;
  opacity: .45;
}
/* Une barre fine plutot qu'un simple gris : on comprend que la date est
   fermee, pas qu'elle est juste secondaire. */
.stdp__day.is-disabled::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 15px; height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  opacity: .5;
}

.stdp__day.is-today span { box-shadow: inset 0 0 0 1px rgba(15, 27, 60, .28); }

.stdp__day.is-start span,
.stdp__day.is-end span {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}
/* Le liseré doré signe la sélection sans alourdir. */
.stdp__day.is-start span { box-shadow: 0 0 0 2px var(--gold); }
.stdp__day.is-end span   { box-shadow: 0 0 0 2px var(--gold); }

.stdp__day.is-between::before {
  content: '';
  position: absolute;
  inset: 4px 0;
  background: rgba(15, 27, 60, .07);
  z-index: 1;
}
.stdp__day.is-start::before,
.stdp__day.is-end::before { content: none; }

/* ---------- Pied du panneau ---------- */
.stdp__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 27, 60, .10);
}
.stdp__summary {
  font-size: 13px;
  color: var(--txt-soft);
  line-height: 1.5;
}
.stdp__clear {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.stdp__clear:hover { color: var(--navy); border-bottom-color: var(--gold); }

/* ---------- Champ manquant ----------
   booking.js pose .is-error sur l'element porteur de data-required.
   Aucun style n'existait pour ca dans booking.css : l'utilisateur voyait
   le formulaire trembler sans savoir quel champ etait en cause. */
.stdp__field.is-error { border-bottom-color: #b00020; }
.stdp__field.is-error .stdp__label { color: #b00020; }

/* Le champ caché reste hors flux mais accessible à booking.js */
.stdp input[type="hidden"] { display: none; }
