/* Le graphite du ciel reste fixe ; deux plans décoratifs apportent de la profondeur. */
.living-sky{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;user-select:none;contain:strict}
.sky-plane{position:absolute;inset:0;pointer-events:none;transition:transform 700ms ease-out}
.sky-far{transform:translate(calc(var(--mx,0px)*-.3),calc(var(--my,0px)*-.25))}
.sky-near{transform:translate(calc(var(--mx,0px)*.85),calc(var(--my,0px)*.75))}
.sky-star{position:absolute;width:var(--star-size);height:var(--star-size);color:#61594e;opacity:.3;animation:sky-twinkle var(--twinkle-time) ease-in-out var(--phase) infinite;transform:rotate(var(--tilt))}
.sky-star svg{display:block;width:100%;height:100%;overflow:visible}
.sky-star path{fill:#f8f6ef80;stroke:currentColor;stroke-width:.8;stroke-linejoin:round}
.sky-star .pencil-ray{fill:none;stroke-width:.55;opacity:.65}
.sky-cyan{color:#008fa5;filter:drop-shadow(0 0 3px #00cbdc55)}
.sky-cyan path{fill:#b5f4f366}
.sky-prominent{animation-name:sky-glimmer}
.sky-dust{position:absolute;width:var(--dust-size);height:var(--dust-size);background:#6e655b;border-radius:50%;opacity:0;animation:sky-drift var(--drift-time) linear var(--phase) infinite}
.dust-light{background:#00a9bd;box-shadow:0 0 5px #00cbdc66}
body:not([data-view=home]) .living-sky{display:none}
body.paused .sky-plane{transform:none;transition:none}
body.paused .sky-star,body.paused .sky-dust,.sky-sleeping .sky-star,.sky-sleeping .sky-dust{animation-play-state:paused}
@keyframes sky-twinkle{0%,100%{opacity:.16}45%{opacity:.55}70%{opacity:.29}}
@keyframes sky-glimmer{0%,100%{opacity:.23;scale:.94}50%{opacity:.7;scale:1.06}}
@keyframes sky-drift{0%{opacity:0;translate:-12px 12px}18%{opacity:.36}75%{opacity:.3}100%{opacity:0;translate:18px -24px}}
@media(max-width:740px){.sky-star:nth-child(3n),.sky-dust:nth-child(2n){display:none}.sky-star{--star-size:9px!important}.sky-prominent{--star-size:12px!important}.sky-plane{transform:none;transition:none}}
@media(prefers-reduced-motion:reduce),(forced-colors:active){.sky-star{animation:none;opacity:.28;scale:1}.sky-dust{display:none}.sky-plane{transform:none;transition:none}.sky-cyan{filter:none}}
/* Le ciel devient perceptible au repos ; les traits du papier restent fixes. */
.sky-veils{position:absolute;inset:0;overflow:hidden;pointer-events:none;mask-image:linear-gradient(90deg,transparent 25%,#000 54%);transform:translate(calc(var(--mx,0px)*-1.8),calc(var(--my,0px)*-1.5))}
.nebula{position:absolute;display:block;pointer-events:none;border-radius:50%;will-change:transform,opacity;mix-blend-mode:multiply}
.nebula-cyan{width:65vw;height:44vh;left:43%;top:12%;background:radial-gradient(ellipse,#00bacd70 0%,#58cddb48 30%,#a5e2df24 51%,transparent 70%);animation:nebula-cyan-drift 12s ease-in-out -3s infinite alternate}
.nebula-violet{width:53vw;height:49vh;left:56%;top:0;background:radial-gradient(ellipse,#9860c45c 0%,#b194d13b 34%,transparent 70%);animation:nebula-violet-drift 16s ease-in-out -7s infinite alternate}
.nebula-mist{width:52vw;height:35vh;left:26%;top:53%;background:radial-gradient(ellipse,#28bcce4f 0%,#97d5d12b 35%,transparent 70%);animation:nebula-mist-drift 10s ease-in-out -2s infinite alternate}
.sky-far{transform:translate(calc(var(--mx,0px)*-.7),calc(var(--my,0px)*-.6))}.sky-near{transform:translate(calc(var(--mx,0px)*1.8),calc(var(--my,0px)*1.6))}
.sky-star{color:#51483c}.sky-cyan{color:#008d9e;filter:drop-shadow(0 0 4px #00b6cb99)}
.dust-light{background:#008fa5;box-shadow:0 0 7px #00badcaa}
@keyframes sky-twinkle{0%,100%{opacity:.18}45%{opacity:.9}70%{opacity:.4}}
@keyframes sky-glimmer{0%,100%{opacity:.24;scale:.85}50%{opacity:1;scale:1.22}}
@keyframes sky-drift{0%{opacity:0;translate:-35px 32px}12%{opacity:.7}78%{opacity:.65}100%{opacity:0;translate:46px -63px}}
@keyframes nebula-cyan-drift{from{transform:translate(-30px,20px) rotate(-20deg) scale(.85);opacity:.4}to{transform:translate(58px,-35px) rotate(-32deg) scale(1.2);opacity:.95}}
@keyframes nebula-violet-drift{from{transform:translate(40px,-30px) rotate(-35deg) scale(1.15);opacity:.9}to{transform:translate(-50px,65px) rotate(-18deg) scale(.88);opacity:.35}}
@keyframes nebula-mist-drift{from{transform:translate(-30px,32px) rotate(-25deg);opacity:.3}to{transform:translate(45px,-38px) rotate(-38deg);opacity:.9}}
.journey-energy{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:visible}
.journey-energy .energy{fill:none;stroke:#e0ffff;stroke-width:3;stroke-linecap:round;stroke-dasharray:4 96;filter:drop-shadow(0 0 5px #00dcf4);opacity:0;animation:journey-signal 8s linear infinite}
.energy-two{animation-delay:2.5s!important}.energy-three{animation-delay:5s!important}
@keyframes journey-signal{0%{stroke-dashoffset:5;opacity:0}4%{opacity:1}29%{opacity:1}33%{stroke-dashoffset:-100;opacity:0}100%{stroke-dashoffset:-100;opacity:0}}
.hero-art .wand-flare{width:9px;height:9px;background:#e3ffff;box-shadow:0 0 7px 3px #00d5eb,0 0 21px 7px #00cbdc55;animation:wand-living 3s ease-in-out infinite}
@keyframes wand-living{0%,100%{scale:.85;opacity:.65}50%{scale:1.3;opacity:1}}
body.paused .nebula,.sky-sleeping .nebula{animation-play-state:paused}
body.paused .sky-veils{transform:none}
@media(max-width:740px){.sky-veils{mask-image:linear-gradient(180deg,transparent 22%,#000 53%);transform:none}.nebula-cyan{width:100vw;left:10%;top:35%}.nebula-violet{width:95vw;left:24%;top:30%}.nebula-mist{width:95vw;left:-15%;top:65%}.sky-plane{transform:none}.journey-energy .energy{stroke-width:4}}
@media(prefers-reduced-motion:reduce),(forced-colors:active){.nebula{animation:none;opacity:.22;will-change:auto}.sky-veils{transform:none}.journey-energy{display:none}.hero-art .wand-flare{animation:none;scale:1;opacity:.8}.sky-star{animation:none;opacity:.35}.sky-dust{display:none}.sky-plane{transform:none}}

/* Un cycle narratif de 12 s : source, trois travers?es, puis un temps calme. */
.journey-energy .energy{animation-duration:12s;animation-delay:0s!important;animation-timing-function:linear;stroke-dasharray:3 97;stroke-width:2.8}
.journey-energy .energy-one{animation-name:journey-first}
.journey-energy .energy-two{animation-name:journey-second}
.journey-energy .energy-three{animation-name:journey-third}
@keyframes journey-first{0%,5%{opacity:0;stroke-dashoffset:5}7%{opacity:1}22%{opacity:1}25%{opacity:0;stroke-dashoffset:-100}100%{opacity:0;stroke-dashoffset:-100}}
@keyframes journey-second{0%,25%{opacity:0;stroke-dashoffset:5}27%{opacity:1}42%{opacity:1}45%{opacity:0;stroke-dashoffset:-100}100%{opacity:0;stroke-dashoffset:-100}}
@keyframes journey-third{0%,45%{opacity:0;stroke-dashoffset:5}47%{opacity:1}64%{opacity:1}68%,100%{opacity:0;stroke-dashoffset:-100}}
.hero-art .wand-flare{animation:wand-story 12s ease-in-out infinite}
@keyframes wand-story{0%{scale:.9;opacity:.7}4%{scale:1.4;opacity:1}9%{scale:1;opacity:.8}25%,68%,100%{scale:.9;opacity:.7}}
.nebula-cyan{animation-duration:20s}.nebula-violet{animation-duration:26s}.nebula-mist{animation-duration:22s}
@keyframes sky-glimmer{0%,100%{opacity:.25;scale:.94}50%{opacity:.8;scale:1.08}}
@keyframes sky-twinkle{0%,100%{opacity:.2}45%{opacity:.7}70%{opacity:.35}}
body.scene-sleeping .energy,body.scene-sleeping .wand-flare{animation-play-state:paused}
@media(max-width:740px){.journey-energy .energy{stroke-width:3.5}}
@media(prefers-reduced-motion:reduce),(forced-colors:active){.hero-art .wand-flare{animation:none;scale:1;opacity:.8}.journey-energy{display:none}}

/* Chaque portion visible possede son propre parcours normalise. */
.journey-energy .energy-two{animation-name:journey-second-complete}
.journey-energy .energy-door{animation-name:journey-door}
@keyframes journey-second-complete{0%,25%{opacity:0;stroke-dashoffset:5}26%{opacity:1}39%{opacity:1;stroke-dashoffset:-96}40%,100%{opacity:0;stroke-dashoffset:-103}}
@keyframes journey-door{0%,40%{opacity:0;stroke-dashoffset:5}40.5%{opacity:1}44%{opacity:1;stroke-dashoffset:-96}45%,100%{opacity:0;stroke-dashoffset:-103}}
