/* ============================================================
   MASTER SASL — Design System
   Sorbonne Nouvelle
   ============================================================ */

/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,700;0,800;1,400&family=Archivo:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* === VARIABLES === */
:root {
  --paper-1: #FBF6EE;
  --paper-2: #EFE8D6;
  --ink-900: #2E2A24;
  --ink-700: #4A4540;
  --ink-400: #8A847C;
  --ink-200: #C8C4BC;
  --ink-100: #E4E0D8;
  --brick-600: #B3402A;
  --brick-700: #9A3523;
  --brick-100: #F5DDD8;
  --ochre-500: #D98C3F;
  --ochre-200: #F0D4A8;
  --ochre-100: #FAF0DC;
  --teal-600: #2A7A8A;
  --teal-100: #D4EEF3;
  --olive-600: #4E7038;
  --olive-100: #D8E8CC;
  --border-subtle: rgba(46, 42, 36, 0.12);
  --border-medium: rgba(46, 42, 36, 0.24);
  --radius-card: 12px;
  --radius-btn: 4px;
  --radius-sm: 4px;
  --shadow-card: 0 1px 3px rgba(46, 42, 36, 0.08), 0 1px 2px rgba(46, 42, 36, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(46, 42, 36, 0.12);
  --transition: 150ms ease;
  --transition-slow: 200ms ease;
  --max-width: 1120px;
  --nav-height: 64px;

  --font-display: 'Spectral', Georgia, serif;
  --font-ui: 'Archivo', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-ui);
  background: var(--paper-1);
  color: var(--ink-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brick-600); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brick-700); }
button { cursor: pointer; font-family: var(--font-ui); }
ul, ol { list-style: none; }

/* === TYPOGRAPHY === */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.eyebrow--brick { color: var(--brick-600); }
.eyebrow--ochre { color: var(--ochre-500); }

p { max-width: 70ch; line-height: 1.7; }
p + p { margin-top: 0.875em; }

.text-large { font-size: 1.125rem; line-height: 1.65; }
.text-small { font-size: 0.875rem; }
.text-muted { color: var(--ink-400); }
.text-italic { font-style: italic; font-family: var(--font-display); }

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }
section.section--sm { padding: 48px 0; }
section.section--lg { padding: 100px 0; }

.section-header { margin-bottom: 48px; }
.section-header .eyebrow { margin-bottom: 8px; }

/* === NAVIGATION === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(251, 246, 238, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brick-600);
  letter-spacing: -0.02em;
}

.nav-brand-text {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.2;
}

.nav-brand-text span {
  display: block;
  font-weight: 400;
  color: var(--ink-400);
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover { background: var(--ink-100); color: var(--ink-900); }
.nav-links a.active { color: var(--brick-600); background: var(--brick-100); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--ink-900);
}

/* === HERO === */
.hero {
  padding: 80px 0 72px;
  background: var(--paper-1);
}

.hero-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--brick-600);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  max-width: 18ch;
}

.hero-lead {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--ink-700);
  margin-bottom: 32px;
  max-width: 60ch;
}

.hero-intro {
  font-size: 1rem;
  color: var(--ink-700);
  max-width: 60ch;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--brick-600);
  color: #fff;
  border-color: var(--brick-600);
}
.btn--primary:hover {
  background: var(--brick-700);
  border-color: var(--brick-700);
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--border-medium);
}
.btn--secondary:hover {
  background: var(--ink-100);
  color: var(--ink-900);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-700);
  border-color: transparent;
  padding: 8px 12px;
}
.btn--ghost:hover { background: var(--ink-100); color: var(--ink-900); }

.btn--sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--obligatoire { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.badge--choix { background: var(--ochre-100); color: var(--ochre-500); }
.badge--a-venir { background: var(--ochre-200); color: #7A4F10; }
.badge--inalco { background: var(--teal-100); color: var(--teal-600); }
.badge--dfle { background: var(--olive-100); color: var(--olive-600); }
.badge--usn { background: var(--ink-100); color: var(--ink-700); }

/* === CHIFFRES CLÉS === */
.stats-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 48px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stat {
  flex: 1;
  min-width: 120px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brick-600);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-700);
  font-weight: 500;
}

/* === SECTIONS ALTERNANTES === */
.section--paper-2 { background: var(--paper-2); }
.section--ink { background: var(--ink-900); color: var(--paper-1); }
.section--ink h2, .section--ink h3 { color: var(--paper-1); }
.section--ink .eyebrow { color: var(--ochre-500); opacity: 0.8; }
.section--ink p { color: rgba(251, 246, 238, 0.8); }
.section--ink .text-muted { color: rgba(251, 246, 238, 0.5); }

