:root {
  --red: #cf2f3b;
  --red-dark: #b41f2a;
  --red-soft: #fff1f2;
  --ink: #20242a;
  --muted: #69707d;
  --line: #e2e5ea;
  --bg: #f7f5f2;
  --card: #ffffff;
  --gold: #9c7a39;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body.embed { background: transparent; }
body.embed .top, body.embed .foot { display: none; }
body.embed main { padding: 0 2px 16px; }
body.embed .steps { margin-top: 0; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

.top {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 8px;
}
.logo { height: 56px; width: auto; border-radius: 8px; }
.logo-partner { height: 104px; width: auto; margin-left: auto; mix-blend-mode: multiply; } /* le blanc du JPG se fond dans le fond de la page */
.eyebrow { margin: 0; color: var(--gold); font-size: 13px; letter-spacing: .02em; }
h1 { margin: 2px 0 0; font-size: 28px; }
h2 { font-size: 20px; margin: 8px 0 16px; }

main { max-width: 980px; margin: 0 auto; padding: 8px 16px 40px; }

.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 16px 0;
  counter-reset: step;
  flex-wrap: wrap;
}
.steps li { counter-increment: step; }
.steps button {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.steps button::before { content: counter(step) ". "; }
.steps button:disabled { cursor: default; opacity: .7; }
.steps button.done { color: var(--red-dark); border-color: var(--red); cursor: pointer; }
.steps button.done:hover { background: var(--red-soft); }
.steps button.active { color: #fff; background: var(--red); border-color: var(--red); opacity: 1; }

.back-top {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-dark);
  background: none;
  border: 0;
  padding: 0 0 10px;
  cursor: pointer;
}
.back-top:hover { text-decoration: underline; }

.summary {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 14px;
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cards-small { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.card {
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover, .card:focus-visible { border-color: var(--red); box-shadow: 0 8px 20px rgba(32,36,42,.08); outline: none; transform: translateY(-1px); }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card .duration { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--red-dark); background: var(--red-soft); border-radius: 999px; padding: 3px 10px; }
.card .icon { font-size: 22px; display: block; margin-bottom: 6px; }

.hint { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.status { color: var(--muted); margin: 12px 0; }
.status.error { color: var(--red-dark); }

.picker { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.days-nav { display: flex; align-items: center; gap: 8px; }
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; flex: 1; }
.nav { font: inherit; font-size: 22px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; flex: none; }
.nav:disabled { opacity: .3; cursor: default; }
.day {
  font: inherit;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
}
.day strong { display: block; font-size: 18px; }
.day.selected { background: var(--red); border-color: var(--red); color: #fff; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 16px; }
.time {
  font: inherit;
  padding: 10px 0;
  border: 1px solid var(--red);
  color: var(--red-dark);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.time:hover, .time:focus-visible { background: var(--red); color: #fff; outline: none; }

.force { margin-top: 20px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.force summary { font-weight: 600; cursor: pointer; }
.force-hint { color: var(--muted); font-size: 14px; margin: 10px 0 12px; }
.force-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 8px; }

form { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
}
input[readonly] { background: #f1f2f4; color: var(--muted); cursor: not-allowed; }
input:focus, textarea:focus { outline: 2px solid var(--red-soft); border-color: var(--red); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.consent input { width: auto; margin-top: 3px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 0; padding: 10px 12px; background: #fff8e8; border-radius: 8px; font-size: 14px; }
.error { color: var(--red-dark); font-size: 14px; min-height: 1em; }

.primary {
  font: inherit;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px 18px;
  cursor: pointer;
}
.primary:hover { background: var(--red-dark); }
.primary:disabled { opacity: .6; cursor: wait; }

.secondary {
  font: inherit;
  font-weight: 600;
  background: #fff;
  color: var(--red-dark);
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
}
.secondary:hover { background: var(--red-soft); }
.secondary:disabled, .primary:disabled { opacity: .6; cursor: wait; }
.manage-detail { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.manage-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }

.link { font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 12px 0; }
.link:hover { color: var(--red-dark); }

.done { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; text-align: center; }
.check { width: 56px; height: 56px; line-height: 56px; margin: 0 auto 8px; border-radius: 50%; background: #e6f4ed; color: #18865b; font-size: 28px; }
.done a { color: var(--red-dark); }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px; }

@media (max-width: 640px) {
  .top { align-items: flex-start; }
  .logo { height: 44px; }
  .logo-partner { height: 72px; }
  h1 { font-size: 23px; }
  .row { grid-template-columns: 1fr; }
  .days { grid-template-columns: repeat(3, 1fr); }
}

/* Motif interne (« Traitement dossier ») : visible seulement par le conseiller, distingué des motifs clients. */
.card.internal { border-style: dashed; background: #f7f7f8; }
