/* ============================================================
 *  Braid Makeur — Refonte Planity-style
 *  Charge APRÈS css/style.css : ces règles surchargent les couleurs
 *  et finitions pour un rendu épuré inspiré Planity / Treatwell.
 * ============================================================ */

/* --- Tokens design --- */
:root {
  --bm-bg:        #fafaf8;
  --bm-surface:   #ffffff;
  --bm-text:      #0a0a0a;
  --bm-text-soft: #5a5a5a;
  --bm-text-mute: #8a8a8a;
  --bm-border:    #ebe8e1;
  --bm-border-soft: #f3f1ec;
  --bm-accent:    #c9a961;        /* doré chaud */
  --bm-accent-d:  #ad8e47;
  --bm-accent-l:  #e8d9b0;
  --bm-shadow-sm: 0 1px 2px rgba(20,20,20,.04);
  --bm-shadow:    0 6px 24px rgba(20,20,20,.06);
  --bm-shadow-lg: 0 12px 40px rgba(20,20,20,.08);
  --bm-radius:    14px;
  --bm-radius-lg: 22px;
  --bm-radius-pill: 999px;

  --bm-font-serif: 'Cormorant Garamond', Georgia, serif;
  --bm-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
  background: var(--bm-bg) !important;
  color: var(--bm-text);
  font-family: var(--bm-font-sans) !important;
  -webkit-font-smoothing: antialiased;
}

/* Headings : on touche à la typo / espacement, pas à la couleur (laissée héritable) */
h1, h2, h3, h4 {
  font-family: var(--bm-font-serif) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

/* Liens (en dehors des contextes sombres) */
.bm-booking a, section a, main a, p a { transition: color .2s; }
.bm-booking a:hover, section a:hover, main a:hover, p a:hover { color: var(--bm-accent-d); }

/* ============================================================
 *  Préservation des contextes sombres (hero, footer, sections sur image)
 * ============================================================ */
.hero, .hero-content, .page-hero, .page-hero-content, .cta-section, .footer { color: #fff; }
.hero h1, .hero h2, .hero h3, .hero p, .hero a,
.hero-content h1, .hero-content h2, .hero-content h3, .hero-content p, .hero-content a,
.hero-title, .hero-sub,
.page-hero h1, .page-hero h2, .page-hero p, .page-hero a,
.page-hero-content h1, .page-hero-content h2, .page-hero-content h3, .page-hero-content p, .page-hero-content a,
.cta-section h1, .cta-section h2, .cta-section h3, .cta-section p { color: #fff !important; }
.hero-sub, .page-hero-content p { color: rgba(255,255,255,.88) !important; }
.hero-title em, .page-hero-content h1 em { color: var(--bm-accent) !important; }

/* --- NAVBAR --- */
.navbar {
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--bm-border-soft) !important;
  box-shadow: none !important;
}
.navbar.scrolled { background: rgba(255,255,255,.95) !important; box-shadow: var(--bm-shadow-sm); }
.nav-links a { font-weight: 500; font-size: 14.5px; letter-spacing: 0.01em; color: var(--bm-text) !important; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--bm-accent-d) !important; }
.nav-links a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--bm-accent); border-radius: 2px; }

