/* The two forms, the thank-you page and the legal pages.
 *
 * A form is one rounded tile reaching most of the way to the sides of the page,
 * from under the bar to the foot of the screen: its words and drawing on one
 * side, the fields on the other. The fields keep a width of their own and sit in
 * the middle of their half, because a field stretched to fill a wide screen is
 * what made the form look wrong at 1920 (audit, 2026-11-08). Nothing scrolls. On a
 * phone the two groups are two steps with Continue between them.
 */
.fpage { display: flex; justify-content: center; height: 100vh; height: 100svh; min-height: 620px; padding: calc(var(--nav) + clamp(10px, 2.4vh, 28px)) var(--gut) clamp(16px, 3.6vh, 42px); background: #fff; color: var(--ink); }
.ftile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); width: 75vw; min-width: min(960px, 100%); max-width: 100%; border-radius: var(--r-l); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 44px 90px -54px rgba(15, 15, 16, .3); animation: rise .7s var(--ease) both; }

/* the side: the words, and one drawing resting on the bottom edge */
.fside { display: flex; flex-direction: column; min-height: 0; padding: clamp(24px, 3.2vw, 56px) clamp(24px, 3vw, 52px) 0; background: var(--tint-1); }
.fside .display-l { max-width: 11em; font-size: clamp(30px, min(3.2vw, 6.4vh), 64px); }
.fside .sub { margin-top: 12px; }
.fside-art { flex: 1 1 0; min-height: 0; display: flex; align-items: flex-end; justify-content: center; margin-top: 12px; }
.fside-art .doodle { width: auto; height: auto; max-width: 100%; max-height: 100%; }

