@font-face{font-family:EDF;font-display:swap;src:url('../commun/EDF2020.otf')}@font-face{font-family:EDF;font-display:swap;src:url('../commun/EDF2020-Bold.otf');font-weight:700}@font-face{font-family:EDFSoft;font-display:swap;src:url('../commun/EDF2020Soft-BoldItalic.otf');font-weight:700;font-style:italic}
:root{--blue:#001a70;--green:#c0e410;--ink:#001a70;--paper:#fff;--muted:#526187}*{box-sizing:border-box}body{margin:0;background:#001a70;color:var(--ink);font:16px/1.4 EDF,system-ui,sans-serif;-webkit-font-smoothing:antialiased}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible{outline:3px solid #1057c8;outline-offset:4px}.game{max-width:460px;margin:32px auto;background:var(--paper);border-radius:30px;overflow:hidden;box-shadow:0 24px 80px #0004;position:relative}header{display:flex;justify-content:space-between;align-items:center;padding:20px 26px 12px;gap:16px}header img{object-fit:contain;object-position:left}.edition{text-align:right;font-size:13px;font-weight:700}.edition span{display:block;font-weight:400;color:var(--muted);font-size:12px}.intro{padding:14px 26px 19px}.chapter{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;letter-spacing:.08em}.steps{display:flex;gap:5px}.steps i{height:5px;width:22px;border-radius:9px;background:#001a7015}.steps i.active{background:var(--blue)}.steps i.done{background:#4f9e30}h1{font-size:48px;line-height:.97;letter-spacing:-.04em;margin:15px 0 12px;font-weight:700}em{font-family:EDFSoft,Georgia,serif;font-weight:700}h1 em{color:#4f9e30}p{margin:0}.intro p{font-size:16px;line-height:1.35;color:var(--muted);max-width:330px}.scene{height:128px;position:relative;overflow:hidden;background:var(--blue);margin:0 16px;border-radius:15px 15px 0 0}.scene>img{width:100%;height:100%;object-fit:cover;object-position:50% 54%;filter:saturate(.2) brightness(.58);transform:scale(1.015);transition:filter 1.2s,transform 1.8s}.scene.lit>img{filter:saturate(1) brightness(1);transform:scale(1.055)}.scene-caption{position:absolute;bottom:0;padding:28px 14px 11px;left:0;right:0;color:white;background:linear-gradient(transparent,#001a70e6);display:flex;gap:8px;align-items:center;font-size:13px}.scene-caption b{margin-left:auto;white-space:nowrap}.scene-dot,.power-dot{display:inline-block;background:var(--green);height:6px;width:6px;border-radius:50%;flex:none}.scene-dot{background:#fff8}.lit .scene-dot{background:var(--green);box-shadow:0 0 12px var(--green)}.playground{background:var(--blue);margin:0 16px;border-radius:0 0 17px 17px;color:white;padding:15px 13px 8px}.board-top{display:flex;justify-content:space-between;align-items:center;padding:0 1px 13px;font-size:11px;letter-spacing:.055em}.board-top>span:first-child{display:flex;align-items:center;gap:7px}#moves{letter-spacing:0;font-size:12px;color:#ffffffa8}.network{position:relative;margin:0 14px}.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.tile{aspect-ratio:1;padding:0;border:0;border-radius:11px;background:#f2f5ff;position:relative;box-shadow:0 3px 0 #1057c8;transition:background .22s,box-shadow .22s;min-width:0;color:var(--blue)}.tile:active{translate:0 2px;box-shadow:0 1px 0 #1057c8}.tile svg{width:100%;height:100%;display:block;overflow:visible;transition:transform .23s cubic-bezier(.2,.8,.2,1)}.track-shadow{stroke:#001a7015;stroke-width:16;fill:none;stroke-linecap:round}.track{stroke:#001a70;stroke-width:9;fill:none;stroke-linecap:round}.pulse{stroke:white;stroke-width:3;fill:none;stroke-dasharray:1 20;stroke-linecap:round;opacity:0}.tile.on{background:var(--green);box-shadow:0 3px 0 #4f9e30}.tile.on .pulse{opacity:.95;animation:flow 1.2s linear infinite}.tile.hint{outline:3px solid #ffb210;outline-offset:1px;z-index:1}.hub-dot{fill:#f2f5ff;stroke:#001a70;stroke-width:3}.tile.on .hub-dot{fill:var(--green)}@keyframes flow{to{stroke-dashoffset:-42}}.input-port{position:absolute;left:-22px;top:37.5%;translate:0 -50%;font-size:25px;color:var(--green);font-weight:700}.outputs{position:absolute;right:-17px;top:0;bottom:0;width:13px;pointer-events:none}.port{position:absolute;top:var(--top);translate:0 -50%;width:10px;height:10px;border:2px solid #ffffff80;border-radius:50%;background:var(--blue);transition:.3s}.port.on{background:var(--green);border-color:var(--green);box-shadow:0 0 13px #c0e410aa}.board-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:45px;padding-top:10px;font-size:12px;color:#ffffffbf}.board-bottom>span:last-child{font-size:22px;color:var(--green)}.tools{display:flex;justify-content:space-between;padding:10px 22px}.text-button{background:none;border:0;padding:10px 0;color:var(--muted);font-size:14px;min-height:44px}.text-button:hover{color:var(--blue)}.text-button span{color:var(--blue);padding-left:4px}footer{padding:5px 26px 20px;display:flex;justify-content:space-between;gap:15px;font-size:11px;color:var(--muted)}.result{padding:25px 26px 30px;background:white;animation:reveal .5s ease}.result[hidden]{display:none}.success-mark{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:var(--green);font-size:25px;margin-bottom:15px}.small{font-size:12px;letter-spacing:.1em;font-weight:700}h2{font-size:48px;letter-spacing:-.04em;line-height:1;margin:10px 0 15px}h2 em{color:#4f9e30}#result-copy{color:var(--muted)}.agent{display:flex;align-items:center;gap:12px;margin:22px 0;padding:14px 0;border-top:1px solid #001a7020;border-bottom:1px solid #001a7020}.agent img{object-fit:cover;border-radius:8px}.agent p{font-size:13px}.agent b,.agent span{display:block}.agent span{color:var(--muted);margin-top:4px}.primary{display:flex;justify-content:space-between;align-items:center;width:100%;background:var(--blue);color:white;border:0;border-radius:12px;padding:17px 20px;font-weight:700;font-size:16px}.primary span{color:var(--green);font-size:23px}.finished .playground,.finished .tools{display:none}.finished .scene{border-radius:15px}.finished .intro p{display:none}.finished h1{font-size:34px}.finished h1 br{display:none}.finished .intro{padding-bottom:15px}@keyframes reveal{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@media(max-width:520px){body{background:white}.game{margin:0 auto;border-radius:0;box-shadow:none;min-height:100svh}header{padding:14px 22px 7px}.intro{padding:10px 22px 16px}h1{font-size:43px;margin:12px 0 10px}.scene{height:111px}.game footer{padding-bottom:max(14px,env(safe-area-inset-bottom))}}@media(max-width:360px){h1{font-size:37px}.intro p{font-size:15px}.scene{height:94px}.playground{padding:12px 9px 5px}.scene,.playground{margin-left:12px;margin-right:12px}.tile{border-radius:8px}.board-top{font-size:10px}.edition{font-size:12px}.tools{padding:8px 18px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Le résultat se découvre après le trajet du courant, puis sur action du joueur. */
#delivery-cable{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:visible}.cable-base{fill:none;stroke:#1057c8;stroke-opacity:.3;stroke-width:4;stroke-linecap:round}.cable-flow{fill:none;stroke:var(--green);stroke-width:5;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;opacity:0}.delivering .cable-flow{opacity:1;stroke-dashoffset:0;transition:stroke-dashoffset 1.7s cubic-bezier(.3,0,.6,1)}.finished #delivery-cable{display:none}.input-port{left:-23px;display:flex;gap:0;align-items:center;font-size:28px;line-height:1}.input-port span{animation:incoming 1s ease-in-out infinite}.input-port span+span{animation-delay:.2s;margin-left:-5px}@keyframes incoming{0%,100%{opacity:.35;transform:translateX(-2px)}55%{opacity:1;transform:translateX(2px)}}.victory-pulse{animation:connected-pop .55s ease}@keyframes connected-pop{45%{box-shadow:0 0 16px #c0e41099;transform:scale(.94)}100%{transform:scale(1)}}.delivered .scene{box-shadow:0 0 0 2px var(--green);transition:box-shadow .5s}.delivered .scene-caption{font-weight:700}.continue-wrap{padding:0 22px 15px}.continue-wrap:has([hidden]){display:none}#continue[hidden]{display:none}#continue{background:var(--green);color:var(--blue);font-size:14px;gap:8px;animation:reveal .5s ease}#continue span{font-size:14px;color:var(--blue);white-space:nowrap}.text-button:disabled{opacity:.4;cursor:default}.celebrating .tile{cursor:default}.finished .continue-wrap{display:none}@media(prefers-reduced-motion:reduce){.delivering .cable-flow{stroke-dashoffset:0}}

/* V3: static blur is applied only after the cable and the relighting finish. */
.network>.continue-wrap{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:18px;background:#001a7026;border-radius:12px;pointer-events:none}
.network>.continue-wrap:has([hidden]){display:none}
#continue{pointer-events:auto;display:flex;flex-direction:column;text-align:center;gap:20px;padding:28px 16px;border-radius:20px;box-shadow:0 12px 30px #001a7033;animation:reveal .3s ease}
#continue b{font-size:26px;line-height:1.1;letter-spacing:-.025em}#continue span{font-size:16px;border-top:1px solid #001a7033;padding-top:14px;width:100%}
.delivered #board{filter:blur(4px);pointer-events:none}
.delivered .tile .pulse,.delivered .input-port span{animation-play-state:paused}
.tile:disabled{opacity:1;color:var(--blue)}
.scene>img{transition:none}.delivering .cable-flow{transition:none}
@media(prefers-reduced-motion:reduce){#continue{animation:none}}
