/* =========================================================
   Placement Élèves — Style global
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --primary:    #1d4ed8;
  --primary-dk: #1e3a8a;
  --accent:     #f59e0b;
  --success:    #10b981;
  --danger:     #ef4444;
  --bg:         #f8fafc;
  --sidebar-w:  240px;
  --font:       'DM Sans', sans-serif;
  --mono:       'DM Mono', monospace;
}

body { font-family: var(--font); background: var(--bg); color: #1e293b; margin: 0; }

/* ---- Sidebar ---- */
#sidebar {
  width: var(--sidebar-w); height: 100vh; position: fixed; top: 0; left: 0;
  background: var(--primary-dk); color: white; display: flex; flex-direction: column;
  z-index: 100; overflow-y: auto;
}
#sidebar .brand {
  padding: 24px 20px 16px;
  font-size: 1rem; font-weight: 700; letter-spacing: .5px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
#sidebar .brand small { display: block; font-size: .7rem; font-weight: 400; opacity: .6; margin-top: 2px; }
#sidebar nav { flex: 1; padding: 12px 0; }
#sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: rgba(255,255,255,.75);
  text-decoration: none; font-size: .88rem; font-weight: 500;
  transition: background .15s, color .15s;
}
#sidebar nav a:hover, #sidebar nav a.active {
  background: rgba(255,255,255,.12); color: white;
}
#sidebar nav .nav-section {
  font-size: .68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255,255,255,.35); padding: 16px 20px 4px;
}
#sidebar .sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem; color: rgba(255,255,255,.5);
}

/* ---- Main content ---- */
#main { margin-left: var(--sidebar-w); padding: 32px; min-height: 100vh; }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.topbar h1 { font-size: 1.4rem; font-weight: 700; margin: 0; color: #0f172a; }
.topbar .breadcrumb { font-size: .82rem; color: #64748b; margin: 0; }

/* ---- Cards ---- */
.card { border: none; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.card-header { background: white; border-bottom: 1px solid #e2e8f0; border-radius: 12px 12px 0 0 !important; padding: 16px 20px; }
.card-header h5 { margin: 0; font-size: .95rem; font-weight: 600; color: #0f172a; }

/* ---- Table ---- */
.table thead th {
  background: #f1f5f9; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; color: #475569;
  border-bottom: 2px solid #e2e8f0; padding: 10px 14px;
}
.table tbody td { vertical-align: middle; font-size: .88rem; padding: 10px 14px; }
.table tbody tr:hover { background: #f8fafc; }

/* ---- Badges ---- */
.role-badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: .75rem; font-weight: 600; font-family: var(--mono);
}
.role-admin  { background: #fef3c7; color: #92400e; }
.role-prof   { background: #dbeafe; color: #1e40af; }
.role-eleve  { background: #d1fae5; color: #065f46; }
.badge-gaucher { background: #ede9fe; color: #4c1d95; font-size: .72rem; padding: 2px 7px; border-radius: 20px; }

/* ---- Forms ---- */
.form-label { font-size: .85rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-control, .form-select {
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: .88rem; padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.form-hint { font-size: .78rem; color: #94a3b8; margin-top: 3px; }

/* ---- Buttons ---- */
.btn-primary   { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); }
.btn-sm { font-size: .8rem; padding: 4px 10px; border-radius: 6px; }

/* ---- Alert flash ---- */
.flash { border-radius: 8px; font-size: .88rem; margin-bottom: 20px; }

/* ---- EDT table ---- */
.edt-table { border-collapse: separate; border-spacing: 3px; }
.edt-table th { background: #1d4ed8; color: white; text-align: center; padding: 8px 12px; border-radius: 6px; font-size: .82rem; }
.edt-table td.slot { background: white; border-radius: 6px; padding: 4px; min-width: 130px; height: 52px; vertical-align: top; }
.edt-table td.heure { background: #f1f5f9; font-size: .78rem; font-family: var(--mono); color: #475569; text-align: right; padding: 4px 8px; border-radius: 6px; }
.cours-block {
  background: #dbeafe; border-left: 3px solid var(--primary);
  border-radius: 4px; padding: 3px 6px; font-size: .75rem;
  line-height: 1.3; cursor: pointer;
}
.cours-block:hover { background: #bfdbfe; }
.cours-block .cours-groupe { font-weight: 700; color: #1e3a8a; }
.cours-block .cours-salle  { color: #475569; font-family: var(--mono); }
.cours-exception { background: #fef3c7; border-left-color: var(--accent); }
.cours-annule    { background: #fee2e2; border-left-color: var(--danger); text-decoration: line-through; }

/* ---- Stats cards ---- */
.stat-card {
  background: white; border-radius: 12px; padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; color: #64748b; margin-top: 2px; }
