/* Devis : couleurs de marque, photo réelle et verre limité au panneau principal. */
/* Typographie d'insyder.io recopiée (Sacha, 14/10/2026) : titres en Bricolage Grotesque 600, tout le reste en Inter Display
   (500, 600 pour boutons et menus). Mêmes fichiers et mêmes réglages qu'insyder, rendu vérifié identique au pixel ;
   allégés au latin du site (~25 Ko chacun). Licences OFL : assets/fonts/OFL-bricolage.txt, OFL-inter.txt.
   Tailles du site conservées ; de la référence : graisse, interligne (1,2 titres, 1,3 texte), interlettrage des titres (-0,023 em). */
@font-face { font-family: "Bricolage Grotesque"; src: url("../assets/fonts/bricolage-grotesque-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../assets/fonts/inter-display-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../assets/fonts/inter-display-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../assets/fonts/inter-display-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --sapin: #08261E;
  --sapin-nuit: #04150F;
  --menthe: #B7E5BA;
  --feuille: #5CA87C;
  --craie: #F3F6EF;
  --police-titre: "Bricolage Grotesque", "Inter Display", sans-serif;
  --police-texte: "Inter Display", system-ui, sans-serif;
  --texte-doux: #617066; /* petit texte sur fond clair : gris-vert léger demandé par Sacha, contraste 4,8 sur le crème */
  --craie-douce: rgb(243 246 239 / .84);
  --marge: clamp(16px, 5.4vw, 64px);
  --courbe: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; padding-top: 16px; min-height: 100svh; background: var(--sapin-nuit); color: var(--craie);
  font: 500 16px/1.3 var(--police-texte); font-feature-settings: "blwf", "cv03", "cv04", "cv09", "cv11"; -webkit-font-smoothing: antialiased; overflow-x: clip; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 600; line-height: 1.2; letter-spacing: -.023em; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--menthe); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 10px; z-index: 10; padding: 12px 16px; border-radius: 999px; background: var(--craie); color: #0b0b0b; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* Une photo du chantier, intacte. Le voile protège la lecture sans effacer le jardin. */
.jardin { position: fixed; inset: 0; z-index: -1;
  background: var(--sapin-nuit) url("../assets/chantiers/haies-09.jpeg") center 58% / cover no-repeat;
  animation: jardin-entree 1.15s var(--courbe); }
.jardin::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(4 21 15 / .65), rgb(4 21 15 / .15) 35%, rgb(4 21 15 / .3) 75%, rgb(4 21 15 / .65)); }
@keyframes jardin-entree { from { transform: scale(1.055); } to { transform: scale(1); } }

/* Le logo et le contact restent directement sur la photo, sans seconde couche de verre. */
.nav { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; height: 64px; margin: 0 auto; padding: 0 26px; }
.nav__logo { display: inline-flex; align-items: center; min-height: 44px; }
.nav__logo img { width: 156px; height: auto; }
.nav__appel { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgb(243 246 239 / .38); background: rgb(243 246 239 / .14); font: 600 15px/1 var(--police-texte); text-decoration: none;
  transition: background-color .3s var(--courbe), border-color .3s var(--courbe); }
.nav__appel svg { width: 18px; height: 18px; }

/* Le panneau porte seul l'effet de verre. Aucun défilement à l'intérieur. */
.scene { width: min(780px, calc(100% - 2 * var(--marge))); margin: 22px auto 32px; }
.carte { position: relative; z-index: 0; display: flex; flex-direction: column;
  min-height: 540px; padding: 28px 40px 26px; border-radius: 26px; }
.carte::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(150deg, rgb(8 38 30 / .73), rgb(8 38 30 / .62));
  -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .48), inset 0 0 0 1px rgb(255 255 255 / .23), 0 18px 60px rgb(4 21 15 / .2);
  animation: verre-entree .85s var(--courbe); }
