:root {
  --bg: #f3f4f2; --paper: #ffffff; --ink: #1b2229; --ink-2: #5b6570; --line: #d9dcd7;
  --accent: #0e5f8a; --good: #2a8c5a; --mid: #d69a1e; --bad: #c8412f; --none: #8b949e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 1.55rem; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
a { color: var(--accent); }
.top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--ink); color: #fff; }
.top .brand { color: #fff; text-decoration: none; font-weight: 700; }
.top .brand span { font-weight: 400; opacity: .75; margin-left: 6px; }
.top .crumb { opacity: .7; }
.top .logout { margin-left: auto; color: #cfd6dc; font-size: .9rem; }
.sub { color: var(--ink-2); margin: 0; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.card.login { max-width: 360px; margin: 60px auto; }
label { display: block; margin: 0 0 12px; font-size: .9rem; color: var(--ink-2); }
input[type=text], input:not([type]), input[type=password], input[type=file], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; background: #fff; }
textarea { resize: vertical; }
button { font: inherit; padding: 8px 14px; border: 0; border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.del { background: transparent; color: var(--bad); padding: 2px 6px; font-size: 1.1rem; line-height: 1; }
form.inline { display: inline; }
.err { color: var(--bad); }
.empty { color: var(--ink-2); }
.hint, .legend { color: var(--ink-2); font-size: .88rem; margin: 0 0 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin: 0 4px 0 10px; }
pre { background: #eef0ec; padding: 10px; border-radius: 4px; font-size: .82rem; overflow: auto; white-space: pre-wrap; word-break: break-all; }
code { background: #eef0ec; padding: 1px 5px; border-radius: 3px; }
table.list { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
table.list th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tbody tr:hover { background: #f7f8f6; cursor: pointer; }
table.list small { display: block; color: var(--ink-2); font-size: .8rem; }
td.val { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.st { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .8rem; color: #fff; }
.st-prepare { background: var(--none); } .st-en_cours { background: var(--accent); } .st-termine { background: var(--good); }
table.pts { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.pts td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
table.pts td.num { font-weight: 700; width: 28px; }
/* Plan et points */
.plan { position: relative; display: block; border: 1px solid var(--line); background: #fff; user-select: none; cursor: crosshair; touch-action: none; }
.plan img { display: block; width: 100%; height: auto; }
.pt { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); cursor: grab; }
.pt-good { background: var(--good); } .pt-mid { background: var(--mid); } .pt-bad { background: var(--bad); } .pt-none { background: var(--none); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; }
.dot.on { background: var(--good); } .dot.off { background: var(--bad); }
