:root{--navy:#0b244b;--teal:#2D9C9F;--coral:#FF7F5A;--mint:#e8f5f0;--sky:#e8f8fe;--line:#dbe9ec;--white:#fff;--head:'Fredoka','Nunito Sans',sans-serif;--body:'Nunito Sans','Atkinson Hyperlegible',sans-serif}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:var(--body);color:var(--navy);background:#f6fbfa}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid var(--coral);outline-offset:3px}img{max-width:100%}button img{width:18px;height:18px;vertical-align:middle}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--head);font-weight:600}.shell{display:grid;grid-template-columns:148px minmax(0,1fr);height:100dvh;min-height:530px}.side{background:linear-gradient(#26a2a7,#138e91);display:flex;align-items:center;flex-direction:column;gap:20px;padding:106px 9px 22px}.nav-btn{border:2px solid transparent;background:transparent;color:white;width:100%;min-height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-family:var(--head);font-size:17px;font-weight:600;border-radius:18px}.nav-btn img{width:31px;height:31px;filter:brightness(0) invert(1)}.nav-btn.current{background:white;color:var(--navy);box-shadow:0 3px 12px #085a6225}.nav-btn.current img{filter:none}.nav-btn[data-page="home"].current img{filter:invert(48%) sepia(44%) saturate(2840%) hue-rotate(326deg) brightness(101%)}.nav-btn:hover:not(.current){background:#ffffff21}.workspace{display:flex;flex-direction:column;min-width:0;overflow:hidden}.topbar{height:97px;flex-shrink:0;background:#fff;display:flex;align-items:center;gap:clamp(20px,5vw,80px);padding:12px 28px;border-bottom:1px solid #e4eeef}.brand{font:600 clamp(24px,2.2vw,34px)/.94 var(--head);letter-spacing:-.04em;white-space:nowrap}.brand strong{color:var(--coral);font-size:.87em}.search{width:min(470px,100%);min-width:120px;max-height:55px;border:1.5px solid #ccdde2;background:white;border-radius:50px;display:flex;gap:10px;align-items:center;padding:7px 9px 7px 17px}.search img{width:20px;height:20px}.search input{min-width:0;width:100%;border:0;outline:0;background:none;font-size:13px}.search button{border:0;border-radius:23px;background:#e6f3f2;padding:7px 13px;color:#04666e;font-weight:800;font-size:12px}main{flex:1;min-height:0;overflow:auto;scrollbar-color:#bdd8d8 transparent}.view{display:none;padding:16px 17px;min-height:100%}.view.active{display:block}.two-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(315px,355px);gap:16px;align-items:stretch;min-height:calc(100dvh - 129px);max-height:calc(100dvh - 129px)}.home-main,.explore-main{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:stretch}.map-wrap{flex:1;min-height:0;display:grid;place-items:center;background:linear-gradient(#e3f8fa,#eaf6ef);border-radius:20px;overflow:hidden;padding:14px}.map-frame{width:min(100%,calc((100dvh - 225px)*1.776));aspect-ratio:1672 / 941;position:relative;isolation:isolate}.map-base{width:100%;height:100%;object-fit:contain;display:block;border-radius:11px}.map-title{position:absolute;top:3%;left:4%;font:600 clamp(15px,2.3vw,36px)/1.02 var(--head);color:var(--navy);text-shadow:0 1px white,0 0 7px white;max-width:50%;pointer-events:none}.landmark{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);display:flex;align-items:center;gap:5px;background:#fffef5f2;border:2px solid white;border-radius:30px;box-shadow:0 2px 7px #04374c5c;padding:3px 9px 3px 3px;font:600 clamp(10px,1.1vw,14px)/1 var(--head);color:var(--navy);white-space:nowrap;z-index:1}.landmark b{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--teal);color:white;flex-shrink:0}.landmark:hover,.landmark.active{border-color:var(--coral);box-shadow:0 0 0 3px #ff7f5a39,0 3px 9px #04374c44;z-index:3}.landmark.active b{background:var(--coral)}.map-instructions{font-size:12px;color:#537780;text-align:center;padding:9px 2px 2px;flex-shrink:0}.detail{background:white;border:1px solid #e2eded;border-radius:20px;padding:20px;display:flex;flex-direction:column;gap:12px;min-height:0;box-shadow:0 3px 12px #102c4120}.detail-top{display:flex;flex-direction:column;gap:10px}.detail-top small{color:#008e98;font-weight:800;letter-spacing:.04em}.detail-title{display:flex;align-items:center;gap:10px}.detail-title h2{font-size:clamp(20px,2vw,28px);line-height:1.07}.step-circle{width:43px;height:43px;background:var(--coral);color:#fff;border-radius:50%;display:grid;place-items:center;font:600 24px var(--head);flex-shrink:0}.detail-top p{font-size:clamp(13px,1.06vw,15px);line-height:1.56}.detail-image{width:100%;height:clamp(130px,22dvh,215px);object-fit:cover;border-radius:13px;flex:0 1 auto;background:var(--sky)}.detail-note{background:#e6f4ef;border-radius:13px;padding:12px 13px;font-size:13px;line-height:1.45}.step-nav{display:flex;gap:8px;margin-top:auto}.step-nav button{flex:1;min-height:39px;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:800;font-size:13px;border-radius:14px;padding:6px}.prev{border:1px solid #d3e0e5;background:white;color:#1e4b60}.next{border:0;background:var(--coral);color:white}.next img{filter:brightness(0) invert(1)}button:disabled{opacity:.38;cursor:not-allowed}.explore-link,.action-large{border:0;border-radius:18px;background:var(--coral);color:white;font-weight:900;display:flex;gap:8px;align-items:center;justify-content:center;min-height:43px}.explore-link img,.action-large img{filter:brightness(0) invert(1)}.explore-heading{min-height:57px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 5px}.explore-heading h1{font-size:clamp(19px,2vw,30px)}.ghost-btn{background:white;border:1px solid #bcd5d8;border-radius:16px;padding:8px 12px;color:#145c65;font-size:12px;font-weight:800;white-space:nowrap}.scene-box{flex:1;min-height:0;overflow:hidden;border-radius:20px;background:#dff5f5;position:relative}.scene-shell{width:100%;height:100%;position:relative;overflow:hidden;touch-action:pan-y}#gl{width:100%;height:100%;display:block;touch-action:none;cursor:grab}#gl:active{cursor:grabbing}.scene-controls{position:absolute;top:13px;left:13px;display:flex;flex-direction:column;gap:8px;z-index:7;pointer-events:none}.scene-controls label{pointer-events:auto;display:flex;align-items:center;gap:8px;background:#fffefaee;padding:9px 11px;border-radius:12px;font-size:12px;font-weight:800;box-shadow:0 2px 6px #1a525a26}.scene-controls input{width:18px;height:18px;accent-color:var(--teal);margin:0}.scene-buttons{position:absolute;bottom:16px;right:14px;display:grid;gap:8px}.scene-buttons button{width:40px;height:40px;border:1px solid #bdd8df;border-radius:50%;background:white;font-size:25px;font-weight:700;color:var(--navy)}.scene-pins{position:absolute;inset:0;pointer-events:none}.pin{position:absolute;pointer-events:auto;border:2px solid #fff;border-radius:30px;background:#ffffffe9;box-shadow:0 2px 5px #0a293f55;color:#0b244b;font:700 12px var(--head);padding:5px;min-width:28px;min-height:28px;transform:translate(-50%,-50%)}.pin.active{background:var(--coral);color:white;border-color:white;z-index:2}.quiz-shell{max-width:1140px;margin:auto;background:white;border:1px solid #dfecec;border-radius:20px;padding:clamp(16px,3vw,33px)}.eyebrow{font-weight:900;color:var(--teal);font-size:12px;letter-spacing:.07em}.quiz-header{display:flex;justify-content:space-between;gap:20px;align-items:center}.quiz-header h1{font-size:clamp(26px,4vw,42px)}.quiz-header p{line-height:1.45}.quiz-counter{min-width:140px;text-align:right}.progress{height:8px;background:#e6f0f1;border-radius:20px;margin-top:6px;overflow:hidden}.progress span{display:block;height:100%;width:10%;background:var(--teal);transition:width .2s}.quiz-card{margin-top:20px;display:grid;grid-template-columns:minmax(240px,.8fr) 1.2fr;gap:25px}.quiz-illustration img{width:100%;height:310px;object-fit:cover;border-radius:16px}.quiz-questions{display:flex;flex-direction:column;gap:16px}.quiz-questions h2{font-size:clamp(21px,2.7vw,30px);line-height:1.2}.quiz-options{display:grid;gap:9px}.quiz-choice{text-align:left;display:flex;align-items:center;gap:10px;background:#f3fbfc;border:2px solid #d9eff0;border-radius:13px;color:var(--navy);padding:12px 13px;font-weight:700}.quiz-choice span{display:grid;place-items:center;border-radius:50%;width:26px;height:26px;background:#d2ebee;color:#087983;flex:0 0 26px}.quiz-choice.correct{border-color:#2f9c63;background:#e5f6e9}.quiz-choice.wrong{border-color:#ed806b;background:#fff0ed}.quiz-feedback{background:#e6f5ed;padding:13px;border-radius:13px;font-size:14px;line-height:1.4}.quiz-questions .action-large{margin-top:auto;align-self:flex-end;padding:10px 16px}.quiz-result{text-align:center;padding:50px 20px}.quiz-result h2{font-size:35px}.quiz-result button{background:var(--coral);border:0;border-radius:15px;padding:13px 22px;color:white;font-weight:800;margin-top:15px}.modal-layer[hidden]{display:none}.modal-layer{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:16px}.modal-underlay{position:absolute;inset:0;background:#082b3bb5;backdrop-filter:blur(3px)}.modal-card{z-index:1;position:relative;background:white;border-radius:24px;width:min(960px,100%);max-height:90dvh;overflow:auto;padding:23px;box-shadow:0 16px 50px #17333a66}.modal-top{display:flex;justify-content:space-between;align-items:center}.modal-top small{color:var(--teal);font-weight:900}.modal-top h2{font-size:clamp(25px,3.2vw,35px)}.close-btn{border:0;width:43px;height:43px;display:grid;place-items:center;background:#e6f5f4;border-radius:50%}.gloss-hint{margin:8px 0 17px;color:#4b6b78}.gloss-body{display:grid;grid-template-columns:1fr 1fr;gap:15px}.gloss-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:8px}.gloss-item{display:flex;align-items:center;text-align:left;gap:8px;padding:7px;border:2px solid #e2f0f0;background:#f9fcfc;border-radius:12px;font-size:12px;font-weight:800;color:var(--navy)}.gloss-item.active{border-color:var(--coral);background:#fff6f2}.gloss-item img{width:55px;height:55px;border-radius:8px;object-fit:cover;flex-shrink:0}.gloss-detail{padding:10px 12px;background:#eef9f6;border-radius:16px}.gloss-detail img{width:100%;max-height:260px;object-fit:cover;border-radius:12px}.gloss-detail h3{font-size:25px;margin:9px 0 5px}.gloss-detail p{font-size:14px;line-height:1.55}.gloss-example{margin-top:12px;background:white;border-radius:11px;padding:11px}.gloss-example:before{content:'Exemple : ';font-weight:800;color:#087e88}
@media(max-width:1150px){.two-cols{grid-template-columns:minmax(0,1fr) 300px;gap:10px}.detail{padding:13px;gap:8px}.detail-note{font-size:12px;padding:9px}.detail-image{height:clamp(115px,18dvh,185px)}.brand{font-size:25px}.map-title{font-size:24px}.landmark span{display:none}.landmark{padding:2px;border-radius:50%}.landmark b{width:26px;height:26px}.topbar{gap:25px}}
@media(max-width:850px){.shell{height:auto;min-height:100dvh;display:block;padding-bottom:74px}.side{position:fixed;z-index:45;bottom:0;left:0;right:0;height:72px;padding:6px 8px;display:grid;grid-template-columns:repeat(4,1fr);gap:5px;background:#158d94;flex-direction:row}.nav-btn{min-height:58px;border-radius:12px;gap:1px;font-size:11px}.nav-btn img{width:22px;height:22px}.workspace{overflow:visible}.topbar{height:auto;min-height:92px;padding:12px 15px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px}.brand{font-size:22px}.search{width:min(100%,360px);height:37px;flex:1 1 100%;order:2;max-width:none}.search input{font-size:12px}.search button{padding:4px 10px}main{overflow:visible}.view{padding:10px;min-height:0}.two-cols{display:flex;flex-direction:column;min-height:auto;max-height:none;gap:10px}.map-wrap{padding:0;min-height:0}.map-frame{width:100%;aspect-ratio:1672/941}.map-title{font-size:clamp(14px,4.2vw,24px)}.landmark b{width:24px;height:24px}.map-instructions{padding:7px}.detail{padding:15px;overflow:visible;min-height:0}.detail-image{width:100%;height:clamp(150px,38vw,235px)}.detail-top p{font-size:14px}.detail-note{font-size:13px}.explore-main{min-height:0}.scene-box{flex:none;height:min(64vw,430px);min-height:300px}.scene-controls{top:10px;left:9px;gap:5px}.scene-controls label{padding:5px 7px;font-size:10px}.scene-controls input{width:16px;height:16px}.explore-heading{min-height:53px}.explore-heading h1{font-size:19px}.explore-heading .ghost-btn{font-size:11px}.quiz-shell{padding:14px}.quiz-card{grid-template-columns:1fr;gap:13px}.quiz-illustration img{height:200px}.quiz-header{align-items:flex-start}.quiz-counter{min-width:95px}.quiz-header p{font-size:13px}.quiz-questions h2{font-size:23px}.gloss-body{display:flex;flex-direction:column}.gloss-detail{order:-1}.modal-card{padding:14px;max-height:86dvh}.gloss-list{grid-template-columns:repeat(2,minmax(0,1fr))}.gloss-item img{width:45px;height:45px}}
@media(max-width:420px){.map-title{font-size:14px;max-width:65%}.landmark{font-size:10px}.landmark b{width:22px;height:22px;font-size:12px}.scene-box{height:360px}.quiz-header h1{font-size:26px}.step-nav button{font-size:12px}.detail-title h2{font-size:24px}.gloss-item{font-size:11px;gap:4px}.gloss-item img{width:43px;height:43px}}
/* Jeux : extension de la V2 validée. Menu principal et charte inchangés. */
.games-shell{max-width:1180px;margin:auto;padding:clamp(14px,2.7vw,27px);background:white;border:1px solid #dfecec;border-radius:22px;min-height:500px}
.games-header{margin-bottom:23px}.games-header h1{font-size:clamp(29px,4vw,44px);margin:5px 0}.games-header p{font-size:16px}
.games-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}
.game-tile{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:13px;border:2px solid #d7eaeb;background:#fff;border-radius:17px;padding:18px 16px;color:var(--navy);min-height:280px;transition:border-color .15s,transform .15s}
.game-tile:hover{border-color:var(--coral);transform:translateY(-2px)}.game-tile strong{font:600 23px/1.1 var(--head)}.game-tile span:not(.tile-symbol){font-size:14px;line-height:1.55}.game-tile em{font-style:normal;background:var(--coral);color:white;border-radius:30px;padding:9px 25px;margin-top:auto;font-weight:800}
.tile-symbol{display:grid;place-items:center;width:64px;height:64px;background:#e1f5f5;color:#0f8589;border-radius:17px;font:700 24px var(--head)}.game-tile:nth-child(2) .tile-symbol{background:#e5f1ff;color:#125ca6;font-size:18px}.game-tile:nth-child(3) .tile-symbol{background:#e6f7eb;color:#209569}.game-tile:nth-child(4) .tile-symbol{background:#ffe9e2;color:#ec6e52}
#game-area{max-width:890px;margin:auto}.game-title{margin:16px 0 25px}.game-title small{font-weight:900;font-size:12px;color:var(--teal);letter-spacing:.07em}.game-title h2{font-size:clamp(27px,3.4vw,37px);margin:7px 0}.game-title p{line-height:1.5;font-size:15px}.game-timer{float:right;font-size:14px;font-weight:800;color:#0e777d}.game-progress{height:8px;border-radius:20px;background:#e0eced;overflow:hidden;margin-top:12px}.game-progress span{display:block;height:100%;background:var(--teal)}
.game-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.game-settings label{display:grid;gap:7px;font-weight:800;font-size:14px}.game-settings select{padding:14px;border-radius:12px;border:1.5px solid #c9e2e5;background:white;color:var(--navy);min-width:0}
.game-action{background:var(--coral);border:0;color:white;font-weight:900;border-radius:28px;padding:12px 24px}.game-action:disabled{opacity:.42;cursor:not-allowed}.game-action.wide{grid-column:1/-1;justify-self:start}.game-next{display:block;margin:20px 0 0 auto}.game-question{padding:8px 0 25px}.game-question h3{font:600 clamp(22px,3vw,30px)/1.2 var(--head);margin-bottom:20px}.game-answer-grid{display:grid;gap:9px}.game-choice,.sort-choices button{border:2px solid #daeff0;border-radius:13px;padding:13px 17px;color:var(--navy);font-weight:750;background:#f4fafb;text-align:left;display:flex;align-items:center;gap:12px}.game-choice b{background:#d1eced;width:29px;height:29px;border-radius:50%;display:grid;place-items:center;flex-shrink:0}.game-choice:hover:not(:disabled),.sort-choices button:hover:not(:disabled){border-color:var(--teal)}.game-choice.correct,.sort-choices button.correct{border-color:#399e74;background:#e6f5ec}.game-choice.wrong,.sort-choices button.wrong{border-color:#e87860;background:#fff0eb}.game-choice:disabled,.sort-choices button:disabled{cursor:default}.game-feedback{margin-top:15px;padding:14px 16px;background:#e6f5ed;border-radius:14px;line-height:1.5;font-size:15px}.game-feedback.positive{background:#dcf8e6}.game-finish{text-align:center;background:#f2faf8;border-radius:16px;padding:50px 20px;margin-top:24px}.game-finish h2{font-size:36px}.game-finish p{margin:13px 0;line-height:1.5}
.order-list{list-style:none;padding:0;display:grid;gap:9px}.order-list li{border:2px solid #deeff0;background:#f5fbfc;padding:9px 13px;border-radius:12px;display:flex;align-items:center;gap:13px;cursor:grab}.order-list li span:not(.move-controls){flex:1;font-weight:800}.order-rank{background:#e1f3f3;border-radius:50%;width:32px;height:32px;display:grid;place-items:center}.move-controls{display:flex;gap:5px}.move-controls button{border-radius:8px;background:white;border:1px solid #cadfe0;padding:4px 13px;font-size:23px;color:var(--navy)}.move-controls button:disabled{opacity:.3}.game-toolbar{display:flex;flex-wrap:wrap;gap:13px;margin-top:18px}.sort-scenario{padding:24px;background:#e4f5f5;border-radius:16px;font:600 23px var(--head)}.sort-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.sort-choices button{justify-content:center;text-align:center;min-height:90px}
#game-area>.ghost-btn{border:1px solid #c4e1e2;background:#f4fbfb;color:#0b7180;padding:8px 16px;border-radius:20px;font-weight:800}
@media(max-width:1020px){.games-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-tile{min-height:230px}}
@media(max-width:600px){.games-grid{grid-template-columns:1fr;gap:9px}.game-tile{min-height:0;display:grid;grid-template-columns:54px 1fr;gap:6px 13px;padding:13px}.tile-symbol{width:52px;height:52px;grid-row:span 3}.game-tile strong{font-size:20px}.game-tile span:not(.tile-symbol){font-size:12px}.game-tile em{margin:0;justify-self:start;font-size:12px;padding:5px 18px}.game-settings{grid-template-columns:1fr;gap:15px}.game-settings .wide{grid-column:1}.sort-choices{grid-template-columns:1fr}.order-list li{gap:6px;font-size:13px}.games-shell{padding:14px}.game-title h2{font-size:26px}.game-question h3{font-size:22px}}

/* V2 stabilisée - corrections ergonomiques : un seul jeu à la fois et illustrations indépendantes. */
[hidden] {display:none !important;}
.games-shell{max-width:1370px}
.games-grid{gap:17px}
.game-tile{padding:0 0 17px;overflow:hidden;border:1.5px solid #dbeaed;box-shadow:0 5px 12px #11505b0c;min-height:300px;gap:10px}
.game-tile:before{content:'';display:block;width:100%;height:110px;background-color:#ffdb96;background-image:url('assets/images/game_tap.webp');background-position:center 43%;background-size:cover}
.game-tile:nth-child(2):before{background-image:url('assets/images/etape_reseau.webp');background-color:#b7e6fd}
.game-tile:nth-child(3):before{background-image:url('assets/images/etape_chateau.webp');background-color:#d4f0dc}
.game-tile:nth-child(4):before{background-image:url('assets/images/game_river.webp');background-color:#dcdafa}
.game-tile>.tile-symbol{display:none}
.game-tile>strong,.game-tile>span:not(.tile-symbol),.game-tile>em{margin-left:16px;margin-right:16px}
.game-tile>strong{font-size:22px}.game-tile>em{display:inline-flex;align-items:center;justify-content:center;margin-top:auto}
#game-area{max-width:1040px;margin:0 auto}#game-area:not([hidden]){animation:slide-in .18s ease-out}
@keyframes slide-in {from{opacity:.75;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
.game-illustrated-layout,.sort-layout{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:24px;align-items:start}
.game-main-art{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:18px;border:1px solid #d7e8ea;background:#edf8fa}
.game-illustrated-layout .game-answer-grid{gap:7px}
.game-illustrated-layout .game-choice{padding:12px 14px;min-height:53px}
.sort-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
.sort-scenario{font-size:clamp(19px,2.3vw,26px);padding:20px}
.sort-layout .sort-choices{grid-template-columns:1fr;gap:11px}
.sort-layout .sort-choices button{justify-content:flex-start;min-height:76px;padding:12px 20px;text-align:left}
.order-list{gap:11px}.order-card{position:relative;display:flex;align-items:center;gap:14px;min-height:96px;padding:7px 12px !important;border-radius:15px !important;cursor:default !important;transition:background .15s,border-color .15s}
.order-art{width:128px;height:80px;object-fit:cover;border-radius:10px;flex-shrink:0}
.order-card-text{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.order-card-text>b{font:600 20px/1.1 var(--head)}
.order-card-text>small{font-size:12px;line-height:1.35;color:#385269}
.drag-grip{touch-action:none;cursor:grab;font-size:30px;line-height:1;flex-shrink:0;width:43px;height:50px;display:grid;place-items:center;color:#148d95;border:1px dashed #8fcacc;background:#fff;border-radius:10px}
.drag-grip:active{cursor:grabbing}
.order-card.dragging{border-style:dashed !important;opacity:.45;background:#e8f5f5;transform:rotate(-1deg)}
.order-card.drop-target:not(.dragging){outline:3px dashed var(--coral);outline-offset:4px;background:#fff8f4;box-shadow:0 0 0 3px #fff}
.drag-ghost{position:fixed !important;z-index:1000;pointer-events:none;box-shadow:0 16px 32px #072b4840;transform:rotate(-5deg) scale(1.035);background:#fff !important;border:2px solid var(--coral) !important;border-radius:15px;display:flex;align-items:center;gap:12px;padding:8px 12px;overflow:hidden;opacity:.97}
.drag-ghost img.order-art{width:126px;height:80px;object-fit:cover}
.drag-ghost .move-controls{display:none}
.move-controls{flex-shrink:0}
.game-title{margin:18px 0 22px}.game-title p{max-width:800px}
@media(max-width:1050px){.game-illustrated-layout,.sort-layout{grid-template-columns:1fr}.game-main-art{max-height:300px;aspect-ratio:16/9}.sort-layout .sort-choices{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.game-tile{display:flex;min-height:unset;gap:8px;padding:0 0 14px}.game-tile:before{height:125px}.game-tile strong{font-size:21px}.game-tile span:not(.tile-symbol){font-size:14px}.game-tile>em{padding:8px 22px}.order-art{width:92px;height:72px}.order-card{gap:7px;min-height:80px;padding:6px !important}.order-card-text>b{font-size:16px}.order-card-text small{display:none}.drag-grip{font-size:27px;width:35px;height:40px}.move-controls{gap:2px}.move-controls button{padding:4px 7px;font-size:18px}.sort-layout .sort-choices{grid-template-columns:1fr}.game-main-art{max-height:240px}.game-illustrated-layout .game-choice{font-size:14px}}

/* Exploration illustrée - prototype limité au nouveau périmètre. Jeux et glossaire inchangés. */
.welcome{max-width:1450px;margin:0 auto;padding:clamp(7px,2vw,24px)}
.welcome-hero{display:grid;grid-template-columns:minmax(250px,.55fr) minmax(0,1fr);align-items:center;gap:20px;min-height:260px}
.welcome-copy{display:grid;gap:12px;align-content:center;max-width:510px}
.welcome-copy h1{font-size:clamp(31px,4.6vw,58px);line-height:1.04;letter-spacing:-.028em}
.welcome-copy h1 span{color:var(--coral)}
.welcome-copy p{font-size:clamp(14px,1.2vw,18px);line-height:1.55}
.welcome-landscape{display:block;width:100%;max-height:340px;object-fit:contain}
.welcome-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:14px}
.welcome-card{display:flex;flex-direction:column;text-align:left;gap:9px;padding:13px;border:1px solid #dce9eb;background:white;border-radius:19px;box-shadow:0 5px 16px #173b4911;color:var(--navy)}
.welcome-card>img{width:100%;height:clamp(105px,12vw,160px);object-fit:contain;background:#eff9f8;border-radius:13px}
.welcome-card>strong{font:600 clamp(20px,1.6vw,26px)/1.13 var(--head)}
.welcome-card>span{font-size:clamp(12px,1.1vw,15px);line-height:1.4;flex:1}
.welcome-card>em{display:flex;align-items:center;justify-content:space-between;font-style:normal;font-weight:900;color:white;background:var(--coral);padding:9px 15px;border-radius:22px;margin-top:4px}
.welcome-card>em img{filter:brightness(0) invert(1)}
.welcome-card:hover,.welcome-card:focus-visible{border-color:var(--coral);box-shadow:0 6px 18px #ff7f5a32}
.illustrated-columns{grid-template-columns:minmax(0,1fr) minmax(305px,355px)}
.illustrated-scene{position:relative;flex:1;min-height:0;display:grid;place-items:center;background:linear-gradient(#e6f8f9,#f7fbf9);border-radius:20px;overflow:hidden;isolation:isolate}
.territory-view,.stage-view{width:100%;height:100%;position:relative;display:grid;place-items:center;overflow:hidden}
.territory-art{position:relative;width:min(100%,calc((100dvh - 265px)*1.777));aspect-ratio:1672/941;transition:transform .65s cubic-bezier(.2,.76,.22,1),opacity .36s ease;transform-origin:var(--focus-x,50%) var(--focus-y,50%)}
.territory-art.zooming{transform:scale(2.05);opacity:.15}
.territory-picture{display:block;width:100%;height:100%;object-fit:contain}
.territory-markers{position:absolute;inset:0;transition:opacity .2s}
.territory-art.zooming .territory-markers{opacity:0;pointer-events:none}
.territory-pin{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);border:2px solid white;background:#fffffff2;border-radius:30px;display:flex;align-items:center;gap:5px;padding:4px 10px 4px 4px;white-space:nowrap;box-shadow:0 2px 9px #0b395b36;font:600 clamp(10px,1vw,14px)/1 var(--head);color:var(--navy)}
.territory-pin b{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:var(--teal);color:white;font-size:15px}
.territory-pin:hover,.territory-pin:focus-visible,.territory-pin.active{border-color:var(--coral);z-index:2}.territory-pin.active b{background:var(--coral)}
.illustration-switches{position:absolute;top:12px;left:12px;z-index:4;max-width:calc(100% - 24px)}
.illustration-switches label,.stage-switches label{display:flex;align-items:center;gap:9px;padding:9px 13px;background:#fffffff5;box-shadow:0 3px 10px #0b395b18;border-radius:13px;font-size:13px;font-weight:900;cursor:pointer}
.illustration-switches input,.stage-switches input{accent-color:var(--teal);width:19px;height:19px;margin:0}
.stage-view{display:flex;flex-direction:column;padding:12px 12px 14px;gap:9px;opacity:0;transition:opacity .33s ease}
.stage-view.visible{opacity:1}
.stage-head{width:100%;display:flex;align-items:center;justify-content:space-between;z-index:3}
.stage-head span{font-size:12px;color:#007d8b;font-weight:900;letter-spacing:.05em}
.stage-close{display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:50%;background:#fff;color:var(--navy);box-shadow:0 3px 11px #083d4f26;font-size:27px;line-height:1}
.stage-image-stack{flex:1;min-height:0;width:100%;display:grid;place-items:center;overflow:hidden}
.stage-image-stack img{display:block;max-height:100%;max-width:100%;width:auto;height:auto;object-fit:contain;transition:opacity .14s ease}
.stage-image-stack img.changing{opacity:.15}
.stage-switches{display:flex;flex-wrap:wrap;gap:9px;align-self:start}
.stage-caption{width:100%;font-size:12px;color:#386173;line-height:1.35;min-height:17px}
.stage-jump{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:7px;padding:10px 0 4px;scrollbar-width:thin}
.stage-jump button{display:flex;align-items:center;gap:5px;flex-shrink:0;border:1px solid #cadfe1;border-radius:23px;background:white;color:var(--navy);font-size:11px;font-weight:900;padding:6px 10px}
.stage-jump button.active{border-color:var(--coral);background:#fff0ea}
.stage-jump b{border-radius:50%;background:var(--teal);color:white;width:21px;height:21px;display:grid;place-items:center}
.illustrated-detail{gap:15px}
.illustrated-detail .detail-note{margin-top:5px}
.illustrated-detail .step-nav{margin-top:auto}
@media(max-width:1170px){.illustrated-columns{grid-template-columns:minmax(0,1fr) minmax(270px,315px)}.territory-pin{font-size:11px;padding-right:6px}.territory-pin b{width:24px;height:24px}}
@media(max-width:850px){.welcome-hero{grid-template-columns:1fr}.welcome-landscape{max-height:230px}.welcome-options{grid-template-columns:1fr}.welcome-card{display:grid;grid-template-columns:33% 1fr;gap:8px 13px;align-items:center}.welcome-card>img{grid-row:span 3;height:118px;object-fit:contain}.welcome-card>em{justify-self:start;padding:7px 14px;gap:15px}.illustrated-columns{grid-template-columns:1fr;max-height:none;min-height:0;gap:11px}.illustrated-scene{height:clamp(290px,66vw,515px);flex:none}.illustrated-detail{min-height:230px}.territory-art{width:100%}.territory-pin span{display:none}.territory-pin b{font-size:13px;width:24px;height:24px}.territory-pin{padding:2px;min-width:30px}.stage-view{padding:10px}.stage-switches label{font-size:11px}}
@media(max-width:500px){.welcome{padding:5px}.welcome-copy h1{font-size:34px}.welcome-copy p{font-size:14px}.welcome-landscape{max-height:175px}.welcome-card>strong{font-size:18px}.welcome-card>span{font-size:12px}.illustrated-scene{height:330px}.illustration-switches label{font-size:10px;padding:7px 9px}.stage-switches{gap:5px}.stage-switches label{font-size:10px;padding:7px}.stage-head span{font-size:10px}.stage-jump button{font-size:10px;padding:5px 7px}}
@media(prefers-reduced-motion:reduce){.territory-art,.stage-view,.stage-image-stack img{transition:none!important}}

/* Marqueur explicite de cette version de test, sans modifier le thème du site. */
.stage-head{flex-wrap:wrap;gap:8px}.stage-head .stage-switches{margin-left:auto;display:flex;flex-wrap:wrap;gap:7px}.stage-head .stage-switches label{font-size:11px;padding:7px 10px}.stage-head .stage-close{margin-left:0;flex-shrink:0}
@media(max-width:650px){.stage-head .stage-switches{order:3;flex-basis:100%;margin:0}.stage-head .stage-close{margin-left:auto}}

.illustrated-build-label{display:inline-flex;flex-shrink:0;align-items:center;max-width:235px;border:1px solid #2d9c9f;border-radius:12px;padding:7px 10px;background:#eaf7f4;color:#086978;font:800 11px/1.3 'Nunito Sans',sans-serif;letter-spacing:.025em;text-align:center}
@media(max-width:1100px){.illustrated-build-label{font-size:9px;max-width:140px}}
@media(max-width:620px){.illustrated-build-label{position:fixed;right:8px;top:7px;padding:3px 5px;z-index:12;max-width:100px;font-size:8px}}

/* Explorer - correctifs sur la base validée, sans toucher aux jeux ni au glossaire. */
[hidden]{display:none!important}
.illustrated-scene{background:#e6f8f9;}
.welcome-landscape,.welcome-card>img[src$="accueil_sans_bulles.webp"]{background:transparent}
.territory-art{transform:translate3d(0,0,0) scale(1);transform-origin:center center;transition:transform .78s cubic-bezier(.2,.75,.19,1);will-change:transform}
.territory-art.zooming{transform:inherit;opacity:1}
.territory-picture{background:transparent}
.territory-view{background:transparent}
.illustrated-columns{height:calc(100dvh - 129px);max-height:calc(100dvh - 129px);min-height:0}
.illustrated-columns .illustrated-scene{min-height:0;height:100%}
.stage-view{height:100%;min-height:0;box-sizing:border-box;overflow:hidden}
.stage-image-stack{flex:1 1 0;height:0;min-height:0;width:100%;display:grid;place-items:center;overflow:hidden}
.stage-image-stack img{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.stage-head{flex:0 0 auto;min-height:38px}
.stage-caption{flex:0 0 auto;min-height:16px;line-height:1.3}
.stage-jump{flex-shrink:0}
@media(max-width:850px){
 .illustrated-columns{height:auto;max-height:none;min-height:0}
 .illustrated-columns .illustrated-scene{height:min(56vh,425px);min-height:310px;flex:none}
 .stage-view{height:100%}
 .stage-jump{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;overflow:visible;padding-top:34px;position:relative}
 .stage-jump::before{content:"Choisir une étape";position:absolute;left:1px;top:6px;font-weight:900;color:#086d78;font-size:12px}
 .stage-jump button{min-width:0;flex-shrink:1;justify-content:center;white-space:normal;line-height:1.1;padding:8px 4px;min-height:39px;text-align:center}
 .stage-jump button b{flex-shrink:0}
}
@media(max-width:460px){.stage-jump{grid-template-columns:repeat(2,minmax(0,1fr))}.stage-jump button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.territory-art{transition:none!important}}
/* Contrainte stricte : aucune illustration détaillée ne dépasse l'écran visible. */
@media(min-width:851px){
 #stage-photo{height:calc(100dvh - 360px)!important;max-height:100%!important;width:100%;object-fit:contain}
}
@media(max-width:850px){
 #stage-photo{height:calc(min(56vh, 425px) - 100px)!important;max-height:100%!important;width:100%;object-fit:contain}
}


/* Correctif ciblé : géométrie de caméra restaurée, scène stable sous un fondu. */
/* Carte maître PNG détourée : ombres portées calculées sur l'alpha de l'image,
   jamais intégrées au fichier, donc compatibles avec tous les fonds. */
.welcome-landscape,.territory-picture{filter:drop-shadow(0 11px 10px rgba(12,44,60,.22))!important}
.welcome-card>img[src$="accueil_sans_bulles.webp"]{filter:drop-shadow(0 5px 5px rgba(12,44,60,.13))}
.territory-art{width:min(100%,calc((100dvh - 265px)*1.777));max-height:none;transform-origin:center center}
.territory-view,.stage-view{position:absolute;inset:0;width:100%;height:100%}
.territory-view{z-index:1;opacity:1}
.territory-view.inactive{pointer-events:none}
.stage-view{z-index:2;opacity:0;background:#e6f8f9;transition:opacity .4s ease;pointer-events:none}
.stage-view.visible{opacity:1;pointer-events:auto}
.stage-image-stack{position:relative;isolation:isolate}
.stage-photo-overlay{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .38s ease}
.stage-photo-overlay.ready{opacity:1}
@media(max-width:850px){.territory-art{width:100%;max-height:none}}
@media(prefers-reduced-motion:reduce){.stage-view,.stage-photo-overlay{transition:none!important}}
