/* HauteRenovation: the quote form. */

/* the kit's .form is a two-column grid; here the fields sit in their own grid, so the form is one block at full width */
.form--devis { display: block; width: 100%; }
.form--devis .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.form--devis .field { min-width: 0; }
.form--devis .field > label { font-weight: 500; color: var(--ink); }
.form--devis .field :is(input:not([type="checkbox"]):not([type="file"]), select, textarea) {
  width: 100%; min-width: 0; box-sizing: border-box; height: 52px; padding: 0 var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; color: var(--ink);
  font: 400 var(--t-body)/1.4 var(--font-text);
  transition: border-color .2s, box-shadow .2s;
}
.form--devis .field textarea { height: auto; min-height: 128px; padding-block: var(--s-3); }
.form--devis .field :is(input, select, textarea):hover { border-color: color-mix(in oklab, var(--ink) 40%, var(--line-strong)); }
.form--devis .field :is(input, select, textarea):focus-visible { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--p-accent) 22%, transparent); }
/* the examples, readable but clearly not an answer */
.form--devis ::placeholder { color: color-mix(in oklab, var(--ink) 45%, #fff); opacity: 1; }

/* the list of needs: its own arrow, the text never under it */
.form--devis select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; text-overflow: ellipsis; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2314212b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
}
.form--devis select:invalid { color: color-mix(in oklab, var(--ink) 45%, #fff); }
.form--devis select option { color: var(--ink); }

/* the photo: a real button inside the field, the file name beside it, nothing spills out */
.form--devis .file {
  position: relative; display: flex; align-items: center; gap: var(--s-3); min-width: 0; height: 52px; padding: 0 var(--s-2);
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: #fff; overflow: hidden; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.form--devis .file__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.form--devis .file__btn {
  flex: none; display: inline-flex; align-items: center; gap: var(--s-2); height: 36px; padding: 0 var(--s-3);
  border-radius: calc(var(--r-sm) - 2px); background: var(--ink); color: #fff; font: 500 var(--t-small)/1 var(--font-text); white-space: nowrap;
}
.form--devis .file__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 var(--t-small)/1.3 var(--font-text); color: var(--muted); }
.form--devis .file:hover { border-color: var(--p-accent); }
.form--devis .file:hover .file__btn { background: var(--p-accent); }
.form--devis .file:focus-within { border-style: solid; border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--p-accent) 22%, transparent); }
.form--devis .file.has-file { border-style: solid; }
.form--devis .file.has-file .file__name { color: var(--ink); }

/* consent and the button */
.form--devis .field--check { grid-template-columns: 24px minmax(0, 1fr); }
.form--devis .field--check label { font-weight: 400; }

