/* Loutéo — couche visuelle de l'aventure, mobile-first */
:root{--forest:#294c3d;--sage:#e4eddf;--cream:#fffaf0;--gold:#e9bc70;--ink:#263e33}
body{background:radial-gradient(circle at 80% 0%,#fff5db 0,transparent 38%),linear-gradient(180deg,#f6efdf,#e9efe4 70%,#f5f0e6);color:var(--ink)}
header{max-width:860px}main{max-width:860px}
button{transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
button:not(:disabled):active{transform:scale(.975)}
button.full{border:0;background:linear-gradient(180deg,#416e54,var(--forest));box-shadow:0 5px 0 #1a362a,0 10px 18px #203f2d25;border-radius:17px;letter-spacing:.01em}
button.full:hover{background:linear-gradient(180deg,#508262,#315941)}
.welcome{position:relative;min-height:174px;overflow:hidden;background:linear-gradient(125deg,#f9ecd0,#e4edda)!important;border:1px solid #e4d6b7;box-shadow:0 8px 24px #294c3d0a}
.welcome:after{content:"✦  ✧  ✦";position:absolute;right:20%;top:14px;font-size:24px;letter-spacing:14px;color:#b59b5b66;pointer-events:none}
.welcome h1{font-size:clamp(32px,6vw,48px)}.welcome .illustrated-mascot{width:clamp(105px,22vw,155px);height:155px;position:relative;z-index:1}
.mission-card{border-radius:26px;box-shadow:0 20px 42px #294c3d20;border:2px solid #e4d5b6;background:#fffdf7}
.mission-card .painted-cover{aspect-ratio:16/8.6;border-radius:24px 24px 0 0!important}
.mission-card .painted-cover:after{content:"";position:absolute;inset:auto 0 0;height:30%;background:linear-gradient(transparent,#302d221a);pointer-events:none}
.mission-content{padding:clamp(20px,4vw,34px)!important}
.mission-content .eyebrow{display:inline-block;background:#eaf0df;color:#456b50;padding:6px 11px;border-radius:99px;letter-spacing:.07em}
.mission-content h2{font-size:clamp(30px,6vw,43px);margin:15px 0 10px}
.journey{padding:26px 6px}.journey-heading h2{font-size:25px}
.journey-path{padding:15px 4px 10px;gap:3px}
.journey-path:before{top:38px;left:9%;right:9%;border-top:4px dashed #c4b997}
.stop-number{width:52px;height:52px;background:#fffaf0;border:3px solid #d7cbaa;box-shadow:0 5px 0 #c9bea3;font-weight:800}
.journey-stop{font-weight:700;gap:12px}.journey-stop.current .stop-number{background:var(--forest);box-shadow:0 0 0 5px #cddbbf,0 6px 0 #1b392c}
.journey-stop.completed .stop-number{background:#cde7c7;border-color:#8fb18b}
article:not(.reader):not(.mission-card){box-shadow:0 15px 42px #294c3d13}
.answers{gap:13px}.answers button{position:relative;padding:20px 22px;border:2px solid #e1d7bf;background:#fffcf3;border-radius:18px;box-shadow:0 4px 0 #e1d7bf;font-size:18px;font-weight:650;line-height:1.4}
.answers button:not(:disabled):hover{background:#f2f6e9;border-color:#9fb99b;transform:translateY(-2px);box-shadow:0 6px 0 #c6d9c1}
.answers button.selected{border-color:#4e8968;background:#e2f1df}
.detective .evidence button{border-radius:16px;box-shadow:0 4px 0 #dfd2b9}
.feedback:not(:empty){border:1px solid #bfd3b7;border-radius:17px;padding:18px;font-weight:650}
.track span{height:9px;border-radius:9px}.track span.on{background:linear-gradient(90deg,#75aa80,#3c7a58)}
.reader .literary-art{border:5px solid #fff8e7;box-shadow:0 8px 26px #2e453324;border-radius:18px}
.reader .chapter-heading{border-bottom:2px solid #ddcda9}
.reader .story{font-family:Georgia,serif}
@media(max-width:600px){.welcome{min-height:142px}.welcome .illustrated-mascot{width:100px;height:125px}.mission-card .painted-cover{aspect-ratio:16/10}.journey-heading h2{font-size:22px}.stop-number{width:44px;height:44px}.journey-path:before{top:34px}.answers button{padding:18px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Mascotte accompagnatrice et bulles de mission */
.mission-guide{display:flex;align-items:center;gap:16px;margin:10px 0 24px;padding:14px 18px 14px 10px;background:linear-gradient(110deg,#e9f1e2,#f9f2df);border:1px solid #d4dfc9;border-radius:22px}
.guide-avatar{width:96px;min-width:96px;height:104px;display:grid;place-items:center}
.guide-avatar img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 5px #34503c24)}
.guide-content{flex:1;min-width:0}.guide-content .chip{background:#fffdf7;color:#436a50;font-weight:750}
.guide-bubble{position:relative;margin:10px 0 0;background:#fffdf9;border:1px solid #e6dec9;border-radius:16px;padding:12px 15px;font-size:15px;line-height:1.45;box-shadow:0 3px 0 #e8dfce}
.mission-guide[data-mood="success"]{background:linear-gradient(110deg,#d9edce,#f8efd1);border-color:#a8c69c}
.mission-guide[data-mood="success"] .guide-bubble{border-color:#a8c69c}
.mission-guide[data-mood="retry"]{background:linear-gradient(110deg,#e9ede4,#f7eee0)}
.reading-return{margin:22px 0}.reading-return>button{width:100%;background:#e9eee3;color:#345b43;border:1px solid #b9cdb5}
#reading-reference{margin:14px 0;padding:20px;background:#fffaf0;border:1px solid #dfd3b9;border-radius:19px}
#reading-reference .story{max-height:52vh;overflow:auto;font-size:18px;line-height:1.7}
#reading-reference[hidden]{display:none}
#reading-reference h3{margin-top:0;font-family:Georgia,serif}
@media(max-width:600px){.mission-guide{gap:8px;padding:10px;margin-bottom:18px}.guide-avatar{width:72px;min-width:72px;height:88px}.guide-bubble{font-size:14px;padding:11px 12px}}

/* Une page d’album accompagne chaque atelier. */
.activity-scene{position:relative;margin:0 0 24px;overflow:hidden;border-radius:18px;background:#e6e9db;isolation:isolate}
.activity-scene img{width:100%;height:clamp(130px,26vw,220px);display:block;object-fit:cover;object-position:center 42%}
.activity-scene:after{content:"";position:absolute;inset:50% 0 0;background:linear-gradient(transparent,#173d30b3);pointer-events:none}
.activity-scene figcaption{position:absolute;bottom:12px;left:18px;color:#fff;font-weight:700;z-index:1;text-shadow:0 1px 4px #173d30}
.step-counter{font-size:14px;color:#566b55;margin:6px 0 8px}
.answers button,.evidence button{min-height:56px;overflow-wrap:anywhere}
.answers button:focus-visible,.evidence button:focus-visible{outline:3px solid #a5652e;outline-offset:4px}
.answers button:disabled{transform:none}
.answers button.selected,.evidence button.right-clue{border-color:#4c805b;background:#e3efda}
.evidence button.wrong-clue{border-color:#a87950;background:#fcf0dc}
#value{background:#fffef9;border:2px solid #a6b89c;min-height:54px;font-size:20px}
#sequence{min-height:76px;border:2px dashed #b2bf9e;background:#f1f4e7}
.reading-return>button{min-height:52px;font-weight:650}
.guide-avatar img{transition:filter .2s ease}
.mission-guide[data-mood="success"] .guide-avatar img{filter:drop-shadow(0 0 12px #e9bc7080)}
@media(prefers-reduced-motion:no-preference){
 .activity-scene{animation:scene-in .35s ease-out}
 .mission-guide[data-mood="success"] .guide-avatar{animation:guide-joy .45s ease-out}
 @keyframes scene-in{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:none}}
 @keyframes guide-joy{50%{transform:translateY(-6px) rotate(3deg)}}
}
@media(max-width:600px){
 .activity-scene{margin-bottom:20px;border-radius:14px}
 .activity-scene img{height:145px}
 .mission-guide{align-items:center}
 .answers button,.evidence button{font-size:17px;padding:16px}
}

/* Lecture littéraire intégrale, dans la mission */
.original-chapter{margin:1rem 0 1.5rem;padding:clamp(1rem,4vw,2rem);border:1px solid #e8d9bd;border-radius:20px;background:#fffdf6;box-shadow:0 8px 26px rgba(62,46,28,.07)}
.original-chapter[hidden]{display:none}
.original-chapter h3{font-family:Georgia,serif;font-size:clamp(1.3rem,4vw,1.9rem);line-height:1.35;color:#354b38;margin:.2rem 0 .6rem}
.original-chapter .chapter-credit{font-size:.85rem;color:#756c5c;margin-bottom:1.4rem}
.original-chapter .chapter-fulltext{font-family:Georgia,'Times New Roman',serif;font-size:clamp(1.08rem,3.5vw,1.25rem);line-height:1.95;color:#302d27;max-width:68ch;margin:auto}
.original-chapter .chapter-fulltext p{margin:0 0 1.1em;text-align:left;hyphens:auto}
.original-chapter .chapter-fulltext .gloss{font:inherit;line-height:inherit}

/* Le repaire : objets interactifs, mobile first */
.repaire-home{max-width:760px;margin:0 auto 2rem}
.repaire-top{text-align:center;padding:.7rem .5rem .9rem}
.repaire-greeting{font-family:Georgia,serif;font-size:clamp(1.5rem,5vw,2rem);margin:0;color:#294c3d}
.repaire-kicker{margin:.15rem 0 0;color:#776347;font-size:.9rem}
.repaire-scene{height:clamp(430px,108vw,650px);position:relative;overflow:hidden;border-radius:28px;background:radial-gradient(ellipse at 55% 30%,#f7d99c 0%,transparent 56%),repeating-linear-gradient(90deg,#a66c40 0 7px,#a97043 7px 27px,#9b623a 27px 30px);box-shadow:inset 0 0 0 12px #785032,0 16px 35px #37291c30;isolation:isolate}
.repaire-scene:before{content:"";position:absolute;inset:0 0 18%;border:solid 20px #70452d;border-radius:45% 45% 10% 10% / 24% 24% 10% 10%;pointer-events:none;z-index:1}
.repaire-wood{position:absolute;inset:0;background:linear-gradient(130deg,#2d241b65,transparent 48%,#2d241b55),radial-gradient(ellipse at 48% 2%,#ddad6c,#8c5637 85%);opacity:.55}
.repaire-window{position:absolute;right:6%;top:12%;width:38%;height:37%;overflow:hidden;border:11px solid #774a2b;border-radius:50% 50% 45% 45%;background:linear-gradient(#a3d7e5 0 55%,#c8e2bd 55%);box-shadow:0 0 0 5px #d3a064,inset 0 0 25px #fff8d0;z-index:2}
.repaire-window:after{content:"";position:absolute;left:49%;top:0;width:7px;height:100%;background:#875b3d}
.repaire-hills{position:absolute;bottom:20%;width:120%;height:40%;left:-10%;background:#659b67;border-radius:50% 50% 0 0}
.repaire-water{position:absolute;bottom:0;width:100%;height:27%;background:repeating-linear-gradient(170deg,#5e9fb2 0 9px,#a4d5d3 10px 14px)}
.repaire-lamp{position:absolute;top:10%;left:8%;color:#ffebaa;font-size:40px;text-shadow:0 0 22px #fff2ae;z-index:2}
.repaire-object{position:absolute;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:0;border:0;background:none;color:#fff;cursor:pointer;z-index:5;transition:filter .2s,transform .2s;touch-action:manipulation}
.repaire-object:hover,.repaire-object:focus-visible{filter:brightness(1.15);transform:translateY(-3px)}
.repaire-object:focus-visible{outline:4px solid #ffdf83;outline-offset:5px}
.repaire-shelf{top:20%;left:6%;width:39%;height:35%;background:linear-gradient(90deg,#5a3423,#825035);border:9px ridge #ad7948;border-radius:12px;box-shadow:0 10px 16px #2e1a15a0}
.shelf-books{width:92%;height:65%;display:flex;align-items:end;gap:3px;border-bottom:10px solid #c08b50;padding:0 5px}
.shelf-books i{flex:1;height:80%;border-radius:4px 4px 0 0;background:#466d59;border:2px solid #d8b779;box-shadow:inset 3px 0 #ffffff22}
.shelf-books i:nth-child(3n){background:#ae6349;height:93%}.shelf-books i:nth-child(4n){background:#c59c55;height:72%}
.repaire-otter{position:absolute;z-index:3;top:29%;left:33%;width:40%;height:38%;object-fit:contain;filter:drop-shadow(0 8px 8px #442c2260)}
.repaire-desk{position:absolute;z-index:3;left:17%;right:4%;top:65%;height:19%;border-radius:30% 20% 10% 10%;background:linear-gradient(#d49a5b,#88532d 40%,#613d27 70%);box-shadow:0 14px 10px #3e281b90}
.repaire-mission{top:63%;left:30%;width:58%;height:20%;transform:rotate(-3deg)}
.repaire-mission:hover{transform:rotate(-3deg) translateY(-3px)}
.book-pages{width:95%;height:70%;display:flex;transform:perspective(250px) rotateX(12deg);filter:drop-shadow(0 6px 3px #3e2d28a0)}
.book-pages span{flex:1;background:#fff3d5;border:4px solid #8e603d;color:#b38d52;font-size:28px;border-radius:10% 35% 10% 18%;box-shadow:inset 0 0 14px #ddbd85}
.book-pages span+span{border-radius:35% 10% 18% 10%}
.repaire-chest{left:4%;bottom:7%;width:32%;height:22%}
.chest-lid{display:block;width:90%;height:31%;border:6px ridge #e4b35e;border-radius:55% 55% 10% 10%;background:#6e4029;color:#ffe7a0}
.chest-body{display:grid;place-items:center;width:95%;height:54%;border:7px ridge #d4a65b;border-radius:5px 5px 16px 16px;background:linear-gradient(90deg,#79472d,#b57640,#77462d);font-size:27px;color:#ffde88}
.repaire-rug{position:absolute;bottom:-6%;right:-15%;width:90%;height:17%;border-radius:50%;background:#c6a176;box-shadow:0 0 0 10px #835e47;opacity:.75}
.object-caption{font:bold clamp(12px,2.8vw,17px)/1.15 system-ui,sans-serif;background:#fff5d9;color:#294c3d;padding:7px 11px;border-radius:15px;border:2px solid #b88750;box-shadow:0 3px 9px #271c1860;white-space:nowrap;text-align:center;max-width:100%}
.repaire-hint{text-align:center;font-size:.85rem;color:#6b6658;margin:.8rem 0 .1rem}
.repaire-progress{text-align:center;color:#42634b;font-size:.9rem;margin:.1rem 0}
.repaire-subpage{max-width:740px;margin:auto}
.repaire-subpage>h1{margin:1rem 0}.repaire-subpage>p{color:#647260}
.repaire-book-grid{margin:1.5rem 0}.repaire-book{display:grid;grid-template-columns:minmax(110px,36%) 1fr;gap:1.1rem;align-items:center}
.repaire-book h2{font-size:clamp(1.2rem,4vw,1.8rem)}.repaire-book-cover img{width:100%;height:auto;border-radius:12px}
.repaire-chapters{display:grid;gap:.7rem;margin:1.3rem 0}
.repaire-chapter{display:flex;align-items:center;gap:1rem;text-align:left;width:100%;background:#fffdf6;color:#294c3d;border:1px solid #dfd1b9;border-radius:16px;padding:1rem}
.repaire-chapter span:nth-child(2){flex:1}.repaire-chapter small{display:block;color:#667668}
.chapter-number{display:grid;place-items:center;min-width:42px;height:42px;background:#e7eedf;border-radius:50%;font-weight:bold}
.repaire-completed .chapter-number{background:#4b805d;color:white}
.repaire-treasures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin:1.5rem 0}
.repaire-treasures>div{background:#fff9e9;border:1px solid #e2d2b2;border-radius:18px;padding:1rem .5rem;text-align:center;display:grid;gap:.4rem}
.repaire-treasures span{font-size:2rem}.repaire-treasures strong{font-size:1.2rem}.repaire-treasures small{font-size:.76rem}
.repaire-note{font-size:.85rem}
@media(max-width:440px){.repaire-scene{border-radius:20px}.repaire-book{grid-template-columns:1fr}.repaire-book-cover{max-width:180px}.repaire-treasures>div{padding:.7rem .2rem}.repaire-treasures strong{font-size:1rem}}
@media(prefers-reduced-motion:reduce){.repaire-object{transition:none}}