/* === CARDS === */
.card {
  background: var(--paper-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-card-hover); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* === COURS CARDS (programme.html) === */
.cours-card {
  border-radius: var(--radius-card);
  padding: 16px 20px;
  border: 1px solid transparent;
  transition: box-shadow var(--transition-slow), transform var(--transition);
  position: relative;
}

.cours-card[data-type="obligatoire"] {
  background: var(--teal-600);
  color: var(--paper-1);
  border-color: var(--teal-600);
}
.cours-card[data-type="obligatoire"] .cours-code { color: rgba(251,246,238,0.6); }
.cours-card[data-type="obligatoire"] .cours-ects { color: var(--ochre-500); }

.cours-card[data-type="seminaire-parcours"] {
  background: var(--brick-600);
  color: var(--paper-1);
  border-color: var(--brick-600);
}
.cours-card[data-type="seminaire-parcours"] .cours-code { color: rgba(251,246,238,0.7); }
.cours-card[data-type="seminaire-parcours"] .cours-ects { color: rgba(251,246,238,0.9); }

.cours-card[data-type="cours-outil"] {
  background: var(--ochre-500);
  color: var(--ink-900);
  border-color: var(--ochre-500);
}
.cours-card[data-type="cours-outil"] .cours-code { color: rgba(46,42,36,0.6); }

.cours-card[data-type="synthese"] {
  background: var(--paper-2);
  color: var(--ink-900);
  border: 1px solid var(--ochre-500);
}

.cours-card[data-type="langue"] {
  background: var(--paper-1);
  color: var(--ink-900);
  border: 1px solid var(--border-medium);
}

.cours-card[data-type="ouverture"],
.cours-card[data-type="hors-parcours"] {
  background: var(--paper-1);
  color: var(--ink-900);
  border: 1px dashed var(--border-medium);
}

.cours-card[data-type="transversal"] {
  background: var(--ink-100);
  color: var(--ink-900);
  border: 1px solid var(--border-subtle);
}

.cours-card[data-type="activites"] {
  background: var(--teal-100);
  color: var(--teal-600);
  border: 1px solid var(--teal-600);
}

.cours-card[data-type="memoire"],
.cours-card[data-type="stage"] {
  background: var(--olive-100);
  color: var(--olive-600);
  border: 1px solid var(--olive-600);
}

.cours-card[data-type="atelier"] {
  background: var(--paper-2);
  color: var(--ink-900);
  border: 1px solid var(--border-medium);
}

/* Choix cards selectable */
.cours-card.is-choix {
  cursor: pointer;
}
.cours-card.is-choix:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.cours-card.is-choix.selected {
  outline: 3px solid var(--ochre-500);
  outline-offset: 2px;
}
.cours-card.is-choix.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cours-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cours-code {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.cours-ects {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.cours-titre {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.cours-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.cours-expand {
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: 0.75rem;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity var(--transition);
  font-family: var(--font-ui);
  font-weight: 500;
}
.cours-expand:hover { opacity: 1; }

.cours-description {
  font-size: 0.875rem;
  line-height: 1.55;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: none;
}
.cours-description.open { display: block; }
.cours-description.placeholder { font-style: italic; opacity: 0.65; }

.cours-note {
  font-size: 0.8125rem;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,0.06);
  line-height: 1.4;
}

/* === PROGRAMME PAGE LAYOUT === */
.programme-semestre {
  margin-bottom: 64px;
}
.programme-semestre-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.semestre-ects-counter {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  background: var(--paper-2);
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  color: var(--ink-700);
  transition: background var(--transition);
}
.semestre-ects-counter.complete {
  background: var(--olive-100);
  border-color: var(--olive-600);
  color: var(--olive-600);
}

.cours-group {
  margin-bottom: 20px;
}
.cours-group-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-400);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cours-group-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.cours-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

/* ECTS global tracker */
.ects-tracker {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
  margin-top: 32px;
}
.ects-tracker-inner {
  pointer-events: all;
  background: var(--ink-900);
  color: var(--paper-1);
  padding: 10px 24px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  box-shadow: 0 4px 16px rgba(46, 42, 36, 0.24);
}
.ects-tracker-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ochre-500);
  font-size: 1rem;
}

/* === COURS PAGE (catalogue) === */
.cours-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  background: var(--paper-1);
  color: var(--ink-700);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.filter-btn:hover { background: var(--ink-100); }
