/* ============================================================
   EVALENS UNC — Feuille de style principale
   Fidèle au prototype prototype-web.html
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --unc-navy:    #002D74;
  --unc-navy2:   #001a4a;
  --unc-gold:    #F5A623;
  --unc-gold2:   #d4881a;
  --primary:     #002D74;
  --primary-h:   #1a4aad;
  --success:     #059669;
  --success-bg:  #D1FAE5;
  --warning:     #D97706;
  --warning-bg:  #FEF3C7;
  --danger:      #DC2626;
  --danger-bg:   #FEE2E2;
  --info:        #2563EB;
  --info-bg:     #DBEAFE;
  --purple:      #7C3AED;
  --purple-bg:   #EDE9FE;
  --bg:          #F0F4F8;
  --bg2:         #E5EBF3;
  --surface:     #FFFFFF;
  --border:      #E2E8F0;
  --border2:     #CBD5E1;
  --text:        #0F172A;
  --text2:       #334155;
  --text3:       #64748B;
  --text4:       #94A3B8;
  --sidebar-w:   268px;
  --header-h:    64px;
  --r-sm:  6px;
  --r:    10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-f:  9999px;
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06);
  --sh:    0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
  --sh-md: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
  --sh-lg: 0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);
  --tr: all .18s ease;
  --tr-s: all .32s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; }

/* ── Utilitaires ──────────────────────────────────────────── */
.hidden  { display: none !important; }
.flex    { display: flex; }
.flex-c  { flex-direction: column; }
.aic     { align-items: center; }
.jcb     { justify-content: space-between; }
.jcc     { justify-content: center; }
.g-1 { gap: 4px; } .g-2 { gap: 8px; } .g-3 { gap: 12px; }
.g-4 { gap: 16px; } .g-6 { gap: 24px; }
.w-full  { width: 100%; }
.ml-auto { margin-left: auto; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.p-4 { padding: 16px; } .p-6 { padding: 24px; }
.text-sm { font-size: 12px; } .text-base { font-size: 14px; }
.text-lg { font-size: 16px; } .text-xl { font-size: 18px; }
.text-2xl { font-size: 22px; } .text-3xl { font-size: 28px; }
.fw-5 { font-weight: 500; } .fw-6 { font-weight: 600; }
.fw-7 { font-weight: 700; } .fw-8 { font-weight: 800; }
.c-muted { color: var(--text4); } .c-sec { color: var(--text3); }
.c-pri { color: var(--primary); } .c-ok { color: var(--success); }
.c-warn { color: var(--warning); } .c-err { color: var(--danger); }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.overflow-x { overflow-x: auto; }
.italic { font-style: italic; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: var(--r-f);
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.b-primary { background: var(--info-bg); color: var(--info); }
.b-success { background: var(--success-bg); color: var(--success); }
.b-warning { background: var(--warning-bg); color: var(--warning); }
.b-danger  { background: var(--danger-bg); color: var(--danger); }
.b-gray    { background: #F1F5F9; color: var(--text3); }
.b-gold    { background: #FEF9ED; color: #B45309; }
.b-purple  { background: var(--purple-bg); color: var(--purple); }

/* ── Boutons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r); border: none;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: var(--tr); white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(0,45,116,.28);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-h); transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,45,116,.38);
}
.btn-secondary { background: var(--unc-gold); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: var(--unc-gold2); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #047857; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-info    { background: var(--info); color: #fff; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text3); }
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.btn-light { background: var(--bg); color: var(--text2); border: 1px solid var(--border); }
.btn-light:hover { background: var(--bg2); }
.btn-sm  { padding: 6px 13px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg  { padding: 13px 28px; font-size: 15px; border-radius: var(--r-md); }
.btn-ico { padding: 8px; width: 36px; height: 36px; border-radius: var(--r); }

/* ── Formulaires ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: .4px;
}
.req { color: var(--danger); margin-left: 2px; }
.fc {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-size: 13.5px; transition: var(--tr); outline: none;
}
.fc:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,45,116,.1); }
.fc::placeholder { color: var(--text4); }
textarea.fc { resize: vertical; min-height: 88px; }
select.fc { cursor: pointer; }
.form-row { display: grid; gap: 16px; }
.r2 { grid-template-columns: 1fr 1fr; }
.r3 { grid-template-columns: 1fr 1fr 1fr; }
.r4 { grid-template-columns: repeat(4,1fr); }
.hint { font-size: 11.5px; color: var(--text4); margin-top: 4px; }
.form-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--r);
  transition: var(--tr);
}
.form-check:hover { border-color: var(--primary); background: #EFF6FF; }
.form-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.form-check-label { font-size: 13.5px; font-weight: 500; }

/* ── Cartes ───────────────────────────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--sh-sm); border: 1px solid var(--border); overflow: hidden;
}
.card-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-sub   { font-size: 12px; color: var(--text4); margin-top: 2px; }
.card-body  { padding: 22px; }
.card-foot  { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg); }

/* Stat cards */
.stat {
  background: var(--surface); border-radius: var(--r-md);
  padding: 20px 22px; box-shadow: var(--sh-sm);
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.stat.blue::before   { background: var(--primary); }
.stat.gold::before   { background: var(--unc-gold); }
.stat.green::before  { background: var(--success); }
.stat.red::before    { background: var(--danger); }
.stat.purple::before { background: var(--purple); }
.stat.teal::before   { background: #0891B2; }
.stat-lbl { font-size: 11.5px; font-weight: 700; color: var(--text4); text-transform: uppercase; letter-spacing: .5px; }
.stat-val { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1.1; margin: 6px 0 3px; }
.stat-sub { font-size: 12px; color: var(--text3); }
.stat-ico {
  position: absolute; right: 18px; top: 18px; width: 44px; height: 44px;
  border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-ico.blue   { background: var(--info-bg); color: var(--info); }
.stat-ico.gold   { background: #FEF3C7; color: var(--warning); }
.stat-ico.green  { background: var(--success-bg); color: var(--success); }
.stat-ico.red    { background: var(--danger-bg); color: var(--danger); }
.stat-ico.purple { background: var(--purple-bg); color: var(--purple); }
.stat-ico.teal   { background: #E0F2FE; color: #0891B2; }

/* Progress bars */
.prog { height: 7px; background: var(--bg2); border-radius: var(--r-f); overflow: hidden; }
.prog-bar { height: 100%; border-radius: var(--r-f); transition: width .7s ease; }
.pb-primary { background: var(--primary); }
.pb-success { background: var(--success); }
.pb-warning { background: var(--warning); }
.pb-danger  { background: var(--danger); }
.pb-gold    { background: var(--unc-gold); }
.pb-purple  { background: var(--purple); }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: var(--bg); padding: 10px 16px;
  font-size: 11px; font-weight: 700; color: var(--text4);
  text-transform: uppercase; letter-spacing: .4px;
  text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FAFBFF; }
.td-bold { color: var(--text); font-weight: 600; }

/* Grilles */
.grid { display: grid; gap: 20px; }
.g-2c { grid-template-columns: repeat(2,1fr); }
.g-3c { grid-template-columns: repeat(3,1fr); }
.g-4c { grid-template-columns: repeat(4,1fr); }
.g-5c { grid-template-columns: repeat(5,1fr); }

/* ── Page LOGIN ───────────────────────────────────────────── */
.page-login {
  min-height: 100vh; display: flex;
  background: linear-gradient(135deg, #001230 0%, var(--unc-navy) 55%, #0d47a1 100%);
  align-items: stretch; position: relative; overflow: hidden;
}
.page-login::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 20% 80%, rgba(245,166,35,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.04) 0%, transparent 40%);
}
.login-left {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 60px 64px; color: #fff; position: relative; z-index: 1;
}
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 48px; }
.login-brand-ico {
  width: 60px; height: 60px; background: rgba(255,255,255,.12); border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--unc-gold);
}
.login-brand-name { font-size: 26px; font-weight: 800; }
.login-brand-tag  { font-size: 12px; color: rgba(255,255,255,.55); font-weight: 500; }
.login-hero h1 { font-size: 38px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.login-hero h1 span { color: var(--unc-gold); }
.login-hero p { font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.7; max-width: 460px; }
.login-features { margin-top: 44px; display: flex; flex-direction: column; gap: 14px; }
.feat-item { display: flex; align-items: flex-start; gap: 14px; }
.feat-ico {
  width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  color: var(--unc-gold); flex-shrink: 0; margin-top: 1px;
}
.feat-text .ft { font-size: 13.5px; font-weight: 600; }
.feat-text .fs { font-size: 12px; color: rgba(255,255,255,.55); margin-top: 2px; }
.login-unc-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 48px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  padding: 10px 18px; border-radius: var(--r-lg); color: rgba(255,255,255,.8);
  font-size: 13px; font-weight: 500;
}
.login-unc-badge span { color: var(--unc-gold); font-weight: 700; }
.login-right {
  width: 480px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  padding: 40px 48px; position: relative; z-index: 1;
  background: rgba(0,0,0,.18); backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255,255,255,.08);
}
.login-box { width: 100%; }
.login-box-head { margin-bottom: 32px; }
.login-box-title { font-size: 24px; font-weight: 800; color: #fff; }
.login-box-sub { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px; }
.role-tabs {
  display: flex; gap: 4px; background: rgba(0,0,0,.25); padding: 4px;
  border-radius: var(--r); margin-bottom: 28px;
}
.rtab {
  flex: 1; padding: 9px 6px; border: none; background: transparent;
  color: rgba(255,255,255,.55); border-radius: var(--r-sm); cursor: pointer;
  font-size: 12.5px; font-weight: 600; transition: var(--tr); text-align: center;
}
.rtab.active { background: rgba(255,255,255,.15); color: #fff; }
.rtab i { display: block; font-size: 18px; margin-bottom: 4px; }
.login-form .fc {
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.15); color: #fff;
}
.login-form .fc::placeholder { color: rgba(255,255,255,.35); }
.login-form .fc:focus { border-color: var(--unc-gold); background: rgba(255,255,255,.12); }
.login-form .form-label { color: rgba(255,255,255,.65); }
.btn-login {
  width: 100%; padding: 13px; font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, var(--unc-gold), #e8951a);
  color: #fff; border: none; border-radius: var(--r); cursor: pointer;
  transition: var(--tr); box-shadow: 0 4px 14px rgba(245,166,35,.4);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,166,35,.55); }
.login-errors {
  background: rgba(220,38,38,.15); border: 1px solid rgba(220,38,38,.35);
  border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 16px;
  color: #fca5a5; font-size: 13px;
}
.ql-btn {
  width: 100%; padding: 9px 14px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.65);
  border-radius: var(--r-sm); cursor: pointer; font-size: 12.5px; font-weight: 500;
  text-align: left; transition: var(--tr);
}
.ql-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.ql-btn i { margin-right: 8px; width: 14px; }

/* ── App Layout ───────────────────────────────────────────── */
#app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
#sidebar {
  width: var(--sidebar-w); background: var(--unc-navy2);
  flex-shrink: 0; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.sb-brand {
  padding: 18px 20px 14px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sb-brand-ico {
  width: 40px; height: 40px; background: rgba(255,255,255,.1);
  border-radius: var(--r); display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--unc-gold); flex-shrink: 0;
}
.sb-brand-t .an { font-size: 15px; font-weight: 800; color: #fff; }
.sb-brand-t .as { font-size: 10px; color: rgba(255,255,255,.4); font-weight: 500; }
.sb-sec { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: 1px; padding: 14px 20px 5px; }
.sb-nav { flex: 1; overflow-y: auto; padding-bottom: 8px; }
.sb-nav::-webkit-scrollbar { width: 4px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.ni {
  display: flex; align-items: center; gap: 11px; padding: 10px 20px;
  color: rgba(255,255,255,.65); cursor: pointer; transition: var(--tr);
  border-left: 3px solid transparent; font-size: 13.5px; font-weight: 500;
  position: relative; text-decoration: none;
}
a.ni { color: rgba(255,255,255,.65); }
.ni:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.ni.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--unc-gold); }
.ni i { width: 17px; text-align: center; font-size: 14px; flex-shrink: 0; }
.ni .nb {
  margin-left: auto; background: var(--unc-gold); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-f);
  min-width: 18px; text-align: center;
}
.sb-user {
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sb-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.sb-user-info .un { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 148px; }
.sb-user-info .ur { color: rgba(255,255,255,.45); font-size: 11px; }
.sb-logout { margin-left: auto; color: rgba(255,255,255,.3); cursor: pointer; font-size: 15px; flex-shrink: 0; }
.sb-logout:hover { color: rgba(255,255,255,.85); }

/* Main Content */
#main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
#hdr {
  background: var(--surface); height: var(--header-h);
  padding: 0 28px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); box-shadow: var(--sh-xs);
  position: sticky; top: 0; z-index: 50;
}
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text4); }
.breadcrumb .cur { color: var(--text); font-weight: 600; }
.breadcrumb i { font-size: 9px; }
.hdr-right { display: flex; align-items: center; gap: 10px; }
.hdr-search-wrap { position: relative; }
.hdr-search {
  padding: 8px 14px 8px 36px; border: 1.5px solid var(--border);
  border-radius: var(--r-f); background: var(--bg); font-size: 13px;
  width: 220px; outline: none; transition: var(--tr); color: var(--text);
}
.hdr-search:focus { border-color: var(--primary); width: 280px; background: var(--surface); }
.hdr-search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text4); font-size: 13px; }
.hdr-ico {
  width: 38px; height: 38px; border-radius: var(--r); background: var(--bg);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text3); transition: var(--tr); position: relative;
  text-decoration: none;
}
.hdr-ico:hover { background: var(--bg2); }
.hdr-dot {
  position: absolute; top: 8px; right: 8px; width: 7px; height: 7px;
  background: var(--danger); border-radius: 50%; border: 2px solid var(--surface);
}
.hdr-user {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px;
  border-radius: var(--r); cursor: pointer; transition: var(--tr);
}
.hdr-user:hover { background: var(--bg); }
.hdr-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
}
.hdr-user-info .hu-n { font-size: 13px; font-weight: 600; }
.hdr-user-info .hu-r { font-size: 11px; color: var(--text4); }

