/* =====================================================================
   « Votre date est-elle libre ? » — haut de l'accueil (assets/js/vm-dispo.js)
   Calendrier : vm-datepicker.js / datepicker.css (bouton restylé ici).
   Bureau : la question se place sous les boutons du hero, hors du flux
   (le titre ne bouge pas) ; la réponse s'affiche juste en dessous.
   Téléphone : la question tient sur une ligne ; la réponse s'ouvre en feuille.
   ===================================================================== */
.dispo { position: relative; z-index: 2; text-align: left; }
.dispo .datepick__native { position: absolute !important; width: 1px; min-height: 0; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }

/* ---------- La question ---------- */
.dispo__ask { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.15rem; }
.dispo__rule { flex: none; width: 40px; height: 1px; background: linear-gradient(90deg, rgba(169, 134, 79, .25), var(--or)); transform-origin: 0 50%; }
.dispo__label {
  font-family: var(--ff-serif); font-style: italic; font-weight: 400;
  font-size: 1.4rem; line-height: 1.2; letter-spacing: .005em;
  color: var(--encre); cursor: pointer;
  transition: color .4s;
}
.dispo__label:hover { color: var(--bronze); }

/* Bouton du calendrier (même composant que le formulaire, habillé pour le hero) */
.dispo .datepick__btn {
  width: auto; min-height: 44px; gap: .75rem; padding: .3rem 0 .25rem;
  border-bottom: 1px solid var(--filet-fort);
  font-family: var(--ff-sans); font-weight: 500; font-size: var(--fs-label); line-height: 1.2;
  letter-spacing: .2em; text-transform: uppercase; color: var(--encre);
  transition: border-color .5s var(--ease), color .4s;
}
.dispo .datepick__btn.is-empty .datepick__value { color: var(--bronze); }
.dispo .datepick__btn:hover { border-bottom-color: var(--or); }
.dispo .datepick__btn:focus-visible { outline: 1.5px solid var(--or-focus); outline-offset: 6px; box-shadow: none; }
.dispo .datepick__btn[aria-expanded="true"] { border-bottom-color: var(--or); box-shadow: 0 1px 0 0 var(--or); }
.dispo .datepick__value { white-space: nowrap; text-wrap: nowrap; }
.dispo .datepick__icon { width: 18px; height: 18px; transition: transform .6s var(--ease); }
.dispo .datepick__btn:hover .datepick__icon { transform: translateY(-1px) rotate(-6deg); }

/* ---------- La réponse (sous la question) ---------- */
.dispo__answer {
  position: absolute; left: 0; right: 0; top: 100%;
  padding: .85rem 0 0 calc(40px + 1.15rem);   /* alignée sur la question, après le filet */
  opacity: 0; transform: translate3d(0, 10px, 0);
  transition: opacity .5s var(--ease-out), transform .9s var(--ease);
}
.dispo__answer.is-in { opacity: 1; transform: none; }
.dispo__msg { margin: 0; max-width: 31rem; text-wrap: balance; }
.dispo__msg > span { text-wrap: balance; }
.dispo__lead {
  font-family: var(--ff-serif); font-weight: 400; font-size: 1.24rem; line-height: 1.35;
  font-variant-numeric: lining-nums;   /* chiffres alignés, comme dans le calendrier */
  color: var(--encre);
}
.dispo__answer.is-free .dispo__lead { color: var(--encre); }
.dispo__answer.is-booked .dispo__lead { color: var(--encre-douce); }
.dispo__sub { display: block; margin-top: .2rem; font-size: .98rem; line-height: 1.55; color: var(--encre-douce); }
.dispo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.6rem; margin-top: .35rem; }

