:root {
  --primary: #10b981; --bg: #f0fdf4; --card: #fff;
  --text: #1e293b; --muted: #64748b; --border: #e2e8f0;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); }
#app { min-height: 100vh; }

/* Topbar */
.topbar { background: #065f46; color: #fff; padding: 14px 20px;
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 100; }
.topbar h1 { font-size: 1rem; font-weight: 700; }
.topbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Bottom nav (mobile-first) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--border); display: flex; z-index: 100; }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 10px 4px; border: none; background: none; cursor: pointer;
  color: var(--muted); font-size: .65rem; font-weight: 600; transition: color .15s; }
.nav-btn i { font-size: 1.1rem; }
.nav-btn.active { color: var(--primary); }

/* Content */
.content { padding: 16px 16px 80px; }
.card { background: var(--card); border-radius: 16px; border: 1px solid var(--border);
  padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 99px; font-size: .72rem; font-weight: 600; }
.badge-present { background: #d1fae5; color: #065f46; }
.badge-absent  { background: #fee2e2; color: #991b1b; }
.badge-retard  { background: #fef3c7; color: #92400e; }
.badge-excuse  { background: #ede9fe; color: #5b21b6; }
.badge-blue    { background: #dbeafe; color: #1e40af; }
.badge-grey    { background: #f1f5f9; color: #475569; }

/* Planning day */
.day-header { font-size: .75rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 8px; }
.session-item { display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: #fff; border-radius: 12px;
  border: 1px solid var(--border); margin-bottom: 8px; }
.session-time { font-size: .75rem; font-weight: 700; color: var(--muted);
  min-width: 64px; text-align: center; }
.session-info { flex: 1; }
.session-title { font-size: .9rem; font-weight: 600; color: var(--text); }
.session-sub   { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.session-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Taux bar */
.taux-bar { height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.taux-fill { height: 100%; border-radius: 4px; transition: width .6s; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box { background: #fff; border-radius: 14px; border: 1px solid var(--border);
  padding: 14px; text-align: center; }
.stat-val { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-lbl { font-size: .72rem; color: var(--muted); margin-top: 4px; }

/* Toast */
#toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 20px; border-radius: 99px;
  font-size: .85rem; font-weight: 500; z-index: 9999; display: none; }

/* Forms */
.form-input { border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 14px;
  font-size: .9rem; color: var(--text); width: 100%; outline: none; font-family: inherit;
  background: #fff; transition: border-color .15s; }
.form-input:focus { border-color: var(--primary); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px;
  border-radius: 10px; border: none; cursor: pointer; font-size: .9rem; font-weight: 600;
  transition: all .15s; width: 100%; justify-content: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #f1f5f9; color: var(--text); }

@media (min-width: 640px) {
  .content { max-width: 600px; margin: 0 auto; }
}
