/* Maths'xp — espace prof (prof/*.php), charte « carnet » : classes, élèves, cartes de connexion, exercices et chat. */
.mx-prof .sr-only,.tp-signup .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.tp-band{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;justify-content:center;padding:9px 16px;background:var(--b-bg-amber-7);color:var(--b-ink-amber-3);font-weight:700;font-size:14px;text-align:center}
.tp-band a{color:inherit;font-weight:850}
.tp-sub{margin:-6px 0 14px;color:var(--b-ink-soft);font-weight:650}
.tp-sub a{color:inherit}
.tp-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
.tp-tabs a{padding:7px 14px;border-radius:999px;border:1px solid var(--b-line);background:var(--b-card);color:var(--b-ink);text-decoration:none;font-weight:750;font-size:14px}
.mx-prof .tp-tabs a[aria-current]{background:var(--b-ink);border-color:var(--b-ink);color:var(--b-card)}
.tp-bar{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;margin:0 0 18px}
.tp-bar .muted{font-size:13px}
.tp-kpis{margin-bottom:18px}
.tp-kpis .value small{font-size:16px;color:var(--b-ink-soft);font-weight:700}
.tp-inline{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0}
.tp-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
.tp-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}
.tp-row .field{margin:0;flex:1;min-width:180px}
.tp-form .field small,.tp-signup .field small{font-weight:500;color:var(--b-ink-soft)}
.tp-form .field{min-width:0}
.tp-form select.input{width:100%;max-width:100%}
.tp-grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.tp-classes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-bottom:18px}
.tp-class{padding:18px}
.tp-class header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.tp-class h2{margin:0;font-size:22px}
.tp-class h2 a{color:inherit;text-decoration:none}
.tp-class p{margin:6px 0 0}
.tp-steps{margin:0;padding-left:20px;line-height:1.6}
.tp-steps li{margin:4px 0}
.mx-prof .table-wrap{position:relative} /* les libellés cachés (sr-only) des cellules restent dans la zone qui défile */
.tp-table td{vertical-align:middle}
.tp-table tr.is-quiet td{color:var(--b-ink-soft)}
.tp-row-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.tp-students{list-style:none;margin:0;padding:0}
.tp-students li{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;padding:12px 0;border-top:1px solid var(--b-line)}
.tp-students li:first-child{border-top:0}
.tp-student{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-width:0}
.tp-student code{font-size:13px;color:var(--b-ink-soft)}
.tp-student small{color:var(--b-ink-soft)}
.mx-prof .sr-only{left:0;top:0}
.tp-row-actions select{min-width:100px}
.tp-danger summary{cursor:pointer;color:var(--b-err);font-weight:750}
.tp-danger form{margin-top:10px}
.tp-chapters{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.tp-chapters li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;align-items:center;padding:14px 16px}
.tp-chapters li small{display:block;color:var(--b-ink-soft);margin-top:2px}
.tp-chapters .tp-actions{margin:0}
.tp-bars{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.tp-bars li{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(80px,1fr) auto;gap:10px;align-items:center;font-size:14px}
.tp-meter{height:10px;border-radius:999px;background:var(--b-bg);overflow:hidden}
.tp-meter i{display:block;height:100%;background:var(--b-ok);border-radius:999px}
.tp-dl{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:10px 0 14px}
.tp-dl dt{color:var(--b-ink-soft);font-weight:700}
.tp-dl dd{margin:0;font-weight:750}
.tp-total{margin:4px 0 12px}
.tp-total small{color:var(--b-ink-soft)}
.tp-check{display:flex;gap:9px;align-items:flex-start;margin:8px 0;font-size:14px;line-height:1.45}
.tp-check input{margin-top:3px;flex:none}
.tp-check.is-small{margin:0;font-size:13px;color:var(--b-ink-soft)}
.tp-trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.tp-signup{max-width:640px}
.tp-pitch{margin:0 0 16px;padding-left:20px;text-align:left;line-height:1.5;font-size:14.5px}
.tp-signup form{text-align:left}
/* Exercices d'un chapitre */
.tp-intro p{margin:0}
.tp-notion .section-head{align-items:flex-start}
.tp-lv{display:inline-block;margin-left:6px;font-size:12px;font-weight:800;padding:2px 8px;border-radius:999px;background:var(--b-bg)}
.tp-lvtitle{margin:16px 0 8px;font-size:15px;color:var(--b-ink-soft)}
.tp-ex{border:1px solid var(--b-line);border-radius:12px;background:var(--b-card-2);margin:8px 0}
.tp-ex>summary{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 14px;cursor:pointer;font-weight:750}
.tp-ex-title{flex:1;min-width:160px}
.tp-ex-served{font-size:12px;color:var(--b-ink-soft);font-weight:600}
.tp-ex.is-hidden>summary .tp-ex-title{text-decoration:line-through;color:var(--b-ink-soft)}
.tp-ex.is-mine{border-color:var(--b-line-green-2)}
.tp-ex-body{padding:4px 16px 14px;border-top:1px solid var(--b-line)}
.tp-ex-body p{margin:8px 0;line-height:1.55}
.tp-ex-sol{margin-top:10px}
.tp-ex-sol>summary{cursor:pointer;font-weight:750;color:var(--b-ink-soft)}
.tp-hide{gap:10px}
/* Chat */
.tp-chat{width:min(680px,calc(100vw - 24px));max-height:calc(100vh - 40px);padding:0;border:1px solid var(--b-line);border-radius:16px;background:var(--b-card);color:var(--b-ink)}
.tp-chat::backdrop{background:rgba(20,24,28,.45)}
.tp-chat[open]{display:flex;flex-direction:column}
.tp-chat header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--b-line)}
.tp-chat h2{margin:0;font-size:18px}
.tp-x{border:0;background:none;font-size:26px;line-height:1;cursor:pointer;color:inherit}
.tp-chat-note{margin:10px 18px 0;font-size:13px}
.tp-chat-log{flex:1;overflow:auto;padding:12px 18px;display:flex;flex-direction:column;gap:10px;min-height:120px}
.tp-chat-empty{color:var(--b-ink-soft);margin:0}
.tp-msg{max-width:92%;padding:10px 13px;border-radius:12px;font-size:14.5px;line-height:1.5}
.tp-msg p{margin:0 0 6px}
.tp-msg p:last-child{margin-bottom:0}
.tp-msg.is-user{align-self:flex-end;background:var(--b-ink);color:var(--b-card)}
.tp-msg.is-ai{align-self:flex-start;background:var(--b-bg)}
.tp-msg.is-waiting{opacity:.75;font-style:italic}
.tp-proposal{margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--b-card);border:1px solid var(--b-line-green-2)}
.tp-proposal.is-closed{opacity:.7}
.tp-proposal-title{font-weight:800;margin-bottom:6px}
.tp-chat-form{display:flex;gap:8px;align-items:flex-end;padding:12px 18px;border-top:1px solid var(--b-line)}
.tp-chat-form textarea{flex:1;resize:vertical}
/* Cartes de connexion */
.tp-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));gap:12px}
.tp-card{border:1.5px dashed var(--b-line-slate-2);border-radius:12px;padding:14px 16px;background:var(--b-card);break-inside:avoid}
.tp-card header{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;color:var(--b-ink-soft);font-weight:700}
.tp-card h2{margin:10px 0 8px;font-size:19px}
.tp-card dl{display:grid;grid-template-columns:max-content 1fr;gap:4px 10px;margin:0;font-size:13.5px}
.tp-card dt{color:var(--b-ink-soft)}
.tp-card dd{margin:0;word-break:break-all}
.tp-card code{font-size:15px;font-weight:800}
.tp-card-body{display:flex;gap:12px;align-items:flex-start}
.tp-card-qr{flex:0 0 auto;line-height:0}
.tp-card-qr svg{display:block;width:112px;height:112px}
.tp-card-body dl{flex:1;min-width:0;grid-template-columns:1fr}
.tp-card-body dt{font-size:12px}
.tp-card-dl{margin:10px 0 0;font-size:13px}
@media (max-width:720px){.tp-grid3{grid-template-columns:1fr}.tp-row-actions{justify-content:flex-start}.tp-bars li{grid-template-columns:1fr}}
@media print{
  body.mx-prof .mx-phead,body.mx-prof .mx-tabbar,body.mx-prof .mx-pfoot,body.mx-prof .tp-noprint,body.mx-prof .mx-page-title,body.mx-prof .flash,body.mx-prof .tp-band{display:none}
  body.mx-prof{background:#fff}
  .tp-cards{grid-template-columns:repeat(2,1fr);gap:8mm}
  .tp-card{border-color:#999}
}
.tp-ex.is-review{border-color:var(--b-accent);box-shadow:inset 3px 0 0 var(--b-accent)}
.tp-ex-ask{font-size:12.5px;font-style:italic}
.tp-ask{margin:6px 0 10px}
.tp-ask summary{cursor:pointer;font-weight:700}
.tp-ask .tp-grow{flex:1;min-width:min(260px,100%)}
.tp-review-all{margin:0 0 8px}
.tp-review-mode{margin-top:10px}
.tp-review-mode .field{min-width:min(420px,100%)}
.tp-radio{display:flex;gap:8px;align-items:flex-start;margin:6px 0;font-weight:500}
.tp-radio input{margin-top:4px}
.tp-notice{border-left:4px solid var(--b-accent,#2F6FB0)}
.tp-notice p{margin:0 0 10px}
