/* MMG — public booking pages (/rdv). Mobile-first, black/white + one accent (house green). */
:root {
  --bg: #f5f4f0; --card: #ffffff; --ink: #0b0b0b; --muted: #6b6b6b; --line: #e7e5df; --soft: #f1f0ec;
  --accent: #1E9E5A; --accent-ink: #0F6B3B; --accent-soft: #E3F4EA; --danger: #c0392b; --danger-soft: #fbeceb;
  --radius: 18px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d0d0d; --card: #161616; --ink: #f4f4f2; --muted: #a3a3a0; --line: #2a2a2a; --soft: #1f1f1f;
    --accent: #34B972; --accent-ink: #6FDCA4; --accent-soft: #1B3527; --danger: #ff7b6e; --danger-soft: #3a1c19;
    --shadow: 0 1px 2px rgba(0,0,0,.3); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

/* top bar + busy line */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; max-width: 560px;
  width: 100%; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; letter-spacing: .06em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #000; }
.tag { font-size: 13px; color: var(--muted); }
#busy { position: fixed; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; opacity: 0; transition: opacity .15s; z-index: 50; }
#busy.on { opacity: 1; }
#busy i { position: absolute; top: 0; bottom: 0; width: 40%; background: var(--accent); animation: slide 1s ease-in-out infinite; }
@keyframes slide { from { left: -40%; } to { left: 100%; } }

.wrap { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 4px 16px 24px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 16px 28px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 18px; margin-bottom: 14px; }
.card.center { text-align: center; }
.big { font-size: 44px; line-height: 1; margin: 6px 0 10px; }
h1 { font-size: 23px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 19px; line-height: 1.3; margin: 0 0 4px; }
.ar { margin: 0 0 12px; color: var(--muted); font-size: 16px; font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
.lead { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.hello { font-weight: 600; margin: 0 0 4px; }

/* step dots */
.steps { display: flex; gap: 6px; margin: 2px 0 16px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--ink); }
.back { background: none; border: 0; padding: 6px 0; margin: -6px 0 6px; color: var(--muted); cursor: pointer; font-size: 14px; }

/* inputs + buttons */
label.fl { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
input.in, textarea.in { width: 100%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 14px;
  padding: 14px 14px; font-size: 18px; outline: none; transition: border-color .15s; }
textarea.in { font-size: 16px; min-height: 96px; resize: vertical; }
input.in:focus, textarea.in:focus { border-color: var(--ink); }
input.in.tel { letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 18px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); text-decoration: none; cursor: pointer;
  font-weight: 600; font-size: 16px; position: relative; -webkit-tap-highlight-color: transparent; }
.btn.block { width: 100%; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--card); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading img { visibility: hidden; }
.btn.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-color: var(--muted) transparent var(--muted) var(--muted); animation: spin .7s linear infinite; }
.btn.primary.is-loading::after, .btn.accent.is-loading::after { border-color: #fff transparent #fff #fff; }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row > * { flex: 1; }
.stack > * + * { margin-top: 10px; }
.spin { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line);
  border-top-color: var(--ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alert { border-radius: 14px; padding: 12px 14px; margin: 12px 0 0; font-size: 15px; background: var(--danger-soft); color: var(--ink); }
.alert .ar { margin: 6px 0 0; font-size: 15px; }
.note-ok { background: var(--accent-soft); }

/* tiles (products / topics) */
.tiles { display: grid; gap: 10px; }
.tile { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 16px; padding: 16px 14px; text-decoration: none; cursor: pointer; position: relative; min-height: 64px; }
.tile:hover, .tile:focus-visible { border-color: var(--ink); }
.tile-emo { font-size: 26px; width: 34px; text-align: center; }
.tile-txt { flex: 1; display: flex; flex-direction: column; }
.tile-txt small { color: var(--muted); font-size: 13px; }
.chev { color: var(--muted); font-size: 24px; line-height: 1; }
.tile.is-loading .chev { visibility: hidden; }
.tile.is-loading::after { content: ""; position: absolute; right: 16px; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--muted); border-right-color: transparent; animation: spin .7s linear infinite; }
.tile.off { opacity: .5; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 10px 14px; cursor: pointer;
  font-size: 15px; min-height: 44px; position: relative; }
.chip.sel { background: var(--ink); color: var(--card); border-color: var(--ink); }
.chip.is-loading { color: transparent; }
.chip.is-loading::after { content: ""; position: absolute; left: calc(50% - 9px); top: calc(50% - 9px); width: 18px; height: 18px;
  border-radius: 50%; border: 2.5px solid var(--muted); border-right-color: transparent; animation: spin .7s linear infinite; }

/* slots */
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.slot { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 4px; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums; min-height: 46px; }
.slot.sel { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty { color: var(--muted); font-size: 14px; padding: 10px 0 2px; }

/* recap + booking */
.recap { background: var(--soft); border-radius: 14px; padding: 14px; margin: 0 0 14px; }
.recap div { display: flex; gap: 10px; padding: 4px 0; }
.recap div span:first-child { width: 26px; text-align: center; flex: none; }
.status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--accent-soft);
  color: var(--accent-ink); margin-bottom: 10px; }
.status.cancelled, .status.no_show { background: var(--danger-soft); color: var(--danger); }
.status.done { background: var(--soft); color: var(--muted); }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--soft); border-radius: 12px; padding: 10px 12px; margin: 8px 0 0;
  font-size: 13px; word-break: break-all; }
.linkbox code { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: 13px; color: var(--muted); }
.hide { display: none !important; }

/* 🎭 demo banner */
.demo { background: #FFF4D6; color: #6B4E00; border: 1px solid #F0D38A; border-radius: 14px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 12px; }
@media (prefers-color-scheme: dark) { .demo { background: #3A2F14; color: #F2D58A; border-color: #5A4A1F; } }
/* v3 (19/10): phone / email switch, next-step badge */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--soft); padding: 4px; border-radius: 14px; margin: 0 0 14px; }
.seg button { border: 0; background: none; border-radius: 10px; padding: 10px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.lvl.nx { background: var(--ink); color: var(--card); }
/* v2 (19/10): the call card (Calendly «event»), the month calendar + times */
.lvl { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); border-radius: 999px; padding: 4px 10px; margin-bottom: 8px; }
.ev { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; margin-top: 10px; }
.ev.big { border-color: var(--ink); }
.ev.small { border: 0; padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
.ev h2 { margin: 0 0 8px; }
.evmeta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.ev.small .evmeta { margin-bottom: 0; }
.prod { font-weight: 700; margin: 16px 0 4px; }
.tile + .tile, .card .tile { margin-top: 10px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 14px 0 0; font-size: 14px; }
.picker { display: grid; gap: 16px; }
.cal { border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.calh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; text-transform: capitalize; }
.calh .nav { border: 1.5px solid var(--line); background: var(--card); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 18px; }
.calh .nav:disabled { opacity: .3; cursor: default; }
.calg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calg .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cd { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 15px; color: var(--muted);
  border: 0; background: none; font-variant-numeric: tabular-nums; }
button.cd.on { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; cursor: pointer; }
button.cd.sel { background: var(--accent); color: #fff; }
.times .tday { display: block; text-transform: capitalize; margin-bottom: 4px; }

@media (min-width: 720px) {
  .picker { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .wrap, .top { max-width: 620px; }
  .card { padding: 28px 28px; }
  h1 { font-size: 26px; }
  .slots { grid-template-columns: repeat(4, 1fr); }
}
