/* ============================================================
   SEO Marrakesh — Booking modal ("Demander un audit")
   Light/Majorelle theme. Uses tokens from styles.css.
   ============================================================ */

.bk-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.bk-modal.is-open { display: flex; }

.bk-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(27, 24, 19, 0.5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .4s var(--e-out);
}
.bk-modal.is-open .bk-modal__backdrop { opacity: 1; }

.bk-modal__dialog {
  position: relative; width: 100%; max-width: 520px;
  max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: clamp(26px, 4vw, 40px);
  transform: translateY(24px) scale(.98); opacity: 0;
  transition: transform .5s var(--e-out), opacity .5s var(--e-out);
}
.bk-modal.is-open .bk-modal__dialog { transform: none; opacity: 1; }

.bk-modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--sand);
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
  transition: color .3s, border-color .3s, transform .3s var(--e-out);
}
.bk-modal__close:hover { color: var(--majorelle); border-color: var(--majorelle); transform: rotate(90deg); }
.bk-modal__close svg { width: 16px; height: 16px; }

.bk-modal__eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--majorelle);
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.bk-modal__eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--majorelle); border-radius: 50%; }
.bk-modal__title {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px);
  font-weight: 600; line-height: 1.06; letter-spacing: -.02em;
  color: var(--ink); margin: 0 0 12px;
}
.bk-modal__title em { font-style: normal; color: var(--majorelle); }
.bk-modal__sub { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 24px; max-width: 42ch; }

.bk-wa {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 16px 22px; border: 0;
  border-radius: var(--r-md); background: var(--majorelle); color: #fff;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(58,71,213,.5);
  transition: background .3s, transform .3s var(--e-out);
}
.bk-wa:hover { background: var(--majorelle-d); transform: translateY(-2px); }
.bk-wa svg { width: 22px; height: 22px; flex-shrink: 0; }

.bk-or {
  display: flex; align-items: center; gap: 14px; margin: 22px 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.bk-or::before, .bk-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.bk-form { display: flex; flex-direction: column; gap: 14px; }
.bk-field { display: flex; flex-direction: column; gap: 7px; }
.bk-field label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.bk-field input, .bk-field textarea {
  width: 100%; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 13px 14px; color: var(--ink);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color .25s, box-shadow .25s;
}
.bk-field textarea { resize: vertical; min-height: 70px; }
.bk-field input::placeholder, .bk-field textarea::placeholder { color: #a59c8c; }
.bk-field input:focus, .bk-field textarea:focus {
  outline: none; border-color: var(--majorelle);
  box-shadow: 0 0 0 3px var(--majorelle-wash);
}

/* Inline validation */
.bk-error { display: none; font-family: var(--font-body); font-size: 12.5px; line-height: 1.3; color: var(--clay); }
.bk-field.has-error .bk-error { display: block; }
.bk-field.has-error input { border-color: var(--clay); box-shadow: 0 0 0 3px var(--clay-wash); }

.bk-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; margin-top: 4px; padding: 15px 22px;
  border-radius: var(--r-md); background: transparent; border: 1px solid var(--majorelle);
  color: var(--majorelle); font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .3s, transform .3s var(--e-out);
}
.bk-submit:hover { background: var(--majorelle-wash); transform: translateY(-2px); }

.bk-note { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.bk-fallback {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
}
.bk-fallback a { color: var(--ink); }
.bk-fallback a:hover { color: var(--majorelle); }
.bk-fallback span { color: var(--majorelle); }

/* Confirmation */
.bk-confirm { display: none; text-align: center; padding: 14px 0 6px; }
.bk-modal.is-confirmed .bk-step { display: none; }
.bk-modal.is-confirmed .bk-confirm { display: block; }
.bk-confirm__icon {
  width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--majorelle-wash);
  border: 1px solid var(--majorelle); color: var(--majorelle);
}
.bk-confirm__icon svg { width: 34px; height: 34px; }
.bk-confirm__title { font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 32px); font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.bk-confirm__title em { font-style: normal; color: var(--majorelle); }
.bk-confirm__text { font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0 auto 24px; max-width: 40ch; }
.bk-confirm__reopen { display: inline-flex; align-items: center; gap: 8px; color: var(--majorelle); font-family: var(--font-mono); font-size: 12px; cursor: pointer; }
.bk-confirm__reopen:hover { text-decoration: underline; }

@media (max-width: 480px) { .bk-modal__dialog { border-radius: var(--r-md); padding: 24px 20px; } }
@media (prefers-reduced-motion: reduce) {
  .bk-modal__backdrop, .bk-modal__dialog { transition: none !important; }
  .bk-modal__close:hover, .bk-wa:hover, .bk-submit:hover { transform: none; }
}
