/* ============================================================
   HRD PLATFORM — Design system v3
   Lycée Privé H.R.Daniel — refonte complète
   ============================================================ */

:root{
  /* Marque : bleu nuit académique + or, identité "lycée privé" */
  --navy-950:#0a0f1f;
  --navy-900:#0e1730;
  --navy-800:#152142;
  --navy-700:#1c2d57;
  --navy-600:#243a6e;

  --brand-400:#5b7fe0;
  --brand-500:#3b62d6;
  --brand-600:#2b4fc2;
  --brand-700:#233fa0;
  --brand-50:#eef2ff;
  --brand-100:#e1e9ff;

  --gold-300:#f0cf88;
  --gold-400:#e2b563;
  --gold-500:#cb9a42;
  --gold-600:#a97c2f;

  /* Neutres */
  --ink-950:#0b1120;
  --ink-900:#131a2c;
  --ink-800:#1e2740;
  --ink-700:#3a4560;
  --ink-500:#697389;
  --ink-400:#94a0b8;
  --ink-300:#c2cadb;
  --ink-200:#e1e6ef;
  --ink-100:#eef1f7;
  --ink-50:#f7f8fb;
  --white:#ffffff;

  /* Sémantique */
  --success:#1a8f5e;
  --success-bg:#e2f6ec;
  --warning:#b3760f;
  --warning-bg:#fdf1dc;
  --danger:#c22b3c;
  --danger-bg:#fbe6e9;
  --info:#2467b0;
  --info-bg:#e5f0fb;

  --radius-sm:8px;
  --radius:14px;
  --radius-lg:20px;
  --radius-pill:999px;

  --shadow-sm:0 1px 2px rgba(11,17,32,.06);
  --shadow-md:0 10px 26px -10px rgba(11,17,32,.16);
  --shadow-lg:0 24px 48px -16px rgba(11,17,32,.26);

  --sidebar-w:272px;
  --topbar-h:78px;

  --font-body:'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head:'Lexend', var(--font-body);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:var(--font-body);
  background:var(--ink-50);
  color:var(--ink-800);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

a{ color:var(--brand-600); text-decoration:none; }
a:hover{ color:var(--brand-700); }
h1,h2,h3,h4,h5,h6{ font-family:var(--font-head); font-weight:700; color:var(--ink-900); letter-spacing:-.01em; margin:0 0 6px 0; }
p{ margin:0 0 10px 0; }
img{ max-width:100%; }

::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background:var(--ink-300); border-radius:10px; }
::-webkit-scrollbar-thumb:hover{ background:var(--ink-400); }

/* ============================================================
   LAYOUT
   ============================================================ */
.app{ display:flex; min-height:100vh; }