/* the fields */
.fmain { display: flex; align-items: center; justify-content: center; min-height: 0; padding: clamp(14px, 2.4vh, 32px) clamp(24px, 3vw, 52px); }
.form { display: flex; flex-direction: column; gap: clamp(8px, 1.5vh, 14px); width: 100%; max-width: 880px; }
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.fsec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.5vh, 14px) 14px; }
.fplan, .fwide { grid-column: 1 / -1; }
.field { display: block; min-width: 0; }
.field > span, .q { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-micro); font-weight: 500; color: var(--ink-2); }
.field > span b { font-weight: 500; }
.field > span em { font-style: normal; font-weight: 400; color: var(--mute); }
.q a { font-weight: 500; color: var(--accent); }
.field input, .field textarea, .field select, .tel select, .tel input {
  display: block; width: 100%; height: clamp(40px, 5.2vh, 46px); margin-top: 5px; padding: 0 13px; border: 1px solid var(--field); border-radius: var(--r-s);
  background: #fff; color: var(--ink); font: 400 16px/1.3 var(--sans); letter-spacing: -.011em; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { height: clamp(48px, 9vh, 84px); padding: 10px 13px; resize: none; line-height: 1.4; }
.field input:hover, .field textarea:hover, .field select:hover, .tel select:hover { border-color: #B8B8BD; }
.field input:focus, .field textarea:focus, .field select:focus, .tel select:focus, .tel input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 122, 85, .16); }
.field input::placeholder, .field textarea::placeholder { color: var(--mute); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px #fff inset; }
.tel { display: grid; grid-template-columns: 118px minmax(0, 1fr); column-gap: 8px; }
/* the title before the first name, for a formal greeting in every e-mail
   (Mehdi 2026-11-08); never guessed from a name */
.nm { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 8px; }
.nm select:invalid, .nm select:has(option[value=""]:checked) { color: var(--mute); }
.tel select, .field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 30px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A6A6F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 15px; }
option { background: #fff; color: var(--ink); }
.field.bad input, .field.bad textarea, .field.bad select, .field.bad .tel select, .field.bad .tel input { border-color: var(--alert); box-shadow: 0 0 0 3px rgba(194, 65, 12, .1); }
.field .err { display: none; margin-top: 3px; font-size: 12.5px; color: var(--alert); }
.field.bad .err { display: block; }

/* a closed question: equal choices side by side */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 5px; }
.plans.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slot-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 5px; }
.plans label, .slot { position: relative; display: block; cursor: pointer; }
.plans input, .slot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.plans span, .slot span { display: grid; place-items: center; height: clamp(40px, 5.2vh, 46px); padding: 0 4px; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--field); font-size: 14px; font-weight: 500; letter-spacing: -.008em; color: var(--ink-2); text-align: center; transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.plans label:hover span, .slot:hover span { box-shadow: inset 0 0 0 1px #B8B8BD; }
.plans input:checked + span, .slot input:checked + span { background: var(--tint-2); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 600; }
.plans input:focus-visible + span, .slot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.slots.bad .slot span { box-shadow: inset 0 0 0 1px var(--alert); }
.slots .err { display: none; }

/* the offer, on the contact page, only when the question is a price */
.fplan-q { display: none; }
.form:has(input[name="topic"][value="pricing"]:checked) .fplan-q { display: block; }

/* consent and send */
.fend { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 24px; padding-top: clamp(6px, 1.2vh, 12px); }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; font-size: var(--t-micro); line-height: 1.42; color: var(--mute); cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; display: grid; place-items: center; width: 18px; height: 18px; margin: 1px 0 0; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--field); cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.consent input:checked { background: var(--accent); box-shadow: none; }
.consent input:checked::after { content: ''; width: 11px; height: 11px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.6 4.6L19 7.4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.6 4.6L19 7.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent a { color: var(--accent); font-weight: 500; }
.consent.bad input { background: #FDF1EA; box-shadow: inset 0 0 0 1.5px var(--alert), 0 0 0 3px rgba(194, 65, 12, .14); }
.consent.bad span { color: var(--ink-2); }
.consent.shake input { animation: nudge .42s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes nudge { 15%, 85% { transform: translateX(-1px); } 30%, 70% { transform: translateX(2px); } 45%, 55% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.send { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.send .btn { height: 46px; padding: 0 22px; }
.send .btn[disabled] { opacity: .6; pointer-events: none; }
.send .btn .spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.send .btn.busy .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { max-width: 24em; font-size: var(--t-micro); color: var(--mute); text-align: right; }
.status:empty { display: none; }
.status.bad { color: var(--alert); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* the steps exist on a phone only */
.fprog, .fnext, .fback { display: none; }

/* a short laptop: the words give the fields more room, the fields tighten */
@media (min-width: 761px) and (max-height: 780px) {
  .ftile { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .fmain { padding-block: 8px; }
  .form, .fsec { gap: 7px; }
  .fsec { column-gap: 12px; }
  .field input, .field select, .tel select, .tel input, .plans span, .slot span { height: 38px; margin-top: 4px; }
  .plans span, .slot span { margin-top: 0; }
  .field textarea { height: 40px; padding-block: 8px; }
  .send .btn { height: 42px; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .ftile { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  .fside { padding: 24px 22px 0; }
  .fmain { padding: 14px 22px; }
  .fside .sub { font-size: var(--t-small); }
}
@media (max-width: 760px) {
  .fpage { height: auto; min-height: 100svh; padding: var(--nav) 0 12px; background: #fff; }
  .ftile { display: block; width: 100%; min-width: 0; border-radius: 0; overflow: visible; box-shadow: none; }
  .fside { padding: 8px var(--gut) 10px; background: none; }
  .fside .display-l { font-size: 29px; max-width: none; }
  .fside .sub, .fside-art { display: none; }
  .fmain { display: block; padding: 2px var(--gut) 10px; }
  .form { max-width: none; gap: 12px; }
  .fsec { gap: 12px 10px; }
  .form.stepped .fprog { display: flex; gap: 6px; }
  .fprog i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); transition: background .4s ease; }
  .fprog i.on { background: var(--accent); }
  .form.stepped .fsec:not(.cur) { display: none; }
  .form.stepped .fsec.cur { animation: stepIn .4s var(--ease) both; }
  .form.stepped:not(.last) .fend { display: none; }
  .form.stepped .fnext { display: flex; grid-column: 1 / -1; width: 100%; height: 50px; margin-top: 6px; font-size: var(--t-body); }
  .form.stepped .fback { display: inline-flex; grid-column: 1 / -1; align-items: center; min-height: 40px; font-size: var(--t-small); font-weight: 500; color: var(--accent); }
  .form.stepped .fback::before { content: '‹'; margin-right: 6px; font-size: 1.3em; line-height: 1; }
  .field:has(.tel), .field:has([name="email"]) { grid-column: 1 / -1; }
  .field input, .field select, .tel select, .tel input, .plans span, .slot span { height: 44px; }
  .field textarea { height: 72px; }
  .plans.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .fend { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
  .send { align-items: stretch; }
  .send .btn { width: 100%; height: 50px; font-size: var(--t-body); }
  .status { text-align: left; max-width: none; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .fside .display-l { display: none; }
  .fsec, .form { gap: 8px; }
  .field input, .field select, .tel select, .tel input, .plans span, .slot span { height: 40px; }
  .fgrow { display: none; }
  html[lang="fr"] .slot-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  html[lang="fr"] .slot span { font-size: 12.5px; padding: 0; }
  .form.stepped .fnext { margin-top: 4px; }
  .consent { font-size: 12px; line-height: 1.36; }
}
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* from the form to the thank-you: green opens from the button (form.js), and
   /merci begins on the same frame and lifts it. The lift is CSS and needs no
   script, so nothing can leave the page stuck behind it. */
.wipe { position: fixed; inset: 0; z-index: 90; background: var(--accent); }
.curtain { display: none; }
html.arrive .curtain { position: fixed; inset: 0 0 -16vh; z-index: 90; display: block; border-radius: 0 0 50% 50% / 0 0 16vh 16vh; background: var(--accent); animation: curtainUp .85s cubic-bezier(.77, 0, .175, 1) .08s both; }
@keyframes curtainUp { to { transform: translateY(-120%); visibility: hidden; } }

/* the thank-you page: the note flies across and the phone rings */
.thanks { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; background: var(--bg); color: var(--ink); text-align: center; padding: calc(var(--nav) + 24px) var(--gut) 48px; }
.ty { width: min(100%, 620px); max-height: 30vh; margin: 0 auto 22px; }
.doodle .ty-trail { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1 9; opacity: .6; }
.ty-reveal { fill: none; stroke: #fff; stroke-width: 18; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ty-plane { opacity: 0; }
.ty.flying .ty-plane { opacity: 1; }
.ty.flying .ty-reveal { stroke-dashoffset: 1; }
.ty-phone { transform-box: fill-box; transform-origin: 50% 100%; }
.ty-ring path { opacity: 0; }
.ty.rang .ty-ring path { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ty.rang .ty-phone { animation: tyRing 3.4s ease-in-out infinite; }
  .ty.rang .ty-ring path { animation: tyWave 3.4s ease-in-out infinite; }
  .ty.rang .ty-ring path:nth-child(even) { animation-delay: .12s; }
}
@keyframes tyRing { 0%, 34%, 100% { transform: none; } 4%, 12%, 20%, 28% { transform: rotate(-3.5deg); } 8%, 16%, 24% { transform: rotate(3.5deg); } }
@keyframes tyWave { 0%, 40%, 100% { opacity: .12; } 8%, 30% { opacity: 1; } }
.thanks-in { position: relative; max-width: 760px; }
.thanks-in > :not(.ty) { transition: opacity .7s var(--ease), translate .7s var(--ease); }
.thanks-in > .sub { transition-delay: .1s; } .thanks-in > .ref { transition-delay: .18s; } .thanks-in > .actions { transition-delay: .26s; }
.thanks.fly .thanks-in > :not(.ty) { opacity: 0; translate: 0 16px; }
.thanks .sub { margin: 16px auto 0; }
.thanks .ref { display: inline-block; margin-top: 22px; padding: 8px 13px; border-radius: 10px; background: var(--alt); font: 600 var(--t-micro)/1 ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: .04em; color: var(--ink); }
.thanks .ref:empty { display: none; }

/* legal pages */
.legal { background: var(--bg); color: var(--ink); }
.legal-in { max-width: 760px; margin: 0 auto; padding: calc(var(--nav) + clamp(32px, 5vw, 72px)) var(--gut) var(--sec); }
.legal .upd { margin-top: 14px; font-size: var(--t-small); color: var(--mute); }
.legal .pending { margin-top: 22px; padding: 14px 18px; border-radius: var(--r-m); background: var(--alt); font-size: var(--t-small); color: var(--mute); }
.legal h2 { margin-top: 44px; font-size: var(--t-h3); font-weight: 620; letter-spacing: -.022em; }
.legal p, .legal li { margin-top: 12px; font-size: var(--t-body); line-height: 1.55; color: var(--ink-2); }
.legal ul li { position: relative; padding-left: 18px; }
.legal ul li::before { content: ''; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal a { color: var(--accent); font-weight: 500; }
