/* ==========================================================================
   Contact (maquette validée contact) : on est arrivé à Genève, là où finit chaque page.
   « Décrivez votre projet. », le formulaire en six étapes sur un aplat sombre, et à côté
   le téléphone, « M'appeler », l'e-mail, « Ensuite » et « Où je travaille ».
   Habillage seulement : le formulaire (champs, name, data-*) et demande.js ne changent pas.
   demande.js pose « is-wizard » sur le cadre, « is-active » et data-dir sur l'étape affichée,
   data-state et aria-current sur les 6 traits. Sans JavaScript, toutes les étapes s'affichent à la suite.
   Classe posée sur <html> par contact.js : « film » (l'arrivée animée).
   ========================================================================== */

/* Le décor : Genève, voilé à 60 % */
.decor { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: var(--nuit); }
.decor video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.decor__voile { position: absolute; inset: 0; background: rgb(12 13 16 / .6); }
/* Genève s'éclaire à l'arrivée, puis le titre monte. Si le script ne démarre jamais, tout s'affiche au bout de 4 s. */
html.anime .decor { opacity: 0; }
html.anime .entete h1, html.anime .entete p, html.anime .contact { visibility: hidden; }
html.anime:not(.film) .decor { animation: decor-secours 0s linear 4s forwards; }
html.anime:not(.film) .entete h1, html.anime:not(.film) .entete p, html.anime:not(.film) .contact { animation: titre-secours 0s linear 4s forwards; }
@keyframes decor-secours { to { opacity: 1; } }
@keyframes titre-secours { to { visibility: visible; } }

.entete, .contact { position: relative; z-index: 4; max-width: 1240px; margin: 0 auto; }
.entete { padding: 22vh var(--gouttiere) 0; }
/* Coupé comme la maquette (site.css équilibre les lignes des titres) */
.entete h1 { font-size: clamp(2.6rem, 6vw, 6rem); line-height: 1; letter-spacing: -.045em; text-wrap: wrap; }
.entete p { margin-top: 24px; max-width: 46ch; font-size: 18px; line-height: 1.55; color: var(--doux); }

.contact { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 64px var(--gouttiere) 16vh; }
.link { font-weight: 600; text-underline-offset: .35em; }
.muted { color: var(--doux); }

/* Le formulaire, sur un aplat sombre pour rester lisible devant la vidéo */
/* scroll-margin-top : à chaque étape, le formulaire remonte (demande.js) ; il s'arrête sous le menu du haut
   au lieu de passer dessous (audit du devis, 28 octobre) */
