/* MATH-TEEK Laboratoire */
.mtl-fig { margin: 0; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 4px 6px -1px rgba(15, 44, 89, .06), 0 10px 24px -6px rgba(15, 44, 89, .12); overflow: hidden; }
.mtl-fig__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.mtl-fig__head strong { color: #0f2c59; font-size: 1.02rem; }
.mtl-fig__tag { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #2563eb; background: rgba(37, 99, 235, .1); padding: 4px 10px; border-radius: 999px; }
.mtl-fig__body { padding: 14px; }
.mtl-fig figcaption { padding: 4px 18px 18px; color: #64748b; font-size: .94rem; }
.mtl-fig figcaption p { margin: 0 0 .6em; }

.mtl { width: 100%; }
.mtl-box { position: relative; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.mtl-canvas { display: block; width: 100%; touch-action: pan-y; }
.mtl-readout { margin-top: 10px; padding: 10px 14px; background: #f1f5f9; border-radius: 10px; font: 600 13px/1.6 system-ui, sans-serif; color: #0f2c59; min-height: 2.6em; }
.mtl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 12px; }
.mtl-slider { display: flex; align-items: center; gap: 10px; font: 700 13px system-ui, sans-serif; color: #0f2c59; flex: 1 1 220px; min-width: 200px; }
.mtl-slider input[type="range"] { flex: 1; accent-color: #2563eb; min-width: 90px; }
.mtl-slider output { min-width: 3.2em; text-align: right; color: #64748b; font-variant-numeric: tabular-nums; }
.mtl-btn { font: 700 13px system-ui, sans-serif; padding: 9px 16px; border-radius: 10px; border: 0; cursor: pointer; background: #2563eb; color: #fff; }
.mtl-btn:hover { background: #1d4ed8; }
.mtl-btn--ghost { background: #fff; color: #0f2c59; border: 1px solid #e2e8f0; }
.mtl-btn--ghost:hover { background: #f1f5f9; }
.mtl-err { position: absolute; left: 10px; top: 10px; right: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(239, 68, 68, .1); color: #b91c1c; font: 600 13px system-ui, sans-serif; z-index: 2; }
.mtl-frame { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.mtl-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Admin */
#mtl-preview-wrap { background: #f8fafc; border: 1px solid #dcdcde; border-radius: 10px; padding: 12px; margin-bottom: 14px; }
#mtl-preview-wrap h4 { margin: 0 0 8px; }
#mtl-editor .mtl-group { border-top: 1px solid #dcdcde; padding-top: 10px; margin-top: 12px; }
#mtl-editor .mtl-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 8px 0; }
#mtl-editor .mtl-row label { display: flex; flex-direction: column; font-weight: 600; font-size: 12px; gap: 3px; }
#mtl-editor .mtl-row input[type="text"], #mtl-editor .mtl-row input[type="number"], #mtl-editor .mtl-row select { min-width: 90px; }
#mtl-editor .mtl-row .wide { flex: 1 1 320px; }
#mtl-editor .mtl-row .wide input { width: 100%; }
#mtl-editor textarea { width: 100%; font-family: Consolas, monospace; }

/* Lab brut + exercices liés (vue élève) */
.mtc-lab { margin: 22px 0; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 6px -1px rgba(15,44,89,.06), 0 10px 24px -6px rgba(15,44,89,.12); }
.mtc-lab__head { padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.mtc-lab__frame { display: block; width: 100%; border: 0; background: #fff; }
.mtc-exos { margin: 28px 0; }
.mtc-exos h2 { color: #0f2c59; font-size: 1.3rem; margin: 0 0 14px; }
.mtc-exos__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mtc-exos__list a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #0f2c59; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.mtc-exos__list a:hover { border-color: #2563eb; box-shadow: 0 6px 16px rgba(37,99,235,.12); }
.mtc-exos__d { font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(37,99,235,.1); color: #2563eb; }
.mtc-exos__d--easy { background: rgba(16,185,129,.12); color: #059669; }
.mtc-exos__d--hard { background: rgba(239,68,68,.1); color: #dc2626; }
.mtc-exos__go { margin-left: auto; font-size: .86rem; font-weight: 700; color: #2563eb; }
.mtc-lesson__title { color: #0f2c59; }
