/* ==========================================================================
   Nuba Partners — Page « Confier une créance » (formulaire en 3 étapes)
   S'appuie sur les tokens de styles.css
   ========================================================================== */

.btn--navy { background: var(--navy); color: var(--white); box-shadow: var(--shadow-card); }
.btn--navy:hover { background: var(--navy-deep); box-shadow: var(--shadow-float), inset 0 0 0 1px var(--gold-hairline); }
.btn--ghost { background: transparent; color: var(--slate); padding-inline: 0.75rem; }
.btn--ghost:hover { color: var(--navy); }
.btn--ghost:hover svg { transform: translateX(-3px); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }
.icon-flip { transform: scaleX(-1); }

/* ---------- En-tête de page ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + var(--space-xl)) 0 var(--space-xl);
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(201, 162, 39, 0.09), transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--hairline);
}
.page-hero .rings { top: 30px; right: -90px; width: 380px; height: 380px; opacity: 0.045; }
.page-hero__inner { position: relative; display: flex; flex-direction: column; gap: var(--space-md); max-width: 60rem; }
.page-hero .display { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.page-hero .lead { max-width: 46rem; }

.trust-cards { display: grid; gap: var(--space-md); margin-top: var(--space-md); }
@media (min-width: 768px) { .trust-cards { grid-template-columns: repeat(3, 1fr); } }
.trust-card {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.trust-card__icon {
  width: 40px; height: 40px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(201, 162, 39, 0.1);
  color: var(--gold-text);
}
.trust-card__icon svg { width: 20px; height: 20px; }
.trust-card strong { display: block; font-size: 14px; color: var(--navy); }
.trust-card span { font-size: 13px; color: var(--slate); }

/* ---------- Stepper ---------- */
.workspace { padding-block: var(--space-xl) var(--space-2xl); }
@media (min-width: 768px) { .workspace { padding-block: var(--space-2xl) var(--space-3xl); } }

.stepper {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  margin-bottom: var(--space-xl);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  list-style: none;
}
@media (min-width: 768px) {
  .stepper { grid-template-columns: repeat(3, 1fr); padding: 1rem; gap: 1rem; }
}
.stepper__item { position: relative; }
@media (min-width: 768px) {
  .stepper__item:not(:last-child)::after {
    content: "";
    position: absolute; top: 50%; right: -0.75rem;
    width: 0.5rem; height: 1px;
    background: var(--hairline);
  }
}
.stepper__btn {
  width: 100%;
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  color: inherit;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.stepper__btn:disabled { cursor: default; opacity: 0.55; }
.stepper__btn:not(:disabled):hover { background: var(--cream); }
.stepper__num {
  width: 38px; height: 38px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--slate);
  font-weight: 700; font-size: 14px;
  transition: background-color 0.2s, color 0.2s;
}
.stepper__num svg { width: 18px; height: 18px; display: none; }
.stepper__text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.stepper__kicker { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); }
.stepper__label { font-size: 14px; font-weight: 600; color: var(--navy); }

.stepper__item.is-current .stepper__btn { background: var(--cream); border-color: rgba(201, 162, 39, 0.45); opacity: 1; }
.stepper__item.is-current .stepper__num { background: var(--navy); color: var(--white); box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.25); }
.stepper__item.is-current .stepper__kicker { color: var(--gold-text); }
.stepper__item.is-done .stepper__num { background: var(--gold); color: var(--navy-deep); }
.stepper__item.is-done .stepper__num svg { display: block; }
.stepper__item.is-done .stepper__num span { display: none; }
.stepper__item.is-done .stepper__kicker { color: var(--gold-text); }

/* ---------- Grille formulaire / aside ---------- */
.workspace__grid { display: grid; gap: var(--gutter); align-items: start; }
@media (min-width: 1024px) { .workspace__grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }

.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.form-card { padding: var(--space-lg); }
@media (min-width: 768px) { .form-card { padding: var(--space-xl); } }

.panel { display: flex; flex-direction: column; gap: var(--space-xl); }
.panel[hidden] { display: none; }
.panel__head { display: flex; flex-direction: column; gap: 0.4rem; padding-bottom: var(--space-md); border-bottom: 1px solid var(--hairline); }
.panel__kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); }
.panel__head p { color: var(--slate); }
.panel__head h2:focus { outline: none; }

