/* MathsTD — application Classe & Correction (enseignant). Préfixe mtdcx-. Palette « application » : encre, indigo → violet,
   une couleur par état. Aucune couleur orange, aucun emoji, police du site (Calisto MT). */
html body.mtdcx-page { background: #EEF1F7 !important; }
body.mtdcx-page .site-main, body.mtdcx-page .page-content, body.mtdcx-page main { max-width: none !important; padding: 0 !important; margin: 0 !important; }
body.mtdcx-page .page-header, body.mtdcx-page .entry-title { display: none !important; }

.mtdcx {
  --ink: #0F172A; --ink2: #1E293B; --muted: #64748B; --line: #E2E8F0; --line2: #CBD5E1; --bg: #EEF1F7; --card: #fff;
  --ind: #4F46E5; --ind2: #6366F1; --ind-bg: #EEF2FF; --vio: #7C3AED;
  --grn: #059669; --grn-bg: #ECFDF5; --red: #DC2626; --red-bg: #FEF2F2; --gold: #CA8A04; --gold-bg: #FEFCE8; --sky: #0284C7; --sky-bg: #F0F9FF;
  --r: 16px; --sh: 0 1px 2px rgba(15,23,42,.05), 0 6px 20px rgba(15,23,42,.06); --sh2: 0 12px 40px rgba(15,23,42,.14);
  font-family: 'Calisto MT', 'Bookman Old Style', Georgia, serif; color: var(--ink); font-size: 16px; line-height: 1.45;
  max-width: 1240px; margin: 0 auto; padding: 18px 16px 90px; box-sizing: border-box;
}
.mtdcx *, .mtdcx *::before, .mtdcx *::after { box-sizing: border-box; }
.mtdcx svg { flex: none; }
.mtdcx a { color: var(--ind); text-decoration: none; }
.mtdcx h1, .mtdcx h2, .mtdcx h3 { font-family: inherit; color: var(--ink); margin: 0; line-height: 1.2; }
.mtdcx p { margin: 0; }
.mtdcx [hidden] { display: none !important; }

/* Chargement, états vides, erreurs */
.mtdcx-boot { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.mtdcx-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #C7D2FE; border-top-color: var(--ind); animation: mtdcx-rot .8s linear infinite; }
@keyframes mtdcx-rot { to { transform: rotate(360deg); } }
.mtdcx-skel { background: linear-gradient(90deg, #E9EDF5 0%, #F6F8FC 50%, #E9EDF5 100%); background-size: 200% 100%; animation: mtdcx-sk 1.2s ease-in-out infinite; border-radius: 12px; }
@keyframes mtdcx-sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.mtdcx-empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.mtdcx-empty .mtdcx-empty-ico { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--ind-bg); color: var(--ind); }
.mtdcx-empty h3 { font-size: 1.05rem; margin-bottom: 6px; }
.mtdcx-error { background: var(--red-bg); color: #7F1D1D; border: 1px solid #FECACA; border-radius: 14px; padding: 18px; }

/* Boutons */
.mtdcx button { font: inherit; }
html body .mtdcx .mtdcx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 12px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink); font-weight: 700; font-size: .92rem; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s; text-decoration: none; white-space: nowrap; }
html body .mtdcx .mtdcx-btn:hover { box-shadow: var(--sh); transform: translateY(-1px); color: var(--ink); }
html body .mtdcx .mtdcx-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
html body .mtdcx .mtdcx-btn.pri { background: linear-gradient(135deg, var(--ind), var(--vio)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(79,70,229,.28); }
html body .mtdcx .mtdcx-btn.pri:hover { color: #fff; }
html body .mtdcx .mtdcx-btn.gold { background: linear-gradient(135deg, #FDE68A, #FCD34D); color: var(--ink); border-color: transparent; }
html body .mtdcx .mtdcx-btn.ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
html body .mtdcx .mtdcx-btn.ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
html body .mtdcx .mtdcx-btn.sm { min-height: 34px; padding: 6px 12px; font-size: .84rem; border-radius: 10px; }
html body .mtdcx .mtdcx-btn.grn { background: var(--grn); color: #fff; border-color: transparent; }
html body .mtdcx .mtdcx-icon-btn { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink2); cursor: pointer; }
html body .mtdcx .mtdcx-icon-btn:hover { border-color: var(--ind); color: var(--ind); }

/* Chips */
.mtdcx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #F1F5F9; color: var(--ink2); white-space: nowrap; }
.mtdcx-chip.ind { background: var(--ind-bg); color: #3730A3; } .mtdcx-chip.grn { background: var(--grn-bg); color: #065F46; }
.mtdcx-chip.red { background: var(--red-bg); color: #991B1B; } .mtdcx-chip.gold { background: var(--gold-bg); color: #854D0E; } .mtdcx-chip.sky { background: var(--sky-bg); color: #075985; }
.mtdcx-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--line2); }
.mtdcx-dot.ind { background: var(--ind); } .mtdcx-dot.grn { background: var(--grn); } .mtdcx-dot.red { background: var(--red); } .mtdcx-dot.gold { background: var(--gold); }

/* Héro de classe */
.mtdcx-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 22px 20px; color: #fff; background:
  radial-gradient(1200px 300px at 110% -20%, rgba(255,255,255,.22), transparent 60%), linear-gradient(135deg, #4338CA 0%, #6D28D9 55%, #7C3AED 100%); box-shadow: 0 18px 50px rgba(79,70,229,.30); }
.mtdcx-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.07); }
.mtdcx-crumbs { display: flex; gap: 8px; align-items: center; font-size: .82rem; opacity: .85; margin-bottom: 10px; flex-wrap: wrap; }
.mtdcx-crumbs a { color: #E0E7FF !important; }
.mtdcx-hero-top { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; position: relative; z-index: 1; }
.mtdcx-hero h1 { color: #fff !important; font-size: clamp(1.6rem, 4.4vw, 2.3rem); letter-spacing: -.01em; }
.mtdcx-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mtdcx-hero-meta .mtdcx-chip { background: rgba(255,255,255,.16); color: #fff; }
html body .mtdcx .mtdcx-code { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: rgba(15,23,42,.28); color: #FDE68A; font-weight: 800; letter-spacing: .12em; border: 1px dashed rgba(253,230,138,.6); cursor: pointer; }
.mtdcx-code span { font-size: .72rem; letter-spacing: 0; color: #fff; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.mtdcx-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Chiffres clés */
.mtdcx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 6px; }
.mtdcx-kpi { background: var(--card); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); border: 1px solid #fff; display: flex; gap: 12px; align-items: center; min-width: 0; }
html body .mtdcx button.mtdcx-kpi, html body .mtdcx button.mtdcx-kpi:hover, html body .mtdcx button.mtdcx-kpi:focus { text-align: left; cursor: pointer; font: inherit; color: var(--ink); background: var(--card); border: 1px solid #fff; box-shadow: var(--sh); }
html body .mtdcx button.mtdcx-kpi:hover { border-color: #C7D2FE; transform: translateY(-1px); }
html body .mtdcx button.mtdcx-kpi.hot { background: linear-gradient(135deg, #EEF2FF, #F5F3FF); border-color: #C7D2FE; }
html body .mtdcx button:focus-visible, html body .mtdcx a:focus-visible { outline: 3px solid rgba(79,70,229,.45); outline-offset: 2px; }
.mtdcx-kpi-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--ind-bg); color: var(--ind); }
.mtdcx-kpi-ico.grn { background: var(--grn-bg); color: var(--grn); } .mtdcx-kpi-ico.gold { background: var(--gold-bg); color: var(--gold); } .mtdcx-kpi-ico.sky { background: var(--sky-bg); color: var(--sky); }
.mtdcx-kpi b { display: block; font-size: 1.5rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mtdcx-kpi small { color: var(--muted); font-size: .8rem; }
.mtdcx-kpi.hot { background: linear-gradient(135deg, #EEF2FF, #F5F3FF); border-color: #C7D2FE; }

/* Onglets */
.mtdcx-tabs { position: sticky; top: 0; z-index: 30; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 14px; padding: 10px 16px; background: rgba(238,241,247,.92); backdrop-filter: blur(8px); }
.mtdcx-tabs::-webkit-scrollbar { display: none; }
html body .mtdcx .mtdcx-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap; }
html body .mtdcx .mtdcx-tab:hover { background: #fff; color: var(--ink); }
html body .mtdcx .mtdcx-tab.on { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(15,23,42,.18); }
.mtdcx-tab .mtdcx-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: .72rem; background: var(--ind-bg); color: #3730A3; }
.mtdcx-tab.on .mtdcx-count { background: rgba(255,255,255,.2); color: #fff; }

/* Cartes et grilles */
.mtdcx-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mtdcx-card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; min-width: 0; }
.mtdcx-card + .mtdcx-card { margin-top: 16px; }
.mtdcx-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mtdcx-card-h h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.mtdcx-card-h h2 .mtdcx-chip { font-size: .72rem; }
.mtdcx-sub { color: var(--muted); font-size: .86rem; }

/* File de correction (vue d'ensemble) */
.mtdcx-queue { display: grid; gap: 10px; }
.mtdcx-q { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(90deg, #F8FAFF, #fff); }
.mtdcx-q-n { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--ind); color: #fff; font-weight: 800; font-size: 1.1rem; }
.mtdcx-q-b { flex: 1; min-width: 0; }
.mtdcx-q-b b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtdcx-timeline { display: grid; gap: 0; position: relative; }
.mtdcx-tl { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.mtdcx-tl-d { text-align: center; border-radius: 12px; background: var(--ind-bg); color: #3730A3; padding: 6px 0; line-height: 1.05; }
.mtdcx-tl-d b { display: block; font-size: 1.2rem; } .mtdcx-tl-d small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.mtdcx-person { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F1F5F9; }
.mtdcx-person:last-child { border-bottom: 0; }
.mtdcx-av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .86rem; color: #fff; background: linear-gradient(135deg, var(--ind2), var(--vio)); text-transform: uppercase; }
.mtdcx-person-b { flex: 1; min-width: 0; } .mtdcx-person-b b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtdcx-feed { display: grid; gap: 2px; }
.mtdcx-feed-i { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: .9rem; }
.mtdcx-feed-i .mtdcx-dot { margin-top: 6px; }

/* Barre d'outils des listes */
.mtdcx-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.mtdcx-seg { display: inline-flex; background: #fff; border-radius: 13px; padding: 4px; box-shadow: var(--sh); gap: 2px; overflow-x: auto; max-width: 100%; }
html body .mtdcx .mtdcx-seg button { border: 0; background: transparent; padding: 8px 12px; border-radius: 10px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; }
html body .mtdcx .mtdcx-seg button.on { background: var(--ind-bg); color: #3730A3; }
.mtdcx-seg em { font-style: normal; font-size: .74rem; background: #F1F5F9; border-radius: 999px; padding: 1px 7px; }
.mtdcx-search { flex: 1; min-width: 180px; position: relative; }
.mtdcx-search input, .mtdcx select, .mtdcx-input, .mtdcx textarea { width: 100%; font: inherit; font-size: .95rem; padding: 10px 12px 10px 38px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; color: var(--ink); outline: none; }
.mtdcx select, .mtdcx-input, .mtdcx textarea { padding-left: 12px; }
.mtdcx-search input:focus, .mtdcx select:focus, .mtdcx-input:focus, .mtdcx textarea:focus { border-color: var(--ind); box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
.mtdcx-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* Liste des devoirs */
.mtdcx-month { margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; user-select: none; }
.mtdcx-month::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.mtdcx-month svg { transition: transform .15s; } .mtdcx-month.shut svg { transform: rotate(-90deg); }
.mtdcx-dv { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 14px 14px 14px 0; box-shadow: var(--sh); margin-bottom: 10px; overflow: hidden; }
.mtdcx-dv-bar { align-self: stretch; border-radius: 0 6px 6px 0; background: var(--line2); }
.mtdcx-dv.a_corriger .mtdcx-dv-bar { background: linear-gradient(var(--ind), var(--vio)); } .mtdcx-dv.en_cours .mtdcx-dv-bar { background: var(--sky); } .mtdcx-dv.termines .mtdcx-dv-bar { background: var(--grn); }
.mtdcx-dv h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mtdcx-dv-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; margin-top: 4px; }
.mtdcx-dv-meta span { display: inline-flex; gap: 5px; align-items: center; }
.mtdcx-dv-ex { color: var(--muted); font-size: .86rem; margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.mtdcx-stack { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: #EEF1F7; margin-top: 10px; max-width: 460px; }
.mtdcx-stack i { display: block; height: 100%; } .mtdcx-stack .g { background: var(--grn); } .mtdcx-stack .i { background: var(--ind); } .mtdcx-stack .m { background: #E2E8F0; }
.mtdcx-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.mtdcx-legend span { display: inline-flex; gap: 5px; align-items: center; }
.mtdcx-dv-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.mtdcx-more { display: flex; justify-content: center; margin-top: 8px; }

/* Tableau élèves */
.mtdcx-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 0 !important; margin: 0; }
html body .mtdcx .mtdcx-table th, html body .mtdcx .mtdcx-table td { border-top: 0; border-left: 0; border-right: 0; background: #fff; }
html body .mtdcx .mtdcx-table tbody tr:nth-child(odd) td, html body .mtdcx .mtdcx-table tbody tr:nth-child(even) td { background: #fff; }
html body .mtdcx .mtdcx-table tbody tr:hover td { background: #FAFBFF; }
.mtdcx-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; cursor: pointer; white-space: nowrap; }
.mtdcx-table td { padding: 11px 12px; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
.mtdcx-table tr:hover td { background: #FAFBFF; }
.mtdcx-tablewrap { overflow-x: auto; }
.mtdcx-bar { height: 7px; border-radius: 999px; background: #EEF1F7; overflow: hidden; min-width: 70px; }
.mtdcx-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ind2), var(--vio)); }

/* Feuilles (partage, modification) */
.mtdcx-sheet-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 99990; display: flex; align-items: flex-end; justify-content: center; animation: mtdcx-fade .15s; }
@keyframes mtdcx-fade { from { opacity: 0; } }
.mtdcx-sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 20px; box-shadow: var(--sh2); animation: mtdcx-up .2s ease-out; max-height: 88vh; overflow: auto; }
@keyframes mtdcx-up { from { transform: translateY(24px); opacity: .6; } }
.mtdcx-sheet h3 { font-size: 1.15rem; margin-bottom: 4px; }
.mtdcx-field { display: grid; gap: 6px; margin-top: 14px; } .mtdcx-field label { font-weight: 700; font-size: .88rem; }
.mtdcx-copyrow { display: flex; gap: 8px; } .mtdcx-copyrow .mtdcx-input { flex: 1; }
.mtdcx-bigcode { font-size: 2rem; font-weight: 800; letter-spacing: .2em; text-align: center; padding: 16px; border-radius: 16px; background: var(--ind-bg); color: #3730A3; margin-top: 12px; }
@media (min-width: 700px) { .mtdcx-sheet-bg { align-items: center; } .mtdcx-sheet { border-radius: 22px; } }

.mtdcx-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 99999; box-shadow: var(--sh2); font-weight: 700; font-size: .92rem; animation: mtdcx-up .2s; max-width: calc(100% - 32px); }
.mtdcx-toast.bad { background: var(--red); }

/* Ressources, programme, groupes */
.mtdcx-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mtdcx-res a, .mtdcx-res div.mtdcx-res-i { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.mtdcx-res a:hover { border-color: var(--ind); }
.mtdcx-lesson { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #F1F5F9; }
.mtdcx-lesson:last-child { border-bottom: 0; }
.mtdcx-svgchart { width: 100%; height: auto; display: block; }

/* ─────────────── Page Correction ─────────────── */
.mtdcx.corr { max-width: none; padding: 0 0 40px; }
.mtdcx-cbar { position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; padding: 12px 18px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; box-shadow: 0 8px 24px rgba(15,23,42,.25); }
.mtdcx-cbar a.back { color: #C7D2FE !important; display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: .88rem; }
.mtdcx-cbar h1 { color: #fff !important; font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.mtdcx-cbar .mtdcx-sub { color: #A5B4FC; }
.mtdcx-cprog { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: .86rem; }
.mtdcx-cprog .mtdcx-bar { width: 140px; background: rgba(255,255,255,.14); } .mtdcx-cprog .mtdcx-bar i { background: linear-gradient(90deg, #34D399, #10B981); }
.mtdcx-mode { display: inline-flex; background: rgba(255,255,255,.1); border-radius: 12px; padding: 3px; }
html body .mtdcx .mtdcx-mode button { border: 0; background: transparent; color: #C7D2FE; padding: 7px 12px; border-radius: 9px; font-weight: 700; cursor: pointer; font-size: .86rem; display: inline-flex; gap: 6px; align-items: center; }
html body .mtdcx .mtdcx-mode button.on { background: #fff; color: var(--ink); }

.mtdcx-cwrap { display: grid; grid-template-columns: 280px minmax(0, 1fr) 360px; gap: 16px; padding: 16px 18px; align-items: start; max-width: 1560px; margin: 0 auto; }
.mtdcx-rail, .mtdcx-panel { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
.mtdcx-rail { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 12px; }
.mtdcx-rail .mtdcx-seg { box-shadow: none; background: #F1F5F9; width: 100%; display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
html body .mtdcx .mtdcx-rail .mtdcx-seg button { justify-content: space-between; padding: 7px 9px; font-size: .82rem; }
.mtdcx-stu { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink); font: inherit; margin-top: 4px; }
.mtdcx-stu:hover { background: #F8FAFF; }
.mtdcx-stu.on { background: var(--ind-bg); border-color: #C7D2FE; }
.mtdcx-stu .mtdcx-av { width: 32px; height: 32px; border-radius: 10px; font-size: .78rem; }
.mtdcx-stu-b { flex: 1; min-width: 0; } .mtdcx-stu-b b { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtdcx-stu-b small { color: var(--muted); font-size: .76rem; }
.mtdcx-stu-s { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9rem; }
.mtdcx-stu.none { opacity: .55; }

.mtdcx-paper { background: #fff; border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.mtdcx-paper-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mtdcx-paper-h h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.mtdcx-enonce { background: #F8FAFF; border-bottom: 1px solid var(--line); }
html body .mtdcx .mtdcx-enonce summary { cursor: pointer; padding: 10px 16px; font-weight: 700; color: #3730A3; list-style: none; display: flex; gap: 8px; align-items: center; }
.mtdcx-enonce summary::-webkit-details-marker { display: none; }
.mtdcx-enonce-b { padding: 0 16px 14px; white-space: pre-wrap; font-size: .95rem; }
.mtdcx-pages { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #FBFCFE; }
html body .mtdcx .mtdcx-pg { width: 58px; height: 74px; border-radius: 10px; border: 2px solid var(--line); background: #fff center/cover no-repeat; cursor: pointer; flex: none; position: relative; padding: 0; }
.mtdcx-pg.on { border-color: var(--ind); box-shadow: 0 0 0 3px rgba(79,70,229,.18); }
.mtdcx-pg span { position: absolute; right: 4px; bottom: 4px; background: var(--ink); color: #fff; font-size: .66rem; border-radius: 6px; padding: 1px 5px; }
.mtdcx-stage { padding: 14px; background: repeating-linear-gradient(45deg, #F4F6FB, #F4F6FB 12px, #EEF1F7 12px, #EEF1F7 24px); min-height: 320px; }
.mtdcx-stage-in { margin: 0 auto; background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.12); border-radius: 10px; overflow: hidden; }
.mtdcx-zoom { display: inline-flex; gap: 4px; align-items: center; }
.mtdcx-answer { padding: 16px; border-top: 1px solid var(--line); white-space: pre-wrap; }
.mtdcx-answer h4 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.mtdcx-panel { display: grid; gap: 14px; }
.mtdcx-score { background: linear-gradient(160deg, #1E1B4B, #312E81 60%, #4C1D95); color: #fff; border-radius: 20px; padding: 18px; box-shadow: var(--sh2); }
.mtdcx-score label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #C7D2FE; font-weight: 700; }
.mtdcx-score-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px 0 10px; }
html body .mtdcx .mtdcx-score-row button { width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.mtdcx-score-row input { width: 110px; text-align: center; font-size: 2.6rem; font-weight: 800; background: transparent; border: 0; color: #fff; font-family: inherit; outline: none; font-variant-numeric: tabular-nums; }
.mtdcx-score-row .of { font-size: 1.2rem; color: #A5B4FC; font-weight: 700; }
.mtdcx-score input[type=range] { width: 100%; accent-color: #A5B4FC; }
.mtdcx-quick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
html body .mtdcx .mtdcx-quick button { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #E0E7FF; border-radius: 10px; padding: 4px 9px; cursor: pointer; font-weight: 700; font-size: .82rem; }
html body .mtdcx .mtdcx-quick button:hover { background: rgba(255,255,255,.12); }
.mtdcx-mention { text-align: center; font-weight: 800; color: #FDE68A; margin-top: 6px; min-height: 1.2em; }
.mtdcx-fb textarea { min-height: 140px; resize: vertical; }
.mtdcx-bank { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
html body .mtdcx .mtdcx-bank button { border: 1px solid #C7D2FE; background: var(--ind-bg); color: #3730A3; border-radius: 999px; padding: 5px 11px; font-size: .8rem; font-weight: 700; cursor: pointer; }
html body .mtdcx .mtdcx-bank button:hover { background: #E0E7FF; }
.mtdcx-save { display: grid; gap: 8px; }
.mtdcx-saved { font-size: .82rem; color: var(--muted); text-align: center; min-height: 1.2em; }
.mtdcx-kbd { font-size: .74rem; color: var(--muted); text-align: center; }
.mtdcx-kbd kbd { border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; font-family: inherit; background: #fff; }
.mtdcx-hist { display: flex; align-items: flex-end; gap: 4px; height: 70px; margin-top: 8px; }
.mtdcx-hist div { flex: 1; background: linear-gradient(var(--ind2), var(--vio)); border-radius: 5px 5px 2px 2px; min-height: 3px; position: relative; }
.mtdcx-hist-l { display: flex; gap: 4px; font-size: .66rem; color: var(--muted); } .mtdcx-hist-l span { flex: 1; text-align: center; }

/* Grille de notes */
.mtdcx-gridwrap { max-width: 1240px; margin: 0 auto; padding: 16px 18px; }
.mtdcx-gtable td { vertical-align: top; }
.mtdcx-gtable input.note { width: 84px; text-align: center; font-weight: 800; font-size: 1.05rem; padding: 8px; }
.mtdcx-gtable input.note.dirty, .mtdcx-gtable textarea.dirty { border-color: var(--ind); background: #F5F7FF; }
.mtdcx-gtable textarea { min-height: 42px; padding: 8px 10px; font-size: .9rem; }
.mtdcx-gtable tr.nosub td { color: var(--muted); }
.mtdcx-gsum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.mtdcx-savebar { position: sticky; bottom: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px; box-shadow: var(--sh2); margin-top: 14px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1180px) {
  .mtdcx-cwrap { grid-template-columns: 240px minmax(0, 1fr); }
  .mtdcx-panel { grid-column: 2; position: static; max-height: none; }
}
@media (max-width: 900px) {
  .mtdcx-grid { grid-template-columns: minmax(0, 1fr); }
  .mtdcx-kpis, .mtdcx-gsum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mtdcx-cwrap { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .mtdcx-rail { position: static; max-height: 260px; }
  .mtdcx-panel { grid-column: auto; }
  .mtdcx-cbar { position: static; }
  .mtdcx-cbar h1 { max-width: 70vw; }
  .mtdcx-cprog { margin-left: 0; width: 100%; }
  .mtdcx-cprog .mtdcx-bar { flex: 1; }
}
@media (max-width: 640px) {
  .mtdcx { padding: 12px 12px 90px; }
  .mtdcx-hero { padding: 18px 16px; border-radius: 20px; }
  .mtdcx-dv { grid-template-columns: 5px minmax(0, 1fr); }
  .mtdcx-dv-act { grid-column: 2; justify-content: flex-start; }
  .mtdcx-kpi { padding: 12px; } .mtdcx-kpi-ico { width: 38px; height: 38px; }
  .mtdcx-table.cards thead { display: none; }
  .mtdcx-table.cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mtdcx-table.cards td { border: 0; padding: 2px 0; }
  .mtdcx-table.cards td[data-l]::before { content: attr(data-l) ' : '; color: var(--muted); font-size: .78rem; }
  .mtdcx-gtable input.note { width: 70px; }
}

/* ─────────────── Page élève ─────────────── */
.mtdcx-score-pill { display: inline-flex; align-items: baseline; gap: 2px; color: #fff; font-weight: 800; font-size: 1.15rem; padding: 6px 12px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.mtdcx-score-pill small { font-size: .72rem; opacity: .85; }
html body .mtdcx .mtdcx-drop { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed #A5B4FC; border-radius: 18px; background: linear-gradient(160deg, #F5F7FF, #FAF5FF); color: #3730A3; cursor: pointer; transition: background .15s, border-color .15s; }
.mtdcx-drop:hover, .mtdcx-drop.on { background: #EEF2FF; border-color: var(--ind); }
.mtdcx-drop b { font-size: 1.05rem; } .mtdcx-drop span { color: var(--muted); font-size: .84rem; }
.mtdcx-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.mtdcx-thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: #F1F5F9; border: 1px solid var(--line); }
.mtdcx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mtdcx-thumb b { position: absolute; left: 6px; top: 6px; background: var(--ink); color: #fff; font-size: .72rem; border-radius: 7px; padding: 1px 7px; }
.mtdcx-thumb-pdf { height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--ind); font-weight: 800; }
.mtdcx-thumb-a { position: absolute; right: 5px; top: 5px; display: flex; gap: 4px; }
html body .mtdcx .mtdcx-thumb-a button { width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(15,23,42,.72); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mtdcx-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
html body .mtdcx .mtdcx-keys button { min-width: 38px; height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--ink); font-size: 1rem; cursor: pointer; padding: 0 8px; }
html body .mtdcx .mtdcx-keys button:hover { border-color: var(--ind); color: var(--ind); }
.mtdcx-progress { height: 6px; border-radius: 999px; background: #EEF1F7; overflow: hidden; margin-top: 10px; }
.mtdcx-progress i { display: block; height: 100%; width: 5%; background: linear-gradient(90deg, var(--ind), var(--vio)); transition: width .4s; }
.mtdcx-hero-meta .mtdcx-chip.red { background: #FEE2E2; color: #991B1B; }
.mtdcx-hero-meta .mtdcx-chip.grn { background: #D1FAE5; color: #065F46; }
.mtdcx-hero-meta .mtdcx-chip.sky { background: #E0F2FE; color: #075985; }
.mtdcx-hero-meta .mtdcx-chip.ind { background: #E0E7FF; color: #3730A3; }
#mtdcx-main > * + *, #mtdcx-side > * + *, #mtdcx-form { margin-top: 16px; }

/* Outils de la copie : stylo / main, annotations, zoom, rotation, plein écran */
.mtdcx-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 66px; z-index: 5; }
.mtdcx-tgrp { display: inline-flex; gap: 2px; background: #F1F5F9; border-radius: 12px; padding: 3px; }
html body .mtdcx .mtdcx-tb { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border-radius: 10px; border: 0; background: transparent; color: var(--ink2); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
html body .mtdcx .mtdcx-tb:hover { background: #fff; color: var(--ind); }
html body .mtdcx .mtdcx-tb.on { background: var(--ink); color: #fff; }
html body .mtdcx .mtdcx-tb:disabled { opacity: .5; }
.mtdcx-stage { overflow: auto; max-height: 78vh; overscroll-behavior: contain; }
.mtdcx-stage.hand { cursor: grab; touch-action: pan-x pan-y pinch-zoom; }
.mtdcx-stage.hand.grabbing { cursor: grabbing; user-select: none; }
.mtdcx-stage.hand canvas { cursor: grab !important; }
.mtdcx-pdf { display: block; width: 100%; height: 76vh; border: 0; background: #fff; }
html body .mtdcx .mtdcx-pg-pdf { display: grid; place-items: center; font-weight: 800; color: var(--ind); background: var(--ind-bg); font-size: .8rem; }
.mtdcx.corr.mtdcx-fs { position: fixed; inset: 0; z-index: 99980; overflow: auto; background: #EEF1F7; margin: 0; max-width: none; padding: 0; }
.mtdcx.corr.mtdcx-fs .mtdcx-cwrap { max-width: none; grid-template-columns: 240px minmax(0, 1fr) 340px; }
.mtdcx.corr.mtdcx-fs .mtdcx-stage { max-height: calc(100vh - 170px); }
.mtdcx.corr.mtdcx-fs .mtdcx-tools { top: 62px; }
.mtdcx.corr.mtdcx-fs .mtdcx-enonce, .mtdcx.corr.mtdcx-fs .mtdcx-paper-h { display: none; }
@media (max-width: 900px) { .mtdcx-tools { top: 0; } .mtdcx.corr.mtdcx-fs .mtdcx-cwrap { grid-template-columns: minmax(0, 1fr); } .mtdcx.corr.mtdcx-fs .mtdcx-rail { display: none; } .mtdcx-tb b { display: none; } }

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   PAGE CLASSE — identité et architecture propres (2026-10-10). Ne touche que la vue « classe » (#mtdcx[data-view="classe"]) ;
   la correction et la fiche élève gardent le thème ci-dessus jusqu’à leur propre refonte.
   Idée : la classe comme un cahier. Bleu nuit quadrillé, code de la classe en étiquette, repères en grandes tuiles.
   Sur ordinateur : un rail fixe à gauche (identité de la classe, actions, sections) et le contenu à droite.
   Sur téléphone : en-tête compact, actions qui défilent, sections en barre collante.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
html body.mtdcx-page:has(#mtdcx[data-view="classe"]) { background: #F1F4FA !important; }
#mtdcx[data-view="classe"] {
  --ink: #0B1437; --ink2: #16224F; --muted: #56617A; --line: #DFE5F1; --line2: #C3CDE0; --bg: #F1F4FA;
  --ind: #1D4ED8; --ind2: #2F63EA; --ind-bg: #E7EEFE; --vio: #0B2A6F; --r: 18px;
  --sh: 0 1px 2px rgba(11,20,55,.05), 0 8px 24px rgba(11,20,55,.06);
  max-width: 1320px;
}
#mtdcx[data-view="classe"] :focus-visible { outline: 3px solid #5B7BE8; outline-offset: 2px; border-radius: 10px; }

/* Identité de la classe */
#mtdcx[data-view="classe"] .mtdcx-hero {
  background-color: #0B2A6F;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(150deg, #0B2A6F 0%, #173FA6 70%, #1D4ED8 100%);
  background-size: 22px 22px, 22px 22px, auto;
  border-radius: 22px; padding: 20px; box-shadow: 0 14px 34px rgba(11,42,111,.28); position: relative; overflow: hidden; color: #fff;
}
#mtdcx[data-view="classe"] .mtdcx-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #E5C460; }
#mtdcx[data-view="classe"] .mtdcx-hero::after { display: none; }
#mtdcx[data-view="classe"] .mtdcx-crumbs { font-size: .88rem; margin-bottom: 12px; }
#mtdcx[data-view="classe"] .mtdcx-crumbs a { color: #fff; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
#mtdcx[data-view="classe"] .mtdcx-hero h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); font-weight: 700; overflow-wrap: anywhere; display: inline-block; padding-bottom: 6px; border-bottom: 4px solid #E5C460; }
#mtdcx[data-view="classe"] .mtdcx-hero-meta { margin-top: 14px; gap: 8px; }
#mtdcx[data-view="classe"] .mtdcx-hero-meta .mtdcx-chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: .85rem; padding: 5px 12px; }
html body #mtdcx[data-view="classe"] button.mtdcx-code {
  background: #FFF8E1; color: #0B1437; border: 0; border-radius: 10px; min-height: 44px; padding: 6px 12px 6px 14px; font-family: "Courier New", monospace; font-weight: 700; letter-spacing: .12em; font-size: 1.05rem;
  box-shadow: 0 4px 0 rgba(0,0,0,.18); transform: rotate(-1.2deg); display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
}
html body #mtdcx[data-view="classe"] button.mtdcx-code:hover { transform: rotate(0deg); background: #fff; }
html body #mtdcx[data-view="classe"] button.mtdcx-code > * { font-family: "Calisto MT", Georgia, serif; letter-spacing: 0; font-size: .78rem; background: #0B2A6F; color: #fff; border-radius: 999px; padding: 3px 9px; }
#mtdcx[data-view="classe"] .mtdcx-hero-actions { gap: 8px; }
html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn { min-height: 46px; border-radius: 12px; font-weight: 700; }
html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn.gold { background: #E5C460; color: #0B1437; border-color: #C9A84C; box-shadow: none; }
html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn.gold:hover { background: #EDD27C; color: #0B1437; }
html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn.ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn.ghost:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Repères : grandes tuiles, la première (copies à corriger) mise en avant */
#mtdcx[data-view="classe"] .mtdcx-kpis { gap: 12px; margin: 14px 0 0; }
#mtdcx[data-view="classe"] .mtdcx-kpi, html body #mtdcx[data-view="classe"] button.mtdcx-kpi:hover, html body #mtdcx[data-view="classe"] button.mtdcx-kpi:focus {
  border: 1px solid var(--line); border-radius: 18px; padding: 16px; flex-direction: column; align-items: flex-start; gap: 10px; background: #fff; min-height: 118px; justify-content: space-between;
}
#mtdcx[data-view="classe"] .mtdcx-kpi b { font-size: 2rem; }
#mtdcx[data-view="classe"] .mtdcx-kpi small { font-size: .88rem; }
#mtdcx[data-view="classe"] .mtdcx-kpi-ico { width: 40px; height: 40px; border-radius: 12px; }
html body #mtdcx[data-view="classe"] button.mtdcx-kpi:first-child, html body #mtdcx[data-view="classe"] button.mtdcx-kpi:first-child:hover, html body #mtdcx[data-view="classe"] button.mtdcx-kpi:first-child:focus { background: #0B1437; border-color: #0B1437; color: #fff; }
html body #mtdcx[data-view="classe"] button.mtdcx-kpi:first-child small { color: rgba(255,255,255,.82); }
html body #mtdcx[data-view="classe"] button.mtdcx-kpi:first-child .mtdcx-kpi-ico { background: rgba(255,255,255,.14); color: #E5C460; }
html body #mtdcx[data-view="classe"] button.mtdcx-kpi.hot, html body #mtdcx[data-view="classe"] button.mtdcx-kpi.hot:hover, html body #mtdcx[data-view="classe"] button.mtdcx-kpi.hot:focus { background: #7A1F12; border-color: #7A1F12; }
html body #mtdcx[data-view="classe"] button.mtdcx-kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(11,20,55,.22); }

/* Sections */
#mtdcx[data-view="classe"] .mtdcx-tabs { top: 0; gap: 6px; margin: 14px -16px 14px; padding: 10px 16px; background: rgba(241,244,250,.94); }
html body #mtdcx[data-view="classe"] .mtdcx-tab { min-height: 44px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink2); font-size: .95rem; }
html body #mtdcx[data-view="classe"] .mtdcx-tab:hover { border-color: var(--ind); color: var(--ind); background: #fff; }
html body #mtdcx[data-view="classe"] .mtdcx-tab.on { background: var(--ind); border-color: var(--ind); color: #fff; box-shadow: 0 6px 16px rgba(29,78,216,.28); }
#mtdcx[data-view="classe"] .mtdcx-tab .mtdcx-count { background: var(--ind-bg); color: #16307F; font-size: .78rem; }
#mtdcx[data-view="classe"] > .mtdcx-boot, #mtdcx[data-view="classe"] > .mtdcx-error, #mtdcx[data-view="classe"] > .mtdcx-empty { grid-column: 1 / -1; }

@media (max-width: 640px) {
  #mtdcx[data-view="classe"] .mtdcx-hero-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 14px -20px 0; padding: 0 20px 4px; width: calc(100% + 40px); }
  #mtdcx[data-view="classe"] .mtdcx-hero-actions::-webkit-scrollbar { display: none; }
  html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn { flex: none; white-space: nowrap; }
  #mtdcx[data-view="classe"] .mtdcx-kpi { min-height: 104px; padding: 14px; }
  #mtdcx[data-view="classe"] .mtdcx-kpi b { font-size: 1.7rem; }
}

/* Tablette et ordinateur : rail à gauche, contenu à droite */
@media (min-width: 860px) {
  #mtdcx[data-view="classe"] { display: grid; grid-template-columns: 304px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 22px; align-items: start; padding-top: 22px; }
  #mtdcx[data-view="classe"] > .mtdcx-hero { grid-column: 1; grid-row: 1 / span 2; padding: 22px 20px 22px 24px; }
  #mtdcx[data-view="classe"] .mtdcx-hero-top { flex-direction: column; align-items: stretch; gap: 18px; }
  #mtdcx[data-view="classe"] .mtdcx-hero-actions { flex-direction: column; align-items: stretch; }
  html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn { width: 100%; justify-content: flex-start; padding-left: 16px; }
  html body #mtdcx[data-view="classe"] .mtdcx-hero-actions .mtdcx-btn.gold { justify-content: center; padding-left: 12px; }
  #mtdcx[data-view="classe"] > .mtdcx-kpis { grid-column: 2; grid-row: 1; margin: 0; align-self: start; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #mtdcx[data-view="classe"] > .mtdcx-kpis .mtdcx-kpi { min-height: 132px; padding: 18px; }
  #mtdcx[data-view="classe"] > .mtdcx-kpis .mtdcx-kpi b { font-size: 2.3rem; }
  #mtdcx[data-view="classe"] > .mtdcx-tabs { grid-column: 1; grid-row: 3 / span 2; align-self: start; position: sticky; top: 84px; flex-direction: column; overflow: visible; margin: 16px 0 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh); backdrop-filter: none; gap: 2px; }
  html body #mtdcx[data-view="classe"] > .mtdcx-tabs .mtdcx-tab { width: 100%; justify-content: flex-start; border-radius: 12px; border-color: transparent; background: transparent; min-height: 48px; font-size: 1rem; padding: 10px 14px; }
  html body #mtdcx[data-view="classe"] > .mtdcx-tabs .mtdcx-tab:hover { background: var(--ind-bg); border-color: transparent; }
  html body #mtdcx[data-view="classe"] > .mtdcx-tabs .mtdcx-tab.on { background: var(--ind); color: #fff; }
  #mtdcx[data-view="classe"] > .mtdcx-tabs .mtdcx-tab .mtdcx-count { margin-left: auto; }
  #mtdcx[data-view="classe"] > #mtdcx-panel { grid-column: 2; grid-row: 2 / span 3; margin-top: 16px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { #mtdcx[data-view="classe"] * { transition: none !important; } }

/* ── Page classe, suite (2026-10-10) : cartes de devoir, menu latéral en tiroir sur téléphone ── */
#mtdcx[data-view="classe"] .mtdcx-menubtn, #mtdcx[data-view="classe"] .mtdcx-scrim, #mtdcx[data-view="classe"] .mtdcx-navhead { display: none; }
#mtdcx[data-view="classe"] .mtdcx-svgchart a { cursor: pointer; }
#mtdcx[data-view="classe"] .mtdcx-svgchart a:hover rect, #mtdcx[data-view="classe"] .mtdcx-svgchart a:focus rect { opacity: .8; }

/* Carte de devoir */
#mtdcx[data-view="classe"] .mtdcx-dv2 { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--sh); position: relative; overflow: hidden; }
#mtdcx[data-view="classe"] .mtdcx-dv2::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #94A3B8; }
#mtdcx[data-view="classe"] .mtdcx-dv2.a_corriger::before { background: #B42318; }
#mtdcx[data-view="classe"] .mtdcx-dv2.en_cours::before { background: var(--ind); }
#mtdcx[data-view="classe"] .mtdcx-dv2.termines::before { background: #059669; }
#mtdcx[data-view="classe"] .mtdcx-dv2-date { width: 64px; height: 68px; border-radius: 14px; background: var(--ind-bg); color: #16307F; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
#mtdcx[data-view="classe"] .mtdcx-dv2-date b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
#mtdcx[data-view="classe"] .mtdcx-dv2-date span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: center; }
#mtdcx[data-view="classe"] .mtdcx-dv2.termines .mtdcx-dv2-date { background: #EEF1F6; color: #56617A; }
#mtdcx[data-view="classe"] .mtdcx-dv2.a_corriger .mtdcx-dv2-date { background: #FEF1F0; color: #7A1F12; }
#mtdcx[data-view="classe"] .mtdcx-dv2-main { min-width: 0; }
#mtdcx[data-view="classe"] .mtdcx-dv2-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
#mtdcx[data-view="classe"] .mtdcx-dv2-type { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
#mtdcx[data-view="classe"] .mtdcx-dv2 h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
#mtdcx[data-view="classe"] .mtdcx-dv2 h3 a { color: var(--ink); text-decoration: none; }
#mtdcx[data-view="classe"] .mtdcx-dv2 h3 a:hover { text-decoration: underline; }
#mtdcx[data-view="classe"] .mtdcx-dv2-meta { color: var(--muted); font-size: .9rem; margin-top: 2px; }
#mtdcx[data-view="classe"] .mtdcx-dv2-ex { color: #3A4563; font-size: .92rem; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#mtdcx[data-view="classe"] .mtdcx-dv2-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 6px; font-size: .9rem; color: var(--muted); }
#mtdcx[data-view="classe"] .mtdcx-dv2-counts b { font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 3px; }
#mtdcx[data-view="classe"] .mtdcx-dv2-counts .g b { color: #047857; }
#mtdcx[data-view="classe"] .mtdcx-dv2-counts .t b { color: #B42318; }
#mtdcx[data-view="classe"] .mtdcx-dv2 .mtdcx-stack { height: 8px; border-radius: 999px; background: #E9EDF5; overflow: hidden; display: flex; margin: 0; }
#mtdcx[data-view="classe"] .mtdcx-dv2 .mtdcx-stack i.g { background: #059669; }
#mtdcx[data-view="classe"] .mtdcx-dv2 .mtdcx-stack i.i { background: #B42318; }
#mtdcx[data-view="classe"] .mtdcx-dv2-side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; }
#mtdcx[data-view="classe"] .mtdcx-dv2-avg { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: .88rem; }
#mtdcx[data-view="classe"] .mtdcx-dv2-avg b { font-size: 1.7rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
#mtdcx[data-view="classe"] .mtdcx-dv2-avg b small { font-size: .85rem; font-weight: 700; color: var(--muted); margin-left: 2px; }
#mtdcx[data-view="classe"] .mtdcx-dv2-avg.ok b { color: #047857; }
#mtdcx[data-view="classe"] .mtdcx-dv2-avg.mid b { color: #1D4ED8; }
#mtdcx[data-view="classe"] .mtdcx-dv2-avg.low b { color: #B42318; }
#mtdcx[data-view="classe"] .mtdcx-dv2-act { display: flex; gap: 8px; flex-wrap: wrap; }
html body #mtdcx[data-view="classe"] .mtdcx-dv2-act .mtdcx-btn { min-height: 44px; border-radius: 12px; }
html body #mtdcx[data-view="classe"] .mtdcx-dv2-act .mtdcx-btn.pri { background: #B42318; border-color: #B42318; color: #fff; box-shadow: none; }
html body #mtdcx[data-view="classe"] .mtdcx-dv2-act .mtdcx-btn.pri:hover { background: #912018; color: #fff; }
#mtdcx[data-view="classe"] .mtdcx-chip.ind { background: #FEF1F0; color: #7A1F12; }
@media (min-width: 700px) {
  #mtdcx[data-view="classe"] .mtdcx-dv2 { grid-template-columns: 72px minmax(0, 1fr) 190px; padding: 18px 18px 18px 22px; }
  #mtdcx[data-view="classe"] .mtdcx-dv2-date { width: 72px; height: 76px; }
  #mtdcx[data-view="classe"] .mtdcx-dv2-side { grid-column: auto; flex-direction: column; align-items: stretch; justify-content: space-between; border-top: 0; border-left: 1px dashed var(--line); padding: 0 0 0 16px; }
  #mtdcx[data-view="classe"] .mtdcx-dv2-avg { flex-direction: column; align-items: flex-start; gap: 2px; }
  #mtdcx[data-view="classe"] .mtdcx-dv2-avg b { font-size: 2.1rem; }
  #mtdcx[data-view="classe"] .mtdcx-dv2-act { flex-direction: column; }
  html body #mtdcx[data-view="classe"] .mtdcx-dv2-act .mtdcx-btn { width: 100%; }
}

/* Téléphone et petite tablette : les sections vivent dans un menu latéral qui glisse depuis la gauche */
@media (max-width: 859px) {
  html body #mtdcx[data-view="classe"] button.mtdcx-menubtn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 14px 0; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: var(--sh); position: sticky; top: 8px; z-index: 30; text-transform: none; letter-spacing: 0; }
  #mtdcx[data-view="classe"] .mtdcx-menubtn span { color: var(--muted); font-weight: 400; font-size: .88rem; }
  #mtdcx[data-view="classe"] .mtdcx-menubtn b { margin-left: auto; color: var(--ind); }
  #mtdcx[data-view="classe"] .mtdcx-tabs { position: fixed; top: 0; bottom: 0; left: 0; width: min(86vw, 320px); z-index: 9500; margin: 0; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); background: #fff; flex-direction: column; gap: 4px; overflow-y: auto; overflow-x: hidden; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 40px rgba(11,20,55,.25); backdrop-filter: none; visibility: hidden; }
  #mtdcx[data-view="classe"].menu-open .mtdcx-tabs { transform: none; visibility: visible; }
  #mtdcx[data-view="classe"].menu-open .mtdcx-scrim { display: block; position: fixed; inset: 0; background: rgba(11,20,55,.5); z-index: 9400; }
  #mtdcx[data-view="classe"] .mtdcx-navhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 12px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 1.1rem; }
  #mtdcx[data-view="classe"] .mtdcx-navhead span { min-width: 0; overflow-wrap: anywhere; }
  html body #mtdcx[data-view="classe"] .mtdcx-navhead button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; flex: none; }
  html body #mtdcx[data-view="classe"] .mtdcx-tabs .mtdcx-tab { width: 100%; justify-content: flex-start; border-radius: 12px; border-color: transparent; background: transparent; min-height: 50px; font-size: 1.02rem; padding: 10px 14px; flex: none; }
  html body #mtdcx[data-view="classe"] .mtdcx-tabs .mtdcx-tab.on { background: var(--ind); color: #fff; }
  #mtdcx[data-view="classe"] .mtdcx-tabs .mtdcx-tab .mtdcx-count { margin-left: auto; }
}
@media (min-width: 860px) and (max-width: 1179px) {
  #mtdcx[data-view="classe"] > .mtdcx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #mtdcx[data-view="classe"] { grid-template-columns: 270px minmax(0, 1fr) !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   PAGE CORRECTION — identité propre (2026-10-10), limitée à #mtdcx[data-view="correction"].
   Idée : le bureau du correcteur. Papier crème, encre noire, stylo rouge. La copie est posée sur un plan sombre pour
   qu'elle ressorte ; la note s'écrit en rouge dans un cercle, comme sur une copie. Aucun script modifié.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
html body.mtdcx-page:has(#mtdcx[data-view="correction"]) { background: #EFEAE0 !important; }
#mtdcx[data-view="correction"] {
  --ink: #1C1917; --ink2: #33302C; --muted: #655E57; --line: #E2DACB; --line2: #CFC4AF; --bg: #EFEAE0; --card: #FFFDF8;
  --ind: #B42318; --ind2: #D0342A; --ind-bg: #FDEDEB; --vio: #7A1F12; --r: 16px;
  --sh: 0 1px 2px rgba(28,25,23,.06), 0 8px 22px rgba(28,25,23,.07);
}
#mtdcx[data-view="correction"] :focus-visible { outline: 3px solid #5B7BE8; outline-offset: 2px; border-radius: 10px; }

/* Barre du devoir */
#mtdcx[data-view="correction"] .mtdcx-cbar { background: #1C1917; border-bottom: 4px solid #B42318; box-shadow: 0 8px 24px rgba(28,25,23,.28); }
#mtdcx[data-view="correction"] .mtdcx-cbar a.back { color: #F6E7D0 !important; min-height: 44px; }
#mtdcx[data-view="correction"] .mtdcx-cbar h1 { font-size: 1.2rem; font-weight: 700; }
#mtdcx[data-view="correction"] .mtdcx-cbar .mtdcx-sub { color: #D6CFC4; }
#mtdcx[data-view="correction"] .mtdcx-mode { background: rgba(255,255,255,.1); }
html body #mtdcx[data-view="correction"] .mtdcx-mode button { color: #EDE5D8; min-height: 40px; }
html body #mtdcx[data-view="correction"] .mtdcx-mode button.on { background: #FFFDF8; color: #1C1917; }
#mtdcx[data-view="correction"] .mtdcx-cprog { color: #F6E7D0; }
#mtdcx[data-view="correction"] .mtdcx-cprog .mtdcx-bar i { background: #34D399; }
html body #mtdcx[data-view="correction"] .mtdcx-cbar .mtdcx-btn.gold { background: #E5C460; color: #1C1917; border-color: #C9A84C; box-shadow: none; min-height: 40px; }

/* Pile de copies */
#mtdcx[data-view="correction"] .mtdcx-rail { background: #FFFDF8; border: 1px solid var(--line); }
#mtdcx[data-view="correction"] .mtdcx-rail .mtdcx-seg { background: #F1EBDD; }
html body #mtdcx[data-view="correction"] .mtdcx-rail .mtdcx-seg button { min-height: 40px; color: var(--ink2); }
html body #mtdcx[data-view="correction"] .mtdcx-rail .mtdcx-seg button.on { background: #1C1917; color: #fff; }
#mtdcx[data-view="correction"] .mtdcx-seg em { background: rgba(28,25,23,.08); color: inherit; }
#mtdcx[data-view="correction"] .mtdcx-stu { min-height: 56px; border-radius: 12px; border-left: 4px solid transparent; }
#mtdcx[data-view="correction"] .mtdcx-stu:hover { background: #F6F0E2; }
#mtdcx[data-view="correction"] .mtdcx-stu.on { background: #FDEDEB; border-color: #F3C4BE; border-left-color: #B42318; }
#mtdcx[data-view="correction"] .mtdcx-stu .mtdcx-av { background: #1C1917; color: #F6E7D0; border-radius: 50%; }
#mtdcx[data-view="correction"] .mtdcx-stu-s { color: #B42318; font-size: 1.05rem; }

/* La copie sur le plan de travail */
#mtdcx[data-view="correction"] .mtdcx-paper { background: #FFFDF8; border: 1px solid var(--line); }
#mtdcx[data-view="correction"] .mtdcx-paper-h h2 { font-weight: 700; }
#mtdcx[data-view="correction"] .mtdcx-enonce { background: #FAF5E9; }
#mtdcx[data-view="correction"] .mtdcx-enonce summary { color: var(--ink); }
#mtdcx[data-view="correction"] .mtdcx-pages { background: #F6F0E2; }
#mtdcx[data-view="correction"] .mtdcx-tools { background: #FFFDF8; }
#mtdcx[data-view="correction"] .mtdcx-tgrp { background: #F1EBDD; }
html body #mtdcx[data-view="correction"] .mtdcx-tb { height: 40px; }
html body #mtdcx[data-view="correction"] .mtdcx-tb:hover { background: #fff; color: #B42318; }
html body #mtdcx[data-view="correction"] .mtdcx-tb.on { background: #B42318; color: #fff; }
#mtdcx[data-view="correction"] .mtdcx-stage { background: #2B2926; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 18px 18px; }
#mtdcx[data-view="correction"] .mtdcx-stage-in { box-shadow: 0 16px 40px rgba(0,0,0,.45); border-radius: 4px; }

/* La note, au stylo rouge */
#mtdcx[data-view="correction"] .mtdcx-score { background: #FFFDF8; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh); position: relative; overflow: hidden; }
#mtdcx[data-view="correction"] .mtdcx-score::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: #B42318; }
#mtdcx[data-view="correction"] .mtdcx-score label { color: var(--muted); }
#mtdcx[data-view="correction"] .mtdcx-score-row { gap: 12px; margin: 14px 0 12px; }
#mtdcx[data-view="correction"] .mtdcx-score-row input { width: 118px; height: 118px; border: 4px solid #B42318; border-radius: 50%; color: #B42318; font-size: 2.5rem; font-weight: 700; transform: rotate(-3deg); background: #fff; padding: 0; box-shadow: none; }
#mtdcx[data-view="correction"] .mtdcx-score-row input:focus { outline: 3px solid #5B7BE8; outline-offset: 3px; }
#mtdcx[data-view="correction"] .mtdcx-score-row .of { color: var(--muted); }
html body #mtdcx[data-view="correction"] .mtdcx-score-row button { background: #F1EBDD; color: var(--ink); border: 1px solid var(--line2); border-radius: 12px; }
html body #mtdcx[data-view="correction"] .mtdcx-score-row button:hover { background: #E8DFCC; }
#mtdcx[data-view="correction"] .mtdcx-score input[type=range] { accent-color: #B42318; }
html body #mtdcx[data-view="correction"] .mtdcx-quick button { border: 1px solid var(--line2); background: #fff; color: var(--ink); min-width: 40px; min-height: 36px; }
html body #mtdcx[data-view="correction"] .mtdcx-quick button:hover { background: #FDEDEB; border-color: #B42318; color: #B42318; }
#mtdcx[data-view="correction"] .mtdcx-mention { color: #B42318; font-weight: 700; font-style: italic; font-size: 1.1rem; }
html body #mtdcx[data-view="correction"] .mtdcx-bank button { border: 1px solid var(--line2); background: #F6F0E2; color: var(--ink2); min-height: 36px; }
html body #mtdcx[data-view="correction"] .mtdcx-bank button:hover { background: #FDEDEB; border-color: #B42318; color: #7A1F12; }
#mtdcx[data-view="correction"] .mtdcx-card { background: #FFFDF8; border: 1px solid var(--line); }
#mtdcx[data-view="correction"] .mtdcx-fb textarea { background: #fff; border-color: var(--line2); background-image: linear-gradient(transparent 27px, #EEE6D6 28px); background-size: 100% 28px; line-height: 28px; padding-top: 4px; }
html body #mtdcx[data-view="correction"] .mtdcx-btn.pri { background: #B42318; border-color: #B42318; color: #fff; box-shadow: none; }
html body #mtdcx[data-view="correction"] .mtdcx-btn.pri:hover { background: #912018; color: #fff; }
#mtdcx[data-view="correction"] .mtdcx-savebar { background: #1C1917; }
#mtdcx[data-view="correction"] a { color: #7A1F12; }
@media (prefers-reduced-motion: reduce) { #mtdcx[data-view="correction"] * { transition: none !important; } }

/* ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   PAGE DE L'ÉLÈVE DANS SA CLASSE — identité propre (2026-10-10), limitée à #mtdcx[data-view="eleve"].
   Idée : mon cahier de classe. Vert profond quadrillé, liseré or, sections en pastilles larges, cibles de 44 px.
   Aucun script modifié.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */
html body.mtdcx-page:has(#mtdcx[data-view="eleve"]) { background: #EFF5F1 !important; }
#mtdcx[data-view="eleve"] {
  --ink: #0E2A20; --ink2: #1C3B2F; --muted: #51665C; --line: #D8E5DD; --line2: #BCD0C4; --bg: #EFF5F1;
  --ind: #047857; --ind2: #059669; --ind-bg: #E0F3EA; --vio: #065F46; --r: 18px;
  --sh: 0 1px 2px rgba(14,42,32,.05), 0 8px 22px rgba(14,42,32,.06);
  max-width: 1080px;
}
#mtdcx[data-view="eleve"] :focus-visible { outline: 3px solid #5B7BE8; outline-offset: 2px; border-radius: 10px; }
#mtdcx[data-view="eleve"] a { color: #065F46; }
#mtdcx[data-view="eleve"] .mtdcx-hero {
  background-color: #064E3B;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(150deg, #064E3B 0%, #047857 100%);
  background-size: 22px 22px, 22px 22px, auto;
  border-radius: 22px; box-shadow: 0 14px 34px rgba(6,78,59,.26); position: relative; overflow: hidden; color: #fff;
}
#mtdcx[data-view="eleve"] .mtdcx-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #E5C460; }
#mtdcx[data-view="eleve"] .mtdcx-hero::after { display: none; }
#mtdcx[data-view="eleve"] .mtdcx-crumbs, #mtdcx[data-view="eleve"] .mtdcx-crumbs a { color: #fff; }
#mtdcx[data-view="eleve"] .mtdcx-crumbs a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
#mtdcx[data-view="eleve"] .mtdcx-hero h1 { font-weight: 700; overflow-wrap: anywhere; display: inline-block; padding-bottom: 6px; border-bottom: 4px solid #E5C460; }
#mtdcx[data-view="eleve"] .mtdcx-hero-meta .mtdcx-chip { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24); color: #fff; font-size: .85rem; padding: 5px 12px; }
html body #mtdcx[data-view="eleve"] .mtdcx-hero-actions .mtdcx-btn { min-height: 46px; border-radius: 12px; font-weight: 700; }
html body #mtdcx[data-view="eleve"] .mtdcx-hero-actions .mtdcx-btn.gold { background: #E5C460; color: #0E2A20; border-color: #C9A84C; box-shadow: none; }
html body #mtdcx[data-view="eleve"] .mtdcx-hero-actions .mtdcx-btn.ghost { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
#mtdcx[data-view="eleve"] .mtdcx-kpi, html body #mtdcx[data-view="eleve"] button.mtdcx-kpi:hover, html body #mtdcx[data-view="eleve"] button.mtdcx-kpi:focus { border: 1px solid var(--line); border-radius: 18px; background: #fff; }
#mtdcx[data-view="eleve"] .mtdcx-kpi b { font-size: 1.8rem; }
#mtdcx[data-view="eleve"] .mtdcx-kpi small { font-size: .88rem; }
#mtdcx[data-view="eleve"] .mtdcx-kpi.hot { background: #FBF3DC; border-color: #E8D49A; }
#mtdcx[data-view="eleve"] .mtdcx-tabs { gap: 6px; background: rgba(239,245,241,.94); }
html body #mtdcx[data-view="eleve"] .mtdcx-tab { min-height: 46px; padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink2); font-size: 1rem; }
html body #mtdcx[data-view="eleve"] .mtdcx-tab:hover { border-color: var(--ind); color: var(--ind); background: #fff; }
html body #mtdcx[data-view="eleve"] .mtdcx-tab.on { background: var(--ind); border-color: var(--ind); color: #fff; box-shadow: 0 6px 16px rgba(4,120,87,.28); }
#mtdcx[data-view="eleve"] .mtdcx-tab .mtdcx-count { background: #FBF3DC; color: #7A5A10; }
#mtdcx[data-view="eleve"] .mtdcx-card { border: 1px solid var(--line); }
html body #mtdcx[data-view="eleve"] .mtdcx-btn.pri { background: #047857; border-color: #047857; color: #fff; box-shadow: none; }
html body #mtdcx[data-view="eleve"] .mtdcx-btn.pri:hover { background: #065F46; color: #fff; }
html body #mtdcx[data-view="eleve"] .mtdcx-btn { min-height: 44px; }
#mtdcx[data-view="eleve"] .mtdcx-bar i { background: linear-gradient(90deg, #059669, #047857); }
#mtdcx[data-view="eleve"] .mtdcx-spin { border-color: #A7E3CB; border-top-color: #047857; }
@media (prefers-reduced-motion: reduce) { #mtdcx[data-view="eleve"] * { transition: none !important; } }

/* Cibles tactiles (contrôle à 390 px du 2026-10-10) : correction et page de l'élève */
html body #mtdcx[data-view="correction"] .mtdcx-seg button, html body #mtdcx[data-view="eleve"] .mtdcx-seg button { min-height: 44px; }
html body #mtdcx[data-view="correction"] .mtdcx-btn.sm, html body #mtdcx[data-view="eleve"] .mtdcx-btn.sm { min-height: 44px; }
html body #mtdcx[data-view="correction"] .mtdcx-quick button, html body #mtdcx[data-view="correction"] .mtdcx-bank button { min-height: 44px; min-width: 44px; }
html body #mtdcx[data-view="correction"] .mtdcx-mode button, html body #mtdcx[data-view="correction"] .mtdcx-tb { min-height: 44px; height: auto; }
html body #mtdcx[data-view="correction"] .mtdcx-score-row button { width: 48px; height: 48px; }

/* Avatar : la photo de la personne quand elle en a une, sinon ses initiales (2026-10-10) */
.mtdcx .mtdcx-av { overflow: hidden; }
.mtdcx .mtdcx-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mtdcx .mtdcx-av.has-img { background: #E9EDF5; padding: 0; }

/* ── Barème par question (lot 1 du chantier devoirs, 2026-10-14) ── */
.mtdcx-rub { display: grid; gap: 0; margin-top: 14px; text-align: left; }
.mtdcx-rub-g { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 12px; padding-bottom: 2px; }
.mtdcx-rub-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px dashed var(--line); }
.mtdcx-rub-r .l { min-width: 0; overflow-wrap: anywhere; font-size: .95rem; }
.mtdcx-rub-r .c { display: flex; align-items: center; gap: 4px; }
html body #mtdcx[data-view="correction"] .mtdcx-rub-r button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: #F1EBDD; color: var(--ink); font-weight: 800; font-size: 1.2rem; cursor: pointer; padding: 0; }
html body #mtdcx[data-view="correction"] .mtdcx-rub-r button:hover { background: #E8DFCC; }
#mtdcx[data-view="correction"] .mtdcx-rub-r input { width: 56px; height: 44px; text-align: center; border: 1px solid var(--line2); border-radius: 12px; font: inherit; font-weight: 700; background: #fff; color: #166534; font-variant-numeric: tabular-nums; padding: 0; }
#mtdcx[data-view="correction"] .mtdcx-rub-r.less input { color: #B42318; border-color: #B42318; }
#mtdcx[data-view="correction"] .mtdcx-rub-r input:focus { outline: 3px solid #5B7BE8; outline-offset: 2px; }
.mtdcx-rub-r .m { min-width: 38px; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mtdcx-rub-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.mtdcx-rub-foot b { margin-right: auto; font-variant-numeric: tabular-nums; }
#mtdcx[data-view="correction"] .mtdcx-score-row input[readonly] { cursor: default; }
.mtdcx-sheet .mtdcx-be { margin-top: 12px; }
.mtdcx-sheet .mtdcx-be input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #D6D0C0; border-radius: 10px; padding: 0 8px; font: inherit; background: #fff; color: #16203F; }
.mtdcx-sheet .mtdcx-be-gen { display: grid; grid-template-columns: minmax(0, 1.4fr) 56px 56px; gap: 6px; }
.mtdcx-sheet .mtdcx-be-gen .mtdcx-btn { grid-column: 1 / -1; }
.mtdcx-sheet .mtdcx-be-r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 58px 44px; gap: 6px; margin-top: 6px; }
html body .mtdcx-sheet .mtdcx-be-r button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #D6D0C0; background: #fff; color: #B42318; font-size: 1.3rem; cursor: pointer; padding: 0; }
.mtdcx-sheet .mtdcx-be-tot { margin-top: 12px; font-weight: 700; }
.mtdcx-rubs-g { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-top: 10px; }
.mtdcx-rubs-r { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.mtdcx-rubs-r span { min-width: 0; overflow-wrap: anywhere; }
.mtdcx-rubs-r b { font-variant-numeric: tabular-nums; white-space: nowrap; color: #166534; }
.mtdcx-rubs-r.less b { color: #B42318; }
.mtdcx-rubs-r small { font-weight: 400; color: var(--muted); }
