:root{--orange:#ff7900;--orange2:#ff9b2f;--orange3:#ffefe0;--cream:#fff9f3;--paper:#fffdfb;--ink:#2f2119;--muted:#7e7067;--line:#f2dcc8;--shadow:0 18px 55px rgba(118,69,28,.12);--radius:28px;--green:#4b9b63;--blue:#4b7fb8;--purple:#8c6bb1;--gold:#b98212}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:145px}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:linear-gradient(180deg,#fffaf5 0,#fff 480px);color:var(--ink);line-height:1.55}a{color:inherit}img{max-width:100%}.j-container{width:min(1180px,calc(100% - 36px));margin:auto}
h1,h2,h3{line-height:1.08;letter-spacing:-.03em}.j-kicker{display:inline-flex;align-items:center;gap:8px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;color:#d55c00;font-size:.8rem}.j-kicker:before{content:"";width:24px;height:3px;border-radius:2px;background:var(--orange)}
/* Header par niveau */
.j-header{position:sticky;top:0;z-index:50;background:rgba(255,252,248,.94);backdrop-filter:blur(18px);border-bottom:1px solid rgba(243,218,194,.95)}.j-header-inner{width:min(1280px,calc(100% - 28px));min-height:78px;margin:auto;display:flex;align-items:center;gap:18px}.j-brand{display:flex;align-items:center;flex:0 0 auto}.j-brand img{width:164px;display:block}.j-level-nav{display:flex;align-items:center;gap:7px;margin-left:auto}.j-level-nav a{min-width:54px;padding:10px 13px;border-radius:14px;text-decoration:none;text-align:center;font-weight:900;font-size:.92rem;color:#65554b;border:1px solid transparent;transition:.2s}.j-level-nav a:hover,.j-level-nav a.active{color:#a44c00;background:#fff1e5;border-color:#f5d4b5}.j-parent-link{margin-left:4px;padding:11px 14px;border:1px solid #f0cfae;border-radius:13px;text-decoration:none;font-weight:850;font-size:.88rem;color:#a44c00;background:#fff;white-space:nowrap}.j-parent-link span{color:var(--orange)}
/* Boutons */
.j-actions{display:flex;flex-wrap:wrap;gap:12px}.j-btn,.j-btn-soft{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:0 19px;border-radius:14px;text-decoration:none;font-weight:900;border:1px solid transparent;cursor:pointer;font:inherit}.j-btn{background:linear-gradient(135deg,var(--orange),#ff941f);color:#fff;box-shadow:0 12px 26px rgba(255,121,0,.22)}.j-btn:hover{transform:translateY(-1px)}.j-btn-soft{background:#fff;color:#914600;border-color:#efd3b9}.j-back{display:inline-flex;margin-bottom:14px;text-decoration:none;font-weight:850;color:#9b5b2b}
/* Home */
.j-hero{position:relative;overflow:hidden;padding:70px 0 54px}.j-hero:before,.j-hero:after{content:"";position:absolute;border-radius:50%;background:#ffe5c8;opacity:.75}.j-hero:before{width:360px;height:360px;right:-110px;top:-120px}.j-hero:after{width:310px;height:310px;left:-160px;bottom:-150px}.j-hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:1.2fr .8fr;gap:42px;align-items:center}.j-hero h1{font-size:clamp(2.8rem,6vw,5.7rem);margin:16px 0 18px;max-width:850px}.j-hero h1 em,.j-level-hero h1 em{font-style:normal;color:var(--orange)}.j-hero-lead{font-size:clamp(1.03rem,2vw,1.24rem);color:var(--muted);max-width:740px;margin:0 0 28px}.j-hero-card{background:rgba(255,255,255,.9);border:1px solid #f4ddc9;border-radius:36px;padding:26px;box-shadow:var(--shadow);min-height:380px;position:relative;overflow:hidden}.j-orbit{position:absolute;border:2px solid #ffd2aa;border-radius:50%;inset:50%;transform:translate(-50%,-50%)}.j-orbit.one{width:230px;height:120px;transform:translate(-50%,-50%) rotate(25deg)}.j-orbit.two{width:220px;height:110px;transform:translate(-50%,-50%) rotate(-37deg)}.j-core{position:absolute;left:50%;top:50%;width:80px;height:80px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffb465,#ff7900 68%);box-shadow:0 10px 35px rgba(255,121,0,.3);display:grid;place-items:center;color:#fff;font-weight:950}.j-float{position:absolute;padding:9px 13px;background:#fff;border:1px solid #f5dac1;border-radius:14px;font-weight:900;box-shadow:0 12px 28px rgba(120,72,29,.1)}.j-float.a{top:36px;left:30px;transform:rotate(-8deg)}.j-float.b{right:32px;top:72px;transform:rotate(7deg)}.j-float.c{bottom:48px;left:52px;transform:rotate(5deg)}.j-float.d{bottom:30px;right:28px;transform:rotate(-6deg)}
.j-section{padding:58px 0}.j-section.alt,.j-level-section.alt{background:#fff7ef;border-block:1px solid #f8e6d5}.j-section-head{display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:26px}.j-section-head h2,.j-page-hero h1{font-size:clamp(2rem,4vw,3.5rem);margin:8px 0}.j-section-head p,.j-page-hero p{color:var(--muted);max-width:700px;margin:0}
.j-level-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.j-level-card{position:relative;min-height:260px;padding:22px;border-radius:26px;text-decoration:none;background:#fff;border:1px solid #f0dfd0;display:flex;flex-direction:column;transition:.22s;overflow:hidden}.j-level-card:after{content:"";position:absolute;width:95px;height:95px;border-radius:50%;right:-35px;top:-28px;background:#fff0e1}.j-level-card:hover{transform:translateY(-5px);box-shadow:var(--shadow)}.j-level-emoji{font-size:2rem;position:relative;z-index:1}.j-level-card strong{font-size:2.1rem;line-height:1;margin:18px 0 5px}.j-level-card small{font-weight:850;color:#aa5d24}.j-level-card p{font-size:.9rem;color:var(--muted);margin:16px 0}.j-level-card b{margin-top:auto;color:#d75f00;font-size:.9rem}.j-level-card.level-ce1:after{background:#eef6ff}.j-level-card.level-ce2:after{background:#eef9f0}.j-level-card.level-cm1:after{background:#f5effb}.j-level-card.level-cm2:after{background:#fff4cf}.j-level-cards.compact .j-level-card{min-height:220px}
.j-method-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.j-method-grid article{background:#fff;border:1px solid #f0dfd0;border-radius:24px;padding:24px}.j-method-grid article>span{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;font-size:1.35rem}.j-method-grid span.blue{background:#edf4fb}.j-method-grid span.orange{background:#fff1e5}.j-method-grid span.green{background:#edf8ef}.j-method-grid span.purple{background:#f3eef9}.j-method-grid h3{margin:18px 0 7px;font-size:1.25rem}.j-method-grid p{margin:0;color:var(--muted)}.j-zero-card,.j-next-card{display:flex;align-items:center;justify-content:space-between;gap:30px;background:#fff;border:1px solid #f0ddca;border-radius:30px;padding:32px;box-shadow:var(--shadow)}.j-zero-card h2,.j-next-card h2{font-size:clamp(1.8rem,3vw,2.7rem);margin:8px 0}.j-zero-card p,.j-next-card p{margin:0;color:var(--muted)}.j-zero-badges{display:flex;flex-wrap:wrap;gap:9px;justify-content:flex-end}.j-zero-badges span{padding:9px 12px;border-radius:999px;background:#eff8f0;color:#317245;font-weight:850}
/* Page niveau */
.j-level-hero{position:relative;overflow:hidden;padding:48px 0 34px;background:linear-gradient(180deg,#fffaf4,#fff)}.j-level-hero:after{content:"";position:absolute;width:380px;height:380px;border-radius:50%;background:#ffe9d2;right:-110px;top:-190px}.j-level-hero-grid{position:relative;z-index:1;display:grid;grid-template-columns:1.15fr .85fr;gap:36px;align-items:center}.j-level-hero h1{font-size:clamp(3rem,6vw,5.4rem);margin:8px 0 16px}.j-level-stats{display:flex;flex-wrap:wrap;gap:9px;margin-top:20px}.j-level-stats span{padding:8px 11px;background:#fff;border:1px solid #f0dac5;border-radius:999px;font-size:.84rem;font-weight:850}.j-level-stats strong{color:var(--orange)}.j-level-visual{position:relative;min-height:250px;background:#fff;border:1px solid #f0ddca;border-radius:32px;box-shadow:var(--shadow);display:grid;place-items:center;overflow:hidden}.j-level-visual b{font-size:clamp(3.2rem,8vw,6rem);color:#e56600;letter-spacing:-.07em}.j-level-orb{position:absolute;left:24px;top:22px;width:62px;height:62px;border-radius:20px;background:#fff1e5;display:grid;place-items:center;font-size:1.7rem;transform:rotate(-6deg)}.j-level-visual span{position:absolute;background:#fff8f0;border:1px solid #f2dbc5;padding:7px 10px;border-radius:12px;font-weight:850;font-size:.84rem}.j-level-visual span:nth-of-type(1){right:24px;top:28px}.j-level-visual span:nth-of-type(2){left:32px;bottom:30px}.j-level-visual span:nth-of-type(3){right:30px;bottom:40px}.j-level-toolbar{position:sticky;top:78px;z-index:35;background:rgba(255,255,255,.94);backdrop-filter:blur(15px);border-block:1px solid #f1dfcf;padding:11px 0}.j-section-nav{display:flex;gap:8px;overflow:auto;padding-bottom:2px;scrollbar-width:none}.j-section-nav::-webkit-scrollbar{display:none}.j-section-nav a{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;text-decoration:none;padding:9px 12px;border-radius:12px;background:#fff8f1;border:1px solid #f0ddca;font-weight:850;font-size:.87rem}.j-section-nav a b{min-width:20px;text-align:center;border-radius:999px;background:#fff;padding:2px 6px;color:#b95a0a}.j-subject-line{display:flex;align-items:center;gap:7px;overflow:auto;padding-top:9px;color:var(--muted);font-size:.78rem;scrollbar-width:none}.j-subject-line>span:first-child{font-weight:800;white-space:nowrap}.j-subject-chip{white-space:nowrap;padding:4px 8px;border-radius:999px;background:#f5f1ed}.j-level-section{padding:54px 0;scroll-margin-top:150px}.j-type-head{display:flex;align-items:center;gap:18px;margin-bottom:24px}.j-type-icon{width:58px;height:58px;flex:0 0 58px;border-radius:18px;display:grid;place-items:center;font-size:1.55rem}.j-type-icon.blue{background:#edf4fb}.j-type-icon.orange{background:#fff1e5}.j-type-icon.green{background:#edf8ef}.j-type-icon.purple{background:#f3eef9}.j-type-icon.gold{background:#fff6d9}.j-type-head h2{font-size:clamp(1.9rem,3.5vw,3rem);margin:5px 0 4px}.j-type-head p{margin:0;color:var(--muted)}.j-next-level{padding:58px 0;background:#fff}
/* Cards */
.j-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.j-card{background:#fff;border:1px solid #f0dfd0;border-radius:24px;overflow:hidden;box-shadow:0 9px 28px rgba(91,58,32,.07);display:flex;flex-direction:column;min-width:0}.j-card-media{aspect-ratio:16/9;background:linear-gradient(135deg,#fff1e4,#ffe2c4);display:grid;place-items:center;overflow:hidden;text-decoration:none;position:relative}.j-card-media img{width:100%;height:100%;object-fit:cover}.j-card-placeholder{font-size:2.1rem;font-weight:950;color:#e36500}.j-card-body{padding:19px;display:flex;flex:1;flex-direction:column}.j-tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}.j-tag{font-size:.74rem;font-weight:850;padding:5px 8px;border-radius:999px;background:#fff1e5;color:#ad5100}.j-tag.green{background:#ebf7ee;color:#367a49}.j-tag.blue{background:#edf4fb;color:#356a9f}.j-tag.orange{background:#fff1e5;color:#ad5100}.j-tag.purple{background:#f3eef9;color:#725394}.j-tag.gold{background:#fff6d9;color:#8a640d}.j-tag.neutral{background:#f5f2ef;color:#74665d}.j-card h2,.j-card h3{font-size:1.28rem;margin:0 0 9px}.j-card p{color:var(--muted);margin:0 0 18px}.j-card-cta{margin-top:auto;display:flex;align-items:center;justify-content:space-between;text-decoration:none;font-weight:900;color:#c85a03;padding-top:13px;border-top:1px solid #f4e8dd}.j-play{position:absolute;width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.92);color:var(--orange);font-size:1.25rem;box-shadow:0 8px 30px rgba(0,0,0,.14)}
/* Generic pages / content */
.j-page-hero{padding:52px 0 30px;position:relative}.j-page-hero .j-container{background:#fff;border:1px solid #f0ddca;border-radius:32px;padding:38px;box-shadow:var(--shadow)}.j-simple{padding:56px 0}.j-empty{padding:58px 24px;text-align:center;background:#fff;border:1px dashed #edcaa8;border-radius:26px}.j-empty.compact{padding:24px;display:flex;align-items:center;gap:12px;text-align:left}.j-empty.compact span{font-size:1.5rem}.j-empty.compact p{margin:0;color:var(--muted)}.j-empty-icon{font-size:2.3rem}.j-content-wrap{width:min(920px,calc(100% - 36px));margin:0 auto 64px}.j-content-top{padding:42px 0 26px}.j-content-top .j-content-wrap{margin-bottom:0}.j-content-meta{display:flex;flex-wrap:wrap;gap:8px}.j-content-top h1{font-size:clamp(2.4rem,5vw,4.6rem);margin:12px 0}.j-content-top p{font-size:1.12rem;color:var(--muted)}.j-content-article{background:#fff;border:1px solid #eddccb;border-radius:30px;padding:clamp(22px,4vw,48px);box-shadow:var(--shadow);overflow:hidden}.j-content-article h1,.j-content-article h2,.j-content-article h3{color:#7d3900}.j-content-article h2{margin-top:1.7em}.j-content-article img,.j-content-article iframe,.j-content-article video{max-width:100%;border-radius:16px}.j-content-article table{width:100%;border-collapse:collapse;display:block;overflow:auto}.j-content-article td,.j-content-article th{padding:10px;border:1px solid #efdcc9}.j-content-article .card,.j-content-article .panel,.j-content-article section{max-width:100%}
/* Quiz */
.j-quiz-shell{width:min(900px,calc(100% - 36px));margin:42px auto 64px}.j-quiz-head{background:linear-gradient(135deg,#fff,#fff1e5);border:1px solid #efd5bb;border-radius:30px;padding:30px;margin-bottom:18px}.j-quiz-head h1{font-size:clamp(2rem,4vw,3.4rem);margin:8px 0}.j-question{background:#fff;border:1px solid #efdfd1;border-radius:22px;padding:22px;margin:14px 0}.j-question h2{font-size:1.2rem;line-height:1.35;margin:0 0 15px}.j-choice{display:flex;gap:10px;align-items:flex-start;padding:14px;border:1px solid #eee0d4;border-radius:14px;margin:8px 0;cursor:pointer}.j-choice:hover,.j-choice:has(input:checked){background:#fff8f1;border-color:#efb77f}.j-choice input{margin-top:4px}.j-score{background:#fff;border:1px solid #efd8c1;border-radius:30px;padding:34px;text-align:center;box-shadow:var(--shadow)}.j-score-big{font-size:clamp(3.6rem,8vw,6rem);font-weight:950;color:var(--orange);line-height:1}.j-result-list{margin-top:22px;text-align:left}.j-result-item{padding:14px;border-radius:14px;margin:8px 0;background:#faf7f3}.j-result-item.ok{border-left:5px solid #58a76f}.j-result-item.bad{border-left:5px solid #d96a57}
/* Ressources */
.j-filter{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 28px;padding:14px;background:#fff;border:1px solid #f0dfd0;border-radius:18px}.j-filter input,.j-filter select{min-height:44px;border:1px solid #e9d7c7;border-radius:12px;background:#fff;padding:0 12px;font:inherit;color:var(--ink)}.j-filter input{flex:1;min-width:220px}.j-resource-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 24px}.j-resource-tabs a{padding:10px 14px;border-radius:999px;background:#fff;border:1px solid #ecd9c7;text-decoration:none;font-weight:850}.j-resource-tabs a.active{background:var(--orange);color:#fff;border-color:var(--orange)}.j-definition{background:#fff;border:1px solid #efdfd1;border-radius:18px;padding:18px;margin:10px 0}.j-definition h2{font-size:1.35rem;margin:0 0 8px}.j-definition p{color:#5f534c}.j-tool-empty{background:#fff;border:1px solid #efdfd1;border-radius:26px;padding:38px;min-height:240px;display:flex;flex-direction:column;justify-content:center}.j-tool-empty h2{font-size:clamp(1.8rem,3vw,2.8rem);margin:7px 0}
/* Footer */
.j-footer{margin-top:30px;background:#2f2119;color:#f8eee6}.j-footer-inner{width:min(1180px,calc(100% - 36px));margin:auto;padding:46px 0;display:grid;grid-template-columns:1.7fr repeat(3,1fr);gap:38px}.j-footer-brand img{width:158px;filter:brightness(0) invert(1);opacity:.95}.j-footer-brand p{color:#cdbeb4;max-width:340px}.j-footer-links{display:flex;flex-direction:column;gap:8px}.j-footer-links strong{margin-bottom:5px}.j-footer-links a{color:#d8c9bf;text-decoration:none;font-size:.92rem}.j-footer-links a:hover{color:#fff}.j-footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding:16px max(18px,calc((100% - 1180px)/2));display:flex;justify-content:space-between;gap:16px;color:#b8aaa1;font-size:.84rem}
@media(max-width:1000px){.j-header-inner{min-height:auto;display:grid;grid-template-columns:1fr auto;padding:10px 0}.j-brand img{width:145px}.j-parent-link{grid-column:2;grid-row:1}.j-level-nav{grid-column:1/-1;grid-row:2;width:100%;margin:0;overflow-x:auto;padding:4px 0 2px;scrollbar-width:none}.j-level-nav::-webkit-scrollbar{display:none}.j-level-nav a{flex:0 0 auto}.j-level-toolbar{top:116px}.j-hero-grid,.j-level-hero-grid{grid-template-columns:1fr}.j-hero-card{min-height:300px}.j-level-visual{min-height:210px}.j-level-cards{grid-template-columns:repeat(3,1fr)}.j-method-grid{grid-template-columns:repeat(2,1fr)}.j-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.j-footer-inner{grid-template-columns:1.5fr repeat(2,1fr)}.j-footer-links:last-child{grid-column:2/4}}
@media(max-width:700px){.j-container{width:min(100% - 24px,1180px)}.j-header-inner{width:calc(100% - 20px)}.j-brand img{width:128px}.j-parent-link{font-size:.75rem;padding:9px 10px}.j-level-nav a{padding:8px 11px;min-width:49px;font-size:.84rem}.j-level-toolbar{top:105px}.j-hero{padding:44px 0 34px}.j-hero h1{font-size:clamp(2.55rem,14vw,4rem)}.j-hero-card{min-height:250px}.j-float{font-size:.78rem}.j-section{padding:42px 0}.j-section-head{display:block}.j-section-head p{margin-top:12px}.j-level-cards,.j-level-cards.compact{grid-template-columns:1fr 1fr;gap:10px}.j-level-card,.j-level-cards.compact .j-level-card{min-height:205px;padding:17px}.j-level-card strong{font-size:1.7rem}.j-level-card p{font-size:.82rem;margin:12px 0}.j-method-grid{grid-template-columns:1fr}.j-zero-card,.j-next-card{display:block;padding:24px}.j-zero-badges{justify-content:flex-start;margin-top:20px}.j-level-hero{padding:35px 0 24px}.j-level-hero h1{font-size:clamp(2.7rem,14vw,4.2rem)}.j-level-visual{display:none}.j-level-stats{gap:6px}.j-level-stats span{font-size:.76rem}.j-section-nav a{font-size:.8rem;padding:8px 10px}.j-subject-line{display:none}.j-level-section{padding:42px 0;scroll-margin-top:125px}.j-type-head{align-items:flex-start}.j-type-icon{width:48px;height:48px;flex-basis:48px;border-radius:15px}.j-type-head h2{font-size:2rem}.j-grid{grid-template-columns:1fr}.j-card{border-radius:22px}.j-content-wrap,.j-quiz-shell{width:calc(100% - 24px)}.j-content-top{padding-top:28px}.j-content-top h1{font-size:2.65rem}.j-content-article{border-radius:24px}.j-page-hero{padding:30px 0 18px}.j-page-hero .j-container{padding:25px;border-radius:25px}.j-page-hero h1{font-size:2.45rem}.j-empty.compact{padding:18px}.j-footer-inner{grid-template-columns:1fr 1fr;padding:34px 0;gap:26px}.j-footer-brand{grid-column:1/-1}.j-footer-links:last-child{grid-column:auto}.j-footer-bottom{display:block;text-align:center}.j-footer-bottom span{display:block;margin:4px 0}.j-actions .j-btn,.j-actions .j-btn-soft{flex:1 1 100%}}
@media(max-width:430px){.j-level-cards,.j-level-cards.compact{grid-template-columns:1fr}.j-level-card,.j-level-cards.compact .j-level-card{min-height:180px}.j-level-card p{max-width:300px}.j-footer-inner{grid-template-columns:1fr}.j-footer-links:last-child{grid-column:auto}}
@media print{.j-header,.j-footer,.j-level-toolbar{display:none!important}.j-quiz-shell{width:100%;margin:0}.j-score{box-shadow:none;border:0}}

/* Navigation interne propre à chaque classe */
.j-path-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:24px}.j-path-card{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid rgba(101,63,28,.12);border-radius:22px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 10px 30px rgba(74,42,18,.06);transition:.2s ease}.j-path-card:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(74,42,18,.10)}.j-path-card>span{font-size:30px;width:46px;text-align:center}.j-path-card div{flex:1;min-width:0}.j-path-card strong{display:block;font-size:18px}.j-path-card small{display:block;margin-top:3px;color:var(--muted)}.j-path-card>b{font-size:22px;color:var(--orange)}@media(max-width:700px){.j-path-grid{grid-template-columns:1fr}.j-path-card{padding:16px}}


/* Navigation horizontale des rubriques dans chaque classe */
.j-level-toolbar{position:relative;top:auto;z-index:10;background:#fffaf5;border-block:1px solid #f2dfcd}.j-section-nav{display:flex;align-items:center;gap:8px;overflow-x:auto;padding:12px 0;scrollbar-width:none;-webkit-overflow-scrolling:touch}.j-section-nav::-webkit-scrollbar{display:none}.j-section-nav a{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;padding:10px 14px;border-radius:999px;text-decoration:none;font-weight:900;font-size:.9rem;color:#6d5b4f;border:1px solid #ecd9c7;background:#fff;transition:.18s}.j-section-nav a:hover,.j-section-nav a.active{background:var(--orange);color:#fff;border-color:var(--orange);box-shadow:0 8px 22px rgba(255,121,0,.18)}.j-feature-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-top:24px}.j-feature-card{min-height:220px;padding:20px;border-radius:24px;text-decoration:none;background:#fff;border:1px solid #eedfce;display:flex;flex-direction:column;box-shadow:0 10px 28px rgba(83,50,24,.06);transition:.2s}.j-feature-card:hover{transform:translateY(-3px);box-shadow:0 15px 34px rgba(83,50,24,.10)}.j-feature-card>span{font-size:2rem}.j-feature-card strong{font-size:1.25rem;margin:16px 0 6px}.j-feature-card p{color:var(--muted);margin:0 0 16px;font-size:.92rem}.j-feature-card b{margin-top:auto;font-size:.9rem}.j-feature-card.blue b{color:var(--blue)}.j-feature-card.orange b{color:var(--orange)}.j-feature-card.green b{color:var(--green)}.j-feature-card.purple b{color:var(--purple)}.j-feature-card.gold b{color:var(--gold)}@media(max-width:1000px){.j-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.j-level-toolbar{position:relative;top:auto}.j-section-nav{margin-inline:-12px;padding-inline:12px}.j-section-nav a{font-size:.82rem;padding:9px 11px}.j-feature-grid{grid-template-columns:1fr 1fr;gap:10px}.j-feature-card{min-height:190px;padding:16px}}@media(max-width:430px){.j-feature-grid{grid-template-columns:1fr}.j-feature-card{min-height:160px}}

/* Recherche et filtre matière — Junior */
.j-content-tools{display:grid;grid-template-columns:minmax(260px,420px) 1fr;gap:14px;align-items:center;margin:0 0 28px;padding:14px;border:1px solid #eddac7;border-radius:22px;background:#fffaf5}.j-search-box{height:48px;display:flex;align-items:center;gap:10px;padding:0 15px;border:1px solid #e6d2be;border-radius:15px;background:#fff}.j-search-box:focus-within{border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,121,0,.10)}.j-search-box>span{font-size:1.25rem;color:#9a806d}.j-search-box input{width:100%;border:0;outline:0;background:transparent;font:inherit;color:var(--ink)}.j-search-box input::placeholder{color:#a38e7d}.j-subject-filter{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.j-subject-filter-label{flex:0 0 auto;align-self:center;padding:0 4px 0 2px;font-size:.76rem;font-weight:900;color:#8d7565;white-space:nowrap}.j-subject-filter::-webkit-scrollbar{display:none}.j-subject-chip-filter{flex:0 0 auto;border:1px solid #ead7c5;background:#fff;color:#69584d;padding:9px 12px;border-radius:999px;font:inherit;font-size:.84rem;font-weight:850;cursor:pointer;white-space:nowrap}.j-subject-chip-filter:hover,.j-subject-chip-filter.active{background:#2f6ea3;border-color:#2f6ea3;color:#fff}.j-card[hidden]{display:none!important}.j-filter-empty{text-align:center;padding:44px 20px;border:1px dashed #e7c9ab;border-radius:24px;background:#fff}.j-filter-empty span{display:block;font-size:2rem;margin-bottom:9px}.j-filter-empty strong{display:block;font-size:1.15rem}.j-filter-empty p{margin:7px 0 0;color:var(--muted)}
@media(max-width:760px){.j-content-tools{grid-template-columns:1fr;gap:10px;padding:10px;margin-bottom:20px}.j-search-box{height:46px}.j-subject-filter{margin-inline:-2px;padding:1px 2px}.j-subject-chip-filter{padding:8px 11px;font-size:.8rem}}


/* =========================================================
   RESPONSIVE FINAL — SVsansT Junior
   Mobile first overrides for phone / tablet / desktop
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
body{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,svg,video,iframe,canvas{max-width:100%;height:auto}
button,input,select,textarea{max-width:100%;font:inherit}
.j-container,.j-content-wrap,.j-quiz-shell,.j-footer-inner{min-width:0}
.j-card,.j-card-body,.j-type-head>div,.j-section-head>div,.j-content-article,.j-question,.j-choice{min-width:0}
.j-card h2,.j-card h3,.j-card p,.j-type-head h2,.j-type-head p,.j-section-head h2,.j-section-head p,.j-content-article,.j-question h2,.j-footer a{overflow-wrap:anywhere;word-break:normal}
.j-content-article pre,.j-content-article code{max-width:100%;overflow-x:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.j-content-article iframe{width:100%;aspect-ratio:16/9;height:auto}
.j-content-article table{max-width:100%;-webkit-overflow-scrolling:touch}
.j-content-article input,.j-content-article textarea,.j-content-article select{width:100%;max-width:100%}

/* Touch targets */
.j-level-nav a,.j-parent-link,.j-section-nav a,.j-subject-chip-filter,.j-btn,.j-btn-soft,.j-card-cta,.j-back{min-height:44px}
.j-section-nav a,.j-subject-chip-filter{-webkit-tap-highlight-color:transparent;touch-action:manipulation}

/* Desktop */
@media (min-width:1100px){
  .j-header-inner{width:min(1280px,calc(100% - 48px));min-height:78px;display:flex;align-items:center;gap:18px;padding:0}
  .j-brand img{width:164px}
  .j-level-nav{display:flex;align-items:center;gap:7px;margin-left:auto;overflow:visible;padding:0}
  .j-parent-link{margin-left:4px}
  .j-hero-grid{grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr)}
  .j-level-hero-grid{grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr)}
  .j-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .j-feature-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  .j-content-tools{grid-template-columns:minmax(300px,420px) minmax(0,1fr)}
}

/* Tablet */
@media (min-width:768px) and (max-width:1099px){
  .j-container{width:min(100% - 40px,1000px)}
  .j-header-inner{width:calc(100% - 32px);display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:8px 16px;padding:10px 0 8px}
  .j-brand{grid-column:1;grid-row:1}.j-brand img{width:148px}
  .j-parent-link{grid-column:2;grid-row:1;margin:0;align-self:center}
  .j-level-nav{grid-column:1/-1;grid-row:2;width:100%;margin:0;display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px 0 4px;scrollbar-width:none}
  .j-level-nav::-webkit-scrollbar{display:none}
  .j-level-nav a{flex:1 0 74px;min-width:74px;padding:9px 12px}
  .j-hero{padding:54px 0 42px}
  .j-hero-grid,.j-level-hero-grid{grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr);gap:28px}
  .j-hero h1{font-size:clamp(3rem,6vw,4.6rem)}
  .j-level-hero h1{font-size:clamp(3rem,6vw,4.5rem)}
  .j-hero-card{min-height:310px}
  .j-level-visual{min-height:230px}
  .j-level-cards,.j-level-cards.compact{grid-template-columns:repeat(3,minmax(0,1fr))}
  .j-method-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .j-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .j-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .j-feature-card{min-height:200px}
  .j-content-tools{grid-template-columns:1fr;gap:10px}
  .j-subject-filter{padding-bottom:2px}
  .j-footer-inner{width:min(100% - 40px,1000px);grid-template-columns:1.4fr 1fr 1fr;gap:26px}
  .j-footer-links:last-child{grid-column:auto}
}

/* Phone */
@media (max-width:767px){
  :root{--radius:22px}
  html{scroll-padding-top:118px}
  .j-container{width:calc(100% - 24px)}

  /* Header compact and scrollable */
  .j-header{position:sticky;top:0;z-index:80;background:rgba(255,252,248,.98);backdrop-filter:blur(14px)}
  .j-header-inner{width:calc(100% - 20px);display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:7px 10px;padding:max(8px,env(safe-area-inset-top)) 0 7px;min-height:0}
  .j-brand{grid-column:1;grid-row:1;min-width:0}.j-brand img{width:118px;max-width:100%}
  .j-parent-link{grid-column:2;grid-row:1;margin:0;padding:7px 9px;min-height:38px;border-radius:11px;font-size:.69rem;line-height:1.15;white-space:nowrap}
  .j-level-nav{grid-column:1/-1;grid-row:2;width:100%;margin:0;display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding:2px 0 3px;scrollbar-width:none}
  .j-level-nav::-webkit-scrollbar{display:none}
  .j-level-nav a{flex:0 0 auto;min-width:54px;min-height:40px;padding:7px 10px;border-radius:11px;font-size:.8rem}

  /* Heroes */
  .j-hero{padding:34px 0 28px}
  .j-hero-grid,.j-level-hero-grid{display:block}
  .j-hero h1{font-size:clamp(2.35rem,12.5vw,3.65rem);margin:12px 0 14px}
  .j-level-hero{padding:26px 0 20px}
  .j-level-hero h1{font-size:clamp(2.4rem,13vw,3.6rem);margin:8px 0 12px}
  .j-hero-lead,.j-content-top p{font-size:1rem}
  .j-level-visual{display:none}
  .j-hero-card{min-height:230px;margin-top:24px;border-radius:26px;padding:18px}
  .j-float{font-size:.72rem;padding:7px 10px}
  .j-level-stats{gap:6px;margin-top:14px}.j-level-stats span{font-size:.72rem;padding:7px 9px}

  /* Horizontal submenu */
  .j-level-toolbar{position:relative;top:auto;padding:0;background:#fffaf5;overflow:hidden}
  .j-level-toolbar .j-container{width:100%;padding-left:12px;padding-right:12px}
  .j-section-nav{gap:7px;margin:0;padding:10px 0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
  .j-section-nav a{scroll-snap-align:start;flex:0 0 auto;min-height:42px;padding:8px 11px;font-size:.8rem;border-radius:999px}

  /* Search + subjects */
  .j-content-tools{display:block;margin:0 0 20px;padding:10px;border-radius:18px}
  .j-search-box{height:46px;width:100%;padding:0 12px;border-radius:13px}
  .j-search-box input{font-size:16px} /* prevents iOS zoom */
  .j-subject-filter{display:flex;width:100%;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding:10px 1px 2px;scrollbar-width:none}
  .j-subject-filter::-webkit-scrollbar{display:none}
  .j-subject-filter-label{position:sticky;left:0;z-index:2;background:#fffaf5;padding:0 6px 0 1px}
  .j-subject-chip-filter{min-height:38px;padding:7px 10px;font-size:.77rem}

  /* Sections and grids */
  .j-section,.j-level-section,.j-simple{padding:34px 0}
  .j-section-head{display:block;margin-bottom:20px}.j-section-head p{margin-top:8px}
  .j-section-head h2,.j-page-hero h1{font-size:clamp(1.85rem,9vw,2.5rem)}
  .j-type-head{display:grid;grid-template-columns:46px minmax(0,1fr);gap:12px;align-items:start;margin-bottom:18px}
  .j-type-icon{width:46px;height:46px;min-width:46px;flex-basis:auto;border-radius:14px}
  .j-type-head h2{font-size:clamp(1.7rem,8vw,2.15rem);margin-top:2px}
  .j-grid{grid-template-columns:1fr;gap:14px}
  .j-card{border-radius:20px}
  .j-card-media{aspect-ratio:16/8.6}
  .j-card-body{padding:16px}
  .j-card h2,.j-card h3{font-size:1.16rem}
  .j-card p{font-size:.92rem;margin-bottom:14px}
  .j-card-cta{min-height:44px;padding-top:10px}
  .j-tags{gap:5px}.j-tag{font-size:.69rem;padding:4px 7px}

  /* Featured cards on level landing */
  .j-feature-grid{grid-template-columns:1fr;gap:10px;margin-top:18px}
  .j-feature-card{min-height:0;padding:16px;display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:12px;align-items:start}
  .j-feature-card>span{grid-column:1;grid-row:1/4;font-size:1.75rem;align-self:start}
  .j-feature-card strong{grid-column:2;margin:0 0 4px;font-size:1.08rem}
  .j-feature-card p{grid-column:2;margin:0 0 8px;font-size:.86rem}
  .j-feature-card b{grid-column:2;margin:0;font-size:.82rem}

  /* Home level cards */
  .j-level-cards,.j-level-cards.compact{grid-template-columns:1fr;gap:10px}
  .j-level-card,.j-level-cards.compact .j-level-card{min-height:0;padding:17px;border-radius:20px}
  .j-level-card strong{font-size:1.65rem;margin:12px 0 3px}.j-level-card p{font-size:.85rem;margin:10px 0 12px}
  .j-method-grid{grid-template-columns:1fr;gap:10px}.j-method-grid article{padding:18px;border-radius:20px}
  .j-zero-card,.j-next-card{display:block;padding:20px;border-radius:22px}.j-zero-badges{justify-content:flex-start;margin-top:16px}

  /* Article / detail pages */
  .j-content-wrap,.j-quiz-shell{width:calc(100% - 24px);margin-left:auto;margin-right:auto}
  .j-content-top{padding:24px 0 18px}
  .j-content-top h1{font-size:clamp(2rem,10vw,2.8rem);margin:10px 0}
  .j-content-article{padding:20px 16px;border-radius:20px;box-shadow:0 10px 30px rgba(118,69,28,.08)}
  .j-content-article h2{font-size:1.45rem}.j-content-article h3{font-size:1.2rem}
  .j-page-hero{padding:24px 0 14px}.j-page-hero .j-container{padding:20px 16px;border-radius:20px}
  .j-empty{padding:34px 16px;border-radius:20px}.j-empty.compact{padding:16px}

  /* Quiz */
  .j-quiz-shell{margin-top:26px;margin-bottom:40px}
  .j-quiz-head{padding:20px 16px;border-radius:22px}.j-quiz-head h1{font-size:clamp(1.8rem,9vw,2.5rem)}
  .j-question{padding:17px 14px;border-radius:18px;margin:11px 0}.j-question h2{font-size:1.05rem}
  .j-choice{padding:13px 12px;border-radius:13px;min-height:48px;align-items:flex-start}
  .j-choice input{flex:0 0 auto;width:18px;height:18px;margin-top:2px}
  .j-score{padding:24px 16px;border-radius:22px}.j-result-item{padding:12px}

  /* Buttons */
  .j-actions{display:grid;grid-template-columns:1fr;gap:9px}
  .j-btn,.j-btn-soft{width:100%;min-height:48px;padding:0 15px;border-radius:13px}

  /* Footer */
  .j-footer{margin-top:20px}
  .j-footer-inner{width:calc(100% - 24px);padding:30px 0;display:grid;grid-template-columns:1fr;gap:22px}
  .j-footer-brand,.j-footer-links,.j-footer-links:last-child{grid-column:auto}
  .j-footer-brand img{width:138px}
  .j-footer-bottom{padding:14px 12px calc(14px + env(safe-area-inset-bottom));display:block;text-align:center;font-size:.78rem}
  .j-footer-bottom span{display:block;margin:4px 0}
}

/* Very small phones */
@media (max-width:390px){
  .j-container,.j-content-wrap,.j-quiz-shell,.j-footer-inner{width:calc(100% - 18px)}
  .j-header-inner{width:calc(100% - 14px)}
  .j-brand img{width:108px}
  .j-parent-link{font-size:.64rem;padding:6px 7px}
  .j-level-nav a{min-width:50px;padding:7px 9px;font-size:.76rem}
  .j-hero h1,.j-level-hero h1{font-size:2.25rem}
  .j-section-nav a{font-size:.76rem;padding:8px 10px}
  .j-subject-chip-filter{font-size:.73rem;padding:7px 9px}
  .j-card-body{padding:14px}
  .j-content-article{padding:18px 13px}
}

/* Landscape phone: keep header compact */
@media (max-height:520px) and (orientation:landscape) and (max-width:950px){
  .j-header{position:relative}
  .j-header-inner{padding:6px 0}
  .j-level-nav{padding-bottom:1px}
  .j-hero,.j-level-hero{padding-top:24px}
}


/* =========================================================
   Mobile navigation V2 — compact, no horizontal scrolling
   ========================================================= */
.j-parent-short{display:none}.j-parent-link b{font-weight:950;color:var(--orange)}
@media (max-width:767px){
  html{scroll-padding-top:128px}
  .j-header{position:sticky;top:0;z-index:90}
  .j-header-inner{
    width:100%;
    padding:max(7px,env(safe-area-inset-top)) 10px 8px;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:42px 42px;
    gap:6px 8px;
  }
  .j-brand{align-self:center}.j-brand img{width:108px;max-height:38px;object-fit:contain}
  .j-parent-link{align-self:center;min-height:36px;padding:6px 9px;border-radius:10px;font-size:.72rem}
  .j-parent-full{display:none}.j-parent-short{display:inline}
  .j-level-nav{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    overflow:visible;
    padding:0;
  }
  .j-level-nav a{
    min-width:0;
    width:100%;
    min-height:40px;
    padding:0 2px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    font-size:.76rem;
  }

  .j-level-toolbar{overflow:visible;border-block:1px solid #f3dfcc;background:#fffaf5}
  .j-level-toolbar .j-container{width:100%;padding:8px 10px}
  .j-section-nav{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    overflow:visible;
    padding:0;
  }
  .j-section-nav a{
    min-width:0;
    width:100%;
    min-height:42px;
    padding:7px 5px;
    border-radius:12px;
    font-size:.76rem;
    line-height:1.15;
    white-space:normal;
    text-align:center;
    justify-content:center;
  }

  .j-level-hero{padding:20px 0 16px}
  .j-level-hero h1{font-size:clamp(2.15rem,12vw,3rem);margin:2px 0 9px}
  .j-level-hero .j-hero-lead{margin-bottom:10px}
  .j-level-stats{margin-top:10px}
}
@media (max-width:390px){
  .j-header-inner{padding-left:7px;padding-right:7px}
  .j-brand img{width:98px}
  .j-parent-link{font-size:.68rem;padding:5px 7px}
  .j-level-nav{gap:4px}
  .j-level-nav a{font-size:.71rem}
  .j-level-toolbar .j-container{padding-left:7px;padding-right:7px}
  .j-section-nav{gap:5px}
  .j-section-nav a{font-size:.71rem;padding:6px 3px}
}

/* =========================================================
   Mobile dropdown navigation V3
   ========================================================= */
.j-mobile-menu,.j-mobile-section-select-wrap,.j-mobile-subject-select-wrap{display:none}
@media (max-width:767px){
  html{scroll-padding-top:76px}
  .j-header-inner{
    width:100%;min-height:62px;padding:max(8px,env(safe-area-inset-top)) 12px 8px;
    display:flex;align-items:center;justify-content:space-between;gap:12px;
  }
  .j-brand img{width:116px;max-height:40px;object-fit:contain}
  .j-level-nav,.j-parent-link{display:none!important}
  .j-mobile-menu{display:block;position:relative;margin-left:auto}
  .j-mobile-menu-button{min-height:42px;padding:0 13px;border:1px solid #efd2b6;border-radius:12px;background:#fff;color:#9a4a08;font:inherit;font-size:.86rem;font-weight:900;display:flex;align-items:center;gap:9px;cursor:pointer}
  .j-mobile-menu-button b{font-size:1rem;transition:transform .18s ease}.j-mobile-menu-button[aria-expanded="true"] b{transform:rotate(180deg)}
  .j-mobile-menu-panel{position:absolute;right:0;top:calc(100% + 8px);width:min(250px,calc(100vw - 24px));padding:8px;background:#fff;border:1px solid #efd9c5;border-radius:16px;box-shadow:0 18px 45px rgba(79,44,20,.18);z-index:120}
  .j-mobile-menu-panel[hidden]{display:none}
  .j-mobile-menu-panel a{display:flex;align-items:center;justify-content:space-between;min-height:43px;padding:9px 12px;border-radius:11px;text-decoration:none;font-weight:850;color:#5d4e45}
  .j-mobile-menu-panel a:hover,.j-mobile-menu-panel a.active{background:#fff0e2;color:#a54c00}
  .j-mobile-menu-panel a.college{margin-top:5px;border-top:1px solid #f3e2d2;border-radius:0 0 11px 11px;color:#d45d00}

  .j-level-toolbar{position:relative;top:auto;overflow:visible;background:#fffaf5}
  .j-level-toolbar .j-container{width:calc(100% - 24px);padding:10px 0}
  .j-section-nav{display:none!important}
  .j-mobile-section-select-wrap{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}
  .j-mobile-section-select-wrap label{font-size:.78rem;font-weight:900;color:#785f4d}
  .j-mobile-section-select{width:100%;height:46px;padding:0 40px 0 13px;border:1px solid #ebcfb4;border-radius:13px;background:#fff;color:#3c2d24;font:inherit;font-size:16px;font-weight:850;outline:none}
  .j-mobile-section-select:focus{border-color:#ff9b42;box-shadow:0 0 0 3px rgba(255,121,0,.12)}

  .j-content-tools{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .j-search-box{order:2;width:100%}
  .j-subject-filter{display:none!important}
  .j-mobile-subject-select-wrap{display:grid;order:1;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}
  .j-mobile-subject-select-wrap>span{font-size:.78rem;font-weight:900;color:#785f4d}
  .j-mobile-subject-select{width:100%;height:46px;padding:0 40px 0 13px;border:1px solid #ebcfb4;border-radius:13px;background:#fff;color:#3c2d24;font:inherit;font-size:16px;font-weight:800;outline:none}
  .j-mobile-subject-select:focus{border-color:#ff9b42;box-shadow:0 0 0 3px rgba(255,121,0,.12)}
}
@media (max-width:390px){
  .j-header-inner{padding-left:9px;padding-right:9px}.j-brand img{width:106px}
  .j-mobile-menu-button{min-height:40px;padding:0 11px;font-size:.8rem}
  .j-level-toolbar .j-container{width:calc(100% - 18px)}
  .j-mobile-section-select-wrap,.j-mobile-subject-select-wrap{grid-template-columns:1fr;gap:5px}
  .j-mobile-section-select-wrap label,.j-mobile-subject-select-wrap>span{padding-left:2px}
}


/* =========================================================
   Mobile compact navigation V4
   ========================================================= */
@media (max-width:767px){
  /* Larger Junior logo while keeping the header compact */
  .j-brand img{
    width:154px!important;
    max-width:46vw;
    max-height:54px!important;
    height:auto;
  }

  /* When a real rubric is open, Rubrique -> Matière directly. */
  .j-level-section.has-section{
    padding-top:10px!important;
  }
  .j-level-section.has-section .j-type-head{
    display:none!important;
  }
  .j-level-section.has-section .j-content-tools{
    margin-top:0!important;
  }
}
@media (max-width:390px){
  .j-brand img{
    width:142px!important;
    max-width:48vw;
  }
}


/* =========================================================
   Ressources + footer refresh V5
   ========================================================= */
.j-resource-list{padding-bottom:30px}
.j-other-resources{padding:28px 0 46px}
.j-section-head.compact{margin-bottom:18px}
.j-section-head.compact h2{margin-bottom:6px}
.j-resource-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.j-resource-card{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:14px;padding:18px;border:1px solid #efd8c3;border-radius:20px;background:#fff;text-decoration:none;color:#3c2d24;box-shadow:0 8px 24px rgba(78,45,22,.055);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.j-resource-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(78,45,22,.09);border-color:#f6b476}
.j-resource-card-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#fff1e3;color:#e96700;font-weight:950;font-size:1.12rem}
.j-resource-card strong{display:block;font-size:1rem;margin-bottom:3px}
.j-resource-card p{margin:0;color:#806d60;font-size:.88rem;line-height:1.42}
.j-resource-card-arrow{font-size:1.25rem;color:#d45d00;font-weight:900}
.j-resource-card.is-college{background:#fffaf5}
.j-footer-v2{grid-template-columns:1.4fr .9fr 1fr 1.2fr}
.j-footer-levels{display:flex;flex-wrap:wrap;gap:7px}
.j-footer-levels a{display:inline-flex;align-items:center;justify-content:center;min-width:38px;padding:6px 8px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:rgba(255,255,255,.04)}

@media(max-width:767px){
  /* The previous max-height was shrinking the logo despite its larger width. */
  .j-brand{display:flex;align-items:center;flex:0 1 auto;min-width:0}
  .j-brand img{width:176px!important;max-width:58vw!important;max-height:none!important;height:auto!important;object-fit:contain!important}
  .j-header-inner{min-height:72px}
  .j-mobile-menu{flex:0 0 auto}
  .j-resource-tabs{display:flex;overflow-x:auto;gap:7px;padding-bottom:5px;scrollbar-width:none}
  .j-resource-tabs::-webkit-scrollbar{display:none}
  .j-resource-tabs a{flex:0 0 auto;white-space:nowrap}
  .j-resource-card-grid{grid-template-columns:1fr;gap:10px}
  .j-resource-card{grid-template-columns:44px minmax(0,1fr) auto;padding:15px;border-radius:17px}
  .j-resource-card-icon{width:44px;height:44px;border-radius:13px}
  .j-footer-v2{grid-template-columns:1fr!important;gap:20px!important}
  .j-footer-brand img{width:150px}
  .j-footer-links{gap:7px}
}
@media(max-width:390px){
  .j-brand img{width:164px!important;max-width:60vw!important}
  .j-mobile-menu-button{padding-inline:10px}
}

/* === V6 · Footer vertical levels + Outils Junior === */
.j-footer-levels{display:contents!important}.j-footer-levels a{display:block!important;min-width:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important}
.j-tools-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.j-tool-card{position:relative;display:flex;align-items:flex-start;gap:15px;min-height:180px;padding:22px;border:1px solid #f1d8c0;border-radius:24px;background:#fff;text-decoration:none;color:#44372f;box-shadow:0 12px 30px rgba(93,52,22,.06);transition:.2s}
.j-tool-card:hover{transform:translateY(-3px);border-color:#e9bc92;box-shadow:0 18px 38px rgba(93,52,22,.1)}
.j-tool-icon,.j-coming-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;flex:0 0 56px;border-radius:17px;background:#fff0e2;color:#c95b00;font-size:1.55rem;font-weight:950}
.j-tool-copy{min-width:0}.j-tool-copy h2{margin:9px 0 6px;font-size:1.18rem}.j-tool-copy p{margin:0;color:#74645b;line-height:1.5;font-size:.92rem}.j-tool-arrow{margin-left:auto;color:#d86400;font-weight:950;font-size:1.2rem}
.j-soon-badge{display:inline-flex;align-items:center;width:max-content;padding:5px 8px;border-radius:999px;background:#fff5cb;color:#7d5d00;font-size:.7rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.j-tool-coming{padding:44px 0 70px}.j-coming-card{max-width:680px;margin:26px auto 0;padding:42px;text-align:center;border:1px solid #f1d8c0;border-radius:30px;background:#fff;box-shadow:0 18px 42px rgba(83,44,18,.08)}
.j-coming-card .j-coming-icon{margin:0 auto 14px;width:72px;height:72px;font-size:2rem}.j-coming-card .j-soon-badge{margin:0 auto 12px}.j-coming-card h1{margin:8px 0 10px;font-size:clamp(2rem,6vw,3.4rem)}.j-coming-card p{color:#74645b;font-size:1.02rem;line-height:1.6}.j-coming-note{font-weight:800;color:#a55a1f!important}
@media(max-width:1099px){.j-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.j-tools-grid{grid-template-columns:1fr;gap:12px}.j-tool-card{min-height:0;padding:18px;border-radius:20px}.j-tool-icon{width:50px;height:50px;flex-basis:50px}.j-coming-card{padding:28px 20px;border-radius:24px}.j-tool-coming{padding:26px 0 50px}}

/* =========================================================
   Outils Junior fonctionnels V8
   ========================================================= */
.j-tool-shell{padding:34px 0 64px}.j-tool-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.j-tool-top h1{margin:4px 0 8px;font-size:clamp(2rem,5vw,3.4rem)}.j-tool-top p{margin:0;color:#75645a;max-width:760px;line-height:1.55}.j-tool-layout{display:grid;grid-template-columns:minmax(250px,330px) minmax(0,1fr);gap:20px;align-items:start}.j-tool-panel,.j-tool-stage{background:#fff;border:1px solid #efd8c3;border-radius:24px;box-shadow:0 12px 34px rgba(86,49,24,.065)}.j-tool-panel{padding:20px;position:sticky;top:92px}.j-tool-stage{padding:24px;min-height:430px}.j-tool-panel h2,.j-tool-stage h2{margin:0 0 14px;font-size:1.12rem}.j-form-grid{display:grid;gap:13px}.j-field{display:grid;gap:6px}.j-field label,.j-field>span{font-size:.78rem;font-weight:900;color:#6e5a4c}.j-input,.j-select,.j-number{width:100%;height:46px;border:1px solid #e7cbb0;border-radius:13px;padding:0 13px;background:#fff;color:#332820;font:inherit;font-size:16px;outline:none}.j-input:focus,.j-select:focus,.j-number:focus{border-color:#ff9b42;box-shadow:0 0 0 3px rgba(255,121,0,.12)}.j-choice-row{display:flex;flex-wrap:wrap;gap:7px}.j-check-chip{position:relative}.j-check-chip input{position:absolute;opacity:0;pointer-events:none}.j-check-chip span{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 12px;border:1px solid #e9d2bd;border-radius:999px;background:#fffaf5;font-size:.82rem;font-weight:850;color:#6d594d;cursor:pointer}.j-check-chip input:checked+span{border-color:#ff9a3d;background:#fff0e2;color:#b34f00;box-shadow:0 0 0 2px rgba(255,121,0,.08)}.j-tool-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.j-action-primary,.j-action-soft,.j-action-danger{min-height:46px;padding:0 16px;border:0;border-radius:13px;font:inherit;font-weight:900;cursor:pointer}.j-action-primary{background:#ff7900;color:#fff;box-shadow:0 8px 18px rgba(255,121,0,.2)}.j-action-primary:hover{background:#ea6e00}.j-action-soft{background:#fff1e4;color:#a94c00;border:1px solid #f3cda8}.j-action-danger{background:#fff0f0;color:#a93232;border:1px solid #efc0c0}.j-action-primary:disabled,.j-action-soft:disabled{opacity:.5;cursor:not-allowed}.j-progress{height:9px;background:#f5eadf;border-radius:999px;overflow:hidden}.j-progress>span{display:block;height:100%;background:#ff7900;border-radius:999px;transition:width .2s}.j-tool-meta{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:18px;color:#75645a;font-size:.84rem}.j-question-card{display:grid;gap:18px;text-align:center;padding:28px 18px;border-radius:22px;background:#fffaf5;border:1px solid #f3dfcb}.j-question{font-size:clamp(2rem,7vw,4.4rem);font-weight:950;line-height:1.05;color:#32251d}.j-answer-row{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}.j-answer-input{width:min(260px,100%);height:58px;text-align:center;font-size:1.4rem;font-weight:900;border:2px solid #edc9a8;border-radius:16px;outline:none}.j-answer-input:focus{border-color:#ff7900;box-shadow:0 0 0 4px rgba(255,121,0,.11)}.j-feedback{min-height:28px;font-weight:850}.j-feedback.ok{color:#247a43}.j-feedback.bad{color:#b7472c}.j-result-card{text-align:center;padding:28px 18px}.j-result-score{font-size:clamp(3rem,10vw,5rem);font-weight:950;color:#ff7900;line-height:1}.j-result-card h2{font-size:1.5rem;margin:10px 0}.j-result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.j-stat-mini{padding:14px;border-radius:16px;background:#fff7ef;border:1px solid #f1dbc7}.j-stat-mini strong{display:block;font-size:1.35rem}.j-stat-mini span{font-size:.76rem;color:#7b695d}.j-empty-stage{display:grid;place-items:center;min-height:340px;text-align:center;color:#75645a}.j-empty-stage .icon{font-size:3rem;margin-bottom:10px}.j-table-picks{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.j-table-picks .j-check-chip span{width:100%;padding:0}.j-dictation-textarea{width:100%;min-height:140px;padding:14px;border:2px solid #e7cbb0;border-radius:16px;font:inherit;font-size:17px;line-height:1.55;resize:vertical;outline:none}.j-dictation-textarea:focus{border-color:#ff7900;box-shadow:0 0 0 4px rgba(255,121,0,.1)}.j-dictation-controls{display:flex;gap:9px;flex-wrap:wrap;justify-content:center}.j-correction{margin-top:15px;padding:14px;border-radius:15px;background:#fff7e9;border:1px solid #f0d4b5;text-align:left;line-height:1.55}.j-converter-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:end}.j-converter-arrow{height:46px;display:grid;place-items:center;font-size:1.35rem;font-weight:950;color:#d15d00}.j-convert-result{margin-top:18px;padding:22px;border-radius:20px;background:#fff6ec;border:1px solid #f2d7bd;text-align:center}.j-convert-result strong{font-size:clamp(1.8rem,6vw,3.4rem);display:block;color:#b85200}.j-fraction-workspace{display:grid;grid-template-columns:minmax(230px,320px) 1fr;gap:22px;align-items:center}.j-fraction-visual{display:grid;place-items:center;min-height:320px}.j-fraction-circle{width:min(260px,68vw);aspect-ratio:1;border-radius:50%;border:8px solid #fff;box-shadow:0 0 0 2px #e6c6a7,0 10px 30px rgba(93,52,22,.1)}.j-fraction-bar{display:flex;width:min(520px,100%);height:90px;border:2px solid #d9b794;border-radius:16px;overflow:hidden;background:#fff}.j-fraction-cell{flex:1;border-right:1px solid #d9b794}.j-fraction-cell:last-child{border-right:0}.j-fraction-cell.on{background:#ff9b42}.j-fraction-readout{text-align:center;margin-top:16px}.j-fraction-readout strong{font-size:2.4rem;color:#c65a00}.j-fraction-readout p{margin:5px 0 0;color:#74645b}.j-geometry-layout{display:grid;grid-template-columns:minmax(260px,360px) 1fr;gap:22px;align-items:start}.j-geometry-canvas{display:grid;place-items:center;min-height:320px;padding:18px;border-radius:20px;background:#fffaf5;border:1px solid #f0dcc9}.j-geometry-canvas svg{width:min(430px,100%);height:auto}.j-geo-results{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}.j-geo-box{padding:16px;border-radius:16px;background:#fff5e9;border:1px solid #efd3b6;text-align:center}.j-geo-box strong{font-size:1.45rem;display:block;color:#ad4f00}.j-tool-tip{padding:12px 13px;border-radius:14px;background:#f7fbff;border:1px solid #dbeaf4;color:#536775;font-size:.82rem;line-height:1.45}.j-mode-tabs{display:flex;gap:6px;padding:5px;border-radius:14px;background:#f7ede3;margin-bottom:18px}.j-mode-tabs button{flex:1;min-height:40px;border:0;border-radius:10px;background:transparent;font:inherit;font-weight:850;color:#755f50;cursor:pointer}.j-mode-tabs button.active{background:#fff;color:#a94c00;box-shadow:0 4px 12px rgba(80,44,20,.08)}.j-hidden{display:none!important}
@media(max-width:900px){.j-tool-layout{grid-template-columns:1fr}.j-tool-panel{position:static}.j-fraction-workspace,.j-geometry-layout{grid-template-columns:1fr}.j-tool-stage{min-height:0}}
@media(max-width:767px){.j-tool-shell{padding:20px 0 42px}.j-tool-top{display:block;margin-bottom:14px}.j-tool-top h1{font-size:2rem}.j-tool-layout{gap:12px}.j-tool-panel,.j-tool-stage{padding:16px;border-radius:19px}.j-tool-panel{order:1}.j-tool-stage{order:2}.j-question-card{padding:22px 12px}.j-result-grid{grid-template-columns:1fr 1fr}.j-result-grid .j-stat-mini:last-child{grid-column:1/-1}.j-converter-grid{grid-template-columns:1fr}.j-converter-arrow{height:auto;transform:rotate(90deg)}.j-table-picks{grid-template-columns:repeat(3,1fr)}.j-fraction-visual{min-height:240px}.j-geometry-canvas{min-height:240px}.j-geo-results{grid-template-columns:1fr}.j-tool-actions>*{flex:1 1 auto}.j-answer-row{display:grid;grid-template-columns:1fr}.j-answer-input{width:100%}}
.j-ready-badge{display:inline-flex;align-items:center;width:max-content;padding:5px 8px;border-radius:999px;background:#e8f7ed;color:#247a43;font-size:.7rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em}

/* =========================================================
   Junior tools V9 — keypad, QCM, dictation diff, conversion table
   ========================================================= */
.j-numeric-entry{display:grid;gap:14px;justify-items:center;width:min(360px,100%);margin:0 auto}
.j-numeric-entry .j-answer-input{width:100%;background:#fff;cursor:default;caret-color:transparent}
.j-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:min(300px,100%)}
.j-keypad button{min-height:56px;border:1px solid #ead0b6;border-radius:15px;background:#fff;font:inherit;font-size:1.2rem;font-weight:950;color:#3d3027;box-shadow:0 4px 12px rgba(91,51,24,.05);cursor:pointer}
.j-keypad button:active{transform:translateY(1px);background:#fff1e4}
.j-keypad button.soft{background:#fff7ef;color:#a34c05}
.j-keypad-validate{width:min(300px,100%)}
.j-answer-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(520px,100%);margin:0 auto}
.j-answer-choice{min-height:64px;border:2px solid #ecd1b7;border-radius:17px;background:#fff;font:inherit;font-size:1.2rem;font-weight:950;color:#3f3027;cursor:pointer;transition:.16s}
.j-answer-choice:hover{border-color:#ff9a3d;background:#fff8f0}.j-answer-choice.correct{border-color:#58a874;background:#edf9f1;color:#1f6a3b}.j-answer-choice.wrong{border-color:#d86a50;background:#fff1ee;color:#9f3521}.j-answer-choice:disabled{opacity:1;cursor:default}

.j-diff-block{display:grid;gap:7px}.j-diff-block p{margin:0 0 8px;line-height:1.9}.j-diff-block small{color:#75655a}.j-diff-word{display:inline-block;padding:1px 4px;border-radius:6px}.j-diff-word.ok{background:#f4faf6}.j-diff-word.bad{background:#ffe8e2;color:#a33b25;text-decoration:line-through;text-decoration-thickness:2px}.j-diff-word.fix{background:#fff1c9;color:#8a5800;font-weight:900}

.j-conversion-table-wrap{display:grid;gap:12px}.j-conv-table-note{color:#705f54;font-size:.92rem}.j-conv-table-scroll{overflow-x:auto;border:1px solid #efd5bc;border-radius:18px;background:#fff}.j-conv-table{width:100%;border-collapse:collapse;min-width:560px}.j-conv-table th,.j-conv-table td{padding:13px 10px;text-align:center;border-right:1px solid #f0ddca;border-bottom:1px solid #f0ddca;white-space:nowrap}.j-conv-table th:last-child,.j-conv-table td:last-child{border-right:0}.j-conv-table tbody tr:last-child td{border-bottom:0}.j-conv-table th{background:#fff8f0;color:#6d584a;font-size:.82rem}.j-conv-table td{font-weight:900;color:#3f3027}.j-conv-table .from{background:#fff0df}.j-conv-table .to{box-shadow:inset 0 0 0 2px #ff9a3d;background:#fff8e9}

.j-fraction-units{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;width:100%}.j-fraction-circle.full{background:#ff9b42}.j-fraction-bar-large{position:relative}.j-fraction-fill{height:100%;background:#ff9b42}.j-fraction-more{padding:12px 14px;border-radius:14px;background:#fff3e6;border:1px solid #efcfaf;font-weight:900;color:#9b4a08}.j-fraction-readout small{display:block;margin-top:7px;color:#7b6a5f}
.j-geo-formula{grid-column:1/-1;padding:12px 14px;border-radius:14px;background:#f7fbff;border:1px solid #dcebf5;color:#536775;font-size:.86rem;text-align:center}

@media(max-width:767px){
  .j-keypad{width:100%;max-width:320px}.j-keypad button{min-height:54px}.j-answer-choices{grid-template-columns:1fr 1fr}.j-answer-choice{min-height:58px;font-size:1.05rem}.j-diff-block{text-align:left}.j-conv-table{min-width:520px}.j-fraction-units{gap:9px}.j-fraction-circle{width:min(190px,58vw)}
}

/* V10 — tableau de conversion dynamique */
.j-conv-live-summary{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid #f0d3b6;border-radius:16px;background:#fffaf5}.j-conv-live-summary strong{font-size:1.05rem;color:#3f3027}.j-conv-live-summary span{font-size:.9rem;color:#746257}.j-conv-warning{padding:10px 12px;border-radius:12px;background:#fff4df;color:#7a4d16;font-size:.9rem}.j-conv-place-table .j-place-row td{height:72px;font-size:1.5rem;position:relative;background:#fff}.j-conv-place-table .j-place-row td span{display:inline-flex;min-width:28px;min-height:36px;align-items:center;justify-content:center;border-radius:9px;background:#fff7ef;color:#3f3027;font-weight:900}.j-conv-place-table .j-place-row td.from span{background:#ffe4c7}.j-conv-place-table .j-place-row td.to span{outline:2px solid #ff9a3d}.j-decimal-marker{position:absolute;right:-5px;bottom:12px;font-style:normal;font-size:1.65rem;font-weight:900;color:#e87918;z-index:2}.j-equivalence-row td{font-size:.88rem;color:#705f54;font-weight:700;background:#fffdfb}.j-conv-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:.85rem;color:#705f54}.j-conv-legend span{padding:7px 10px;border-radius:999px;background:#fff5ea;border:1px solid #f2ddc7}
@media (max-width:767px){.j-conv-place-table .j-place-row td{height:64px;font-size:1.25rem}.j-conv-place-table .j-place-row td span{min-width:24px;min-height:32px}.j-decimal-marker{font-size:1.4rem;bottom:10px}.j-conv-legend{flex-direction:column;align-items:flex-start}.j-conv-legend span{border-radius:12px}.j-conv-table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}}

/* =========================================================
   Tool exercise focus mode V11
   ========================================================= */
.j-session-bar{display:none}
body.j-tool-focus-active{overflow:hidden;background:#fffaf5}
body.j-tool-focus-active .j-header,
body.j-tool-focus-active .j-footer{display:none!important}
.j-tool-shell.j-tool-running{
  position:fixed;inset:0;z-index:1000;margin:0!important;padding:0!important;
  background:linear-gradient(180deg,#fffaf5 0%,#fff 100%);overflow:auto;
  overscroll-behavior:contain;
}
.j-tool-shell.j-tool-running>.j-container{
  width:min(100% - 32px,980px)!important;min-height:100dvh;margin:0 auto!important;
  padding:18px 0 max(24px,env(safe-area-inset-bottom))!important;display:flex;flex-direction:column;
}
.j-tool-shell.j-tool-running .j-session-bar{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  min-height:54px;margin-bottom:18px;padding:8px 10px 8px 16px;border:1px solid #efd7bf;
  border-radius:16px;background:rgba(255,255,255,.94);box-shadow:0 8px 24px rgba(78,43,20,.06);
  position:sticky;top:8px;z-index:3;backdrop-filter:blur(12px)
}
.j-tool-shell.j-tool-running .j-session-bar strong{font-size:1rem;color:#3e3027}
.j-session-exit{min-height:38px;padding:0 13px;border:1px solid #e9cfb7;border-radius:11px;background:#fff7ef;color:#7d5e48;font:inherit;font-weight:850;cursor:pointer}
.j-session-exit:hover{background:#fff0e2;color:#a34b00}
.j-tool-shell.j-tool-running .j-tool-top,
.j-tool-shell.j-tool-running .j-tool-panel{display:none!important}
.j-tool-shell.j-tool-running .j-tool-layout{display:block!important;flex:1}
.j-tool-shell.j-tool-running .j-tool-stage{
  min-height:calc(100dvh - 110px);border:0!important;box-shadow:none!important;background:transparent!important;
  padding:clamp(12px,2.5vw,28px)!important;display:flex;flex-direction:column;justify-content:center;
}
.j-tool-shell.j-tool-running .j-question-card,
.j-tool-shell.j-tool-running .j-result-card{
  width:min(100%,760px);margin:auto;background:#fff;border:1px solid #efd8c3;border-radius:26px;
  box-shadow:0 18px 50px rgba(78,43,20,.09)
}
.j-tool-shell.j-tool-running .j-tool-meta,
.j-tool-shell.j-tool-running .j-progress{width:min(100%,760px);margin-left:auto;margin-right:auto}
.j-tool-shell.j-tool-running .j-tool-meta{margin-bottom:12px}
.j-tool-shell.j-tool-running .j-progress{margin-bottom:16px}
.j-tool-shell.j-tool-running .j-question{font-size:clamp(2.7rem,9vw,6rem)}
.j-tool-shell.j-tool-running .j-keypad{margin-inline:auto}
.j-tool-shell.j-tool-running .j-dictation-textarea{min-height:180px}

@media(max-width:767px){
  .j-tool-shell.j-tool-running>.j-container{width:100%!important;padding:8px 10px max(14px,env(safe-area-inset-bottom))!important}
  .j-tool-shell.j-tool-running .j-session-bar{top:max(4px,env(safe-area-inset-top));margin-bottom:6px;border-radius:13px;min-height:48px}
  .j-tool-shell.j-tool-running .j-tool-stage{min-height:calc(100dvh - 62px);padding:8px 2px 14px!important;justify-content:flex-start}
  .j-tool-shell.j-tool-running .j-tool-meta{margin:8px 4px 10px}
  .j-tool-shell.j-tool-running .j-progress{margin:0 4px 12px;width:calc(100% - 8px)}
  .j-tool-shell.j-tool-running .j-question-card,
  .j-tool-shell.j-tool-running .j-result-card{border-radius:20px;padding:20px 12px;box-shadow:0 10px 28px rgba(78,43,20,.07)}
  .j-tool-shell.j-tool-running .j-question{font-size:clamp(2.5rem,16vw,4.8rem)}
  .j-tool-shell.j-tool-running .j-dictation-textarea{min-height:150px}
}


/* =========================================================
   V12 — Modal de construction + exercices sans scroll
   ========================================================= */
html.j-tool-focus-active,
body.j-tool-focus-active{
  width:100%;height:100%;overflow:hidden!important;overscroll-behavior:none;
}
body.j-tool-focus-active{position:fixed;inset:0;}
.j-tool-shell.j-tool-running{
  height:100dvh;max-height:100dvh;overflow:hidden!important;overscroll-behavior:none;
}
.j-tool-shell.j-tool-running>.j-container{
  height:100dvh;min-height:0!important;max-height:100dvh;overflow:hidden;
  padding-top:max(10px,env(safe-area-inset-top))!important;
  padding-bottom:max(10px,env(safe-area-inset-bottom))!important;
}
.j-tool-shell.j-tool-running .j-session-bar{
  position:relative!important;top:auto!important;flex:0 0 auto;margin-bottom:8px;min-height:46px;
}
.j-tool-shell.j-tool-running .j-tool-layout{min-height:0!important;display:flex!important;flex:1 1 auto;overflow:hidden;}
.j-tool-shell.j-tool-running .j-tool-stage{
  flex:1 1 auto;min-height:0!important;height:auto!important;overflow:hidden!important;
  padding:clamp(4px,1.2vh,14px)!important;justify-content:center;
}
.j-tool-shell.j-tool-running .j-tool-meta{margin-bottom:6px!important;flex:0 0 auto;}
.j-tool-shell.j-tool-running .j-progress{margin-bottom:8px!important;flex:0 0 auto;}
.j-tool-shell.j-tool-running .j-question-card,
.j-tool-shell.j-tool-running .j-result-card{
  max-height:calc(100dvh - 115px);overflow:hidden;margin:auto;
  padding:clamp(12px,2vh,24px)!important;
}
.j-tool-shell.j-tool-running .j-question{font-size:clamp(2.3rem,7.5vh,5.2rem)!important;margin-bottom:clamp(8px,1.5vh,18px)!important;}
.j-tool-shell.j-tool-running .j-keypad{gap:6px!important;}
.j-tool-shell.j-tool-running .j-keypad button{min-height:clamp(40px,6.8vh,58px)!important;}
.j-tool-shell.j-tool-running .j-answer-choice{min-height:clamp(44px,7vh,62px)!important;}
.j-tool-shell.j-tool-running .j-dictation-textarea{min-height:clamp(100px,24vh,180px)!important;max-height:28vh;resize:none;}
.j-tool-shell.j-tool-running .j-tool-actions{margin-top:clamp(6px,1.2vh,14px)!important;}
.j-tool-shell.j-tool-running .j-feedback{margin-top:clamp(6px,1vh,12px)!important;}

@media(max-height:700px){
  .j-tool-shell.j-tool-running .j-session-bar{min-height:40px;padding:5px 8px 5px 12px;}
  .j-tool-shell.j-tool-running .j-question-card,
  .j-tool-shell.j-tool-running .j-result-card{max-height:calc(100dvh - 92px);padding:10px!important;}
  .j-tool-shell.j-tool-running .j-question{font-size:clamp(2rem,7vh,4rem)!important;}
  .j-tool-shell.j-tool-running .j-keypad button{min-height:38px!important;}
  .j-tool-shell.j-tool-running .j-dictation-textarea{min-height:90px!important;max-height:22vh;}
}

@media(max-width:767px){
  .j-tool-shell.j-tool-running>.j-container{padding-left:8px!important;padding-right:8px!important;}
  .j-tool-shell.j-tool-running .j-session-bar{margin-bottom:4px;}
  .j-tool-shell.j-tool-running .j-tool-stage{padding:2px!important;justify-content:center!important;}
  .j-tool-shell.j-tool-running .j-question-card,
  .j-tool-shell.j-tool-running .j-result-card{width:100%;border-radius:18px;max-height:calc(100dvh - 82px);}
  .j-tool-shell.j-tool-running .j-question{font-size:clamp(2.25rem,13vw,4.1rem)!important;}
  .j-tool-shell.j-tool-running .j-keypad{max-width:290px;}
}

/* Modal construction — affiché une fois par session */
body.j-beta-open{overflow:hidden;}
.j-beta-modal[hidden]{display:none!important;}
.j-beta-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:18px;}
.j-beta-backdrop{position:absolute;inset:0;background:rgba(50,31,18,.54);backdrop-filter:blur(5px);}
.j-beta-dialog{
  position:relative;z-index:1;width:min(100%,620px);max-height:min(88dvh,720px);overflow:auto;
  border:1px solid #efd5bb;border-radius:28px;background:#fffaf5;padding:clamp(24px,4vw,38px);
  box-shadow:0 28px 90px rgba(54,31,17,.28);color:#3d3028;
}
.j-beta-kicker{display:inline-flex;padding:7px 11px;border-radius:999px;background:#fff0df;color:#b95400;font-size:.82rem;font-weight:900;text-transform:uppercase;letter-spacing:.04em;}
.j-beta-dialog h2{margin:14px 0 10px;font-size:clamp(1.65rem,4vw,2.35rem);line-height:1.08;}
.j-beta-dialog p{margin:0 0 12px;color:#6c5a4d;line-height:1.62;}
.j-beta-close{position:absolute;top:12px;right:12px;width:40px;height:40px;border:0;border-radius:12px;background:#fff0e2;color:#76533b;font-size:1.6rem;line-height:1;cursor:pointer;}
.j-beta-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px;}
.j-beta-actions .j-btn{justify-content:center;text-decoration:none;}
@media(max-width:600px){
  .j-beta-modal{padding:12px;}
  .j-beta-dialog{border-radius:22px;padding:24px 18px 20px;}
  .j-beta-actions{display:grid;grid-template-columns:1fr;}
  .j-beta-actions .j-btn{width:100%;}
}
