/* JACOB HABITAT — « La maison, en mouvement » (pages Photovoltaïque, IRVE, Pompes à chaleur)
   Compatible CSP style-src 'self' : aucun style en ligne, tout passe par ces classes. */
.jhm-section{border-top:1px solid var(--line)}
.jhm{position:relative;background:var(--cream);clip-path:polygon(0 0,calc(100% - var(--chamfer)) 0,100% var(--chamfer),100% 100%,0 100%);padding:clamp(18px,3vw,40px);display:flex;flex-direction:column;gap:22px;scroll-margin-top:110px}
.jhm-tabs{display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line)}
.jhm-js .jhm-tabs{display:grid}
.jhm-tabs button{position:relative;display:flex;flex-direction:column;gap:6px;align-items:flex-start;padding:16px 18px;border:0;background:#fbfaf7;color:var(--night);font:700 1.0625rem/1.1 var(--font);letter-spacing:-.01em;cursor:pointer;text-align:left;transition:background .25s,color .25s}
.jhm-tabs button span{font-size:.6875rem;font-weight:500;letter-spacing:.18em;color:#8a5522}
.jhm-tabs button::before{content:"";position:absolute;top:0;left:0;height:3px;width:0;background:var(--copper);transition:width .35s cubic-bezier(.22,1,.36,1)}
.jhm-tabs button[aria-selected=true]{background:var(--night);color:var(--cream)}
.jhm-tabs button[aria-selected=true] span{color:#d89055}
.jhm-tabs button[aria-selected=true]::before{width:100%}
.jhm-body{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:clamp(20px,3vw,44px);align-items:start}
.jhm-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.jhm-demo{font-size:.75rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:#3c444b}
.jhm-ctrl{display:none;gap:8px;flex-wrap:wrap;align-items:center}
.jhm-js .jhm-ctrl{display:flex}
.jhm-seg{display:flex;border:1px solid rgba(16,31,41,.28)}
.jhm-seg button,.jhm-pause{border:0;background:transparent;padding:11px 15px;font:600 .8125rem/1 var(--font);color:var(--night);cursor:pointer;transition:background .2s,color .2s}
.jhm-seg button[aria-pressed=true]{background:var(--night);color:var(--cream)}
.jhm-pause{display:flex;align-items:center;gap:8px;border:1px solid rgba(16,31,41,.28)}
.jhm-pause:hover{border-color:var(--night)}
.jhm-pause-dot{width:8px;height:8px;background:#4fa046}
.jhm-pause[aria-pressed=true] .jhm-pause-dot{background:var(--copper)}
.jhm-stage{background:var(--sand)}
.jhm-svg{display:block;width:100%;height:auto}
.jhm-panel{display:flex;flex-direction:column;gap:18px}
.jhm-head{display:flex;flex-direction:column;gap:10px}
.jhm-kicker{font-size:.75rem;font-weight:600;letter-spacing:.18em;color:#8a5522}
.jhm-panel h3{font-size:clamp(1.4rem,2.2vw,1.75rem);font-weight:800;line-height:1.1;letter-spacing:-.018em;text-wrap:balance}
.jhm-text{font-size:1.0625rem;line-height:1.65;text-wrap:pretty}
.jhm-note{font-size:.9375rem;line-height:1.6;color:#3c444b;text-wrap:pretty}
.jhm-panel .button{align-self:flex-start}
.jhm-batrow{flex-direction:column;align-items:stretch;gap:14px}
.jhm-batrow .jhm-seg{align-self:flex-start}
.jhm-charge{display:flex;flex-direction:column;gap:8px;max-width:320px;transition:opacity .4s}
.jhm[data-bat="0"] .jhm-charge{opacity:.35}
.jhm-charge-top{display:flex;justify-content:space-between;font-weight:600;font-size:.875rem;font-variant-numeric:tabular-nums}
.jhm-charge-bar{height:6px;background:#e3ded4}
.jhm-charge-fill{display:block;height:100%;width:22%;background:#4fa046;transition:width .25s linear}
.jhm-charge small{font-size:.8125rem;color:#3c444b}
.jhm-legend{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.jhm-legend li{border-bottom:1px solid var(--line)}
.jhm-legend button{width:100%;display:flex;align-items:center;gap:14px;padding:13px 0;border:0;background:transparent;font:600 1rem/1.25 var(--font);color:var(--night);cursor:pointer;text-align:left}
.jhm-n{width:26px;height:26px;flex:none;border-radius:50%;background:var(--night);color:var(--cream);font-size:.75rem;font-weight:700;line-height:26px;text-align:center;box-shadow:0 0 0 1.5px var(--copper);transition:background .2s}
.jhm-plus{margin-left:auto;color:#8a5522;font-weight:500}
.jhm-legend button[aria-expanded=true] .jhm-n{background:var(--copper)}
.jhm-info{background:var(--sand);padding:14px 16px;display:flex;flex-direction:column;gap:5px}
.jhm-info[hidden]{display:none}
.jhm-info strong{font-size:.9375rem}
.jhm-info span{font-size:.9375rem;line-height:1.55}
@media(max-width:900px){.jhm-body{grid-template-columns:1fr}.jhm-panels{max-width:640px}}
@media(max-width:560px){.jhm{padding:14px;clip-path:none}.jhm-bar{flex-direction:column;align-items:flex-start}.jhm-tabs button{padding:14px}}

/* scène */
.jhm .eq{opacity:.5;transition:opacity .5s}
.jhm .deco{opacity:.85}
.jhm .c{opacity:.5;transition:opacity .5s}
.jhm .x{opacity:0;transition:opacity .5s}
.jhm .x-sol,.jhm .x-res,.jhm .x-bat,.jhm .x-borne{animation:jhm-elec 1.5s linear infinite}
.jhm .x-eau{animation:jhm-eau 2.6s linear infinite}
.jhm .x-clim{animation:jhm-eau 2.2s linear infinite}
.jhm .air1,.jhm .air2{transform-box:view-box;transform-origin:-92.7px -22.5px;animation:jhm-air 3.6s ease-out -1.2s infinite}
.jhm .air2{animation-delay:-3s}
.jhm .glow-a{animation:jhm-sol 4.5s ease-in-out -2s infinite}
.jhm .lamp-a{animation:jhm-lamp 3s ease-in-out infinite}
.jhm .fan{transform-box:fill-box;transform-origin:center;animation:jhm-fan 1.2s linear infinite}
.jhm .x,.jhm .x *,.jhm .fan{animation-play-state:paused}
.jhm[data-mode=solaire] :is(.e-pv,.e-ond,.e-tab,.e-res,.e-bat,.c-sol,.c-bat){opacity:1}
.jhm[data-mode=solaire] :is(.x-sol,.x-res,.x-lamp){opacity:1;animation-play-state:running}
.jhm[data-mode=solaire][data-bat="1"] .x-bat{opacity:1;animation-play-state:running}
.jhm[data-mode=solaire] .x-lamp *{animation-play-state:running}
.jhm[data-mode=recharge] :is(.e-borne,.e-car,.e-tab,.c-borne){opacity:1}
.jhm[data-mode=recharge] .x-borne{opacity:1;animation-play-state:running}
.jhm[data-mode=chauffage] :is(.e-pac,.c-eau){opacity:1}
.jhm[data-mode=chauffage] :is(.x-eau,.x-glow){opacity:1;animation-play-state:running}
.jhm[data-mode=chauffage] :is(.x-glow *,.fan-pac){animation-play-state:running}
.jhm[data-mode=climatisation] :is(.e-split,.e-grp,.c-clim){opacity:1}
.jhm[data-mode=climatisation] :is(.x-air,.x-clim){opacity:1;animation-play-state:running}
.jhm[data-mode=climatisation] :is(.x-air *,.fan-grp){animation-play-state:running}
.jhm[data-bat="0"] :is(.e-bat,.c-bat,.x-bat){opacity:0!important}
.jhm .jhm-badge{opacity:0;transition:opacity .4s}
.jhm.jhm-js[data-mode=solaire][data-bat="1"] .jhm-badge{opacity:1}
.jhm .v-front{transition:opacity .75s cubic-bezier(.65,0,.35,1),transform .75s cubic-bezier(.65,0,.35,1)}
.jhm[data-view=int] .v-front{opacity:0;transform:translate(-22px,13px);pointer-events:none}
.jhm .v-intbase{opacity:0;transition:opacity .6s .15s}
.jhm[data-view=int] .v-intbase{opacity:1}
.jhm .v-roof{transition:opacity .7s cubic-bezier(.65,0,.35,1)}
.jhm[data-view=int] .v-roof{opacity:.22}
.jhm[data-view=int]:not([data-mode=solaire]) .v-roof{opacity:.05}
.jhm[data-view=int]:not([data-mode=solaire]) .e-pv{opacity:.1}
.jhm .mk{display:none;cursor:pointer;outline:none}
.jhm.jhm-js[data-mode=solaire] .mk-solaire,.jhm.jhm-js[data-mode=recharge] .mk-recharge,.jhm.jhm-js[data-mode=chauffage] .mk-chauffage,.jhm.jhm-js[data-mode=climatisation] .mk-climatisation{display:inline}
.jhm .mk.is-on circle:first-child{fill:var(--copper)}
.jhm .mk:focus-visible .mk-ring{stroke-width:3.5}
.jhm.jhm-js .e-hit{cursor:pointer}
.jhm[data-run="0"] .jhm-svg *{animation-play-state:paused!important}
@keyframes jhm-elec{to{stroke-dashoffset:-30}}
@keyframes jhm-eau{to{stroke-dashoffset:-40}}
@keyframes jhm-air{0%{opacity:0;transform:scale(.5)}35%{opacity:.85}100%{opacity:0;transform:scale(1.06)}}
@keyframes jhm-sol{0%,100%{opacity:.32}50%{opacity:.7}}
@keyframes jhm-lamp{0%,100%{opacity:.55}50%{opacity:.85}}
@keyframes jhm-fan{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.jhm .jhm-svg *{animation-play-state:paused!important}.jhm .v-front,.jhm .v-roof,.jhm .v-intbase{transition:none}}
@media print{.jhm-ctrl,.jhm-tabs{display:none!important}}
