/* Soleillon, application Maison (prototype) – dans le style de Soleillon (web/style.css, web/ui.css) : typographie
   système Apple, verre dépoli, pastilles, ressorts ; le plan à gauche, la feuille à droite (dessous sur téléphone).
   Clair et sombre. */
:root {
  /* les valeurs viennent du système commun (tokens.css), clair et sombre ; ici, ce qui n'appartient qu'à Maison */
  --font: var(--f-text);
  --bg: var(--c-bg); --panel: var(--c-surface); --ink: var(--c-text); --soft: var(--c-text-2); --faint: var(--c-text-3); --line: var(--c-line);
  --fill: var(--c-fill); --fill-2: var(--c-fill-2);
  --accent: var(--c-accent); --accent-ink: var(--c-accent-ink); --accent-soft: color-mix(in srgb, var(--c-accent) 12%, transparent);
  --good: var(--c-good); --warn: var(--c-warn); --bad: var(--c-bad); --sun: #ffc93c; --heat: var(--c-heat); --cold: var(--c-cold);
  --wall: #3a3a3c; --win: #5ac8fa; --grid: #e8e8ed; --focus: var(--c-accent);
  --glass: var(--c-glass); --shadow: 0 1px 1px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .12);
  --spring: var(--ease);
  --r-s: var(--r-1); --r-m: 12px; --r-l: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --wall: #d1d1d6; --win: #64d2ff; --grid: #2c2c2e; --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .5); color-scheme: dark; }
}
:root[data-theme="dark"] { --wall: #d1d1d6; --win: #64d2ff; --grid: #2c2c2e; --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .5); color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent); outline-offset: 2px; }

/* barre du haut : marque, étapes numérotées */
.mh { position: relative; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-bottom: .5px solid var(--line); flex-wrap: wrap; }
.mh-brand { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 17px; letter-spacing: -.02em; }
.mh-brand::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; background: radial-gradient(circle at 35% 35%, #ffe08a, #ff9f0a); box-shadow: 0 0 0 3px rgba(255, 159, 10, .18); }
.mh-app { font-weight: 600; color: var(--soft); }
.mh-app em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.mh-steps { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; background: var(--fill); border-radius: 999px; padding: 3px; }
.mh-steps button { border: 0; background: none; border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 13px; font-weight: 500; color: var(--soft); display: inline-flex; align-items: center; gap: 6px; transition: background .3s var(--spring), color .3s; }
.mh-steps button i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--fill-2); color: var(--soft); }
.mh-steps button.done i { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.mh-steps button[aria-current="step"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.mh-steps button[aria-current="step"] i { background: var(--accent); color: #fff; }
.mh-steps button:disabled { opacity: .4; cursor: default; }

/* trois colonnes, comme Soleillon : les réglages de ce qu'on regarde à gauche, la maquette au milieu, les résultats à
   droite ; au-dessus, la maison en bref (étapes Adresse et Maison : la maquette et une feuille, sans colonne de gauche) */
.mm { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "stage side"; min-height: 0; }
.mm.three { grid-template-columns: 330px minmax(0, 1fr) 380px; grid-template-areas: "left stage side"; }
.mm-stage { grid-area: stage; } .mm-side { grid-area: side; } .mm-left { grid-area: left; }
.mm:not(.three) .mm-left { display: none; }
.mm-left { background: var(--panel); overflow-y: auto; padding: 18px 18px 24px; min-height: 0; box-shadow: 1px 0 0 var(--line); }
.mm-left:empty { display: none; }
@media (max-width: 1180px) and (min-width: 801px) {
  .mm.three { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "stage left" "stage side"; }
  .mm.three .mm-left { box-shadow: -1px 0 0 var(--line), 0 1px 0 var(--line); }
}
/* la maison en bref : une pastille par étape, à jour à chaque changement ; la toucher y mène */
.mm-sum { display: flex; gap: 6px; padding: 7px 16px; overflow-x: auto; background: var(--panel); border-bottom: .5px solid var(--line); scrollbar-width: none; }
.mm-sum[hidden] { display: none; }
.mm-sum button { flex: none; border: 0; background: var(--fill); border-radius: var(--r-m); padding: 5px 12px 5px 9px; display: flex; align-items: center; gap: 8px; text-align: left; transition: background .3s var(--spring); }
.mm-sum button:hover { background: var(--fill-2); }
.mm-sum button[aria-current="step"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.mm-sum i { font-style: normal; font-size: 17px; }
.mm-sum b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mm-sum small { display: block; font-size: 11px; color: var(--soft); white-space: nowrap; }
.mm-sum .stale b { color: var(--faint); font-weight: 500; }
.mm-sum .d { font-size: 11px; font-weight: 600; margin-left: 4px; } .mm-sum .d.good { color: var(--good); } .mm-sum .d.bad { color: var(--warn); }
.mm-stage { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(1200px 600px at 30% 20%, color-mix(in srgb, var(--accent) 5%, var(--bg)), var(--bg)); }
.mm-stage svg:not(.ic) { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
/* pendant le film, la maquette tient au-dessus du bandeau : le sol et ses cartes restent visibles */
.mm-stage:has(.film) > svg { height: calc(100% - 250px); }
@media (max-width: 800px) { .mm-stage:has(.film) > svg { height: calc(100% - 200px); } }
.mm-side { background: var(--panel); overflow-y: auto; padding: 18px 18px 24px; min-height: 0; box-shadow: -1px 0 0 var(--line); }
.mf { font-size: 11px; color: var(--faint); padding: 6px 16px; border-top: .5px solid var(--line); background: var(--panel); }
@media (max-width: 800px) {
  .mm, .mm.three { grid-template-columns: 1fr; grid-template-rows: 52vh auto; grid-template-areas: "stage" "side"; }
  .mm.three { grid-template-rows: 52vh auto auto; grid-template-areas: "stage" "left" "side"; }
  /* téléphone : la maquette reste en haut, les réglages puis les résultats glissent par-dessus en une seule page */
  .mm.three { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .mm.three .mm-stage { position: sticky; top: 0; z-index: 1; }
  .mm.three { grid-template-rows: 52vh max-content max-content; }
  .mm.three .mm-left, .mm.three .mm-side { overflow: visible; min-height: auto; }
  .mm.three .mm-side { margin-top: 0; border-radius: 0; box-shadow: 0 -1px 0 var(--line); }
  .mm-sum { padding: 6px 10px; }
  .mm-left, .mm-side { box-shadow: 0 -1px 0 var(--line); border-radius: var(--r-l) var(--r-l) 0 0; margin-top: -14px; position: relative; z-index: 3; }
  .mh-steps button { padding: 4px 8px 4px 4px; font-size: 12px; }
  /* les étapes sur une ligne, qui défile du doigt */
  .mh-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; margin-left: 0; }
  .mh-steps::-webkit-scrollbar { display: none; }
  .mh-steps button { flex: none; }
}

h2 { font: 700 24px/1.15 var(--font); letter-spacing: -.02em; margin: 0 0 6px; }
h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--soft); margin: 22px 0 8px; }
p { margin: 6px 0; }
.note { font-size: 13px; color: var(--soft); line-height: 1.4; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.row label { font-size: 13px; color: var(--soft); }
.field { display: grid; gap: 5px; margin: 12px 0; }
.field > span { font-size: 13px; color: var(--soft); font-weight: 500; }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], select { width: 100%; padding: 9px 12px; border: 0; border-radius: var(--r-s); background: var(--fill); font-size: 15px; }
input[type="search"] { height: 44px; border-radius: var(--r-l); padding: 0 16px; }
input[type="number"] { width: 90px; }
.btn { border: 0; background: var(--fill); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; color: var(--accent); transition: transform .2s var(--spring), background .2s; }
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); height: 44px; padding: 0 20px; border-radius: var(--r-m); }
.btn.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }
.grow { flex: 1; }
.list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.list button { width: 100%; text-align: left; border: 0; background: var(--fill); border-radius: var(--r-m); padding: 10px 14px; font-size: 14px; }
.list button:hover { background: var(--fill-2); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.warn { color: var(--warn); font-size: 13px; }
.card { border-radius: var(--r-m); padding: 12px 14px; margin: 10px 0; background: var(--fill); }
.card b { font-weight: 600; }
.kpi { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0; }
.kpi div { display: grid; }
.kpi strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--soft); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { padding: 5px 4px; text-align: left; border-bottom: .5px solid var(--line); }
th { color: var(--soft); font-weight: 500; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--soft); }
.legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.status { font-size: 13px; color: var(--soft); display: flex; align-items: center; gap: 10px; }
.status::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--fill-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.chrono { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--soft); }
.chart svg:not(.ic) { width: 100%; height: auto; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }

