@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');
:root{--ink:#33334e;--muted:#868296;--pink:#ae607d;--line:#e6dedb;--cream:#f8f4ee;--lavender:#eeebf6}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}button,a,input{ -webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #8c6db5;outline-offset:4px}button{color:inherit}button:hover{filter:brightness(.96)}.topbar{max-width:1600px;margin:auto;height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:0 5%}.brand{font-family:'Playfair Display',Georgia,serif;font-size:20px;text-decoration:none;color:var(--ink);display:flex;align-items:center;gap:13px}.brand-mark{color:var(--pink);font-size:30px}.top-actions{display:flex;align-items:center;gap:25px}.profile{font-size:12px;color:var(--muted)}.profile i,.location-tag i{display:inline-block;width:6px;height:6px;background:#a8b999;border-radius:50%;margin-right:7px}.icon-button{border:0;background:transparent;font-size:17px;padding:8px;border-radius:8px}.icon-button span{font-size:12px;margin-left:4px}main{max-width:1440px;margin:auto;padding:0 5%}.intro{display:flex;justify-content:space-between;align-items:center;padding:42px 0 32px}.eyebrow{font-size:10px;letter-spacing:2.5px;font-weight:700;color:var(--pink);margin:0 0 12px}h1{font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:46px;letter-spacing:-1.4px;line-height:1.18;margin:0 0 14px}h1 em{color:var(--pink)}.subtitle{color:var(--muted);font-size:13px;margin:0}.dedication{text-align:center;padding-right:34px;transform:rotate(-3deg)}.dedication>span{font-size:35px;color:#caa66e}.dedication p{font-family:'Playfair Display',Georgia,serif;font-size:18px;font-style:italic;line-height:1.5;margin:7px 0 12px}.dedication small{font-size:8px;letter-spacing:2px;color:var(--muted)}.game-shell{border:1px solid #ddd6dc;border-radius:16px;overflow:hidden;box-shadow:0 14px 45px #5141640b;background:#fffdfa}.game-toolbar{display:flex;justify-content:space-between;align-items:center;padding:17px 25px;height:81px}.chapter-label{display:flex;align-items:center;gap:14px}.chapter-label>span{font-family:Georgia,serif;font-size:23px;color:#ad869f;border:1px solid #e5dce8;background:#f5eff6;border-radius:10px;width:43px;height:43px;display:grid;place-items:center}.chapter-label small{font-size:8px;color:var(--muted);letter-spacing:1.8px}.chapter-label h2{font-family:'Playfair Display',Georgia,serif;font-size:18px;font-weight:500;margin:4px 0 0}.game-stats{display:flex;align-items:center;gap:20px}.game-stats>span:first-child{color:#c19756;font-size:19px}.game-stats b{font-size:14px;color:var(--ink);margin-left:5px}.game-stats small{font-size:11px;color:var(--muted)}.divider{height:20px;width:1px;background:var(--line)}#save-status{font-size:10px;color:#8a9985}.stage-wrap{position:relative;aspect-ratio:2.4;background:#e5d9ef;overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none}.stage-vignette{position:absolute;inset:0;box-shadow:inset 0 0 90px #5f457b16;pointer-events:none}.location-tag{position:absolute;top:20px;left:22px;font-size:8px;letter-spacing:1.7px;color:#655879;background:#fff9efb8;border:1px solid #fff8;padding:9px 13px;border-radius:20px;pointer-events:none}.location-tag i{background:#a17eae}.game-footer{padding:16px 23px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:57px}.controls{display:flex;gap:16px;font-size:10px;color:var(--muted);align-items:center}.controls>span{display:flex;gap:4px;align-items:center}kbd{display:inline-block;border:1px solid #dfdce4;border-bottom:2px solid #d8d4dd;background:#f8f6fa;padding:2px 5px;border-radius:4px;font-family:inherit;font-size:9px;color:#777085}.game-footer p{font-size:11px;color:#8d8198;margin:0}.text-button{border:0;background:none;font-size:10px;color:#8e7a9c;white-space:nowrap}.text-button span{border:1px solid #c9c0d0;border-radius:50%;display:inline-block;width:14px;height:14px;line-height:12px;margin-left:5px}.journey{padding-top:28px}.journey-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.journey-heading h2{font-family:'Playfair Display',Georgia,serif;font-size:19px;font-weight:500;margin:0}.journey-heading p{font-size:11px;color:var(--muted);margin:0}.chapter-track{display:grid;grid-template-columns:repeat(12,1fr);gap:10px;position:relative}.chapter-track:before{content:'';position:absolute;top:21px;left:30px;right:30px;border-top:1px dashed #d8cfdc;z-index:-1}.chapter-node{border:0;background:transparent;text-align:center;min-width:0;padding:0}.chapter-node>span{width:41px;height:41px;display:grid;place-items:center;border:1px solid #e3dce5;border-radius:50%;background:var(--cream);margin:0 auto 8px;font-size:12px;color:#b8adbc}.chapter-node.current>span{background:#a6779b;border-color:#a6779b;color:white;box-shadow:0 0 0 5px #eee3ed}.chapter-node.done>span{background:#e7eddf;color:#81916c;border-color:#d5dfc9}.chapter-node small{font-size:8px;line-height:1.3;color:var(--muted);display:block}.page-footer{display:flex;justify-content:space-between;color:#a99aab;font-size:10px;padding:28px 0 22px}.start-overlay{position:absolute;inset:0;background:#eee7f126;display:grid;place-items:center;backdrop-filter:blur(2px)}.start-card{text-align:center;background:#fffaf1ef;border:1px solid #fff9;border-radius:17px;padding:23px 40px;box-shadow:0 15px 60px #67507720}.tiny-star{font-size:29px;color:#c59b5d}.start-card .eyebrow{margin-top:9px;font-size:8px}.start-card h2{font:500 35px 'Playfair Display',Georgia,serif;margin:0 0 10px}.start-card p:not(.eyebrow){font-size:12px;line-height:1.7;color:#8c8190;margin:0 0 18px}.primary{border:0;background:#a57296;color:white;border-radius:8px;padding:12px 22px;font-size:12px;font-weight:600}.primary span{margin-left:30px}.start-card small{display:block;font-size:9px;color:#aaa0ac;margin-top:13px}.hidden{display:none!important}.interact{position:absolute;bottom:25%;left:50%;transform:translateX(-50%);background:#fffaf0f0;border:1px solid #d5bbd9;border-radius:9px;color:#7e5f8b;padding:11px 15px;font-size:11px;box-shadow:0 5px 20px #65458017}.interact kbd{margin-left:12px}.toast{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);padding:10px 19px;background:#fffaf2ed;border-radius:30px;color:#836383;font-size:12px;opacity:0;transition:opacity .25s;pointer-events:none;white-space:nowrap}.toast.show{opacity:1}.touch-controls{display:none;position:absolute;bottom:14px;left:15px;right:15px;gap:8px;pointer-events:none}.touch-controls button{pointer-events:auto;background:#fff9eebd;border:1px solid #fff8;border-radius:50%;width:42px;height:42px;color:#7e618d;font-size:19px;touch-action:none;user-select:none}.touch-controls button:nth-child(3){margin-left:auto}dialog{border:1px solid #e2d5e3;border-radius:19px;width:min(540px,calc(100% - 30px));background:#fffaf3;color:var(--ink);padding:25px;box-shadow:0 30px 100px #35283b55;max-height:90dvh;overflow:auto}dialog::backdrop{background:#37304260;backdrop-filter:blur(5px)}.modal-top{display:flex;justify-content:space-between;align-items:center}.modal-top .eyebrow{margin:0}#close-modal{font-size:26px;padding:0 5px}dialog h2{font:500 29px 'Playfair Display',Georgia,serif;margin:14px 0}#modal-body>p{color:#897c8d;font-size:13px;line-height:1.8}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.secondary{background:#f1eaf2;border:1px solid #dfd2e3;padding:11px 16px;border-radius:8px;font-size:12px}.field-label{display:block;font-size:11px;color:#8b7a94;margin:15px 0 8px}input[type=text]{display:block;width:100%;padding:12px;border:1px solid #dcd0e1;border-radius:8px;background:#fff;color:var(--ink)}.feedback{min-height:24px;color:#9d6888;font-size:12px;line-height:1.6}.clue{border-left:2px solid #c5aacd;padding:12px 18px;background:#f5eef6;font-family:Georgia,serif;font-style:italic;font-size:17px;line-height:1.7}.puzzle{display:grid;grid-template-columns:repeat(3,1fr);max-width:330px;gap:4px;margin:15px auto}.piece{aspect-ratio:1;border:2px solid #fff8;border-radius:5px;background-color:#dfd3ee;background-size:300% 300%;color:#fff;text-shadow:0 1px 4px #574664;font-size:18px}.piece.selected{outline:3px solid #b17c9b;outline-offset:0}.rhythm-lanes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;height:210px;margin:15px 0}.lane{position:relative;border:1px solid #dfd2e5;border-radius:10px;background:#f1eaf6;overflow:hidden;touch-action:manipulation}.lane b{position:absolute;bottom:15px;left:0;right:0;color:#b28ab5}.lane:after{content:'';position:absolute;bottom:44px;left:0;right:0;border-top:2px dashed #c8acca}.note{position:absolute;left:12%;width:76%;height:14px;background:#ba86ad;border-radius:6px;top:0;pointer-events:none}.lane.hit{background:#e1e9d6}.meter{height:5px;background:#e9e0eb;border-radius:10px;overflow:hidden}.meter>div{background:#b786aa;height:100%;transition:width .1s}.settings-group{padding:15px 0;border-bottom:1px solid var(--line)}.settings-group h3{font-size:13px;margin:0 0 5px}.settings-group p{font-size:11px;line-height:1.7;color:#8e8196;margin:0}.settings-group label{cursor:pointer;display:inline-block}.letter{font:italic 19px/1.8 Georgia,serif;padding:15px;color:#97728a;white-space:pre-line}.preview-notice{font-size:11px;background:#f1eaf5;padding:12px 15px;border-radius:8px;line-height:1.7;color:#8d7698}@media(min-width:1600px){main{padding:0 30px}.intro{padding-top:50px}}@media(max-width:1000px){.profile{display:none}.game-footer p{display:none}.controls{gap:10px}.topbar{height:72px}.intro{padding-top:28px}h1{font-size:37px}.chapter-node small{font-size:7px}.chapter-track{gap:4px}.chapter-node>span{width:34px;height:34px}.game-stats{gap:10px}.dedication{padding-right:0}}@media(max-width:650px){main{padding:0 15px}.topbar{padding:0 15px;height:65px}.brand{font-size:15px;gap:7px}.top-actions{gap:3px}.icon-button span{display:none}.dedication{display:none}h1{font-size:34px}.intro{padding:24px 0}.subtitle{font-size:11px}.eyebrow{font-size:8px}.game-toolbar{height:69px;padding:10px 14px}.chapter-label{gap:9px}.chapter-label h2{font-size:15px}.chapter-label>span{width:35px;height:35px;font-size:19px}.chapter-label small{font-size:7px}.game-stats .divider,#save-status{display:none}.game-stats{gap:4px}.stage-wrap{aspect-ratio:1.4}.start-card{padding:18px 23px}.start-card h2{font-size:28px}.start-card p:not(.eyebrow){font-size:11px}.start-card .tiny-star{display:none}.touch-controls{display:flex}.game-footer{padding:12px 14px}.controls{gap:8px;font-size:8px}.controls>span:last-child{display:none}.text-button{font-size:9px}.location-tag{left:12px;top:12px;font-size:7px;padding:7px 10px}.chapter-track{grid-template-columns:repeat(6,1fr);row-gap:15px}.chapter-node small{font-size:8px}.chapter-track:before{display:none}.journey{padding-top:23px}.page-footer{font-size:8px;gap:15px;padding-top:22px}.interact{bottom:29%;white-space:nowrap}.toast{bottom:65px;font-size:10px}.journey-heading h2{font-size:17px}.journey-heading p{font-size:9px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Les deux premiers mois de la poursuite. */
.stage-wrap{aspect-ratio:1120/600;background:#282334}
canvas{object-fit:contain}
.scene-meter{position:absolute;top:22px;right:22px;width:210px;color:#f0dfc6;background:#282336b8;padding:10px 13px;border:1px solid #d6ba8e44;border-radius:10px;pointer-events:none}
.scene-meter>span{font-size:8px;letter-spacing:1.3px;display:block;margin-bottom:7px}
.scene-meter>div{height:4px;background:#f0dbbf33;border-radius:9px;overflow:hidden}
.scene-meter i{display:block;height:100%;background:#e3bd7f;transition:width .1s}
.scene-caption{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);max-width:85%;margin:0;background:#252033d9;color:#f9e7ce;border:1px solid #d5b88b55;border-radius:9px;padding:12px 23px;text-align:center;font:italic 16px/1.5 Georgia,serif;pointer-events:none}
.scene-panel{position:absolute;inset:0;display:grid;place-items:center;background:#29203822;pointer-events:none}
.scene-panel.not-started{display:none}
.scene-card{pointer-events:auto;text-align:center;background:#fffaeff2;border:1px solid #e5d5bd;border-radius:17px;padding:25px 30px;box-shadow:0 15px 60px #21192e30;max-width:92%}
.scene-card h2{font:500 30px 'Playfair Display',Georgia,serif;margin:12px 0}
.scene-card p:not(.eyebrow){font-size:13px;line-height:1.9;color:#847084;margin:12px 0 20px}
.scene-card .eyebrow{font-size:8px;letter-spacing:2px}
.scene-card small{display:block;font-size:10px;color:#9c8d99;margin-top:15px}
.scene-card .scene-target{color:#a4778f!important;font-weight:700}
.scene-card .secondary{margin:4px}
.start-card h2{font-size:30px}
.touch-controls{z-index:3}
.touch-controls button:last-child{margin-left:auto;font-size:21px}
.start-overlay{z-index:4}
.toast{z-index:5}
@media(max-width:650px){.brand{font-size:13px;max-width:72%}.stage-wrap{aspect-ratio:1.4}.scene-meter{top:10px;right:10px;width:130px;padding:7px 9px}.scene-meter>span{font-size:6px;letter-spacing:.6px}.location-tag{max-width:50%;font-size:6px;letter-spacing:.8px}.scene-card{padding:16px 18px}.scene-card h2{font-size:23px;margin:8px 0}.scene-card p:not(.eyebrow){font-size:11px;margin:9px 0 13px;line-height:1.7}.scene-card .eyebrow{font-size:6px}.scene-caption{font-size:11px;bottom:18px;padding:8px 12px;width:88%}.chapter-label small{font-size:6px;letter-spacing:.9px}.start-card h2{font-size:24px}.touch-controls button{width:46px;height:46px}.game-stats>span:first-child{font-size:16px}.game-stats b{font-size:11px}.scene-card small{font-size:8px}.controls>span:last-child{display:flex}}
.toast{bottom:70px}

/* Les souvenirs interactifs s’adaptent au cadre du jeu. */
.seasonal-layer{position:absolute;inset:0;z-index:3;touch-action:none}
.seasonal-layer[hidden],.seasonal-layer [hidden]{display:none!important}
.gift-room{display:grid;grid-template-columns:repeat(10,1fr);grid-template-rows:repeat(10,1fr);gap:1.6%;padding:15% 9% 4% 29%}
.present{position:relative;padding:0;border:1px solid #eed7a0;border-radius:3px;background:var(--gift-color);box-shadow:0 3px 4px #172a3140;min-height:0;cursor:pointer}
.present:before{content:'';position:absolute;left:-4%;top:-2px;width:108%;height:24%;background:var(--gift-color);border-bottom:2px solid #f7dfaf99;border-radius:2px}
.present .ribbon{position:absolute;left:43%;top:0;width:15%;height:100%;background:#f4dab0}
.present .bow{position:absolute;left:17%;top:-55%;font-size:clamp(12px,2vw,27px);color:#ffeac2;line-height:1;z-index:1}
.present.opened{opacity:.27;transform:rotate(-8deg)!important;border-style:dashed;box-shadow:none}
.present.opened .bow{display:none}
.present:hover:not(:disabled){filter:brightness(1.2)}
.puzzle-board{position:absolute;left:4%;top:29%;width:54%;height:60%;display:grid;grid-template-columns:repeat(6,1fr);grid-template-rows:repeat(5,1fr);border:5px solid #e7c894;box-shadow:0 8px 20px #17252a55;background:#203e48}
.puzzle-cell{min-width:0;min-height:0;border:1px dashed #b7c3ad88;border-radius:0;background-color:#b8c6ad33;padding:0;cursor:pointer}
.puzzle-cell.filled,.puzzle-piece{background-image:url('./rugby.svg');background-size:600% 500%;background-repeat:no-repeat}
.puzzle-cell.filled{border:0;opacity:1}
.puzzle-tray{position:absolute;left:61%;top:29%;width:35%;height:60%;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(6,1fr);gap:5% 3%}
.puzzle-piece{border:1px solid #e9dfb6;border-radius:3px;min-width:0;min-height:0;cursor:grab;touch-action:none;position:relative;padding:0;box-shadow:1px 3px 5px #102c3244}
.puzzle-piece.selected,.moving-box.selected{outline:4px solid #fff0a9;z-index:4}
.moving-box{position:absolute;width:9%;height:13%;border:2px solid #b58555;border-radius:3px;background:linear-gradient(90deg,#bf9669 43%,#e7cc9b 44%,#e7cc9b 56%,#bf9669 57%);box-shadow:3px 5px 0 #161e2b33;cursor:grab;touch-action:none;transform:rotate(-4deg)}
.moving-box span{font:clamp(5px,.7vw,10px) sans-serif;color:#765f4e;position:absolute;bottom:8%;left:12%;border:1px solid #826449;padding:3%}
.sorting-bin{position:absolute;right:5%;top:38%;width:19%;height:49%;border:5px solid #a5b9ad;border-top:12px solid #c1cbbd;background:repeating-linear-gradient(90deg,#547466 0 12%,#456458 13% 18%);border-radius:6px 6px 30px 30px;color:#f7e6bb;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7%;box-shadow:6px 9px 0 #1c26343d}
.sorting-bin span{font-size:clamp(30px,6vw,90px)}.sorting-bin b{font:clamp(10px,1.2vw,20px) Georgia}.sorting-bin small{font-size:clamp(6px,.8vw,12px)}
.wrong-drop{animation:wrong-drop .25s}@keyframes wrong-drop{50%{filter:sepia(.8)}}
@media(max-width:650px){.puzzle-board{border-width:2px}.puzzle-tray{gap:4% 2%}.gift-room{padding-top:18%;padding-left:26%}.scene-card .season-description{font-size:13px}.sorting-bin{border-width:3px}.seasonal-layer{bottom:0}}
@media(max-width:650px){.stage-wrap{aspect-ratio:1120/600}.seasonal-layer{inset:0}.scene-card{max-height:96%;overflow:auto}.gift-room{padding-top:15%;padding-left:29%}}
.seasonal-layer{z-index:2}.scene-panel,.start-overlay{z-index:5}.scene-meter,.location-tag,.scene-caption{z-index:4}.touch-controls{z-index:6}
.math-room{pointer-events:none}.math-question{position:absolute;top:17%;left:33%;width:40%;padding:1.5% 2%;text-align:center;background:#fbecd4;border:2px solid #e0ba79;border-radius:10px;color:#57405a;font:bold clamp(14px,2.5vw,33px) Georgia;box-shadow:0 5px 20px #59404e22}
.math-answer{pointer-events:auto;position:absolute;right:4%;top:48%;width:23%;padding:3% 2%;border:1px solid #e7c796;background:#f8ecd8ee;border-radius:12px;display:flex;align-items:center;flex-direction:column;gap:12px;color:#604a5a}
.math-answer label{font-size:clamp(10px,1.1vw,16px)}.math-answer input{width:100%;font-size:clamp(18px,2.5vw,36px);text-align:center;border:1px solid #b29a9e;border-radius:7px;background:#fffbf1;padding:8px;color:#45334e}.math-answer button{border:0;border-radius:5px;background:#91677f;color:#fff4e5;padding:8px 14px}.math-feedback{font-size:11px;min-height:28px;text-align:center}.math-answer[hidden]{display:none}
@media(max-width:650px){.math-question{font-size:12px;padding:2%}.math-answer{gap:4px;padding:2%;top:42%}.math-answer input{padding:2px}.math-answer button{font-size:9px;padding:4px}.math-feedback{font-size:7px;min-height:10px}}
