/* V3 : objets, atmosphères et légendes. Le fond rose de référence reste visible. */
:root{--world-accent:#ac454b;--label-paper:#fffbf7}
.scene{background:transparent;z-index:2}

.atmospheres{position:absolute;left:50%;top:50%;width:100vw;height:max(100%,100svh);transform:translate(-50%,-50%);z-index:0;pointer-events:none;overflow:hidden;background:var(--pink)}
.world{position:absolute;inset:0;opacity:0;transform:scale(1.018);transition:opacity .75s ease,transform 1s cubic-bezier(.2,.7,.2,1);pointer-events:none;overflow:hidden}
.world.is-active{opacity:1;transform:none}
.world>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.world-lieu{background:radial-gradient(ellipse at 52% 49%,#f3cfbc8c 0%,#f9deda3b 40%,transparent 70%)}
.place-light{position:absolute;inset:10% 22% 16%;background:radial-gradient(ellipse,#fffaf2 12%,#f8e2d9a6 44%,transparent 70%);transform:translateY(8%);transition:transform 1.2s}
.world-lieu.is-active .place-light{transform:none}
.fine-lines{fill:none;stroke:#885a5c;stroke-width:1;opacity:.28}
.world-formations{background:radial-gradient(ellipse at 69% 21%,#e9b8c661,transparent 58%),radial-gradient(ellipse at 13% 77%,#db919530,transparent 52%)}
.trace-lines{fill:none;stroke:#944951;stroke-width:1.3;opacity:.55;stroke-dasharray:1;stroke-dashoffset:1}
.world.is-active .trace-lines{stroke-dashoffset:0;transition:stroke-dashoffset 1.2s ease}
.annotation-nodes{fill:var(--pink);stroke:#bd6970;stroke-width:1.5;opacity:.7}
.world-words{font:28px Georgia,serif;fill:#91545b;opacity:.5;letter-spacing:.02em}
.world-mobilab{background:radial-gradient(ellipse at 40% 85%,#d09bab66,transparent 60%),radial-gradient(ellipse at 90% 26%,#eac2c944,transparent 55%)}
.route-grid{position:absolute;inset:-20%;background-image:linear-gradient(#8c63640c 1px,transparent 1px),linear-gradient(90deg,#8c63640c 1px,transparent 1px);background-size:56px 56px;transform:rotate(-12deg);mask-image:radial-gradient(ellipse,#000,transparent 67%)}
.route-lines{fill:none;stroke:#974e5c;stroke-width:1.4;opacity:.6;stroke-dasharray:1;stroke-dashoffset:1}
.route-lines path:nth-child(2){stroke:#b37583;stroke-width:.7}
.route-lines path:nth-child(3){stroke-width:.9;opacity:.6}
.world.is-active .route-lines{stroke-dashoffset:0;transition:stroke-dashoffset 1.4s cubic-bezier(.2,.6,.25,1)}
.route-points{fill:#faeee9;stroke:#9a525d;stroke-width:1.5;opacity:.65}
.world-livres{background:radial-gradient(ellipse at 20% 60%,#edc2bd70,transparent 66%)}
.printed-ground{position:absolute;left:-7%;top:-50%;width:66%;height:190%;object-fit:cover;object-position:50% 75%;filter:grayscale(.8) sepia(.16);opacity:.07;mix-blend-mode:multiply;mask-image:radial-gradient(ellipse at 38% 52%,#000 8%,transparent 66%);transform:rotate(-12deg) translateY(2%);transition:transform 1.3s ease}
.world-livres.is-active .printed-ground{transform:rotate(-12deg)}
.print-words{position:absolute;inset:12% 0 auto 4%;font:900 clamp(45px,6vw,115px)/1.1 Arial,sans-serif;letter-spacing:-.07em;color:#743b470b;transform:rotate(-8deg);display:flex;flex-direction:column;align-items:flex-start;gap:3vw}
.print-words span:nth-child(2){align-self:flex-end;margin-right:3%}.print-words span:last-child{margin-left:7%}
.world-reserver{background:radial-gradient(ellipse at 59% 45%,#f6d0b4a8,transparent 55%)}
.room-light{position:absolute;left:27%;top:30%;width:57%;height:44%;background:radial-gradient(ellipse,#fffcdfa8,transparent 66%);transform:scale(.75);transition:transform 1.2s ease}
.world-reserver.is-active .room-light{transform:scale(1.2)}
.room-reflection{position:absolute;left:44%;top:47%;width:16%;height:60%;background:linear-gradient(180deg,#f9e7bb88,transparent);filter:blur(23px);transform:perspective(150px) rotateX(28deg) rotate(-6deg);opacity:.45}
.world-jeux{background:radial-gradient(ellipse at 71% 63%,#f1d6c1 0%,#d4a0ac63 48%,#a16c7b32 100%)}
.stage-shadow{position:absolute;inset:-15%;background:linear-gradient(112deg,#5334471f,transparent 24%,transparent 80%,#53344726),radial-gradient(ellipse at 50% 20%,transparent 22%,#4923311c 90%);transform:scaleX(1.07);transition:transform 1.3s ease}
.world-jeux.is-active .stage-shadow{transform:scaleX(1)}
.stage-light{position:absolute;inset:-25% 17% 0 38%;background:radial-gradient(ellipse at 65% 30%,#fff6dd99,transparent 61%);transform:rotate(17deg)}
.world-actualites{background:radial-gradient(ellipse at 20% 29%,#f5c1c961,transparent 60%)}
.news-columns{position:absolute;inset:12% 8% 10%;background:repeating-linear-gradient(0deg,transparent 0 13px,#8f505512 13px 14px,transparent 14px 22px);mask-image:radial-gradient(ellipse at 15% 55%,#000,transparent 54%);transform:rotate(-7deg)}
.news-word{position:absolute;left:3%;top:72%;font:clamp(50px,11vw,175px)/1 Georgia,serif;letter-spacing:-.05em;color:#96465817;transform:rotate(-8deg)}

/* Le papier est une couche distincte : aucun débordement des bords décoratifs dans le texte. */
.scene-label{--world-accent:#9d4c60;--label-paper:#fffaf7;position:fixed;z-index:50;width:min(356px,calc(100vw - 32px));padding:0;background:transparent;border:0;box-shadow:none;isolation:isolate;filter:drop-shadow(0 9px 9px #6a3b4318);overflow:visible;}
.scene-label:before{content:'';position:absolute;inset:0;background:var(--label-paper);clip-path:polygon(0 9%,8% 1%,36% 0,69% 1%,99% 0,100% 46%,98% 74%,100% 97%,70% 99%,42% 97%,10% 100%,1% 94%);transform:rotate(-1.4deg);z-index:-1;pointer-events:none}
.scene-label:after{content:'';position:absolute;left:24px;top:-8px;width:64px;height:19px;background:#d38b9b60;clip-path:polygon(3% 8%,100% 0,96% 92%,0 100%);transform:rotate(-7deg);pointer-events:none}
.label-content{padding:34px 33px 30px;max-height:calc(100svh - 58px);overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#c2939b transparent;overscroll-behavior:contain}
.label-category{font:14px/1.4 Arial,sans-serif;letter-spacing:.035em;color:var(--world-accent);margin:0 27px 14px 0}
.scene-label h2{font:normal 31px/1.1 Georgia,serif;letter-spacing:-.04em;margin:0 0 15px;text-wrap:balance}
#label-description{font:16px/1.6 Arial,sans-serif}
.label-status{font:14px/1.5 Arial,sans-serif;margin-top:17px;padding-left:12px;border-left:2px solid #b76a71;white-space:pre-line}
.label-close{position:absolute;z-index:3;right:7px;top:5px;width:44px;height:44px;line-height:1;font-size:25px;color:#8d6066}
.label-open{display:flex;justify-content:space-between;align-items:center;gap:17px;width:100%;font:16px/1.4 Arial,sans-serif;margin-top:20px;padding:15px 0 2px;border-top:1px solid #b88d8e65;text-align:left;min-height:48px}
.label-open>span:last-child{color:var(--world-accent);font-size:24px;transition:transform .25s}.label-open:hover>span:last-child{transform:translate(3px,-3px)}
.scene-label[data-kind=formations]{--label-paper:#fff8f5;--world-accent:#a23d57}.scene-label[data-kind=formations]:before{background:linear-gradient(90deg,transparent 18px,#bd879422 18px 19px,transparent 19px),var(--label-paper)}
.scene-label[data-kind=livres]{--label-paper:#fffaf6;--world-accent:#873f45}.scene-label[data-kind=livres]:before{transform:rotate(1.3deg)}
.scene-label[data-kind=mobilab]{--label-paper:#faf1f2;--world-accent:#884251}
.scene-label[data-kind=reserver]{--label-paper:#fff4eb;--world-accent:#9b554c}.scene-label[data-kind=reserver]:before{clip-path:polygon(9% 0,98% 2%,100% 48%,98% 98%,9% 100%,0 86%,0 13%)}
.scene-label[data-kind=jeux]{--label-paper:#fff2f1;--world-accent:#963951}
.scene-label[data-opening=true]{animation:unfold-paper .4s cubic-bezier(.2,.8,.2,1) both;transform-origin:20% 80%}
@keyframes unfold-paper{from{opacity:0;transform:translateY(8px) rotate(-2deg)}to{opacity:1;transform:none}}
.label-connector{position:fixed;inset:0;width:100vw;height:100vh;z-index:40;pointer-events:none;overflow:visible;color:#a65e68}.label-connector path{fill:none;stroke:currentColor;stroke-width:1.1;opacity:.5;stroke-linecap:round}.label-connector circle{fill:var(--pink);stroke:currentColor;stroke-width:1.2}.label-connector[data-opening=true] path{stroke-dasharray:1;animation:draw-connection .55s ease both}@keyframes draw-connection{from{stroke-dashoffset:1;opacity:0}to{stroke-dashoffset:0;opacity:.5}}
.world.is-active .place-light{animation:light-breath 8s ease-in-out infinite alternate}.world.is-active .room-light{animation:light-breath 6s ease-in-out infinite alternate}.world.is-active .stage-light{animation:stage-breath 7s ease-in-out infinite alternate}
@keyframes light-breath{from{opacity:.65;transform:scale(.95)}to{opacity:1;transform:scale(1.08)}}@keyframes stage-breath{from{opacity:.6;transform:rotate(12deg)}to{opacity:1;transform:rotate(20deg)}}
@media(max-width:1100px) and (orientation:landscape){.scene-label{width:310px}.label-content{padding:29px 28px 24px}.scene-label h2{font-size:27px}.label-category{margin-bottom:12px}.label-open{margin-top:15px}}
@media(max-width:700px) and (orientation:portrait){.scene-label{inset:auto 16px max(20px,env(safe-area-inset-bottom)) 16px!important;width:auto}.label-content{padding:29px 29px 24px;max-height:calc(100svh - 58px)}.scene-label h2{font-size:29px}.label-category{margin-bottom:11px}.label-open{margin-top:16px}.label-connector{display:none}.printed-ground{left:-30%;top:-15%;width:105%;height:145%;opacity:.07}.world>svg{width:160%;left:-30%}.print-words{font-size:16vw;gap:30vh}.world-words{font-size:29px}}
@media(prefers-reduced-motion:reduce){.trace-lines,.route-lines{stroke-dashoffset:0}.world,.printed-ground,.place-light,.room-light,.stage-shadow{transform:none!important}}
html[data-motion=off] .trace-lines,html[data-motion=off] .route-lines,html[data-motion=off] .label-connector path{stroke-dashoffset:0}
@media print{.atmospheres,.label-connector{display:none!important}}
