:root{--bg:#f4f5f7;--card:#fff;--fg:#1c1d22;--muted:#6b7280;--border:#e5e7eb;--accent:#1f5fb1;--danger:#b31f1f;--ok:#1f8d3a;}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--fg);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:.6rem 1rem;background:#fff;border-bottom:1px solid var(--border)}
.topbar .brand{font-weight:700;font-size:1.1rem;color:var(--fg)}
.topbar nav{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}
.topbar nav .who{color:var(--muted);margin-left:.5rem}
button,.btn{cursor:pointer;font:inherit;padding:.4rem .8rem;border:1px solid var(--border);background:#fff;border-radius:4px;color:var(--fg)}
button:hover,.btn:hover{border-color:var(--accent);color:var(--accent)}
button.link{border:0;background:transparent;color:var(--accent);padding:0}
button.danger{border-color:var(--danger);color:var(--danger)}
main{padding:1rem;max-width:1200px;margin:0 auto}
.card{background:var(--card);border:1px solid var(--border);border-radius:6px;padding:1rem 1.2rem;margin-bottom:1rem}
.card.wide{max-width:none}
.card h1{margin-top:0}
.card.auth{max-width:340px;margin:6vh auto}
.centered{display:block;background:var(--bg)}
label{display:block;margin:.5rem 0}
label input,label select{display:block;margin-top:.2rem;width:100%;padding:.4rem;border:1px solid var(--border);border-radius:4px;font:inherit}
form.inline{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center;margin:.5rem 0}
form.inline input,form.inline select{padding:.35rem;border:1px solid var(--border);border-radius:4px;font:inherit}
.error{background:#fee;color:var(--danger);padding:.5rem;border-radius:4px}
.notice{background:#eef4ff;color:#274e8a;padding:.5rem;border-radius:4px}
.actions{display:flex;gap:.5rem;flex-wrap:wrap;margin:.5rem 0 1rem}
table.grid{width:100%;border-collapse:collapse;margin-top:.5rem;font-size:13px}
table.grid th,table.grid td{padding:.35rem .5rem;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
table.grid th{background:#fafafa;font-weight:600}
table.grid td.num,table.grid th.num{text-align:right;font-variant-numeric:tabular-nums}
.footer{padding:1rem;text-align:center;color:var(--muted)}
ul.courses{list-style:none;padding:0}ul.courses li{margin:.3rem 0}
details summary{cursor:pointer;margin-bottom:.4rem}
.learning-mode-box{border:1px solid var(--border);background:#fafcff;border-radius:6px;padding:.7rem 1rem;margin:.4rem 0 1rem}
.learning-mode-box p.muted{margin:.3rem 0 0;color:var(--muted);font-size:.85rem}
.learning-toggle{display:flex;align-items:center;gap:.6rem;margin:0;font-size:1rem;cursor:pointer}
.learning-toggle input{width:auto;margin:0}
.learning-mode-status{font-size:.75rem;padding:2px 8px;border-radius:10px;background:#eee;color:#666;font-weight:600;text-transform:uppercase}
.learning-mode-box input:checked ~ strong + .learning-mode-status,
.learning-toggle input:checked + strong + .learning-mode-status{background:#dff6dd;color:#1a7a30}
/* ---- Accueil : bandeau + cours regroupés par unité ---- */
.hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:2rem;margin:.6rem 0 1.8rem;padding:2.2rem 2.4rem;border-radius:16px;color:#fff;background:linear-gradient(120deg,#0f2a5a 0%,#1f5fb1 55%,#2f8fd6 100%);box-shadow:0 12px 30px rgba(31,95,177,.25)}
.hero::after{content:"";position:absolute;right:-8%;top:-40%;width:55%;height:180%;background:radial-gradient(closest-side,rgba(255,255,255,.14),transparent 70%);pointer-events:none}
.hero-text{position:relative;max-width:58ch}
.hero-kicker{margin:0 0 .5rem;font-size:.8rem;letter-spacing:.12em;text-transform:uppercase;opacity:.8}
.hero h1{margin:0 0 .6rem;font-size:2.3rem;line-height:1.1;font-weight:800;letter-spacing:-.01em}
.hero h1 span{color:#ffd166}
.hero .lede{margin:0;font-size:1.05rem;line-height:1.5;opacity:.92}
.hero-cta{display:inline-block;margin-top:1.2rem;padding:.6rem 1.2rem;border-radius:999px;background:#ffd166;color:#0f2a5a;font-weight:700;text-decoration:none;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.hero-cta:hover{background:#ffde8a;text-decoration:none}
.hero-art{position:relative;display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem;flex:none}
.hero-art span{display:flex;align-items:center;justify-content:center;width:4.2rem;height:4.2rem;border-radius:14px;background:rgba(255,255,255,.14);backdrop-filter:blur(4px);font-size:2rem;box-shadow:inset 0 1px 0 rgba(255,255,255,.25)}
@media (max-width:720px){.hero{padding:1.6rem 1.4rem;flex-direction:column;align-items:flex-start}.hero h1{font-size:1.8rem}.hero-art{display:none}}

.unit{--u:#1f5fb1;--u-soft:#e8f0fb;margin:0 0 1.6rem;padding:1.3rem 1.4rem 1.2rem;background:var(--card);border:1px solid var(--border);border-radius:14px;box-shadow:0 2px 10px rgba(0,0,0,.03)}
.unit-u4{--u:#1f8d3a;--u-soft:#e6f5ea}
.unit-co-ens{--u:#c2611f;--u-soft:#fbeee3}
.unit-head{display:flex;align-items:center;gap:.9rem;margin-bottom:1rem}
.unit-tag{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:3.4rem;height:2.4rem;padding:0 .7rem;border-radius:9px;background:var(--u);color:#fff;font-weight:800;letter-spacing:.03em;font-size:1.05rem}
.unit-co-ens .unit-tag{font-size:.8rem}
.unit-title h2{margin:0;font-size:1.25rem;letter-spacing:-.005em}
.unit-note{margin:.15rem 0 0;color:var(--muted);font-size:.85rem}
.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.9rem}
.course-card{position:relative;display:flex;gap:.9rem;align-items:flex-start;padding:1rem 2.4rem 1rem 1rem;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--fg);text-decoration:none;transition:transform .15s,box-shadow .15s,border-color .15s}
a.course-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.09);border-color:var(--u);text-decoration:none}
.course-emoji{flex:none;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:12px;background:var(--u-soft);font-size:1.55rem;line-height:1}
.course-body{display:flex;flex-direction:column;gap:.2rem;min-width:0}
.course-body strong{font-size:1.06rem;color:var(--u)}
.course-desc{color:var(--muted);font-size:.9rem;line-height:1.4}
.course-go{position:absolute;right:.9rem;top:50%;transform:translateY(-50%);color:var(--u);font-size:1.2rem;opacity:0;transition:opacity .15s,transform .15s}
a.course-card:hover .course-go{opacity:1;transform:translate(3px,-50%)}
.soon-row{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;margin:1rem 0 0;font-size:.85rem}
.soon-label{color:var(--muted);margin-right:.2rem}
.soon-chip{padding:.2rem .7rem;border-radius:999px;background:var(--bg);border:1px dashed #c9ced6;color:var(--muted)}

/* ---- Admin : séances et nuage de points ---- */
.tp-state{font-size:.75rem;padding:2px 8px;border-radius:10px;background:#eee;color:#555;white-space:nowrap}
.tp-state-session{background:#dff6dd;color:#1a7a30}
.tp-state-grace{background:#fdf1dc;color:#8a5a10}
.tp-state-closed{background:#eceff3;color:#5a6472}
.badge-warn{display:inline-block;min-width:1.4rem;padding:1px 7px;border-radius:10px;background:#fdecea;color:#c0392b;font-weight:700}
.a-venir{margin:.3rem 0 1.2rem}
.a-venir summary{cursor:pointer;color:var(--muted)}
.nuage-wrap{position:relative;margin:.6rem 0 1.2rem}
.nuage{width:100%;height:auto;background:#fff;border:1px solid var(--border);border-radius:6px}
.nuage-plot{fill:#fbfcfe;stroke:none}
.nuage-axis{stroke:#8a94a6;stroke-width:1}
.nuage-tick{stroke:#c3cad4;stroke-width:1}
.nuage-tick-label{fill:#6b7480;font-size:11px}
.nuage-axis-label{fill:#4a5462;font-size:12px;font-weight:600}
.nuage-guide{stroke-width:1.5;stroke-dasharray:6 4}
.nuage-guide-median{stroke:#1f5fb1}
.nuage-guide-half{stroke:#c0392b}
.nuage-guide-label{font-size:11px;font-weight:600}
text.nuage-guide-median{fill:#1f5fb1;stroke:none}
text.nuage-guide-half{fill:#c0392b;stroke:none}
.nuage-band{stroke:#c3cad4;stroke-width:1;stroke-dasharray:3 3}
.nuage-band-label{fill:#8a94a6;font-size:11px}
.nuage-pt{stroke:#fff;stroke-width:1.5;opacity:.85;cursor:pointer;transition:opacity .12s,stroke-width .12s}
.nuage-pt-off{opacity:.55;stroke-dasharray:2 2}
.nuage-pt:hover,.nuage-pt-hl{opacity:1;stroke:#1b2430;stroke-width:2.5}
.nuage-pt-label{fill:#25303d;font-size:11px;font-weight:600;pointer-events:none;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.nuage a:hover .nuage-pt-label,.nuage a:focus .nuage-pt-label{fill:#000;font-size:12px}
.nuage-pt-leader{stroke:#9aa3ad;stroke-width:1;stroke-dasharray:2 2;pointer-events:none}
.nuage-legend text{fill:#4a5462;font-size:11px}
.nuage-tip{position:absolute;z-index:5;max-width:260px;padding:.35rem .55rem;border-radius:5px;background:#1b2430;color:#fff;font-size:.8rem;line-height:1.3;pointer-events:none;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.nuage-table tr.hl>td{background:#eef4ff}
.nuage-table tr.niveau-1>td:first-child{box-shadow:inset 3px 0 0 #d98324}
.nuage-table tr.niveau-2>td:first-child{box-shadow:inset 3px 0 0 #c0392b}
.badge-niv{display:inline-block;padding:1px 8px;border-radius:10px;font-size:.8rem;background:#fdf1dc;color:#8a5a10}
.badge-niv-2{background:#fdecea;color:#c0392b}
.muted{color:var(--muted)}
table.grid tr.muted>td{color:var(--muted)}

/* ---- Boutons de navigation de l'admin (couleurs de l'accueil) ---- */
.actions.nav{gap:.6rem;margin:.6rem 0 1.2rem}
.actions.nav .btn,.adminbar .btn{display:inline-flex;align-items:center;gap:.45rem;padding:.55rem 1rem;border:0;border-radius:999px;color:#fff;font-weight:700;font-size:.95rem;box-shadow:0 3px 10px rgba(0,0,0,.12);transition:transform .12s,box-shadow .12s}
.actions.nav .btn:hover,.adminbar .btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.18);color:#fff;text-decoration:none}
.actions.nav .btn .ico,.adminbar .btn .ico{font-size:1.1rem;line-height:1}
.btn-seances{background:linear-gradient(120deg,#5a2a0f,#c2611f)}
.btn-comptes{background:linear-gradient(120deg,#1c1d22,#4b5563)}
.btn-resultats{background:linear-gradient(120deg,#0f3d1c,#1f8d3a)}
.btn-tp{background:linear-gradient(120deg,#0f2a5a,#1f5fb1)}
.btn-export{background:linear-gradient(120deg,#2a1a5e,#5b3fb8)}

/* ---------- Vues de synthèse (9 sept. 2026) ---------- */
.classes-nav{display:flex;gap:.4rem;flex-wrap:wrap;margin:.2rem 0 .8rem}
.chip{display:inline-block;padding:.25rem .8rem;border-radius:999px;border:1px solid var(--border);background:#fff;color:var(--fg);text-decoration:none;font-size:.9rem}
.chip.on{background:#1f5fb1;border-color:#1f5fb1;color:#fff}
.chip:hover{text-decoration:none;border-color:#1f5fb1}
.lg{padding:0 .35rem;border-radius:3px;color:#fff}.lg0{background:#1f8d3a}.lg1{background:#d98324}.lg2{background:#c0392b}
.two-cols{display:grid;grid-template-columns:2fr 1fr;gap:1.2rem}
@media (max-width:900px){.two-cols{grid-template-columns:1fr}}
.call-list{padding-left:1.1rem;margin:.3rem 0}.call-list li{margin:.2rem 0}
/* le mur */
.mur-wrap{overflow-x:auto;margin:.4rem 0 .8rem}
.mur{border-collapse:separate;border-spacing:2px;font-size:.82rem}
.mur th{font-weight:600;color:#4a5462;padding:.2rem .3rem;text-align:center;vertical-align:bottom;white-space:nowrap}
.mur th.mur-th small{display:block;font-weight:400;color:var(--muted);font-size:.7rem}
.mur th a{color:inherit}
.mur .mur-subjects th{font-size:.85rem;padding-bottom:.3rem}
.mur td.mur-name{white-space:nowrap;padding:.15rem .5rem .15rem .2rem;text-align:left}
.mur td.mur-c{width:2.3rem;min-width:2.3rem;height:1.7rem;text-align:center;border-radius:4px;color:#fff;font-weight:600}
.mur td.mur-c a{color:#fff;text-decoration:none;display:block}
.mur td.niv0{background:#1f8d3a}.mur td.niv1{background:#d98324}.mur td.niv2{background:#c0392b}
.mur td.abs{background:#e9ecf0;color:#8a94a6}
.mur td.mur-avg,.mur th.mur-avg{border-left:2px solid #fff;margin-left:4px}
.mur td.mur-global{outline:2px solid #1b2430;outline-offset:-2px}
.mur tfoot td{color:#4a5462;font-size:.75rem;padding-top:.2rem}
.mur tfoot td.mur-c{height:1.3rem;font-weight:500}
.mur tfoot td.mur-c:not(.niv0):not(.niv1):not(.niv2){background:#f1f3f6;color:#4a5462}
/* le peloton */
.pel-track{stroke:#8a94a6;stroke-width:3;stroke-linecap:round}
.pel-stop{fill:#fff;stroke:#8a94a6;stroke-width:2}.pel-stop.has{fill:#1b2430;stroke:#1b2430}
.pel-num{fill:#4a5462;font-size:11px;font-weight:600}.pel-title{fill:#8a94a6;font-size:9px}
.pel-count{fill:#1b2430;font-size:11px;font-weight:700}
.pel-name{font-size:10px;font-weight:600;letter-spacing:-.2px;cursor:pointer}
.pel-name.silent{fill-opacity:.45}
.nuage a:hover .pel-name{fill:#1b2430;text-decoration:underline}
.pel-dot{stroke:#fff;stroke-width:1.2;cursor:pointer}.pel-dot.stuck{stroke:#1b2430;stroke-width:2;stroke-dasharray:2 1.5}
.pel-dot:hover{stroke:#1b2430;stroke-width:2.5}
.pel-wall{fill:#fdecea;stroke:#c0392b;stroke-dasharray:4 3;stroke-width:1}
.grid tr.hl>td{background:#fdecea}
.creux-warn{color:#8a5a10;font-weight:600}.creux-bad{color:#c0392b;font-weight:700}
.seance-table td:first-child{white-space:nowrap;color:#4a5462}
.seance-table tr.creux-row td{background:#fff7f5;font-style:italic}.seance-table tr.creux-row.creux-bad td{background:#fdecea}
.pel-dot.silent{fill-opacity:.35;stroke:#8a94a6;stroke-dasharray:1.5 1.5}
/* les empreintes */
.glyph-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(400px,1fr));gap:.6rem;margin:.4rem 0 1rem}
.glyph-card{display:flex;gap:.6rem;align-items:flex-start;border:1px solid var(--border);border-radius:8px;padding:.5rem .6rem;background:#fff}
.glyph-card.niv1{border-left:4px solid #d98324}.glyph-card.niv2{border-left:4px solid #c0392b}.glyph-card.niv0{border-left:4px solid #1f8d3a}
.glyph-card.off{opacity:.6}
.glyph-card svg{flex:none}
.gl-axis{stroke:#e1e5ea;stroke-width:1}.gl-ring{fill:none;stroke:#eef1f4;stroke-width:1}
.gl-poly{fill-opacity:.28;stroke-width:1.6;stroke-linejoin:round}
.glyph-name{font-weight:700;color:var(--fg)}
.gl-num{fill:#4a5462;font-size:9px;font-weight:600}.gl-num-top{font-size:10px;fill:#1b2430}.gl-num.gl-bad{fill:#c0392b}
.glyph-phrases{margin:.2rem 0 0;padding-left:1rem;font-size:.82rem;color:#4a5462}.glyph-phrases li{margin:.1rem 0}
/* les trajectoires */
.traj-col{stroke:#e1e5ea;stroke-width:1}
.traj-col-label{fill:#4a5462;font-size:12px;font-weight:700}
.traj-path{stroke-width:2;opacity:.7;stroke-linejoin:round}
.traj-line:hover .traj-path{opacity:1;stroke-width:3.5}
.traj-pt{stroke-width:1.5}.traj-pt.off{stroke-dasharray:2 1.5}
.traj-name{font-size:11px;font-weight:600;paint-order:stroke;stroke:#fff;stroke-width:3px}
/* dashboard */
.dash-today{display:flex;flex-wrap:wrap;gap:.8rem;margin:.4rem 0 1rem}
.dash-live{flex:1;min-width:280px;border:2px solid #1f8d3a;background:#f0faf2;border-radius:10px;padding:.7rem 1rem}
.dash-live h2,.dash-next h2{margin:0 0 .3rem;font-size:1rem}
.dash-next{flex:1;min-width:280px;border:1px solid var(--border);border-radius:10px;padding:.7rem 1rem;background:#fafcff}
.dash-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.7rem;margin:.4rem 0 1rem}
.dash-tile{display:flex;gap:.7rem;align-items:center;padding:.8rem .9rem;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--fg);text-decoration:none;transition:transform .12s,box-shadow .12s}
.dash-tile:hover{text-decoration:none;transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.08)}
.dash-tile .ico{font-size:1.5rem;width:2.2rem;text-align:center}
.dash-tile strong{display:block}.dash-tile small{color:var(--muted)}
.dash-classes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:.7rem;margin:.4rem 0 1rem}
.dash-class{border:1px solid var(--border);border-radius:10px;padding:.7rem .9rem;background:#fff}
.dash-class h3{margin:0 0 .3rem}
.dash-class .links{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.4rem}
.dash-settings summary{cursor:pointer;font-weight:600;padding:.4rem 0}

/* ---- Menu prof (barre sous l'en-tête) et pages d'administration refondues (10 sept. 2026) ---- */
.adminbar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;padding:.5rem 1rem;background:#fff;border-bottom:1px solid var(--border)}
.adminbar .btn.on{outline:3px solid rgba(31,95,177,.35);outline-offset:1px}
.adminbar .aide-link{margin-left:auto;color:var(--muted);font-size:.9rem;text-decoration:underline}
.btn-live{background:linear-gradient(120deg,#0f3d1c,#1f8d3a)}
/* « Le direct » : la vue de séance. Bleu de la maison, en tête de barre — c'est le bouton le plus cliqué d'une heure de TP. */
.btn-direct{background:linear-gradient(120deg,#0f2a5a,#0055aa)}
.btn-eleves{background:linear-gradient(120deg,#1c1d22,#4b5563)}
.btn-reglages{background:linear-gradient(120deg,#2a1a5e,#5b3fb8)}
.aide-encart{background:#fff8e1;color:#7a5a10}
.filtres{display:flex;gap:.4rem;flex-wrap:wrap;margin:.4rem 0 .8rem}
/* Onglets d'un TP */
.tabs{display:flex;gap:.2rem;border-bottom:2px solid var(--border);margin:.8rem 0 1rem}
.tabs .tab{padding:.5rem 1.1rem;border:1px solid var(--border);border-bottom:0;border-radius:8px 8px 0 0;background:#f7f8fa;color:var(--muted);text-decoration:none;font-weight:600;margin-bottom:-2px}
.tabs .tab:hover{color:var(--accent);text-decoration:none}
.tabs .tab.on{background:#fff;color:var(--accent);border-color:var(--border);border-bottom:2px solid #fff}
/* Suivi en direct */
.live-tp{border:1px solid var(--border);border-radius:10px;padding:.9rem 1.1rem;margin:0 0 1.2rem;background:#fff}
.live-tp h2{margin:.1rem 0 .6rem;font-size:1.15rem}
.live-tp h2 .tp-state{margin:0 .4rem}
.live-tp h3{margin:.9rem 0 .3rem;font-size:.95rem}
.live-figures{display:flex;gap:.6rem;flex-wrap:wrap;margin:.5rem 0 .9rem}
.live-figures .fig{flex:1;min-width:120px;padding:.5rem .7rem;border:1px solid var(--border);border-radius:8px;background:#fbfcfe}
.live-figures .fig strong{display:block;font-size:1.6rem;line-height:1.1;font-variant-numeric:tabular-nums}
.live-figures .fig strong .of{font-size:.9rem;color:var(--muted);font-weight:400}
.live-figures .fig small{color:var(--muted);font-size:.78rem}
.live-figures .fig-warn{background:#fdecea;border-color:#f3c9c3}
.bars{margin:.3rem 0 .6rem;max-width:520px}
.bar-row{display:flex;align-items:center;gap:.5rem;margin:.15rem 0;font-size:.85rem}
.bar-label{width:5.5rem;color:var(--muted);text-align:right;flex:none}
.bar-track{flex:1;height:.85rem;background:#eef0f4;border-radius:5px;overflow:hidden}
.bar-fill{display:block;height:100%;border-radius:5px}
.bar-n{width:1.8rem;text-align:right;font-variant-numeric:tabular-nums;flex:none}
/* Les TP frères d'un même cours (paliers, Salle CSS) : une ligne chacun sous le bloc détaillé (24 sept. 2026). */
.live-aussi{margin:.8rem 0 0;padding-top:.6rem;border-top:1px dashed var(--border)}
.live-aussi h3{margin:0 0 .3rem;font-size:.85rem;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.live-aussi ul{list-style:none;margin:0;padding:0}
.live-aussi li{display:flex;align-items:baseline;gap:.5rem;flex-wrap:wrap;padding:.22rem 0;font-size:.92rem}
.live-aussi li + li{border-top:1px solid #f0f2f5}
.live-aussi a{font-weight:600}
.badge-libre{display:inline-block;padding:0 7px;border-radius:10px;background:#eef3fb;color:#1f5fb1;font-size:.75rem;font-weight:700}

/* Défense orale : une ligne par élève, formulaire compact */
.def-questions{margin:.4rem 0 .8rem}.def-questions ol{margin:.4rem 0 0 1.2rem;padding:0}.def-questions li{margin:.2rem 0}
.def-form{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin:0}
.def-form label{display:inline-flex;align-items:center;gap:.3rem;margin:0}
.def-form select{width:auto;display:inline-block;margin:0;padding:.25rem .4rem}
.def-score{display:inline-flex;gap:.6rem;padding:.15rem .5rem;border:1px solid var(--border);border-radius:6px;background:#fff}
.def-score input{width:auto;margin:0}
.def-table td{vertical-align:middle}

/* Élèves : deux colonnes de tableau côte à côte */
.eleves-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1rem;align-items:start}
.eleves-table{width:100%;font-size:13px}.eleves-table td,.eleves-table th{padding:.3rem .45rem;white-space:nowrap}

/* Section « Outils » de l'accueil (Mes fichiers, atelier) : mêmes cartes, autre couleur. */
.unit-outils{--u:#7b3fa0;--u-soft:#f1e8f7}

/* Arbre « Mes fichiers » d'un élève, sur sa fiche (lecture seule). */
.eleve-fichiers .fi-arbre{list-style:none;margin:.3rem 0;padding-left:0}
.eleve-fichiers .fi-arbre ul{list-style:none;padding-left:1.1rem;margin:.1rem 0}
.eleve-fichiers .fi-arbre li{margin:.12rem 0;font-size:.92rem}

/* « Se connecter en tant que » : bandeau permanent, impossible à confondre avec une page normale. */
.impersonation-bar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #8a2b06; color: #fff; padding: 8px 16px; font-size: .92rem; font-weight: 600;
}
.impersonation-bar strong { color: #ffd9a0; }
.impersonation-bar form { margin: 0; }
.impersonation-bar button {
  background: #fff; color: #8a2b06; border: 0; border-radius: 5px;
  padding: 5px 12px; font-weight: 700; cursor: pointer; font-size: .88rem;
}
.impersonation-bar button:hover { background: #ffd9a0; }

/* Corrigés sur l'accueil : réservés aux profs, repérables d'un coup d'œil. */
.unit-corriges .unit-tag { background: #8a2b06; color: #fff; }
.unit-corriges .course-card { border-left: 4px solid #8a2b06; }

/* ---- Bilan d'une séance ---- */
.tiles-b { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.tiles-b .tb { flex: 1 1 130px; border: 1px solid var(--border, #e2e2e2); border-radius: 8px; padding: 10px 12px; background: #fff; }
.tiles-b .tb b { display: block; font-size: 1.5rem; color: #0055aa; line-height: 1.1; }
.tiles-b .tb span { font-size: .82rem; color: #595959; }
.tbl { width: 100%; border-collapse: collapse; margin: 8px 0 18px; }
.tbl th, .tbl td { border-bottom: 1px solid #eee; padding: 5px 8px; text-align: left; vertical-align: middle; }
.tbl th { background: #f4f7fb; font-size: .85rem; }
.tbl tr.mur td { background: #fff4d6; font-weight: 600; }
.tbl tr.absent td { color: #999; }
.barre { background: #eee; border-radius: 4px; height: 10px; width: 180px; overflow: hidden; }
.barre span { display: block; height: 100%; background: #0055aa; }
.bq { border: 1px solid #e2e2e2; border-left: 4px solid #b23a1d; border-radius: 8px; padding: 10px 14px; margin: 10px 0; background: #fff; }
.bq.bq-ext { border-left-color: #8a5a00; }
.bq header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: .82rem; margin-bottom: 4px; }
.bq .bq-n { background: #b23a1d; color: #fff; border-radius: 10px; padding: 1px 9px; font-weight: 700; }
.bq .bq-d { color: #595959; }
.bq .bq-m { margin-left: auto; color: #888; }
.bq .bq-t { margin: 2px 0; }
.bq .bq-p { color: #333; }
.bq .bq-p p { margin: 3px 0; }
.bq .bq-r { margin-top: 6px; background: #e8f5e9; border-radius: 5px; padding: 4px 9px; display: inline-block; font-size: .92rem; }
.bq .bq-opts { list-style: none; margin: 6px 0 0; padding: 0; }
.bq .bq-opts li { padding: 2px 8px; border-radius: 4px; font-size: .92rem; }
.bq .bq-opts li.ok { background: #e8f5e9; font-weight: 600; }
.bq .bq-e { margin-top: 7px; font-size: .92rem; }
.bq .bq-e summary { cursor: pointer; color: #0055aa; }
.bq .bq-e > div { padding: 6px 10px; background: #f6f8fb; border-radius: 5px; margin-top: 4px; }

/* ---- Tableau de bord prof : une question par bloc ---- */
.dash .dash-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.dash .dash-head h1 { margin: 0; }
.dash .filtres { margin: 0; }
.dash section { margin: 22px 0 0; }
.dash section > h2 { font-size: 1.05rem; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.dash section > h2 small { font-weight: 400; font-size: .82rem; }

.now { border-radius: 10px; padding: 12px 16px; margin-top: 14px; }
.now-off { background: #f4f6f8; color: #444; }
.now-off p { margin: 0; }
.now-on { background: #f1f9f3; border: 1px solid #cfe8d6; }
.now-on h2 { color: #1a7a30; margin-top: 0; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #1a7a30; display: inline-block; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.tpc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.tpc { border: 1px solid #e2e2e2; border-left: 4px solid #bbb; border-radius: 9px; padding: 11px 14px; background: #fff; }
.tpc-grace, .tpc-session { border-left-color: #1a7a30; }
.tpc-early { border-left-color: #0055aa; }
.tpc-closed { border-left-color: #bbb; }
.tpc header { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.tpc .tpc-t { font-weight: 700; text-decoration: none; color: #1a1a1a; }
.tpc .tpc-t:hover { color: #0055aa; text-decoration: underline; }
.tpc .tpc-m { margin: 3px 0 8px; font-size: .84rem; color: #666; }
.tpc-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #eee; }
.tpc-bar span { display: block; }
.tpc-bar .b-fini { background: #1a7a30; }
.tpc-bar .b-cours { background: #d4a017; }
.tpc-bar .b-rien { background: #dcdcdc; }
.tpc .tpc-n { margin: 6px 0 8px; font-size: .82rem; color: #555; }
.tpc .tpc-n b { color: #1a1a1a; }
.tpc .tpc-a { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tpc .tpc-a a { font-size: .82rem; background: #eef3fa; color: #0055aa; border-radius: 5px; padding: 3px 9px; text-decoration: none; }
.tpc .tpc-a a:hover { background: #0055aa; color: #fff; }

.suite { list-style: none; margin: 0; padding: 0; }
.suite li { padding: 6px 0; border-bottom: 1px solid #f0f0f0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.suite .suite-d { min-width: 190px; color: #444; font-size: .88rem; }
.suite .muted { font-size: .84rem; }

.replis { margin-top: 26px; border-top: 1px solid #eee; padding-top: 14px; }
.replis details { margin: 8px 0; }
.replis summary { cursor: pointer; font-weight: 600; color: #444; }
.replis .badge { background: #eee; border-radius: 10px; padding: 0 8px; font-size: .8rem; font-weight: 400; color: #555; }
.tpc .tpc-dur { margin: 0 0 8px; font-size: .82rem; background: #fdf3f1; border-radius: 5px; padding: 4px 8px; }
.tpc .tpc-dur a { color: #b23a1d; text-decoration: none; }
.tpc .tpc-dur a:hover { text-decoration: underline; }
.dash h3.mat { font-size: .92rem; color: #0055aa; margin: 14px 0 7px; padding-bottom: 3px; border-bottom: 1px solid #e6edf6; display: flex; align-items: center; gap: 8px; }
.dash h3.mat:first-of-type { margin-top: 4px; }
.dash h3.mat .mat-n { background: #eef3fa; color: #0055aa; border-radius: 9px; padding: 0 7px; font-size: .75rem; font-weight: 400; }
.tbl tr.pareto-vital td { background: #fff8e6; }
.tbl tr.pareto-vital td:first-child { font-weight: 600; }

/* ---- Fiche d'un élève ---- */
.fiche .fiche-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.fiche .fiche-head h1 { margin: 0; line-height: 1.1; }
.fiche .fiche-av { width: 46px; height: 46px; border-radius: 50%; background: #0055aa; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem; font-weight: 700; flex: none; }
.fiche .fiche-meta { margin: 3px 0 0; color: #666; font-size: .86rem; }
.fiche .fiche-retour { margin-left: auto; font-size: .86rem; }
.fiche .tpc-niv0 { border-left-color: #1a7a30; }
.fiche .tpc-niv1 { border-left-color: #d4a017; }
.fiche .tpc-niv2 { border-left-color: #b23a1d; }
.fiche .tpc .tpc-s { font-weight: 700; color: #0055aa; white-space: nowrap; }
.fiche .tpc .tpc-s small { color: #999; font-weight: 400; }
.fiche .jauge { position: relative; height: 9px; background: #eee; border-radius: 5px; overflow: visible; margin: 2px 0 7px; }
.fiche .jauge .j-val { display: block; height: 100%; background: #0055aa; border-radius: 5px; }
.fiche .jauge .j-med { position: absolute; top: -3px; width: 2px; height: 15px; background: #333; }
.fiche .tpc-n .sous { color: #b23a1d; font-weight: 600; }
.fiche .tpc-n .sur { color: #1a7a30; font-weight: 600; }
.fiche .tpc-eff { margin: 4px 0 0; font-size: .8rem; color: #8a5a00; }
.fiche .call-list { list-style: none; margin: 0; padding: 0; }
.fiche .call-list li { padding: 5px 0; border-bottom: 1px solid #f2f2f2; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fiche details h4 { margin: 12px 0 6px; font-size: .92rem; }
.fiche .tb-pos b { color: #1a7a30; }
.fiche .tb-pos b small { font-size: .6em; vertical-align: super; }
.fiche h3.mat .mat-pos { margin-left: auto; font-size: .78rem; font-weight: 400; color: #555; }
.fiche h3.mat { flex-wrap: wrap; }

/* ---- Liste des élèves : une ligne par élève, une colonne par matière ---- */
.listing .cl-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 20px 0 8px; }
.listing .cl-head h2 { margin: 0; }
.listing .cl-head .filtres { margin: 0 0 0 auto; }
.listing-tbl th { font-size: .78rem; white-space: nowrap; }
.listing-tbl th.th-rang, .listing-tbl th.th-pin { width: 32px; }
.listing-tbl th.th-mat, .listing-tbl th.th-glob { text-align: center; }
.listing-tbl td { padding: 3px 8px; }
.listing-tbl td.td-nom a { font-weight: 600; text-decoration: none; }
.listing-tbl td.td-nom a:hover { text-decoration: underline; }
.listing-tbl tbody tr:hover { background: #f7fafd; }
.pastille { display: inline-block; min-width: 42px; text-align: center; border-radius: 10px;
  padding: 1px 7px; font-size: .78rem; font-weight: 600; }
.pastille.niveau-0 { background: #dff3e4; color: #15682b; }
.pastille.niveau-1 { background: #fdf0d6; color: #8a5a00; }
.pastille.niveau-2 { background: #fbe3de; color: #96301a; }
.pastille.niveau-vide { background: #f0f0f0; color: #999; font-weight: 400; }
.listing .legende { font-size: .8rem; margin-top: 6px; }
.listing .legende .pastille { min-width: 0; }
.mur-lecture { display: flex; gap: 26px; flex-wrap: wrap; background: #f7fafd; border: 1px solid #e3ecf5;
  border-radius: 8px; padding: 9px 14px; margin: 10px 0 14px; font-size: .88rem; }
.mur-lecture b { color: #0055aa; margin-right: 6px; }
.mur-wrap { overflow: auto; max-height: 78vh; }
.mur thead th { position: sticky; top: 0; background: #fff; z-index: 2; }
.mur thead tr.mur-subjects th { top: 0; }
.mur thead tr:nth-child(2) th { top: 27px; }
.mur td.mur-name, .mur th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.mur thead th:first-child { z-index: 3; }

/* ---- Accompagnement personnalisé ---- */
.pastille.dur0 { background: #eef3fa; color: #55607a; }
.pastille.dur1 { background: #fdf0d6; color: #8a5a00; }
.pastille.dur2 { background: #fbe3de; color: #96301a; }
.ap .ap-grp .tpc-s { background: #0055aa; color: #fff; border-radius: 10px; padding: 1px 9px; font-weight: 700; }
.ap .ap-grp .tpc-t { font-weight: 700; }
.ap .ap-noms { margin: 6px 0 0; font-size: .88rem; line-height: 1.7; }
.ap .ap-notion { display: inline-block; margin-right: 14px; font-size: .86rem; white-space: nowrap; }
.ap-tbl td { vertical-align: middle; }

/* AP : le bandeau de mode, la fiche individuelle à revoir */
.ap-mode{border-left:3px solid #2f6fb5}
.ap-fl{font-size:11px;font-weight:600;padding:1px 6px;border:1px solid #c9d1dc;border-radius:9px;color:#2f6fb5;text-decoration:none;white-space:nowrap}
.ap-fl:hover{background:#eef4fb;border-color:#2f6fb5}
.ap-fiche{margin:22px 0}
.ap-fiche h2{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.ap-q{margin:10px 0 0;padding-left:22px}
.ap-q li{margin:0 0 14px;padding:10px 12px;border:1px solid #e6eaf0;border-radius:8px;background:#fbfcfe}
.ap-q li.jamais{border-color:#e4b9b3;background:#fdf6f5}
.ap-q-t{margin:0 0 4px}
.ap-q-p{margin:0 0 6px;color:#39424f}
.ap-q-p p{margin:0 0 4px}
.ap-q-r,.ap-q-m{margin:3px 0;font-size:13px}
.ap-q-r .lab,.ap-q-m .lab{display:inline-block;min-width:62px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#8a94a6}
.ap-q-r{color:#1f6b35}

/* Fiche élève : un TP ouvert sans rien faire, ou le TP d'une autre classe — aucun jugement */
.tpc-gris{border-left:3px solid #d6dce5;background:#fbfcfd}
.tpc-hors{margin:2px 0 6px;font-size:12px;color:#8a6d3b;background:#fdf6e6;border-radius:6px;padding:4px 8px}
.tpc-vide{color:#78828f;font-style:italic}

/* Accueil élève : « reprends d'abord ces TP » */
.unit-reprendre{--u:#8a4b00;--u-soft:#fbf0e2}
.unit-reprendre .unit-tag{background:#8a4b00;color:#fff}
.carte-reprendre{border-left:4px solid #d98324}
.reprendre-jauge{display:block;height:5px;margin-top:7px;border-radius:3px;background:#e6eaf0;overflow:hidden}
.reprendre-jauge span{display:block;height:100%;background:#d98324;border-radius:3px}

/* Accueil élève : la demi-séance de remédiation qui le désigne nommément */
.unit-reco{--u:#1f6b35;--u-soft:#e7f4ec;border-color:#bcdcc8}
.unit-reco .unit-tag{background:#1f6b35;color:#fff}
.unit-reco .unit-note{color:#31404f}
.carte-reco{border-left:4px solid #2f9e5a}

/* Page TP côté prof : « qui doit le passer » */
.reco-prof{margin:0 0 20px;padding:12px 14px;border:1px solid #bcdcc8;border-left:4px solid #2f9e5a;border-radius:10px;background:#f4fbf6}
.reco-prof h2{margin:0 0 2px;font-size:1.05rem}
.reco-prof .tbl{margin-top:10px;background:#fff}
.reco-prof tr.fini td{color:#8a94a6}

/* Tableaux dans les énoncés de TP (mdLite) */
table.md{border-collapse:collapse;margin:12px 0;font-size:.95em}
table.md th,table.md td{border:1px solid var(--border,#d8dee7);padding:6px 10px;text-align:left}
table.md th{background:#f3f6fa;font-weight:600}

/* Page AP : répartition par matière */
.ap-repart{margin:0 0 14px}
.mat-chip{display:inline-block;padding:3px 10px;margin-right:6px;border:1px solid;border-radius:12px;font-size:12px;font-weight:600}
.ap .mat{margin-top:22px}

/* Accueil prof : les exercices envoyés par les élèves, en attente de jugement */
.unit-juger{--u:#8a2b06;--u-soft:#fbeae2;border-color:#e8c4b4}
.unit-juger .unit-tag{background:#8a2b06;color:#fff}
.juger{margin:12px 0;padding:12px 14px;border:1px solid #e6eaf0;border-left:4px solid #d98324;border-radius:10px;background:#fff}
.juger-head{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:6px}
.juger-q{margin:0 0 4px}
.juger-e{color:#4a5462;font-size:.94rem}
.juger-e p{margin:0 0 4px}
.juger-a{margin:4px 0;font-size:.9rem;color:#1f6b35}
.juger-a .lab,.juger-c+form .lab{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#8a94a6;margin-right:6px}
.juger-c{margin:8px 0;padding:10px 12px;background:#1e2229;color:#e8eaee;border-radius:8px;white-space:pre-wrap;word-break:break-word;max-height:16rem;overflow:auto;font-size:.88rem}
.juger-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.juger-form input{flex:1 1 20rem;min-width:12rem;padding:7px 10px;border:1px solid #c9d1dc;border-radius:8px;font:inherit}
.btn-valide,.btn-refuse{padding:7px 14px;border-radius:8px;border:1px solid;cursor:pointer;font:inherit;font-weight:600}
.btn-valide{background:#1f6b35;border-color:#1f6b35;color:#fff}
.btn-refuse{background:#fff;border-color:#c9d1dc;color:#8a2b06}
.reco-lien{color:inherit;text-decoration:none;border-bottom:2px solid currentColor}
.reco-lien:hover{opacity:.8}

/* Suivi de classe : tous les TP en cours, une ligne par élève */
.tbl-wrap{overflow-x:auto;margin:10px 0}
table.suivi{border-collapse:separate;border-spacing:0;font-size:.92rem}
table.suivi th,table.suivi td{padding:5px 8px;border-bottom:1px solid #eef1f5}
table.suivi thead th{position:sticky;top:0;background:#fff;z-index:2;vertical-align:bottom;text-align:left}
table.suivi .col-nom{position:sticky;left:0;background:#fff;z-index:1;white-space:nowrap;min-width:8.5rem}
table.suivi thead .col-nom{z-index:3}
table.suivi tr.ici .col-nom{background:#eefaf1;font-weight:600}
table.suivi tr.absent td{opacity:.55}
.col-quand{white-space:nowrap;color:#5b6572;font-size:.86rem}
.col-quand .ou{display:block;font-size:.76rem;color:#1f8d3a}
.col-tp{min-width:6.6rem}
.col-tp a{text-decoration:none}
.col-sub{display:block;font-weight:400;font-size:.74rem;color:#8a94a6}
td.cel{text-align:center;min-width:5.2rem}
td.cel .n{font-weight:600}
td.cel .n small{font-weight:400;color:#8a94a6}
td.cel .vide{color:#c4ccd6}
td.cel.ferme{background:#f7f8fa}
.barre-cel{display:block;height:4px;margin-top:3px;border-radius:2px;background:#e6eaf0;overflow:hidden}
.barre-cel span{display:block;height:100%;border-radius:2px;background:#8a94a6}
td.fini .barre-cel span{background:#1f8d3a}
td.bien .barre-cel span{background:#57a44a}
td.moyen .barre-cel span{background:#d98324}
td.debut .barre-cel span{background:#c0392b}
td.fini .n{color:#1f8d3a}
.legende .pt{display:inline-block;width:10px;height:10px;border-radius:3px;vertical-align:-1px;margin-right:2px}
.legende .pt.fini{background:#1f8d3a}.legende .pt.bien{background:#57a44a}.legende .pt.moyen{background:#d98324}
.legende .pt.debut{background:#c0392b}.legende .pt.rien{background:#e6eaf0}
.chip.fant{background:#f3f6fa;color:#5b6572;border-color:#dde3ea;cursor:default}

/* Page d'un cours pour une classe : un bloc par TP, peloton puis nuage */
.bloc-tp{margin:0 0 30px;padding:14px 16px 6px;border:1px solid #e6eaf0;border-radius:12px;background:#fbfcfe}
.bloc-tete{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin:0 0 6px;font-size:1.1rem}
.bloc-tete a{text-decoration:none}
.bloc-sous{margin:18px 0 4px;font-size:1rem;color:#4a5462}

/* Page d'un cours, vue compacte : qui appeler, puis une bande par TP */
.appels{margin:0 0 20px;padding:12px 14px;border:1px solid #e4b9b3;border-left:4px solid #c0392b;border-radius:10px;background:#fdf6f5}
.appels h2{margin:0 0 8px;font-size:1.05rem}
.appel-liste{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:5px}
.appel-liste li{display:flex;gap:9px;align-items:baseline;flex-wrap:wrap;padding:4px 8px;border-radius:7px;background:#fff}
.appel-liste li.r0{border-left:3px solid #c0392b}
.appel-liste li.r1{border-left:3px solid #d98324}
.appel-liste li.r2{border-left:3px solid #c9d1dc}
.appel-liste a{font-weight:600;text-decoration:none}
.appel-liste .tp-tag{font-size:11px;font-weight:700;padding:1px 6px;border-radius:9px;background:#eef2f7;color:#4a5462}
.appel-liste .quoi{color:#5b6572;font-size:.92rem}
.bande{margin:0 0 18px;padding:10px 14px 4px;border:1px solid #e6eaf0;border-radius:11px;background:#fbfcfe}
.bande-tete{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin:0 0 4px;font-size:1.02rem}
.bande-tete a{text-decoration:none}
.bande-chiffres{display:flex;gap:16px;flex-wrap:wrap;font-size:.9rem;color:#4a5462;margin-bottom:2px}
.bande-chiffres strong{font-size:1.05rem;color:#1b2430}
.bande-chiffres .mal strong{color:#c0392b}
.bande-chiffres .mur{color:#8a4b00}

/* Déblocage groupé d'un TP : une case par élève, avec son avancement sur le prérequis */
.deblocage .tbl{margin:8px 0;max-width:46rem}
.deblocage tr.ok td{color:#1f8d3a}
.deblocage input[type=checkbox]{width:auto;margin:0}
.deblocage-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:6px 0 0}
.puce{display:inline-flex;gap:5px;align-items:center;margin-right:12px;white-space:nowrap}

/* ---- Accueil : une colonne par cours (23 sept. 2026) ----
   Cartes compactes et denses : un élève ne lit pas un paragraphe, il cherche son bouton.
   Les couleurs d'unité reprennent celles de .unit-* (bleu U6, vert U4, orange co-ens). */
.bonjour{margin:.9rem 0 1.1rem;font-size:1.35rem;font-weight:600;letter-spacing:-.01em}
.bonjour strong{font-weight:800}
/* Une seule rangée, toujours : les matières se lisent à l'horizontale. Au-delà de la largeur,
   la rangée défile, elle ne passe pas à la ligne (une colonne reléguée sous une autre serait invisible).
   Sur un téléphone, les colonnes s'empilent. L'accueil a droit à plus de large que les autres pages. */
body:has(.colonnes) main{max-width:1760px}
.colonnes{display:flex;gap:1rem;align-items:flex-start;overflow-x:auto;padding-bottom:.6rem;scroll-snap-type:x proximity}
.col{flex:1 1 280px;min-width:280px;max-width:400px;scroll-snap-align:start}
@media (max-width:640px){.colonnes{flex-direction:column;overflow:visible}.col{min-width:0;max-width:none;flex:none}}
.col{--u:#1f5fb1;--u-soft:#e8f0fb;display:flex;flex-direction:column;gap:.55rem;padding:.9rem .9rem 1rem;background:var(--card);border:1px solid var(--border);border-top:3px solid var(--u);border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,.03)}
.col-u4{--u:#1f8d3a;--u-soft:#e6f5ea}
.col-co-ens{--u:#c2611f;--u-soft:#fbeee3}
.col-head{display:flex;align-items:center;gap:.5rem;margin:0 0 .2rem}
.col-emoji{flex:none;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:8px;background:var(--u-soft);font-size:1.15rem;line-height:1}
.col-head h2{margin:0;font-size:1.02rem;letter-spacing:-.005em;flex:1;min-width:0}
.col-head h2 a{color:var(--u)}
.col-unit{flex:none;font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--u);opacity:.7}
.carte{display:flex;flex-direction:column;gap:.25rem;padding:.55rem .65rem;border:1px solid var(--border);border-left:3px solid #c9d1dc;border-radius:9px;background:#fff}
.carte strong{font-size:.93rem;line-height:1.25}
.carte-meta{color:var(--muted);font-size:.78rem}
.carte-chiffres{font-size:.78rem;color:#4a5462;font-variant-numeric:tabular-nums}
.carte-btn{align-self:flex-start;margin-top:.15rem;padding:.2rem .6rem;border-radius:999px;background:var(--u-soft);color:var(--u);font-size:.8rem;font-weight:700}
.carte-btn:hover{background:var(--u);color:#fff;text-decoration:none}
/* Le cours était une ligne grise que personne ne voyait : 12 ouvertures contre 328 pour les TP en trois
   semaines (journaux nginx, 9 oct. 2026). Bouton encadré, et deux battements au chargement pour attirer l'œil. */
.carte-doc{align-self:flex-start;font-size:.82rem;font-weight:600;color:var(--accent);border:1.5px solid var(--accent);border-radius:6px;padding:3px 10px;text-decoration:none;background:#fff}
.carte-doc:hover{background:var(--accent);color:#fff}
@media (prefers-reduced-motion:no-preference){.carte-doc.appel,.col-livret.appel{animation:appelDoc 1.5s ease-out 2}}
@keyframes appelDoc{0%,100%{box-shadow:0 0 0 0 rgba(0,85,170,0)}35%{box-shadow:0 0 0 5px rgba(0,85,170,.22)}70%{box-shadow:0 0 0 0 rgba(0,85,170,0)}}
.carte-cadenas{margin-top:.15rem;font-size:.78rem;color:#8a4b00;line-height:1.3}
/* Grisé = déjà derrière soi. Jamais fermé : on doit pouvoir y revenir, ne serait-ce que pour le bonus. */
.carte-grise{opacity:.6}
.carte-grise:hover{opacity:1}
.carte-orange{border-left-color:#e08a00}
.carte-prochain{border-left-color:#1f5fb1;border-color:#bcd0ea;background:#f7faff}
.carte-vert{border-left-color:#1f8d3a}
.carte-or{border-left-color:#c9a227}
.carte-rouge{border-left-color:#b31f1f}
.carte-libre{border-left-color:#7b3fa0}
.jauge{display:block;height:5px;margin-top:.2rem;border-radius:3px;background:#e6eaf0;overflow:hidden}
.jauge>span{display:block;height:100%;border-radius:3px}
.col-avenir{margin:.2rem 0 0;color:var(--muted);font-size:.78rem;font-style:italic}

/* Carte du prof : où en est la classe. La barre empile or / vert / orange / rouge / vide. */
.carte-prof{border-left-color:var(--u)}
.barre{display:flex;height:9px;margin-top:.25rem;border-radius:4px;background:#eef1f5;overflow:hidden}
.barre>span{display:block;height:100%}
.carte-live{font-size:.76rem;font-weight:700;color:#1a7a30}
.carte-liens{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.3rem}
.carte-liens a{padding:.1rem .45rem;border:1px solid var(--border);border-radius:6px;font-size:.73rem;color:#4a5462}
.carte-liens a:hover{border-color:var(--u);color:var(--u);text-decoration:none}
/* Progression du cours en PDF, en tête de colonne (prof) : un lien discret, pas un bouton — il ne
   change rien à l'état de la classe, il ouvre un document à envoyer. */
.col-livret{display:inline-block;font-size:.82rem;font-weight:600;color:#fff;background:var(--u);
  border:1.5px solid var(--u);border-radius:6px;padding:3px 10px;text-decoration:none}
.col-livret:hover{filter:brightness(1.12)}
.col-doc{margin:-.2rem 0 .1rem;font-size:.78rem}
.col-doc a{color:var(--muted)}
.col-doc a:hover{color:var(--u)}

/* Bande « en direct » : ce qui vit en ce moment, au-dessus des colonnes. */
.direct{margin:0 0 1.2rem;padding:.7rem .9rem;border:1px solid #cfe6d5;border-radius:11px;background:#f4fbf6}
.direct-titre{margin:0 0 .5rem;font-size:.95rem;letter-spacing:.02em}
.direct-liste{display:flex;flex-wrap:wrap;gap:.6rem}
.direct-tp{display:flex;flex-direction:column;gap:.1rem;padding:.4rem .7rem;border:1px solid #cfe6d5;border-radius:9px;background:#fff;color:var(--fg)}
.direct-tp:hover{border-color:#1a7a30;text-decoration:none}
.direct-quoi{color:var(--muted);font-size:.76rem}
.direct-n{font-size:.78rem;font-weight:700;color:#1a7a30;font-variant-numeric:tabular-nums}

/* ---------- Impression d'une page /admin ----------
   Le professeur imprime la page d'AP pour l'avoir sur la table pendant l'heure : on retire ce qui
   n'a de sens qu'à l'écran (barre, menu, filtres, pied) et on laisse le texte passer les pages. */
@media print {
  .topbar, .adminbar, .filtres, .footer, .no-print { display: none !important; }
  body { background: #fff; }
  main, .card { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: #fff; }
  section, tr, article { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}


/* ---------- « Le direct » : toute la classe sur un écran (13 oct. 2026) ----------
   AJP : « moins de données mais que je puisse suivre facilement toute la classe. Et voir les absents. »
   Donc : quatre colonnes de cartes blanches, un liseré de couleur à gauche pour l'état, et rien
   d'autre — pas de barre de progression, pas de pourcentage, pas de tableau. Une seule couleur
   d'accent (le bleu de la maison) ; le rouge et l'ambre ne servent qu'à ce qui appelle le prof.
   Contrainte de lisibilité : rien sous 14 px (la page est lue à un mètre, sur un vidéoprojecteur),
   et une classe de 27 doit tenir sur 1920 × 1080 SANS défilement — d'où les colonnes qui se
   scindent en deux (column-count posé par la vue et par /_assets/direct.js). */
.dir{--dir-rouge:#b3261e;--dir-ambre:#b7791f;--dir-vert:#1f8d3a;--dir-gris:#aeb5c0}
body:has(.dir) main{max-width:none;padding:.5rem .9rem}
body:has(.dir) .adminbar{margin:.35rem 0 .6rem}
body:has(.dir) .footer{display:none}           /* une page qu'on regarde une heure : pas de pied */

/* L'en-tête : UNE ligne. La classe, l'heure, le pouls, trois grands compteurs, les TP en cours. */
.dir-head{display:flex;align-items:center;gap:1.6rem;flex-wrap:wrap;
  padding:.65rem 1.1rem;margin:0 0 .7rem;background:#fff;border:1px solid var(--border);border-radius:14px;
  box-shadow:0 2px 10px rgba(0,0,0,.04)}
.dir-qui{display:flex;align-items:baseline;gap:.7rem;min-width:0}
.dir-classe{font-size:21px;font-weight:800;letter-spacing:-.01em}
.dir-heure{font-size:19px;font-weight:600;color:var(--accent);font-variant-numeric:tabular-nums}
.dir-maj{display:inline-flex;align-items:center;gap:.4rem;font-size:14px;color:var(--muted);white-space:nowrap}
.dir-point{width:9px;height:9px;border-radius:50%;background:var(--dir-vert);flex:none;
  animation:dirPouls 2.4s ease-in-out infinite}
.dir-point-perdu{background:var(--dir-ambre);animation:none}
@keyframes dirPouls{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.3;transform:scale(.75)}}
@media (prefers-reduced-motion:reduce){.dir-point{animation:none}}

.dir-figs{display:flex;gap:1.5rem;margin-left:auto}
.dir-fig{display:flex;flex-direction:column;align-items:center;line-height:1}
.dir-fig strong{font-size:38px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:var(--accent)}
.dir-fig small{margin-top:.25rem;font-size:15px;color:var(--muted);text-transform:lowercase}
.dir-fig-aider strong{color:var(--dir-rouge)}
.dir-fig-abs strong{color:#5a6472}

.dir-ctx{margin-left:auto;text-align:right;min-width:0}
.dir-tps{margin:0;font-size:15px;font-weight:600;color:#3c4453;font-variant-numeric:tabular-nums}
.dir-fenetre{margin:.15rem 0 0;font-size:14px;color:var(--muted)}
.dir-classes{display:flex;gap:.35rem;flex-wrap:wrap}
.dir-chip{padding:.2rem .65rem;border:1px solid var(--border);border-radius:999px;font-size:14px;color:#4a5462;background:#fff}
.dir-chip.on{background:var(--accent);border-color:var(--accent);color:#fff}
.dir-chip:hover{text-decoration:none;border-color:var(--accent)}

/* Les quatre colonnes : largeurs égales, pas de fond (ce sont les cartes qui sont blanches, pas la
   colonne — une colonne presque vide ne doit pas laisser un grand rectangle blanc). */
.dir-cols{display:flex;gap:.9rem;align-items:flex-start}
.dir-col{flex:1 1 0;min-width:0}
.dir-col>h2{display:flex;align-items:center;gap:.5rem;margin:0 0 .45rem;padding:0 .2rem;
  font-size:16px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#59616f}
.dir-n{display:inline-flex;align-items:center;justify-content:center;min-width:1.8rem;height:1.5rem;padding:0 .4rem;
  border-radius:999px;background:#e7ebf1;color:#3c4453;font-size:15px;font-weight:800;letter-spacing:0}
.dir-col-aider>h2{color:var(--dir-rouge)}
.dir-col-aider .dir-n{background:#fbe4e2;color:#8e1d17}
.dir-vide{margin:.1rem .2rem;font-size:14px;color:#9aa1ad;font-style:italic}

.dir-body{column-gap:.6rem}
.dir-carte{display:block;break-inside:avoid;margin:0 0 .45rem;padding:.5rem .75rem;
  background:#fff;border:1px solid var(--border);border-left:4px solid var(--dir-gris);border-radius:10px;
  color:var(--fg);text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.04);
  transition:box-shadow .15s,transform .15s}
.dir-carte:hover{text-decoration:none;transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.1)}
.dir-carte strong{display:block;font-size:18px;font-weight:700;line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dir-carte>span{display:block;font-size:15px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dir-ligne{color:var(--muted)}
.dir-raison{font-weight:700}

.dir-bloque{border-left-color:var(--dir-rouge);background:#fff7f6}
.dir-bloque .dir-raison{color:var(--dir-rouge)}
.dir-silencieux{border-left-color:var(--dir-ambre);background:#fffbf3}
.dir-silencieux .dir-raison{color:#8a5a10}
.dir-travaille{border-left-color:var(--accent)}
.dir-avance{border-left-color:var(--dir-vert)}
.dir-absent{border-left-color:var(--dir-gris);background:#fafbfc}
.dir-absent strong{color:#6b7280;font-weight:600}

/* Une carte qui arrive, ou qui passe d'une colonne à l'autre : elle se pose, elle ne surgit pas. */
@media (prefers-reduced-motion:no-preference){
  .dir-entre{animation:dirEntre .45s cubic-bezier(.2,.7,.3,1)}
  @keyframes dirEntre{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
}
.dir-pied{margin:.8rem .2rem 0;font-size:14px;color:#9aa1ad}

/* Petits écrans (un portable en salle) : les colonnes s'empilent, le défilement redevient normal. */
@media (max-width:1100px){
  .dir-cols{flex-wrap:wrap}
  .dir-col{flex:1 1 44%}
  .dir-ctx,.dir-figs{margin-left:0}
}

/* Le direct, séance terminée (13 oct. 2026) : dire franchement que la classe est partie, au lieu de laisser
   lire le silence de fin de cours comme un problème. */
.dir-fini{grid-column:1/-1;margin:6px 0 0;padding:6px 12px;border-radius:8px;background:#eef2f7;color:#425066;font-size:.95rem;font-weight:600}

/* ---------- Accueil de l'élève : un bouton par cours, une ligne « quoi faire » ----------
   AJP, 10 nov. 2026. Remplace les cinq colonnes, qui débordaient sur le côté dans un navigateur
   large de 960 px (la moitié d'un écran du labo). Une seule colonne, pas de scroll horizontal. */
.cours-liste{list-style:none;margin:1.1rem 0 0;padding:0;display:flex;flex-direction:column;gap:.55rem;max-width:720px}
.cours-ligne{--u:#1f5fb1;--u-soft:#e8f0fb;display:grid;grid-template-columns:minmax(0,15rem) 1fr;gap:.2rem .9rem;align-items:center;
  padding:.55rem .7rem;background:var(--card);border:1px solid var(--border);border-left:4px solid var(--u);border-radius:10px}
.cours-u4{--u:#1f8d3a;--u-soft:#e6f5ea}
.cours-co-ens{--u:#c2611f;--u-soft:#fbeee3}
.cours-bouton{display:flex;align-items:center;gap:.5rem;min-width:0;text-decoration:none;color:inherit;font-weight:650;font-size:1.02rem}
.cours-bouton:hover .cours-nom{text-decoration:underline}
.cours-emoji{flex:none;display:flex;align-items:center;justify-content:center;width:1.9rem;height:1.9rem;border-radius:8px;background:var(--u-soft);font-size:1.1rem;line-height:1}
.cours-nom{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cours-badge{flex:none;min-width:1.35rem;height:1.35rem;padding:0 .35rem;border-radius:999px;background:var(--u);color:#fff;
  font-size:.78rem;font-weight:700;display:flex;align-items:center;justify-content:center}
.cours-info{min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:.15rem .5rem;font-size:.95rem}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cours-doc{color:var(--muted);text-decoration:none;font-size:.85rem}
.cours-doc:hover{text-decoration:underline}
.cours-tp{font-weight:600;color:var(--u);text-decoration:none}
.cours-tp:hover{text-decoration:underline}
.cours-tp-verrou{color:var(--muted);font-weight:600}
.cours-etat{color:var(--muted)}
.cours-detail{color:var(--muted);font-style:italic;flex-basis:100%}
.cours-fini{color:#1f8d3a;font-weight:600}
.cours-rien{color:var(--muted);font-style:italic}
/* Les documents en tête de la ligne du cours (12 nov. 2026) : une rangée à eux, au-dessus du TP. */
.cours-docs{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:baseline;gap:.1rem .8rem;margin:0 0 .1rem}
.cours-livret{color:var(--muted);text-decoration:none;font-size:.85rem}
.cours-livret:hover{text-decoration:underline}
/* Les TP déjà vus, en pastilles (10 nov. 2026) : la seule chose que les élèves regrettaient des
   colonnes. Une rangée qui passe à la ligne, jamais de scroll ; la couleur dit l'état, le chiffre
   ce qui reste. Cliquables comme les cartes grisées l'étaient. */
.cours-passes{flex-basis:100%;list-style:none;display:flex;flex-wrap:wrap;gap:.3rem;margin:.2rem 0 0;padding:0}
.tp-pass{display:inline-flex;align-items:baseline;gap:.3rem;padding:1px 8px;border-radius:999px;border:1px solid #c9d1dc;
  background:#fff;color:#49535f;font-size:.78rem;font-weight:650;text-decoration:none;font-variant-numeric:tabular-nums}
a.tp-pass:hover{text-decoration:none;filter:brightness(.97);box-shadow:0 0 0 2px rgba(0,0,0,.05)}
.tp-pass-n{font-weight:600;opacity:.85}
.tp-vert{border-color:#9fd4ad;background:#eef9f1;color:#15682b}
.tp-or{border-color:#e0c96a;background:#fbf4dd;color:#7d6410}
.tp-rouge{border-color:#e2a5a5;background:#fbeeee;color:#8f2020}
.tp-vide{border-color:#d6dce4;background:#f4f6f9;color:#6b7684}
.cours-legende{max-width:720px;margin:.5rem 0 0;color:var(--muted);font-size:.8rem;display:flex;flex-wrap:wrap;align-items:center;gap:.3rem}
@media (max-width:560px){.cours-ligne{grid-template-columns:1fr}}