.subsection { display: flex; flex-direction: column; gap: var(--space-md); }
.subsection--tinted { padding: var(--space-lg); background: var(--cream); border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.subsection__title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 14.5px; font-weight: 600; color: var(--navy);
}
.subsection__title svg { width: 18px; height: 18px; color: var(--gold-text); }
.subsection__title small { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }

/* ---------- Champs ---------- */
.fields { display: grid; gap: var(--space-md); }
@media (min-width: 640px) { .fields--2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--slate);
}
.field__label abbr { text-decoration: none; color: var(--gold-text); }
.field__hint { font-size: 12.5px; color: var(--slate); }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  border: 1px solid rgba(90, 100, 120, 0.28);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 18px;
}
.input::placeholder, .textarea::placeholder { color: #8b93a3; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(90, 100, 120, 0.45); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1);
}
.field__error { font-size: 12.5px; font-weight: 500; color: #b3261e; }
.field__error:empty { display: none; }

.form-alert {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: #fdf0ef;
  border: 1px solid rgba(179, 38, 30, 0.25);
  color: #8c1d18;
  font-size: 14px;
}
.form-alert[hidden] { display: none; }
.form-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* ---------- Choix (radios en cartes) ---------- */
.choices { display: grid; gap: 0.6rem; }
@media (min-width: 640px) {
  .choices--2, .choices--4 { grid-template-columns: 1fr 1fr; }
  .choices--3 { grid-template-columns: repeat(3, 1fr); }
}

.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__box {
  height: 100%;
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  background: var(--white);
  border: 1px solid rgba(90, 100, 120, 0.25);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  position: relative;
}
.choice__box::before {
  content: "";
  position: absolute; left: 0.95rem; top: 1.05rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(90, 100, 120, 0.5);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.choice:hover .choice__box { border-color: rgba(201, 162, 39, 0.6); }
.choice input:checked + .choice__box {
  border-color: var(--gold);
  background: #fffdf6;
  box-shadow: 0 0 0 1px var(--gold);
}
.choice input:checked + .choice__box::before { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--gold); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice__title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 14.5px; font-weight: 600; color: var(--navy); }
.choice__desc { font-size: 13px; color: var(--slate); line-height: 1.45; }

.tag {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.tag--gold { background: rgba(201, 162, 39, 0.16); color: var(--gold-text); border: 1px solid rgba(201, 162, 39, 0.3); }
.tag--navy { background: rgba(27, 42, 74, 0.07); color: var(--navy); border: 1px solid rgba(27, 42, 74, 0.18); }
.tag--terra { background: rgba(184, 107, 74, 0.12); color: #8f4a2c; border: 1px solid rgba(184, 107, 74, 0.3); }
.tag--muted { background: var(--cream-deep); color: var(--slate); }

/* ---------- Simulateur ---------- */
.simulator {
  display: flex; flex-direction: column; gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
.simulator__top { display: flex; flex-direction: column; gap: var(--space-md); }
@media (min-width: 640px) { .simulator__top { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.amount-input { position: relative; min-width: 0; }
@media (min-width: 640px) { .amount-input { width: 280px; flex-shrink: 0; } }
.amount-input .input {
  height: 56px;
  padding-right: 4.5rem;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.amount-input__unit {
  position: absolute; right: 1rem; top: 28px; transform: translateY(-50%);
  font-size: 13px; font-weight: 700; color: var(--gold-text);
  pointer-events: none;
}

.range { width: 100%; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; --fill: 20%; }
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) var(--fill), #e4ddcc var(--fill));
}
.range::-moz-range-track { height: 6px; border-radius: 999px; background: #e4ddcc; }
.range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--gold); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -9px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(15, 26, 46, 0.3);
  transition: transform 0.15s;
}
.range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(15, 26, 46, 0.3);
}
.range:hover::-webkit-slider-thumb { transform: scale(1.1); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.4); }
.range__scale { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--slate); }

.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.presets__label { font-size: 12.5px; color: var(--slate); margin-right: 0.25rem; }
.preset {
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid rgba(90, 100, 120, 0.25);
  background: var(--white);
  font-size: 13px; font-weight: 600;
  color: var(--navy);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.preset:hover { border-color: var(--gold); }
.preset[aria-pressed="true"] { border-color: var(--gold); background: rgba(201, 162, 39, 0.14); color: var(--gold-text); }

.results { display: grid; gap: var(--space-md); }
@media (min-width: 768px) { .results { grid-template-columns: repeat(3, 1fr); } }
.result {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.result--navy { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.result__label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); }
.result--navy .result__label { color: var(--gold-light); }
.result__value {
  display: block; margin-top: 0.35rem;
  font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.result--navy .result__value { color: var(--white); }
.result__value--gold { color: var(--gold-text); }
.result__foot { padding-top: 0.6rem; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--slate); }
.result--navy .result__foot { border-top-color: rgba(255, 255, 255, 0.12); color: var(--muted-on-dark); }

.notice {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.85rem 1rem;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: var(--radius);
  font-size: 13px; line-height: 1.5; color: var(--navy);
}
.notice svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--gold-text); }
.notice--warn { background: #fdf6ec; border-color: rgba(184, 107, 74, 0.35); }
.notice--warn svg { color: #8f4a2c; }
.notice[hidden] { display: none; }

/* ---------- Dépôt de fichiers ---------- */
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  background: var(--cream);
  border: 2px dashed rgba(201, 162, 39, 0.45);
  border-radius: var(--radius-lg);
  transition: background-color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-dragover { background: #fbf6e8; border-color: var(--gold); }
.dropzone:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--gold-text);
  box-shadow: var(--shadow-card);
}
.dropzone__icon svg { width: 28px; height: 28px; }
.dropzone strong { font-size: 15px; color: var(--navy); }
.dropzone strong u { color: var(--gold-text); text-underline-offset: 3px; }
.dropzone p { font-size: 13px; color: var(--slate); max-width: 30rem; }

.doc-checklist { display: grid; gap: 0.6rem; }
@media (min-width: 768px) { .doc-checklist { grid-template-columns: repeat(3, 1fr); } }
.doc-checklist li {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--white);
}
.doc-checklist__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 13px; font-weight: 600; color: var(--navy); }
.doc-checklist p { font-size: 12.5px; color: var(--slate); line-height: 1.4; }

