/* ============================================================
   SIDEBAR — mat-nav.css   |   Thème orange "les Lilas Blancs"
   ============================================================ */

:root {
  --nav-bg: #f97316;
  --nav-width: 240px;
  --nav-accent: #ffffff;
  --nav-accent-light: rgba(255,255,255,0.18);
  --nav-text: rgba(255,255,255,0.72);
  --nav-text-hover: #ffffff;
  --nav-active-text: #ffffff;
  --nav-border: rgba(255,255,255,0.14);
  --nav-section-label: rgba(255,255,255,0.5);
}

/* Sidebar container */
#mat-sidebar {
  width: var(--nav-width);
  min-width: var(--nav-width);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: var(--nav-bg);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 40;
  flex-shrink: 0;
}

#mat-sidebar::-webkit-scrollbar { width: 3px; }
#mat-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--nav-border);
  text-decoration: none;
}

.nav-logo img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.nav-logo-text { display: flex; flex-direction: column; overflow: hidden; }
.nav-logo-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-logo-sub {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-top: 1px;
  letter-spacing: 0.02em;
}

/* Filtre année scolaire */
.nav-year {
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--nav-border);
}
.nav-year-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--nav-section-label);
  margin-bottom: 5px;
}
.nav-year-select {
  width: 100%;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 7px;
  padding: 5px 8px;
  outline: none;
  cursor: pointer;
}

/* Nav body */
.nav-body {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Section label */
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-section-label);
  padding: 10px 10px 3px;
  margin-top: 4px;
}

/* Nav link */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--nav-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: var(--nav-text-hover);
}

.nav-link.active {
  background: var(--nav-accent-light);
  color: var(--nav-active-text);
  font-weight: 600;
}

.nav-link.active .nav-icon { color: rgba(255,255,255,0.9); opacity: 1; }

/* Nav icon */
.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.6);
  transition: color 0.12s;
}

.nav-link:hover .nav-icon { color: rgba(255,255,255,0.9); opacity: 0.9; }

/* Badge */
.nav-badge {
  margin-left: auto;
  background: rgba(0,0,0,0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  flex-shrink: 0;
}
.nav-badge.warn   { background: #f59e0b; }
.nav-badge.info   { background: rgba(255,255,255,0.28); }
.nav-badge.muted  { background: rgba(255,255,255,0.18); color: #fff; }
.nav-badge.danger { background: #ef4444; }

/* Separator */
.nav-sep { height: 1px; background: var(--nav-border); margin: 6px 0; }

/* Footer */
.nav-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--nav-border);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.12s;
}
.nav-user:hover { background: rgba(255,255,255,0.1); }

.nav-avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-user-info { flex: 1; overflow: hidden; }
.nav-user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-role { font-size: 10.5px; color: var(--nav-section-label); }

/* Card utility */
.card {
  background: #fff;
  border: 1px solid #f0f0f5;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
