/* Prise de rendez-vous Chez Soie : parcours en étapes. Couleurs : marine #224268, marine foncé #041B2C, rose poudré #E6BBAA, pêche #EC9B6A, rose pâle #F5E4DD */
.csrdv { --navy: #224268; --ink: #041b2c; --peach: #ec9b6a; --rose: #e6bbaa; --blush: #f5e4dd; --line: #eadad3; --muted: #5d6b78;
  max-width: 560px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: clip;
  font-size: 16px; line-height: 1.5; color: var(--ink); text-align: left; box-shadow: 0 1px 2px rgba(4,27,44,.04), 0 8px 28px rgba(4,27,44,.06); }
.csrdv.csrdv-in-slot { margin: 14px 0; max-width: none; }
.csrdv, .cs-body, .cs-screen { min-width: 0; }
.csrdv *, .csrdv *::before, .csrdv *::after { box-sizing: border-box; }
.csrdv button, .csrdv a.cs-btn, .csrdv a.cs-card { font-family: inherit !important; text-transform: none !important; letter-spacing: normal !important; text-shadow: none !important; box-shadow: none; margin: 0; -webkit-tap-highlight-color: transparent; }
.csrdv h2, .csrdv p { margin: 0; }
.csrdv-banner { background: #fdf1e9; color: #8a4b1f; font-size: 12px; letter-spacing: .04em; padding: 6px 16px; text-transform: uppercase; }

/* header + progress */
.cs-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px 6px; min-height: 46px; }
.csrdv .cs-back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; color: var(--navy); font-size: 15px; padding: 6px 8px; border-radius: 10px; cursor: pointer; line-height: 1; }
.csrdv .cs-back:hover { background: var(--blush); }
.cs-back .cs-i { width: 20px; height: 20px; }
.cs-step { font-size: 13px; color: var(--muted); padding-right: 6px; }
.cs-prog { height: 4px; background: var(--blush); margin: 0 18px; border-radius: 4px; overflow: hidden; }
.cs-prog i { display: block; height: 100%; width: 0; background: var(--peach); border-radius: 4px; transition: width .35s ease; }

