/* Sigma Cap — layout: page publique en une colonne éditoriale, espace gestionnaire en onglets + tableaux */
:root {
  --ink: #14284b;          /* bleu marine du logo */
  --sky: #1f8fd0;          /* cercle bleu du logo */
  --lime: #6fa82f;         /* « réussite » */
  --gold: #d99a1e;         /* toque */
  --bg: #f2f5f9;
  --surface: #ffffff;
  --surface-2: #e8eef6;
  --fg: #172238;
  --muted: #5b6880;
  --line: #d5dde9;
  --ok: #2f8a4b;  --ok-bg: #e2f3e7;
  --warn: #a8670a; --warn-bg: #fbefd8;
  --bad: #b8322a; --bad-bg: #fbe3e1;
  --maths: #3f4fd6; --maths-bg: #eceefe;
  --pc: #0f8a6a;    --pc-bg: #def3ec;
  --svt: #c36a0b;   --svt-bg: #fdeedd;
  --on-ink: #ffffff;
  --badge: #ffffff;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #9cc2ff; --sky: #58b6ec; --lime: #9bd05a; --gold: #f0bb4f;
    --bg: #0e1524; --surface: #162036; --surface-2: #1d2a44; --fg: #e6ecf7; --muted: #9aa7bf; --line: #2a3a58;
    --ok: #6fd18e; --ok-bg: #173a26; --warn: #f0bb4f; --warn-bg: #3a2c12; --bad: #ff8a80; --bad-bg: #44201e;
    --maths: #a7b1ff; --maths-bg: #262c5a; --pc: #63d8b5; --pc-bg: #133d33; --svt: #ffb062; --svt-bg: #43290f;
    --on-ink: #0e1524; --badge: #f4f7fb;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #9cc2ff; --sky: #58b6ec; --lime: #9bd05a; --gold: #f0bb4f;
  --bg: #0e1524; --surface: #162036; --surface-2: #1d2a44; --fg: #e6ecf7; --muted: #9aa7bf; --line: #2a3a58;
  --ok: #6fd18e; --ok-bg: #173a26; --warn: #f0bb4f; --warn-bg: #3a2c12; --bad: #ff8a80; --bad-bg: #44201e;
  --maths: #a7b1ff; --maths-bg: #262c5a; --pc: #63d8b5; --pc-bg: #133d33; --svt: #ffb062; --svt-bg: #43290f;
  --on-ink: #0e1524; --badge: #f4f7fb;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--sky); }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; color: var(--ink); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0; }
.num, td.n, .tab-n { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.eyebrow { font: 700 .74rem/1.45 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--sky); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- buttons & inputs ---------- */
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 .95rem/1 var(--body); padding: .75rem 1rem; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--sky); }
.btn.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.go { background: var(--lime); border-color: var(--lime); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: .45rem .7rem; font-size: .85rem; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.f { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; min-width: 0; }
label.f span.h { font-weight: 400; color: var(--muted); font-size: .82rem; }
input, select, textarea { font: 400 1rem/1.3 var(--body); color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 25%, transparent); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chk { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: var(--surface); padding: .6rem .85rem; border-radius: 999px; cursor: pointer; font-weight: 600; user-select: none; }
.chk input { width: auto; margin: 0; accent-color: var(--ink); }
.chk:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }

