/* Contact — refonte du 1er octobre 2026. */

:root {
  --ct-paper-accent: #69598f;
  --ct-paper-bar: #f6f6fa;
  --ct-paper-dots: #dcd9e4;
  --ct-paper-stamp: #f6f4fb;
  --ct-paper-stamp-line: #b9b0d3;
  --ct-paper-shadow: #1d1a2826;
  --ct-paper-ruling: #efedf3;
  --ct-secondary-text: color-mix(in srgb, var(--muted) 85%, var(--text));
}


/* ---------- Commun aux pages intérieures ---------- */
html { scroll-padding-top: 96px; }

/* ---------- 1. Ouverture ---------- */
.ctx-hero { position: relative; isolation: isolate; overflow-x: clip; padding-block: clamp(32px, 5vw, 72px) clamp(56px, 7vw, 96px); }
.ctx-hero::before {
  content: ''; position: absolute; z-index: -1; left: -10%; top: 0; width: min(900px, 90vw); height: 90%;
  border-radius: 50%; pointer-events: none; filter: blur(10px);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 13%, transparent), transparent);
}
.ctx-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(40px, 5vw, 80px); align-items: center; }
.ctx-hero-copy { display: grid; gap: 26px; justify-items: start; }
.ctx-hero-copy .kicker { margin-bottom: -4px; }
.ctx-hero .lede { color: var(--ct-secondary-text); }
.ctx-hero h1 { font-size: clamp(44px, 5.4vw, 78px); line-height: 1; letter-spacing: -0.02em; }

/* Le salon, et l’adresse posée dessus comme un cartel */
.ctx-scene { position: relative; padding-bottom: 56px; }
.ctx-scene-photo { border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 11; box-shadow: var(--shadow-soft); background: var(--stage); animation: rise .9s cubic-bezier(.2,.7,.2,1) .16s both; }
.ctx-scene-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }
.ct-direct {
  position: absolute; left: clamp(-32px, -2vw, -12px); bottom: 0; width: min(360px, 74%);
  font-style: normal; display: grid; gap: 2px; justify-items: start;
  background: var(--paper); color: var(--ink); border-radius: 4px; padding: 20px 22px 16px;
  box-shadow: var(--shadow-paper); animation: hang .7s cubic-bezier(.2,.7,.2,1) .5s both;
}
.ct-direct-label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 500; }
.ct-mail {
  font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; color: var(--ct-paper-accent);
  text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; overflow-wrap: anywhere;
  margin-bottom: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--ink-line); width: 100%;
}
.ct-mail:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ct-direct :focus-visible { outline-color: var(--ct-paper-accent); }
.ct-direct-line { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); min-height: 30px; }
.ct-direct-line svg { width: 17px; height: 17px; color: var(--ct-paper-accent); flex: none; }

/* ---------- 2. Formulaire et lettre préparée ---------- */
.ct-request { padding-bottom: var(--section); }
.ct-request-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: start; }