/* L'ouverture ne transforme pas le parent des boutons fixes sur téléphone. */
@keyframes verre-entree { from { opacity: .35; transform: translateY(32px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes contenu-entree { from { opacity: .55; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.photo-credit { margin: 16px 4px 0; font-size: 14px; color: var(--craie); text-shadow: 0 1px 8px #04150f; }
.photo-credit a { text-underline-offset: 4px; }

.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 0 0 12px;
  border-bottom: 1px solid rgb(243 246 239 / .22); font-size: 15px; }
.resume p { margin: 0; }
.resume button { min-height: 44px; padding: 0 4px; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; }

#questions { display: flex; flex: 1; flex-direction: column; min-height: 0; }

/* Progression : le vrai nombre de questions */
.progression { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 10px 16px; }
.progression p { margin: 0; font-size: 15px; color: var(--craie-douce); font-variant-numeric: tabular-nums; }
.progression__barre { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: rgb(243 246 239 / .16); overflow: hidden; }
.progression__barre i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--menthe); transition: width .5s var(--courbe); }

.step-content { flex: 1; margin: 22px 0 0; padding: 0; animation: contenu-entree .7s .1s var(--courbe) backwards; }
.question-title { margin: 0; font: 600 clamp(30px, 3.1vw, 40px)/1.2 var(--police-titre); letter-spacing: -.023em;
  text-wrap: balance; scroll-margin-top: 90px; }
.question-title:focus { outline: none; }
.question-help { margin: 10px 0 22px; max-width: 52ch; font-size: 17px; line-height: 1.3; color: var(--craie-douce); text-wrap: pretty; }

/* Réponses sobres. Seules les hauteurs ont une illustration explicative. */
.question-title + .choice-fieldset { margin-top: 24px; }
.choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.options { display: grid; gap: 10px; }
.options--duo { grid-template-columns: 1fr 1fr; }
.options--duo .option:last-child:nth-child(odd) { grid-column: 1 / -1; }
.option { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 13px 16px 13px 18px; border-radius: 10px;
  border: 1px solid rgb(243 246 239 / .3); background: rgb(4 21 15 / .28); cursor: pointer;
  transition: background-color .2s var(--courbe), border-color .2s var(--courbe), transform .2s var(--courbe); }
.option:active { transform: scale(.99); }
.option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.option:has(input:focus-visible) { outline: 3px solid var(--menthe); outline-offset: 3px; }
.option-copy { flex: 1; min-width: 0; }
.option-title { display: block; font-size: 18px; font-weight: 500; line-height: 1.3; }
.option-detail { display: block; margin-top: 3px; font-size: 15px; line-height: 1.3; color: rgb(243 246 239 / .78); }
.option-check { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border: 1.5px solid rgb(243 246 239 / .55); border-radius: 50%; }
.option-check svg { width: 14px; height: 14px; stroke-width: 2.6; opacity: 0; }
.option:has(input:checked) { background: var(--menthe); border-color: var(--menthe); color: var(--sapin); }
.option:has(input:checked) .option-detail { color: rgb(8 38 30 / .78); }
.option:has(input:checked) .option-check { background: var(--sapin); border-color: var(--sapin); color: var(--menthe); }
.option:has(input:checked) .option-check svg { opacity: 1; }

.options--illustrated { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.option--illustrated { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
.height-illustration { width: 92px; height: 100px; color: var(--menthe); stroke-width: 1.5; }
.option--illustrated .option-check { position: absolute; right: 14px; top: 14px; }
.option--illustrated:has(input:checked) .height-illustration { color: var(--sapin); }
.option--plain { grid-column: 1 / -1; }

/* Champs */
.input-label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 500; }
.input-label small { font-size: 15px; font-weight: 400; color: var(--craie-douce); }
.measure-wrap { display: flex; align-items: center; margin: 0 0 12px; border: 1px solid rgb(243 246 239 / .42); border-radius: 18px; background: rgb(4 21 15 / .42); }
.measure-wrap:focus-within { outline: 3px solid var(--menthe); outline-offset: 3px; }
.measure-wrap input { width: 100%; min-width: 0; padding: 18px 20px; border: 0; background: transparent; font-size: 28px; font-variant-numeric: tabular-nums; outline: none; }
.measure-wrap input::placeholder { font-size: 19px; }
.measure-wrap span { padding: 0 20px 0 8px; font-size: 17px; white-space: nowrap; }
.measure-wrap:has(input:disabled) { opacity: .45; }
.text-input { width: 100%; min-width: 0; min-height: 56px; padding: 14px 16px; border: 1px solid rgb(243 246 239 / .42); border-radius: 16px;
  background: rgb(4 21 15 / .42); font-size: 18px; }
.text-input:focus-visible { outline-offset: 2px; }
textarea.text-input { min-height: 140px; line-height: 1.55; resize: vertical; }
input::placeholder, textarea::placeholder { color: rgb(243 246 239 / .62); opacity: 1; }
.location-grid { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.note { margin: 16px 0 0; padding: 0; color: var(--craie-douce); font-size: 15px; line-height: 1.3; }
.form-error { margin: 12px 0 0; padding: 12px 16px; border-left: 3px solid #F2B01E; border-radius: 10px; background: rgb(4 21 15 / .6);
  font-size: 16px; scroll-margin-bottom: 120px; }

/* Boutons : pilules, le principal en blanc avec le texte noir */
.form-bottom { padding-top: 28px; }
.navigation { display: flex; gap: 10px; }
.primary, .back { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px;
  font: 600 17px/1.2 var(--police-texte); text-decoration: none; transition: background-color .25s var(--courbe), transform .2s var(--courbe); }
.primary { flex: 1; padding: 0 24px; border: 0; background: #fff; color: #0b0b0b; box-shadow: 0 10px 24px rgb(4 21 15 / .2); }
.primary svg { width: 20px; height: 20px; }
.back { padding: 0 22px; border: 1px solid rgb(243 246 239 / .5); background: rgb(243 246 239 / .06); font-weight: 500; }
.back svg { width: 18px; height: 18px; }
.primary:active, .back:active { transform: scale(.98); }
button:disabled { cursor: wait; }
.privacy-note { margin: 12px 0 0; text-align: center; font-size: 15px; color: rgb(243 246 239 / .78); }

/* Récapitulatif : un bloc par service, une ligne par réponse, un seul « Modifier » par bloc ; côte à côte sur ordinateur */
body[data-step="recap"] .progression { display: none; }
body[data-step="recap"] .step-content { margin-top: 0; }
body[data-step="recap"] .question-help { margin-bottom: 12px; }
.summary-blocs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.summary-blocs .summary-group:last-child { grid-column: 1 / -1; }
.summary-blocs .summary-group:last-child ul { columns: 2; column-gap: 28px; }
.summary-blocs .summary-group:last-child li { break-inside: avoid; }
.summary-blocs .summary-group:nth-last-child(2):nth-child(odd) { grid-column: 1 / -1; }
.question-help .summary-add { display: inline; min-height: 0; margin-left: 0; padding: 0; font-size: inherit; color: var(--craie); }
/* Ordinateur (souris) : liens de modification plus compacts pour que le récap tienne dans la carte */
@media (min-width: 761px) and (pointer: fine) {
  .summary-group { padding: 8px 0; }
  .summary-heading .edit { min-height: 32px; }
}
.edit { min-height: 44px; padding: 0 2px; border: 0; background: none; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.summary-group { padding: 10px 0; border-top: 1px solid rgb(243 246 239 / .18); }
.summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-heading h2 { margin: 0; font-size: 17px; font-weight: 600; }
.summary-heading .edit { min-height: 40px; }
.summary-group ul { margin: 2px 0 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.3; }
.summary-group li { overflow-wrap: anywhere; }
.summary-group li span { color: var(--craie-douce); }
.summary-name { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; margin: 10px 0 0; }
.summary-name .input-label { margin: 0; }
.summary-footnote { margin: 12px 0 0; font-size: 15px; line-height: 1.3; color: var(--craie-douce); }
.summary-footnote a { text-underline-offset: 3px; }
.no-script { padding: 10px 0; }
.no-script h1 { margin: 0; font: 600 36px/1.2 var(--police-titre); letter-spacing: -.023em; }
.no-script p { margin: 18px 0; font-size: 17px; }
.no-script .primary, .no-script .back { display: flex; margin-top: 12px; }
#load-fallback { padding: 30px 0; font-size: 17px; }

@media (hover: hover) and (pointer: fine) {
  .option:hover { background: rgb(243 246 239 / .14); border-color: rgb(243 246 239 / .42); }
  .option:has(input:checked):hover { background: #c8ecca; }
  .primary:hover { background: #E6E8E3; }
  .back:hover, .nav__appel:hover { background: rgb(243 246 239 / .2); }
  .edit:hover, .resume button:hover { text-decoration-thickness: 2px; }
}

/* Verre : repli plein si le flou n'existe pas, si l'utilisateur réduit la transparence, ou veut plus de contraste (comme le héro) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .carte::before, .navigation { background: rgb(8 38 30 / .9); }
}
@media (prefers-reduced-transparency: reduce) {
  .carte::before, .navigation { background: var(--sapin); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) { .carte::before { box-shadow: 0 0 0 1px var(--craie); } }



/* Téléphone : la carte suit le contenu, Retour et Continuer restent dans une barre fixe en bas de l'écran */
@media (max-width: 760px) {
  body { padding-top: 10px; }
  .nav { margin: 0 10px; height: 58px; padding: 0 6px; }
  .nav__logo img { width: 128px; }
  .nav__appel { padding: 0 16px; }
  .scene { width: calc(100% - 20px); margin: 12px auto 0; padding-bottom: 96px; } /* la place de la barre fixe, sous la carte */
  /* pas de transformation sur la carte : elle deviendrait le cadre de la barre fixe ; seules les questions arrivent */
  .carte { min-height: 0; padding: 22px 20px 24px; border-radius: 22px; }
  .summary-blocs { grid-template-columns: 1fr; }
  .summary-name { display: block; margin-top: 14px; }
  .question-help .summary-add { display: block; min-height: 44px; margin: 4px 0 0; }
  .summary-name .input-label { margin-bottom: 8px; }
  .summary-blocs .summary-group:last-child ul { columns: 1; }
  .step-content { margin: 20px 0 0; }
  .question-title { font-size: 30px; }
  .question-help { font-size: 16px; margin-bottom: 18px; }
  .options--duo { grid-template-columns: 1fr; }
  .options--duo .option:last-child:nth-child(odd) { grid-column: auto; }
  .options--illustrated { grid-template-columns: 1fr; }
  .option--illustrated { flex-direction: row; align-items: center; gap: 12px; padding: 12px; }
  .height-illustration { width: 64px; height: 76px; }
  .option--illustrated .option-check { position: static; width: 24px; height: 24px; }
  .option--illustrated .option-title { font-size: 17px; }
  .option--illustrated .option-detail { font-size: 15px; }
  .location-grid { grid-template-columns: 1fr; }
  .form-bottom { padding-top: 14px; }
  .navigation { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--sapin);
    border-top: 1px solid rgb(243 246 239 / .18); }
  .primary, .back { min-height: 52px; }
  .back { padding: 0 18px; }
  .privacy-note { margin-top: 0; }
}
@media (max-width: 360px) {
  .nav__logo img { width: 112px; }
  .carte { padding-left: 16px; padding-right: 16px; }
  .question-title { font-size: 27px; }
}

/* En portrait, privilégier la haie plutôt que la grande bande de ciel de la photo. */
@media (max-width: 760px) and (orientation: portrait) {
  .jardin { background-size: auto 150%; background-position: 48% 78%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Le parcours et la reprise restent sobres : texte et boutons déjà utilisés dans le formulaire. */
.journey-note { margin: 20px 0 0; color: var(--craie-douce); font-size: 15px; line-height: 1.3; }
.journey-note a, .privacy-link a { text-underline-offset: 3px; }
body:not([data-step="services"]) .journey-note { display: none; }
/* « Parlons de votre jardin. » : le grand titre de la première question (14/10/2026) ; la question passe un cran en dessous */
.accroche { margin: 26px 0 0; font: 600 clamp(40px, 4.4vw, 56px)/1.2 var(--police-titre); letter-spacing: -.023em;
  text-wrap: balance; color: var(--craie); }
.accroche + .journey-note { margin-top: 10px; }
body:not([data-step="services"]) .accroche { display: none; }
body[data-step="services"] .question-title { font-size: clamp(24px, 2.4vw, 30px); }
@media (max-width: 760px) {
  .accroche { margin-top: 20px; font-size: 38px; }
  body[data-step="services"] .question-title { font-size: 24px; }
}
@media (max-width: 360px) { .accroche { font-size: 34px; } }
.draft-choice > p { margin: 20px 0; max-width: 54ch; }
.draft-choice > button { width: 100%; margin-top: 12px; white-space: normal; }
.privacy-link { margin: 18px 4px 0; font-size: 14px; }
@media (max-width: 360px) { .draft-choice > button { font-size: 15px; } }
