/* Copied from the approved design canvas artboard (SchoolConsole.dc.html,
   Dudhal design canvas — sample per-school management console). Same
   dashboard-shell family as InspectorConsole/console.css, but kept as its
   own file rather than merged into it: these are two genuinely separate
   real apps (a regional inspector's tool vs. a school's own admin console)
   that only coincidentally share a visual language today, and the school
   console is the one expected to grow independently (élèves, personnel,
   documents, emails). Scoped under .school-console instead of :root for the
   same coexistence reason as .shell in console.css. */

.school-console {
  --bg: #f4f7f5; --ink: #16231f; --ink-soft: #5c6d67; --ink-faint: #8a968f;
  --teal: #0f5c52; --teal-deep: #0a3f38; --teal-pale: #e7f1ee; --gold: #dd9f34; --red: #c23b3b;
  --card-bg: #ffffff; --card-border: #e1e8e4;
  /* Real bug found while porting EspacePP.dc.html: several earlier batches (InscrireEleve's `.savebar`,
     ProgressionPanel's `.cre`, AvancementProgramme's `.promo-edit`/`.matrow`, CalendrierAdmin's `.steps`)
     already used `var(--line)` for borders, but this token was never actually defined here — an undefined
     custom property makes the whole `border` shorthand invalid, so every one of those borders was
     silently rendering as none. Value matches the canvas's own `--line:#e9efec;`, used identically on
     every board. */
  --line: #e9efec;
  --ok-bg: #e6f3ec; --ok-ink: #157a4a; --warn-bg: #fbf1de; --warn-ink: #96660f; --pend-bg: #eef1ef; --pend-ink: #5c6d67;

  font-family: "Work Sans", -apple-system, "Segoe UI", sans-serif; color: var(--ink);
  /* `100dvh` after `100vh`: real iOS Safari bug — Safari's address bar is still animating on first paint,
     so `100vh` alone locks in against the wrong (often too-small) viewport height until something forces
     a recompute (a resize, exactly what was reported live: "need to resize to see everything"). `dvh`
     tracks the real, currently-visible viewport; older browsers without it just keep the `vh` line above. */
  display: flex; min-height: 100vh; min-height: 100dvh; background: var(--bg);
}
/* :not(.navitem): see console.css's identical note — .school-console (0,1,1)
   would otherwise outrank .navitem's own color (0,1,0) and make every
   sidebar label unreadable, same bug already found and fixed there. */
.school-console a:not(.navitem) { color: var(--teal); }

.school-console .sidebar { width: 232px; flex-shrink: 0; background: var(--teal-deep); color: #d9ece5; display: flex; flex-direction: column; padding-bottom: 16px;
  /* Pinned: the whole menu stays visible while the page scrolls to a section. `100dvh` after `100vh`: a
     fixed `height` (not `min-height`) combined with `overflow-y:auto` is exactly the dangerous shape for
     the real iOS Safari bug — `100vh` alone can lock in smaller than the real viewport while the address
     bar is still animating on first paint, clipping the bottom nav items behind the scrollable edge until
     a resize recomputes it; `dvh` tracks the real, currently-visible viewport instead. */
  position: sticky; top: 0; align-self: flex-start; height: 100vh; height: 100dvh; overflow-y: auto; }
.school-console .sidebar .brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(217,236,229,0.14); margin-bottom: 10px; position: relative; }
.school-console .sidebar .brand .school { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1rem; color: #fff; line-height: 1.2; }
.school-console .sidebar .brand .network { font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; margin-top: 4px; }
.school-console .navlist { display: flex; flex-direction: column; gap: 1px; padding: 0 10px; }
.school-console .navitem {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
  color: #d9ece5; font-size: 0.86rem; opacity: 0.82; text-decoration: none;
}
.school-console .navitem svg { flex-shrink: 0; width: 17px; height: 17px; }
.school-console .navitem.active { background: rgba(217,236,229,0.12); opacity: 1; font-weight: 600; }
.school-console .navfoot { margin-top: auto; padding: 14px 20px 0; border-top: 1px solid rgba(217,236,229,0.14); font-size: 0.72rem; opacity: 0.55; }

/* Mobile drawer chrome — all three default to invisible/inert; the `max-width:640px` block below is what
   actually turns them on. On desktop the sidebar is never anything but the always-visible column above. */
.school-console .menu-toggle {
  display: none; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 8px; border: 1px solid var(--card-border); background: #fff; color: var(--teal-deep);
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.school-console .menu-toggle svg { width: 19px; height: 19px; }
.school-console .sidebar-close {
  display: none; align-items: center; justify-content: center; position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px; background: rgba(217,236,229,0.12); border: none;
  color: #d9ece5; cursor: pointer; padding: 0;
}
.school-console .sidebar-close svg { width: 17px; height: 17px; }
.school-console .sidebar-backdrop { display: none; }

.school-console main { flex: 1; min-width: 0; }
.school-console .topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 32px;
  background: var(--card-bg); border-bottom: 1px solid var(--card-border);
}
.school-console .topbar-head { display: flex; align-items: center; gap: 12px; }
.school-console .topbar .eyebrow { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
/* line-height/letter-spacing reset — see console.css's identical note. */
.school-console .topbar h1 { font-family: "Zilla Slab", serif; font-size: 1.2rem; font-weight: 700; line-height: normal; letter-spacing: normal; color: var(--teal-deep); margin: 2px 0 0; }
.school-console .user { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; }
.school-console .user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #3a2c0c; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.school-console .user .role { font-size: 0.72rem; color: var(--ink-soft); margin-top: 1px; }
.school-console .user .logout {
  font: inherit; font-size: 0.78rem; color: var(--teal); background: none; border: none; padding: 0;
  margin-left: 4px; cursor: pointer; text-decoration: underline;
}

.school-console .login-form { display: flex; align-items: center; gap: 6px; }
.school-console .login-form input {
  font: inherit; font-size: 0.78rem; padding: 7px 9px; border: 1px solid var(--card-border); border-radius: 6px;
  background: var(--bg); width: 140px;
}
.school-console .login-form .btn {
  font: inherit; font-size: 0.78rem; font-weight: 600; padding: 7px 14px; border: none; border-radius: 6px;
  background: var(--teal); color: #fff; cursor: pointer; white-space: nowrap;
}
.school-console .login-form .btn:disabled { opacity: 0.6; cursor: default; }
.school-console .login-error { font-size: 0.72rem; color: var(--red); max-width: 180px; }

.school-console .note-form { padding: 14px 20px 18px; border-top: 1px solid var(--card-border); }
.school-console .note-form-title { font-size: 0.8rem; font-weight: 700; color: var(--teal-deep); margin-bottom: 8px; }
.school-console .note-form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.school-console .note-form-row select,
.school-console .note-form-row input {
  font: inherit; font-size: 0.82rem; padding: 7px 9px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--bg);
}
.school-console .note-form-row input[type="number"] { width: 110px; }
.school-console .note-form-row input[type="email"],
.school-console .note-form-row input[type="text"],
.school-console .note-form-row input[type="password"] { width: 160px; }
.school-console .btn {
  font: inherit; font-size: 0.82rem; font-weight: 600; padding: 7px 14px; border: none; border-radius: 6px;
  background: var(--teal); color: #fff; cursor: pointer;
}
/* Was scoped to `.note-form-row .btn` only — a real bug: `AdminCalendrierPanel`'s own `.btn` buttons sit
   in plain divs outside any `.note-form-row`, so they rendered as unstyled browser-default buttons before
   this. Generalized to a standalone class; `.ghost` ported from the design canvas for its secondary
   "← Retour"/"Recommencer" actions, which that wizard never visually distinguished from "Publier" before. */
.school-console .btn.ghost { background: transparent; color: var(--teal-deep); border: 1px solid var(--card-border); }
.school-console .btn.small { padding: 6px 12px; font-size: 0.76rem; border-radius: 7px; }
/* Fiche d'auto-inspection's "Documents pédagogiques" checklist — a fixed-width label name next to two
   triState selects, one row per document. Real content, not `.note-form-row`'s own looser flex row. */
.school-console .fai-critere-ligne { display: flex; gap: 10px; align-items: flex-end; font-size: 0.82rem; }
.school-console .fai-critere-label { width: 220px; flex: 0 0 220px; }
/* Fiche synthèse's own per-plage Garçons/Filles row — same fixed-label-next-to-inputs shape as
   `.fai-critere-ligne` above, a narrower label (90px) so kept as its own pair rather than reusing it. */
.school-console .fs-bande-ligne { display: flex; gap: 8px; align-items: center; font-size: 0.82rem; }
.school-console .fs-bande-label { width: 90px; flex: 0 0 90px; }
.school-console .btn:disabled { opacity: 0.6; cursor: default; }
.school-console .note-form-ok { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--teal); }
.school-console .note-form-error { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--red); }

/* Design canvas InscrireEleve.dc.html's own labeled form grid — ported for `inscriptionPanelBody`, a
   genuinely cramped single-row `.note-form-row` (no field labels at all) before this. Kept separate from
   `.note-form-row` above rather than replacing it, since many other panels still rely on that looser row. */