.ct-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-soft);
  padding: clamp(22px, 3.6vw, 48px); display: grid; gap: 28px; scroll-margin-top: 96px;
}
.ct-form-head { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.ct-form-head h2 { font-size: clamp(30px, 3vw, 42px); line-height: 1.08; }
.ct-form-head p { font-size: 14.5px; color: var(--muted); margin-top: 10px; }
.ct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 20px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label, .ct-choice legend { font-size: 14.5px; font-weight: 500; color: var(--text); }
.req { color: var(--accent); }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; line-height: 1.4;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 116px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--st-red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-red) 16%, transparent); }
.field input[aria-invalid="true"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.field-error { font-size: 13.5px; color: var(--st-red); display: flex; gap: 6px; align-items: flex-start; }
.field-error[hidden] { display: none; }
:root[data-theme="dark"] .field-error, :root[data-theme="dark"] .field input[aria-invalid="true"] { --st-red: color-mix(in srgb, var(--st-red-bg) 75%, var(--ink)); }

/* Les trois champs nécessaires d’abord, sur un fond légèrement teinté pour qu’on les repère */
.ct-fields .field:nth-child(-n+3) input { background: color-mix(in srgb, var(--wash) 60%, var(--bg)); }
.ct-fields .field:nth-child(-n+3) input:focus { background: var(--surface); }

.ct-choice { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.ct-choice legend { padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 15px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--bg); font-size: 14.5px; line-height: 1.3; color: var(--text);
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip span::before {
  content: ''; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--muted) 70%, transparent);
  transition: background-color .2s, border-color .2s;
}
.chip input[type="checkbox"] + span::before { border-radius: 5px; }
.chip:hover span { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.chip input:checked + span { background: var(--wash); border-color: var(--accent); color: var(--text); font-weight: 500; }
.chip input:checked + span::before { border-color: var(--accent); background: var(--accent); }
.chip input[type="checkbox"]:checked + span::after {
  content: ''; position: absolute; left: 18px; width: 10px; height: 6px;
  border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg);
}
.chip input[type="radio"]:checked + span::before { background: var(--surface); box-shadow: inset 0 0 0 4px var(--accent); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Le choix du lieu : deux grandes options, plutôt que deux pastilles */
.ct-choice:first-of-type .chips { display: grid; grid-template-columns: 1fr 1fr; }
.ct-choice:first-of-type .chip span { width: 100%; min-height: 54px; border-radius: 14px; padding: 12px 16px; font-size: 15px; }

.ct-export { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 18px 20px; border-radius: 14px; background: var(--wash); cursor: pointer; border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); }
.ct-export input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.ct-export span { font-size: 14.5px; color: var(--ct-secondary-text); line-height: 1.45; }
.ct-export b { display: block; color: var(--text); font-weight: 500; font-size: 15px; }

.ct-submit { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px 22px; border-top: 1px solid var(--line); padding-top: 26px; }
.ct-submit .btn { min-height: 56px; padding-inline: 28px; font-size: 16px; border-radius: 14px; }
.ct-submit-note { font-size: 13.5px; color: var(--muted); line-height: 1.5; max-width: 40ch; }
.ct-status { font-size: 14.5px; color: var(--text); min-height: 0; }
.ct-status:empty { display: none; }
.ct-status:not(:empty) { padding: 12px 14px; border-radius: 12px; background: var(--wash); border-left: 3px solid var(--accent); }

/* La lettre préparée, posée sur un bureau */
.ct-preview { position: sticky; top: 96px; display: grid; gap: 16px; }
.ctx-desk {
  border-radius: 26px; padding: clamp(20px, 2.6vw, 32px) clamp(16px, 2.4vw, 30px) clamp(26px, 3vw, 38px);
  background:
    radial-gradient(70% 60% at 30% 0%, color-mix(in srgb, var(--surface) 70%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 30%, var(--stage)), var(--stage));
  display: grid; gap: 16px;
}
:root[data-theme="dark"] .ctx-desk { background: radial-gradient(70% 60% at 30% 0%, color-mix(in srgb, var(--paper) 9%, transparent), transparent 72%), linear-gradient(180deg, var(--surface), var(--stage)); }
.ct-preview-label { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 12px; }
.ct-preview-label::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.ct-mailcard { position: relative; background: var(--paper); color: var(--ink); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-paper); transition: box-shadow .3s; }
.ct-mail-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; background: var(--ct-paper-bar); border-bottom: 1px solid var(--ink-line); font-size: 12.5px; color: var(--ink-muted); }
.ct-mail-bar .app-dots i { background: var(--ct-paper-dots); }
/* Le timbre : le symbole Artosera dans un cadre dentelé */
.ctx-stamp {
  position: absolute; right: 18px; top: 58px; width: 54px; height: 64px; display: grid; place-items: center;
  background: var(--ct-paper-stamp); color: var(--ct-paper-accent); transform: rotate(4deg);
  outline: 1.5px dashed var(--ct-paper-stamp-line); outline-offset: -5px;
  box-shadow: 0 1px 2px var(--ct-paper-shadow);
}
.ctx-stamp svg { width: 30px; height: 38px; }
.ct-mail-head { padding: 8px 88px 0 22px; }
.ct-mail-head div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ink-line); font-size: 14px; }
.ct-mail-head dt { color: var(--ink-muted); }
.ct-mail-head dd { font-weight: 500; overflow-wrap: anywhere; }
.ct-mail-body {
  margin: 0; padding: 20px 22px 28px; font-family: var(--sans); font-size: 15px; line-height: 1.65; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere; min-height: 300px; max-height: 520px; overflow: auto;
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(1.65em - 1px), var(--ct-paper-ruling) calc(1.65em - 1px) 1.65em);
  background-position: 0 0; background-origin: content-box; background-clip: content-box;
}
.ct-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; align-items: center; padding-inline: 4px; }
.ct-copy-note { font-size: 13px; color: var(--ct-secondary-text); }

