/* Price calculator (/prix-en-2-minutes/, /en/price-in-2-minutes/): site tokens from styles.css */
.calc-hero { padding: 2.4rem 0 2.6rem; }
.calc-hero h1 { max-width: 760px; }
.asof-pill { display: inline-block; margin-bottom: .9rem; padding: .3rem .85rem; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); font-size: .82rem; font-weight: 600; }
.eyebrow { display: block; margin-bottom: .5rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9fd3f0; }
.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.2rem; }
.hero-trust .hero-rating { margin: 0; }
.hero-trust > span { font-size: .85rem; color: rgba(255,255,255,.85); }
.calc-start { margin-top: 1.1rem; }   /* "Commencer →": straight to question 1 */
.calc-section { padding: 2rem 0 3rem; background: var(--bg-soft); }
.calc { min-height: 560px; padding: 1.6rem; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.calc-grid, .calc-results { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 2rem; align-items: start; }
.calc-results { grid-template-columns: minmax(0,1fr) 280px; }
.asof-pill[hidden], .calc [hidden] { display: none !important; }
.calc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:where(.calc) button { font: inherit; cursor: pointer; }   /* no specificity: .btn keeps its weight */
.calc :focus-visible { outline: 3px solid var(--cool); outline-offset: 2px; }
.calc .btn { border: 0; }
.calc .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.calc-back, .calc-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 .3rem; background: none; border: 0; font-size: .9rem; font-weight: 600; color: var(--blue); }
.calc-back { margin-left: -.3rem; }
.calc-back:hover, .calc-link:hover { text-decoration: underline; }

/* progress: chapters, "Question n of m", Back */
.calc-chapters { display: flex; gap: .4rem; }
.calc-ch { flex: 1; min-width: 0; background: linear-gradient(var(--line), var(--line)) top / 100% 6px no-repeat; }
.calc-ch i { display: block; height: 6px; border-radius: 3px; background: var(--blue); transition: width .3s; }
.calc-ch span { display: block; margin-top: .3rem; font-size: .72rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-ch.on span { color: var(--navy); }
.calc-meta { display: flex; justify-content: space-between; align-items: center; min-height: 44px; margin: .7rem 0 .3rem; }
.calc-qn { font-size: .85rem; font-weight: 700; color: var(--blue); }

/* one question per screen */
.calc-step { min-height: 380px; animation: calcIn .3s ease; }
@keyframes calcIn { from { opacity: 0; transform: translateY(6px); } }
.calc-step h2 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.25; color: var(--navy); outline: none; }
.calc-why { margin: .7rem 0 1.1rem; padding: .7rem .9rem; background: var(--bg-soft); border-left: 3px solid var(--cool); border-radius: 0 10px 10px 0; font-size: .9rem; color: var(--muted); }
.calc-why b { color: var(--navy); }
.calc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem; }
.calc-card, .calc-chips button, .calc-room { border: 2px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; }
.calc-card { display: flex; flex-direction: column; justify-content: center; gap: .15rem; min-height: 64px; padding: .8rem 1rem; color: var(--ink); transition: border-color .15s, background .15s; }
.calc-card b, .calc-chips b, .calc-room b { color: var(--navy); line-height: 1.3; }
.calc-card small, .calc-chips small, .calc-room small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.calc-card:hover, .calc-chips button:hover { border-color: var(--cool); }
.calc-card[aria-checked="true"], .calc-chips [aria-pressed="true"] { border-color: var(--blue); background: var(--blue-light); }
.calc-card.unk { border-style: dashed; }
.calc-go { margin-top: 1.2rem; }
.calc-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.calc-chips button { display: flex; flex-direction: column; padding: .5rem .9rem; }
.calc-area { display: grid; grid-template-columns: auto 7.5rem; align-items: center; gap: .6rem .8rem; margin-top: 1.1rem; }
.calc-area label, .calc-field label { font-weight: 600; font-size: .92rem; color: var(--navy); }
.calc input { width: 100%; padding: .65rem .8rem; border: 1.5px solid #b9c7d4; border-radius: 10px; font: inherit; }
.calc-area input[type=range] { grid-column: 1 / -1; height: 44px; padding: 0; accent-color: var(--blue); }
.calc-size { min-height: 1.6em; margin-top: .7rem; font-weight: 700; color: var(--navy); }
.calc-rooms { display: grid; gap: .6rem; }
.calc-room { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .9rem; }
.calc-room b { display: block; }
.calc-step-btns { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.calc-step-btns button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--blue); background: var(--bg); color: var(--blue); font-size: 1.3rem; font-weight: 700; }
.calc-step-btns button:disabled { border-color: var(--line); color: var(--line); cursor: default; }
.calc-step-btns output { min-width: 1.6rem; text-align: center; font-size: 1.1rem; font-weight: 700; color: var(--navy); }

