/* ==========================================================================
   CDNails · Réservation en ligne
   Charte : nude / rose poudré / doré, Cormorant Garamond + Jost, mobile first
   ========================================================================== */

:root {
  --nude: #f8f1ec;
  --nude-deep: #f1e4dc;
  --rose: #d9a5a5;
  --rose-deep: #b97c7c;
  --rose-ink: #8a5a5a;
  --rose-light: #f5e3e0;
  --gold: #c9a96e;
  --gold-light: #efe3cc;
  --ink: #2b2626;
  --muted: #7a6f6b;
  --line: #eadfd8;
  --white: #ffffff;
  --success: #4f8a5b;
  --success-bg: #eaf5ec;
  --error: #b5484d;
  --error-bg: #fbecec;
  --shadow: 0 10px 30px rgba(74, 45, 45, 0.08);
  --radius: 18px;
  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--nude);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--rose-ink); }
button { font-family: inherit; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header / footer ------------------------------------------------------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px clamp(16px, 5vw, 48px);
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 241, 236, 0.9);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
}
/* Même logo que le site vitrine (logos/logo-v3.svg), copié dans les assets pour que le module reste autonome. */
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: center; line-height: 1.1; }
.brand-logo { display: block; height: 56px; width: auto; }
.header-link { font-size: 14px; text-decoration: none; color: var(--muted); white-space: nowrap; }
@media (max-width: 480px) { .brand-logo { height: 44px; } }
.header-link:hover { color: var(--rose-ink); }

.site-footer {
  margin-top: auto; padding: 32px clamp(16px, 5vw, 48px) 40px;
  text-align: center; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line);
}
.site-footer p { margin: 0 0 6px; }
.footer-legal { font-size: 12px; }

