/* MathsTD — Ma progression (enseignant). Préfixe mtdtp-. Bleu nuit et or, Calisto MT, aucun orange, aucun emoji. */
html body.mtdtp-page { background: #f5f6fa !important; }
[id="mtdtp"] { --ink: #0f1b4c; --soft: #5f6886; --line: #e2e5ee; --line2: #eef0f5; --gold: #c9a84c; --gold-bg: #fbf5e4; --ok: #1d7a4c; --bad: #9b2c1f;
  font-family: 'Calisto MT', 'Bookman Old Style', Georgia, serif; color: var(--ink); max-width: 1180px; margin: 0 auto; padding: 18px 16px 80px; font-size: 16px; line-height: 1.5; box-sizing: border-box; }
[id="mtdtp"] *, [id="mtdtp"] *::before, [id="mtdtp"] *::after { box-sizing: border-box; }
[id="mtdtp"] h1, [id="mtdtp"] h2, [id="mtdtp"] p, [id="mtdtp"] ol { margin: 0; padding: 0; font-family: inherit; color: var(--ink); }
[id="mtdtp"] ol { list-style: none; }
#mtdtp :focus-visible { outline: 3px solid #5b7be8; outline-offset: 2px; border-radius: 8px; }
#mtdtp .mtdtp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#mtdtp .mtdtp-boot { padding: 40px 0; text-align: center; color: var(--soft); }
#mtdtp .mtdtp-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
#mtdtp .mtdtp-head h1 { font-size: clamp(1.6rem, 4.6vw, 2.1rem); line-height: 1.15; }
#mtdtp .mtdtp-head p { color: var(--soft); margin-top: 4px; max-width: 70ch; }
#mtdtp .mtdtp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
#mtdtp .mtdtp-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#mtdtp .mtdtp-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
#mtdtp .mtdtp-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
#mtdtp .mtdtp-msg { max-width: 560px; margin: 30px auto; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
#mtdtp .mtdtp-hint { font-size: .9rem; color: var(--soft); margin-bottom: 10px; }
#mtdtp .mtdtp-empty { color: var(--soft); padding: 6px 0; }
#mtdtp .mtdtp-ok { color: var(--ok); font-weight: 700; margin-top: 8px; }
#mtdtp .mtdtp-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line2); flex-wrap: wrap; }
#mtdtp .mtdtp-row.tight { padding: 8px 0; font-size: .95rem; }
#mtdtp .mtdtp-row b { display: block; overflow-wrap: break-word; }
#mtdtp .mtdtp-row small { display: block; color: var(--soft); font-size: .88rem; overflow-wrap: break-word; }
#mtdtp .mtdtp-grow { flex: 1 1 200px; min-width: 0; }
#mtdtp .mtdtp-ic { width: 38px; height: 38px; border-radius: 10px; background: #eef0f6; display: flex; align-items: center; justify-content: center; flex: none; }
#mtdtp .mtdtp-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
#mtdtp .mtdtp-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 0; font-size: .92rem; }
#mtdtp .mtdtp-field span { font-weight: 700; color: var(--soft); }
html body #mtdtp input, html body #mtdtp select, html body #mtdtp textarea { font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #c9cfe0; border-radius: 10px; padding: 8px 10px; min-height: 44px; width: 100%; max-width: 100%; box-shadow: none; }
html body #mtdtp textarea { min-height: 64px; resize: vertical; }
html body #mtdtp a.mtdtp-btn, html body #mtdtp button.mtdtp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #d5d9e5; background: #fff; color: var(--ink); font: 700 1rem/1.2 'Calisto MT', Georgia, serif; text-decoration: none; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; white-space: nowrap; }
html body #mtdtp a.mtdtp-btn:hover, html body #mtdtp button.mtdtp-btn:hover { background: #f3f5fa; color: var(--ink); }
html body #mtdtp .mtdtp-btn.pri { background: var(--ink); border-color: var(--ink); color: #fff; }
html body #mtdtp .mtdtp-btn.pri:hover { background: #1d2a63; color: #fff; }
html body #mtdtp .mtdtp-btn.sm { min-height: 40px; padding: 0 12px; font-size: .92rem; }
html body #mtdtp .mtdtp-btn.danger { color: var(--bad); border-color: #e8c3bd; }
html body #mtdtp .mtdtp-btn.danger.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
html body #mtdtp button.mtdtp-btn:disabled { opacity: .5; cursor: default; }
html body #mtdtp button.mtdtp-ib { width: 44px; height: 44px; padding: 0; border-radius: 10px; border: 1px solid #d5d9e5; background: #fff; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: none; }
html body #mtdtp button.mtdtp-ib:hover { background: #f3f5fa; color: var(--ink); }
html body #mtdtp button.mtdtp-ib:disabled { opacity: .35; cursor: default; }
html body #mtdtp button.mtdtp-ib.armed { background: var(--bad); border-color: var(--bad); color: #fff; }
html body #mtdtp button.mtdtp-link { background: none; border: 0; padding: 8px 0 0; min-height: 40px; color: #2f55c8; font: 700 .92rem/1.2 'Calisto MT', Georgia, serif; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; }
#mtdtp .mtdtp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
html body #mtdtp input.mtdtp-ptitle { flex: 1 1 260px; font-size: 1.35rem; font-weight: 700; border-color: transparent; background: transparent; padding-left: 0; }
html body #mtdtp input.mtdtp-ptitle:hover, html body #mtdtp input.mtdtp-ptitle:focus { border-color: #c9cfe0; background: #fff; padding-left: 10px; }
#mtdtp .mtdtp-state { font-size: .88rem; color: var(--soft); }
#mtdtp .mtdtp-sub { font-size: .92rem; color: var(--soft); margin: 4px 0 16px; }
#mtdtp .mtdtp-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
#mtdtp .mtdtp-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fcfcfe; }
#mtdtp .mtdtp-item-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#mtdtp .mtdtp-num { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex: none; }
html body #mtdtp input.mtdtp-title { font-weight: 700; }
#mtdtp .mtdtp-tools { display: flex; gap: 6px; margin-left: auto; }
#mtdtp .mtdtp-item-b { padding-left: 40px; }
#mtdtp .mtdtp-gauge { height: 12px; border-radius: 6px; background: #eef0f6; overflow: hidden; margin-top: 6px; }
#mtdtp .mtdtp-gauge i { display: block; height: 100%; background: var(--gold); border-radius: 6px; }
#mtdtp .mtdtp-cov { margin-top: 6px; font-size: .95rem; }
#mtdtp-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 2147482000; background: #0f1b4c; color: #fff; border: 1px solid #c9a84c; border-radius: 12px; padding: 10px 16px; font: 700 .95rem/1.3 'Calisto MT', Georgia, serif; max-width: calc(100% - 32px); display: none; }
#mtdtp-toast.bad { background: #9b2c1f; border-color: #9b2c1f; }
@media (max-width: 560px) { #mtdtp .mtdtp-item-b { padding-left: 0; } #mtdtp .mtdtp-tools { margin-left: 0; width: 100%; justify-content: flex-end; } }
@media (min-width: 1024px) { #mtdtp .mtdtp-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; } }
/* Suivi d'une classe (étape 2) */
#mtdtp .mtdtp-follow { margin-top: 8px; align-self: flex-start; }
#mtdtp .mtdtp-bar h1 { font-size: clamp(1.4rem, 4.4vw, 1.9rem); }
#mtdtp .mtdtp-item b { display: block; overflow-wrap: break-word; }
#mtdtp .mtdtp-item small { display: block; font-size: .88rem; }
#mtdtp .mtdtp-etat { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; background: #eef0f6; color: var(--soft); white-space: nowrap; }
#mtdtp .mtdtp-st-en_cours { border-color: var(--gold); background: var(--gold-bg); }
#mtdtp .mtdtp-st-en_cours .mtdtp-etat { background: var(--gold); color: var(--ink); }
#mtdtp .mtdtp-st-fait .mtdtp-etat { background: #e7f4ec; color: var(--ok); }
#mtdtp .mtdtp-st-fait .mtdtp-num { background: var(--ok); }
#mtdtp .mtdtp-acts2 { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 0 40px; }
@media (max-width: 560px) { #mtdtp .mtdtp-acts2 { padding-left: 0; } }
/* Fiches méthode (étape 3) */
#mtdtp .mtdtp-fiches { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
#mtdtp .mtdtp-fh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: .95rem; }
#mtdtp .mtdtp-frow { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line2); font-size: .95rem; }
#mtdtp .mtdtp-fform { margin-top: 6px; padding: 10px; border-radius: 10px; background: var(--gold-bg); border: 1px solid #ecdcae; }
#mtdtp .mtdtp-fform .mtdtp-inline { margin-top: 10px; }
#mtdtp .mtdtp-fnote { font-size: .85rem; color: var(--soft); margin-top: 8px; }
/* Étape 4 : devoirs et réussite par chapitre (« Où en est la classe ? ») */
#mtdtp .mtdtp-stat { display: block; margin-top: 4px; color: var(--soft); font-size: .88rem; overflow-wrap: anywhere; }
#mtdtp .mtdtp-taux { display: inline-block; padding: 0 8px; border-radius: 999px; font-weight: 700; line-height: 1.6; }
#mtdtp .mtdtp-taux.ok { background: #e6f4ec; color: var(--ok); }
#mtdtp .mtdtp-taux.mid { background: var(--gold-bg); color: #6b5310; }
#mtdtp .mtdtp-taux.low { background: #fbeae7; color: var(--bad); }
