/* Section 13 lead form (#demande), owner S4 — design v5 sections/13-form.html.
   Caramel panel (.mc-panel--caramel) with a honey blob in its top right corner: the intro column (flex 1 1 380px,
   mascot + bubble from 760px wide) and the form card or its success state (flex 1.3 1 460px). */

.lead { padding: clamp(24px, 5vw, 72px) var(--mc-band-gutter); }

.lead-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 72px) clamp(18px, 5vw, 72px);
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(24px, 4vw, 64px);
}
.lead-blob {
  position: absolute;
  right: -120px;
  top: -160px;
  width: 480px;
  height: 460px;
  border-radius: 58% 42% 63% 37% / 45% 55% 45% 55%;
  background: var(--mc-honey);
  opacity: .7;
}

/* ---------------------------------------------------------------- intro column */
.lead-intro { position: relative; flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; }
.lead-intro__text { margin-top: 18px; max-width: 460px; }
.lead-mascot { margin-top: auto; padding-top: 32px; gap: 14px; }
.lead-mascot__img { flex: none; width: min(260px, 60%); }
.lead-mascot__img .mc-mascot { filter: drop-shadow(0 22px 22px rgba(46, 20, 8, .32)); }
.lead-bubble {
  margin-bottom: 120px;
  padding: 14px 18px;
  border-radius: 22px 22px 22px 6px;
  max-width: 200px;
}
@media (max-width: 759.98px) {
  .lead-mascot { display: none; }
}

/* ---------------------------------------------------------------- form card */
.lead-side { position: relative; flex: 1.3 1 460px; min-width: 0; }

.lead-form,
.lead-success {
  background: var(--mc-paper);
  border-radius: clamp(28px, 3vw, 40px);
  box-shadow: 0 40px 60px -36px rgba(46, 20, 8, .55);
}
.lead-form { padding: clamp(20px, 3.4vw, 40px); }
.lead-form[hidden],
.lead-success[hidden] { display: none; }

.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 4px 16px;
}
.lead-field { display: flex; flex-direction: column; min-width: 0; }
.lead-label { padding-left: 6px; font-weight: 700; font-size: 16px; }
.lead-label__hint { font-weight: 500; color: #6B4A35; }

.lead-input {
  margin-top: 8px;
  width: 100%;
  height: 58px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid rgba(46, 20, 8, .18);
  background: var(--mc-cream);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--mc-ink);
  outline: 2px solid transparent; /* shows in forced-colours mode, where the ring below doesn't */
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lead-input[type="tel"] { font-variant-numeric: tabular-nums; }
.lead-input.is-invalid { border-color: var(--mc-error); }
.lead-input:focus,
.lead-input:focus-visible {
  border-color: var(--mc-ink);
  box-shadow: 0 0 0 4px rgba(229, 154, 47, .35);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.lead-select { position: relative; margin-top: 8px; }
.lead-input--select {
  margin-top: 0;
  padding-right: 56px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
}
.lead-select__arrow {
  position: absolute;
  right: 26px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -8px;
  border-right: 2.5px solid var(--mc-ink);
  border-bottom: 2.5px solid var(--mc-ink);
  border-radius: 0 0 3px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

.lead-error {
  min-height: 24px;
  padding: 5px 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mc-error);
}
.lead-error--optional { min-height: 0; }
.lead-error--optional:empty { display: none; }

/* Honeypot: off screen (and aria-hidden in the template). */
.lead-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-actions { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.lead-submit {
  width: 100%;
  height: 62px;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  transition: transform .16s var(--mc-ease-out), background-color .2s ease, opacity .2s ease;
}
.lead-submit.is-sending { opacity: .7; cursor: progress; }
.lead-submit.is-sending:active { transform: none; }

.lead-privacy {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mc-text);
  text-align: center;
  text-wrap: pretty;
}
.lead-privacy a {
  display: inline-block;
  padding: 10px 2px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lead-send-error {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--mc-error);
  text-align: center;
}
.lead-send-error:not(:empty) { margin-top: 6px; }

/* ---------------------------------------------------------------- success state */
.lead-success {
  height: 100%;
  min-height: 420px;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: mcFade .2s ease-out both;
}
/* Focused by the script so screen readers read it; it isn't a control. */
.lead-success:focus { outline: none; }
.lead-success__mascot { width: min(220px, 60%); animation: mcSpring .5s var(--mc-ease-out) .05s both; }
.lead-success__mascot .mc-mascot { filter: none; }
.lead-success__title {
  margin: 16px 0 0;
  max-width: 100%;
  font-family: var(--mc-serif);
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.05;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.lead-success__text {
  margin: 12px auto 0;
  max-width: 420px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--mc-text);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