/* Page ------------------------------------------------------------------ */
.page {
  width: 100%; max-width: 1040px; margin: 0 auto;
  padding: 28px clamp(16px, 5vw, 48px) 48px;
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
@media (min-width: 900px) {
  .page.has-side { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "hero hero" "steps steps" "app side"; align-items: start; }
  .page:not(.has-side) > * { max-width: 760px; width: 100%; margin-left: auto; margin-right: auto; }
  .page.has-side .hero { grid-area: hero; }
  .page.has-side .steps { grid-area: steps; }
  .page.has-side .booking-app { grid-area: app; }
  .page.has-side .side-summary { grid-area: side; position: sticky; top: 96px; }
}

.hero { text-align: center; padding: 8px 0 4px; }
.eyebrow { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.hero h1 { font-size: clamp(34px, 6vw, 52px); }
.hero h1::after { content: ""; display: block; width: 56px; height: 2px; background: var(--gold); margin: 14px auto 0; }
.lead { max-width: 560px; margin: 16px auto 0; color: var(--muted); }

/* Steps indicator ------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: step; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); position: relative; text-align: center; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--white); color: var(--muted); font-weight: 500; transition: all .25s;
}
.step.is-current .step-num { background: var(--rose-ink); border-color: var(--rose-ink); color: #fff; box-shadow: 0 0 0 5px var(--rose-light); }
.step.is-current { color: var(--ink); font-weight: 500; }
.step.is-done .step-num { background: var(--gold); border-color: var(--gold); color: #fff; }
.step.is-done .step-num::before { content: "✓"; }
.step.is-done .step-num { font-size: 0; }
.step.is-done .step-num::before { font-size: 14px; }

/* Panels ---------------------------------------------------------------- */
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel-title { font-size: clamp(24px, 4vw, 30px); margin-bottom: 18px; }
.panel-hint { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 24px; }
.panel-actions .btn-primary { margin-left: auto; }

.alert { padding: 14px 16px; border-radius: 12px; font-size: 15px; margin-bottom: 16px; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #f0c9cb; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #cfe6d3; }
.alert-info { background: var(--gold-light); color: #6f5a2c; border: 1px solid #e6d5ae; }

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 15px; font-weight: 500; letter-spacing: 0.02em; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s; min-height: 46px;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(201, 169, 110, 0.55); outline-offset: 2px; }
.btn-primary { background: var(--rose-ink); color: #fff; box-shadow: 0 8px 20px rgba(138, 90, 90, 0.25); }
.btn-primary:hover { background: #7a4d4d; }
.btn-primary[disabled] { opacity: .6; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose-ink); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--rose-ink); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* Services -------------------------------------------------------------- */
.service-list { display: grid; gap: 12px; }
@media (min-width: 640px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
.service-card {
  width: 100%; text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 18px; cursor: pointer; display: grid; grid-template-columns: 6px 1fr auto; gap: 14px; align-items: start;
  transition: border-color .15s, box-shadow .15s, transform .15s; color: inherit; font: inherit;
}
.service-card:hover { border-color: var(--rose); box-shadow: var(--shadow); transform: translateY(-1px); }
.service-card.is-selected { border-color: var(--rose-ink); box-shadow: 0 0 0 3px var(--rose-light); }
.service-color { width: 6px; border-radius: 4px; align-self: stretch; display: block; }
.service-body { display: block; min-width: 0; }
.service-name { display: block; font-family: var(--font-head); font-size: 22px; font-weight: 500; line-height: 1.15; margin: 0 0 4px; }
.service-desc { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.service-meta { display: block; font-size: 13px; color: var(--muted); }
.service-price { text-align: right; white-space: nowrap; }
.service-price strong { display: block; font-family: var(--font-head); font-size: 24px; font-weight: 600; color: var(--rose-ink); }
.service-price small { color: var(--muted); font-size: 12px; }
.service-deposit { margin-top: 6px; font-size: 12.5px; }
.skeleton { height: 88px; border-radius: 14px; background: linear-gradient(90deg, var(--nude-deep), #faf5f1, var(--nude-deep)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Calendar -------------------------------------------------------------- */
.calendar { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fffdfb; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-month { font-family: var(--font-head); font-size: 22px; font-weight: 500; text-transform: capitalize; }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--rose-ink); }
.cal-nav[disabled] { opacity: .3; cursor: default; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekdays span { text-align: center; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; background: transparent; font: inherit; font-size: 15px;
  display: grid; place-items: center; position: relative; color: var(--ink); cursor: pointer;
}
.cal-day.is-available { background: var(--rose-light); border-color: #eccfcb; font-weight: 500; }
.cal-day.is-available:hover { background: #efd0cc; }
.cal-day.is-available::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.cal-day.is-selected, .cal-day.is-selected:hover { background: var(--rose-ink); color: #fff; border-color: var(--rose-ink); }
.cal-day.is-selected::after { background: #fff; }
.cal-day[disabled] { color: #c9bfba; cursor: default; }
.cal-day.is-empty { visibility: hidden; }
.cal-loading { opacity: .5; pointer-events: none; }

.slots { margin-top: 18px; }
.slots-title { font-family: var(--font-head); font-size: 20px; margin: 0 0 10px; }
.slots-group { margin-bottom: 14px; }
.slots-group h4 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; font-weight: 500; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  padding: 10px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; color: var(--ink);
  transition: all .15s;
}
.slot:hover { border-color: var(--rose); background: var(--rose-light); }
.slot.is-selected { background: var(--rose-ink); border-color: var(--rose-ink); color: #fff; }
/* Créneau soumis à acompte : pastille « acompte » (le montant est rappelé dans le récapitulatif) */
.slot.has-deposit { position: relative; padding-bottom: 18px; }
.slot.has-deposit::after { content: 'acompte'; position: absolute; left: 0; right: 0; bottom: 3px; font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; }
.slots-legend { font-size: 13px; color: var(--muted, #777); margin: 4px 0 0; }
.slots-empty { color: var(--muted); font-size: 14px; }

/* Forms ----------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 300; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fffdfb;
  font: inherit; font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-light); outline: none; }
input.is-invalid, textarea.is-invalid { border-color: var(--error); }
textarea { resize: vertical; min-height: 84px; }
.field-help { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.field-hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.field-error { font-size: 13px; color: var(--error); margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.field-check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.field-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--rose-ink); }
.field-check label { font-weight: 300; margin: 0; font-size: 15px; }
.field-check .field-error { grid-column: 2; }
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.terms { background: var(--nude); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--muted); margin: -6px 0 16px; }

/* Summary --------------------------------------------------------------- */
.summary, .side-summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; }
.summary dt, .side-summary dt { color: var(--muted); font-size: 14px; }
.summary dd, .side-summary dd { margin: 0; font-weight: 500; }
.summary .total { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.summary .total strong { font-family: var(--font-head); font-size: 28px; color: var(--rose-ink); }
.secure-note { font-size: 13px; color: var(--muted); text-align: center; margin: 18px 0 0; }
.turnstile { margin: 12px 0; }
.side-summary { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-summary h3 { font-size: 20px; margin-bottom: 12px; }
@media (max-width: 899px) { .side-summary { display: none !important; } }

/* Result pages ---------------------------------------------------------- */
.result { text-align: center; max-width: 620px; margin: 0 auto; }
.result-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 32px; }
.result-icon.ok { background: var(--success-bg); color: var(--success); }
.result-icon.wait { background: var(--gold-light); color: #8b6a2b; }
.result-icon.ko { background: var(--error-bg); color: var(--error); }
.result h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 8px; }
.result .lead { margin-top: 8px; }
.booking-card { text-align: left; background: var(--nude); border-radius: 14px; padding: 18px 20px; margin: 22px 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.booking-card dt { color: var(--muted); }
.booking-card dd { margin: 0; font-weight: 500; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--rose-ink); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.cancel-form { flex-direction: column; align-items: stretch; margin-top: 18px; }
.field-check-center { justify-content: center; grid-template-columns: 22px auto; }
.policy-box { background: var(--gold-light); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: #6f5a2c; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