/* ---------- 3. Ce qui se passe ensuite : la frise ---------- */
.ct-next { background: var(--wash); }
.ct-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.ct-step { position: relative; padding: 46px 28px 0 0; display: grid; gap: 8px; align-content: start; }
.ct-step::before { /* le trait jusqu’à l’étape suivante */
  content: ''; position: absolute; left: 22px; right: 0; top: 10px; height: 0;
  border-top: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
}
.ct-step.is-gate::before, .ct-step.is-gate ~ .ct-step::before { border-top-style: solid; border-top-color: var(--accent); }
.ct-step:last-child::before { right: 30%; border-top-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.ct-step::after { /* le point de l’étape */
  content: ''; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--wash); border: 2px solid var(--accent); box-sizing: border-box;
}
.ct-step.is-now::after { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 20%, transparent); }
.ct-step.is-gate::after { background: var(--surface); width: 22px; height: 22px; border-radius: 6px; transform: rotate(45deg) scale(.86); }
.ct-step-n { font-family: var(--serif); font-size: 15px; letter-spacing: .08em; color: var(--accent); }
.ct-step h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 2.2vw, 30px); line-height: 1.1; }
.ct-next .lede { color: var(--ct-secondary-text); }
.ct-step p { color: var(--ct-secondary-text); font-size: 15.5px; max-width: 28ch; }
.ct-more { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: clamp(40px, 5vw, 64px); padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); }

/* ---------- Mouvement ---------- */
.ctx-hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.ctx-hero-copy > :nth-child(2) { animation-delay: .06s; }
.ctx-hero-copy > :nth-child(3) { animation-delay: .12s; }
.ct-preview:focus-within .ct-mailcard, .ct-request-grid:focus-within .ct-mailcard { box-shadow: var(--shadow-paper), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- Adaptations ---------- */
@media (max-width: 1020px) {
  .ctx-hero-grid, .ct-request-grid { grid-template-columns: minmax(0, 1fr); }
  .ctx-scene { max-width: 680px; width: 100%; margin-left: auto; }
  .ct-direct { left: -8px; }
  .ct-preview { position: static; max-width: 620px; }
  .ct-mail-body { min-height: 0; }
  .ct-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .ct-step:nth-child(2)::before { right: 30%; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 76px; }
  .ctx-scene { padding-bottom: 0; }
  .ctx-scene-photo { aspect-ratio: 16 / 10; border-radius: 18px; }
  .ct-direct { position: relative; left: auto; bottom: auto; width: calc(100% - 24px); margin: -48px 0 0 12px; padding: 16px 18px 12px; }

  .ct-form { border-radius: 20px; padding: 22px 16px 24px; gap: 24px; scroll-margin-top: 76px; }
  .ct-fields { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ct-choice:first-of-type .chips { grid-template-columns: minmax(0, 1fr); }
  .ct-submit { grid-template-columns: minmax(0, 1fr); }
  .ct-submit .btn { width: 100%; }
  .ctx-desk { border-radius: 20px; padding: 18px 12px 22px; }
  .ctx-stamp { width: 44px; height: 52px; right: 12px; top: 54px; }
  .ctx-stamp svg { width: 20px; height: 26px; }
  .ct-mail-head { padding: 4px 66px 0 16px; }
  .ct-mail-body { padding: 16px 16px 20px; font-size: 14px; }
  .ct-copy { grid-template-columns: minmax(0, 1fr); justify-items: start; }

  .ct-steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .ct-step { padding: 0 0 30px 44px; }
  .ct-step::before, .ct-step:nth-child(2)::before, .ct-step:last-child::before {
    left: 10px; right: auto; top: 22px; bottom: 0; height: auto; width: 0;
    border-top: 0; border-left: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .ct-step.is-gate::before, .ct-step.is-gate ~ .ct-step::before { border-left-style: solid; border-left-color: var(--accent); }
  .ct-step:last-child::before { display: none; }
  .ct-step:last-child { padding-bottom: 0; }
  .ct-step h3 { font-size: 24px; }
  .ct-step p { max-width: none; }
}