/* Lien vers le formulaire : trait or, flèche (comme « Découvrir les films ») */
.dispo__cta {
  position: relative; display: inline-flex; align-items: center; gap: .9rem; min-height: 44px;
  font-family: var(--ff-sans); font-weight: 500; font-size: var(--fs-label); line-height: 1.2;
  letter-spacing: .24em; text-transform: uppercase; color: var(--bronze);
  transition: color .4s;
}
.dispo__cta::after {
  content: ""; position: absolute; left: 0; right: calc(30px + .9rem); bottom: 10px; height: 1px;
  background: var(--or); transform-origin: 0 50%;
}
.dispo__cta .btn__arrow { width: 30px; height: 11px; flex: none; transition: transform .7s var(--ease); }
.dispo__cta:hover { color: var(--encre); }
.dispo__cta:hover .btn__arrow { transform: translateX(5px); }
.dispo__cta:hover::after { animation: line-swipe 1s var(--ease); }
.dispo__answer.is-in .dispo__cta::after { animation: dispo-line .9s var(--ease) .25s both; }
@keyframes dispo-line { from { transform: scaleX(0); } }
/* Deux enchaînements : le message, puis le lien */
.dispo__answer .dispo__msg, .dispo__answer .dispo__actions { opacity: 0; transform: translate3d(0, 6px, 0); transition: opacity .6s var(--ease-out), transform .9s var(--ease); }
.dispo__answer.is-in .dispo__msg { opacity: 1; transform: none; transition-delay: .05s; }
.dispo__answer.is-in .dispo__actions { opacity: 1; transform: none; transition-delay: .16s; }

/* Boutons propres à la feuille (téléphone) */
.dispo__again, .dispo__close { display: none; }

/* ---------- Entrée du hero : après le texte et les boutons ---------- */
.js .hero .dispo { opacity: 0; transform: translate3d(0, 12px, 0); transition: opacity 1.2s var(--ease-out) .95s, transform 1.4s var(--ease) .95s; }
.js .hero.is-ready .dispo { opacity: 1; transform: none; }
.js .hero .dispo__rule { transform: scaleX(0); transition: transform 1.4s var(--ease) 1.2s; }
.js .hero.is-ready .dispo__rule { transform: none; }

/* ---------- Bureau : sous les boutons, sans déplacer le titre ---------- */
@media (min-width: 901px) {
  .hero__foot { position: relative; }
  .hero__foot > .dispo { position: absolute; left: 0; top: 100%; width: min(100%, 37rem); margin-top: clamp(1.5rem, 3.6vh, 2.4rem); }
}
/* Écran d'ordinateur peu haut (portable 1280 × 720…) : plus serré, pour que la réponse tienne sous la question */
@media (min-width: 901px) and (max-height: 800px) {
  .hero__foot > .dispo { margin-top: 1.1rem; }
  .dispo__answer { padding-top: .55rem; }
  .dispo__actions { margin-top: .15rem; }
}

