/* =====================================================================
   Le Cocon de Juju — réservation en ligne, gestion du rendez-vous, avis
   (complète site.css : mêmes couleurs, typographies et rayons)
   ===================================================================== */

/* L'attribut hidden doit l'emporter sur les display des composants (.btn, .field…). */
.bk-section [hidden], .notice-page [hidden] { display: none !important; }

.bk-hero { padding-bottom: clamp(20px, 3vw, 36px); }
.bk-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.bk-section { padding-top: 0; padding-bottom: clamp(56px, 8vw, 104px); }

.bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.bk-form { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 960px) {
  .bk-layout { grid-template-columns: 1fr; }
  .bk-aside .bk-summary { display: none; }
}

/* ---------------------------------------------------------------- progression */
.bk-progress { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.bk-progress li { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--encre-2); padding-bottom: 10px; border-bottom: 3px solid var(--ligne); transition: border-color 0.25s, color 0.25s; }
.bk-progress li span { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.8rem; font-weight: 500; background: var(--brume); color: var(--encre-2); flex-shrink: 0; }
.bk-progress li.is-current { color: var(--encre); border-color: var(--passiflore); font-weight: 500; }
.bk-progress li.is-current span { background: var(--passiflore); color: #fff; }
.bk-progress li.is-done { border-color: var(--lavande); }
.bk-progress li.is-done span { background: var(--lavande-pale); color: var(--passiflore); }
@media (max-width: 520px) { .bk-progress li { font-size: 0; gap: 0; justify-content: center; } .bk-progress li span { font-size: 0.8rem; } }

/* ---------------------------------------------------------------- étapes */
.bk-step { background: #fff; border: 1px solid var(--ligne); border-radius: var(--r-m); transition: box-shadow 0.25s, border-color 0.25s; }
.bk-step.is-open { border-color: var(--lavande-2); box-shadow: var(--ombre-douce); }
.bk-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 18px clamp(16px, 3vw, 26px); }
.bk-step-head h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin: 0; display: flex; align-items: center; gap: 12px; outline: none; }
.bk-num { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--lavande); display: inline-grid; place-items: center; font: 500 0.95rem var(--font-texte); color: var(--passiflore); flex-shrink: 0; }
.bk-step.is-done .bk-num { background: var(--passiflore); border-color: var(--passiflore); color: #fff; }
.bk-step:not(.is-open):not(.is-done) .bk-step-head h2 { color: var(--encre-2); }
.bk-step-value { margin: 0; color: var(--encre-2); font-size: 0.95rem; flex: 1 1 200px; }
.bk-step.is-open .bk-step-value { display: none; }
.bk-edit { margin-left: auto; }
.bk-step.is-open .bk-edit { display: none; }
.bk-step-body { padding: 0 clamp(16px, 3vw, 26px) clamp(18px, 3vw, 26px); }
@media (max-width: 640px) {
  .bk-step-head { padding: 14px 16px; }
  .bk-edit { order: 2; min-height: 36px; }
  .bk-step-value { order: 3; flex-basis: 100%; padding-left: 44px; margin-top: -4px; font-size: 0.9rem; }
}
.bk-step-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

/* ---------------------------------------------------------------- étape 1 : soins */
.bk-services { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bk-service { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px; border-radius: 16px; border: 1.5px solid transparent; background: var(--lait); transition: border-color 0.2s, background-color 0.2s; }
.bk-service.is-selected { border-color: var(--lavande); background: #fff; }
.bk-service.is-highlight { border-color: var(--lavande-2); }
.bk-thumb { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.bk-thumb-empty { display: grid; place-items: center; background: var(--lavande-pale); color: var(--passiflore); }
.bk-thumb-empty .icon { width: 30px; height: 30px; }
.bk-service h3 { font-size: 1.2rem; margin: 2px 0 2px; }
.bk-tagline { margin: 0 0 10px; color: var(--encre-2); font-size: 0.92rem; line-height: 1.5; }
.bk-variants { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-variant { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--ligne); border-radius: var(--r-full); background: #fff; cursor: pointer; font-size: 0.94rem; transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.bk-variant input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.bk-variant:hover { border-color: var(--lavande); }
.bk-variant:has(input:checked) { border-color: var(--passiflore); background: var(--passiflore); color: #fff; }
.bk-variant:has(input:checked) .bk-v-price { color: #fff; }
.bk-variant:has(input:focus-visible) { outline: 3px solid var(--passiflore); outline-offset: 2px; }
.bk-v-dur { font-weight: 500; }
.bk-v-price { color: var(--passiflore); font-weight: 500; white-space: nowrap; }
@media (max-width: 420px) {
  .bk-service { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 10px; }
  .bk-thumb { width: 56px; height: 56px; }
  .bk-variant { padding: 8px 12px; gap: 8px; font-size: 0.9rem; }
}

/* ---------------------------------------------------------------- étape 2 : calendrier */
.bk-cal { max-width: 460px; }
.bk-cal-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; margin-bottom: 10px; }
.bk-cal-title { margin: 0; text-align: center; font-size: 1.25rem; }
.bk-cal-nav { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ligne); background: #fff; color: var(--passiflore); display: grid; place-items: center; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.bk-cal-nav:hover:not(:disabled) { border-color: var(--lavande); background: var(--lavande-pale); }
.bk-cal-nav:disabled { opacity: 0.35; cursor: default; }
.bk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; transition: opacity 0.2s; }
.bk-cal-grid.is-loading { opacity: 0.45; }
.bk-cal-wd { text-align: center; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--encre-2); padding: 4px 0; }
.bk-cal-day { position: relative; aspect-ratio: 1; min-height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--encre-2); font: 400 0.98rem var(--font-texte); cursor: default; opacity: 0.5; }
.bk-cal-day.is-available { cursor: pointer; opacity: 1; color: var(--encre); background: var(--lavande-pale); font-weight: 500; transition: background-color 0.15s, color 0.15s, transform 0.15s; }
.bk-cal-day.is-available::after { content: ""; position: absolute; left: 50%; bottom: 14%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--passiflore); }
.bk-cal-day.is-available:hover { background: var(--lavande-2); }
.bk-cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--lavande); }
.bk-cal-day.is-selected { background: var(--passiflore); color: #fff; }
.bk-cal-day.is-selected::after { background: #fff; }
.bk-cal-day:focus-visible { outline: 3px solid var(--passiflore); outline-offset: 2px; }
.bk-cal-legend { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; }
.bk-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--lavande-pale); position: relative; display: inline-block; }
.bk-dot::after { content: ""; position: absolute; left: 7px; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--passiflore); }
.bk-empty { color: var(--encre-2); margin: 12px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------------------------------------------------------------- étape 3 : heures */
.bk-slots-date { font-family: var(--font-titre); font-size: 1.15rem; margin: 0 0 12px; }
.bk-slot-group + .bk-slot-group { margin-top: 16px; }
.bk-slot-label { margin: 0 0 8px; font-size: 0.9rem; font-weight: 500; color: var(--encre-2); }
.bk-slot-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.bk-slot { min-height: 46px; border-radius: 12px; border: 1.5px solid var(--ligne); background: #fff; color: var(--encre); font: 500 1rem var(--font-texte); cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
.bk-slot:hover { border-color: var(--passiflore); color: var(--passiflore); }
.bk-slot.is-selected { background: var(--passiflore); border-color: var(--passiflore); color: #fff; }
.bk-slot.is-current { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.bk-slot:focus-visible { outline: 3px solid var(--passiflore); outline-offset: 2px; }
@media (max-width: 380px) { .bk-slot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- étape 4 : coordonnées */
.bk-fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.bk-fieldset legend { font-size: 0.92rem; font-weight: 500; margin-bottom: 8px; padding: 0; }
.bk-inline-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-pill { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--ligne); border-radius: var(--r-full); cursor: pointer; font-size: 0.94rem; background: #fff; }
.bk-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bk-pill:has(input:checked) { border-color: var(--passiflore); background: var(--lavande-pale); color: var(--passiflore-fonce); font-weight: 500; }
.bk-pill:has(input:focus-visible) { outline: 3px solid var(--passiflore); outline-offset: 2px; }

.bk-voucher { border: 1.5px dashed var(--lavande-2); border-radius: 16px; padding: 4px 14px; }
.bk-voucher.is-open { border-style: solid; background: var(--lait); padding-bottom: 14px; }
.bk-voucher-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: none; color: var(--passiflore); font: 500 0.96rem var(--font-texte); cursor: pointer; padding: 0; }
.bk-voucher-toggle .icon { width: 20px; height: 20px; }
.bk-input-action { display: flex; gap: 8px; align-items: center; }
.bk-input-action input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.05em; }
.bk-voucher-msg { min-height: 1.2em; color: var(--encre-2); }
.bk-voucher-msg.is-ok { color: var(--succes); }
.bk-voucher-msg.is-error { color: var(--erreur); }
.bk-consents { display: grid; gap: 12px; }
.bk-consents .check.has-error span { color: var(--erreur); }
.bk-recap-mobile { display: none; padding: 12px 16px; border-radius: 14px; background: var(--brume); font-size: 0.92rem; }
@media (max-width: 960px) { .bk-recap-mobile:not([hidden]) { display: block; } }
.bk-submit { display: grid; gap: 10px; }
.bk-submit .btn { min-height: 54px; font-size: 1.05rem; }

/* ---------------------------------------------------------------- récapitulatif (colonne) */
.bk-aside { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 16px; }
@media (max-width: 960px) { .bk-aside { position: static; } }
.bk-summary { background: #fff; border: 1px solid var(--ligne); border-radius: var(--r-m); padding: 22px; }
.bk-summary h2 { font-size: 1.3rem; margin-bottom: 12px; }
.bk-summary dl, .bk-ticket dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.bk-summary dt, .bk-ticket dt { color: var(--encre-2); font-size: 0.88rem; }
.bk-summary dd, .bk-ticket dd { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.bk-info { background: var(--brume); border-radius: var(--r-m); padding: 18px 20px; font-size: 0.9rem; color: var(--encre-2); }
.bk-info p { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; margin: 0 0 12px; line-height: 1.55; }
.bk-info p:last-child { margin-bottom: 0; }
.bk-info .icon { width: 18px; height: 18px; color: var(--passiflore); margin-top: 3px; }

/* ---------------------------------------------------------------- confirmation et gestion */
.bk-confirm h1 { font-size: clamp(2rem, 4vw, 3rem); }
.bk-ticket { background: #fff; border: 1px solid var(--ligne); border-radius: var(--r-m); padding: clamp(18px, 3vw, 26px); margin: 26px auto; max-width: 520px; text-align: left; box-shadow: var(--ombre-douce); }
.bk-ticket-left { margin: 0; max-width: none; }
.bk-ticket .actions { margin-top: 16px; }
.bk-confirm-note { display: flex; gap: 10px; align-items: flex-start; text-align: left; max-width: 520px; margin: 18px auto 0; padding: 12px 16px; border-radius: 14px; background: var(--brume); font-size: 0.92rem; color: var(--encre-2); }
.bk-confirm-note .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--passiflore); flex-shrink: 0; }
.bk-confirm .small { margin-top: 18px; }

.bk-details { background: #fff; border: 1px solid var(--ligne); border-radius: var(--r-m); }
.bk-details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-weight: 500; color: var(--passiflore); min-height: 56px; }
.bk-details > summary::-webkit-details-marker { display: none; }
.bk-details > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s; }
.bk-details[open] > summary::after { transform: rotate(-135deg); }
.bk-details > form { padding: 0 22px 22px; }
.bk-reschedule { display: grid; gap: 14px; }
.bk-reschedule .bk-cal { max-width: 420px; }
.bk-new-slot { margin: 0; font-weight: 500; }

/* ---------------------------------------------------------------- avis */
.bk-rating { border: 0; margin: 0; padding: 0; }
.bk-rating legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.bk-rating.has-error legend { color: var(--erreur); }
.bk-stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.bk-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bk-stars label { cursor: pointer; color: var(--lavande-2); padding: 4px; border-radius: 10px; transition: color 0.15s, transform 0.15s; }
.bk-stars label .icon { width: 38px; height: 38px; }
.bk-stars label:hover, .bk-stars label:hover ~ label, .bk-stars input:checked ~ label { color: #c9a227; }
.bk-stars label:hover .icon, .bk-stars label:hover ~ label .icon, .bk-stars input:checked ~ label .icon { fill: currentColor; }
.bk-stars input:focus-visible + label { outline: 3px solid var(--passiflore); outline-offset: 2px; }
[data-publish-name] { display: none; }
.check:has([data-publish-toggle]:checked) + [data-publish-name] { display: grid; }

@media (prefers-reduced-motion: reduce) {
  .bk-step, .bk-variant, .bk-cal-day, .bk-slot, .bk-progress li, .bk-stars label { transition: none; }
}