/* --- BUTTONS génériques --- */
.btn { border-radius: var(--bm-radius-pill) !important; font-weight: 600 !important; letter-spacing: 0.01em; padding: 14px 28px !important; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn-primary { background: var(--bm-text) !important; color: #fff !important; border: 1px solid var(--bm-text) !important; }
.btn-primary:hover { background: var(--bm-accent-d) !important; border-color: var(--bm-accent-d) !important; transform: translateY(-1px); box-shadow: var(--bm-shadow); }
.btn-ghost, .btn-secondary { background: var(--bm-surface) !important; color: var(--bm-text) !important; border: 1px solid var(--bm-border) !important; }
.btn-ghost:hover, .btn-secondary:hover { border-color: var(--bm-text) !important; }
.btn-lg { padding: 16px 34px !important; font-size: 16px !important; }

/* --- HERO + sections --- */
.hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,.20) 0%, rgba(0,0,0,.55) 100%) !important; }
.hero h1, .hero .hero-title { font-family: var(--bm-font-serif) !important; font-weight: 500 !important; letter-spacing: -0.02em; }
.card, .service-card, .testimonial-card, .price-card, .team-card { background: var(--bm-surface) !important; border: 1px solid var(--bm-border-soft) !important; border-radius: var(--bm-radius-lg) !important; box-shadow: var(--bm-shadow-sm) !important; color: var(--bm-text) !important; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover, .service-card:hover, .price-card:hover, .team-card:hover { transform: translateY(-3px); box-shadow: var(--bm-shadow); border-color: var(--bm-border); }

/* Lisibilité des cards Planity (texte foncé sur fond clair) */
.price-card *, .service-card *, .testimonial-card *, .team-card * { color: inherit; }
.price-card h2, .price-card h3, .price-card h4,
.price-card-header h2, .price-card-header h3, .price-card-header h4,
.service-card h2, .service-card h3, .service-card h4,
.team-card h2, .team-card h3, .team-card h4 { color: var(--bm-text) !important; }
.price-card p, .price-features li,
.service-card p, .team-card p { color: var(--bm-text-soft) !important; }
.price-amount, .price-card .price, .tarif-price { color: var(--bm-accent-d) !important; }
.price-features li::before, .tarif-feature::before { color: var(--bm-accent) !important; }
.price-card--featured { background: #fffaf0 !important; border-color: var(--bm-accent-l) !important; }
.testimonial-card .testimonial-author, .testimonial-card cite, .testimonial-card p { color: var(--bm-text-soft) !important; }
.tarif-card, .pricing-card { background: var(--bm-surface) !important; color: var(--bm-text) !important; }
.tarif-card *, .pricing-card * { color: inherit; }
.tarif-card h3, .tarif-card h4, .pricing-card h3 { color: var(--bm-text) !important; }
.tarif-name span { color: var(--bm-text) !important; font-weight: 600; }
.tarif-name small, .tarif-duration { color: var(--bm-text-mute) !important; }
section { padding: 80px 0; }
section h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 12px; }
.section-tagline { color: var(--bm-accent-d) !important; font-weight: 600; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; }

/* --- FOOTER --- */
.footer { background: var(--bm-text) !important; color: #d8d6d1 !important; padding-top: 80px !important; }
.footer h4 { color: #fff !important; font-family: var(--bm-font-sans) !important; font-weight: 600 !important; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer a { color: #d8d6d1 !important; }
.footer a:hover { color: var(--bm-accent) !important; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08) !important; color: #888 !important; font-size: 13px; }
.footer-bottom a { color: #b0aea9 !important; }
.social-link { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); display: inline-flex; align-items: center; justify-content: center; color: #fff !important; }
.social-link:hover { background: var(--bm-accent); border-color: var(--bm-accent); color: var(--bm-text) !important; }


/* ════════════════════════════════════════════════════════════
 *  WIDGET BOOKING — version compacte viewport-fit
 *  Une étape = ~un écran. Header steps + zone scroll interne + action bar sticky.
 * ════════════════════════════════════════════════════════════ */
.bm-booking {
  --bm-step-h: 56px;
  --bm-action-h: 76px;
  font-family: var(--bm-font-sans);
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

/* Étapes (header) — compact */
.bm-booking__steps {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 8px 18px;
  font-size: 13px;
}
.bm-booking__step { display: flex; align-items: center; gap: 8px; color: var(--bm-text-mute); font-weight: 600; }
.bm-booking__step .num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bm-border-soft); color: var(--bm-text-mute);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.bm-booking__step.is-active { color: var(--bm-text); }
.bm-booking__step.is-active .num { background: var(--bm-text); color: #fff; }
.bm-booking__step.is-done .num { background: var(--bm-accent); color: var(--bm-text); }
.bm-booking__step .arrow { color: var(--bm-border); }
@media (max-width: 540px) {
  .bm-booking__step span:not(.num) { display: none; } /* labels masqués mobile, garde juste les pastilles */
  .bm-booking__step .arrow { display: inline; }
}

/* Carte principale qui prend l'espace dispo */
.bm-card {
  background: var(--bm-surface);
  border: 1px solid var(--bm-border-soft);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  /* hauteur cible pour fitter dans le viewport sans scroll global */
  min-height: 520px;
  max-height: calc(100vh - var(--bm-step-h) - 140px);
}
.bm-card__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 22px 26px;
  -webkit-overflow-scrolling: touch;
}
.bm-card__head {
  flex: 0 0 auto;
  padding: 18px 26px 8px;
  border-bottom: 1px solid var(--bm-border-soft);
}
.bm-card__head h2 {
  font-size: 20px; margin: 0 0 2px;
  font-family: var(--bm-font-serif); font-weight: 600;
}
.bm-card__head p { margin: 0; color: var(--bm-text-soft); font-size: 13.5px; }

/* Action bar sticky en bas */
.bm-actions {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--bm-border-soft);
  background: var(--bm-surface);
}
.bm-actions__hint { font-size: 13px; color: var(--bm-text-mute); }
.bm-btn { padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 14.5px; border: 1px solid var(--bm-text); cursor: pointer; transition: background .15s, transform .15s; }
.bm-btn--primary { background: var(--bm-text); color: #fff; }
.bm-btn--primary:hover:not(:disabled) { background: var(--bm-accent-d); border-color: var(--bm-accent-d); }
.bm-btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }
.bm-btn--ghost { background: transparent; color: var(--bm-text); border: 1px solid var(--bm-border); }
.bm-btn--ghost:hover { border-color: var(--bm-text); }

/* ──────────── ÉTAPE 1 — Prestations (chips + grid avec photos) ──────────── */
.bm-cats {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.bm-cats::-webkit-scrollbar { display: none; }
.bm-cat-chip {
  white-space: nowrap;
  padding: 8px 16px; border-radius: 999px;
  background: var(--bm-bg); border: 1px solid var(--bm-border);
  font-size: 13px; font-weight: 600; color: var(--bm-text-soft);
  cursor: pointer; transition: all .15s;
}
.bm-cat-chip:hover { border-color: var(--bm-text-soft); }
.bm-cat-chip.is-active { background: var(--bm-text); border-color: var(--bm-text); color: #fff; }

.bm-svc-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.bm-svc {
  display: flex; flex-direction: column;
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  background: var(--bm-surface);
  cursor: pointer; overflow: hidden;
  transition: all .15s;
  text-align: left;
  font: inherit;
  padding: 0;
}
.bm-svc:hover { border-color: var(--bm-text); transform: translateY(-2px); box-shadow: var(--bm-shadow); }
.bm-svc.is-selected { border-color: var(--bm-accent); box-shadow: 0 0 0 3px rgba(201,169,97,.18); }
.bm-svc__img {
  aspect-ratio: 16 / 10;
  background: #f0ede6 center/cover no-repeat;
}
.bm-svc__body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bm-svc__title { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.bm-svc__meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.bm-svc__price { font-weight: 700; font-size: 15px; }
.bm-svc__price small { font-weight: 500; font-size: 11px; color: var(--bm-text-mute); }
.bm-svc__dur { font-size: 12px; color: var(--bm-text-mute); }

/* Liste compacte pour mobile */
@media (max-width: 540px) {
  .bm-svc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bm-svc__body { padding: 10px 11px; }
  .bm-svc__title { font-size: 13.5px; }
}

/* ──────────── ÉTAPE 2 — Date + créneaux ──────────── */
.bm-step-svc-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bm-bg); border: 1px solid var(--bm-border-soft);
  font-size: 13px; color: var(--bm-text-soft); margin-bottom: 14px;
}
.bm-step-svc-pill img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

.bm-calendar { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 22px; }
@media (max-width: 720px) { .bm-calendar { grid-template-columns: 1fr; gap: 16px; } }

.bm-cal { border: 1px solid var(--bm-border); border-radius: var(--bm-radius); padding: 12px 14px; }
.bm-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bm-cal__head h3 { margin: 0; font-size: 14px; font-family: var(--bm-font-sans); font-weight: 600; }
.bm-cal__nav { display: flex; gap: 4px; }
.bm-cal__nav button { width: 28px; height: 28px; border-radius: 8px; background: var(--bm-bg); border: 1px solid var(--bm-border-soft); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--bm-text); }
.bm-cal__nav button:hover { background: var(--bm-border-soft); }
.bm-cal__nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.bm-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bm-cal__dow { font-size: 10.5px; color: var(--bm-text-mute); text-align: center; padding: 4px 0; font-weight: 600; }
.bm-cal__day {
  aspect-ratio: 1; min-height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; background: transparent; border: 1px solid transparent;
}
.bm-cal__day:hover:not(:disabled) { background: var(--bm-border-soft); }
.bm-cal__day.is-today { font-weight: 700; }
.bm-cal__day.is-selected { background: var(--bm-text); color: #fff; }
.bm-cal__day.is-closed, .bm-cal__day:disabled { color: var(--bm-border); cursor: not-allowed; }
.bm-cal__day.is-other { opacity: 0; pointer-events: none; }

.bm-slots-wrap h3 { margin: 0 0 10px; font-size: 13.5px; font-family: var(--bm-font-sans); font-weight: 600; color: var(--bm-text-soft); }
.bm-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.bm-slot { padding: 10px 6px; text-align: center; font-size: 13.5px; font-weight: 600; border: 1px solid var(--bm-border); background: var(--bm-surface); border-radius: 8px; cursor: pointer; transition: all .12s; }
.bm-slot:hover { border-color: var(--bm-text); }
.bm-slot.is-selected { background: var(--bm-text); color: #fff; border-color: var(--bm-text); }
.bm-slots__empty { color: var(--bm-text-mute); font-size: 13px; font-style: italic; padding: 12px 0; }

/* ──────────── ÉTAPE 3 — Form ──────────── */
.bm-summary-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fffdf6; border: 1px solid var(--bm-accent-l);
  border-radius: var(--bm-radius); padding: 10px 14px; margin-bottom: 16px;
  font-size: 13.5px; flex-wrap: wrap;
}
.bm-summary-bar img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.bm-summary-bar strong { font-weight: 700; }
.bm-summary-bar .sep { color: var(--bm-text-mute); margin: 0 2px; }

.bm-form { display: grid; gap: 12px; }
.bm-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: var(--bm-text); }
.bm-form input[type="text"], .bm-form input[type="email"], .bm-form input[type="tel"], .bm-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--bm-border); border-radius: 9px;
  font-family: inherit; font-size: 14.5px; background: var(--bm-surface);
}
.bm-form input:focus, .bm-form textarea:focus { outline: none; border-color: var(--bm-text); box-shadow: 0 0 0 3px rgba(201,169,97,.15); }
.bm-form .bm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .bm-form .bm-row { grid-template-columns: 1fr; } }
.bm-form textarea { resize: vertical; min-height: 60px; }
.bm-form .bm-rgpd { font-size: 12.5px; color: var(--bm-text-soft); display: flex; gap: 8px; align-items: flex-start; }
.bm-form .bm-rgpd input { margin-top: 3px; }