.file-list { display: flex; flex-direction: column; gap: 0.5rem; }
.file-list:empty { display: none; }
.file {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.file__icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--navy); color: var(--gold-light);
}
.file__icon svg { width: 18px; height: 18px; }
.file__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file__name { font-size: 14px; font-weight: 500; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__size { font-size: 12px; color: var(--slate); }
.file__remove {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--slate);
}
.file__remove:hover { background: #fdf0ef; color: #b3261e; }
.file__remove svg { width: 18px; height: 18px; }

/* ---------- Récapitulatif ---------- */
.recap {
  position: relative; overflow: hidden;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--cream);
}
@media (min-width: 768px) { .recap { padding: var(--space-xl); } }
.recap .rings { right: -40px; bottom: -50px; width: 220px; height: 220px; opacity: 0.06; color: var(--cream); }
.recap__head {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-light);
}
.recap__head span:last-child { color: var(--muted-on-dark); }
.recap__grid { position: relative; display: grid; gap: var(--space-md); margin: 0; }
@media (min-width: 640px) { .recap__grid { grid-template-columns: 1fr 1fr; } }
.recap dt { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-on-dark); }
.recap dd { margin: 0.2rem 0 0; font-size: 15px; font-weight: 600; color: var(--white); overflow-wrap: anywhere; }
.recap dd small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted-on-dark); }
.recap dd.recap__amount { font-size: 1.35rem; font-weight: 800; color: var(--gold); letter-spacing: -0.01em; }

/* ---------- Mandat ---------- */
.mandate {
  max-height: 220px;
  overflow-y: auto;
  padding: 1rem 1.1rem;
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.6; color: var(--slate);
}
.mandate:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mandate h4 { margin: 0 0 0.25rem; font-size: 14px; font-weight: 600; color: var(--navy); }
.mandate p { margin: 0; }
.mandate p + h4 { margin-top: 0.9rem; }
.mandate strong { color: var(--navy); }

