/* MonAvenir — espace de concentration, toutes matières. */
#mbi-root{--mb-bg:#F8F7F4;--mb-ink:#24313F;--mb-blue:#E8F0FB;--mb-sage:#E5F3E8;--mb-amber:#FFF1D7;--mb-lavender:#EEE5FA;--mb-brand:#B80B38;--mb-line:#dce3e8;background:var(--mb-bg);color:var(--mb-ink);font-size:16px}
#mbi-root .mbi-shell{max-width:880px;width:100%;height:100%;height:100dvh;min-width:0;background:var(--mb-bg)}
#mbi-root .mbi-header{background:#fff;color:var(--mb-ink);border-bottom:1px solid var(--mb-line);padding:12px clamp(14px,4vw,30px);padding-top:max(12px,env(safe-area-inset-top));min-height:64px}
#mbi-root .mbi-header strong{font-size:18px;line-height:1.3;overflow-wrap:anywhere}
#mbi-root .mbi-header small{font-size:12px;color:#526577;opacity:1}
#mbi-root .mbi-close,#mbi-root .mbi-logo{background:var(--mb-blue);color:#28486a;border:0;border-radius:12px}
#mbi-root .mbi-main{padding:clamp(16px,4vw,32px);gap:clamp(12px,2vw,20px);overflow-x:hidden;min-width:0;scroll-padding:16px;scrollbar-width:thin}
#mbi-root .mbi-main>*{min-width:0;max-width:100%;flex-shrink:0}
#mbi-root h2,#mbi-root .mbi-intro h2{color:var(--mb-ink);font-size:clamp(21px,3vw,28px);line-height:1.35;letter-spacing:-.3px}
#mbi-root p,#mbi-root .mbi-intro p,#mbi-root .mbi-situation p,#mbi-root .mbi-correct-card p{font-size:15px;line-height:1.65;color:#394c5e;overflow-wrap:anywhere}
#mbi-root .mbi-muted,#mbi-root .mbi-item small{color:#536577;font-size:13px;line-height:1.45}
#mbi-root .mbi-item,#mbi-root .mbi-situation,#mbi-root .mbi-question,#mbi-root .mbi-journal,#mbi-root .mbi-assign,#mbi-root .mbi-correct-card,#mbi-root .mbi-sheet{border:1px solid var(--mb-line);border-radius:16px;box-shadow:none;background:#fff}
#mbi-root .mbi-item{padding:16px;min-height:62px;gap:12px;align-items:center;line-height:1.4}
#mbi-root .mbi-item strong{font-size:16px;color:var(--mb-ink);overflow-wrap:anywhere}
#mbi-root .mbi-arrow{color:#375e85}
#mbi-root .mbi-category-chips{flex-wrap:wrap;overflow:visible;gap:8px;padding:0}
#mbi-root .mbi-chip{white-space:normal;min-width:0;min-height:44px;font-size:13px;color:#344b63;border-color:#d9e4f2;padding:9px 12px}
#mbi-root .mbi-chip.is-active{background:#D7E7FA;color:#234a73;border-color:#92b3d7}
#mbi-root .mbi-overview,#mbi-root .mbi-result{background:var(--mb-sage);border:1px solid #c3ddc9;border-radius:16px;padding:18px;box-shadow:none;color:#254c35}
#mbi-root .mbi-overview .mbi-row strong,#mbi-root .mbi-overview-numbers strong,#mbi-root .mbi-result strong,#mbi-root .mbi-stats strong{color:#28613f}
#mbi-root .mbi-overview-numbers,#mbi-root .mbi-stats{gap:8px}
#mbi-root .mbi-overview-numbers>div,#mbi-root .mbi-stats>div{background:#fff;border:1px solid #d8e6da;padding:13px 6px;border-radius:12px;min-width:0;overflow-wrap:anywhere}
#mbi-root .mbi-overview-numbers small,#mbi-root .mbi-stats small{font-size:12px;color:#486050;line-height:1.4}
#mbi-root .mbi-review-suggestions summary,#mbi-root .mbi-suggestion span{color:#28613f}
#mbi-root .mbi-exercise-head small{font-size:13px;font-weight:700;color:#416181;line-height:1.5}
#mbi-root .mbi-exercise-head h2{font-size:clamp(20px,3.5vw,27px);line-height:1.35}
#mbi-root .mbi-progress{height:9px;background:#e1e7e3;border-radius:12px;flex:none}
#mbi-root .mbi-progress i{background:#3b8960;border-radius:12px}
#mbi-root .mbi-situation{background:var(--mb-blue);border-color:#d0e1f4;padding:16px}
#mbi-root .mbi-situation strong{color:#2b5076;font-size:14px}
#mbi-root .mbi-question{padding:18px;align-items:flex-start;gap:12px}
#mbi-root .mbi-question-number{width:34px;height:34px;background:var(--mb-blue);color:#234e78;flex:none;font-size:16px;border-radius:11px}
#mbi-root .mbi-question h2{font-size:clamp(18px,3vw,23px);line-height:1.5;min-width:0;color:var(--mb-ink);overflow-wrap:anywhere}
#mbi-root .mbi-badge{background:var(--mb-blue);color:#244b72;font-size:12px;padding:6px 10px;max-width:min(48%,180px);line-height:1.3}
#mbi-root .mbi-field{font-size:14px;color:var(--mb-ink);gap:8px;min-width:0}
#mbi-root input:not([type=radio]):not([type=checkbox]),#mbi-root textarea,#mbi-root select{background:#fff;border:1px solid #a9bccc;border-radius:12px;min-height:48px;padding:12px;color:var(--mb-ink);font-size:16px;line-height:1.5}
#mbi-root textarea{min-height:120px;max-height:none;resize:vertical}
#mbi-root .mbi-choice{background:#fff;border:1px solid #cbd8e4;border-radius:14px;padding:14px;min-height:56px;gap:10px;line-height:1.5;cursor:pointer}
#mbi-root .mbi-choice span:last-child{min-width:0;overflow-wrap:anywhere}
#mbi-root .mbi-choice input,#mbi-root .mbi-group-choice input{accent-color:#356c9b;flex:none}
#mbi-root .mbi-option-tag{background:var(--mb-blue);color:#31587d;flex:none}
#mbi-root .mbi-choice:has(input:checked),#mbi-root .mbi-choice.mbi-true:has(input:checked),#mbi-root .mbi-choice.mbi-false:has(input:checked){background:var(--mb-blue);border-color:#527fa8;color:#24313f}
#mbi-root .mbi-hint{background:var(--mb-amber);border:1px solid #ead4a3;padding:14px;border-radius:14px}
#mbi-root .mbi-hint summary{color:#704a0b}
#mbi-root .mbi-notice,#mbi-root .mbi-empty,#mbi-root .mbi-answer{background:#eef3f8;border:1px solid #d6e2ed;padding:14px;border-radius:14px;color:#314e6a}
#mbi-root .mbi-answer strong{color:#264966}
#mbi-root .mbi-ai{background:var(--mb-lavender);border-color:#d6c7ec;padding:15px}
#mbi-root .mbi-feedback.mbi-good{background:var(--mb-sage);color:#285c39;border-color:#badbc3;padding:14px}
#mbi-root .mbi-feedback.mbi-warning{background:var(--mb-amber);color:#714e17;border-color:#e7c98c;padding:14px}
#mbi-root .mbi-error{background:#fff1f3;color:#8c1733;border:1px solid #efc6d0}
#mbi-root .mbi-assign h3,#mbi-root .mbi-sheet-head small,#mbi-root .mbi-journal-title strong{color:#355b80}
#mbi-root .mbi-sheet-tag,#mbi-root .mbi-sheet-calc .mbi-sheet-active th,#mbi-root .mbi-journal-date td{background:var(--mb-blue);color:#29486b}
#mbi-root .mbi-journal-table th{background:#355675!important;color:white!important}
#mbi-root .mbi-table-wrap{width:100%;max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;background:#fff;border:1px solid var(--mb-line);border-radius:12px;scrollbar-width:thin}
#mbi-root .mbi-table th,#mbi-root .mbi-table td{padding:9px;border-color:#dce3e8;line-height:1.45;overflow-wrap:anywhere}
#mbi-root .mbi-table th{background:#edf2f7;color:#28496b}
#mbi-root .mbi-table input:not([type=radio]){min-height:44px;padding:8px;font-size:16px}
#mbi-root .mbi-timer{background:var(--mb-blue);color:#244b72;border-color:#cadcf0;margin:0}
#mbi-root .mbi-timer[data-expired=yes]{background:var(--mb-amber);color:#714e17;border-color:#e7c98c}
#mbi-root .mbi-footer{position:relative;flex-wrap:wrap;gap:10px;padding:12px clamp(14px,4vw,30px) max(12px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--mb-line);box-shadow:none;min-width:0}
#mbi-root .mbi-button{min-height:48px;border:1px solid #b9c9d9;background:#fff;color:#294968;font-size:15px;font-weight:700;border-radius:12px;padding:11px 15px;line-height:1.35;overflow-wrap:anywhere;white-space:normal}
#mbi-root .mbi-primary{background:var(--mb-brand);border-color:var(--mb-brand);color:#fff}
#mbi-root .mbi-footer .mbi-button{flex:1 1 112px;min-width:0;max-width:100%}
#mbi-root button:focus-visible,#mbi-root input:focus-visible,#mbi-root select:focus-visible,#mbi-root textarea:focus-visible,#mbi-root summary:focus-visible{outline:3px solid #356c9b;outline-offset:2px}
#mbi-root .mbi-import-image img{display:block;max-width:100%;height:auto;object-fit:contain}
#mbi-root .mbi-import{background:var(--mb-blue);border-color:#d0e1f4}
#mbi-root .mbi-import summary{color:#31587d}
.lr-native-interactive{border-color:#dce3e8!important;box-shadow:none!important}
.lr-native-interactive>.lr-symbol{background:#E8F0FB!important;color:#31587d!important}
.lr-native-interactive>.btn{background:#B80B38!important;color:#fff!important;min-height:48px;white-space:normal;overflow-wrap:anywhere}
@media(min-width:900px){#mbi-root .mbi-shell{height:calc(100dvh - 32px);margin:16px 0;border-radius:20px;overflow:hidden;box-shadow:0 8px 40px #24313f14}}
@media(max-width:420px){#mbi-root .mbi-main{padding:14px;gap:13px}#mbi-root .mbi-question,#mbi-root .mbi-situation{padding:14px}#mbi-root .mbi-activity{padding:13px}#mbi-root .mbi-footer{padding-inline:12px}#mbi-root .mbi-button{padding:10px 11px;font-size:14px}#mbi-root .mbi-overview-numbers small,#mbi-root .mbi-stats small{font-size:11px}}
@media(max-height:480px){#mbi-root .mbi-header{min-height:48px;padding-block:5px}#mbi-root .mbi-main{padding-block:10px;gap:9px}#mbi-root .mbi-footer{padding-block:6px}#mbi-root .mbi-button{min-height:44px}}
@media(prefers-reduced-motion:reduce){#mbi-root *,#mbi-root *::before,#mbi-root *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* MonAvenir — pédagogique */
#mbi-root .mbi-source,.lr-native-interactive .mbi-source{display:block;margin-block:4px;color:#28614a!important;font-size:12px;font-weight:650;white-space:normal;overflow-wrap:anywhere}
#mbi-root .mbi-exercise-head .mbi-source{display:inline-block;padding:5px 9px;border-radius:8px;background:#e7f4ec;color:#245b41!important}
#mbi-root .mbi-instructions{margin-top:10px;color:var(--mb-ink,#263343);font-size:14px}#mbi-root .mbi-instructions summary{cursor:pointer;font-weight:600;color:#31587d}
#mbi-root .mbi-feedback{white-space:pre-line;overflow-wrap:anywhere}
#mbi-root .mbi-notice p{overflow-wrap:anywhere}

/* MonAvenir — facture DOIT responsive, sans débordement horizontal. */
#mbi-root [data-facture] .mbi-header{min-height:48px;padding:5px 12px;padding-top:max(5px,env(safe-area-inset-top))}
#mbi-root [data-facture] .mbi-header strong{font-size:15px}
#mbi-root [data-facture] .mbi-header small{font-size:11px}
#mbi-root [data-facture] .mbi-main{padding:8px clamp(8px,2.5vw,22px);gap:6px}
#mbi-root .mbi-facture{display:grid;gap:6px;width:100%;min-width:0;font-variant-numeric:tabular-nums}
#mbi-root .fact-top small{font-size:11px;font-weight:700;color:#476781}
#mbi-root .fact-top h2{font-size:clamp(17px,4vw,23px);line-height:1.25;margin:2px 0 6px}
#mbi-root .fact-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:6px}
#mbi-root .fact-steps span{font-size:clamp(10px,2.8vw,13px);text-align:center;padding:5px 2px;border-radius:7px;background:#e8edf3;color:#476079;font-weight:700;white-space:normal}
#mbi-root .fact-steps .current{background:#dceafe;color:#164b89}
#mbi-root .fact-steps .done{background:#def3e6;color:#247041}
#mbi-root .fact-progress{height:5px;border-radius:5px;background:#e4e9ed;overflow:hidden}
#mbi-root .fact-progress span{display:block;height:100%;background:#2c8a5a;transition:width .15s}
#mbi-root .fact-meta{display:flex;justify-content:space-between;color:#4c6276;font-size:10px;margin-top:3px}
#mbi-root .fact-instruction{font-size:12px;line-height:1.35;margin:0}
#mbi-root .fact-paper{overflow:hidden;min-width:0;border:1px solid #d4e0ed;border-radius:9px;background:white}
#mbi-root .fact-doc-head{display:flex;gap:5px;justify-content:space-between;align-items:center;padding:6px 8px;background:#eef5fd;color:#204d7b}
#mbi-root .fact-doc-head strong{font-size:13px}
#mbi-root .fact-doc-head span{font-size:10px;text-align:end;line-height:1.2}
#mbi-root .fact-party,#mbi-root .fact-givens{font-size:11px;padding:3px 7px;line-height:1.2;color:#41576c}
#mbi-root .fact-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px;line-height:1.15;direction:ltr}
#mbi-root .fact-table th,#mbi-root .fact-table td{border:1px solid #e0e7ee;padding:2px 5px;vertical-align:middle;text-align:start;font-weight:500;overflow-wrap:anywhere}
#mbi-root .fact-table thead th{background:#e8f0fb;color:#234c75;font-size:11px;font-weight:700}
#mbi-root .fact-table:not(.fact-journal) th:first-child{width:56%}
#mbi-root .fact-table .fact-subtotal{background:#f1f6fa;font-weight:700}
#mbi-root .fact-table .fact-subtotal:last-child{background:#e1f1e6;color:#205e3c}
#mbi-root .fact-input{width:100%;min-width:0;box-sizing:border-box;height:28px;min-height:28px;border:1px solid #bfcfdf;border-radius:5px;background:#fff;color:#183e61;padding:2px 4px;text-align:end;font-size:13px;font-family:inherit;outline:none;box-shadow:none}
#mbi-root .fact-input.fact-active,#mbi-root .fact-input:focus{border:2px solid #377bc6;background:#f0f6ff}
#mbi-root .fact-input.fact-good{color:#22683f;border-color:#78ba91;background:#f0fbf3}
#mbi-root .fact-input.fact-wrong{border-color:#bd852c;background:#fff7e6}
#mbi-root .fact-journal th,#mbi-root .fact-journal td{padding:3px 2px;text-align:center;font-size:clamp(9px,2.55vw,12px)}
#mbi-root .fact-journal tbody th{text-align:left}
#mbi-root .fact-journal .fact-input{text-align:center;font-size:clamp(10px,3vw,13px);padding:1px;height:34px}
#mbi-root .fact-journal tfoot td{font-weight:700;background:#e7f3eb;color:#245e3e;white-space:nowrap}
#mbi-root .fact-journal .fact-date{font-size:10px;font-weight:700;white-space:nowrap}
#mbi-root .fact-feedback{border:1px solid #d4e2f3;border-radius:9px;background:#eef5fd;padding:6px 8px;font-size:12px;line-height:1.35;color:#234a70}
#mbi-root .fact-feedback strong{display:block;font-size:12px;margin-bottom:2px}
#mbi-root .fact-feedback .success,#mbi-root .fact-feedback .retry{padding:5px 6px;margin-top:4px;border-radius:6px;background:#e0f3e6;color:#235e3c}
#mbi-root .fact-feedback .retry{background:#fff1d7;color:#79511a}
#mbi-root [data-facture] .mbi-footer{padding:6px 8px;padding-bottom:max(6px,env(safe-area-inset-bottom));gap:5px}
#mbi-root [data-facture] .mbi-footer .mbi-button{min-width:0;min-height:39px;font-size:12px;padding:6px 5px;flex:1;white-space:normal}
#mbi-root [data-facture] .mbi-footer .mbi-primary{background:#246eb5;color:white;border-color:#246eb5;flex:1.25}
@media(min-width:700px){#mbi-root .mbi-facture{gap:12px}#mbi-root .fact-input{height:36px;font-size:15px}#mbi-root .fact-table th,#mbi-root .fact-table td{padding:4px 9px;font-size:14px}#mbi-root .fact-feedback{padding:12px;font-size:14px}}
@media(max-height:720px) and (max-width:600px){#mbi-root .fact-table:not(.fact-journal) th,#mbi-root .fact-table:not(.fact-journal) td{padding-top:1px;padding-bottom:1px}#mbi-root .fact-input{height:25px;min-height:25px}#mbi-root .fact-feedback{font-size:11px}}