.bm-success { text-align: center; padding: 50px 24px; }
.bm-success svg { width: 64px; height: 64px; color: var(--bm-accent); margin-bottom: 14px; }
.bm-success h2 { font-size: 26px; margin-bottom: 10px; font-family: var(--bm-font-serif); }
.bm-success p { color: var(--bm-text-soft); font-size: 15px; max-width: 440px; margin: 0 auto; }

.bm-error { background: #fff0f0; border: 1px solid #f5c2c2; color: #a62929; padding: 10px 14px; border-radius: 9px; font-size: 13.5px; margin-bottom: 14px; }
.bm-honeypot { position: absolute; left: -9999px; }
.bm-loader { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--bm-border); border-top-color: var(--bm-text); border-radius: 50%; animation: bmspin .7s linear infinite; vertical-align: middle; }
@keyframes bmspin { to { transform: rotate(360deg); } }

/* Adapter la hauteur sur mobile */
@media (max-width: 720px) {
  .bm-card { min-height: auto; max-height: none; }
  .bm-card__body { padding: 16px 18px; }
  .bm-card__head { padding: 14px 18px 6px; }
  .bm-card__head h2 { font-size: 18px; }
  .bm-actions { padding: 12px 16px; }
  .bm-btn { padding: 10px 18px; font-size: 14px; }
}
