/* Thème de classe : bleu nuit, surfaces mates et accent menthe.
   Chargé après les styles du pilote ; aucune modification des parcours. */
@media screen {
  :root {
    color-scheme: dark;
    --theme-bg: #121c20;
    --theme-header: #10252d;
    --theme-panel: #1b2a2f;
    --theme-field: #23353b;
    --theme-line: #526a72;
    --theme-text: #edf5f4;
    --theme-muted: #bbccd0;
    --theme-accent: #a8d8cb;
    --theme-accent-ink: #10292c;
    --navy: var(--theme-text);
    --green: var(--theme-accent);
    --bg: var(--theme-bg);
    --line: var(--theme-line);
    --muted: var(--theme-muted);
    --ux-shadow: none;
  }

  html, body { background: var(--theme-bg); color: var(--theme-text); }
  header, .ux-sheet-header { background: var(--theme-header); color: var(--theme-text); }
  header small, .ux-sheet-title small, .ux-shield-meta { color: var(--theme-muted); }
  .brand, .ux-shield-brand { color: var(--theme-accent); }
  .card, .sheet, dialog, .ux-facts-panel, .ux-grade-panel {
    background: var(--theme-panel);
    color: var(--theme-text);
    border-color: var(--theme-line);
    box-shadow: none;
  }
  .card, dialog { border-radius: 14px; }
  dialog { border: 1px solid var(--theme-line); }
  dialog::backdrop, #details::backdrop { background: #081116dd; }
  .ux-student-sheet { background: var(--theme-bg); color: var(--theme-text); }
  .ux-privacy-shield { background: var(--theme-header); color: var(--theme-text); }

  button, .link, .profile-quit, .ux-back, .ux-sheet-shield, .ux-dialog-shield {
    background: var(--theme-field);
    color: var(--theme-text);
    border-color: var(--theme-line);
    border-radius: 11px;
  }
  button:hover:not(:disabled), .link:hover {
    background: #2b4148;
    border-color: var(--theme-accent);
  }
  button:disabled, input:disabled, select:disabled, textarea:disabled {
    opacity: 1;
    background: #1b2a2f;
    color: #91a7ad;
    border-color: #3e535a;
    cursor: default;
  }
  input, select, textarea {
    color-scheme: dark;
    background: var(--theme-field);
    color: var(--theme-text);
    border-color: var(--theme-line);
  }
  option { background: var(--theme-field); color: var(--theme-text); }
  input::placeholder, textarea::placeholder { color: var(--theme-muted); opacity: 1; }
  input[type="checkbox"], input[type="radio"] { accent-color: var(--theme-accent); }
  input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid var(--theme-accent);
    outline-offset: 3px;
  }

  nav { background: var(--theme-panel); }
  nav button { background: transparent; color: var(--theme-muted); }
  nav button:hover:not(:disabled) { background: var(--theme-field); }
  button.active, .primary, nav button.active, .ux-resume-button,
  .ux-target-tab[aria-selected="true"],
  body[data-monome-profile="classroom"] .ux-target-tab[aria-selected="true"] {
    background: var(--theme-accent);
    color: var(--theme-accent-ink);
    border-color: var(--theme-accent);
    box-shadow: none;
  }
  .primary:hover:not(:disabled), nav button.active:hover, .ux-resume-button:hover,
  .ux-target-tab[aria-selected="true"]:hover:not(:disabled),
  body[data-monome-profile="classroom"] .ux-target-tab[aria-selected="true"]:hover:not(:disabled) {
    background: #bde6da;
    color: var(--theme-accent-ink);
  }
  a, .eyebrow, .reference-folders summary, .reward-kicker, .pick-result { color: var(--theme-accent); }
  .quiet-button { background: transparent; color: var(--theme-muted); }
  .profile-badge { background: #1c343c; border-color: var(--theme-line); color: var(--theme-text); }
  .profile-card { border-left-color: var(--theme-accent); }

  .course-context, .notice, .ux-state-message, .badge, .selection-count, .step-number, .pair-box {
    background: #21373c;
    color: var(--theme-text);
    border-color: var(--theme-line);
  }
  .notice { border-left-color: var(--theme-accent); }
  .ux-state-message.is-confirm { background: #243e3c; color: #d1efe5; }
  .error, .ux-observation-guard { background: #3e2e2c; color: #ffe2d7; border-color: #e8aa93; }
  .timer-done { color: #f2b8a6; }
  .start-choice, .start-choice:last-child, .choice-icon, .empty,
  #targetChoices > div, .reward-history p { background: var(--theme-field); border-color: var(--theme-line); }
  #targetChoices > div:has(input:checked) { background: #2d4645; border-color: var(--theme-accent); }

  .ux-mobile-toolbar,
  body[data-monome-profile="classroom"] .ux-mobile-toolbar {
    background: var(--theme-bg);
    border-color: var(--theme-line);
  }
  .ux-student-row, .ux-status-button, .ux-target-tab { background: var(--theme-field); border-color: var(--theme-line); color: var(--theme-text); box-shadow: none; }
  .ux-status-button { font-size: 16px; font-weight: 650; }
  .ux-status-button .ux-mark { display: none; }
  .ux-status-button[data-value="ok"], .ux-status-button[data-value="partial"], .ux-status-button[data-value="no"] { border-color: var(--theme-line); }
  .ux-student-state.is-observed { color: var(--theme-accent); }
  .ux-student-state.is-abs, .ux-student-state.is-conflict { color: #f2b8a6; }
  .ux-abs-button[aria-pressed="true"] { background: #4b3531; color: #ffe2d7; border-color: #d5a28e; }
  .ux-fact-choices button[aria-pressed="true"] { background: #2d4645; color: var(--theme-text); border-color: var(--theme-accent); }
  .ux-reward-button { background: #303b37 !important; color: #e4e9d1; border-color: #9aa783 !important; }

  th { background: #203238; color: var(--theme-text); }
  th, td, .sheet th, .sheet td { border-color: var(--theme-line); }
  .scroll tbody tr:hover { background: #243b41; }
  .status[data-value="ok"] { background: #233c37; color: var(--theme-text); }
  .status[data-value="partial"] { background: #3b382b; color: var(--theme-text); }
  .status[data-value="no"] { background: #3d302d; color: var(--theme-text); }
  .pair-box strong { color: var(--theme-accent); }
  .transfer-secret { background: #2d3831; color: var(--theme-text); }
  .transfer-grid hr, .reward-history { border-color: var(--theme-line); }
  .qr-box:not(:empty) { border-color: var(--theme-line); }
  .qr-box img { background: #fff; }
  .toast { background: var(--theme-field); color: var(--theme-text); border: 1px solid var(--theme-line); }
}

@media print {
  :root { color-scheme: light; }
  html, body, .sheet { background: #fff; color: #000; }
}
