/* Simulateur d'automatisations (autoshow.js) — commun aux sites MoniWatt et à pylon-monitor.com. Préfixe ash-. */
.ash-sec{--ash-acc:var(--accent,#f2a516);--ash-bg:#0a1020;--ash-card:rgba(255,255,255,.045);--ash-line:rgba(255,255,255,.09);--ash-txt:#e9eef6;--ash-mut:#93a2b8;
  position:relative;overflow:hidden;margin-top:70px;padding:84px 0 70px;color:var(--ash-txt);
  background:radial-gradient(900px 500px at 12% 0%,rgba(255,193,60,.16),transparent 60%),radial-gradient(800px 600px at 100% 30%,rgba(45,212,191,.12),transparent 60%),linear-gradient(180deg,#0b1326,#070b16);
  font-family:inherit}
.ash-sec *{box-sizing:border-box}
.ash-wrap{max-width:1200px;margin:0 auto;padding:0 20px;position:relative}
.ash-head{text-align:center;max-width:820px;margin:0 auto 30px}
.ash-kick{display:inline-flex;align-items:center;gap:8px;font:800 12px/1 system-ui,sans-serif;letter-spacing:.1em;text-transform:uppercase;padding:8px 14px;border-radius:99px;color:#1a1300;background:linear-gradient(90deg,#ffd25e,#ffb020)}
.ash-head h2{margin:16px 0 12px;font-size:clamp(30px,4.4vw,52px);line-height:1.05;letter-spacing:-.035em;font-weight:850;text-wrap:balance;
  background:linear-gradient(100deg,#fff 30%,#ffd25e 70%,#ffb020);-webkit-background-clip:text;background-clip:text;color:transparent}
.ash-head p{color:#b8c4d6;font-size:18px;line-height:1.55;margin:0}
.ash{position:relative}
/* barre du haut */
.ash-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 20px;margin-bottom:16px}
.ash-mode{display:inline-flex;background:rgba(255,255,255,.06);border:1px solid var(--ash-line);border-radius:99px;padding:5px;gap:4px}
.ash-mode button{border:0;background:transparent;color:var(--ash-mut);font:700 15px system-ui,sans-serif;padding:11px 20px;border-radius:99px;cursor:pointer;display:flex;align-items:center;gap:8px;transition:background .25s,color .25s}
.ash-mode button[aria-pressed=true]{background:#fff;color:#0b1326;box-shadow:0 6px 20px rgba(0,0,0,.35)}
.ash-mode button[data-m="1"][aria-pressed=true]{background:linear-gradient(90deg,#ffd25e,#4ade80);color:#06210f}
.ash-mode button i{width:8px;height:8px;border-radius:50%;background:#4ade80;box-shadow:0 0 10px #4ade80}
.ash-mode button[aria-pressed=true] i{background:#06210f;box-shadow:none}
.ash-transport{display:flex;align-items:center;gap:12px;flex:1;min-width:260px;max-width:520px}
.ash-play{flex:none;border:1px solid var(--ash-line);background:rgba(255,255,255,.07);color:#fff;border-radius:99px;padding:9px 16px;font:700 14px system-ui,sans-serif;cursor:pointer;display:flex;gap:8px;align-items:center}
.ash-play:hover{background:rgba(255,255,255,.14)}
.ash-clock{font:800 26px/1 ui-monospace,SFMono-Regular,Menlo,monospace;color:#ffd25e;min-width:86px;text-align:center;letter-spacing:-.02em}
.ash-range{flex:1;min-width:0;accent-color:#ffd25e;height:24px}
/* scène */
.ash-main{display:grid;grid-template-columns:minmax(0,1.62fr) minmax(0,1fr);gap:16px;align-items:stretch}
.ash-chart{position:relative;background:var(--ash-card);border:1px solid var(--ash-line);border-radius:22px;padding:14px 10px 6px;backdrop-filter:blur(6px);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 30px 60px rgba(0,0,0,.35)}
.ash-svg{width:100%;height:auto;display:block}
.ash-grid line{stroke:rgba(255,255,255,.07);stroke-width:1}
.ash-grid line.v{stroke:rgba(255,255,255,.04)}
.ash-grid line.z{stroke:rgba(255,255,255,.18)}
.ash-grid text{fill:#7f8ea6;font:12px system-ui,sans-serif}
.ash-grid text.lab{fill:#93a2b8;font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:10.5px}
.ash-ph line{stroke:#fff;stroke-width:1.5;stroke-dasharray:3 4;opacity:.7}
.ash-ph circle{fill:#ffd25e;stroke:#0b1326;stroke-width:2;filter:drop-shadow(0 0 6px #ffd25e)}
.ash-ph rect{fill:#ffd25e}.ash-ph text{fill:#1a1300;font:800 11px system-ui,sans-serif}
.ash-evs circle{stroke:#0b1326;stroke-width:2}
.k-wash,.ash-evs .k-wash,.ash-evs .k-washm{fill:#a78bfa}.ash-evs .k-ev,.ash-evs .k-evm,.ash-evs .k-evn{fill:#2dd4bf}.ash-evs .k-evp{fill:#64748b}.ash-evs .k-heat,.ash-evs .k-heatm{fill:#fb923c}.ash-evs .k-full{fill:#4ade80}.ash-evs .k-eco{fill:#f472b6}
.ash-tip{position:absolute;top:16px;z-index:3;min-width:160px;background:rgba(10,16,32,.94);border:1px solid var(--ash-line);border-radius:12px;padding:10px 12px;font:12.5px/1.5 system-ui,sans-serif;pointer-events:none;box-shadow:0 12px 30px rgba(0,0,0,.4)}
.ash-tip b{display:block;color:#ffd25e;margin-bottom:2px}.ash-tip span{display:block;padding-left:14px;position:relative}
.ash-tip span::before{content:"";position:absolute;left:0;top:.55em;width:8px;height:8px;border-radius:2px}
.ash-tip .s::before{background:#ffc93c}.ash-tip .h::before{background:#7c8aa5}.ash-tip .w::before{background:#a78bfa}.ash-tip .t::before{background:#fb923c}.ash-tip .e::before{background:#2dd4bf}.ash-tip .b::before{background:#e8edf5}.ash-tip .i::before{background:#ff5c5c}.ash-tip .x::before{background:#4ade80}
/* écran Home Assistant (thème sombre de HA) */
.ash-ha{position:relative;background:#111318;border:1px solid #2a2e35;border-radius:22px;overflow:hidden;font:13px/1.4 Roboto,system-ui,sans-serif;color:#e1e1e1;box-shadow:0 30px 60px rgba(0,0,0,.45);display:flex;flex-direction:column}
.ash-ha-bar{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#1c1f24;border-bottom:1px solid #2a2e35;font-size:15px}
.ash-ha-bar em{margin-left:auto;font-style:normal;font-size:11.5px;color:#8bd0f4;display:flex;align-items:center;gap:6px}
.ash-ha-bar em i{width:7px;height:7px;border-radius:50%;background:#4ade80;animation:ash-pulse 1.6s infinite}
@keyframes ash-pulse{50%{opacity:.3}}
.ash-burger{width:16px;height:12px;border-top:2px solid #e1e1e1;border-bottom:2px solid #e1e1e1;position:relative}.ash-burger::after{content:"";position:absolute;left:0;right:0;top:3px;border-top:2px solid #e1e1e1}
.ash-tiles{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px}
.ash-tiles div{background:#1c1f24;border-radius:14px;padding:10px 12px;display:grid;grid-template-columns:30px 1fr;column-gap:8px;align-items:center}
.ash-tiles i{grid-row:1/4;width:30px;height:30px;border-radius:50%;display:block;background:#2a2e35;position:relative}
.ash-tiles i::after{content:"";position:absolute;inset:9px;border-radius:50%}
.ash-tiles i.sun{background:rgba(255,201,60,.18)}.ash-tiles i.sun::after{background:#ffc93c;box-shadow:0 0 8px #ffc93c}
.ash-tiles i.home{background:rgba(124,138,165,.25)}.ash-tiles i.home::after{background:#9fb0cc;border-radius:3px}
.ash-tiles i.bat{background:rgba(74,222,128,.18)}.ash-tiles i.bat::after{background:#4ade80;border-radius:3px;inset:10px 8px}
.ash-tiles i.imp{background:rgba(255,92,92,.18)}.ash-tiles i.imp::after{background:#ff5c5c}
.ash-tiles i.exp{background:rgba(74,222,128,.18)}.ash-tiles i.exp::after{background:#4ade80}
.ash-tiles span{font-size:11.5px;color:#9aa0a6}.ash-tiles b{font-size:17px;color:#fff;font-variant-numeric:tabular-nums}.ash-tiles small{font-size:11px;color:#9aa0a6}
.ash-ha-h{margin:4px 14px 6px;font-size:11.5px;text-transform:uppercase;letter-spacing:.08em;color:#9aa0a6;font-weight:700}
.ash-autos{list-style:none;margin:0 12px;padding:4px 0;background:#1c1f24;border-radius:14px}
.ash-autos li{display:grid;grid-template-columns:12px 1fr auto 34px;gap:8px;align-items:center;padding:7px 12px}
.ash-autos li+li{border-top:1px solid #2a2e35}
.ash-autos li>i{width:10px;height:10px;border-radius:50%;opacity:.35}
.ash-autos li.on>i{opacity:1}.ash-autos li.run>i{box-shadow:0 0 10px currentColor;animation:ash-pulse 1s infinite}
.ash-autos span{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ash-autos em{font-style:normal;font-size:10.5px;color:#9aa0a6;text-transform:uppercase;letter-spacing:.04em}
.ash-autos li.run em{color:#4ade80;font-weight:700}
.ash-autos .sw{width:30px;height:16px;border-radius:99px;background:#3a3f47;position:relative;transition:background .25s}
.ash-autos .sw::after{content:"";position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#bbb;transition:transform .25s,background .25s}
.ash-autos li.on .sw{background:rgba(3,169,244,.45)}.ash-autos li.on .sw::after{transform:translateX(14px);background:#03a9f4}
.r-wash{background:#a78bfa;color:#a78bfa}.r-heater{background:#fb923c;color:#fb923c}.r-ev{background:#2dd4bf;color:#2dd4bf}.r-heat{background:#f472b6;color:#f472b6}
.ash-log{list-style:none;margin:0 12px 12px;padding:4px 0;background:#1c1f24;border-radius:14px;flex:1;min-height:110px}
.ash-log li{padding:6px 12px 6px 30px;position:relative;font-size:12.3px;animation:ash-in .35s ease}
.ash-log li::before{content:"";position:absolute;left:12px;top:11px;width:8px;height:8px;border-radius:50%;background:#64748b}
.ash-log li.k-wash::before,.ash-log li.k-washm::before{background:#a78bfa}.ash-log li.k-ev::before,.ash-log li.k-evm::before,.ash-log li.k-evn::before{background:#2dd4bf}.ash-log li.k-heat::before,.ash-log li.k-heatm::before{background:#fb923c}.ash-log li.k-full::before{background:#4ade80}.ash-log li.k-eco::before{background:#f472b6}
.ash-log time{color:#8bd0f4;font-variant-numeric:tabular-nums;margin-right:6px;font-weight:700}
.ash-log li.none{color:#6b7280;padding-left:12px}.ash-log li.none::before{display:none}
@keyframes ash-in{from{opacity:0;transform:translateY(-4px)}}
/* notification façon téléphone */
.ash-toast{position:absolute;right:14px;top:66px;z-index:5;width:min(330px,calc(100% - 28px));background:rgba(28,31,36,.96);border:1px solid #2f343c;border-radius:16px;padding:10px 14px 11px 46px;font:13px/1.35 system-ui,sans-serif;color:#fff;box-shadow:0 18px 40px rgba(0,0,0,.5);opacity:0;transform:translateY(-14px) scale(.98);transition:opacity .3s,transform .3s;pointer-events:none}
.ash-toast::before{content:"";position:absolute;left:12px;top:12px;width:24px;height:24px;border-radius:7px;background:#03a9f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2'%3E%3Cpath d='m3 11 9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E") center/16px no-repeat}
.ash-toast.show{opacity:1;transform:none}
.ash-toast b{display:block;font-size:11.5px;color:#9aa0a6;font-weight:600}
/* légende */
.ash-leg{list-style:none;display:flex;flex-wrap:wrap;gap:6px 16px;margin:14px 2px 0;padding:0;font-size:13px;color:#b8c4d6}
.ash-leg li{display:flex;align-items:center;gap:7px}
.ash-leg li::before{content:"";width:14px;height:10px;border-radius:3px}
.l-sun::before{background:linear-gradient(#ffd25e,#ffb020)}.l-base::before{background:#7c8aa5}.l-wash::before{background:#a78bfa}.l-heater::before{background:#fb923c}.l-ev::before{background:#2dd4bf}
.l-soc::before{height:0!important;border-top:2px dashed #e8edf5;border-radius:0!important}.l-imp::before{background:repeating-linear-gradient(45deg,#ff5c5c 0 2px,rgba(255,92,92,.2) 2px 5px)}.l-exp::before{background:rgba(74,222,128,.5)}
/* chiffres */
.ash-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:22px}
.ash-kpis>div{background:var(--ash-card);border:1px solid var(--ash-line);border-radius:18px;padding:16px;transition:border-color .4s,box-shadow .4s}
.ash-kpis span{display:block;font-size:12.5px;color:var(--ash-mut);font-weight:600}
.ash-kpis b{display:block;font-size:clamp(24px,2.6vw,32px);font-weight:850;letter-spacing:-.03em;margin:4px 0 2px;font-variant-numeric:tabular-nums;color:#fff}
.ash-kpis small{font-size:12.5px;color:var(--ash-mut);font-weight:700}
.ash-kpis.on small{color:#4ade80}
.ash-kpis .hi{position:relative;background:linear-gradient(160deg,rgba(255,210,94,.12),rgba(74,222,128,.08))}
.ash-kpis.on .hi{border-color:rgba(74,222,128,.55);box-shadow:0 0 0 1px rgba(74,222,128,.2),0 18px 40px rgba(74,222,128,.12)}
.ash-kpis.on .hi b{background:linear-gradient(90deg,#ffd25e,#4ade80);-webkit-background-clip:text;background-clip:text;color:transparent}
.ash-kpis .hi small{color:var(--ash-mut);font-weight:500}
/* règles */
.ash-rules{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:22px}
.ash-rule{position:relative;display:flex;flex-direction:column;gap:8px;background:var(--ash-card);border:1px solid var(--ash-line);border-radius:18px;padding:16px;cursor:pointer;transition:opacity .25s,border-color .25s}
.ash-rule:hover{border-color:rgba(255,255,255,.22)}
.ash-rule.off{opacity:.5}
.ash-rule input{position:absolute;opacity:0;pointer-events:none}
.ash-sw{position:absolute;right:14px;top:14px;width:40px;height:22px;border-radius:99px;background:#3a3f47;transition:background .25s}
.ash-sw::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#cfd6e0;transition:transform .25s}
.ash-rule input:checked+.ash-sw{background:#03a9f4}.ash-rule input:checked+.ash-sw::after{transform:translateX(18px);background:#fff}
.ash-rule input:focus-visible+.ash-sw{outline:2px solid #ffd25e;outline-offset:2px}
.ash-rule>i{width:12px;height:12px;border-radius:50%;box-shadow:0 0 12px currentColor}
.ash-rule>b{font-size:16px;padding-right:46px;line-height:1.25}
.ash-when,.ash-then{display:flex;flex-wrap:wrap;gap:5px;align-items:center;font-size:12.5px}
.ash-when em,.ash-then em{font-style:normal;font-weight:800;font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--ash-mut);width:100%}
.ash-when span,.ash-then span{background:rgba(255,255,255,.07);border-radius:7px;padding:3px 8px}
.ash-when code,.ash-then code{font:11.5px ui-monospace,Menlo,monospace;background:rgba(3,169,244,.16);color:#8bd0f4;border-radius:7px;padding:3px 7px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0}
/* pied */
.ash-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;margin-top:22px}
.ash-price{display:flex;flex-wrap:wrap;gap:10px 22px;font-size:14px;color:#b8c4d6}
.ash-price label{display:flex;align-items:center;gap:8px}
.ash-price input{width:78px;background:rgba(255,255,255,.07);border:1px solid var(--ash-line);border-radius:9px;color:#fff;padding:7px 9px;font:700 14px system-ui,sans-serif}
.ash-price span:empty{display:none}
.ash-cta{display:inline-flex;align-items:center;gap:8px;text-decoration:none;font:800 16px system-ui,sans-serif;color:#1a1300;background:linear-gradient(90deg,#ffd25e,#ffb020);padding:14px 22px;border-radius:14px;box-shadow:0 12px 30px rgba(255,176,32,.25);transition:transform .2s}
.ash-cta:hover{transform:translateY(-2px)}
.ash-note{margin:18px 0 0;font-size:12.5px;color:#7f8ea6;line-height:1.5;max-width:900px}
@media (max-width:1060px){.ash-main{grid-template-columns:minmax(0,1fr)}.ash-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.ash-kpis>div{grid-column:span 2}.ash-kpis .hi{grid-column:span 3}.ash-rules{grid-template-columns:repeat(2,minmax(0,1fr))}.ash-toast{top:auto;bottom:14px}}
@media (max-width:640px){.ash-sec{padding:60px 0 50px}.ash-kpis>div{padding:12px}.ash-kpis b{font-size:21px}.ash-kpis span{font-size:11.5px}.ash-rules{grid-template-columns:minmax(0,1fr)}.ash-mode{width:100%}.ash-mode button{flex:1;justify-content:center;padding:10px 8px;font-size:13.5px}.ash-clock{font-size:21px;min-width:66px}.ash-transport{min-width:0;max-width:none;width:100%}.ash-head p{font-size:16px}.ash-tiles b{font-size:15px}}
@media (prefers-reduced-motion:reduce){.ash-sec *{animation:none!important;transition:none!important}}
.ash-chart{display:flex;flex-direction:column}
.ash-split{margin-top:auto;display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:10px 10px 8px;border-top:1px solid var(--ash-line)}
.ash-split p{margin:0;font-size:12.5px;color:var(--ash-mut);font-weight:700}
.ash-split .bar{display:flex;height:14px;border-radius:99px;overflow:hidden;background:rgba(255,255,255,.06);margin:7px 0 6px}
.ash-split .bar i{display:block;height:100%;transition:width .8s cubic-bezier(.3,.1,.2,1)}
.sp-sun .a{background:linear-gradient(90deg,#ffb020,#ffd25e)}.sp-sun .b{background:rgba(74,222,128,.45)}
.sp-use .a{background:linear-gradient(90deg,#4ade80,#a3e635)}.sp-use .b{background:repeating-linear-gradient(45deg,#ff5c5c 0 3px,rgba(255,92,92,.35) 3px 7px)}
.ash-split .lg{display:flex;justify-content:space-between;gap:8px;font-weight:600;font-size:11.5px;color:#b8c4d6}
@media (max-width:640px){.ash-split{grid-template-columns:minmax(0,1fr)}}
.ash-svg.sm .ash-grid text{font-size:17px}.ash-svg.sm .ash-grid text.lab{font-size:14px}.ash-svg.sm .ash-ph text{font-size:15px}
.ash-svg.sm .ash-ph rect{width:70px;transform:translateX(-8px)}
@media (max-width:1060px){.ash-chart{padding:10px 6px 4px}}
/* format compact : graphique + bascule + chiffres, lien vers la version complète */
.ash-mini{padding:64px 0 54px}
.ash-mini .ash-head h2{font-size:clamp(26px,3.4vw,40px)}
.ash-mini .ash-main{grid-template-columns:minmax(0,1fr)}
.ash-mini .ash-ha,.ash-mini .ash-rules,.ash-mini .ash-price,.ash-mini .ash-toast,.ash-mini .ash-leg{display:none}
.ash-mini .ash-foot{justify-content:center}
.ash-mini .ash-note{margin-left:auto;margin-right:auto;text-align:center}