.school-console .formgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 16px 20px; }
.school-console .formgrid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.school-console .formgrid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .school-console .formgrid, .school-console .formgrid.cols-5, .school-console .formgrid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .school-console .formgrid, .school-console .formgrid.cols-5, .school-console .formgrid.cols-3 { grid-template-columns: 1fr; } }
.school-console .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.school-console .field label { font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }
.school-console .field input, .school-console .field select, .school-console .field textarea { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid var(--card-border); border-radius: 8px; padding: 9px 11px; font-size: 0.84rem; font-family: inherit; background: #fff; resize: vertical; }
.school-console .field .hint { font-size: 0.68rem; color: var(--ink-soft); }
.school-console .savebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg); }
.school-console .dupwarn { margin: 0 20px 16px; padding: 12px 14px; border: 1px solid var(--red); border-radius: 10px; background: #fbeeec; }
.school-console .dupwarn .t { color: var(--red); font-size: 0.84rem; font-weight: 700; margin-bottom: 6px; }
.school-console .dupwarn .row { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; color: var(--red); margin-bottom: 8px; }

/* Design canvas Remarques.dc.html's own two-column composer/history layout — ported for `Remarques`,
   whose composer and historique used to stack full-width one under the other with no visual separation. */
.school-console .layout { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.school-console .colmain { flex: 1 1 420px; min-width: 300px; }
.school-console .colhist { flex: 1 1 340px; min-width: 280px; }
@media (max-width: 900px) { .school-console .layout { flex-direction: column; } .school-console .colmain, .school-console .colhist { width: 100%; min-width: 0; } }
.school-console .catpills { display: flex; gap: 7px; flex-wrap: wrap; }
.school-console .catpill { border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 13px; font-size: 0.78rem; cursor: pointer; background: #fff; color: var(--ink-soft); font-family: inherit; }
.school-console .catpill.on { background: var(--teal-pale); border-color: var(--teal); color: var(--teal-deep); font-weight: 700; }
.school-console .visiblerow { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; }
.school-console .notifystrip { display: flex; align-items: center; gap: 10px; background: var(--teal-pale); border-radius: 10px; padding: 10px 14px; font-size: 0.78rem; color: var(--teal-deep); }
.school-console .histwrap { max-height: 460px; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.school-console .histitem { border: 1px solid var(--card-border); border-radius: 10px; padding: 10px 12px; }
.school-console .histtop { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.school-console .histtop .cat { font-weight: 700; font-size: 0.82rem; }
.school-console .histtop .date { font-size: 0.74rem; color: var(--ink-soft); }
.school-console .histtxt { font-size: 0.82rem; }
.school-console .histvis { font-size: 0.72rem; margin-top: 5px; }
.school-console .histvis.on { color: var(--ok-ink); }
.school-console .histvis.off { color: var(--ink-soft); }

/* Design canvas Devoirs.dc.html's own layout — ported for `Devoirs`; reuses `.field`/`.body`/`.notifystrip`
   from the Remarques/InscrireEleve batches above, adds only the 2-up field row and the published-list card. */
.school-console .row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.school-console .row2 .field { flex: 1 1 140px; min-width: 0; }
.school-console .listwrap { max-height: 420px; overflow: auto; padding: 10px 0 6px; display: flex; flex-direction: column; gap: 0; }
.school-console .listitem { border: 1px solid var(--card-border); border-radius: 10px; padding: 10px 12px; margin: 0 18px 10px; }
.school-console .listtop { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.school-console .listtop .t { font-weight: 700; font-size: 0.84rem; }
.school-console .listtop .d { font-size: 0.74rem; color: var(--ink-soft); }
.school-console .listtxt { font-size: 0.82rem; color: var(--ink-soft); }
.school-console .classerow { display: flex; align-items: center; gap: 10px; }

/* Design canvas Signalements.dc.html's own queue-row layout — ported for `Signalements`, which rendered
   each row as a loose inline-styled card before this; `.badgeNew` reuses the existing `.badge.warn`
   palette rather than duplicating it. The canvas's own notify-toggle switch is NOT ported — its own text
   says plainly nothing sends that alert yet, so a clickable switch here would imply a feature that does
   not exist; the informational banner line is kept, the switch is not. */
.school-console .row { display: flex; flex-direction: column; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.school-console .row:last-child { border-bottom: none; }
.school-console .row.traite { opacity: 0.55; }
.school-console .rowtop { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.school-console .rowtop .t { font-weight: 700; font-size: 0.86rem; }
.school-console .rowtop .d { font-size: 0.76rem; color: var(--ink-soft); white-space: nowrap; }
.school-console .msg { font-size: 0.82rem; color: var(--ink); }
.school-console .doneLbl { color: var(--ok-ink); font-size: 0.78rem; font-weight: 700; }
/* Design canvas DemandesParent.dc.html's own `.matchbox` — the "identify the pupil before transmitting"
   step inside `demandeTransfertParentFormulaire`, previously just another plain `.note-form-row` with no
   visual distinction from the rest of the form, despite being the one step that blocks transmission. */
.school-console .matchbox { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px; background: var(--bg); width: 100%; }
.school-console .matchbox .alert { font-size: 0.8rem; font-weight: 700; color: var(--red); margin-bottom: 6px; }
.school-console .matchbox .decl { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 8px; }
.school-console .matchbox input { width: 100%; margin-bottom: 8px; }

/* Design canvas RentreeScolaire.dc.html's own 3-step wizard (Importer/Vérifier/Terminé) — ported for
   `RentreeScolairePanel`, previously a flat single-screen flow (textarea → one preview line → one result
   line) with no sense of where the person stood in the process. */
.school-console .steps { display: flex; border-bottom: 1px solid var(--line); margin: -1px -1px 14px; }
.school-console .step { flex: 1; min-width: 0; padding: 12px 16px; display: flex; align-items: center; gap: 9px; font-size: 0.82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.school-console .step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex: none; }
.school-console .step.done .n { background: var(--ok-bg); color: var(--ok-ink); }
.school-console .step.active { color: var(--teal-deep); font-weight: 700; }
.school-console .step.active .n { background: var(--teal); color: #fff; }
.school-console .step + .step { border-left: 1px solid var(--line); }
.school-console .examplebtn { font-size: 0.76rem; color: var(--teal-deep); text-decoration: underline; cursor: pointer; background: none; border: none; font-family: inherit; padding: 0; }
.school-console .colhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.school-console .summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 16px; }
@media (max-width: 640px) { .school-console .summary { grid-template-columns: 1fr; } }
.school-console .sstat { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.school-console .sstat .v { font-family: 'Zilla Slab', 'Work Sans', serif; font-weight: 700; font-size: 1.3rem; color: var(--teal-deep); }
.school-console .sstat .v.warn { color: var(--warn-ink); }
.school-console .sstat .l { font-size: 0.72rem; color: var(--ink-soft); margin-top: 2px; }
.school-console .donebox { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.school-console .doneicon { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-bg); color: var(--ok-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.school-console .donetext .t { font-weight: 700; font-size: 1rem; }
.school-console .donetext .s { font-size: 0.82rem; color: var(--ink-soft); margin-top: 3px; }

.school-console .btn-small {
  font: inherit; font-size: 0.76rem; font-weight: 600; padding: 5px 10px; border: none; border-radius: 6px;
  background: var(--teal); color: #fff; cursor: pointer; white-space: nowrap;
}
.school-console a.btn-small, .school-console a.btn { color: #fff; text-decoration: none; display: inline-block; }
.school-console .btn-small:disabled { opacity: 0.6; cursor: default; }
.school-console .btn-small.secondary { background: var(--ink-soft); margin-left: 6px; }
.school-console .valeur-input {
  font: inherit; font-size: 0.82rem; padding: 5px 7px; border: 1px solid var(--card-border); border-radius: 6px;
  background: var(--bg); width: 72px; font-family: "JetBrains Mono", monospace;
}

.school-console .content { padding: 26px 32px 50px; }

.school-console .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.school-console .stat-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 18px 20px; }
.school-console .stat-card .v { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.7rem; color: var(--teal-deep); font-variant-numeric: tabular-nums; }
.school-console .stat-card .l { font-size: 0.74rem; color: var(--ink-soft); margin-top: 4px; }

.school-console .onboarding {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 14px 20px; margin-bottom: 22px;
}
.school-console .onboarding .oh { font-size: 0.78rem; font-weight: 700; color: var(--teal-deep); flex-shrink: 0; }
.school-console .ostep { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--ink-soft); }
.school-console .ostep .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.school-console .ostep.done .dot { background: var(--teal); }
.school-console .ostep.done { color: var(--ink); }
.school-console .ostep.pending .dot { background: var(--card-border); border: 1px solid var(--ink-soft); }

.school-console .panel { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.school-console .panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--card-border); }
.school-console .panel-head .title { font-size: 0.9rem; font-weight: 700; color: var(--teal-deep); }
.school-console .panel-head a { font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.school-console .toolbar { display: flex; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--card-border); }
.school-console .search { flex: 1; position: relative; }
.school-console .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); width: 14px; height: 14px; }
.school-console .search input { width: 100%; font: inherit; font-size: 0.85rem; padding: 8px 10px 8px 30px; border: 1px solid var(--card-border); border-radius: 7px; background: var(--bg); }
.school-console select.filter { font: inherit; font-size: 0.84rem; padding: 8px 10px; border: 1px solid var(--card-border); border-radius: 7px; background: var(--bg); }

.school-console table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.school-console th, .school-console td { text-align: left; padding: 11px 20px; border-bottom: 1px solid var(--card-border); }
.school-console th { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); font-weight: 700; }
.school-console tbody tr:last-child td { border-bottom: none; }
.school-console table.compact th, .school-console table.compact td { padding: 6px 20px; }
.school-console .mono { font-family: "JetBrains Mono", monospace; font-size: 0.76rem; color: var(--ink-soft); }

/* Design canvas RegistresAdministratifs.dc.html's own "dont F" sub-label and total row — ported for
   `registresAdministratifsPanel`'s effectifs table; `tr.total` here is scoped to `.school-console` directly
   (not `.fiche tr.total`, a separate pre-existing rule for a different real page). */
.school-console .sub { color: var(--ink-faint); font-weight: 400; font-size: 0.72rem; }
.school-console tr.total td { font-weight: 700; border-top: 2px solid var(--card-border); background: var(--bg); }
.school-console .badge { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.school-console .badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.school-console .badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.school-console .badge.pending { background: var(--pend-bg); color: var(--pend-ink); }
.school-console .badge.transfere { background: var(--pend-bg); color: var(--pend-ink); font-style: italic; }
/* Design canvas Admissions.dc.html's own default (unmodified) `.badge` — teal-pale, for the "Type" column
   (Préinscription/Transfert) in `demandesAdmissionPanel`. The base `.badge` rule above carries no
   background of its own (every other real use already supplies ok/warn/pending/transfere), so this was
   rendering as bare text with no pill at all before this. */
.school-console .badge.type { background: var(--teal-pale); color: var(--teal-deep); }

/* Design canvas ComptesAdmin.dc.html's own role badges, for `compteRow`'s Rôle column — previously plain
   unstyled text. */
.school-console .badge.admin { background: var(--warn-bg); color: var(--warn-ink); }
.school-console .badge.pe { background: var(--teal-pale); color: var(--teal-deep); }
.school-console .badge.ens { background: var(--ok-bg); color: var(--ok-ink); }

/* Design canvas Personnel.dc.html's own tab bar — ported for `panneauPersonnelAvecEvenements`, which
   stacked "Personnel enseignant" and "Personnel non-enseignant" as two always-visible cards before this.
   Purely a local UI toggle (`personnelTabVar`), no new API calls — both sections' own real data stays
   loaded the whole time, only which card renders changes. */
.school-console .tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--card-border); background: var(--bg); flex-wrap: wrap; }
.school-console .tab { padding: 10px 14px; font-size: 0.8rem; color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; }
.school-console .tab.active { color: var(--teal-deep); font-weight: 700; border-color: var(--teal); background: var(--card-bg); }
.school-console .tablewrap { max-height: 460px; overflow: auto; }
.school-console .tablewrap thead th { position: sticky; top: 0; z-index: 1; background: var(--bg); }

/* Classes — the niveau-grouped chip layout from the approved design canvas
   (claude.ai/artifact/XDi8JobNtgHEw2Fvdy3zaQ#play-7cfc36549372), replacing the flat per-classe row list
   `ClassesPanel.ligneClasse` used before. Responsive breakpoints are part of this from the start — the
   canvas's own first version of this grid shipped without them and overflowed its card at ~650px wide,
   found and fixed live this same session; they're baked in here so that bug class never recurs here. */
.school-console .niveaugrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; padding: 16px 20px; }
@media (max-width: 820px) { .school-console .niveaugrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) { .school-console .niveaugrid { grid-template-columns: 1fr; } }
.school-console .niv { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.school-console .niv .t { font-weight: 700; font-size: 0.86rem; margin-bottom: 8px; }
.school-console .niv .classes { display: flex; flex-wrap: wrap; gap: 6px; }
.school-console .cchip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.76rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--teal-pale); color: var(--teal-deep); max-width: 100%; }
.school-console .cchip.archivee { opacity: 0.55; }
@media (max-width: 520px) { .school-console .cchip { font-size: 0.7rem; padding: 4px 8px; gap: 5px; } }
.school-console .cchip button { border: none; background: none; color: inherit; opacity: 0.65; cursor: pointer; font-size: 0.7rem; padding: 0; font: inherit; }

.school-console .toggle-decision {
  font: inherit; font-size: 0.76rem; font-weight: 600; padding: 5px 11px; border-radius: 6px; cursor: pointer;
  background: #fff;
}
.school-console .toggle-admis { border: 1.5px solid var(--teal); color: var(--teal); }
.school-console .toggle-admis.active { background: var(--teal); color: #fff; }
.school-console .toggle-redouble { border: 1.5px solid var(--red); color: var(--red); }
.school-console .toggle-redouble.active { background: var(--red); color: #fff; }

/* Design canvas Decisions.dc.html's own per-classe header bar + scrollable, sticky-header table —
   ported for `DecisionsPanel.contenu`'s per-classe block, which previously had no search or sticky
   header at all on what can be a 70+ pupil table. */
.school-console .classebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--card-border); border-bottom: none; border-radius: 10px 10px 0 0; background: var(--bg); flex-wrap: wrap; gap: 8px; }
.school-console .classebar .n { font-weight: 700; font-size: 0.86rem; color: var(--teal-deep); }
.school-console .searchbox { border: 1px solid var(--card-border); border-radius: 9px; padding: 7px 11px; font-size: 0.82rem; font-family: inherit; min-width: 0; width: 200px; max-width: 100%; }
.school-console .rowcount { font-size: 0.74rem; color: var(--ink-faint); padding: 8px 14px 0; border: 1px solid var(--card-border); border-top: none; border-bottom: none; background: var(--card-bg); }
.school-console .gridwrap { overflow: auto; max-height: 480px; border: 1px solid var(--card-border); border-top: none; border-radius: 0 0 10px 10px; }
.school-console .gridwrap table { margin: 0; }
.school-console .gridwrap th { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.school-console .gridwrap th.elcol, .school-console .gridwrap td.elcol { position: sticky; left: 0; z-index: 1; background: var(--card-bg); }
.school-console .gridwrap th.elcol { z-index: 3; }

/* GestionFinanciere's transparent dons+dépenses ledger — `+`/`-` amount styling, same in/out convention
   as the design canvas's own `.ledgerrow .amt.in/.out`. Reuses `--ok-ink`/`--red` rather than new colors. */
.school-console .amt { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.school-console .amt.in { color: var(--ok-ink); }
.school-console .amt.out { color: var(--red); }

/* ComiteApeae.dc.html's own projet progress-bar + status chip — genuinely missing before this (no prior
   panel needed a progress bar), so these are new rather than reused. */
.school-console .projrow { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .school-console .projrow { grid-template-columns: 1fr; gap: 6px; } }
.school-console .projrow:last-child { border-bottom: none; }
.school-console .projrow .t { font-weight: 600; font-size: 0.86rem; margin-bottom: 3px; }
.school-console .projrow .d { font-size: 0.76rem; color: var(--ink-soft); }
.school-console .progwrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.school-console .track { height: 8px; border-radius: 999px; background: var(--line); flex: 1; min-width: 0; overflow: hidden; }
.school-console .track .f { height: 100%; background: var(--teal); border-radius: 999px; }
.school-console .pct { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; color: var(--teal-deep); font-weight: 600; flex: none; }
.school-console .statuschip { display: inline-flex; font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; flex: none; }
.school-console .statuschip.cours { background: var(--warn-bg); color: var(--warn-ink); }
.school-console .statuschip.atteint { background: var(--ok-bg); color: var(--ok-ink); }

/* Design canvas CalendrierScolaire.dc.html's own week-band + trimestre grid — ported for
   `CalendrierPanel.contenu`, which previously laid out the same real data (semaine de cours, trimestres,
   jours fériés) as plain inline-styled divs with no shared look across panels. */
.school-console .weekband { padding: 12px 16px; background: var(--pend-bg); border-radius: 10px; margin-bottom: 16px; font-weight: 600; font-size: 0.86rem; }
.school-console .trimgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 16px 20px; }
@media (max-width: 820px) { .school-console .trimgrid { grid-template-columns: 1fr; } }
.school-console .trimcard { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px; }
.school-console .trimcard.active { border-color: var(--teal); background: var(--teal-pale); }
.school-console .trimhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; min-width: 0; }
.school-console .trimhead strong { font-size: 0.86rem; }
.school-console .trimrange { font-size: 0.78rem; color: var(--ink-soft); margin-top: 8px; }
.school-console .trimdays { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }

.school-console .two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }

/* Design canvas Periodiques.dc.html's own "prochaine échéance" highlight card — ported for
   `PeriodiquesPanel.tableau`, which previously listed every échéance as a flat table with no callout for
   the soonest one still actionable (the real `statutPeriodique`/`joursDepuisEpoque` computation this draws
   from already existed and is untouched). */
.school-console .nextdeadline { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-left: 4px solid var(--gold); margin: 0 20px 16px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--card-border); border-left: 4px solid var(--gold); }
.school-console .nextdeadline .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--teal-pale); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.1rem; }
.school-console .nextdeadline .t { font-weight: 700; font-size: 0.88rem; }
.school-console .nextdeadline .s { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }

/* Design canvas ProgressionPedagogique.dc.html's own per-créneau card — ported for
   `ProgressionPanel.tableauCreneaux`, which previously rendered each créneau as a plain bordered div with
   no icon/time treatment. All 3 real statuses (`statutSaisie`, badge, form-open) are unchanged. */
.school-console .cre { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; }
.school-console .cre .ch { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
.school-console .cre .ch .time { display: flex; align-items: center; gap: 10px; }
.school-console .cre .ch .time .ico { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-pale); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.school-console .cre .ch .time .t { font-weight: 700; font-size: 0.9rem; }
.school-console .cre .ch .time .s { font-size: 0.72rem; color: var(--ink-soft); }
.school-console .cre .body { padding: 0 16px 14px; border-top: 1px solid var(--line); margin-top: 2px; padding-top: 12px; }
.school-console .cre .body .stats { font-size: 0.8rem; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.school-console .cre .body .stats .progress-track { max-width: 140px; flex: 1; }
.school-console .cre .form { padding: 14px 16px; border-top: 1px solid var(--line); }

/* Design canvas AvancementProgramme.dc.html's own promo-edit matrix — ported for
   `avancementProgrammeFormBody`/`avancementPromotionRow`, which previously laid its per-promotion ×
   matière cells out as plain wrapped inputs with no row structure. `prevu`/`envisagé` is still computed
   server-side (see this panel's own `avancementCellule` comment) — only `realisé` is ever typed here. */
.school-console .promo-edit { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.school-console .promo-edit .peh { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.school-console .promo-edit .peh input { flex: 1; min-width: 120px; border: 1px solid var(--card-border); background: #fff; font-weight: 700; font-size: 0.86rem; padding: 5px 8px; border-radius: 6px; font-family: inherit; }
.school-console .peh .count { font-size: 0.7rem; color: var(--ink-soft); }
.school-console .matrow { display: grid; grid-template-columns: 140px 1fr 130px; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.school-console .matrow:last-child { border-bottom: none; }
@media (max-width: 700px) { .school-console .matrow { grid-template-columns: 1fr; gap: 4px; } }
.school-console .matname { font-weight: 600; }
.school-console .prevu-note { font-size: 0.72rem; color: var(--ink-faint); display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.school-console .realise-input { display: flex; align-items: center; gap: 6px; }
.school-console .realise-input input { width: 58px; border: 1px solid var(--card-border); border-radius: 7px; padding: 6px 7px; font-size: 0.84rem; font-family: "JetBrains Mono", monospace; text-align: right; }
.school-console .realise-input span { font-size: 0.78rem; color: var(--ink-soft); }
.school-console .minitrack { width: 110px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.school-console .minitrack .f { height: 100%; background: var(--gold); }

/* Generic segmented control (design canvas convention, e.g. ResultatClasse.dc.html's période picker) —
   reusable anywhere a small set of mutually-exclusive choices replaces a `<select>`. */
.school-console .seg { display: inline-flex; border: 1px solid var(--card-border); border-radius: 9px; overflow: hidden; }
.school-console .seg button { border: none; background: #fff; padding: 7px 13px; font-size: 0.8rem; cursor: pointer; font-family: inherit; color: var(--ink-soft); }
.school-console .seg button.active { background: var(--teal); color: #fff; font-weight: 600; }
.school-console .seg button + button { border-left: 1px solid var(--card-border); }

/* Design canvas ResultatClasse.dc.html's own "Répartition par matière" stacked-band histogram — ported
   for `resultatClasseParMatiere`, which already computed the exact same real bands/intensités, just laid
   out with ad hoc inline flex styles. Prefixed `rc` to avoid colliding with `.matrow` above (AvancementProgramme's own, different column shape). */
.school-console .rcmatrow { display: flex; align-items: center; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.06); flex-wrap: wrap; }
.school-console .rcmatrow:last-child { border-bottom: none; }
.school-console .rcmatname { width: 120px; flex: 0 0 120px; font-weight: 600; font-size: 0.84rem; }
.school-console .rcbands { flex: 1 1 140px; min-width: 0; display: flex; gap: 3px; height: 20px; border-radius: 5px; overflow: hidden; }
.school-console .rcmatmeta { width: 170px; flex: 0 0 170px; max-width: 100%; text-align: right; font-size: 0.76rem; color: var(--ink-soft); }
.school-console .rcflag { font-size: 0.7rem; color: var(--warn-ink); background: var(--warn-bg); padding: 2px 8px; border-radius: 999px; flex: none; }
.school-console .rclegend { display: flex; gap: 14px; padding: 10px 16px 12px; font-size: 0.7rem; color: var(--ink-soft); flex-wrap: wrap; }
.school-console .rclegend span { display: inline-flex; align-items: center; gap: 5px; }
.school-console .rclegend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.school-console .rank1 { color: var(--gold); font-weight: 700; }

/* Same isolate-one-element print technique as .print-contenu/.print-plan/.print-fiches-rapides above — a
   5th body class, since "Résultat de classe" prints its own répartition-par-matière + classement complet
   (`.rc-print`), reusing the already-real "window.print() + an isolated wrapper" mechanism rather than any
   new server-side PDF service. */
@media print {
  body.print-resultat-classe * { visibility: hidden; }
  body.print-resultat-classe .rc-print, body.print-resultat-classe .rc-print * { visibility: visible; }
  body.print-resultat-classe .rc-print { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; }
  body.print-resultat-classe .no-print { display: none !important; }
}
.school-console .rc-print-head { display: none; }
@media print { .school-console .rc-print-head { display: block; margin-bottom: 16px; } }
.school-console .rc-print-head .school { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.1rem; color: var(--teal-deep); }
.school-console .rc-print-head .meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }

/* Same isolate-one-element print technique as .rc-print above, for RhPaiePanel's printable bulletin de
   paie — no server-side PDF service here either. */
@media print {
  body.print-bulletin-paie * { visibility: hidden; }
  body.print-bulletin-paie .bp-print, body.print-bulletin-paie .bp-print * { visibility: visible; }
  body.print-bulletin-paie .bp-print { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; }
  body.print-bulletin-paie .no-print { display: none !important; }
}
.school-console .bp-print { display: none; }
@media print { .school-console .bp-print { display: block; } }
.school-console .bp-print-head { margin-bottom: 16px; }
.school-console .bp-print-head .school { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.1rem; color: var(--teal-deep); }
.school-console .bp-print-head .meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.school-console .bp-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.school-console .bp-line.total { font-weight: 700; color: var(--teal-deep); border-bottom: none; border-top: 2px solid var(--card-border); margin-top: 6px; padding-top: 12px; }

/* Design canvas CalendrierAdmin.dc.html's own 3-step wizard header — ported for `AdminCalendrierPanel`,
   which already had the real Importer/Vérifier/Publier state machine but only rendered the step names as
   a plain inline "1. Importer → 2. Vérifier & corriger → 3. Publier" text line (`etapeStepper`), with no
   numbered-circle/done-state visual at all. */
.school-console .steps { display: flex; border-bottom: 1px solid var(--line); flex-wrap: wrap; margin: -16px -20px 16px; }
.school-console .step { flex: 1; min-width: 140px; padding: 12px 16px; display: flex; align-items: center; gap: 9px; font-size: 0.8rem; color: var(--ink-soft); }
.school-console .step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 700; flex: none; }
.school-console .step.done .n { background: var(--ok-bg); color: var(--ok-ink); }
.school-console .step.active { color: var(--teal-deep); font-weight: 700; }
.school-console .step.active .n { background: var(--teal); color: #fff; }
.school-console .step + .step { border-left: 1px solid var(--line); }

.school-console .grouptitle { font-size: 0.82rem; font-weight: 700; margin: 16px 0 8px; color: var(--teal-deep); }

/* Design canvas PresencePersonnel.dc.html's own ring/kiosk layout — ported for `PresencePersonnelPanel`,
   replacing its plain 2-stat `.grid4` with the canvas's conic-gradient attendance ring (`ringDeg` is
   computed from the real registre, never a design-time constant) and labeled QR/jeton block. */
.school-console .overview { display: flex; align-items: center; gap: 20px; padding: 18px 20px; flex-wrap: wrap; }
.school-console .ring { width: 72px; height: 72px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.school-console .ring .hole { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-family: "Zilla Slab", serif; font-weight: 700; font-size: 0.92rem; color: var(--teal-deep); }
.school-console .ov-t { font-weight: 700; font-size: 0.92rem; }
.school-console .ov-s { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.school-console .ov-right { margin-left: auto; display: flex; gap: 22px; }
.school-console .ov-stat { text-align: right; }
.school-console .ov-stat .v { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.2rem; }
.school-console .ov-stat .v.warn { color: var(--warn-ink); }
.school-console .ov-stat .l { font-size: 0.7rem; color: var(--ink-soft); }
.school-console .who { display: flex; align-items: center; gap: 9px; }
.school-console .av { width: 28px; height: 28px; border-radius: 50%; background: var(--teal-pale); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; flex: none; }
.school-console .kiosk { display: flex; gap: 20px; padding: 4px 4px 4px 0; align-items: flex-start; flex-wrap: wrap; }
.school-console .kioskinfo { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.school-console .urlbox { margin-top: 10px; padding: 9px 12px; background: var(--bg); border-radius: 8px; font-family: "JetBrains Mono", monospace; font-size: 0.76rem; word-break: break-all; }
.school-console .validchip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; color: var(--ink-soft); margin-top: 8px; }
.school-console .empty-row td { text-align: center; color: var(--ink-soft); font-style: italic; padding: 20px; }

@media (max-width: 640px) {
  /* The old rule here was a plain `display:none` — the sidebar, and every section link in it, was simply
     unreachable on a real phone, for every role, found while testing the role-aware console at this
     width. Now an off-canvas drawer: present but translated out of view until `.open`, which
     `sidebarOuvertVar` toggles via the hamburger button / backdrop tap / closing on any nav click. */
  .school-console .sidebar {
    display: flex; position: fixed; top: 0; left: 0; z-index: 60; width: 84vw; max-width: 300px;
    /* `100dvh` after `100vh`: same real iOS Safari bug as the desktop `.sidebar` rule above. */
    height: 100vh; height: 100dvh; transform: translateX(-100%); transition: transform 0.22s ease;
    box-shadow: 3px 0 20px rgba(0,0,0,0.3);
  }
  .school-console .sidebar.open { transform: translateX(0); }
  .school-console .menu-toggle { display: inline-flex; }
  .school-console .sidebar-close { display: flex; }
  .school-console .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(8,24,20,0.5); z-index: 55;
    opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
  }
  .school-console .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .school-console .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .school-console .two-col { grid-template-columns: 1fr; }
  .school-console .content { padding: 18px 16px 40px; }

  /* The hamburger lived inside the ordinary (non-pinned) `.topbar`, so once a long page scrolled even a
     little it went with it — a real "the menu becomes unreachable" complaint, found live. `.topbar-head`
     (hamburger + title, never the long name/role/logout block below it) now stays `position:sticky` at
     the very top of the viewport on its own, through the whole scroll — the one thing that must always
     stay reachable. The user badge row keeps scrolling away normally underneath it; it was never the part
     anyone needed mid-scroll. z-index 50: above ordinary page content, below the drawer (60) and its
     backdrop (55), so an open drawer still overlays this bar rather than sitting behind it.
     `.topbar { display:contents }` matters, not just styling: `position:sticky` only holds an element in
     place for as long as its OWN direct parent's box is still in the viewport — `.topbar` is only as tall
     as its two rows (~90px), so without this, `.topbar-head` released and scrolled away the instant that
     ~90px had passed, found live by scrolling and checking its real bounding box. `display:contents` makes
     `.topbar` generate no box of its own, so `.topbar-head`'s containing block becomes `main` (the whole
     scrollable page) instead — confirmed live afterwards: still pinned at 1500px of scroll. */
  .school-console .topbar { display: contents; }
  .school-console .topbar-head {
    position: sticky; top: 0; z-index: 50; background: var(--card-bg);
    border-bottom: 1px solid var(--card-border); padding: 14px 16px;
  }
  .school-console .login-form { flex-wrap: wrap; }
  .school-console .login-form input { width: 110px; }

  /* `.user` on a narrow phone, with a real long display name ("Aboubacar Sylla — Professeur de
     Mathématiques, Collège Dr Lansana Beavogui" / "M. Diallo Mamadou Bailo — Principal, Collège Dr Lansana
     Beavogui"): found live while testing the new role-aware console at 390px — the avatar circle
     vertical-centered against 3-4 wrapped lines of text instead of sitting at the top of them, and the
     logout link got squeezed to the point of clipping. Every role has an equally long name here, so this
     was never specific to the teacher view — just never tested this narrow before now. */
  .school-console .user {
    align-items: flex-start; flex-wrap: wrap; row-gap: 6px; padding: 10px 16px 14px;
    border-bottom: 1px solid var(--card-border);
  }
  .school-console .user .avatar { margin-top: 1px; }
  .school-console .user .logout { margin-left: 0; white-space: nowrap; }

  /* `.toolbar` (the Élèves search box + classe/statut filters) had no `flex-wrap`, so on a real phone the
     search box, both `<select>`s, and (on the Bulletin panel) the pupil picker were squeezed into one
     unbreakable row — found live: the statut filter pushed entirely off the right edge of the screen with
     no scrollbar to reach it, and the classe filter's own text got clipped mid-word. Wrapping is enough:
     `.search` (flex:1 in the base rule) still grows to fill a full row on its own line when it does, and
     each `select.filter` gets a sane minimum so its longest real option ("Toutes les classes") doesn't
     collapse to unreadable width while wrapped two-up. */
  .school-console .toolbar { flex-wrap: wrap; }
  .school-console .toolbar .search { flex-basis: 100%; }
  .school-console select.filter { flex: 1 1 140px; min-width: 140px; }

  /* Same real overflow as `.toolbar` above, found in two more places while testing every dropdown at
     this width: the Bulletin panel's own pupil picker (a `<select>` whose real option text is a full
     pupil name) in a `.panel-head` (used everywhere for a short title + a short link/button, which is
     why this never showed up before), and a matière `<select>` in Fiche synthèse's own `.note-form-row`
     — which ALREADY had `flex-wrap`, and still overflowed by ~30px, because a `<select>` keeps its own
     content-driven width (from its longest real option, e.g. "Théologie et Littérature Islamique") even
     once wrapped alone onto its own row. `flex-wrap` alone was never going to be enough wherever a
     select's own options can be long; constraining every select here directly is the general fix. */
  .school-console .panel-head { flex-wrap: wrap; gap: 8px; }
  .school-console select { max-width: 100%; }

  /* `.fai-critere-ligne`'s label is a hardcoded 220px wide — fine on desktop, but on a real phone it
     alone ate most of the available row width, pushing its own two triState selects off the right edge
     with no `flex-wrap` to fall back on (found live: 16 of 24 selects on this view overflowed). Both the
     wrap and the label's own width need to give: wrapping alone still leaves a 220px label alongside two
     selects competing for whatever's left on the SAME line as long as the label itself doesn't shrink. */
  .school-console .fai-critere-ligne { flex-wrap: wrap; }
  .school-console .fai-critere-label { width: 100%; flex-basis: 100%; }

  /* Same fixed-label overflow as `.fai-critere-ligne` above, found right next to it: `.fs-bande-ligne`'s
     90px label is narrower, but its two number inputs had no `flex`/`min-width` at all (fixed via inline
     `flex:1; min-width:0` on the inputs themselves, safe at every width — this half just lets the label
     give up its fixed width once the row needs to wrap). */
  .school-console .fs-bande-ligne { flex-wrap: wrap; }
  .school-console .fs-bande-label { width: 100%; flex-basis: 100%; }

  /* Every list-shaped table becomes one card per row, each cell showing the column name it came from —
     `data-label`, set live by `ResponsiveTables.scala` (mirrors each table's own `<thead>` text onto every
     body cell, so this never drifts from whatever a table's real columns are). Replaces the old rule here,
     which block-stacked every table and threw its header away entirely (`th { display: none }`), leaving
     bare, unlabeled values — a real "which number is this?" bug, not just a layout one.
     `.no-responsive-labels` opts a table out — `RegistrePanel`'s own day-by-day attendance grid is the one
     real case on this console (a real grid, not a list of same-shaped records); it keeps its ordinary
     table layout and scrolls horizontally, its own sticky Élève column already built for this width. */
  .school-console table:not(.no-responsive-labels) { display: block; }
  .school-console table:not(.no-responsive-labels) thead { display: none; }
  .school-console table:not(.no-responsive-labels) tbody { display: block; }
  .school-console table:not(.no-responsive-labels) tr {
    display: block; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px;
    padding: 4px 14px; margin-bottom: 10px;
  }
  .school-console table:not(.no-responsive-labels) tr.empty-row {
    background: none; border: none; padding: 20px 0; margin-bottom: 0;
  }
  /* Label ABOVE its value, both block-level — robust regardless of how many real elements a cell holds
     (a badge, two action buttons, a link…), unlike a label-beside-value flex row, which would have to
     fight those elements for the same line. */
  .school-console table:not(.no-responsive-labels) td {
    display: block; border: none; border-bottom: 1px solid var(--card-border); padding: 8px 0; text-align: left;
  }
  .school-console table:not(.no-responsive-labels) td:last-child { border-bottom: none; }
  .school-console table:not(.no-responsive-labels) td[colspan] { padding: 10px 0; }
  .school-console table:not(.no-responsive-labels) td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.64rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 3px;
  }
}

/* --- Documents pédagogiques workspace (checklist, direction, editors, poster) --- */
.school-console .deadline-banner { display: flex; align-items: center; gap: 12px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0dfae; border-radius: 12px; padding: 12px 18px; font-size: 0.84rem; line-height: 1.5; }
.school-console .progress-track { height: 8px; border-radius: 999px; background: var(--pend-bg); overflow: hidden; }
.school-console .progress-fill { height: 100%; background: var(--teal); border-radius: 999px; }
.school-console .progress-fill.prevu { background: var(--gold); }
.school-console .progress-fill.realise { background: var(--teal); }
.school-console .badge.new { background: var(--gold); color: #3a2c0c; }
.school-console .class-pill { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.78rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--pend-bg); color: var(--ink); cursor: pointer; border: 1px solid transparent; }
.school-console .class-pill.active { background: var(--teal); color: #fff; }
.school-console .matrix-cell { min-height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.school-console .matrix-cell.ok { background: var(--ok-bg); color: var(--ok-ink); }
.school-console .matrix-cell.warn { background: var(--warn-bg); color: var(--warn-ink); }
.school-console .matrix-cell.pending { background: var(--pend-bg); color: var(--pend-ink); }
/* StructureScolaire.dc.html's own rattachement "chain" + identity grid. */
.school-console .chain { display: flex; align-items: center; gap: 0; padding: 22px 20px; flex-wrap: wrap; }
.school-console .chainnode { display: flex; flex-direction: column; gap: 3px; padding: 14px 20px; border: 1px solid var(--card-border); border-radius: 12px; min-width: 180px; max-width: 100%; box-sizing: border-box; }
.school-console .chainnode.misenavant { border-color: var(--teal); background: var(--teal-pale); }
.school-console .chainnode .l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); font-weight: 700; }
.school-console .chainnode .n { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.05rem; color: var(--teal-deep); }
.school-console .chainnode .t { font-size: 0.76rem; color: var(--ink-soft); margin-top: 2px; }
.school-console .chainarrow { padding: 0 14px; color: var(--ink-soft); flex: none; }
@media (max-width: 560px) { .school-console .chainnode { min-width: 0; width: 100%; } }
.school-console .identgrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; }
.school-console .identcell { padding: 14px 18px; border-bottom: 1px solid var(--line, var(--card-border)); border-right: 1px solid var(--line, var(--card-border)); }
.school-console .identcell:nth-child(4n) { border-right: none; }
.school-console .identcell .l { font-size: 0.68rem; color: var(--ink-soft); margin-bottom: 3px; }
.school-console .identcell .v { font-weight: 600; font-size: 0.86rem; }
@media (max-width: 650px) { .school-console .identgrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 400px) { .school-console .identgrid { grid-template-columns: minmax(0,1fr); } }
.school-console .journal-entry { border: 1px solid var(--card-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.school-console .journal-entry .d { font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 8px; }
.school-console .tt-grid { display: grid; grid-template-columns: 110px repeat(5, minmax(96px, 1fr)); gap: 1px; background: var(--card-border); border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; min-width: 640px; }
.school-console .tt-cell { background: #fff; padding: 4px; font-size: 0.74rem; min-height: 40px; display: flex; align-items: center; justify-content: center; text-align: center; }
.school-console .tt-cell input { width: 100%; border: none; background: transparent; text-align: center; font: inherit; font-size: 0.74rem; padding: 6px 2px; }
.school-console .tt-cell input:focus { outline: 2px solid var(--teal); outline-offset: -2px; border-radius: 4px; background: var(--ok-bg); }
.school-console .tt-head { background: var(--teal-deep); color: #fff; font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.school-console .tt-time { background: var(--bg); color: var(--ink-soft); font-family: "JetBrains Mono", monospace; font-size: 0.68rem; }
.school-console .poster-sheet { background: #fff; border: 1px solid var(--card-border); box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin: 0 auto; }
.school-console .poster-toggle { display: flex; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--card-border); }
.school-console .back-link { text-decoration: none; }

@media print {
  body.print-poster * { visibility: hidden; }
  body.print-poster .poster-print, body.print-poster .poster-print * { visibility: visible; }
  body.print-poster .poster-print { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; }
  body.print-poster .poster-sheet { border: none; box-shadow: none; width: 100% !important; }
}

/* Contenus pédagogiques — "Imprimer la fiche élève" (Aperçu élève). Same
   isolate-one-element shape as .print-poster above (a second body class
   rather than reusing .print-poster: the printed element here isn't a
   .poster-sheet, and .no-print hides pieces still nested INSIDE it, like
   the "Envoyer vers un Cahier de devoir" action bar, that .print-poster's
   own targets never needed to hide). Before this, "Imprimer" called
   window.print() with no isolation at all — sidebar, topbar and the
   send-to-cahier controls all printed alongside the lesson.
*/
@media print {
  body.print-contenu * { visibility: hidden; }
  body.print-contenu .contenu-print, body.print-contenu .contenu-print * { visibility: visible; }
  body.print-contenu .contenu-print { position: absolute; left: 0; top: 0; width: 100%; border: none !important; border-radius: 0 !important; background: #fff !important; }
  body.print-contenu .no-print { display: none !important; }
}

/* Contenus pédagogiques — "Exporter en PDF" (Plan de cours). Same
   isolate-one-element shape as .print-contenu above — a third body class
   since the printed element here is the week table + couverture sidebar
   (.plan-print), not a .contenu-print card.
*/
@media print {
  body.print-plan * { visibility: hidden; }
  body.print-plan .plan-print, body.print-plan .plan-print * { visibility: visible; }
  body.print-plan .plan-print { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; }
  body.print-plan .no-print { display: none !important; }
}

/* Correction rapide des Fiches (pages/CorrectionRapide.scala) — "Imprimer les fiches manquantes".
   Same isolate-one-element print technique as .print-contenu/.print-plan above — a fourth body class
   since what's printed here is one fiche card per pupil (.frp-print), not either of those two shapes.
*/
@media print {
  body.print-fiches-rapides * { visibility: hidden; }
  body.print-fiches-rapides .frp-print, body.print-fiches-rapides .frp-print * { visibility: visible; }
  body.print-fiches-rapides .frp-print { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; }
}
.frp-fiche { page-break-after: always; box-sizing: border-box; font-family: "Work Sans", system-ui, sans-serif; color: #16231f; }
.frp-fiche:last-of-type { page-break-after: auto; }
.frp-champ { border-bottom: 1.4px solid #16231f; min-height: 20px; }

html { scroll-behavior: smooth; }

/* ---- Fiche de l'élève (pages/FicheEleve.scala) ---- */
/* `100dvh` after `100vh`: same real iOS Safari bug as `.sidebar` above. */
.fiche { --f-ink:#16231f; --f-soft:#5c6d67; --f-teal:#0f5c52; --f-deep:#0a3f38; --f-line:#e1e8e4; --f-ok:#157a4a; --f-warn:#c47f10; --f-bad:#c23b3b; min-height:100vh; min-height:100dvh; background:#eef3f0; color:var(--f-ink); font-family:"Work Sans",system-ui,sans-serif; }
.fiche-flag { height:6px; background:linear-gradient(90deg,#ce1126 33.3%,#fcd116 33.3% 66.6%,#009460 66.6%); }
.fiche-wrap { max-width:960px; margin:0 auto; padding:16px; }
.fiche-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.fiche-back { color:var(--f-teal); text-decoration:none; font-weight:600; font-size:.9rem; }
.fiche-print { background:var(--f-teal); color:#fff; border:0; border-radius:8px; padding:8px 14px; font:inherit; font-weight:600; cursor:pointer; }
.fiche-msg { padding:40px 0; text-align:center; color:var(--f-soft); }
.fiche-err { color:var(--f-bad); }
.fiche section, .fiche-banner, .fiche-kpi { background:#fff; border:1px solid var(--f-line); border-radius:14px; }
.fiche-card { padding:18px 20px; margin-bottom:14px; }
.fiche h1 { font-family:"Zilla Slab",serif; font-size:1.7rem; margin:6px 0 10px; }
.fiche h2 { font-family:"Zilla Slab",serif; font-size:1.1rem; margin:0 0 4px; }
.fiche h3 { font-size:.85rem; margin:0 0 6px; }
.fiche-head { display:flex; gap:20px; padding:20px; margin-bottom:14px; flex-wrap:wrap; }
.fiche-photo { width:110px; height:110px; border-radius:18px; background:#dfeae5; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--f-teal); font-weight:700; font-size:1.8rem; flex:none; }
.fiche-photo small { font-size:.6rem; font-weight:500; color:var(--f-soft); margin-top:4px; }
.fiche-id { flex:1; min-width:240px; }
.fiche-tag { font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700; color:var(--f-teal); background:#e6f3ec; border-radius:999px; padding:3px 10px; }
.fiche-tag.ton-ok { color:var(--f-ok); background:#e6f3ec; } .fiche-tag.ton-warn { color:var(--f-warn); background:#fbf1de; } .fiche-tag.ton-bad { color:var(--f-bad); background:#f6e3e3; }
.fiche-chips { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.chip { font-size:.78rem; font-weight:600; padding:3px 10px; border-radius:999px; background:#eef1ef; }
.chip-dark { background:var(--f-teal); color:#fff; font-family:"JetBrains Mono",monospace; }
.chip-ok { background:#e6f3ec; color:var(--f-ok); }
.fiche-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; }
.fiche-fact { background:#f6f9f7; border:1px solid var(--f-line); border-radius:10px; padding:8px 12px; }
.fiche-fact .l, .fiche-kpi .l { display:block; font-size:.66rem; text-transform:uppercase; letter-spacing:.05em; color:var(--f-soft); font-weight:700; }
.fiche-fact .v { font-weight:700; }
.fiche-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:14px; }
.fiche-kpi { padding:12px 16px; }
.fiche-kpi .v { font-size:1.4rem; font-weight:700; font-family:"Zilla Slab",serif; }
.fiche-kpi .d { font-size:.75rem; color:var(--f-soft); }
.fiche-banner { padding:14px 18px; margin-bottom:14px; border-left:5px solid var(--f-teal); }
.fiche-banner p { margin:0; }
.fiche-banner.ton-ok { border-left-color:var(--f-ok); } .fiche-banner.ton-warn { border-left-color:var(--f-warn); } .fiche-banner.ton-bad { border-left-color:var(--f-bad); }
.fiche-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
.fiche-sub { margin:0 0 10px; font-size:.78rem; color:var(--f-soft); }
.fiche-chart { width:100%; height:auto; }
.fiche-chart .grid { stroke:#e1e8e4; stroke-dasharray:3 3; } .fiche-chart .axis { font-size:10px; fill:#5c6d67; } .fiche-chart .val { font-size:11px; font-weight:700; fill:#16231f; }
.fiche-chart .line { fill:none; stroke:var(--f-teal); stroke-width:2.5; } .fiche-chart .dot { fill:var(--f-teal); stroke:#fff; stroke-width:2; }
.fiche-bar { display:grid; grid-template-columns:minmax(90px,140px) 1fr 44px; gap:8px; align-items:center; margin-bottom:7px; font-size:.82rem; }
.fiche-bar .track { height:10px; background:#eef1ef; border-radius:5px; overflow:hidden; } .fiche-bar .fill { height:100%; border-radius:5px; background:var(--f-teal); }
.fiche-bar .fill.ton-warn { background:var(--f-warn); } .fiche-bar .fill.ton-bad { background:var(--f-bad); } .fiche-bar .v { font-family:"JetBrains Mono",monospace; text-align:right; }
.fiche-cardhead { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; flex-wrap:wrap; gap:8px; }
.fiche-seg { display:flex; gap:4px; } .fiche-seg button { border:1px solid var(--f-line); background:#fff; border-radius:8px; padding:5px 10px; font:inherit; font-size:.8rem; cursor:pointer; } .fiche-seg button.on { background:var(--f-teal); color:#fff; border-color:var(--f-teal); }
.fiche-scroll { overflow-x:auto; } .fiche table { width:100%; border-collapse:collapse; font-size:.85rem; }
.fiche th { text-align:left; font-size:.68rem; text-transform:uppercase; letter-spacing:.04em; color:var(--f-soft); padding:8px; border-bottom:2px solid var(--f-line); }
.fiche td { padding:8px; border-bottom:1px solid var(--f-line); } .fiche .mono { font-family:"JetBrains Mono",monospace; } .fiche .strong { font-weight:700; } .fiche tr.total td { background:#f6f9f7; font-weight:700; }
.fiche-trio { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
.fiche-contact { border:1px dashed var(--f-line); border-radius:10px; padding:10px 14px; }
.fiche-todo { color:var(--f-soft); font-size:.85rem; margin:4px 0 0; font-style:italic; }
.fiche-foot { background:var(--f-deep); color:#fff; border-radius:12px; text-align:center; padding:12px; font-size:.8rem; margin-top:6px; }
@media print { .fiche-toolbar { display:none; } .fiche { background:#fff; } .fiche-card, .fiche-head, .fiche-kpi, .fiche-banner { break-inside:avoid; box-shadow:none; } }
.fiche-cnom { font-weight:700; } .fiche-cline { font-size:.82rem; color:var(--f-soft); margin-top:2px; word-break:break-word; }
.fiche-actions { display:flex; gap:6px; margin-top:8px; }
.fiche-actions button { border:1px solid var(--f-line); background:#fff; border-radius:8px; padding:4px 10px; font:inherit; font-size:.78rem; cursor:pointer; }
.fiche-actions button.primary { background:var(--f-teal); color:#fff; border-color:var(--f-teal); }
.fiche-form { display:grid; gap:6px; } .fiche-field { display:grid; gap:2px; font-size:.7rem; color:var(--f-soft); font-weight:600; }
.fiche-field input { font:inherit; font-size:.85rem; padding:6px 8px; border:1px solid var(--f-line); border-radius:8px; color:var(--f-ink); }

/* Batch 5 of the Design-canvas panel restyle (ResultatsBolono, Reclamations, Equite, BeneficesSee,
   Liaisons, PersonnaliserSite) — ported from their respective project/<Board>.dc.html boards. */

/* ResultatsBolono: scopebar already reuses .filter/.btn-small from elsewhere; .scopewarn/.resultbox/.qr
   are new. The warning text mirrors the REAL scope of "Sécuriser toute l'école" (every ACTIF pupil in the
   école, not just those with a recorded end-of-year decision) — not a cosmetic flourish. */
.school-console .scopewarn { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-bg); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.school-console .scopewarn svg { width: 18px; height: 18px; flex: none; color: var(--warn-ink); margin-top: 1px; }
.school-console .scopewarn .t { font-size: 0.8rem; color: var(--warn-ink); line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.school-console .resultbox { margin-top: 14px; background: var(--bg); border-radius: 10px; padding: 14px 16px; font-size: 0.84rem; }
.school-console .resultbox .n { font-weight: 700; color: var(--teal-deep); }
.school-console .qr { width: 28px; height: 28px; border-radius: 5px; background: var(--teal-deep); flex: none; }

/* Reclamations: reuses .search/.rowcount/.tablewrap/.badge.pending/.badge.warn/.badge.ok already defined
   above; only the decision mini-form and the "rejetée" badge tone are new. */
.school-console .badge.rej { background: #f6e6e1; color: #9a3b2d; }
.school-console .decform { display: flex; flex-direction: column; gap: 6px; min-width: 230px; }
.school-console .decrow { display: flex; gap: 6px; flex-wrap: wrap; }
.school-console .decrow input { border: 1px solid var(--card-border); border-radius: 6px; padding: 5px 7px; font-size: 0.78rem; font-family: inherit; }
.school-console .decrow input.note { width: 70px; font-family: "JetBrains Mono", monospace; }
.school-console .decmotif { border: 1px solid var(--card-border); border-radius: 6px; padding: 5px 7px; font-size: 0.78rem; font-family: inherit; width: 100%; box-sizing: border-box; }
.school-console .decbtns { display: flex; gap: 6px; }
.school-console .finaltext { font-size: 0.8rem; }
.school-console .finalmotif { font-size: 0.76rem; color: var(--ink-soft); margin-top: 2px; }

/* Equite: per-classe reachability bar + the one real alert the canvas calls out when a classe's
   reachable-tutor rate drops below 70%. */
.school-console .pctcell { display: flex; align-items: center; gap: 10px; }
.school-console .pcttrack { width: 90px; height: 7px; border-radius: 999px; background: var(--line, var(--card-border)); overflow: hidden; flex: none; }
.school-console .pcttrack .f { height: 100%; border-radius: 999px; }
.school-console .callout { margin: 16px 20px 18px; border: 1px solid #e8c688; background: #fdf8ec; border-radius: 12px; padding: 16px 18px; }
.school-console .callout .t { font-weight: 700; margin-bottom: 4px; }
.school-console .callout .s { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }

/* BeneficesSee: the confidence-grade stat tiles + the methodology footnotes (grade/method text are real
   values the page already computes/states — only the card layout is new). */
.school-console .tiles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 820px) { .school-console .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) { .school-console .tiles { grid-template-columns: 1fr; } }
.school-console .tile { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.school-console .tile .tilehead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; row-gap: 6px; column-gap: 8px; }
.school-console .tile .eyebrow { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; min-width: 0; }
.school-console .tile .grade { font-size: 0.7rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--card-border); white-space: nowrap; flex: none; }
.school-console .tile .tilevalue { font-family: "JetBrains Mono", monospace; font-size: 1.8rem; font-weight: 600; overflow-wrap: break-word; }
.school-console .tile .tilelabel { font-size: 0.88rem; font-weight: 600; overflow-wrap: break-word; }
.school-console .tile .tilemethod { font-size: 0.76rem; color: var(--ink-soft); line-height: 1.5; }
.school-console .trust { font-size: 0.78rem; color: var(--ink-soft); margin: 4px 0 20px; line-height: 1.5; }
.school-console .trust b { color: var(--ink); }
.school-console .legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line, var(--card-border)); font-size: 0.74rem; color: var(--ink-soft); }
.school-console .legend b { color: var(--ink); }
.school-console .footnote { font-size: 0.78rem; color: var(--ink-soft); padding: 16px 18px; line-height: 1.55; }

/* Liaisons: 2-column compose/preview layout, the real push+email notify strip (matches what
   NotifierParentsEleveUseCase already does once that backend wiring lands — not yet, see the open plan),
   and the offline-queue banner (already real client-side via OfflineLiaisonQueue). */
.school-console .layout2 { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.school-console .colform { flex: 1 1 360px; min-width: 320px; }
.school-console .colpreview { flex: 0 0 300px; min-width: 0; max-width: 100%; }
@media (max-width: 820px) { .school-console .colform, .school-console .colpreview { min-width: 0; flex-basis: 100%; } }
.school-console .photozone { border: 1.5px dashed var(--card-border); border-radius: 10px; padding: 16px; text-align: center; color: var(--ink-soft); font-size: 0.8rem; cursor: pointer; }
.school-console .photozone svg { width: 22px; height: 22px; margin-bottom: 6px; }
.school-console .notifystrip { display: flex; align-items: center; gap: 10px; background: var(--teal-pale); border-radius: 10px; padding: 10px 14px; font-size: 0.8rem; color: var(--teal-deep); flex-wrap: wrap; overflow-wrap: anywhere; }
.school-console .notifystrip svg { width: 18px; height: 18px; flex: none; }
.school-console .offlinebanner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--warn-bg); border-radius: 10px; padding: 10px 14px; margin-top: 4px; flex-wrap: wrap; }
.school-console .offlinebanner > div { min-width: 0; overflow-wrap: anywhere; }
.school-console .offlinebanner .t { font-weight: 700; font-size: 0.76rem; color: var(--warn-ink); }
.school-console .offlinebanner ul { margin: 6px 0 0; padding-left: 16px; font-size: 0.7rem; color: var(--warn-ink); }
.school-console .phone { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; overflow: hidden; box-shadow: 0 10px 24px rgba(10,63,56,0.08); }
.school-console .phonebar { background: var(--teal-deep); color: #fff; padding: 10px 14px; font-size: 0.78rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.school-console .phonebody { padding: 16px; }
.school-console .pcard { border: 1px solid var(--line, var(--card-border)); border-radius: 12px; overflow: hidden; }
.school-console .pphoto { height: 120px; background: linear-gradient(135deg,#c9d8d3,#e7f1ee); display: flex; align-items: center; justify-content: center; color: var(--teal-deep); font-size: 0.72rem; }
.school-console .ptxt { padding: 12px; }
.school-console .ptxt .tt { font-weight: 700; font-size: 0.86rem; margin-bottom: 4px; }
.school-console .ptxt .msg { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.45; }
.school-console .ptxt .auth { font-size: 0.7rem; color: var(--ink-soft); margin-top: 8px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; }
.school-console .sharebtn { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: 0.78rem; color: #fff; background: #25d366; border-radius: 9px; padding: 9px; font-weight: 600; cursor: pointer; text-decoration: none; }
.school-console .sharebtn svg { width: 15px; height: 15px; }
.school-console .publink { font-size: 0.72rem; }

/* PersonnaliserSite: accent swatches, upload zones, and the live-preview "browser" pane. */
.school-console .layout3 { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.school-console .colctrl { flex: 1 1 380px; min-width: 320px; }
.school-console .colprev { flex: 3 1 560px; min-width: 320px; }
@media (max-width: 820px) { .school-console .colctrl, .school-console .colprev { min-width: 0; flex-basis: 100%; } }
.school-console .swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.school-console .swatch { width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; position: relative; }
.school-console .swatch.on { border-color: var(--gold); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
.school-console .swatch .ck { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.school-console .swnames { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 0.68rem; color: var(--ink-soft); text-align: center; }
.school-console .swnames span { width: 38px; }
.school-console .uploadzone { border: 1.5px dashed var(--card-border); border-radius: 10px; padding: 16px; text-align: center; color: var(--ink-soft); font-size: 0.78rem; cursor: pointer; }
.school-console .uploadzone svg { width: 20px; height: 20px; margin-bottom: 6px; }
.school-console .uploadzone.has { border-style: solid; padding: 0; overflow: hidden; text-align: left; }
.school-console .uprow { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.school-console .upthumb { width: 36px; height: 36px; border-radius: 7px; background: var(--teal-pale); flex: none; }
.school-console .upname { font-size: 0.78rem; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.school-console .upremove { font-size: 0.72rem; color: var(--teal-deep); cursor: pointer; text-decoration: underline; }
.school-console .checkrow { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; }
.school-console .checkrow input { margin-top: 3px; }
.school-console .checkrow .t { font-size: 0.84rem; }
.school-console .lockrow { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--ink-soft); padding: 6px 0; }
.school-console .lockrow svg { width: 14px; height: 14px; }
.school-console .browser { border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; box-shadow: 0 14px 30px rgba(10,63,56,0.1); background: #fff; }
.school-console .browsertop { background: #eef1ef; padding: 9px 14px; display: flex; align-items: center; gap: 8px; }
.school-console .browsertop .dots { display: flex; gap: 5px; }
.school-console .browsertop .dots span { width: 8px; height: 8px; border-radius: 50%; background: #c7d2cd; }
.school-console .browsertop .urlbar { flex: 1; min-width: 0; background: #fff; border-radius: 7px; padding: 5px 10px; font-size: 0.7rem; color: var(--ink-soft); font-family: "JetBrains Mono", monospace; overflow-wrap: anywhere; }
.school-console .pubheader { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line, var(--card-border)); flex-wrap: wrap; gap: 8px; }
.school-console .pubbrand { display: flex; align-items: center; gap: 10px; }
.school-console .pubmark { width: 34px; height: 34px; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.84rem; font-family: "Zilla Slab", serif; }
.school-console .pubbrand .n { font-weight: 700; font-size: 0.88rem; font-family: "Zilla Slab", serif; }
.school-console .pubbrand .d { font-size: 0.66rem; color: var(--ink-soft); }
.school-console .pubnav { display: flex; gap: 16px; font-size: 0.74rem; color: var(--ink-soft); flex-wrap: wrap; }
.school-console .pubhero { height: 180px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 20px; color: #fff; position: relative; }
.school-console .pubhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0)); }
.school-console .pubhero .ht { position: relative; font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.2rem; }
.school-console .pubbody { padding: 20px; }
.school-console .pubstats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.school-console .pubstat { background: var(--bg); border-radius: 9px; padding: 10px; text-align: center; }
.school-console .pubstat .v { font-family: "Zilla Slab", serif; font-weight: 700; font-size: 1.05rem; }
.school-console .pubstat .l { font-size: 0.6rem; color: var(--ink-soft); }
.school-console .pubsection { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, var(--card-border)); font-size: 0.78rem; color: var(--ink-soft); }
@media print { .fiche-actions { display:none; } }

/* Design canvas AutoInspection.dc.html / SuiviFonctionnement.dc.html — shared checklist/criteria widgets,
   ported for `ficheAutoInspectionFormBody` and `evaluationFonctionnementFormBody`. Both forms already held
   the exact real data (8 real documents, the real numbered activités) behind plain `<select>`s; only the
   widget changes here, same `Var`s driving it. */
.school-console .doclist { display: flex; flex-direction: column; gap: 2px; }
.school-console .docrow { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,150px) minmax(0,150px); align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.school-console .docrow:last-child { border-bottom: none; }
@media (max-width: 820px) { .school-console .docrow { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; } }
.school-console .docname { font-weight: 600; font-size: 0.84rem; }
.school-console .pillgroup { display: flex; border: 1px solid var(--card-border); border-radius: 999px; overflow: hidden; }
.school-console .pill { flex: 1; text-align: center; padding: 6px 4px; font-size: 0.72rem; cursor: pointer; background: #fff; color: var(--ink-soft); border: none; font: inherit; }
.school-console .pill.yes.on { background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; }
.school-console .pill.no.on { background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; }
.school-console .pill + .pill { border-left: 1px solid var(--card-border); }

.school-console .critrow { display: flex; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.school-console .critrow:last-child { border-bottom: none; }
.school-console .critrow .num { width: 24px; flex: none; color: var(--ink-faint); font-size: 0.76rem; padding-top: 6px; font-family: "JetBrains Mono", monospace; }
.school-console .critrow .txt { flex: 1 1 160px; min-width: 0; font-size: 0.82rem; line-height: 1.4; padding-top: 4px; }
.school-console .scoreseg { display: flex; border: 1px solid var(--card-border); border-radius: 8px; overflow: hidden; flex: none; }
.school-console .scoreseg .s { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 0.76rem; cursor: pointer; background: #fff; color: var(--ink-soft); font-family: "JetBrains Mono", monospace; border: none; font-family: "JetBrains Mono", monospace; }
.school-console .scoreseg .s + .s { border-left: 1px solid var(--card-border); }
.school-console .scoreseg .s.on { background: var(--teal); color: #fff; font-weight: 700; }
@media (max-width: 520px) { .school-console .scoreseg .s { width: 22px; height: 28px; font-size: 0.68rem; } }

/* Design canvas EspacePP.dc.html — ported for `EspacePPPanel`, which had been styled ad hoc with inline
   `var(--accent, #2E2A72)` long before `.school-console`'s own token/class system existed; real data and
   write logic untouched, only the markup now uses these real tokens and the already-established
   `.tabs`/`.tab` (Personnel's tab bar, reused as-is for the PP onglets). The canvas's convocation
   "notifystrip" (push+email) is NOT ported — that's an open, not-yet-implemented backend plan, not a real
   feature today; porting it would claim something the app doesn't do. */
.school-console .pptag { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--gold); color: var(--teal-deep); }
.school-console .switcher { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.school-console .cbtn { border: 1px solid var(--card-border); border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; cursor: pointer; background: #fff; color: var(--ink); font: inherit; }
.school-console .cbtn.active { background: var(--teal-deep); color: #fff; border-color: var(--teal-deep); font-weight: 600; }
.school-console .kpis { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.school-console .kpi { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px; }
.school-console .kpi .v { font-family: "JetBrains Mono", monospace; font-size: 1.3rem; font-weight: 600; color: var(--teal-deep); }
.school-console .kpi .l { font-size: 0.72rem; color: var(--ink-soft); }
.school-console .cardgrid { display: flex; flex-wrap: wrap; gap: 14px; }
.school-console .ccard { flex: 1 1 220px; min-width: 0; border: 1px solid var(--card-border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; text-decoration: none; color: inherit; }
.school-console .ccard .eyebrow { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.school-console .ccard .t { font-size: 0.95rem; font-weight: 700; }
.school-console .ccard .d { font-size: 0.78rem; color: var(--ink-soft); }
.school-console .layout2col { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.school-console .colform { flex: 1 1 400px; min-width: 0; }
.school-console .colhist { flex: 0 0 320px; min-width: 0; }
.school-console .pillrow { display: flex; flex-wrap: wrap; gap: 6px; }
.school-console .pillrow .pill { border: 1px solid var(--card-border); border-radius: 999px; padding: 5px 11px; font-size: 0.78rem; cursor: pointer; background: #fff; font: inherit; }
.school-console .pillrow .pill.on { background: var(--teal-pale); font-weight: 700; border-color: var(--teal); }
.school-console .histrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.8rem; flex-wrap: wrap; }

/* Design canvas Tableau.dc.html — `aTraiterDirection`/`accesRapideDirection` already carried the real,
   already-loaded signals (reclamations/signalements/admissions/appel counts and the 4 real nav shortcuts);
   only their markup was still ad hoc inline styles rather than a card. Everything else on this real
   dashboard (`.grid4` stat cards, `onboardingStrip`'s own `.ostep`, the calendar/périodique/impact teasers)
   already matched the canvas and is untouched. */
.school-console .tasklist { display: flex; flex-direction: column; border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; }
.school-console .taskrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--card-bg); }
.school-console .taskrow:last-child { border-bottom: none; }
.school-console .taskrow .t { font-size: 0.86rem; font-weight: 600; }
.school-console .quickgrid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
@media (max-width: 820px) { .school-console .quickgrid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) { .school-console .quickgrid { grid-template-columns: 1fr; } }
.school-console .qbtn { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--card-border); border-radius: 10px; font-size: 0.84rem; font-weight: 600; color: var(--teal-deep); text-decoration: none; background: #fff; }
