*{box-sizing:border-box} :root{font-family:Verdana,Arial,sans-serif;color:#183c3e;background:#f7f5ed;font-size:18px;line-height:1.65}body{margin:0}header{max-width:1050px;margin:auto;padding:24px;display:flex;justify-content:space-between;align-items:center;gap:16px}.brand{font-size:1.35rem;font-weight:800;text-decoration:none;color:#183c3e}.brand span{display:block;font-size:.65rem;font-weight:400}nav{display:flex;gap:8px;max-width:1000px;margin:0 auto;padding:0 20px}nav button{flex:1}main{max-width:960px;margin:24px auto;padding:0 24px;min-height:65vh}h1{font-size:clamp(1.8rem,5vw,2.6rem);line-height:1.25;margin:.25em 0 .7em}h2{font-size:1.3rem;line-height:1.4}p{max-width:65ch}button,.button{font:inherit;font-weight:bold;line-height:1.4;border:2px solid transparent;border-radius:14px;background:#1e6264;color:white;padding:13px 20px;min-height:52px;cursor:pointer;text-decoration:none;display:inline-block}button:hover{filter:brightness(.94)}button:disabled{opacity:.5;cursor:wait}.quiet,nav button{background:#e4eae3;color:#183c3e}nav button.active{background:#183c3e;color:white}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:4px solid #b6651d;outline-offset:3px}.hero{background:#dcebe2;border-radius:26px;padding:28px;display:flex;gap:26px;align-items:center;margin-bottom:25px;border:1px solid #b9d4c8}.mascot{flex:0 0 110px;height:130px;position:relative;background:#f3b75d;border:4px solid #183c3e;border-radius:45% 45% 30% 30%;box-shadow:9px 9px 0 #183c3e;display:grid;place-items:center;font-size:2.6rem;transform:rotate(-4deg)}.mascot:before{content:'✦';position:absolute;top:-30px;right:-15px;color:#1e6264}.eyebrow{font-size:.7rem;letter-spacing:.13em;text-transform:uppercase;font-weight:bold}.panel{background:#fffefa;border:1px solid #d8dfd3;border-radius:22px;padding:26px;margin:18px 0;box-shadow:0 5px 0 #e9eade}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.choices{display:flex;flex-wrap:wrap;gap:12px}.check{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#eef1e9;border-radius:12px;cursor:pointer}.check input{width:24px;height:24px;accent-color:#1e6264}label{display:block;margin:12px 0;font-weight:bold}input,select{font:inherit;width:100%;padding:13px;border:2px solid #a4b8ae;border-radius:10px;background:white;color:#183c3e}small,.muted{font-size:.85rem;color:#496665}.actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.primary{background:#183c3e}.question{font-size:1.8rem;margin:24px 0;line-height:1.5}.answers{display:grid;gap:14px}.answers button{text-align:left;background:#eef1e9;color:#183c3e;border:2px solid #a4b8ae}.feedback{border-left:6px solid #b6651d;padding:20px;background:#fff2d9;border-radius:10px;margin-top:20px}.good{border-color:#1e6264;background:#e1f0e6}.badge{display:inline-block;background:#fff0c8;border:1px solid #dab665;border-radius:14px;padding:14px;margin:6px}.stats{display:flex;flex-wrap:wrap;gap:12px}.stat{padding:15px;background:#e7eee5;border-radius:14px;flex:1;min-width:120px}.stat strong{display:block;font-size:1.7rem}.word{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #dde3d8;padding:15px 0}.word strong{display:block}.word button{font-size:.8rem;padding:10px}.danger{background:#f8e4dd;color:#842f21}#notice:not(:empty){position:fixed;bottom:20px;left:5%;width:90%;background:#fff2d9;color:#6b2c13;border:2px solid #b6651d;border-radius:12px;padding:18px;z-index:10}footer{text-align:center;padding:25px;font-size:.8rem;color:#496665}progress{width:100%;height:14px;accent-color:#1e6264}fieldset{border:0;padding:0;margin:0 0 20px}legend{font-weight:bold;margin-bottom:12px}.hidden{display:none}@media(max-width:600px){header{padding:18px;align-items:flex-start}.brand{font-size:1.05rem}header button{font-size:.75rem;padding:10px;max-width:130px}nav{padding:0 12px;gap:5px}nav button{font-size:.78rem;padding:12px 6px}main{padding:0 16px}.hero{padding:22px}.mascot{flex-basis:66px;height:90px;font-size:1.8rem;box-shadow:5px 5px 0 #183c3e}.grid{grid-template-columns:1fr}.panel{padding:20px}.question{font-size:1.5rem}.word{flex-wrap:wrap}.actions button{flex-grow:1}}
/* Bibliothèque : priorité aux mots, gestion à la demande. */
.category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.category-tile{text-align:left;background:#edf1e9;color:#183c3e;border:2px solid #c2d1c4}
.category-tile strong,.category-tile small{display:block;overflow-wrap:anywhere}
.category-tile[aria-pressed=true]{background:#183c3e;color:#fff;border-color:#183c3e;box-shadow:4px 4px 0 #edb451}
.category-tile[aria-pressed=true] small{color:#e4eddf}
.word{align-items:center;gap:18px}.word-pair{display:grid;grid-template-columns:1fr 1fr;gap:24px;flex:1;min-width:0}.word-pair strong{font-size:1.08rem;overflow-wrap:anywhere}.word-pair small{display:block;overflow-wrap:anywhere}.word>div:last-child{display:flex;gap:8px;flex-wrap:wrap}
summary{cursor:pointer;font-weight:bold;padding:4px 0;min-height:44px}summary:focus-visible{outline:4px solid #b6651d;outline-offset:4px}.editor-content{padding-top:16px}.empty-state{padding:20px;background:#edf1e9;border-radius:14px}
/* Pastilles originales : encrage épais, trame et petit ruban de collection. */
.badge-collection{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:24px 16px;margin:26px 0 8px}.medal{display:flex;align-items:center;text-align:center;flex-direction:column;gap:9px;--medal-color:#f5c65e}.medal-disc{width:112px;height:112px;display:grid;place-items:center;border:4px solid #183c3e;border-radius:50%;background:radial-gradient(circle,#ffffff80 1px,transparent 2px) 0 0/8px 8px,var(--medal-color);box-shadow:5px 6px 0 #183c3e;position:relative;margin:0 7px 12px;transform:rotate(-7deg)}.medal-disc:before{content:'';position:absolute;inset:7px;border:2px solid #183c3e;border-radius:50%}.medal-disc:after{content:'KQ';position:absolute;bottom:-12px;background:#fffefa;border:3px solid #183c3e;border-radius:5px;padding:0 14px;font-size:.65rem;font-weight:bold;letter-spacing:.12em}.medal-disc span{font-size:3rem;line-height:1;text-shadow:2px 2px #fff;z-index:1}.medal strong{font-size:.9rem;line-height:1.4}.medal small{font-size:.75rem}.medal-status{font-size:.65rem;font-weight:bold;text-transform:uppercase;letter-spacing:.07em;background:#dcebe2;padding:2px 10px;border-radius:20px}.fire{--medal-color:#ffa274}.star{--medal-color:#c9b6f4}.sky{--medal-color:#9edbe8}.leaf{--medal-color:#b6dc97}.locked .medal-disc{--medal-color:#e0e3dc;box-shadow:4px 5px 0 #8b9b92;border-color:#708378;color:#708378}.locked .medal-status{background:#ebede7;color:#496665}.reset-panel{border-style:dashed}
@media(max-width:600px){.category-grid{grid-template-columns:1fr 1fr}.category-tile{padding:12px;font-size:.85rem}.category-tile:last-child:nth-child(odd){grid-column:1/-1}.word-pair{width:100%;flex-basis:100%;gap:14px}.word>div:last-child{width:100%}.badge-collection{grid-template-columns:1fr 1fr}.medal-disc{width:96px;height:96px}}

/* Correction des associations : statut explicite en plus de la couleur. */
.matching-corrections{display:grid;gap:14px}.match-result{border:2px solid;border-left-width:7px;border-radius:14px;padding:16px 20px;overflow-wrap:anywhere}.match-correct{border-color:#28734c;background:#edf7ef}.match-error{border-color:#ad392d;background:#fff0ec}.match-result-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}.match-result-heading>strong{font-size:1.2rem}.match-result-heading>span{font-weight:bold}.match-error .match-result-heading>span,.match-error del{color:#922e24}.match-correct .match-result-heading>span{color:#205c3e}.match-result p{margin:8px 0 0}.match-solution{font-weight:bold}
/* Fiches de lecture par catégorie. */
.review-word{padding:18px 0;border-top:1px solid #dde3d8}.review-word strong{display:block;font-size:1.15rem}.review-words{margin-top:24px}

.matching-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.matching-board>div{display:flex;flex-direction:column;gap:12px}.matching-board button{width:100%;flex:1;overflow-wrap:anywhere;text-align:left;background:#edf1e9;color:#183c3e;border-color:#c2d1c4}.matching-board button.linked{border-color:#1e6264;background:#dcebe2}.matching-board button[aria-pressed=true]{background:#183c3e;color:white;outline:3px solid #edb451}.matching-board button:disabled{cursor:default;opacity:1}.matching-board small{color:inherit}