.filter-btn.active {
  background: var(--ink-900);
  color: var(--paper-1);
  border-color: var(--ink-900);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  background: var(--paper-1);
  margin-bottom: 24px;
  max-width: 400px;
}
.search-field input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--ink-900);
  outline: none;
}
.search-field input::placeholder { color: var(--ink-400); }

.cours-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.cours-catalogue-card {
  background: var(--paper-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  transition: box-shadow var(--transition);
}
.cours-catalogue-card:hover { box-shadow: var(--shadow-card-hover); }
.cours-catalogue-card.hidden { display: none; }

.cours-catalogue-card[data-type="obligatoire"]        { border-left: 4px solid var(--teal-600); }
.cours-catalogue-card[data-type="seminaire-parcours"] { border-left: 4px solid var(--brick-600); }
.cours-catalogue-card[data-type="cours-outil"]        { border-left: 4px solid var(--ochre-500); }
.cours-catalogue-card[data-type="synthese"]           { border-left: 4px solid var(--ochre-200); }
.cours-catalogue-card[data-type="langue"]             { border-left: 4px solid var(--teal-100); }
.cours-catalogue-card[data-type="transversal"]        { border-left: 4px solid var(--ink-400); }
.cours-catalogue-card[data-type="ouverture"],
.cours-catalogue-card[data-type="hors-parcours"]      { border-left: 4px dashed var(--border-medium); }
.cours-catalogue-card[data-type="activites"]          { border-left: 4px solid var(--teal-600); }
.cours-catalogue-card[data-type="memoire"],
.cours-catalogue-card[data-type="stage"]              { border-left: 4px solid var(--olive-600); }
.cours-catalogue-card[data-type="atelier"]            { border-left: 4px solid var(--ochre-200); }

/* === ORIENTATION PAGE === */
.orientation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.orientation-card {
  background: var(--paper-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px;
  cursor: pointer;
  transition: all var(--transition-slow);
  position: relative;
}
.orientation-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  transition: background var(--transition);
}
.orientation-card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--ochre-500); }
.orientation-card:hover::before { background: var(--ochre-500); }
.orientation-card.active { border-color: var(--brick-600); box-shadow: var(--shadow-card-hover); }
.orientation-card.active::before { background: var(--brick-600); }

.orientation-card h3 { font-size: 1rem; margin-bottom: 8px; line-height: 1.35; }
.orientation-card p { font-size: 0.875rem; color: var(--ink-700); line-height: 1.5; max-width: none; }

.orientation-result {
  background: var(--paper-2);
  border-radius: var(--radius-card);
  padding: 32px 40px;
  display: none;
}
.orientation-result.visible { display: block; }
.orientation-result .notice {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-700);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.orientation-cours-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.orientation-cours-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 16px;
  background: var(--paper-1);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}
.orientation-cours-item .item-accent {
  width: 4px;
  flex-shrink: 0;
  background: var(--ochre-500);
  border-radius: 2px;
  align-self: stretch;
}
.orientation-cours-item .item-titre {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 4px;
}
.orientation-cours-item .item-note {
  font-size: 0.8125rem;
  color: var(--ink-700);
  font-style: italic;
}
.orientation-cours-deconseille .item-accent { background: var(--ink-200); }

/* === EVENTS (activites.html) === */
.events-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.event-card {
  background: var(--paper-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  display: flex;
  gap: 20px;
  transition: box-shadow var(--transition);
}
.event-card:hover { box-shadow: var(--shadow-card-hover); }
.event-card + .event-card { margin-top: 12px; }

.event-date {
  flex-shrink: 0;
  text-align: center;
  width: 52px;
}
.event-date-day {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brick-600);
  line-height: 1;
}
.event-date-month {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-400);
}
.event-body { flex: 1; }
.event-titre { font-family: var(--font-display); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.event-lieu { font-size: 0.875rem; color: var(--ink-400); margin-bottom: 6px; }
.event-desc { font-size: 0.875rem; color: var(--ink-700); max-width: none; line-height: 1.5; }

.events-passés-toggle {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}
.events-passés-toggle summary {
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink-400);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.events-passés-toggle summary:hover { color: var(--ink-700); }

/* === CALENDAR (activites.html) === */
.cal-year-strip {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cal-month-tab {
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-ui);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--paper-1);
  color: var(--ink-400);
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}
.cal-month-tab:hover { background: var(--paper-2); color: var(--ink-700); }
.cal-month-tab.active { background: var(--ink-900); color: var(--paper-1); border-color: var(--ink-900); }
.cal-month-tab.has-events::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brick-600);
}
.cal-month-tab.active::after { background: var(--paper-1); bottom: -6px; }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--paper-1);
  color: var(--ink-700);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.cal-nav-btn:hover:not(:disabled) { background: var(--paper-2); }
