/* ============================================
   ADMIN SIDEBAR — admin-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 */
#admin-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;
}

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

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

.nav-logo img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.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;
  color: rgba(255,255,255,0.55);
  margin-top: 1px;
}

/* 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: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 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 4px;
  margin-top: 4px;
}

/* Nav link */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--nav-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  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);
}

.nav-link.active .nav-icon {
  color: var(--nav-accent);
}

/* Nav icon */
.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.75;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
  opacity: 1;
}

/* 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.danger { background: #ef4444; }
.nav-badge.info   { background: rgba(255,255,255,0.25); }
.nav-badge.muted  { background: rgba(255,255,255,0.18); }

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

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

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-user:hover {
  background: rgba(255,255,255,0.1);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  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 #eef0f2;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Sparkbar utility */
.sparkbar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}

.sparkbar span {
  flex: 1;
  background: #f97316;
  border-radius: 2px 2px 0 0;
  opacity: 0.5;
  min-height: 3px;
}

.sparkbar span:last-child {
  opacity: 1;
}