/* le grand chiffre, et ce qu'il gagne ou perd depuis le point de départ */
.hero { display: grid; gap: 2px; }
.hero .n { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero .n small { font-size: 20px; font-weight: 600; letter-spacing: 0; color: var(--soft); margin-left: 5px; }
.hero p { margin: 4px 0 0; color: var(--soft); font-size: 14px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; margin-top: 6px; width: fit-content; }
.delta.good { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.delta.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.delta.same { color: var(--soft); background: var(--fill); }
.tip { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); color: var(--ink); border-radius: var(--r-m); padding: 10px 12px; font-size: 13px; margin: 10px 0; }
.tip::before { content: "✦"; color: var(--accent); font-weight: 700; }

/* sur le plan : bulle de note, notification, éditeur posé à côté d'un élément */
.badge { position: absolute; left: 16px; top: 16px; z-index: 4; display: flex; gap: 10px; align-items: center; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; pointer-events: none; transition: transform .4s var(--spring); }
.badge .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; }
.badge.hint { left: 50%; top: auto; bottom: 16px; transform: translateX(-50%); font-weight: 500; color: var(--soft); }
.toast { position: fixed; left: 50%; top: 116px; z-index: 6; transform: translate(-50%, -12px); opacity: 0; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--panel);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: transform .45s var(--spring), opacity .3s; pointer-events: none; white-space: nowrap; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.pop { position: absolute; z-index: 7; width: 300px; max-width: calc(100% - 32px); padding: 14px 16px; border-radius: var(--r-l); background: var(--panel); box-shadow: var(--shadow), 0 0 0 .5px var(--line);
  transform-origin: top left; animation: pop .35s var(--spring); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.pop h4 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pop h4 button { margin-left: auto; border: 0; background: var(--fill); border-radius: 50%; width: 26px; height: 26px; color: var(--soft); }
.opts { display: grid; gap: 6px; grid-template-columns: repeat(2, 1fr); margin: 6px 0; }
.opts button { min-height: 40px; border: 0; border-radius: var(--r-s); padding: 6px 10px; background: var(--fill); font-size: 13px; font-weight: 600; text-align: left; line-height: 1.2; }
.opts button small { display: block; font-weight: 400; color: var(--soft); font-size: 11px; }
.opts button.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }

/* plan */
.pl-room { stroke: var(--wall); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .5s ease; }
.pl-room.sel { stroke: var(--accent); stroke-width: 3; }
.pl-ext { stroke: var(--wall); stroke-width: 5; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.pl-part { stroke: var(--wall); stroke-width: 2; vector-effect: non-scaling-stroke; }
.pl-hit { stroke: transparent; stroke-width: 16; vector-effect: non-scaling-stroke; }
.pl-hit.move:hover, .pl-hit.drag { stroke: color-mix(in srgb, var(--accent) 45%, transparent); }
.pl-win { stroke: var(--win); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pl-win.sel { stroke: var(--accent); }
.pl-win.bad { stroke: var(--bad); }
.pl-ghost { fill: none; stroke: var(--soft); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .7; }
.pl-cut { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.pl-label { fill: #1d1d1f; font-weight: 600; text-anchor: middle; pointer-events: none; }
.pl-dim { fill: var(--accent); text-anchor: middle; pointer-events: none; font-weight: 600; }
.pl-bld { fill: var(--grid); stroke: var(--soft); stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; }
.pl-bld.chosen { fill: color-mix(in srgb, var(--accent) 30%, transparent); stroke: var(--accent); stroke-width: 2; }
.pl-sun { fill: var(--sun); pointer-events: none; }
.pl-north { fill: var(--soft); font-weight: 600; }
.pl-handle { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; cursor: ew-resize; }
.pl-grab { cursor: grab; }
.pl-grab:active { cursor: grabbing; }

/* murs : coupe, couches, pioche */
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.coupe-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--soft); margin-top: 6px; }
.coupe { position: relative; display: flex; height: 64px; border-radius: var(--r-s); overflow: hidden; background: var(--fill); box-shadow: inset 0 0 0 .5px var(--line); }
.coupe.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.coupe-l { display: flex; align-items: center; justify-content: center; min-width: 8px; border-right: 1px solid rgba(0, 0, 0, .18); cursor: grab; font-size: 11px; font-weight: 600; color: #1d1d1f; transition: flex-grow .4s var(--spring); }
.coupe-l:last-child { border-right: 0; }
.coupe-empty { margin: auto; font-size: 13px; color: var(--soft); }
.coupe-mark { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--accent); pointer-events: none; }
.coupe-trash { margin-top: 6px; border: 1.5px dashed var(--line); border-radius: var(--r-s); padding: 8px; text-align: center; font-size: 12px; color: var(--soft); }
.coupe-trash.over { border-color: var(--bad); color: var(--bad); }
table.layers td { vertical-align: middle; }
table.layers input[type="number"] { width: 64px; padding: 5px 7px; }
table.layers .btn.small { padding: 3px 8px; margin-left: 2px; }
table.layers td.n { white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--fill); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: grab; transition: transform .2s var(--spring); }
.chip:hover { background: var(--fill-2); transform: translateY(-1px); }
.chip i { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.mini { display: flex; height: 8px; border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.mini i { display: block; }

/* chauffage : carte jour × heure */

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
.pl-drop { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.mm-stage svg text { letter-spacing: normal; }
label.row { flex-wrap: nowrap; align-items: flex-start; }
label.row input[type="checkbox"] { margin-top: 3px; flex: none; accent-color: var(--accent); }
.rooms { display: grid; gap: 4px; margin: 8px 0 4px; }
.rooms button { display: grid; grid-template-columns: 1fr 90px 40px; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px; border-radius: var(--r-s); font-size: 13px; text-align: left; }
.rooms button:hover, .rooms button.on { background: var(--panel); }
.rooms button.on { box-shadow: inset 0 0 0 2px var(--accent); }
.rooms i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--c) var(--w), var(--fill-2) var(--w)); }
.rooms small { text-align: right; font-variant-numeric: tabular-nums; color: var(--soft); }
.cost { margin-top: 8px; display: flex; align-items: baseline; flex-wrap: wrap; }
.cost b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cost > span { color: var(--soft); font-size: 14px; margin-left: 4px; }
details.prices { margin: 12px 0; background: var(--fill); border-radius: var(--r-m); padding: 8px 12px; }
details.prices summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.pl-pill { fill: rgba(255, 255, 255, .88); stroke: rgba(0, 0, 0, .08); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
.pl-pilltext { fill: #1d1d1f; font-weight: 600; text-anchor: middle; pointer-events: none; font-variant-numeric: tabular-nums; }

/* tableau de score */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--fill); border-radius: var(--r-m); padding: 10px 10px 8px; display: grid; gap: 2px; align-content: start; position: relative; overflow: hidden; }
.tile.main { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--panel)), var(--fill)); }
.tile > i { font-style: normal; font-size: 20px; line-height: 1; }
.tile .big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile.main .big { font-size: 30px; }
.tile small { font-size: 13px; color: var(--soft); font-weight: 600; }
.tile > span:not(.delta) { font-size: 11px; color: var(--soft); line-height: 1.2; }
.tile .delta { font-size: 11px; padding: 2px 8px; margin-top: 4px; }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr 1fr; } .tile.main { grid-column: 1 / -1; } }