.consents { display: flex; flex-direction: column; gap: 0.75rem; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--text); }
.check input {
  flex-shrink: 0;
  width: 20px; height: 20px; margin: 1px 0 0;
  accent-color: var(--navy);
  cursor: pointer;
}
.check a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Signature ---------- */
.sign { display: flex; flex-direction: column; gap: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--hairline); }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--hairline); }
.tabs button {
  padding: 0.6rem 0.9rem;
  background: none; border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 14px; font-weight: 500; color: var(--slate);
}
.tabs button[aria-selected="true"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--gold); }
.tabs button:hover { color: var(--navy); }

.sign-pad {
  position: relative;
  height: 190px;
  background: var(--white);
  border: 1px solid rgba(90, 100, 120, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 3px rgba(15, 26, 46, 0.05);
  overflow: hidden;
}
.sign-pad[aria-invalid="true"] { border-color: #b3261e; }
.sign-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sign-pad__line { position: absolute; left: 1.25rem; right: 1.25rem; bottom: 48px; border-bottom: 1px dashed rgba(90, 100, 120, 0.35); pointer-events: none; }
.sign-pad__placeholder {
  position: absolute; inset: 0 0 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #9aa1af;
  pointer-events: none;
}
.sign-pad.has-ink .sign-pad__placeholder { display: none; }
.sign-pad__typed {
  position: absolute; inset: 0 1.25rem 48px;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 0.25rem;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic; font-size: 2.1rem;
  color: var(--navy);
  pointer-events: none;
  overflow: hidden; white-space: nowrap;
}
.sign-pad__meta {
  position: absolute; left: 1.25rem; right: 1.25rem; bottom: 12px;
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 12px; color: var(--slate);
  pointer-events: none;
}
.sign-pad__meta strong { color: var(--navy); font-weight: 600; }
.sign__actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 12.5px; color: var(--slate); }
.link-btn { background: none; border: 0; padding: 0.25rem 0; font-size: 13px; font-weight: 600; color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--navy); }
.sign[data-mode="typed"] canvas,
.sign[data-mode="typed"] .sign-pad__placeholder,
.sign[data-mode="typed"] .link-btn { display: none; }
.sign[data-mode="draw"] .sign-pad__typed { display: none; }

/* ---------- Navigation du formulaire ---------- */
.form-nav {
  display: flex; flex-direction: column-reverse; gap: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--hairline);
}
@media (min-width: 640px) { .form-nav { flex-direction: row; justify-content: space-between; align-items: center; } }
.form-nav--end { justify-content: flex-end; }
.form-nav .btn { width: 100%; }
@media (min-width: 640px) { .form-nav .btn { width: auto; } }
.form-foot { margin-top: -0.5rem; font-size: 12.5px; color: var(--slate); }
@media (min-width: 640px) { .form-foot { text-align: right; } }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(15, 26, 46, 0.25);
  border-top-color: var(--navy-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Succès ---------- */
.success {
  display: flex; flex-direction: column; gap: var(--space-md);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--cream);
  position: relative; overflow: hidden;
}
@media (min-width: 768px) { .success { padding: var(--space-2xl); } }
.success[hidden] { display: none; }
.success .rings { right: -50px; bottom: -60px; width: 260px; height: 260px; opacity: 0.06; color: var(--cream); }
.success > *:not(.rings) { position: relative; }
.success__icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--gold); color: var(--navy-deep);
}
.success__icon svg { width: 28px; height: 28px; }
.success h2 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--white); }
.success h2:focus { outline: none; }
.success p { color: var(--muted-on-dark); max-width: 38rem; }
.success__ref { display: inline-flex; padding: 0.4rem 0.8rem; border-radius: var(--radius); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--gold-hairline); font-weight: 700; letter-spacing: 0.04em; color: var(--gold-light); width: fit-content; }
.success ol { margin: 0; padding-left: 1.2rem; color: var(--cream); display: flex; flex-direction: column; gap: 0.4rem; font-size: 14.5px; }
.success .btn { width: fit-content; }