/* ---------- Tablette et téléphone : centré, dans le flux ---------- */
@media (max-width: 900px) {
  .dispo { margin: .9rem auto 0; max-width: 32rem; text-align: center; }
  .dispo__ask { justify-content: center; }
  .dispo__rule { display: none; }
  .dispo__answer { padding-left: 0; }
  .dispo__msg { margin-inline: auto; }
  .dispo__actions { justify-content: center; }
}
@media (max-width: 600px) {
  .dispo { margin-top: .3rem; }
  .dispo__ask { flex-wrap: nowrap; gap: .85rem; }
  .dispo__label { font-size: 1.25rem; }
  /* le bouton devient un rond doré ; la date reste dans son nom accessible */
  .dispo .datepick__btn {
    flex: none; justify-content: center; width: 44px; height: 44px; min-height: 0; padding: 0;
    border: 1px solid var(--filet-fort); border-radius: 50%;
  }
  .dispo .datepick__btn[aria-expanded="true"] { box-shadow: none; background: rgba(169, 134, 79, .1); }
  .dispo .datepick__value { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Feuille en bas de l'écran (téléphone, ou écran trop peu haut) ---------- */
.dispo__answer.is-sheet {
  position: fixed; z-index: 60; left: 0; right: 0; top: auto; bottom: 0;
  width: auto; max-width: 440px; margin: 0 auto;
  max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 30px 24px calc(22px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: linear-gradient(180deg, #FFFDF9, var(--ivoire));
  border-radius: 24px 24px 0 0;
  box-shadow: 0 0 0 1px var(--filet), 0 -26px 60px -32px rgba(80, 58, 30, .5);
  opacity: 1; transform: translate3d(0, 105%, 0);
  transition: transform .55s var(--ease), visibility 0s linear .55s;
  visibility: hidden;
}
.dispo__answer.is-sheet.is-in { transform: none; visibility: visible; transition: transform .6s var(--ease); }
.dispo__answer.is-sheet::before {   /* filet doré en tête de feuille */
  content: ""; display: block; width: 40px; height: 1px; margin: 0 auto 16px;
  background: linear-gradient(90deg, rgba(169, 134, 79, 0), var(--or), rgba(169, 134, 79, 0));
}
.dispo__answer.is-sheet .dispo__msg { max-width: 22rem; margin-inline: auto; }
.dispo__answer.is-sheet .dispo__lead { font-size: 1.5rem; line-height: 1.25; }
.dispo__answer.is-sheet .dispo__sub { margin-top: .5rem; }
.dispo__answer.is-sheet .dispo__actions { flex-direction: column; gap: .2rem; margin-top: 1.2rem; }
.dispo__answer.is-sheet .dispo__cta {
  justify-content: center; width: 100%; min-height: 54px; padding: 1rem 1.6rem;
  background: var(--encre); color: var(--ivoire); letter-spacing: .22em;
}
.dispo__answer.is-sheet .dispo__cta::after { display: none; }
.dispo__answer.is-sheet .dispo__cta:hover, .dispo__answer.is-sheet .dispo__cta:focus-visible { background: var(--bronze); color: var(--ivoire); }
.dispo__answer.is-sheet .dispo__again {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .4rem;
  font-family: var(--ff-sans); font-weight: 500; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bronze); text-decoration: underline; text-decoration-color: rgba(169, 134, 79, .5); text-underline-offset: 4px;
}
.dispo__answer.is-sheet .dispo__close {
  display: grid; place-items: center; position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  color: var(--encre-douce); border-radius: 50%; transition: color .3s, background-color .3s;
}
.dispo__answer.is-sheet .dispo__close svg { width: 14px; height: 14px; }
.dispo__answer.is-sheet .dispo__close:hover { color: var(--encre); background: rgba(169, 134, 79, .1); }
/* Ordinateur ou tablette dont l'écran est trop peu haut : carte flottante plutôt que feuille */
@media (min-width: 601px) {
  .dispo__answer.is-sheet {
    bottom: 22px; max-width: 420px; padding-bottom: 24px; border-radius: 20px;
    box-shadow: 0 0 0 1px var(--filet), 0 34px 70px -34px rgba(80, 58, 30, .5), 0 10px 26px -18px rgba(80, 58, 30, .3);
    transform: translate3d(0, calc(100% + 40px), 0);
  }
}

/* ---------- Formulaire : la date reportée s'éclaire un instant ---------- */
.field.dispo-prefill label { color: var(--bronze); }
.field.dispo-prefill .datepick__btn { animation: dispo-prefill 2.4s var(--ease-out) both; }
@keyframes dispo-prefill {
  0%, 30% { border-bottom-color: var(--or); box-shadow: 0 1px 0 0 var(--or); background-color: rgba(169, 134, 79, .1); }
  100% { background-color: rgba(169, 134, 79, 0); }
}

/* ---------- Mouvement réduit : tout apparaît sans déplacement ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .hero .dispo, .js .hero .dispo__rule, .dispo__answer, .dispo__answer .dispo__msg, .dispo__answer .dispo__actions { transform: none !important; transition: none !important; }
  .js .hero .dispo { opacity: 1; }
  .dispo__answer.is-in .dispo__cta::after, .field.dispo-prefill .datepick__btn { animation: none; }
  .dispo__answer.is-sheet { transform: none; }
}