.wizard__window { position: relative; padding: 36px 40px 40px; border-radius: 12px; background: rgb(12 13 16 / .88); scroll-margin-top: 96px; }
.wizard__bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; font-size: 14px; font-weight: 500; color: var(--doux); }
.wizard__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wizard__count { font-variant-numeric: tabular-nums; }
.resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 24px; padding: 16px 18px; border: 1px solid var(--ligne); border-radius: var(--r); }
.resume__text { font-weight: 500; }
.resume__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Les 6 traits : un par étape, blanc cassé quand elle est faite ou en cours. On peut revenir à une étape déjà vue. */
.wizard__window .steps { display: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; }
.is-wizard .steps:not([hidden]) { display: grid; }
.steps__btn { position: relative; width: 100%; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
.steps__btn::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ligne); transition: background-color .3s; }
.steps__btn[data-state="done"]::before, .steps__btn[aria-current="step"]::before { background: var(--clair); }
.steps__btn:disabled { cursor: default; }
.steps__num, .steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Les étapes */
.form { display: grid; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.step + .step { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--ligne); }
.is-wizard .step + .step { margin-top: 0; padding-top: 0; border-top: 0; }
.is-wizard .step:not(.is-active) { display: none; }
.step__head { display: grid; gap: 8px; margin-bottom: 8px; }
.step__title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: -.035em; line-height: 1.1; }
.step__title:focus { outline: none; }
.step__intro { max-width: 40rem; font-size: 16px; line-height: 1.5; color: var(--doux); }
/* L'étape glisse depuis la droite quand on avance, depuis la gauche quand on revient (sauf version calme) */
html.anime .is-wizard .step.is-active { animation: etape-suivante .35s cubic-bezier(.16, 1, .3, 1) both; }
html.anime .is-wizard .step.is-active[data-dir="back"] { animation-name: etape-precedente; }
@keyframes etape-suivante { from { opacity: 0; transform: translateX(28px); } }
@keyframes etape-precedente { from { opacity: 0; transform: translateX(-28px); } }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; align-content: start; }
.field__label, .choices__legend { font-size: 15px; font-weight: 500; }
.opt { font-weight: 400; color: var(--doux); }
.req { color: #9db8ff; }
.field__input { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid rgb(242 244 248 / .42); border-radius: var(--r); background: rgb(242 244 248 / .04); color: var(--clair); font-size: 16px; transition: border-color .2s; }
.field__input:hover { border-color: rgb(242 244 248 / .5); }
textarea.field__input { min-height: 120px; resize: vertical; line-height: 1.5; }
.field__input::placeholder { color: rgb(242 244 248 / .5); opacity: 1; }
.field__input:focus { outline: 2px solid var(--clair); outline-offset: 1px; border-color: transparent; }
.field__input[aria-invalid="true"] { border-color: #ff8a80; }
.field__hint { font-size: 14px; color: var(--doux); }
.field__error { font-size: 14px; font-weight: 500; color: #ff8a80; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 12px; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--clair); }
.field--check label { font-size: 15px; line-height: 1.5; }
.field--check .field__error { grid-column: 1 / -1; }

/* Les choix : une carte par réponse, bordée de blanc cassé quand elle est choisie */
.choices { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choices__legend { padding: 0; margin-bottom: 8px; }
.choices__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices__grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; display: grid; gap: 4px; align-content: start; min-height: 56px; padding: 16px 16px 16px 46px; border: 1px solid rgb(242 244 248 / .42); border-radius: var(--r); cursor: pointer; transition: border-color .2s, background-color .2s; }
.choice:hover { border-color: rgb(242 244 248 / .55); }
.choice input { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--clair); cursor: pointer; }
.choice__title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.choice__desc { font-size: 14px; line-height: 1.45; color: var(--doux); }
.choice:has(input:checked) { border-color: var(--clair); background: rgb(242 244 248 / .08); }
.choice:has(input:focus-visible) { outline: 2px solid var(--clair); outline-offset: 2px; }
.choices.is-invalid .choice { border-color: #ff8a80; }
.need { display: grid; gap: 20px; }
.need__title { padding-top: 16px; border-top: 1px solid var(--ligne); font-size: 17px; font-weight: 600; }
.is-wizard .nojs-only { display: none; }

/* Les boutons du formulaire : le bouton principal blanc cassé du site, « Retour » en simple cadre */
.btn--primary { min-height: 50px; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn--quiet { background: transparent; color: var(--clair); box-shadow: inset 0 0 0 1px rgb(242 244 248 / .3); }
.btn--quiet:hover { background: rgb(242 244 248 / .06); box-shadow: inset 0 0 0 1px rgb(242 244 248 / .6); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; scale: 1; }
.step__nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--ligne); }
.step__nav [data-next], .step__nav [type="submit"] { margin-left: auto; }
.step__nav--js, .js-only { display: none; }
.is-wizard .step__nav--js { display: flex; }
.is-wizard .js-only { display: inline-flex; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* Le récapitulatif, l'accord, l'envoi */
.review { display: grid; gap: 12px; }
.review__group { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--ligne); }
.review__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 16px; }
.review__head h3 { font-size: 16px; letter-spacing: -.01em; }
.review__edit { min-height: 44px; padding: 0 8px; background: none; border: 0; color: var(--clair); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.review__list { display: grid; gap: 8px; font-size: 15px; }
.review__list div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; }
.review__list dt { color: var(--doux); }
.review__list dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.form__alert { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid #ff8a80; border-radius: var(--r); font-size: 15px; }
.form__alert:focus { outline: none; }
.form__alert .btn { justify-self: start; }
.privacy-note { font-size: 14px; line-height: 1.5; color: var(--doux); }
.robot-check:empty { display: none; }
.notice { padding: 16px 18px; border-left: 2px solid var(--clair); font-size: 15px; color: var(--doux); }
.form-success { display: grid; gap: 14px; padding-top: 8px; }
.form-success:focus { outline: none; }
.form-success__title { font-weight: 600; color: #8fe3b8; }
.form-success .h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: -.035em; }
.form-success .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* À côté : les autres moyens de me joindre */
.contact__aside { display: grid; gap: 34px; padding-top: 6px; }
.contact__block h2 { margin-bottom: 8px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--doux); }
.contact__phone { display: inline-block; font-size: clamp(1.8rem, 2.8vw, 2.6rem); font-weight: 600; letter-spacing: -.03em; text-decoration: none; font-variant-numeric: tabular-nums; }
.contact__appel { margin-top: 14px; }
.contact__email { overflow-wrap: anywhere; }
.contact__block p, .contact__block li { font-size: 16px; line-height: 1.55; }
/* La liste numérotée de la maquette (site.css retire les puces des listes qui ont une classe) */
.contact__aside .mini-steps { display: grid; gap: 8px; margin: 0; padding-left: 1.2em; list-style: decimal; }

@media (max-width: 860px) {
  .entete { padding-top: 16vh; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 12vh; }
  .wizard__window { padding: 26px 18px 28px; }
  .field-row, .choices__grid, .choices__grid--compact { grid-template-columns: 1fr; gap: 10px; }
  .review__list div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 479px) {
  .step__nav .btn { flex: 1 1 100%; white-space: normal; text-align: center; }
  .step__nav [data-prev] { order: 2; }
}