/* gestes */

/* leviers */

.chiprow { display: flex; flex-wrap: wrap; gap: 6px; }
.chiprow button { border: 0; border-radius: 999px; padding: 7px 12px; background: var(--panel); font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: 0 0 0 .5px var(--line); transition: transform .2s var(--spring), background .2s; }
.chiprow button:hover { transform: translateY(-1px); }
.chiprow button.on { background: var(--accent); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--panel); font-size: 22px; font-weight: 600; color: var(--accent); box-shadow: 0 0 0 .5px var(--line); }
.stepper button:active { transform: scale(.94); }
.stepper b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; min-width: 110px; text-align: center; font-variant-numeric: tabular-nums; }
/* les systèmes en plus du chauffage (maison.js sysFold) : repliés, un titre et leur état en une ligne */
details.more { margin: 14px 0; background: var(--fill); border-radius: var(--r-m); padding: 10px 14px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.more[open] summary { margin-bottom: 8px; }

/* sur le plan : onglets de carte, météo */
.maptabs { position: absolute; z-index: 4; left: 50%; top: 14px; transform: translateX(-50%); display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow); }
.maptabs button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--soft); white-space: nowrap; transition: background .3s var(--spring); }
.maptabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
/* les repères du besoin au m² : une bande par époque, la maison marquée d'un trait */

/* la valeur au point touché */
.ptip { position: absolute; z-index: 7; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none; max-width: 280px; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--panel); font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.weather { position: absolute; z-index: 4; right: 16px; bottom: 16px; padding: 7px 12px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: var(--shadow); font-size: 12px; font-weight: 600; color: var(--soft); }
.badge { top: 64px; }
@media (max-width: 800px) { .maptabs button { padding: 6px 9px; font-size: 12px; } .weather { display: none; } }
@media (max-width: 800px) { .badge.hint { display: none; } .toast { top: 96px; white-space: normal; max-width: calc(100% - 32px); text-align: center; } }