.main{
  flex:1;
  margin-left:var(--sidebar-w);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.content{ padding:26px 32px 60px; max-width:1400px; width:100%; margin:0 auto; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar{
  position:fixed;
  top:0; left:0; bottom:0;
  width:var(--sidebar-w);
  background:linear-gradient(190deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
  color:#c7cfe6;
  display:flex;
  flex-direction:column;
  padding:22px 16px 18px;
  z-index:1000;
  overflow-y:auto;
  transition:transform .3s ease;
}
.sidebar::-webkit-scrollbar{ width:6px; }
.sidebar::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.15); }

.sidebar .brand{
  display:flex; align-items:center; gap:12px;
  padding:8px 10px 22px 10px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand-mark{
  display:flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:13px; flex:0 0 auto;
  
  color:var(--navy-950);
  font-family:var(--font-head); font-weight:800; font-size:15px;
  box-shadow:var(--shadow-md);
}
.brand-text{ display:flex; flex-direction:column; line-height:1.25; min-width:0; }
.brand-text strong{ color:#fff; font-size:15.5px; font-family:var(--font-head); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.brand-text small{ color:#8b95b8; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.sidebar .menu{
  list-style:none; margin:0; padding:0;
  display:flex; flex-direction:column; gap:3px;
  flex:1;
}
.sidebar .menu li a{
  display:flex; align-items:center; gap:12px;
  padding:11px 14px;
  border-radius:11px;
  color:#a7b0cc;
  font-weight:600;
  font-size:14.25px;
  transition:.16s ease;
  white-space:nowrap;
}
.sidebar .menu li a i{ font-style:normal; font-size:16.5px; width:20px; text-align:center; flex:0 0 auto; }
.sidebar .menu li a:hover{ background:rgba(255,255,255,.06); color:#fff; }
.sidebar .menu li.active a{
  background:linear-gradient(135deg, rgba(226,181,99,.18), rgba(226,181,99,.06));
  color:#fff;
  box-shadow:inset 3px 0 0 var(--gold-400);
}
.sidebar .menu li.menu-spacer{ flex:1; }
.sidebar .menu li.logout a{ color:#e08a92; }
.sidebar .menu li.logout a:hover{ background:rgba(226,60,80,.12); color:#ff9aa4; }

.sidebar-close{
  display:none;
  align-self:flex-end;
  background:none; border:none; color:#fff; font-size:18px; cursor:pointer;
  padding:6px 10px;
}
.sidebar-overlay{
  display:none;
  position:fixed; inset:0; background:rgba(10,15,31,.5);
  z-index:999;
}
.sidebar-overlay.show{ display:block; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar{
  height:var(--topbar-h);
  background:var(--white);
  border-bottom:1px solid var(--ink-200);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 30px;
  position:sticky; top:0; z-index:500;
  gap:16px;
}
.topbar-left{ display:flex; align-items:center; gap:14px; min-width:0; }
.topbar-title{ font-size:19px; margin:0; }
.topbar-subtitle{ margin:2px 0 0; color:var(--ink-500); font-size:13px; font-weight:500; }

.hamburger{
  display:none;
  background:var(--ink-100); border:none; border-radius:10px;
  width:38px; height:38px; font-size:16px; cursor:pointer; color:var(--ink-700);
  flex:0 0 auto;
}

.topbar-right{ display:flex; align-items:center; gap:18px; flex:0 0 auto; }
.topbar-greeting{ font-size:13.5px; color:var(--ink-600); white-space:nowrap; }
.topbar-greeting strong{ color:var(--ink-900); }

.notif{ position:relative; }
.notif-icon{
  position:relative;
  background:var(--ink-100); border:none; border-radius:11px;
  width:42px; height:42px; font-size:18px; cursor:pointer;
}
.notif-count{
  position:absolute; top:-4px; right:-4px;
  background:var(--danger); color:#fff;
  font-size:10.5px; font-weight:700;
  min-width:18px; height:18px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  padding:0 4px;
  border:2px solid var(--white);
}
.notif-dropdown{
  display:none;
  position:absolute; right:0; top:52px;
  width:340px; max-height:420px; overflow-y:auto;
  background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow-lg);
  border:1px solid var(--ink-200);
  z-index:600;
}
.notif-dropdown.show{ display:block; }
.notif-dropdown-header{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px; border-bottom:1px solid var(--ink-100); font-weight:700; font-size:13.5px;
}
.notif-dropdown-header a{ font-size:12px; font-weight:600; }
.notif-dropdown-empty{ padding:30px 16px; text-align:center; color:var(--ink-400); font-size:13px; }
.notif-dropdown-item{
  display:flex; align-items:stretch; gap:8px;
  padding:0 10px;
  border-bottom:1px solid var(--ink-100);
}
.notif-dropdown-item.unread{ background:var(--brand-50); }
.notif-item-link{ display:flex; gap:10px; padding:12px 4px; flex:1; min-width:0; color:inherit; }
.notif-item-link .ico{ font-size:18px; flex:0 0 auto; }
.notif-item-link .txt{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.notif-item-link .txt b{ font-size:13px; color:var(--ink-900); }
.notif-item-link .txt span{ font-size:12px; color:var(--ink-500); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notif-item-delete{
  align-self:center; background:none; border:none; color:var(--ink-400); cursor:pointer; font-size:13px; padding:6px;
}
.notif-item-delete:hover{ color:var(--danger); }

.profile{ position:relative; cursor:pointer; }
.profile img{ width:42px; height:42px; border-radius:50%; object-fit:cover; border:2px solid var(--ink-200); display:block; }
.profile-menu{
  display:none;
  position:absolute; right:0; top:52px; width:210px;
  background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow-lg);
  border:1px solid var(--ink-200);
  z-index:600; overflow:hidden;
}
.profile-menu.show{ display:block; }
.profile-menu-name{ padding:14px 16px; border-bottom:1px solid var(--ink-100); }
.profile-menu-name{ font-weight:700; font-size:13.5px; display:flex; flex-direction:column; gap:2px; }
.profile-menu-name small{ font-weight:500; color:var(--ink-400); text-transform:capitalize; }
.profile-menu a{ display:block; padding:11px 16px; font-size:13.5px; color:var(--ink-700); }
.profile-menu a:hover{ background:var(--ink-50); }
.profile-menu a.text-danger{ color:var(--danger); }

/* ============================================================
   PAGE TITLE (pour pages sans topbar-title, ou complément)
   ============================================================ */
.page-title{ margin-bottom:22px; }
.page-title h3{ font-size:21px; margin-bottom:4px; }
.page-title p{ color:var(--ink-500); font-size:13.5px; margin:0; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert{
  padding:13px 16px; border-radius:var(--radius-sm);
  font-size:13.5px; font-weight:600; margin-bottom:18px;
  border:1px solid transparent;
}
.alert-success{ background:var(--success-bg); color:var(--success); border-color:#bfe9d3; }
.alert-danger{ background:var(--danger-bg); color:var(--danger); border-color:#f3c3ca; }
.alert-warning{ background:var(--warning-bg); color:var(--warning); border-color:#f2ddad; }
.alert-info{ background:var(--info-bg); color:var(--info); border-color:#bcdcf5; }

/* ============================================================
   CARDS / STATS
   ============================================================ */
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px,1fr));
  gap:18px;
  margin-bottom:26px;
}

.card-stat{
  background:var(--white);
  border-radius:var(--radius-lg);
  padding:20px 22px;
  display:flex; align-items:center; justify-content:space-between;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--ink-100);
  transition:.15s ease;
}
.card-stat:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.card-stat h6{ margin:0 0 6px; color:var(--ink-500); font-size:12.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.card-stat h2{ margin:0; font-size:28px; }
.card-stat span{ font-size:26px; width:52px; height:52px; border-radius:15px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.card-stat.blue span{ background:var(--brand-100); }
.card-stat.green span{ background:var(--success-bg); }
.card-stat.orange span{ background:var(--warning-bg); }
.card-stat.purple span{ background:#ece3fb; }
.card-stat.red span{ background:var(--danger-bg); }
.card-stat.gold span{ background:#fbeecb; }

a.card-link{ display:block; color:inherit; }
a.card-link .card-stat h5{ margin:0 0 4px; font-size:16px; }
a.card-link .card-stat p{ margin:0; color:var(--ink-500); font-size:13px; }
a.card-link:hover .card-stat{ box-shadow:var(--shadow-md); transform:translateY(-2px); border-color:var(--brand-400); }

.box{
  background:var(--white);
  border-radius:var(--radius-lg);
  padding:22px 24px;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--ink-100);
  margin-bottom:22px;
}
.box h2{ font-size:16.5px; margin-bottom:14px; }

.card{
  background:var(--white);
  border-radius:var(--radius-lg);
  padding:20px;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--ink-100);
  transition:.15s ease;
}
.card:hover{ box-shadow:var(--shadow-md); }
.card h3{ font-size:16px; margin-bottom:6px; }
.card p{ color:var(--ink-500); font-size:13.5px; }

.card-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }

.premium-card{
  background:var(--white);
  border-radius:var(--radius-lg);
  padding:16px 18px;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--ink-100);
}

.history-card{
  background:var(--white);
  border-radius:var(--radius);
  padding:16px 20px;
  box-shadow:var(--shadow-sm);
  border:1px solid var(--ink-100);
  margin-bottom:12px;
}

.moyenne-box{
  background:var(--brand-50);
  padding:16px 20px;
  border-radius:var(--radius);
  font-weight:700;
  display:flex; align-items:center; gap:10px; justify-content:space-between;
  margin-top:6px;
}
.moyenne-faible{ color:var(--danger); }
.moyenne-moyen{ color:var(--warning); }
.moyenne-bon{ color:var(--success); }

/* ============================================================
   BUTTONS
   ============================================================ */
button, .btn, .btn-login, .btn-chapitre, .btn-retour, .btn-add, .btn-view, .btn-delete, .btn-download{
  font-family:var(--font-body);
  cursor:pointer;
}

.btn, button[type="submit"]:not([class]), form button:not([class]){
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  background:var(--brand-600);
  color:#fff;
  border:none;
  padding:11px 18px;
  border-radius:11px;
  font-weight:700;
  font-size:13.75px;
  transition:.15s ease;
  text-decoration:none;
}
.btn:hover, button[type="submit"]:not([class]):hover{ background:var(--brand-700); color:#fff; }
.btn:disabled{ background:var(--ink-300); cursor:not-allowed; }

.btn-sm{ padding:7px 12px; font-size:12.5px; border-radius:9px; }
.btn-secondary{ background:var(--ink-100); color:var(--ink-700); }
.btn-secondary:hover{ background:var(--ink-200); color:var(--ink-900); }
.btn-success{ background:var(--success); color:#fff; }
.btn-success:hover{ background:#157a51; }
.btn-danger, .btn-delete{ background:var(--danger); color:#fff; }
.btn-danger:hover, .btn-delete:hover{ background:#a5222f; color:#fff; }
.btn-warning{ background:var(--gold-500); color:#3a2a08; }
.btn-warning:hover{ background:var(--gold-600); }
.btn-info, .btn-view, .btn-download{ background:var(--info); color:#fff; }
.btn-info:hover, .btn-view:hover, .btn-download:hover{ background:#1b568c; color:#fff; }
.btn-outline{ background:transparent; color:var(--brand-600); border:1.5px solid var(--brand-400); }
.btn-outline:hover{ background:var(--brand-50); }

.btn-retour, .back-btn{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--ink-100); color:var(--ink-700);
  padding:9px 15px; border-radius:10px; font-weight:700; font-size:13px;
  margin-bottom:18px;
}
.btn-retour:hover, .back-btn:hover{ background:var(--ink-200); color:var(--ink-900); }

.btn-add{
  background:var(--brand-600); color:#fff; border:none;
  padding:9px 16px; border-radius:10px; font-weight:700; font-size:13px;
}
.btn-add:hover{ background:var(--brand-700); }

.btn-chapitre{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--brand-50); color:var(--brand-700);
  padding:9px 14px; border-radius:10px; font-weight:700; font-size:13px; margin-top:10px;
}
.btn-chapitre:hover{ background:var(--brand-100); }

.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:9px; border:none;
  background:var(--ink-100); color:var(--ink-700); font-size:14px;
}
.icon-btn:hover{ background:var(--ink-200); }
.icon-btn.danger{ background:var(--danger-bg); color:var(--danger); }
.icon-btn.danger:hover{ background:#f5cdd3; }
.icon-btn.warning{ background:var(--warning-bg); color:var(--warning); }
.icon-btn.warning:hover{ background:#f7e4b6; }
.icon-btn.info{ background:var(--info-bg); color:var(--info); }

/* ============================================================
   FORMS
   ============================================================ */
label{ display:block; font-weight:700; font-size:12.75px; color:var(--ink-700); margin-bottom:6px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="time"], input[type="file"],
select, textarea{
  width:100%;
  padding:11px 13px;
  border-radius:10px;
  border:1.5px solid var(--ink-200);
  font-family:var(--font-body);
  font-size:14px;
  color:var(--ink-900);
  background:var(--white);
  transition:.15s ease;
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color:var(--brand-500); box-shadow:0 0 0 3px var(--brand-100);
}
textarea{ resize:vertical; min-height:80px; }

.form-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(200px,1fr)); gap:14px; align-items:end; }
.form-row{ display:flex; gap:12px; flex-wrap:wrap; align-items:end; }
.form-field{ display:flex; flex-direction:column; gap:6px; }

.form-vertical-eleve, .form-vertical{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px,1fr));
  gap:12px;
  align-items:end;
  background:var(--white);
  padding:20px;
  border-radius:var(--radius-lg);
  border:1px solid var(--ink-100);
  box-shadow:var(--shadow-sm);
  margin-bottom:22px;
}
.form-vertical-eleve button, .form-vertical button{ align-self:stretch; }

.filter-form, .note-filter{
  display:flex; flex-wrap:wrap; gap:12px; align-items:end;
  background:var(--white); padding:16px 18px; border-radius:var(--radius);
  border:1px solid var(--ink-100); margin-bottom:20px; box-shadow:var(--shadow-sm);
}
.filter-form select, .note-filter select{ min-width:170px; width:auto; }
.filter-form > div{ display:flex; flex-direction:column; gap:6px; }
.filter-form label{ margin-bottom:2px; }

.form-check{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.form-check input{ width:auto; }
.form-check-label{ font-weight:600; font-size:13.5px; color:var(--ink-700); }

.card-box{
  background:var(--white); padding:22px; border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm); border:1px solid var(--ink-100); margin-bottom:22px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-scroll{ overflow-x:auto; border-radius:var(--radius); }

table{
  width:100%;
  border-collapse:collapse;
  background:var(--white);
  border-radius:var(--radius);
  overflow:hidden;
}
table.plain, .box table, .card-box table{ box-shadow:var(--shadow-sm); border:1px solid var(--ink-100); }

th, td{
  padding:12px 14px;
  text-align:left;
  border-bottom:1px solid var(--ink-100);
  font-size:13.5px;
}
th{
  background:var(--ink-50);
  font-weight:700;
  color:var(--ink-600);
  font-size:11.75px;
  text-transform:uppercase;
  letter-spacing:.03em;
}
tbody tr:hover{ background:var(--ink-50); }
tbody tr:last-child td{ border-bottom:none; }

.note-table{ width:100%; }
.note-value{ font-weight:800; padding:4px 10px; border-radius:8px; display:inline-block; }
.note-red, .note-value.note-red{ background:var(--danger-bg); color:var(--danger); }
.note-orange, .note-value.note-orange{ background:var(--warning-bg); color:var(--warning); }
.note-green, .note-value.note-green{ background:var(--success-bg); color:var(--success); }

/* ============================================================
   TABS
   ============================================================ */
.tabs{ display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.tab{
  padding:9px 16px;
  background:var(--white);
  border:1.5px solid var(--ink-200);
  border-radius:var(--radius-pill);
  color:var(--ink-700);
  font-weight:700;
  font-size:13px;
}
.tab:hover{ border-color:var(--brand-400); color:var(--brand-600); }
.tab.active{
  background:var(--navy-900);
  border-color:var(--navy-900);
  color:#fff;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge{
  display:inline-flex; align-items:center; gap:4px;
  padding:5px 11px; border-radius:var(--radius-pill);
  font-size:11.5px; font-weight:700;
  background:var(--ink-100); color:var(--ink-700);
}
.badge.green{ background:var(--success-bg); color:var(--success); }
.badge.red{ background:var(--danger-bg); color:var(--danger); }
.badge.orange{ background:var(--warning-bg); color:var(--warning); }
.badge.blue{ background:var(--info-bg); color:var(--info); }
.badge.gray{ background:var(--ink-100); color:var(--ink-500); }
.date-badge{ background:var(--ink-100); color:var(--ink-700); font-size:11.5px; font-weight:700; padding:5px 11px; border-radius:var(--radius-pill); white-space:nowrap; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state, .empty{
  text-align:center;
  padding:50px 20px;
  color:var(--ink-400);
  background:var(--white);
  border-radius:var(--radius-lg);
  border:1.5px dashed var(--ink-200);
}
.empty-state-icon{ font-size:38px; margin-bottom:10px; }
.empty-state p, .empty p{ margin:0; font-size:13.75px; }

/* ============================================================
   MODALS
   ============================================================ */
.modal{
  display:none;
  position:fixed; inset:0;
  background:rgba(10,15,31,.55);
  z-index:2000;
  align-items:center; justify-content:center;
  padding:20px;
}
.modal.show{ display:flex; }
.modal-content, .modal-box{
  background:var(--white);
  border-radius:var(--radius-lg);
  width:100%; max-width:480px;
  box-shadow:var(--shadow-lg);
  max-height:90vh;
  display:flex; flex-direction:column;
  overflow:hidden;
}
.modal-box.scrollable{ overflow-y:auto; }
.modal-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px;
  background:var(--navy-900); color:#fff;
}
.modal-header h3{ color:#fff; font-size:16px; margin:0; }
.modal-header span{ cursor:pointer; font-size:16px; opacity:.85; }
.modal-header span:hover{ opacity:1; }
.modal form, .modal-body, .form-ajout{
  padding:20px 22px;
  display:flex; flex-direction:column; gap:12px;
}

/* ============================================================
   EDT (emploi du temps)
   ============================================================ */
.edt-wrapper{
  background:var(--white); padding:20px; border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm); border:1px solid var(--ink-100); overflow-x:auto;
}
.edt-table select{ width:100%; padding:7px; border-radius:8px; border:1px solid var(--ink-200); font-size:12.5px; }
.edt-hour{ font-weight:700; white-space:nowrap; font-size:12.5px; color:var(--ink-600); }

.edt-grid{
  display:grid;
  grid-template-columns:repeat(6, minmax(160px,1fr));
  gap:14px;
  overflow-x:auto;
}
.edt-grid .day{
  background:var(--white); border-radius:var(--radius); border:1px solid var(--ink-100);
  padding:14px; min-height:120px; box-shadow:var(--shadow-sm);
}
.edt-grid .day.today{ border-color:var(--gold-400); box-shadow:0 0 0 2px rgba(226,181,99,.35); }
.day-header{
  font-weight:800; font-size:13px; margin-bottom:10px;
  display:flex; align-items:center; justify-content:space-between;
  color:var(--ink-800);
}
.badge-today{ background:var(--gold-400); color:#3a2a08; font-size:10px; padding:3px 8px; border-radius:var(--radius-pill); font-weight:800; }
.badge-now{ display:inline-block; margin-top:6px; background:var(--danger); color:#fff; font-size:10px; padding:3px 8px; border-radius:var(--radius-pill); font-weight:800; }
.course{
  background:var(--ink-50); border-radius:10px; padding:10px 12px; margin-bottom:8px;
}
.course.now{ background:var(--brand-50); }
.course .time{ font-size:11px; color:var(--ink-500); font-weight:700; }
.course .matiere{ font-weight:800; font-size:13.5px; margin:2px 0; }
.edt-prof, .salle{ font-size:11.5px; color:var(--ink-500); }

.calendar-box{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px;
  background:var(--white); padding:16px; border-radius:var(--radius); margin-bottom:16px;
  border:1px solid var(--ink-100); box-shadow:var(--shadow-sm);
}
.calendar-box input[type="date"]{ width:auto; }
.day-badge{ background:var(--navy-900); color:#fff; padding:7px 15px; border-radius:var(--radius-pill); font-weight:700; font-size:12.5px; }

/* ============================================================
   CHAPITRES / GRID CARDS (cours)
   ============================================================ */
.grid-cards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(230px,1fr)); gap:14px; margin-top:12px; }
.grid-menu{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:16px; margin-top:10px; }
.menu-card{
  display:flex; align-items:center; justify-content:center; text-align:center;
  background:var(--white); border-radius:var(--radius-lg); padding:30px 16px;
  font-weight:700; font-size:14px; color:var(--ink-800);
  box-shadow:var(--shadow-sm); border:1px solid var(--ink-100); min-height:100px;
}
.menu-card:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); color:var(--brand-600); }

.chapters-list .classe-block{ margin-bottom:22px; }
.classe-title{ font-size:14.5px; margin-bottom:10px; color:var(--ink-700); }
.chapter{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--white); border:1px solid var(--ink-100); border-radius:var(--radius);
  padding:13px 16px; margin-bottom:8px; box-shadow:var(--shadow-sm);
}
.chapter .actions{ display:flex; gap:8px; }
.open-btn, .delete-btn{
  width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  background:var(--ink-100); color:var(--ink-700); font-size:14px;
}
.delete-btn{ background:var(--danger-bg); color:var(--danger); }
.open-btn:hover{ background:var(--brand-100); color:var(--brand-700); }
.delete-btn:hover{ background:#f5cdd3; }

.bloc-section{ margin-bottom:30px; }
.section-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.card-title{ font-weight:800; font-size:14.5px; margin-bottom:6px; }
.card-actions{ display:flex; gap:8px; margin-top:10px; }

.grid-dates{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.stats{ display:flex; gap:12px; flex-wrap:wrap; font-size:12px; color:var(--ink-500); font-weight:600; }

/* ============================================================
   NOTIFICATIONS (page complète)
   ============================================================ */
.notif-container{ display:flex; flex-direction:column; gap:18px; }
.notif-day-header{ font-size:12.5px; font-weight:800; color:var(--ink-500); text-transform:uppercase; letter-spacing:.03em; margin-bottom:10px; }
.notif-card{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:var(--white); border-radius:var(--radius); padding:14px 16px; margin-bottom:8px;
  border:1px solid var(--ink-100); border-left:4px solid var(--ink-300); box-shadow:var(--shadow-sm);
  transition:opacity .15s ease;
}
.notif-card.success{ border-left-color:var(--success); }
.notif-card.warning{ border-left-color:var(--warning); }
.notif-card.primary{ border-left-color:var(--brand-500); }
.notif-card.danger{ border-left-color:var(--danger); }
.notif-card.info{ border-left-color:var(--info); }
.notif-left{ flex:1; min-width:0; color:inherit; }
.notif-title{ font-weight:800; font-size:14px; color:var(--ink-900); }
.notif-msg{ font-size:12.75px; color:var(--ink-500); margin-top:2px; }
.notif-right{ display:flex; align-items:center; gap:10px; font-size:11.5px; color:var(--ink-400); white-space:nowrap; }
.notif-card-delete{ background:none; border:none; color:var(--ink-400); cursor:pointer; font-size:13px; }
.notif-card-delete:hover{ color:var(--danger); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress{ background:var(--ink-100); border-radius:var(--radius-pill); overflow:hidden; height:10px; margin:10px 0; }
.progress-bar{ height:100%; background:linear-gradient(90deg, var(--success), #37b57a); }

/* ============================================================
   LOCK BOX / WARNING BLOCKS
   ============================================================ */
.lock-box{
  background:var(--danger-bg); color:var(--danger);
  padding:14px 18px; border-radius:var(--radius); margin-bottom:16px;
  text-align:center; font-weight:700; font-size:13.5px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-body{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(circle at 12% 18%, rgba(203,154,66,.20), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(59,98,214,.28), transparent 45%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800) 60%, var(--navy-700));
  padding:24px;
}
.login-card{
  display:flex;
  width:100%; max-width:920px;
  background:var(--white);
  border-radius:26px;
  overflow:hidden;
  box-shadow:0 40px 80px -20px rgba(0,0,0,.5);
}
.login-left{
  flex:1;
  background:linear-gradient(165deg, var(--navy-900), var(--navy-700));
  color:#fff;
  padding:52px 40px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  gap:16px;
  position:relative;
}
.login-left::before{
  content:"";
  position:absolute; inset:0;
  background:radial-gradient(circle at 30% 20%, rgba(226,181,99,.18), transparent 55%);
}
.login-left img{ width:74px; height:74px; border-radius:20px; box-shadow:var(--shadow-lg); position:relative; }
.login-left h2{ color:#fff; font-size:21px; margin:6px 0 0; position:relative; }
.login-left p{ color:#b6bfdd; font-size:13.5px; max-width:260px; position:relative; }
.login-right{ flex:1; padding:52px 44px; display:flex; flex-direction:column; justify-content:center; }
.login-right h4{ font-size:24px; margin-bottom:22px; }
.login-right form{ display:flex; flex-direction:column; gap:14px; }
.login-right input{ padding:13px 15px; }
.login-options{ display:flex; align-items:center; justify-content:space-between; font-size:12.75px; margin:-2px 0 4px; }
.login-options label{ display:flex; align-items:center; gap:6px; font-weight:500; color:var(--ink-600); margin:0; }
.login-options input{ width:auto; }
.btn-login{
  background:linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color:#fff; border:none; padding:14px; border-radius:12px; font-weight:800; font-size:14.5px;
  box-shadow:0 12px 24px -8px rgba(43,79,194,.5);
}
.btn-login:hover{ filter:brightness(1.06); }
.login-footer-link{ display:block; margin-top:16px; text-align:center; font-size:13px; }

@media (max-width:760px){
  .login-card{ flex-direction:column; }
  .login-left{ padding:34px 24px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1080px){
  .edt-grid{ grid-template-columns:repeat(3, minmax(200px,1fr)); }
}

@media (max-width:900px){
  .sidebar{ transform:translateX(-100%); box-shadow:var(--shadow-lg); }
  .sidebar.open{ transform:translateX(0); }
  .sidebar-close{ display:block; }
  .main{ margin-left:0; }
  .hamburger{ display:flex; align-items:center; justify-content:center; }
  .topbar{ padding:0 16px; }
  .topbar-greeting{ display:none; }
  .content{ padding:18px 16px 50px; }
  .edt-grid{ grid-template-columns:repeat(2, minmax(180px,1fr)); }
}

@media (max-width:520px){
  .edt-grid{ grid-template-columns:1fr; }
  .cards{ grid-template-columns:1fr; }
  .topbar-title{ font-size:16px; }
}