.cal-nav-btn:disabled { opacity: 0.3; cursor: default; }
.cal-month-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink-900);
  text-transform: capitalize;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 32px;
}
.cal-day-header {
  background: var(--paper-2);
  text-align: center;
  padding: 7px 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.cal-day {
  background: var(--paper-1);
  min-height: 80px;
  padding: 6px;
  min-width: 0;
  overflow: hidden;
}
.cal-day.other-month { background: var(--paper-2); opacity: 0.45; }
.cal-day-num {
  font-size: 0.75rem;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--ink-400);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
}
.cal-day.today .cal-day-num {
  background: var(--brick-600);
  color: var(--paper-1);
  border-radius: 50%;
}
.cal-chip {
  font-size: 0.65rem;
  font-weight: 600;
  font-family: var(--font-ui);
  padding: 2px 5px;
  border-radius: 2px;
  margin-bottom: 2px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.3;
}
.cal-chip--cont { opacity: 0.6; font-style: italic; }

.cal-month-events { margin-top: 8px; }
.cal-month-events-header {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 16px;
}
.cal-no-events { font-style: italic; color: var(--ink-400); font-size: 0.875rem; }

@media (max-width: 600px) {
  .cal-day { min-height: 52px; padding: 4px 3px; }
  .cal-chip { font-size: 0; height: 5px; padding: 0; border-radius: 2px; margin-bottom: 2px; }
  .cal-month-tab { padding: 4px 7px; font-size: 0.7rem; }
}

/* === TEAM === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.team-card {
  background: var(--paper-2);
  border-radius: var(--radius-card);
  padding: 20px;
}
.team-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 1rem;
}
.team-card-dept {
  font-size: 0.75rem;
  color: var(--ink-400);
  font-weight: 500;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.team-card a {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  word-break: break-all;
}
.team-card .absence-note {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ink-400);
  margin-top: 4px;
}

/* === NOTICE / ALERT === */
.notice-box {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: none;
}
.notice-box--warning {
  background: var(--ochre-100);
  border: 1px solid var(--ochre-500);
  color: #6A4010;
}
.notice-box--info {
  background: var(--teal-100);
  border: 1px solid var(--teal-600);
  color: var(--teal-600);
}
.notice-box--neutral {
  background: var(--paper-2);
  border: 1px solid var(--border-medium);
  color: var(--ink-700);
}

/* === ACCENT RULE === */
.rule-ochre {
  width: 48px;
  height: 3px;
  background: var(--ochre-500);
  border-radius: 2px;
  margin-bottom: 24px;
}

/* === PLACEHOLDER TEXT === */
.placeholder-text {
  font-style: italic;
  color: var(--ink-400);
}

/* === FOOTER === */
.site-footer {
  background: var(--ink-900);
  color: rgba(251,246,238,0.7);
  padding: 48px 0 32px;
  margin-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brick-600);
  margin-bottom: 8px;
}
.footer-desc {
  font-size: 0.875rem;
  max-width: 40ch;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
.footer-links a {
  color: rgba(251,246,238,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}
.footer-links a:hover { color: var(--paper-1); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(251,246,238,0.1);
  font-size: 0.8125rem;
  color: rgba(251,246,238,0.3);
}

/* === PAGE HEADER === */
.page-header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
}
.page-header .eyebrow { margin-bottom: 8px; }
.page-header h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.page-header p { margin-top: 12px; color: var(--ink-700); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--paper-1); padding: 16px 24px; border-bottom: 1px solid var(--border-subtle); gap: 2px; z-index: 99; }
  .nav-toggle { display: flex; }

  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: 2rem; }
  section { padding: 56px 0; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { text-align: left; }

  .cours-group-grid { grid-template-columns: 1fr; }
  .orientation-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* === PRINT === */
@media print {
  .site-nav, .ects-tracker, .btn, .cours-expand, .cours-filters, .search-field, .filter-btn { display: none !important; }
  body { background: white; font-size: 12pt; }
  .cours-card { page-break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .cours-description { display: block !important; }
  .site-footer { display: none; }
  .cours-card.disabled { opacity: 1 !important; display: none; }
}