/* maquette */
.iso-wall polygon { stroke: rgba(0, 0, 0, .18); stroke-width: .6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.iso-furn polygon { stroke: rgba(0, 0, 0, .22); stroke-width: .5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.iso-furn.dim { opacity: .82; }
.iso-emit polygon { stroke: #ff6b2c; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.iso-pane { fill: rgba(140, 205, 255, .7); stroke: #2f9bdc; stroke-width: 1; vector-effect: non-scaling-stroke; }
.iso-pane.ghost { fill: rgba(140, 205, 255, .22); stroke-dasharray: 3 2; }
.iso-pane.sel { stroke: var(--accent); stroke-width: 2.5; }
.tag { fill: rgba(255, 255, 255, .94); stroke: rgba(0, 0, 0, .1); stroke-width: .6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 .05px .12px rgba(0, 0, 0, .25)); }
.tag-t { fill: #1d1d1f; font-weight: 700; text-anchor: middle; }
.tag2 { fill: #e9e9ee; }
.tag2-t { fill: #1d1d1f; font-weight: 700; text-anchor: middle; font-variant-numeric: tabular-nums; }
.tag-stem { stroke: rgba(0, 0, 0, .25); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 2 2; }
.viewtog { position: absolute; z-index: 4; left: 16px; bottom: 16px; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow); }
.viewtog button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--soft); }
.viewtog button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.viewtog i { width: 1px; background: var(--line); margin: 4px 2px; }
.viewtog button[title] { min-width: 34px; }

/* le film des étapes du calcul */
.film { position: absolute; z-index: 6; left: 50%; bottom: 64px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); padding: 14px 16px 12px; border-radius: var(--r-l);
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow), 0 0 0 .5px var(--line); animation: pop .45s var(--spring); }
.film p { margin: 8px 0 10px; font-size: 15px; line-height: 1.45; }
.dots { display: flex; gap: 5px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--fill-2); }
.dots button.done { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.dots button.on { background: var(--accent); width: 20px; border-radius: 4px; }
@keyframes filmbar { to { width: 100%; } }
.iso-pane.lit { fill: rgba(255, 214, 92, .9); stroke: #ff9f0a; filter: drop-shadow(0 0 .15px #ffcc33); }
@media (max-width: 800px) { .film { bottom: 12px; } .film p { font-size: 13px; } }

/* l'appréciation en mots */
.diag { display: grid; gap: 6px; }
.diag-i { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-m); padding: 10px 12px; background: var(--fill); border-left: 4px solid var(--soft); }
.diag-i.bad { border-left-color: #ff9f0a; background: color-mix(in srgb, #ff9f0a 10%, var(--fill)); }
.diag-i.good { border-left-color: var(--good); background: color-mix(in srgb, var(--good) 9%, var(--fill)); }
.diag-i > i { font-style: normal; font-size: 20px; line-height: 1.2; }
.diag-i b { font-size: 14px; display: block; }
.diag-i p { margin: 2px 0 0; font-size: 13px; color: var(--soft); line-height: 1.4; }
.diag-i .btn { align-self: center; white-space: nowrap; }

/* les alentours : relevé laser et BD TOPO */
.env-bd { fill: none; stroke: #8a8378; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.env-bd.own { stroke: #ff7a1a; stroke-width: 2.5; }
.env-ghost polygon { fill: #ff7a1a; fill-opacity: .22; stroke: none; }
.env-legend { position: absolute; z-index: 4; left: 16px; top: 64px; display: flex; flex-direction: column; gap: 4px; max-width: 290px; padding: 10px 12px; border-radius: var(--r-m, 12px);
  background: var(--glass); backdrop-filter: blur(12px); font-size: 12px; color: var(--ink); }
.env-legend span { display: flex; align-items: center; gap: 8px; }
.env-legend i { flex: none; width: 14px; height: 10px; border-radius: 2px; }
.env-legend i.dash { height: 0; border-top: 2.5px dashed #ff7a1a; }
.env-legend small { color: var(--soft); margin-top: 2px; }

/* le choix du parcours */
.choice { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; width: 100%; text-align: left; border: 1px solid var(--line, rgba(127,127,127,.25)); background: var(--fill); color: var(--ink);
  border-radius: var(--r-m, 12px); padding: 14px; margin: 10px 0; cursor: pointer; transition: transform .2s, border-color .2s; }
.choice:hover { border-color: var(--accent); transform: translateY(-1px); }
.choice i { grid-row: span 2; font-style: normal; font-size: 28px; align-self: center; }
.choice b { font-size: 16px; }
.choice span { font-size: 13px; color: var(--soft); line-height: 1.4; }
/* les volumes en carreaux (alentours, maison entière) : un liseré de leur couleur cache les joints */
.iso-env polygon { stroke-width: 0.02; stroke-linejoin: round; }

/* la 3D en WebGL : le plan au sol (SVG en CSS 3D), les volumes (toile WebGL), les étiquettes (HTML) */
.gl3 { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; cursor: grab; }
.gl3:active { cursor: grabbing; }
.gl3-floor { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.gl3-floor > svg { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: visible; }
/* le plan au sol est dessiné en texture (maison-3d.js) : le SVG garde les clics, seul l'aperçu de l'outil s'y voit */
.gl3-floor > svg > :not(#preview) { opacity: 0; }
.gl3-canvas { position: absolute; inset: 0; pointer-events: none; }
.gl3-tags { position: absolute; inset: 0; pointer-events: none; }
.tag3 { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; white-space: nowrap; }
.tag3 b { background: rgba(255, 255, 255, .94); color: #1d1d1f; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.tag3 span { background: #e9e9ee; color: #1d1d1f; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.tag3.small b { font-size: 10.5px; padding: 2px 8px; }
.tag3.jet b { background: #fff1e6; color: #b4410a; }
.gl3-compass { position: absolute; right: 18px; top: 64px; width: 44px; height: 44px; border-radius: 50%; background: var(--glass); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; color: var(--ink); }
.gl3-compass i { font-style: normal; font-size: 12px; color: #ff453a; line-height: 1; }
.gl3-compass b { font-size: 12px; line-height: 1; }
.btn.next { width: 100%; margin: 6px 0 4px; }
/* le plan dessiné : contour, cloisons, cotes, sommets, vides */
.pl-ext2 { stroke: var(--wall); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.pl-ext2.sel, .pl-part2.sel { stroke: var(--accent); }
.pl-part2 { stroke: var(--wall); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.pl-cote { fill: var(--c-sun-text); font-weight: 700; text-anchor: middle; dominant-baseline: middle; cursor: pointer; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.pl-cote.ok { fill: #30d158; }
.pl-cote.small { fill: var(--soft); font-weight: 600; }
.pl-cote.sel { fill: var(--accent); }
.pl-vertex { fill: #fff; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; cursor: grab; }
.pl-vertex.sel { fill: var(--accent); }
.pl-draft { fill: var(--accent); }
.pl-void { stroke: #8e8e93; stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.pl-void.sel { stroke: var(--accent); }
.pl-label.sub { font-weight: 500; opacity: .75; }
.pl-void.above { stroke-dasharray: 2 4; opacity: .6; }
.pl-coll { stroke: #2b2b30; stroke-width: 7; stroke-linecap: butt; vector-effect: non-scaling-stroke; }
/* l'emprise relevée (BD TOPO, revue dans Soleillon) sous le plan du rez-de-chaussée : le calage */
.pl-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; opacity: .7; pointer-events: none; }
/* ouverte depuis Soleillon, dans un cadre */
.mh-back { margin-left: auto; }
/* les portes intérieures : l'ouverture dans la cloison, le vantail et son arc */
.pl-door-gap { stroke: var(--panel); stroke-width: 5; vector-effect: non-scaling-stroke; }
.pl-door-leaf { stroke: var(--wall); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pl-door-arc { fill: none; stroke: var(--wall); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pl-door { pointer-events: none; }
.pl-door.sel .pl-door-leaf, .pl-door.sel .pl-door-arc { stroke: var(--accent); }
/* une ouverture : limite de zone sans mur, en pointillés */
.pl-part2.open { stroke-dasharray: 6 5; stroke-width: 2; opacity: .8; }
/* la légende de chaque écran, sur la maquette */
.mapkey { position: absolute; right: 16px; bottom: 64px; z-index: 6; max-width: 250px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(8px); border-radius: 12px; padding: 8px 10px; box-shadow: 0 4px 16px rgba(0,0,0,.12); font-size: 12px; display: grid; gap: 4px; pointer-events: none; }
.mapkey b { font-size: 12px; }
/* échelles par classes : une case par classe, séparées d'un filet, les bornes dessous */

.mapkey .mk-sw { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.mapkey .mk-sw i { width: 14px; height: 10px; border-radius: 3px; flex: none; }
@media (max-width: 760px) { .mapkey { right: 8px; bottom: 56px; max-width: 200px; } }
/* l'aperçu de l'outil (la fenêtre qu'on poserait, le tracé en cours) ne prend pas le doigt : une fenêtre posée dessous se glisse */
#preview, #preview * { pointer-events: none; }
/* la température dehors du calcul du confort, choisie à la main */

/* dans la colonne de gauche, avec les autres réglages */

/* le plancher solaire direct : la chaleur donnée à la dalle, mois par mois (maison.js psdPanel) */

/* ---------------------------------------------------------------- le tableau de bord et les onglets du chauffage */

.mh-steps button.dash { color: var(--ink); font-weight: 600; }
.mh-steps button.dash i { background: color-mix(in srgb, var(--c-accent) 18%, transparent); color: var(--accent); font-size: 13px; }
.dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 12px; }
.dash .c-stat { text-align: left; border: 0; cursor: pointer; padding: 14px; font: inherit; transition: transform .2s var(--ease), box-shadow .2s; }
.dash .c-stat:hover { box-shadow: 0 0 0 1px var(--c-line), var(--sh-2); }
.dash .c-stat { padding: 12px 10px; gap: 4px; }
.dash .c-stat strong { font-size: 19px; white-space: normal; }
.dash .c-stat span { font-size: 12px; }
.dash .c-stat.big { grid-column: 1 / -1; background: linear-gradient(135deg, color-mix(in srgb, var(--c-heat) 14%, var(--c-surface)), var(--c-surface)); }
.dash .c-stat.big { padding: 16px 14px; }
.dash .c-stat.big strong { font-size: 40px; color: var(--c-heat); }
.dash .c-stat.big span { font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: 13px; background: var(--fill); color: var(--soft); }
.pill b { font-variant-numeric: tabular-nums; }
.pill.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.pill.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.guide { display: flex; gap: 4px; padding: 0; margin: 10px 0; list-style: none; counter-reset: none; }
.guide li { flex: 1; display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 10px; background: var(--fill); font-size: 12px; color: var(--soft); }
.guide li i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--font); font-style: normal; background: var(--fill-2); }
.guide li.now { background: var(--accent-soft); color: var(--ink); font-weight: 600; } .guide li.now i { background: var(--accent); color: #fff; }
.guide li.done i { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
details.fine { margin: 6px 0; }
details.fine > summary { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; }
details.fine > summary::-webkit-details-marker { display: none; }
details.fine > summary::before { content: "›"; display: inline-block; margin-right: 6px; transition: transform .2s; }
details.fine[open] > summary::before { transform: rotate(90deg); }
details.fine[open] > summary { margin-bottom: 6px; }

/* les icônes (icons.js) dans leur pastille : un carré arrondi, toujours de même allure */
.mm-sum i, .tile > i, .diag-i > i, .choice i { display: inline-grid; place-items: center; flex: none; border-radius: 9px; background: var(--c-fill); line-height: 1; }
.mm-sum i { width: 30px; height: 30px; font-size: 16px; }
.tile > i, .diag-i > i { width: 34px; height: 34px; font-size: 18px; }
 .choice i { width: 40px; height: 40px; font-size: 21px; border-radius: 11px; }
.mm-sum i .ic, .tile > i .ic, .diag-i > i .ic, .choice i .ic { width: 1em; height: 1em; vertical-align: 0; }
.ic + span, span + .ic { margin-left: .1em; }

/* le verre dépoli : le fond à peine teinté, les colonnes et la maison en bref translucides */
body { background: var(--c-backdrop), var(--bg); background-attachment: fixed; }
.mm-left, .mm-side, .mm-sum { background: color-mix(in srgb, var(--c-surface) 76%, transparent); -webkit-backdrop-filter: saturate(1.7) blur(24px); backdrop-filter: saturate(1.7) blur(24px); }
.mm-sum button { background: color-mix(in srgb, var(--c-surface) 70%, transparent); }
.dash .c-stat { background: color-mix(in srgb, var(--c-surface) 88%, transparent); box-shadow: inset 0 .5px 0 var(--c-glass-edge), 0 0 0 .5px var(--c-line), 0 4px 16px rgba(20,30,50,.05); }
/* le plan seul (depuis Soleillon, les fenêtres en détail) : ni bandeau, ni cartes, ni météo, ni film */
body.plan-only .mm-sum, body.plan-only .maptabs, body.plan-only .weather, body.plan-only .film { display: none !important; }

/* le plan seul : les murs et les vitrages d'un toucher */
.quick h3 { margin: 0 0 2px; font-size: 15px; }
.quick .note { margin: 0 0 10px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.quick-tile { display: grid; gap: 2px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--c-fill, #f2f2f5); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.quick-tile b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.quick-tile span { font-size: 11.5px; line-height: 1.25; color: var(--c-text-2, #6e6e73); }
.quick-tile:hover { background: var(--c-fill-2, #e8e8ed); }
.quick-tile[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--c-accent, #0071e3); background: var(--c-surface, #fff); }
.quick-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 14px; background: var(--c-fill, #f2f2f5); }
.quick-seg button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 11px; background: none; color: inherit; font: 500 13px/1 inherit; cursor: pointer; white-space: nowrap; }
.quick-seg button[aria-pressed="true"] { background: var(--c-surface, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

/* ---------------------------------------------------------------- la coquille (refonte du 29 octobre 2026)
   Comme le parcours express : la marque, quatre étapes en barre de progression, le chauffage en direct, et deux zones
   (la maison en grand, puis un seul panneau : les réglages de l'étape et ses résultats, l'un sous l'autre). */
.mh { gap: 16px; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); box-shadow: 0 1px 0 var(--line); }
.mh-brand { font: 600 17px/1 var(--f-display, var(--font)); }
.mh-app { font: 600 17px/1 var(--f-display, var(--font)); color: var(--soft); }
.mh-steps { flex: 1; justify-content: center; align-items: center; gap: 18px; margin: 0; background: none; padding: 0; flex-wrap: nowrap; }
.mh-steps .mh-where { flex: none; padding: 7px 12px; border-radius: 999px; font-size: 14px; color: var(--accent); }
.mh-steps .mh-where:hover { background: var(--fill); }
.mh-steps .mh-where.on { background: var(--fill); color: var(--ink); font-weight: 600; box-shadow: none; }
.mh-prog { display: flex; gap: 6px; }
.mh-prog button { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 120px; padding: 6px 4px 4px; border-radius: 0; background: none; box-shadow: none !important; font-size: 13px; font-weight: 500; color: var(--soft); }
.mh-prog button::before { content: ""; align-self: stretch; height: 4px; border-radius: 2px; background: var(--fill-2); transition: background .3s; }
.mh-prog button.done::before, .mh-prog button[aria-current="step"]::before { background: var(--accent); }
.mh-prog button > i { display: none; }
.mh-prog button[aria-current="step"] { color: var(--ink); font-weight: 600; background: none; }
.mh-prog button:not(:disabled):hover { color: var(--ink); }
.mh-live { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--fill); font-variant-numeric: tabular-nums; }
.mh-live[hidden] { display: none; }
.mh-live:hover { background: var(--fill-2); }
.mh-live small { font-size: 12px; color: var(--soft); }
.mh-live b { font-size: 15px; font-weight: 650; }
.mh-live .d { font-size: 12px; font-weight: 600; color: var(--soft); } .mh-live .d.good { color: var(--good); } .mh-live .d.bad { color: var(--warn); }
.mh-live.stale b { color: var(--faint); font-weight: 500; }
.mh-back { margin-left: 0; }

.mm, .mm.three { grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: minmax(0, 1fr); grid-template-areas: "stage panel"; }
.mm-panel { grid-area: panel; min-height: 0; overflow-y: auto; background: var(--panel); box-shadow: -1px 0 0 var(--line); }
.mm-panel .mm-left, .mm-panel .mm-side { overflow: visible; min-height: auto; box-shadow: none; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; margin: 0; padding: 20px 22px; }
.mm.three .mm-panel .mm-left:not(:empty) + .mm-side { border-top: 1px solid var(--line); }
.mm:not(.three) .mm-panel .mm-left { display: none; }
.mm-panel h2 { font: 700 24px/1.15 var(--f-display, var(--font)); letter-spacing: -.02em; }
/* murs et fenêtres : l'un ou l'autre */
.mm-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin: 0 0 16px; border-radius: 12px; background: var(--fill); }
.mm-seg button { border: 0; border-radius: 9px; padding: 8px 10px; background: none; font-size: 14px; font-weight: 500; color: var(--soft); }
.mm-seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
@media (max-width: 1180px) and (min-width: 801px) {
  .mm, .mm.three { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr); grid-template-areas: "stage panel"; }
  .mh-prog button { min-width: 96px; }
}
@media (max-width: 800px) {
  .mh { flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
  .mh-steps { order: 3; flex: 1 0 100%; justify-content: flex-start; gap: 10px; overflow-x: auto; scrollbar-width: none; }
  .mh-prog button { min-width: 84px; font-size: 12px; }
  .mh-live { margin-left: auto; padding: 6px 12px; }
  .mm, .mm.three { grid-template-columns: 1fr; grid-template-rows: 52vh max-content; grid-template-areas: "stage" "panel"; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .mm-panel { overflow: visible; box-shadow: 0 -1px 0 var(--line); border-radius: var(--r-l) var(--r-l) 0 0; margin-top: -14px; position: relative; z-index: 3; }
  /* au doigt : l'en-tête sur une ligne et les étapes, le plan garde la hauteur ; des boutons qu'on touche sans viser */
  .mh-app { display: none; }
  .mm:has(.mm-panel[data-step="plan"]) .mapkey, .mm:has(.mm-panel[data-step="fenetres"]) .mapkey { display: none; }   /* elle couvrait le bas du plan */
  .mm-panel .btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .mm-panel .mf { padding: 12px 22px 18px; border-top: 1px solid var(--line); background: none; }
}
/* votre maison (le résultat) : les résultats d'abord, les réglages dessous */
.mm-panel[data-step="chauffage"] { display: flex; flex-direction: column; }
.mm-panel[data-step="chauffage"] .mm-side { order: -1; }
.mm.three .mm-panel[data-step="chauffage"] .mm-side + .mm-left, .mm.three .mm-panel[data-step="chauffage"] .mm-left:not(:empty) { border-top: 1px solid var(--line); }
.mm.three .mm-panel[data-step="chauffage"] .mm-left:not(:empty) + .mm-side { border-top: 0; }
/* votre maison : les cartes du résultat (le chauffage, le confort l'hiver, l'été), puis « Aller plus loin » */

/* les longues explications : deux lignes, puis « Lire la suite » */
.mm-panel p.note.long:not(.open) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-bottom: 2px; }
.mm-panel .note-more { display: block; border: 0; background: none; padding: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--accent); }
/* l'aperçu 3D pendant la modélisation : le plan à gauche, la maquette à droite, qui suit chaque geste */
.mm-stage.with-pv > svg { width: 58%; }
.mm-pv { position: absolute; right: 0; top: 0; bottom: 0; z-index: 2; width: 42%; overflow: hidden; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); box-shadow: -1px 0 0 var(--line); cursor: grab; touch-action: none; }
.mm-pv:active { cursor: grabbing; }
.mm-pv .gl3 { position: absolute; inset: 0; }
.mm-pv-t { position: absolute; left: 14px; top: 12px; z-index: 2; font-size: 13px; font-weight: 600; color: var(--soft); pointer-events: none; }
.mm-stage.with-pv .mapkey { right: calc(42% + 16px); }
@media (max-width: 800px) {
  .mm-stage.with-pv > svg { width: 100%; height: 58%; }
  .mm-pv { top: auto; left: 0; width: 100%; height: 42%; box-shadow: 0 -1px 0 var(--line); }
  .mm-stage.with-pv .mapkey { right: 8px; bottom: calc(42% + 8px); }
}
/* les légendes par classes (maison.js stepKey : mk-, sk- ; noms composés, à garder) */
.mk-steps, .sk-steps { display: flex; gap: 2px; } .mk-steps i, .sk-steps i { flex: 1; height: 10px; } .sk-steps { margin-top: 8px; } .sk-steps i { height: 12px; }
.mk-steps i:first-child, .sk-steps i:first-child { border-radius: 3px 0 0 3px; } .mk-steps i:last-child, .sk-steps i:last-child { border-radius: 0 3px 3px 0; }
.mk-ticks, .sk-ticks { position: relative; height: 15px; font-size: 11px; color: var(--soft); font-variant-numeric: tabular-nums; } .mk-ticks span, .sk-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