/* ---------- pills ---------- */
.pill { display: inline-block; font: 700 .72rem/1 var(--body); padding: .35rem .55rem; border-radius: 999px; letter-spacing: .02em; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.pill.Maths { background: var(--maths-bg); color: var(--maths); }
.pill.PC { background: var(--pc-bg); color: var(--pc); }
.pill.SVT { background: var(--svt-bg); color: var(--svt); }

/* ---------- public header ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mk { width: 40px; height: 40px; border-radius: 50%; background: var(--badge); padding: 3px; flex: none; }
.brand b { font: 900 1.1rem/1 var(--display); letter-spacing: .01em; display: block; }
.brand small { font: 600 .7rem/1.2 var(--body); color: var(--lime); letter-spacing: .08em; text-transform: uppercase; }
.topnav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.topnav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: .92rem; padding: .5rem .6rem; border-radius: 6px; }
.topnav a:hover { background: var(--surface-2); }
@media (max-width: 720px) { .topnav a.opt, .topnav .share-ic .opt { display: none; } .topnav .share-ic { padding-inline: 10px; } }

/* ---------- hero : affiche bleu Sigma, logo et portraits en grand ---------- */
.hero { --h-bg: #13274a; --h-fg: #ffffff; --h-soft: rgba(255,255,255,.74); --h-line: rgba(255,255,255,.22); --h-lime: #a6d65e;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(31,143,208,.45), transparent 60%),
    radial-gradient(600px 380px at 0% 100%, rgba(111,168,47,.22), transparent 60%),
    var(--h-bg);
  color: var(--h-fg); padding-block: 34px 56px; position: relative; overflow: hidden; }
.hero::before { content: "Σ"; position: absolute; right: -40px; bottom: -120px; font: 900 520px/1 var(--display); color: rgba(255,255,255,.04); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "brand duo" "text duo"; gap: 18px 48px; align-items: start; position: relative; }
.hero-brand { grid-area: brand; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-logo { width: 190px; background: #fff; border-radius: 24px; padding: 10px 12px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.hero .eyebrow { color: var(--h-lime); max-width: 22ch; }
.hero-text { grid-area: text; }
.hero h1 { color: var(--h-fg); font-size: clamp(2.4rem, 6.4vw, 4.4rem); font-weight: 900; letter-spacing: -.02em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--h-lime); }
.hero .lead { font-size: 1.12rem; color: var(--h-soft); margin-top: 16px; max-width: 36ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero .cta .btn { padding: 1rem 1.35rem; font-size: 1.02rem; }
.btn.go { background: var(--h-lime, var(--lime)); border-color: transparent; color: #10213f; font-weight: 800; }
.hero .btn.line { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero .facts { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--h-line); }
.hero .facts div { padding: 12px 12px 0 0; min-width: 0; }
.hero .facts dt { font: 700 .7rem/1.3 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--h-soft); }
.hero .facts dd { margin: 6px 0 0; font: 800 1.02rem/1.25 var(--display); color: #fff; }
.duo { grid-area: duo; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; position: relative; }
.duo figure { margin: 0; position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; background: #1f8fd0; box-shadow: 0 22px 50px rgba(0,0,0,.4); max-width: 100%; }
.duo figure:nth-child(2) { transform: translateY(34px); }
.duo img { width: 100%; height: 100%; object-fit: cover; }
.duo figcaption { position: absolute; inset: auto 0 0 0; padding: 36px 10px 12px; background: linear-gradient(transparent, rgba(8,18,38,.92)); color: #fff; font: 900 1rem/1.15 var(--display); }
.duo figcaption span { display: block; font: 600 .74rem/1.3 var(--body); color: rgba(255,255,255,.78); margin-top: 3px; }
.medal { grid-column: 1 / -1; justify-self: center; margin-top: 44px; background: #fff; color: #13274a; border-radius: 16px; padding: 12px 20px; text-align: center; box-shadow: 0 14px 34px rgba(0,0,0,.35); max-width: 100%; display: grid; gap: 3px; }
.medal strong { font: 900 1.25rem/1.1 var(--display); color: #4f8a1c; }
.medal span { font-size: .8rem; color: #4b5872; }
@media (max-width: 860px) {
  .hero { padding-block: 22px 40px; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "brand" "duo" "text"; gap: 22px; }
  .hero-brand { flex-direction: column; text-align: center; }
  .hero-logo { width: min(230px, 62vw); }
  .hero .eyebrow { max-width: none; }
  .duo { gap: 12px; }
  .medal { margin-top: 28px; }
  .duo figure:nth-child(2) { transform: translateY(18px); }
  .duo { gap: 8px; }
  .duo figure { border-radius: 14px; }
  .duo figcaption { font-size: .82rem; padding: 26px 7px 8px; }
  .duo figcaption span { font-size: .62rem; }
  .hero-text { text-align: left; }
}
@media (max-width: 520px) { .hero .facts { grid-template-columns: 1fr 1fr; } .hero .facts div:last-child { grid-column: 1 / -1; } }
/* ---------- sections ---------- */
section.blk { padding-block: 44px; }
section.blk + section.blk { border-top: 1px solid var(--line); }
.blk-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.blk-head p { color: var(--muted); max-width: 52ch; margin-top: 6px; }

/* team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.person { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.person img { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 3px solid var(--surface-2); }
.person .role { color: var(--muted); font-size: .9rem; }
.person .tel { font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.others { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .92rem; }
.others b { color: var(--fg); }

/* class switcher */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: .55rem .8rem; border-radius: 999px; font: 700 .88rem/1 var(--body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* pricing */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; }
.price.best { border: 2px solid var(--lime); }
.price .amt { font: 900 1.9rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.price .amt small { font: 600 .85rem var(--body); color: var(--muted); }
.price .tag { justify-self: start; }

/* timetable */
.week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
@media (max-width: 760px) { .week { grid-template-columns: 1fr; } }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.day h3 { background: var(--ink); color: var(--on-ink); font-size: 1rem; padding: 10px 14px; }
.day ul { list-style: none; margin: 0; padding: 10px; display: grid; gap: 8px; }
.day li.empty { color: var(--muted); font-size: .9rem; padding: 6px; }
.slot { border-left: 4px solid var(--maths); background: var(--maths-bg); border-radius: 6px; padding: 8px 10px; display: grid; gap: 2px; }
.slot.PC { border-color: var(--pc); background: var(--pc-bg); }
.slot.SVT { border-color: var(--svt); background: var(--svt-bg); }
.slot .t { font-weight: 800; font-variant-numeric: tabular-nums; }
.slot .m { font-weight: 700; }
.slot .p { font-size: .85rem; color: var(--muted); }

/* registration form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 3vw, 28px); display: grid; gap: 22px; }
.form-card fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.form-card legend { font: 800 1.05rem/1 var(--display); color: var(--ink); padding: 0; margin-bottom: 14px; }
.quote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2); border-radius: 10px; padding: 14px 16px; }
.quote .amt { font: 900 1.6rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.steps { list-style: none; counter-reset: st; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.steps li b { font-family: var(--display); font-size: 1.02rem; color: var(--ink); }
.steps li p { margin: 3px 0 0; color: var(--muted); font-size: .95rem; }
.steps li::before { content: counter(st); width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font: 900 1rem/34px var(--display); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { color: var(--bad); font-weight: 600; font-size: .92rem; }
.receipt { background: var(--surface); border: 2px solid var(--lime); border-radius: 14px; padding: clamp(18px, 3vw, 30px); display: grid; gap: 14px; }
.receipt .no { font: 900 2rem/1 var(--display); color: var(--ink); letter-spacing: .02em; }
.receipt dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; min-width: 0; }

footer.site { padding-block: 30px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.pdm { display: flex; align-items: center; gap: 10px; }
.pdm img { width: 44px; height: 44px; border-radius: 50%; }

/* ---------- admin ---------- */
.admin-shell { min-height: 100%; }
.admin-top { background: var(--ink); color: var(--on-ink); }
.admin-top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 12px; flex-wrap: wrap; }
.admin-top .brand, .admin-top .brand b { color: var(--on-ink); }
.admin-top .brand small { color: var(--on-ink); opacity: .75; }
.admin-top .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-top .btn { background: transparent; color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 35%, transparent); }
.mode { font: 700 .72rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: .4rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--on-ink) 15%, transparent); }
.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs button { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 14px 12px 11px; font: 700 .92rem/1 var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tabs .count { font-size: .72rem; background: var(--bad); color: #fff; border-radius: 999px; padding: 2px 6px; margin-left: 4px; }
.admin-main { padding-block: 22px 60px; display: grid; gap: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .grow { flex: 1 1 200px; min-width: 0; }
.toolbar select, .toolbar input { width: auto; }
.toolbar input.grow { width: 100%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 4px; }
.kpi .l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi .v { font: 900 1.6rem/1.05 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .82rem; color: var(--muted); }
.kpi.alert { border-color: var(--bad); }
.kpi.alert .v { color: var(--bad); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; min-width: 0; align-content: start; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.bar { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; font-size: .9rem; }
.bar .tr { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar .tr i { display: block; height: 100%; background: var(--sky); border-radius: 999px; }
.bar .tr i.lime { background: var(--lime); }
.bar b { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 700 .72rem/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--surface-2); }
td.n, th.n { text-align: right; white-space: nowrap; }
td .sub { display: block; font-size: .8rem; color: var(--muted); }
.empty-state { padding: 28px; text-align: center; color: var(--muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 10px 12px; font-weight: 600; font-size: .9rem; }
.infobox { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: .92rem; }

/* login */
.login { max-width: 400px; margin: 60px auto; padding-inline: 16px; }
.login .panel { padding: 26px; gap: 16px; }
.login .mk { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; background: var(--badge); padding: 4px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(8, 14, 28, .55); z-index: 50; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: var(--surface); color: var(--fg); border-radius: 14px; width: min(640px, 100%); max-height: calc(100% - 32px); overflow-y: auto; padding: 22px; display: grid; gap: 16px; }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.modal footer .left { margin-right: auto; }

#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero .cta { animation: rise .6s ease both; }
  .hero .lead { animation-delay: .08s; } .hero .cta { animation-delay: .16s; }
  @keyframes rise { from { transform: translateY(10px); } to { transform: none; } }
}

/* ---------- espaces (élève, prof, gestion) ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.callout { border-left: 5px solid var(--sky); }
.callout.warn { border-left-color: var(--warn); }
.callout.ok { border-left-color: var(--ok); }
.callout p { max-width: 70ch; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; }
tr.me td { background: var(--ok-bg); }
.slot.mine { outline: 2px solid var(--ink); }
.bar .tr { position: relative; }
.bar .tr u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fg); opacity: .55; }
.bar .tr i.bad { background: var(--bad); }
.btn.sm.go { padding: .45rem .7rem; }

/* QR code de partage (accueil) */
.qr-share { display: flex; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.qr-share img { width: 220px; height: 220px; flex: none; border-radius: 8px; background: #fff; padding: 8px; }
.qr-share p { margin: 8px 0; }
.qr-share .btn { margin-top: 6px; }
@media (max-width: 640px) { .qr-share { flex-direction: column; text-align: center; padding: 18px 16px; } .qr-share img { width: 200px; height: 200px; } }
.callout.bad { border-left-color: var(--bad); background: var(--bad-bg); }

/* Suivi des notes */
.note-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.note-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; align-content: start; background: var(--surface); }
.nc-head, .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nc-nums { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.nc-nums > div { display: grid; }
.nc-nums .l { font-size: .75rem; color: var(--muted); }
.nc-nums b { font: 800 1.35rem/1.1 var(--display); color: var(--ink); }
.nc-nums small { color: var(--muted); }
.tend { font-weight: 700; white-space: nowrap; }
.nc-nums b.tend { font-size: 1rem; }
.tend.hausse { color: var(--ok); } .tend.baisse { color: var(--bad); } .tend.stable, .tend.debut { color: var(--muted); }
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--sky); stroke-width: 2; stroke-linejoin: round; }
.spark circle { fill: var(--sky); }
.spark .mid { stroke: var(--line); stroke-dasharray: 3 3; }
.com { border-left: 3px solid var(--sky); background: var(--surface-2); border-radius: 6px; padding: 8px 10px; }
.com p { margin: 4px 0 0; }
table.mini { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 6px; }
table.mini td { padding: 5px 4px; border-top: 1px solid var(--line); }
h4.grp { margin: 14px 0 8px; display: flex; gap: 8px; align-items: center; }

/* Moyens de paiement (onglets) */
.paytabs { margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.pt-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pt-head button { display: grid; justify-items: center; gap: 6px; border: 0; padding: 10px 6px; font: 800 .95rem/1.2 var(--display); cursor: pointer; background: var(--surface-2); color: var(--muted); border-bottom: 3px solid transparent; }
.pt-head button[aria-selected="true"] { background: var(--surface); color: var(--ink); }
.pt-head .pt-wave[aria-selected="true"] { border-bottom-color: #1dc4ff; color: #0a8fc2; }
.pt-head .pt-om[aria-selected="true"] { border-bottom-color: #ff7900; color: #d45f00; }
.pt-head .pt-cash[aria-selected="true"] { border-bottom-color: var(--ok); color: var(--ok); }
.pt-body { padding: 14px 16px; border-left: 4px solid var(--line); }
.pt-body p { margin: 0; }
.pt-body.pt-wave { border-left-color: #1dc4ff; } .pt-body.pt-om { border-left-color: #ff7900; } .pt-body.pt-cash { border-left-color: var(--ok); }

.pt-head img { height: 34px; width: auto; max-width: 90%; object-fit: contain; }
.pt-head button[aria-selected="false"] img { opacity: .55; filter: grayscale(.4); }
.pt-body { display: flex; gap: 14px; align-items: center; }
.pt-logo { height: 54px; width: auto; max-width: 90px; object-fit: contain; flex: none; background: #fff; border-radius: 8px; padding: 4px; }

/* réduction cours de vacances, annoncée pendant l'inscription */
.vacnote { margin: 0; background: var(--ok-bg); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .95rem; }

/* Partage */
.share-ic { display: inline-flex; align-items: center; gap: 6px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: center; }
.share-row .btn svg { vertical-align: -3px; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.share-grid .btn { justify-content: center; text-align: center; }

/* Prochain rendez-vous (accueil) */
.hero .rdv { margin-top: 18px; display: inline-block; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 10px 14px; color: #fff; font-size: 1rem; }
.hero .rdv span { color: #f0bb4f; font-weight: 700; }
/* Affiche du prochain cours (#affiche) — format 4:5 */
.poster-wrap { padding: 20px 16px 40px; display: grid; justify-items: center; gap: 14px; background: #0b1730; min-height: 100vh; }
.poster { width: min(100%, 540px); aspect-ratio: 4 / 5; background: radial-gradient(120% 80% at 100% 0%, #1f8fd0 0%, #13274a 55%); color: #fff; border-radius: 18px; padding: 6% 6.5%; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 3%; overflow: hidden; position: relative; font-size: clamp(9px, 2.2vw, 13px); }
.poster::after { content: "Σ"; position: absolute; right: -6%; bottom: -14%; font: 900 32em/1 var(--display); color: rgba(255,255,255,.05); pointer-events: none; }
.po-top { display: flex; gap: 5%; align-items: center; }
.po-top img { width: 22%; background: #fff; border-radius: 14%; padding: 2%; }
.po-eye { color: #a6d65e; font: 700 1.05em/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .4em; }
.poster h1 { color: #fff; font: 900 3.3em/0.95 var(--display); margin: 0; }
.poster h1 em { font-style: normal; color: #a6d65e; }
.po-date { display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; background: #fff; color: #13274a; border-radius: 14px; padding: .5em .8em; width: fit-content; max-width: 100%; }
.po-date b { font: 900 2.7em/1 var(--display); }
.po-date span { font: 900 2.7em/1 var(--display); color: #1f8fd0; }
.po-lieu { margin: 0; font: 600 1.2em/1.35 var(--body); color: rgba(255,255,255,.88); }
.po-profs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; align-self: center; }
.po-profs figure { margin: 0; position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; }
.po-profs img { width: 100%; height: 100%; object-fit: cover; }
.po-profs figcaption { position: absolute; inset: auto 0 0; padding: 30% 6% 6%; background: linear-gradient(transparent, rgba(8,18,38,.92)); font: 800 1em/1.1 var(--display); }
.po-profs figcaption span { display: block; font: 600 .85em/1.2 var(--body); color: #a6d65e; }
.po-foot { display: grid; grid-template-columns: 1fr 24%; gap: 5%; align-items: center; position: relative; z-index: 1; }
.po-alert { margin: 0; display: inline-block; background: #f0bb4f; color: #13274a; font: 900 1.45em/1 var(--display); padding: .35em .6em; border-radius: 8px; }
.po-cta { margin: .5em 0 .25em; font: 800 1.3em/1.2 var(--display); }
.po-tel { margin: 0; font: 600 1em/1.3 var(--body); color: rgba(255,255,255,.8); }
.po-qr { width: 100%; background: #fff; border-radius: 10px; padding: 5%; }
.po-help { max-width: 540px; color: #c7d3e6; font-size: .9rem; text-align: center; margin: 0; }
.po-help a { color: #a6d65e; }

/* Note d'information à l'accueil */
.note-blk { padding-top: 8px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--svt); border-radius: 14px; padding: clamp(16px, 3vw, 28px); display: grid; gap: 14px; }
.info-card h2 { font-size: clamp(1.3rem, 3.4vw, 1.9rem); }
.info-card h2 .pill { font-size: .8em; vertical-align: .12em; }
.info-card p { margin: 0; }
.note-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.note-grid > div { background: var(--surface-2); border-radius: var(--r); padding: 14px; display: grid; gap: 8px; align-content: start; }
.note-grid h3 { font-size: 1rem; }
.note-edt { width: 100%; border-collapse: collapse; }
.note-edt th, .note-edt td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.note-edt th { font-weight: 700; color: var(--ink); width: 1%; white-space: nowrap; }
.note-edt td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.note-edt td small { display: block; color: var(--muted); font-size: .82rem; }
.note-edt tr.hl td, .note-edt tr.hl th { background: var(--svt-bg); color: var(--svt); }
.note-amt { font: 900 1.8rem/1 var(--display); color: var(--svt); }
.note-amt small { font: 600 .9rem var(--body); color: var(--muted); }
.note-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; }
@media (max-width: 700px) { .note-grid { grid-template-columns: minmax(0, 1fr); } }
.note-edt th { text-transform: none; letter-spacing: 0; font-size: .92rem; }
@media (max-width: 480px) { .note-grid > div { padding: 10px; } .note-edt th, .note-edt td { padding: 7px 3px; font-size: .88rem; } .note-edt { table-layout: fixed; } .note-edt th { width: 27%; white-space: normal; } .note-edt td.num { width: 33%; white-space: normal; } }
.note-start { background: var(--svt-bg); color: var(--svt); border-radius: var(--r); padding: 10px 12px; font-weight: 600; }
.note-start b { color: inherit; }
.admin-main > .info-card { margin-bottom: 4px; }

/* Fiches d'exercices et évaluations */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); }
.doc-ic { font-size: 1.6rem; text-align: center; }
.doc-b { display: grid; gap: 4px; min-width: 0; }
.doc-b b { overflow-wrap: anywhere; }
.doc-m { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); }
.doc-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.doc-h { margin: 14px 0 8px; }
.doc-filters { margin: 12px 0; }
.doc-filters select { width: auto; }
@media (max-width: 560px) { .doc { grid-template-columns: 32px minmax(0, 1fr); } .doc-a { grid-column: 1 / -1; justify-content: flex-start; } .doc-filters select { flex: 1 1 140px; } }

/* ===== Cours en ligne (learn.js) ===== */
.lr-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.lr-chaps { display: grid; gap: 6px; position: sticky; top: 12px; }
.lr-chaps button { appearance: none; text-align: left; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: var(--r); padding: 9px 10px; cursor: pointer; font: inherit; }
.lr-chaps button .n { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; font: 800 .85rem/1 var(--display); }
.lr-chaps button .t { font-weight: 700; font-size: .92rem; }
.lr-chaps button .s { font-size: .75rem; color: var(--muted); }
.lr-chaps button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-2); }
.lr-chaps button[aria-pressed="true"] .n { background: var(--ink); color: var(--on-ink); }
.lr-chaps .lr-ev .n { background: var(--gold); color: #fff; }
.lr-head { margin-bottom: 12px; }
.lr-head h2 { margin: 4px 0 6px; }
.lr-tabs { margin-top: 10px; }
.lr-cours { line-height: 1.6; }
.lr-cours h3 { margin: 18px 0 8px; font-size: 1.15rem; }
.lr-cours h3:first-child { margin-top: 0; }
.lr-cours h4 { margin: 12px 0 6px; font-size: 1rem; color: var(--ink); }
.lr-cours p { margin: 6px 0; }
.lr-cours ul, .lr-cours ol { margin: 6px 0; padding-left: 1.3rem; }
.lr-cours .katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.bx { border-radius: var(--r); padding: 10px 12px; margin: 10px 0; border-left: 5px solid; background: var(--surface-2); }
.bx > b:first-child, .bx .bt { display: block; font: 800 .82rem/1.3 var(--body); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.bx.def { border-color: var(--sky); background: color-mix(in srgb, var(--sky) 9%, var(--surface)); }
.bx.def > b:first-child { color: var(--sky); }
.bx.prop { border-color: var(--lime); background: color-mix(in srgb, var(--lime) 10%, var(--surface)); }
.bx.prop > b:first-child { color: var(--lime); }
.bx.ex { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.bx.ex > b:first-child { color: var(--gold); }
.bx.meth { border-color: #6c3fb5; background: color-mix(in srgb, #6c3fb5 8%, var(--surface)); }
.bx.meth > b:first-child { color: #6c3fb5; }
.bx.att { border-color: var(--bad); background: var(--bad-bg); }
.bx.att > b:first-child { color: var(--bad); }
.bx.demo { border-color: var(--ink); background: var(--surface); border-style: solid; }
.bx.demo > b:first-child { color: var(--ink); }
.lr-quiz { margin: 0; padding-left: 1.3rem; display: grid; gap: 14px; }
.lr-q { font-weight: 600; margin-bottom: 6px; }
.lr-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.lr-choix .btn { white-space: normal; text-align: left; line-height: 1.35; }
.lr-choix .btn.lr-ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.lr-choix .btn.lr-ko { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.lr-choix .btn:disabled { opacity: 1; cursor: default; }
.lr-expl { margin-top: 6px; font-size: .92rem; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.lr-score { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); }
.lr-exo .lr-enonce { margin: 4px 0 10px; line-height: 1.55; }
.lr-qq { border-top: 1px dashed var(--line); padding: 10px 0; display: grid; gap: 6px; }
.lr-in input { max-width: 320px; }
.lr-fb { font-weight: 700; font-size: .92rem; min-height: 1em; }
.lr-fb.ok { color: var(--ok); } .lr-fb.bad { color: var(--bad); } .lr-fb.warn { color: var(--warn); }
.lr-ind summary { cursor: pointer; color: var(--sky); font-weight: 600; font-size: .9rem; }
.lr-ind div { font-size: .92rem; padding: 6px 0 0; }
.lr-sol { margin-top: 10px; border-radius: 8px; padding: 10px 12px; background: color-mix(in srgb, var(--lime) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lime) 40%, var(--line)); line-height: 1.55; }
.lr-niv { color: var(--gold); letter-spacing: 1px; }
.lr-eval .toolbar { flex-wrap: wrap; }
.lr-sujet, .lr-corr { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; line-height: 1.6; }
.lr-corr { background: color-mix(in srgb, var(--lime) 6%, var(--surface)); border-radius: 8px; padding: 12px; }
.lr-sujet h4, .lr-corr h4 { margin: 14px 0 6px; color: var(--ink); }
.lr-sujet ol, .lr-corr ol, .lr-sujet ul, .lr-corr ul { padding-left: 1.3rem; }
.lr-card h3 { margin: 0; }
.learn .admin-top select { width: auto; }
@media (max-width: 820px) {
  .lr-grid { grid-template-columns: minmax(0, 1fr); }
  .lr-chaps { position: static; grid-auto-flow: column; grid-auto-columns: minmax(180px, 70%); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .lr-chaps button { scroll-snap-align: start; }
}
.lr-cours, .lr-exo, .lr-eval { display: block; }
.lr-cours > *, .lr-exo > *, .lr-eval > *, .lr-content, .lr-content > * { min-width: 0; max-width: 100%; }
.lr-exo > * + *, .lr-eval > * + * { margin-top: 8px; }
.bx { overflow-x: auto; }
.lr-q, .lr-ql, .lr-enonce, .lr-sol, .lr-sujet, .lr-corr { overflow-x: auto; }
.lr-exbar .seg { flex-wrap: wrap; }
.lr-prog { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; max-width: 320px; }
.lr-prog i { display: block; height: 100%; background: var(--lime); }
.lr-demo { border-left: 5px solid #6c3fb5; }
.pill.lr-dp { background: #6c3fb5; color: #fff; }

/* devoirs à rendre en photos, annotation des copies */
.modal.wide { width: min(980px, 100%); }
.rendu-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.rendu-res { flex-basis: 100%; display: grid; gap: 2px; }
.rendu-res p { margin: 0; }
.rendu-note { font-size: 1.25rem; color: var(--ok); }
.rendu-a { display: flex; flex-wrap: wrap; gap: 6px; }
.bad-t { color: var(--bad); font-weight: 700; }
.rendu-prev { display: flex; flex-wrap: wrap; gap: 8px; }
.rendu-prev figure { margin: 0; position: relative; width: 92px; text-align: center; }
.rendu-prev img, .rendu-pdf { width: 92px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; background: var(--surface-2); }
.rendu-prev figure button { position: absolute; top: 2px; right: 2px; padding: 2px 6px; background: var(--surface); }
.rendu-prev figcaption { font-size: .75rem; color: var(--muted); }
.rendu-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.rendu-view { min-height: 120px; }
.rendu-view img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.annot-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: sticky; top: -22px; z-index: 2; background: var(--surface); padding: 6px 0; }
.annot-wrap { position: relative; overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.annot-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.annot-txt { position: absolute; min-width: 160px; font: 700 15px/1.3 sans-serif; background: rgba(255,255,255,.92); border: 1px dashed currentColor; border-radius: 4px; padding: 2px 4px; z-index: 3; }
.rendu-texte pre { white-space: pre-wrap; word-break: break-word; font: 1rem/1.5 var(--body); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 4px 0 0; }
.lr-red { margin-top: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 8px; }
.lr-red[open] { border-style: solid; background: var(--surface-2); }
.lr-red > summary { cursor: pointer; font-weight: 700; }
.lr-sym { display: flex; flex-wrap: wrap; gap: 4px; }
.lr-sym .btn { min-width: 34px; padding: 4px 8px; }
.lr-txt { width: 100%; box-sizing: border-box; font: 1rem/1.5 var(--body); padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); resize: vertical; }
.price-note { grid-column: 1 / -1; margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--fg); }
/* caisse en temps réel */
.caisse { border: 2px solid var(--ok); }
.caisse-v { font: 900 2.4rem/1.1 var(--display, inherit); color: var(--ok); }
.caisse-v small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.caisse-v.neg { color: var(--bad); }
.caisse-calc { display: grid; gap: 6px; margin-top: 10px; }
.caisse-calc > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.caisse-calc small { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
.caisse-calc .tot { background: var(--ok-bg); font-weight: 700; }
