/* ===== Page Réserver : calendrier, créneaux, modale ===== */

.booking-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.booking-aside { position: sticky; top: 100px; }
.ladies-note { display: flex; align-items: center; gap: 10px; background: var(--rose-tint); color: var(--rose-deep); border-radius: 10px; padding: 12px 16px; font-size: .95rem; margin: 4px 0 18px; }
.ladies-note svg { flex: none; color: var(--rose); }
.booking-phones { display: grid; gap: 12px; margin-top: 18px; }
.booking-phone { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--rose); font-size: 1.05rem; }
.booking-phone:hover { color: var(--rose-deep); }
.booking-phone--wa svg { color: #178a4c; } /* logo WhatsApp vert (texte/lien restent dans le thème) */
.booking-hours { margin-top: 26px; padding: 18px 22px; background: var(--rose-tint); border-radius: var(--radius-sm); font-size: .95rem; color: var(--ink-soft); line-height: 1.9; }
.booking-hours strong { color: var(--ink); }

/* --- Calendrier --- */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; }
.cal__title { color: #fff; font-size: 1.4rem; text-transform: capitalize; letter-spacing: .3px; }
.cal__nav { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; transition: background .25s, transform .25s; }
.cal__nav:hover:not(:disabled) { background: rgba(255,255,255,.28); }
.cal__nav:disabled { opacity: .35; cursor: not-allowed; }
.cal__weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 14px 14px 0; }
.cal__weekdays span { text-align: center; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 6px 14px 18px; min-height: 280px; position: relative; }
.cal__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }

.day { position: relative; aspect-ratio: 1 / 0.92; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font-family: var(--sans); font-size: .98rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; transition: background .2s, border .2s, transform .2s; }
.day--empty { visibility: hidden; }
.day--past, .day--closed { color: #cdc3cb; }
.day--free { cursor: pointer; background: var(--rose-tint); border-color: transparent; color: var(--rose-deep); font-weight: 600; }
.day--free:hover { background: var(--rose-soft); transform: translateY(-1px); }
.day--free.is-selected { background: var(--rose); color: #fff; box-shadow: 0 8px 18px -8px rgba(177,74,126,.7); }
.day--today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.day__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.day--free.is-selected .day__dot { background: #fff; }
.cal__legend { display: flex; gap: 22px; justify-content: center; padding: 0 14px 18px; font-size: .8rem; color: var(--muted); }
.cal__legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--free { background: var(--rose); } .dot--none { background: #ddd3da; }

/* --- Créneaux --- */
.slots { margin-top: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm); animation: slideUp .4s var(--ease); }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.slots__title { font-size: 1.2rem; margin-bottom: 18px; }
.slots__title span { color: var(--rose); }
.slots__list { display: grid; gap: 12px; }
.slot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border .2s, background .2s; }
.slot__time { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.slot__time svg { color: var(--rose); }
.slot--free:hover { border-color: var(--rose-soft); background: var(--rose-tint); }
/* Indispo : de-emphasis par le fond (pas d'opacité, qui passerait le texte sous 4.5:1) */
.slot--taken { background: #f6f1f4; border-color: var(--line); }
.slot--taken .slot__time svg { color: var(--muted); }
.slot__state { font-size: .82rem; color: var(--ink-soft); font-style: italic; }
.slots__empty { color: var(--muted); text-align: center; padding: 10px 0; }

/* --- Modale --- */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(40,25,35,.55); backdrop-filter: blur(3px); animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal__dialog { position: relative; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__header { padding: 22px 28px; background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; border-radius: var(--radius) var(--radius) 0 0; position: sticky; top: 0; z-index: 2; }
.modal__header h3 { color: #fff; font-size: 1.35rem; }
.modal__close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 1.5rem; line-height: 1; z-index: 3; transition: background .2s; }
.modal__close:hover { background: rgba(255,255,255,.32); }
.modal__body { padding: 24px 28px 30px; }
.modal__recap { display: flex; align-items: center; gap: 12px; background: var(--rose-tint); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px; font-weight: 500; color: var(--rose-deep); }
.modal__recap svg { color: var(--rose); flex: none; }

.form-section { font-family: var(--sans); font-weight: 600; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 6px 0 14px; }

/* Choix du soin */
.svc-choices { display: grid; gap: 8px; }
.svc-choice { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: #fff; transition: border .2s, background .2s; }
.svc-choice:hover { border-color: var(--rose-soft); }
.svc-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.svc-choice__box { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rose-soft); position: relative; transition: border .2s; }
.svc-choice__box::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--rose); transform: scale(0); transition: transform .2s var(--ease); }
.svc-choice:has(input:checked) { border-color: var(--rose); background: var(--rose-tint); }
.svc-choice input:checked + .svc-choice__box { border-color: var(--rose); }
.svc-choice input:checked + .svc-choice__box::after { transform: scale(1); }
.svc-choice input:focus-visible + .svc-choice__box { box-shadow: 0 0 0 4px rgba(177,74,126,.18); }
.svc-choice__txt { flex: 1; font-size: .96rem; }
.svc-choice__txt em { color: var(--muted); font-style: normal; font-size: .82rem; margin-left: 4px; }
.svc-choice__price { font-family: var(--serif); font-weight: 600; color: var(--rose); font-size: 1.1rem; }

/* Confirmation */
.modal__dialog--done { max-width: 460px; text-align: center; padding: 40px 34px 36px; }
.done-check { width: 76px; height: 76px; border-radius: 50%; background: #eaf6ee; color: #3aa666; display: grid; place-items: center; margin: 0 auto 22px; animation: pop .4s var(--ease); }
.modal__dialog--done h3 { font-size: 1.7rem; margin-bottom: 10px; }
.modal__dialog--done p { color: var(--ink-soft); }
.done-recap { margin: 20px 0 26px; padding: 16px 20px; background: var(--rose-tint); border-radius: var(--radius-sm); text-align: left; font-size: .95rem; line-height: 1.8; }
.done-recap b { color: var(--rose-deep); }

@media (max-width: 880px) {
  .booking-layout { grid-template-columns: 1fr; }
  .booking-aside { position: static; }
  /* Sur mobile/tablette : l'agenda d'abord, le texte ensuite */
  .booking-main { order: -1; }
}
@media (max-width: 760px) {
  .cal__grid { gap: 4px; padding: 6px 8px 14px; }
  /* Cible tactile : hauteur mini 46px (au-dessus du seuil 44px d'Apple/Google) */
  .day { font-size: .88rem; border-radius: 8px; aspect-ratio: auto; min-height: 46px; }
  .cal__nav { width: 46px; height: 46px; }      /* flèches de mois >= 44px */
  .modal__close { width: 44px; height: 44px; }   /* croix de fermeture >= 44px */
  .cal__weekdays { padding: 12px 8px 0; }
  .cal__weekdays span { font-size: .64rem; }
  .modal__recap { font-size: .92rem; }
}