/* ---------- Aside ---------- */
.aside { display: flex; flex-direction: column; gap: var(--space-lg); }
@media (min-width: 1024px) { .aside { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.aside-card { padding: var(--space-lg); }
.aside-card__kicker { display: block; margin-bottom: 0.5rem; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); }
.aside-card .h4 { margin-bottom: 0.4rem; }
.aside-card p { font-size: 14px; color: var(--slate); }

.team { display: flex; align-items: center; gap: 0.9rem; margin-bottom: var(--space-md); }
.team__mark {
  width: 56px; height: 56px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--gold-hairline);
  color: var(--navy);
}
.team__mark svg { width: 34px; height: 22px; }
.team strong { display: block; font-size: 15px; color: var(--navy); }
.team span { font-size: 13px; color: var(--slate); }
.quote-box {
  padding: 0.9rem 1rem;
  border-left: 2px solid var(--gold);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px; font-style: italic; line-height: 1.55; color: var(--slate);
}

.ledger {
  position: relative; overflow: hidden;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--cream);
  box-shadow: var(--shadow-float);
}
.ledger::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-light)); }
.ledger .rings { right: -40px; bottom: -40px; width: 180px; height: 180px; opacity: 0.06; color: var(--cream); }
.ledger__head { position: relative; display: flex; justify-content: space-between; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); }
.ledger__head span:last-child { color: var(--muted-on-dark); }
.ledger__big { position: relative; margin-top: var(--space-md); font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--gold); }
.ledger__sub { position: relative; margin-top: 0.4rem; font-size: 13px; color: var(--muted-on-dark); }
.ledger table { position: relative; width: 100%; margin-top: var(--space-md); border-collapse: collapse; font-size: 13px; }
.ledger th { padding: 0.4rem 0.5rem; text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-on-dark); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.ledger th:not(:first-child), .ledger td:not(:first-child) { text-align: right; }
.ledger td { padding: 0.55rem 0.5rem; color: var(--muted-on-dark); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.ledger td:not(:first-child) { font-weight: 700; color: var(--gold-light); }
.ledger tr.is-current td { background: rgba(201, 162, 39, 0.12); color: var(--white); }
.ledger tr.is-current td:first-child::after { content: " · votre cas"; font-size: 11px; color: var(--gold-light); }
.ledger__foot { position: relative; display: flex; gap: 0.5rem; align-items: center; margin-top: var(--space-md); padding: 0.6rem 0.75rem; border-radius: var(--radius); background: rgba(255, 255, 255, 0.06); font-size: 12.5px; color: var(--muted-on-dark); }
.ledger__foot svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--gold); }

.phone-link { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.phone-link svg { width: 20px; height: 20px; color: var(--gold-text); }
.phone-link:hover { color: var(--gold-text); }

.faq details { border-top: 1px solid var(--hairline); }
.faq details:first-of-type { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.85rem 0;
  font-size: 14px; font-weight: 600; color: var(--navy);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--slate); transition: transform 0.2s; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding-bottom: 0.9rem; font-size: 13.5px; line-height: 1.55; }

.nav__link[aria-current="page"] { color: var(--navy); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* ==========================================================================
   Améliorations UI/UX (design-system/MASTER.md)
   ========================================================================== */

/* 16 px minimum : évite le zoom automatique d’iOS au focus */
.input, .select, .textarea { font-size: 16px; }

/* Libellés jamais sous 11 px */
.tag { font-size: 11px; }
.stepper__kicker, .result__label, .recap dt, .ledger th { font-size: 11px; }

/* Champ piège anti-robots, hors écran */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fieldsets neutres */
.panel, .choices-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices-group legend { margin-bottom: 0.5rem; padding: 0; }
.field__label--strong { color: var(--navy); }

.phone-hours { margin-top: 0.25rem; font-size: 13px; }
.form-alert p { margin: 0; }
.form-alert p + p { margin-top: 0.35rem; font-size: 13px; }
.form-alert a { color: inherit; text-decoration: underline; }
.success__ref span { margin-left: 0.35rem; }

/* Cibles tactiles ≥ 44 px */
.preset { min-height: 44px; }
.link-btn { min-height: 44px; }
.file__remove { width: 44px; height: 44px; }

/* Profil du créancier : champs propres aux entreprises masqués pour un particulier */
[data-profil][hidden] { display: none; }
