/* estiam-syllabus.css
   Ajustements CSS du design system « Estiam · Syllabus » par-dessus MudBlazor 9.6.
   Charger APRÈS le CSS de MudBlazor.
   Ce que le thème ne couvre pas : filet AppBar, focus visibles, densité,
   couleurs de statut/gravité (non natives), fonte des données en mono. */

:root {
  --est-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --est-focus: #8AA6EE;                 /* anneau de focus clair */
  --est-accent: #E0542A;
}
.mud-theme-dark, [data-theme="dark"] {
  --est-focus: #2C4C86;
}

/* ---- Textes muets : le corail (couleur « secondaire ») est réservé aux ACCENTS, pas aux libellés ----
   Les MudText en Color.Secondary (sous-titres, libellés de KPI, légendes) reviennent au gris de texte
   secondaire (clair + sombre). Les icônes en Color.Secondary restent corail (accent de signature).
   Pour un surtitre volontairement corail, utiliser la classe .accent-corail. */
.mud-typography.mud-secondary-text { color: var(--mud-palette-text-secondary) !important; }
.accent-corail { color: var(--est-accent) !important; }

/* ---- Barre d'application : filet plutôt qu'ombre ---- */
.mud-appbar {
  box-shadow: none !important;
  border-bottom: 1px solid var(--mud-palette-divider);
}

/* ---- Drawer : item actif = fond tinté + barre d'accent ---- */
.mud-nav-link.active:not(.mud-nav-link-disabled) {
  background-color: var(--mud-palette-primary-lighten);
  color: var(--mud-palette-primary);
  font-weight: 600;
  border-radius: 8px;
  position: relative;
}
.mud-nav-link.active:not(.mud-nav-link-disabled)::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px;
  background: var(--mud-palette-primary);
}

/* ---- Focus visible partout (AA) ---- */
.mud-button-root:focus-visible,
.mud-input-slot:focus-visible,
.mud-nav-link:focus-visible,
.mud-icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--est-focus);
}

/* ---- Cartes : filet, pas d'ombre ---- */
.mud-card, .mud-paper-outlined {
  border: 1px solid var(--mud-palette-divider);
  box-shadow: none !important;
}

/* ---- Tables denses ---- */
.mud-table-dense .mud-table-cell { padding: 6px 16px; }
.mud-table-head .mud-table-cell {
  background: var(--mud-palette-background-gray);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mud-palette-text-secondary);
  letter-spacing: 0.01em;
}

/* ---- Données tabulaires en monospace ---- */
.data-mono, .cell-code, .cell-ects, .cell-hours {
  font-family: var(--est-mono);
  font-variant-numeric: tabular-nums;
}

/* Heures de projet servies par défaut (jamais saisies dans la fiche) : discrètes + repère « défaut » */
.projet-defaut { color: var(--mud-palette-text-secondary); font-style: italic; }
.projet-defaut-marqueur { font-size: .72em; opacity: .7; letter-spacing: .02em; }

/* ---- Élévations réservées aux surfaces flottantes ---- */
.mud-menu-popover, .mud-popover { box-shadow: 0 4px 12px rgba(20,22,30,.12); }
.mud-dialog { box-shadow: 0 16px 40px rgba(20,22,30,.22); border-radius: 14px; }
.mud-snackbar { box-shadow: 0 4px 12px rgba(20,22,30,.18); border-radius: 8px; }

/* =====================================================================
   CHIPS DE STATUT (non natifs) — texte / fond, clair puis sombre
   Usage : <MudChip Class="chip-statut chip-brouillon" Size="Size.Small">Brouillon</MudChip>
===================================================================== */
.chip-statut {
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  border-radius: 999px !important;
}
.chip-brouillon { background:#ECEAE3 !important; color:#565A63 !important; }
.chip-relecture { background:#F8EDD5 !important; color:#8A5A00 !important; }
.chip-publie    { background:#E2F3EA !important; color:#155F3B !important; }
.chip-suspendu  { background:#F9E6E3 !important; color:#93261D !important; }
.chip-archive   { background:#E7EAEE !important; color:#485360 !important; }

.mud-theme-dark .chip-brouillon { background:#2A2E37 !important; color:#B6BBC3 !important; }
.mud-theme-dark .chip-relecture { background:#3A2E14 !important; color:#E7B15A !important; }
.mud-theme-dark .chip-publie    { background:#16321F !important; color:#63C793 !important; }
.mud-theme-dark .chip-suspendu  { background:#3A1F1B !important; color:#F09083 !important; }
.mud-theme-dark .chip-archive   { background:#2A2F38 !important; color:#9AA3AE !important; }

/* ---- Gravités d'anomalie (chips ou pastilles) ---- */
.grav-info   { background:#E1EEF6 !important; color:#1C6C97 !important; }
.grav-avert  { background:#F8EDD5 !important; color:#9A6207 !important; }
.grav-erreur { background:#F9E6E3 !important; color:#BE3529 !important; }
.mud-theme-dark .grav-info   { background:#14303D !important; color:#67B4DB !important; }
.mud-theme-dark .grav-avert  { background:#382C12 !important; color:#E0A64B !important; }
.mud-theme-dark .grav-erreur { background:#3A1F1B !important; color:#F09083 !important; }

/* ---- Bannières / alertes à filet gauche ---- */
.mud-alert { border-radius: 8px; }
.mud-alert.mud-alert-outlined { border-left-width: 3px; }

/* ---- Marqueur « heures différenciées » ---- */
.hd-marker { color: var(--est-accent); font-weight: 700; }