/* body */
.cs-body { padding: 22px 18px 20px; min-height: 280px; }
.cs-screen.cs-anim { animation: csIn .25s ease; }
@keyframes csIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.csrdv .cs-h { font-size: 23px; line-height: 1.25; font-weight: 700; color: var(--navy); margin: 0 0 6px; letter-spacing: -.01em; text-transform: none; outline: none; }
.cs-sub { color: var(--muted); font-size: 15px; margin-bottom: 18px !important; }
.cs-q { font-weight: 700; font-size: 16px; margin: 18px 0 10px !important; color: var(--ink); }
.cs-trust { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #2f7a4a; margin-bottom: 4px !important; }
.cs-trust .cs-i { width: 16px; height: 16px; }
.cs-muted { color: var(--muted); }
.cs-small { font-size: 13px; color: var(--muted); margin-top: 16px !important; }
.cs-i { width: 22px; height: 22px; flex: none; }

/* choice cards */
.csrdv .cs-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 14px; margin: 0 0 10px; cursor: pointer; color: var(--ink); text-decoration: none; font-size: 16px; line-height: 1.35; transition: border-color .15s, background .15s, transform .1s; }
.csrdv .cs-card:hover { border-color: var(--rose); background: #fffaf8; }
.csrdv .cs-card:active { transform: scale(.99); }
.csrdv .cs-card.on { border-color: var(--navy); background: #fbf4f1; }
.cs-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--blush); color: var(--navy); display: flex; align-items: center; justify-content: center; flex: none; }
.cs-ct { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.csrdv .cs-ct b { font-weight: 700; color: var(--ink); font-size: 16px; line-height: 1.35; }
.csrdv .cs-ct small { font-size: 14px; color: var(--muted); line-height: 1.4; }
.csrdv .cs-day small, .csrdv .cs-btn small { line-height: 1.2; }
.cs-chev { width: 20px; height: 20px; color: #a9b3bd; }
.csrdv .cs-card.cs-call { border-style: dashed; }
.csrdv .cs-card.cs-call .cs-ic { background: #eef2f6; }

/* reason list */
.cs-list { border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; }
.csrdv .cs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 15px 14px; text-align: left; font-size: 16px; color: var(--ink); cursor: pointer; line-height: 1.3; border-radius: 0; }
.csrdv .cs-row:last-child { border-bottom: 0; }
.csrdv .cs-row:hover { background: #fffaf8; }
.csrdv .cs-row.on { background: #fbf4f1; font-weight: 700; color: var(--navy); }
.cs-other { margin-top: 14px; }

/* segmented answers */
.cs-qblock.cs-new { animation: csIn .25s ease; }
.cs-seg, .cs-filter { display: flex; gap: 8px; }
.csrdv .cs-seg button { flex: 1; min-height: 52px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; font-size: 16px; color: var(--ink); cursor: pointer; padding: 10px 6px; line-height: 1.2; }
.csrdv .cs-seg button:hover { border-color: var(--rose); }
.csrdv .cs-seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* time step */
.cs-filter { background: #f6f1ee; padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.csrdv .cs-filter button { flex: 1; background: transparent; border: 0; border-radius: 9px; padding: 9px 4px; font-size: 14px; color: var(--muted); cursor: pointer; line-height: 1.2; }
.csrdv .cs-filter button.on { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 1px 3px rgba(4,27,44,.12); }
.cs-strip { contain: inline-size; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 18px; padding: 2px 18px 8px; margin: 0 -18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cs-strip::-webkit-scrollbar { display: none; }
.csrdv .cs-day { flex: 0 0 auto; width: 62px; scroll-snap-align: start; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; color: var(--muted); line-height: 1.15; }
.cs-day small { font-size: 12px; }
.cs-day b { font-size: 20px; font-weight: 700; color: var(--ink); }
.csrdv .cs-day:hover { border-color: var(--rose); }
.csrdv .cs-day.on { background: var(--navy); border-color: var(--navy); color: var(--rose); }
.csrdv .cs-day.on b { color: #fff; }
.cs-dayname { font-weight: 700; margin: 14px 0 4px !important; }
.cs-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 0 8px !important; }
.cs-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.csrdv .cs-times button { min-height: 48px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; font-size: 16px; color: var(--ink); cursor: pointer; padding: 8px 4px; font-variant-numeric: tabular-nums; }
.csrdv .cs-times button:hover { border-color: var(--navy); }
.csrdv .cs-times button.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.cs-help { font-size: 14px; color: var(--muted); margin-top: 18px !important; }
.cs-help a { color: var(--navy); font-weight: 700; }
.cs-empty { text-align: center; padding: 18px 6px; color: var(--muted); }
.cs-empty .cs-i { width: 36px; height: 36px; color: var(--rose); margin-bottom: 8px; }
.cs-empty p { margin-bottom: 16px !important; }

/* notes + summary */
.cs-note { display: flex; gap: 10px; align-items: flex-start; background: #f7f3f1; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin: 0 0 16px; color: var(--ink); }
.cs-note .cs-i { width: 20px; height: 20px; color: var(--navy); margin-top: 1px; }
.cs-note.cs-warn { background: #fff; border: 1.5px solid var(--peach); }
.cs-sum { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; background: var(--blush); border-radius: 14px; padding: 13px 14px; font-size: 14px; line-height: 1.5; margin: 6px 0 18px; }
.cs-sum b { font-size: 15px; }
.csrdv .cs-link { background: none; border: 0; color: var(--navy); text-decoration: underline; font-size: 14px; cursor: pointer; padding: 2px 0; white-space: nowrap; }
.csrdv .cs-restart { display: block; margin: 14px auto 0; }

/* form */
.cs-form { display: flex; flex-direction: column; gap: 14px; }
.cs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #3c4b56; font-weight: 600; margin: 0; }
.csrdv .cs-field input, .csrdv .cs-field textarea { font: inherit; font-weight: 400; font-size: 16px; min-height: 50px; padding: 12px 14px; border: 1.5px solid #dccbc3; border-radius: 12px; background: #fff; color: var(--ink); width: 100%; margin: 0; box-shadow: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.csrdv .cs-field textarea { min-height: 0; resize: vertical; }
.csrdv .cs-field input[type=date] { display: block; }
.csrdv .cs-field input:focus, .csrdv .cs-field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(34,66,104,.15); outline: none; }
.csrdv .cs-field input.bad { border-color: #c4321f; }
.cs-field em, .cs-err-ok { font-style: normal; font-weight: 400; color: #b42318; font-size: 13px; }
.cs-field em:empty, .cs-err-ok:empty { display: none; }
.cs-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink); cursor: pointer; margin: 0; }
.csrdv .cs-check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--navy); }
.cs-priv { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cs-priv .cs-i { width: 15px; height: 15px; }
.csrdv [hidden] { display: none !important; }   /* the theme styles every button; keep hidden ones hidden */
.csrdv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* buttons */
.csrdv .cs-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 14px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; margin: 0 0 10px; transition: background .15s, transform .1s; }
.csrdv .cs-btn:hover { background: #f4f6f9; }
.csrdv .cs-btn:active { transform: scale(.99); }
.csrdv .cs-btn.cs-primary { background: var(--navy); color: #fff; }
.csrdv .cs-btn.cs-primary:hover { background: #1a3453; }
.csrdv .cs-btn:disabled { background: #e9edf1; border-color: #e9edf1; color: #8996a3; cursor: default; transform: none; }
.csrdv .cs-btn small { font-weight: 400; opacity: .85; font-size: 14px; }
.csrdv .cs-btn small::before { content: '·'; margin-right: 8px; }
.cs-btn .cs-i { width: 20px; height: 20px; }

/* sticky footer */
.cs-foot { display: none; }
.cs-foot.on { display: block; position: sticky; bottom: 0; z-index: 5; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
.cs-foot .cs-btn { margin: 0; }
.cs-who { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px !important; }

/* loading + done */
.cs-center { text-align: center; }
.cs-screen.cs-center { padding: 50px 0; }
.cs-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blush); border-top-color: var(--navy); margin: 0 auto 14px; animation: csSpin .8s linear infinite; }
@keyframes csSpin { to { transform: rotate(360deg); } }
.cs-ok { width: 68px; height: 68px; border-radius: 50%; background: #e6f2ea; color: #2f7a4a; display: flex; align-items: center; justify-content: center; margin: 4px auto 14px; animation: csPop .4s cubic-bezier(.2,1.4,.4,1); }
.cs-ok .cs-i { width: 34px; height: 34px; stroke-width: 2.4; }
.cs-ok.cs-wait { background: var(--blush); color: var(--navy); }
@keyframes csPop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.cs-when { font-size: 16px; line-height: 1.55; margin: 4px 0 20px !important; }
.cs-bring { background: #f7f3f1; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 8px; }
.cs-bring ul { margin: 6px 0 0; padding-left: 18px; }
.cs-bring li { margin: 2px 0; }

/* existing patient: recall */
.cs-hello { font-size: 15px; color: var(--muted); margin: 0 0 8px !important; }
.cs-sum.cs-plan { border-left: 4px solid var(--peach); margin: 0 0 20px; }
.cs-sum.cs-plan small { font-size: 13px; color: var(--muted); }
.cs-sum.cs-plan b { color: var(--navy); font-size: 16px; }
.cs-list.cs-sublist { margin: -4px 0 12px 14px; }
.cs-list.cs-new { animation: csIn .25s ease; }
.cs-note a { color: var(--navy); font-weight: 700; }
.cs-test { margin-top: 12px; font-size: 13px; background: #f4f6f9; border-radius: 12px; padding: 10px 12px; }
.cs-test summary { cursor: pointer; color: var(--navy); font-weight: 700; }
.cs-test pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; margin: 8px 0 0; background: none; padding: 0; border: 0; }

.csrdv button:focus-visible, .csrdv a:focus-visible, .csrdv input:focus-visible, .csrdv textarea:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cs-screen.cs-anim, .cs-qblock.cs-new, .cs-ok { animation: none; } .cs-prog i { transition: none; } }

/* phones: edge-to-edge widget, bigger title */
@media (max-width: 600px) {
  .csrdv { border-radius: 16px; margin: 12px 0; }
  .cs-body { padding: 20px 16px 18px; }
  .cs-strip { padding-left: 16px; padding-right: 16px; margin: 0 -16px; }
  .cs-prog { margin: 0 16px; }
  .cs-foot.on { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 380px) { .cs-two { grid-template-columns: 1fr; } .csrdv .cs-h { font-size: 21px; } }

/* page chrome on booking pages */
body.csrdv-page #csa-root { display: none !important; }   /* floating "Une question?" assistant */
body.csrdv-page #page-wrap { overflow: clip; }              /* theme's overflow:hidden would stop the sticky footer button */
.csrdv .cs-ct small, .csrdv .cs-day small { font-weight: 400; }
/* site booking page on phones: full-screen, app-like (no card, no theme gutters) */
@media (max-width: 600px) {
  body.csrdv-focus #content { padding-top: 0 !important; padding-bottom: 0 !important; }
  body.csrdv-focus #page-wrap { overflow: visible; }   /* let the widget run edge to edge */
  html:has(body.csrdv-focus), body.csrdv-focus { overflow-x: clip; }
  body.csrdv-focus .csrdv { width: 100vw; max-width: 100vw; margin: 0 calc(50% - 50vw); border: 0; border-radius: 0; box-shadow: none;
    min-height: calc(100vh - 90px); min-height: calc(100svh - 90px); display: flex; flex-direction: column; }
  body.csrdv-focus .cs-body { flex: 1; padding: 22px 20px 24px; }
  body.csrdv-focus .cs-head { padding: 12px 14px 8px 8px; }
  body.csrdv-focus .cs-prog { margin: 0 20px; }
  body.csrdv-focus .cs-strip { padding-left: 20px; padding-right: 20px; margin: 0 -20px; scroll-padding-inline: 20px; }
  body.csrdv-focus .cs-foot.on { padding-left: 20px; padding-right: 20px; }
  body.csrdv-focus .csrdv .cs-h { font-size: 26px; }
}
/* landing pages on phones: full-screen sheet once the patient starts (rdv.js moves the widget under <body>) */
.cs-hr { display: inline-flex; align-items: center; gap: 4px; }
.csrdv .cs-close { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; background: none; border: 0; border-radius: 10px; color: var(--navy); cursor: pointer; }
.csrdv .cs-close .cs-i { width: 22px; height: 22px; }
@media (max-width: 600px) {
  html.csrdv-lock, html.csrdv-lock body { overflow: hidden !important; }
  .csrdv.cs-overlay { position: fixed; inset: 0; z-index: 2147483000; width: auto; max-width: none; height: 100vh; height: 100dvh; margin: 0 !important;
    border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
  .csrdv.cs-overlay .cs-close { display: inline-flex; }
  .csrdv.cs-overlay .cs-head { padding: calc(10px + env(safe-area-inset-top)) 8px 8px 8px; }
  .csrdv.cs-overlay .cs-body { flex: 1; padding: 22px 20px 24px; }
  .csrdv.cs-overlay .cs-prog { margin: 0 20px; }
  .csrdv.cs-overlay .cs-strip { padding-left: 20px; padding-right: 20px; margin: 0 -20px; scroll-padding-inline: 20px; }
  .csrdv.cs-overlay .cs-foot.on { padding-left: 20px; padding-right: 20px; }
  .csrdv.cs-overlay .cs-h { font-size: 26px; }
  /* in the page, the form is replaced by a launcher card; booking itself happens full screen */
  body.csrdv-landing #csrdv:not(.cs-overlay) { display: none; }
  body.csrdv-landing .csrdv.cs-launch { display: block; }
  html:has(body.csrdv-landing), body.csrdv-landing { overflow-x: clip; }   /* the page's decorative drawings stick out sideways */
  body.csrdv-landing #cs-rdv { padding-left: 20px; padding-right: 20px; }   /* landing card: a little more room for the launcher */
}
.csrdv.cs-launch { display: none; padding: 14px; margin: 16px 0 14px; max-width: none; border-radius: 18px; }
.cs-launch-next { display: flex; gap: 12px; align-items: center; background: var(--blush); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px !important; }
.cs-launch-next .cs-i { width: 24px; height: 24px; color: var(--navy); flex: none; }
.cs-launch-next small { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.cs-launch-next b { display: block; font-size: 15px; color: var(--navy); line-height: 1.3; }
.csrdv.cs-launch .cs-btn.cs-primary { min-height: 54px; margin: 0; }
.cs-nw { white-space: nowrap; }
.cs-launch-trust { text-align: center; font-size: 12.5px; color: var(--muted); margin: 10px 0 0 !important; }
@media (max-width: 767px) { body.csrdv-focus #fullimagecenter.titlebar { display: none !important; } }
@media (min-width: 768px) { body.csrdv-focus #fullimagecenter.titlebar { max-height: 260px; overflow: hidden; } }