@media (max-width: 1023px) and (min-width: 640px) { .form--devis .file__btn svg { display: none; } }
@media (max-width: 639px) {
  .form--devis .form__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
}
.form--devis select:has(option[value=""]:checked) { color: color-mix(in oklab, var(--ink) 45%, #fff); }
.form--devis .field--check .link { white-space: nowrap; }

/* ---------------------------------------------------------------- the form's own ground: a card set apart from the page */
.form--devis {
  position: relative; padding: clamp(24px, 3vw, 44px); border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfaf8 100%);
  border: 1px solid color-mix(in oklab, var(--ink) 9%, transparent);
  box-shadow: 0 1px 0 #fff inset, 0 30px 60px -40px rgb(20 33 43 / .45), 0 12px 24px -18px rgb(20 33 43 / .18);
  overflow: hidden;
}
.form--devis::before { /* a thin orange rule along the top edge */
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--p-accent), color-mix(in oklab, var(--p-accent) 55%, #f2b07a));
}
.form--devis .field :is(input:not([type="checkbox"]):not([type="file"]), select, textarea), .form--devis .file { background-color: #f6f4f0; border-color: color-mix(in oklab, var(--ink) 12%, transparent); }
.form--devis .field :is(input, select, textarea):focus-visible { background-color: #fff; }
@media (max-width: 639px) { .form--devis { padding: 20px 16px 24px; border-radius: 16px; } }

/* ---------------------------------------------------------------- the send button: a pill, dark, unlike every other button
   On hover the orange fills it from the left, a light runs across, the arrow leaves and comes back; it presses on click. */
.form--devis .form__send-row { display: grid; gap: var(--s-3); justify-items: stretch; margin-top: var(--s-6); }
.send {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  width: 100%; min-height: 64px; padding: 8px 8px 8px 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #1d2e3b 0%, #14212b 60%, #0d171e 100%); color: #fff;
  font: 600 17px/1.2 var(--font-text); letter-spacing: .01em;
  box-shadow: 0 18px 30px -18px rgb(20 33 43 / .7), inset 0 1px 0 rgb(255 255 255 / .12);
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s;
}
.send::before { /* the orange that fills from the left */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(135deg, #d8642c, var(--p-accent) 55%, #a8420f);
  clip-path: inset(0 100% 0 0 round 999px); transition: clip-path .55s cubic-bezier(.77,0,.18,1);
}
.send::after { /* a light that runs across */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .28) 48%, transparent 66%);
  transform: translateX(-120%);
}
.send__icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--p-accent); color: #fff; overflow: hidden; transition: background-color .3s, color .3s;
}
.send__icon svg { transition: transform .45s cubic-bezier(.77,0,.18,1); }
.send:hover, .send:focus-visible { transform: translateY(-2px); box-shadow: 0 24px 36px -18px rgb(194 80 27 / .7), inset 0 1px 0 rgb(255 255 255 / .2); }
.send:hover::before, .send:focus-visible::before { clip-path: inset(0 0 0 0 round 999px); }
.send:hover::after, .send:focus-visible::after { transform: translateX(120%); transition: transform .9s cubic-bezier(.22,1,.36,1) .15s; }
.send:hover .send__icon, .send:focus-visible .send__icon { background: #fff; color: var(--p-accent); }
.send:hover .send__icon svg, .send:focus-visible .send__icon svg { animation: send-arrow .6s cubic-bezier(.77,0,.18,1); }
.send:active { transform: translateY(0) scale(.985); transition-duration: .08s; }
.send:focus-visible { outline: 3px solid color-mix(in oklab, var(--p-accent) 45%, transparent); outline-offset: 3px; }
.send[aria-busy="true"], .send:disabled { opacity: .75; cursor: progress; }
@keyframes send-arrow { 45% { transform: translateX(26px); } 46% { transform: translateX(-26px); } 100% { transform: translateX(0); } }

/* the promise under it */
.form__promise { display: flex; align-items: center; justify-content: center; gap: var(--s-2); margin: 0; font: 400 var(--t-small)/1.4 var(--font-text); color: var(--ink); text-align: center; }
.form__promise::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2f9e5b; box-shadow: 0 0 0 0 rgb(47 158 91 / .5); animation: promise-pulse 2.2s ease-out infinite; }
.form__promise strong { font-weight: 600; }
@keyframes promise-pulse { 70% { box-shadow: 0 0 0 8px rgb(47 158 91 / 0); } 100% { box-shadow: 0 0 0 0 rgb(47 158 91 / 0); } }
.form--devis > .t-small.muted { text-align: center; margin-top: var(--s-2); }
@media (prefers-reduced-motion: reduce) {
  .send, .send::before, .send__icon, .send__icon svg { transition: none; }
  .send::after, .form__promise::before { animation: none; display: none; }
  .send:hover .send__icon svg { animation: none; }
}
/* the list's prompt in the examples' grey (the field rule above weighs more, hence the repeated selector) */
.form--devis .field select.select:invalid, .form--devis .field select:invalid:invalid:invalid { color: color-mix(in oklab, var(--ink) 45%, #fff); }
.form__promise { display: block; }
.form__promise::before { display: inline-block; margin-right: 8px; vertical-align: 1px; }