/* Page wrapper */
.pg { padding: 28px 28px 48px; }
.pg-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.pg-title { font-size: 22px; font-weight: 800; color: var(--text); }
.pg-sub   { font-size: 13px; color: var(--text3); margin-top: 4px; }
.pg-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* ── Formulaire d'évaluation ──────────────────────────────── */
.eval-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-h));
  color: #fff; padding: 24px 30px; border-radius: var(--r-md); margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.eval-hero::after {
  content: '\f19c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; right: 20px; bottom: -14px; font-size: 90px;
  color: rgba(255,255,255,.05);
}
.eval-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15); padding: 4px 12px;
  border-radius: var(--r-f); font-size: 11.5px; font-weight: 600;
  margin-bottom: 12px;
}
.eval-hero h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.eval-hero-meta { font-size: 13px; color: rgba(255,255,255,.75); display: flex; gap: 20px; flex-wrap: wrap; }
.eval-hero-meta span { display: flex; align-items: center; gap: 6px; }

.eval-progress-bar-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 20px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 16px;
}
.eval-prog-txt { font-size: 13px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.eval-prog-sub { font-size: 12px; color: var(--text4); margin-top: 2px; }

.eval-sec {
  background: var(--surface); border-radius: var(--r-md);
  border: 1px solid var(--border); box-shadow: var(--sh-sm); margin-bottom: 16px;
  overflow: hidden;
}
.eval-sec-hd {
  padding: 14px 22px; background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.eval-sec-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.eval-sec-title { font-size: 14px; font-weight: 700; }
.eval-sec-desc  { font-size: 12px; color: var(--text4); }
.eval-sec-body  { padding: 6px 22px 16px; }

.eval-q {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.eval-q:last-child { border-bottom: none; }
.eval-q-text { font-size: 13.5px; font-weight: 500; color: var(--text); flex: 1; }
.eval-q-sub  { font-size: 11.5px; color: var(--text4); margin-top: 2px; }

/* Likert scale */
.likert { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.lk {
  width: 44px; height: 44px; border-radius: var(--r); border: 2px solid var(--border);
  background: var(--surface); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: var(--tr); color: var(--text3); display: flex; align-items: center; justify-content: center;
}
.lk:hover { border-color: var(--text3); color: var(--text); background: var(--bg); }
.lk.s1 { border-color: var(--danger); background: var(--danger); color: #fff; }
.lk.s2 { border-color: #F97316; background: #F97316; color: #fff; }
.lk.s3 { border-color: var(--warning); background: var(--warning); color: #fff; }
.lk.s4 { border-color: #65A30D; background: #65A30D; color: #fff; }
.lk.s5 { border-color: var(--success); background: var(--success); color: #fff; }
.likert-legend {
  display: flex; justify-content: flex-end; gap: 5px; padding: 8px 22px 4px;
}
.ll { font-size: 10px; color: var(--text4); width: 44px; text-align: center; }

/* Emoji satisfaction */
.sat-scale { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.sat {
  width: 56px; height: 56px; border-radius: var(--r-md);
  border: 2px solid var(--border); background: var(--bg);
  font-size: 24px; cursor: pointer; transition: var(--tr);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
}
.sat .sl { font-size: 10px; font-weight: 600; color: var(--text4); margin-top: 2px; }
.sat:hover { transform: scale(1.08); border-color: var(--unc-gold); }
.sat.sel { border-color: var(--unc-gold); background: #FEF9ED; transform: scale(1.12); box-shadow: 0 0 0 3px rgba(245,166,35,.2); }

/* NPS scale */
.nps-scale { display: flex; gap: 4px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.nps-btn {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--tr);
  color: var(--text3); display: flex; align-items: center; justify-content: center;
}
.nps-btn:hover { border-color: var(--primary); color: var(--primary); }
.nps-btn.nps-sel { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Résultats / Charts ───────────────────────────────────── */
.score-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ring {
  width: 100px; height: 100px; border-radius: 50%;
  border: 7px solid var(--bg2); display: flex;
  flex-direction: column; align-items: center; justify-content: center;
}
.ring.exc { border-color: var(--success); }
.ring.good{ border-color: #65A30D; }
.ring.avg { border-color: var(--warning); }
.ring.poor{ border-color: var(--danger); }
.ring-val { font-size: 22px; font-weight: 800; }
.ring.exc .ring-val  { color: var(--success); }
.ring.good .ring-val { color: #65A30D; }
.ring.avg .ring-val  { color: var(--warning); }
.ring.poor .ring-val { color: var(--danger); }
.ring-max { font-size: 10px; color: var(--text4); }
.ring-lbl { font-size: 12.5px; font-weight: 600; color: var(--text3); }

.rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rl { font-size: 12.5px; color: var(--text2); flex: 0 0 200px; }
.rs { font-size: 13px; font-weight: 700; flex: 0 0 30px; text-align: right; }

/* Bar chart */
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px; height: 160px;
  border-bottom: 2px solid var(--border); padding: 0 4px;
}
.bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bc-bar {
  width: 100%; border-radius: 4px 4px 0 0; min-height: 4px;
  background: var(--primary); position: relative; cursor: pointer;
  transition: opacity .2s;
}
.bc-bar:hover { opacity: .8; }
.bc-bar.gold  { background: var(--unc-gold); }
.bc-bar.green { background: var(--success); }
.bc-bar.red   { background: var(--danger); }
.bc-val { font-size: 11px; font-weight: 700; color: var(--text); }
.bc-lbl { font-size: 10px; color: var(--text4); text-align: center; white-space: nowrap; }

/* Distribution */
.dist { display: flex; flex-direction: column; gap: 7px; }
.dist-row { display: flex; align-items: center; gap: 10px; }
.dist-lbl { font-size: 11.5px; color: var(--text3); width: 64px; text-align: right; flex-shrink: 0; }
.dist-bar { flex: 1; height: 22px; background: var(--bg2); border-radius: var(--r-sm); overflow: hidden; }
.dist-fill { height: 100%; border-radius: var(--r-sm); display: flex; align-items: center; padding: 0 8px; transition: width .7s ease; }
.dist-fill span { font-size: 11px; font-weight: 600; color: #fff; }
.dist-pct { font-size: 11.5px; color: var(--text4); width: 36px; text-align: right; flex-shrink: 0; }

/* Dot indicators */
.crit-score { display: flex; align-items: center; gap: 8px; }
.crit-dots { display: flex; gap: 3px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bg2); }
.dot.d1 { background: var(--danger); }
.dot.d2 { background: #F97316; }
.dot.d3 { background: var(--warning); }
.dot.d4 { background: #65A30D; }
.dot.d5 { background: var(--success); }

/* Sparkline */
.spark { display: flex; align-items: flex-end; gap: 2px; height: 30px; }
.sp-bar { width: 7px; background: var(--primary); border-radius: 2px 2px 0 0; opacity: .7; }

/* ── Alertes aberrantes ───────────────────────────────────── */
.outlier-card {
  border: 2px solid #F59E0B; background: #FFFBEB;
  border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 12px;
}
.outlier-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.outlier-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--warning); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-f);
}
.outlier-txt { font-size: 13.5px; color: var(--text2); }
.outlier-reveal {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.06);
  display: none;
}
.outlier-reveal.open { display: block; }

/* ── Présences ────────────────────────────────────────────── */
.att-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.att-card {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; transition: var(--tr); user-select: none;
}
.att-card:hover { border-color: var(--primary); background: #EFF6FF; }
.att-card.pres  { border-color: var(--success); background: var(--success-bg); }
.att-card.pres .att-av  { background: var(--success); color: #fff; }
.att-av {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text3); flex-shrink: 0;
}
.att-name { font-size: 13px; font-weight: 500; color: var(--text); }
.att-id   { font-size: 11px; color: var(--text4); }
.att-chk  { margin-left: auto; color: var(--success); font-size: 16px; opacity: 0; transition: var(--tr); }
.att-card.pres .att-chk { opacity: 1; }

/* ── Plan de cours — Leçons ───────────────────────────────── */
.lesson-item {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.lesson-item:last-child { border-bottom: none; }
.lesson-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg2);
  color: var(--text3); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 4px;
}
.lesson-body { flex: 1; }
.lesson-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.lesson-desc  { font-size: 12px; color: var(--text3); margin-top: 3px; }
.lesson-tags  { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.lesson-acts  { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ── Séances ──────────────────────────────────────────────── */
.seance-card {
  background: var(--surface); border-radius: var(--r);
  border: 1px solid var(--border); padding: 16px 18px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 10px; transition: var(--tr);
}
.seance-card:hover { box-shadow: var(--sh-sm); }
.seance-date { text-align: center; flex-shrink: 0; width: 50px; }
.seance-date .sd { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1; }
.seance-date .sm { font-size: 10.5px; font-weight: 600; color: var(--text4); text-transform: uppercase; }
.seance-sep { width: 1px; height: 40px; background: var(--border); flex-shrink: 0; }
.seance-info { flex: 1; }
.seance-title { font-size: 14px; font-weight: 600; color: var(--text); }
.seance-meta  { font-size: 12px; color: var(--text4); margin-top: 3px; }
.seance-stats { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.seance-stat  { text-align: center; }
.seance-stat .sv { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1; }
.seance-stat .sl { font-size: 10px; color: var(--text4); }

/* ── Notifications ────────────────────────────────────────── */
.notif {
  display: flex; gap: 14px; padding: 16px;
  border-radius: var(--r); border: 1px solid var(--border);
  background: var(--surface); margin-bottom: 8px; transition: var(--tr);
}
.notif:hover { box-shadow: var(--sh-sm); }
.notif.unread { border-left: 3px solid var(--primary); background: #F0F6FF; }
.notif-ico {
  width: 42px; height: 42px; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.notif-time { font-size: 11px; color: var(--text4); margin-top: 5px; }

/* ── Alertes ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--r); border-left: 4px solid;
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px;
}
.al-success { background: var(--success-bg); border-color: var(--success); }
.al-warning { background: var(--warning-bg); border-color: var(--warning); }
.al-danger  { background: var(--danger-bg);  border-color: var(--danger); }
.al-info    { background: var(--info-bg);    border-color: var(--info); }
.al-title { font-size: 13.5px; font-weight: 700; }
.al-body  { font-size: 12.5px; margin-top: 3px; }

/* ── Modals ───────────────────────────────────────────────── */
.modal-ov {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-ov.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); max-width: 640px; width: 100%; max-height: 92vh; overflow-y: auto;
}
.modal-hd {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-ft {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  position: sticky; bottom: 0; background: var(--surface);
}
.modal-x { cursor: pointer; color: var(--text4); font-size: 18px; }
.modal-x:hover { color: var(--text); }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text4); transition: var(--tr);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── État vide ────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 24px; color: var(--text4); }
.empty i  { font-size: 48px; margin-bottom: 16px; opacity: .3; display: block; }
.empty h3 { font-size: 16px; color: var(--text3); font-weight: 600; }
.empty p  { font-size: 13px; margin-top: 6px; }

/* ── Toast ────────────────────────────────────────────────── */
#toasts {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--text); color: #fff; padding: 12px 18px;
  border-radius: var(--r); box-shadow: var(--sh-md);
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; max-width: 340px; pointer-events: all;
  animation: toastIn .3s ease; opacity: 1; transition: opacity .3s;
}
.toast.t-ok   { background: var(--success); }
.toast.t-err  { background: var(--danger); }
.toast.t-warn { background: var(--warning); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Divers ───────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  background: var(--bg2); border-radius: var(--r-f); font-size: 12px; font-weight: 500; color: var(--text3);
}
.filter-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 14px 18px; background: var(--surface); border-radius: var(--r);
  border: 1px solid var(--border); margin-bottom: 20px; box-shadow: var(--sh-xs);
}
.fbar-search { position: relative; flex: 1; min-width: 200px; }
.fbar-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text4); }
.fbar-input {
  width: 100%; padding: 8px 12px 8px 33px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); background: var(--bg); font-size: 13px; outline: none; color: var(--text);
}
.fbar-input:focus { border-color: var(--primary); background: var(--surface); }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary);
  border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--primary);
  position: absolute; left: -28px; top: 2px;
}
.tl-dot.ok   { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.tl-dot.warn { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.tl-content { background: var(--surface); border-radius: var(--r); border: 1px solid var(--border); padding: 11px 15px; }
.tl-title   { font-size: 13.5px; font-weight: 600; }
.tl-date    { font-size: 11px; color: var(--text4); margin-top: 2px; }

/* Rank badges */
.rank { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.rk1 { background: #FEF3C7; color: #B45309; }
.rk2 { background: #F1F5F9; color: #475569; }
.rk3 { background: #FEF9ED; color: #92400E; }
.rk4 { background: #F8FAFC; color: var(--text4); }

/* Django messages */
.django-messages { padding: 0; margin-bottom: 20px; }
.django-messages .alert { margin-bottom: 8px; }
.alert-dismissible { position: relative; }
.alert-close { float: right; cursor: pointer; background: none; border: none; font-size: 16px; color: inherit; opacity: .6; }
.alert-close:hover { opacity: 1; }

/* ── Print ────────────────────────────────────────────────── */
@media print {
  #sidebar, #hdr, .no-print { display: none !important; }
  #main { margin-left: 0; }
  .pg { padding: 16px; }
  .card, .stat { box-shadow: none !important; }
  body { background: #fff; }
  .btn { display: none !important; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .g-4c { grid-template-columns: repeat(2,1fr); }
  .g-5c { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 820px) {
  .g-3c, .g-4c { grid-template-columns: repeat(2,1fr); }
  .r3 { grid-template-columns: 1fr 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; padding: 40px 32px; background: linear-gradient(135deg, #001230, var(--unc-navy)); }
  .eval-q { flex-direction: column; gap: 12px; }
  .pg-head { flex-direction: column; }
  .seance-card { flex-wrap: wrap; }
  .rating-row .rl { flex: 0 0 140px; }
  #main { margin-left: 0; }
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
}