/* your answers so far */
.calc-answers { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.calc-answers summary { cursor: pointer; padding: .7rem 0; font-size: .92rem; font-weight: 700; color: var(--navy); }
.calc-answers ul { list-style: none; margin-top: .5rem; }
.calc-answers li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 .8rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .86rem; color: var(--muted); }
.calc-answers li b { color: var(--ink); font-weight: 600; }
.calc-answers li button { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-width: 44px; min-height: 44px; padding: 0 .4rem; background: none; border: 0; font-weight: 600; color: var(--blue); }

/* live picture, precision, locked price */
.calc-side, .calc-res-side { position: sticky; top: 90px; padding: 1rem; border-radius: 14px; background: var(--bg-soft); }
.calc-house svg { width: 100%; height: auto; aspect-ratio: 360 / 250; }
.calc-side-row { display: flex; gap: .8rem; margin-top: .8rem; }
.calc-ring { position: relative; flex-shrink: 0; width: 84px; text-align: center; font-size: .7rem; color: var(--muted); }
.calc-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.calc-ring circle { fill: none; stroke: var(--line); stroke-width: 4; }
.calc-ring .calc-ring-v { stroke: #1f8a5b; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .4s; }
.calc-ring b { position: absolute; top: 0; left: 0; width: 84px; height: 84px; display: grid; place-items: center; font-size: 1rem; color: var(--navy); }
.calc-lock { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: .7rem .9rem; border-radius: 12px; background: var(--navy); color: #fff; }
.calc-lock-k, .calc-k { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9fd3f0; }
.calc-lock-n { font-size: 1.5rem; font-weight: 800; filter: blur(5px); user-select: none; font-variant-numeric: tabular-nums; }
.calc-lock-s { font-size: .72rem; color: rgba(255,255,255,.75); }
.calc-tile { margin-top: .8rem; padding: .45rem .8rem; border-radius: 999px; background: #e3f3ea; color: #14573f; font-size: .85rem; font-weight: 700; text-align: center; }
.h-soil { fill: #f1e9dd; } .h-gnd { stroke: #8f7f69; stroke-width: 2; }
.h-wall, .h-roof, .h-out, .h-furn, .h-brk { stroke: var(--navy); stroke-width: 2; }
.h-wall { fill: #fff; } .h-roof { fill: #dbe7f2; stroke-linejoin: round; } .h-out { fill: #e6ecf2; } .h-furn { fill: #d9e2ea; } .h-brk { fill: none; }
.faint { opacity: .4; stroke-dasharray: 5 4; } .h-nb { fill: #edf1f5; stroke: #c4d0db; }
.h-base { fill: #f6f1ea; stroke: #b8a990; stroke-dasharray: 4 3; } .h-line { stroke: var(--line); stroke-width: 2; }
.h-win { fill: #cfe6f5; } .h-door { fill: #c3d1de; } .h-bb { fill: var(--warm); } .h-in { fill: var(--blue); } .h-coil { fill: var(--cool); }
.h-fan { fill: none; stroke: var(--muted); stroke-width: 2; } .h-pad { fill: #b8a990; } .h-cap { fill: #9aacbd; }
.h-ls, .h-duct { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; } .h-ls { stroke: var(--cool); } .h-duct { stroke: #a9b8c6; stroke-width: 4; }
.h-furn.gas, .h-stf { stroke: var(--warm); } .h-stf { fill: #f8e4d4; stroke-width: 2; } .h-brick { stroke: var(--warm); }
.h-tank { fill: #cbbb9f; stroke: #8f7f69; } .h-tank.gone { opacity: .3; stroke-dasharray: 3 3; } .h-hum { fill: #bfe3f5; stroke: var(--blue); }

/* the gate */
.calc-gsum { margin-bottom: .8rem; font-size: .88rem; font-weight: 600; color: #14573f; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.calc-err-sum, .calc-away, .calc-see, .calc-priv { grid-column: 1 / -1; }
.calc-err-sum, .calc-err { font-weight: 600; color: #b3261e; }
.calc-err-sum:empty { display: none; }
.calc-field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.calc-field input { font-size: 1rem; }
.calc input[aria-invalid="true"] { border-color: #b3261e; }
.calc-field small, .calc-priv { font-size: .8rem; color: var(--muted); }
.calc-err { min-height: 1.1em; font-size: .84rem; }
.calc-away, .calc-note { padding: .7rem .9rem; background: #fff6ee; border-left: 3px solid var(--warm); border-radius: 0 10px 10px 0; font-size: .88rem; }
.calc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.calc-see { justify-self: start; padding: .9rem 1.8rem; font-size: 1.05rem; }

/* results */
.calc-thanks { margin-bottom: .6rem; font-weight: 700; color: #14573f; }
.calc-price { padding: 1.4rem 1.5rem; border-radius: 14px; color: #fff; outline: none; background: linear-gradient(140deg, var(--navy), #14476f); }
.calc-price h2 { margin: .3rem 0 .5rem; font-size: clamp(1.7rem, 5vw, 2.5rem); line-height: 1.15; font-variant-numeric: tabular-nums; }
.calc-price h2 span { font-size: .55em; font-weight: 600; color: rgba(255,255,255,.8); }
.calc-price p { font-size: .92rem; color: rgba(255,255,255,.88); }
.calc-before { margin-top: .3rem; }
.calc-chips-s { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.calc-chips-s span { padding: .2rem .7rem; border-radius: 999px; background: rgba(255,255,255,.14); font-size: .78rem; font-weight: 600; }
.calc-note { margin-top: .8rem; }
.calc-fail { margin-bottom: 1rem; padding: 1rem 1.1rem; border-radius: 12px; background: #fdecea; border: 1px solid #f3b9b3; }
.calc-fail p + p, .calc-res-act { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: .9rem; }
.calc-box { margin-top: 1.4rem; padding: 1.2rem 0 0; border-top: 1px solid var(--line); }   /* a <section>: no site section padding */
.calc-box h3, .calc-res-side h3 { margin-bottom: .6rem; font-size: 1.08rem; color: var(--navy); }
.calc-box h4 { margin: .9rem 0 .2rem; font-size: .92rem; color: var(--navy); }
.calc-small, .calc-prog { margin-top: .4rem; font-size: .86rem; color: var(--muted); }
.calc-opts { display: grid; gap: .7rem; }
.calc-opt { display: flex; align-items: center; gap: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; }
.calc-opt.best { border: 2px solid var(--blue); }
.calc-opt img { flex-shrink: 0; width: 120px; height: 80px; object-fit: contain; }
.calc-opt b, .calc-opt small, .calc-opt span { display: block; }
.calc-opt b { color: var(--navy); }
.calc-opt small { font-size: .84rem; color: var(--muted); }
.calc-opt span, .calc-sav, .calc-table .tot * { font-weight: 700; color: #14573f; }
.calc-opt a { display: inline-flex; align-items: center; min-height: 44px; font-size: .86rem; font-weight: 600; }
.calc-small a, .calc-prog a, .calc-box .steps a { text-decoration: underline; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.calc-table th, .calc-table td { padding: .55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.calc-table th { padding-right: 1rem; text-align: left; font-weight: 600; }
.calc-table th small { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.calc-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-table td + td { padding-left: .9rem; }
.calc-table thead th { text-align: right; font-size: .8rem; color: var(--navy); }
.calc-table thead th small { white-space: normal; }
.calc-table .tot * { font-weight: 800; border-bottom: 0; }
.calc-sav { font-size: 1.15rem; }
.calc-prog { padding-left: 1.1rem; }
.calc-prog li + li { margin-top: .5rem; }
.calc-res-act .btn-outline { background: var(--bg); }
.calc-rating { margin-top: .8rem; font-size: .9rem; font-weight: 600; }

@media (max-width: 899px) {
  .calc { min-height: 0; padding: 1rem; }
  .calc-grid, .calc-results { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  /* the live panel becomes a compact card above the question */
  .calc-side { order: -1; position: static; display: grid; grid-template-columns: 44% minmax(0,1fr); align-items: center; gap: .6rem; padding: .6rem; }
  .calc-side-row { margin-top: 0; }
  .calc-ring { display: none; }
  .calc-lock { padding: .5rem .7rem; }
  .calc-lock-n { font-size: 1.15rem; }
  .calc-tile { grid-column: 1 / -1; margin-top: 0; }
  .calc-step { min-height: 300px; }
  .calc-res-side { position: static; }
}
@media (max-width: 599px) {
  /* phones: the first question shows sooner — a short hero (the "Commencer"
     button is on screen), and the live picture moves under the question */
  .calc-hero { padding: 1.1rem 0 1.3rem; }
  .calc-hero .back-btn, .calc-hero br, .calc-hero .container > p { display: none; }
  .calc-hero h1 { font-size: 1.45rem; }
  .hero-trust { margin-top: .7rem; }
  .calc-start { margin-top: .8rem; }
  .calc-side { order: 1; }
  .calc-section { padding-top: 1rem; }
  .calc-form, .calc-cards { grid-template-columns: minmax(0,1fr); }
  .calc-ch span { visibility: hidden; }
  .calc-ch.on span { visibility: visible; }
  .calc-opt img { width: 72px; height: 56px; }
  /* the two-column breakdown on a phone: each line's name on its own row,
     the low and high amounts side by side under it */
  .calc-table.two, .calc-table.two thead, .calc-table.two tbody { display: block; }
  .calc-table.two tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .calc-table.two th, .calc-table.two td { padding: 0; border: 0; text-align: left; }
  .calc-table.two td + td { padding-left: 0; }
  .calc-table.two thead td { display: none; }
  .calc-table.two thead th { text-align: left; }
  .calc-table.two tbody th { grid-column: 1 / -1; padding: 0 0 .15rem; }
  .calc-table.two .tot { border-bottom: 0; }
  .calc-room { padding: .6rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-step { animation: none; }
  .calc-ch i, .calc-ring .calc-ring-v, .calc-card { transition: none; }
}
