/* === Cahier des 108 heures — styles.css === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

:root {
  --accent:        #2563eb;
  --accent-strong: #1d4ed8;
  --accent-hover:  #1e40af;
  --accent-light:  #dbeafe;
  --accent-pale:   #eff6ff;
  --nav-active-bar:#60a5fa;
  --bg:            #eff6ff;
  --surface:       #ffffff;
  --border:        #bfdbfe;
  --muted:         #64748b;
  --muted-light:   #94a3b8;
  --text:          #1e293b;
  --danger:        #ef4444;
  --danger-bg:     #fef2f2;
  --success:       #22c55e;
  --success-bg:    #f0fdf4;
  --warning:       #f59e0b;
  --warning-bg:    #fffbeb;
  --sidebar-bg:    #0f172a;
  --sidebar-text:  #cbd5e1;
  --sidebar-hover: rgba(255,255,255,0.07);
  --sidebar-active:rgba(255,255,255,0.12);
  --radius:        10px;
  --shadow:        0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.12);
}

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px; color: var(--text); background: var(--bg) }
a { color: var(--accent); text-decoration: none }
button { cursor: pointer; font: inherit }
input, textarea, select { font: inherit; color: var(--text) }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px }
::-webkit-scrollbar-track { background: transparent }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px }

/* ─── Layout principal ────────────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-title strong { display: block; font-size: 0.95rem; color: #fff }
.sidebar-title small { font-size: 0.75rem; color: var(--muted-light); }

/* User card */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.user-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-details { flex: 1; min-width: 0 }
.user-details span { display: block; font-size: 0.85rem; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.user-logout-btn {
  background: none; border: none; color: var(--muted-light);
  font-size: 0.75rem; padding: 2px 0; cursor: pointer;
  text-decoration: underline;
}
.user-logout-btn:hover { color: #ef4444 }
.badge-admin {
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; letter-spacing: 0.05em; text-transform: uppercase;
}

/* Hours progress bars */
.sidebar-hours {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-hours-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin-bottom: 10px;
}
.hour-bar-item { margin-bottom: 8px }
.hour-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--sidebar-text);
  margin-bottom: 3px;
}
.hour-bar-value { color: var(--muted-light); font-size: 0.7rem }
.hour-bar-track {
  height: 5px;
  background: rgba(255,255,255,0.10);
  border-radius: 3px;
  overflow: hidden;
}
.hour-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.6s ease;
  min-width: 0;
  width: 0;
}
.hour-bar-total { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08) }
.hour-bar-total .hour-bar-label { font-weight: 600; color: #e2e8f0 }
.hour-bar-total .hour-bar-track { height: 7px }

/* Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 8px;
  flex: 1;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 0.875rem;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--sidebar-hover); color: #fff }
.nav-btn.active {
  background: var(--sidebar-active);
  color: #fff;
  border-left: 3px solid var(--nav-active-bar);
  padding-left: 7px;
}
.nav-btn--admin { margin-top: auto; color: #93c5fd }
.nav-btn--admin.active { border-left-color: #93c5fd }

/* ─── Main content ────────────────────────────────────────────────────────── */
.main-content { padding: 24px; overflow-y: auto }

/* Views */
.view { display: none }
.view.active { display: block }

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.view-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--text) }
.view-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }

/* ─── Boutons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent); color: #fff;
  border: none; padding: 8px 16px; border-radius: 8px;
  font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-strong) }
.btn-secondary {
  background: var(--surface); color: var(--accent);
  border: 1.5px solid var(--accent); padding: 7px 15px;
  border-radius: 8px; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: background 0.15s;
}
.btn-secondary:hover { background: var(--accent-light) }
.btn-danger {
  background: var(--danger-bg); color: var(--danger);
  border: 1.5px solid #fecaca; padding: 7px 15px;
  border-radius: 8px; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: background 0.15s;
}
.btn-danger:hover { background: #fee2e2 }
.btn-sm {
  padding: 4px 10px; font-size: 0.8rem; border-radius: 6px;
}
.btn-icon {
  background: none; border: none; padding: 4px 6px;
  font-size: 1rem; color: var(--muted); cursor: pointer;
  border-radius: 6px; transition: background 0.15s;
}
.btn-icon:hover { background: var(--accent-light); color: var(--accent) }
.btn-icon.danger:hover { background: var(--danger-bg); color: var(--danger) }
.print-btn {
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border); padding: 7px 12px;
  border-radius: 8px; font-size: 0.8rem; cursor: pointer;
  transition: background 0.15s;
}
.print-btn:hover { background: var(--accent-light); color: var(--accent) }
.btn-sync {
  background: var(--accent-pale); color: var(--accent);
  border: 1.5px solid var(--accent-light); padding: 7px 12px;
  border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.btn-sync:hover { background: var(--accent-light) }
.primary-button {
  background: var(--accent); color: #fff;
  border: none; padding: 10px 20px; border-radius: 8px;
  font-weight: 600; cursor: pointer; width: 100%;
}
.primary-button:hover { background: var(--accent-strong) }

/* ─── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.card-title { font-weight: 600; font-size: 1rem; color: var(--text) }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-top: 4px }
.card-body { margin-top: 10px }
.card-actions { display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end }

/* Badges */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
}
.badge-blue { background: var(--accent-light); color: var(--accent) }
.badge-green { background: #dcfce7; color: #166534 }
.badge-purple { background: #ede9fe; color: #6d28d9 }
.badge-orange { background: #ffedd5; color: #9a3412 }
.badge-gray { background: #f1f5f9; color: var(--muted) }
.badge-cj { background: #ecfdf5; color: #059669; font-size: 0.65rem }

/* ─── Dashboard ───────────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.dashboard-card .dc-label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em }
.dashboard-card .dc-hours { font-size: 1.6rem; font-weight: 700; color: var(--text); margin: 6px 0 2px }
.dashboard-card .dc-quota { font-size: 0.8rem; color: var(--muted) }
.dashboard-card .dc-bar-track { height: 6px; background: var(--accent-light); border-radius: 3px; overflow: hidden; margin-top: 10px }
.dashboard-card .dc-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.6s }
.dashboard-card.over .dc-bar-fill { background: var(--success) }
.dashboard-card.warn .dc-bar-fill { background: var(--warning) }

.total-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.total-card .tc-label { font-size: 0.8rem; opacity: 0.85 }
.total-card .tc-hours { font-size: 2rem; font-weight: 800 }
.total-card .tc-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,0.25); border-radius: 4px; overflow: hidden }
.total-card .tc-bar-fill { height: 100%; background: rgba(255,255,255,0.9); border-radius: 4px; transition: width 0.6s }

/* ─── APC Layout ──────────────────────────────────────────────────────────── */
.apc-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.apc-blocs-panel { display: flex; flex-direction: column; gap: 8px }
.bloc-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bloc-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light) }
.bloc-card.active { border-color: var(--accent); background: var(--accent-pale) }
.bloc-card .bloc-title { font-weight: 600; font-size: 0.9rem }
.bloc-card .bloc-meta { font-size: 0.75rem; color: var(--muted); margin-top: 3px }
.bloc-card .bloc-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px }

.apc-detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.apc-detail-empty { color: var(--muted); font-size: 0.9rem; padding: 20px 0 }

.sessions-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 }
.session-card {
  background: var(--accent-pale);
  border: 1px solid var(--accent-light);
  border-radius: 8px;
  padding: 12px;
}
.session-card .sc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px }
.session-card .sc-date { font-weight: 600; font-size: 0.875rem }
.session-card .sc-duration { font-size: 0.8rem; color: var(--accent) }
.session-card .sc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px }
.chip {
  background: var(--accent-light); color: var(--accent);
  font-size: 0.72rem; padding: 2px 8px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip.green { background: #dcfce7; color: #166534 }
.chip.remove { cursor: pointer; }
.chip.remove::after { content: '×'; margin-left: 4px; opacity: 0.6 }

/* ─── Notes ───────────────────────────────────────────────────────────────── */
.notes-grid { display: flex; flex-direction: column; gap: 14px }
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.note-card-header:hover { background: var(--accent-pale) }
.note-title-input {
  background: transparent; border: none; font-weight: 600;
  font-size: 1rem; color: var(--text); flex: 1; padding: 0;
  outline: none; min-width: 0;
}
.note-card-body { padding: 0 16px 16px; display: none }
.note-card.open .note-card-body { display: block }
.note-textarea {
  width: 100%; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  resize: vertical; min-height: 80px;
  font-size: 0.875rem; background: var(--bg);
  outline: none;
}
.note-textarea:focus { border-color: var(--accent); background: #fff }

.todo-section { margin-top: 12px }
.todo-section h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 8px }
.todo-list { display: flex; flex-direction: column; gap: 5px }
.todo-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  background: var(--bg);
}
.todo-item input[type=checkbox] { cursor: pointer; width: 15px; height: 15px; accent-color: var(--accent) }
.todo-item.done span { text-decoration: line-through; color: var(--muted) }
.todo-item span { flex: 1; font-size: 0.875rem }
.todo-add-row { display: flex; gap: 6px; margin-top: 6px }
.todo-input {
  flex: 1; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; font-size: 0.875rem;
}
.todo-input:focus { border-color: var(--accent); outline: none }

/* ─── Forms (modals) ──────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text) }
.form-group input, .form-group textarea, .form-group select {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 0.9rem; background: var(--bg);
  width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent); outline: none; background: #fff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px }

/* ─── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-overlay.hidden { display: none }
.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: modalIn 0.18s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.97) } to { opacity: 1; transform: none } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700 }
.modal-close-btn {
  background: none; border: none; font-size: 1.4rem; line-height: 1;
  color: var(--muted); cursor: pointer; border-radius: 6px; padding: 2px 6px;
}
.modal-close-btn:hover { background: var(--accent-light); color: var(--accent) }
.modal-body { padding: 20px }

/* ─── Table admin ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem }
thead tr { background: var(--accent-pale) }
th { padding: 10px 14px; font-weight: 600; color: var(--accent); text-align: left; border-bottom: 2px solid var(--border) }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top }
tr:hover td { background: var(--accent-pale) }
.count-badge { background: var(--accent); color: #fff; border-radius: 12px; padding: 2px 8px; font-size: 0.75rem; font-weight: 700 }

/* ─── Mobile header ───────────────────────────────────────────────────────── */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--sidebar-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff }
.connexion-pill {
  background: rgba(255,255,255,0.12); color: #e2e8f0;
  border: none; padding: 6px 12px; border-radius: 20px;
  font-size: 0.8rem; cursor: pointer;
}
.connexion-pill:hover { background: rgba(255,255,255,0.2) }

/* ─── Mobile nav ──────────────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  overflow-x: auto;
  padding: 8px 12px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none }
.mobile-nav .nav-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--sidebar-text);
}
.mobile-nav .nav-btn.active {
  background: var(--accent);
  color: #fff;
  border-left: none;
  padding-left: 14px;
}

/* ─── Utilitaires ─────────────────────────────────────────────────────────── */
.hidden { display: none !important }
.muted { color: var(--muted); font-size: 0.875rem }
.empty-state { color: var(--muted); font-size: 0.9rem; padding: 32px; text-align: center }
.empty-state .empty-icon { font-size: 2.5rem; display: block; margin-bottom: 10px }
.danger-text { color: var(--danger); font-size: 0.85rem }
.success-text { color: #16a34a; font-size: 0.85rem }
.info-box { background: var(--accent-light); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 0.875rem; color: var(--accent-hover); margin-bottom: 14px }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0 }
.section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 12px; font-weight: 600 }

/* ─── Login page ──────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 20px;
}
.login-panel {
  background: var(--surface);
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%; max-width: 380px;
  box-shadow: 0 8px 32px rgba(37,99,235,0.12);
  display: flex; flex-direction: column; gap: 18px;
}
.login-brand { display: flex; align-items: center; gap: 14px }
.login-brand strong { display: block; font-size: 1.05rem; color: var(--text) }
.login-brand small { font-size: 0.8rem; color: var(--muted) }
.google-signin-button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.google-signin-button:hover { background: var(--accent-pale); border-color: var(--accent) }
.login-toggle {
  background: none; border: none; color: var(--muted);
  font-size: 0.85rem; cursor: pointer; text-decoration: underline; text-align: center;
}
.password-login-form { display: flex; flex-direction: column; gap: 12px }
.password-login-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; font-weight: 600 }
.password-login-form input { border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.password-login-form input:focus { border-color: var(--accent); outline: none }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr }
  .sidebar { display: none }
  .mobile-header { display: flex }
  .mobile-nav { display: flex }
  .main-content { padding: 16px }
  .apc-layout { grid-template-columns: 1fr }
  .form-row { grid-template-columns: 1fr }
  .dashboard-grid { grid-template-columns: 1fr 1fr }
}
@media (max-width: 540px) {
  .dashboard-grid { grid-template-columns: 1fr }
  .view-header { flex-direction: column; align-items: flex-start }
  .total-card { flex-direction: column; gap: 12px }
}

/* ─── Recorder Panel ─────────────────────────────────────────────────────── */
.recorder-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 380px; max-width: calc(100vw - 48px);
  background: #0f172a;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  z-index: 2000;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.recorder-panel.hidden { display: none }

.recorder-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.recorder-status {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: #e2e8f0;
}
.recorder-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444;
  animation: recPulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1) }
  50% { opacity: 0.35; transform: scale(0.75) }
}
#recorderTimer {
  font-family: monospace; font-size: 0.82rem; color: #94a3b8;
}
.btn-stop-recording {
  background: #ef4444; color: #fff; border: none;
  padding: 6px 13px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s; white-space: nowrap;
}
.btn-stop-recording:hover { background: #dc2626 }

.recorder-transcript-wrap {
  padding: 12px 16px;
  min-height: 70px; max-height: 220px; overflow-y: auto;
}
.recorder-placeholder { font-size: 0.78rem; color: #475569; font-style: italic }
.recorder-text { font-size: 0.84rem; color: #cbd5e1; line-height: 1.65; white-space: pre-wrap }
.recorder-processing { font-size: 0.78rem; color: #60a5fa; margin-top: 6px }

.recorder-footer {
  display: flex; gap: 8px; padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.btn-rec-secondary {
  flex: 1; background: rgba(255,255,255,0.08); color: #cbd5e1;
  border: none; padding: 7px; border-radius: 8px;
  font-size: 0.8rem; cursor: pointer; transition: background 0.15s;
}
.btn-rec-secondary:hover { background: rgba(255,255,255,0.14) }
.btn-rec-primary {
  flex: 2; background: var(--accent); color: #fff;
  border: none; padding: 7px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.btn-rec-primary:hover { background: var(--accent-strong) }

/* ─── AI toolbar dans les formulaires ────────────────────────────────────── */
.ai-toolbar {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.btn-ai-record {
  background: #1e293b; color: #e2e8f0;
  border: 1px solid #334155;
  padding: 7px 12px; border-radius: 8px;
  font-size: 0.8rem; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ai-record:hover { background: #ef4444; border-color: #ef4444; color: #fff }
.btn-ai-record.recording { background: #ef4444; border-color: #ef4444; color: #fff }
.btn-ai-generate {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff; border: none;
  padding: 7px 12px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: opacity 0.15s;
}
.btn-ai-generate:hover { opacity: 0.88 }
.btn-ai-generate:disabled { opacity: 0.5; cursor: wait }
.ai-hint {
  font-size: 0.75rem; color: var(--muted); font-style: italic;
  margin-top: 5px;
}

/* ─── Suggestions compétences SC (APC) ───────────────────────────────────── */
.sc-comp-suggestions {
  margin-top: 8px;
  padding: 10px 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}
.sc-comp-suggestions small { display: block; margin-bottom: 8px; color: #0369a1; font-weight: 600 }
.comp-chips-row { display: flex; flex-wrap: wrap; gap: 6px }
.chip-btn {
  background: #e0f2fe; color: #0369a1;
  border: 1px solid #7dd3fc;
  padding: 4px 10px; border-radius: 20px;
  font-size: 0.78rem; cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  line-height: 1.4;
}
.chip-btn:hover { background: #0369a1; color: #fff; border-color: #0369a1 }
.chip-btn--added { opacity: 0.35; cursor: default; background: #dcfce7; border-color: #86efac; color: #166534 }

/* ─── Bannière RGPD ──────────────────────────────────────────────────────── */
.rgpd-banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: #f0fdf4; border: 1px solid #86efac;
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 16px;
}
.rgpd-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4 }
.rgpd-banner strong { display: block; color: #166534; font-size: 0.875rem; margin-bottom: 4px }
.rgpd-banner p, .rgpd-banner ul { font-size: 0.82rem; color: #15803d; margin: 0 }
.rgpd-form-note {
  font-size: 0.8rem; color: #166534; background: #f0fdf4;
  border: 1px solid #86efac; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 14px;
}

/* ─── Toolbar IA dans les Notes ──────────────────────────────────────────── */
.note-ai-toolbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.btn-note-tool {
  background: var(--surface-2, #f1f5f9); color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 20px;
  font-size: 0.78rem; cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-note-tool:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent) }
.btn-note-tool.recording { background: #ef4444; color: #fff; border-color: #ef4444 }
.btn-note-ai {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff; border-color: transparent;
}
.btn-note-ai:hover { opacity: 0.88; color: #fff }
.btn-note-ai:disabled { opacity: 0.5; cursor: wait }

/* ─── Guide d'utilisation ────────────────────────────────────────────────── */
.guide-wrap { max-width: 780px; display: flex; flex-direction: column; gap: 28px }
.guide-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 24px;
}
.guide-section p { font-size: 0.9rem; color: var(--text); line-height: 1.7; margin: 0 0 10px }
.guide-section p:last-child { margin-bottom: 0 }
.guide-h2 {
  font-size: 1.05rem; font-weight: 700;
  color: var(--accent); margin: 0 0 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.guide-quotas { display: flex; flex-direction: column; gap: 6px; margin-top: 12px }
.guide-quota-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.875rem;
}
.guide-quota-h {
  background: var(--accent-light); color: var(--accent);
  font-weight: 700; font-size: 0.85rem;
  padding: 3px 10px; border-radius: 20px;
  min-width: 36px; text-align: center; flex-shrink: 0;
}
.guide-tabs-list { display: flex; flex-direction: column; gap: 10px }
.guide-tab-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.875rem; line-height: 1.55;
}
.guide-tab-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; text-align: center }
.guide-ol { padding-left: 20px; font-size: 0.875rem; line-height: 1.7; margin: 10px 0 0 }
.guide-ol li { margin-bottom: 6px }
.guide-ai-list { display: flex; flex-direction: column; gap: 14px; margin: 10px 0 }
.guide-ai-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.875rem; line-height: 1.55;
}
.guide-ai-icon { font-size: 1.3rem; flex-shrink: 0; width: 26px; text-align: center }
.guide-ul { padding-left: 20px; font-size: 0.875rem; line-height: 1.7; margin: 10px 0 0 }
.guide-ul li { margin-bottom: 6px }

/* ─── Onglet Élèves ──────────────────────────────────────────────────────── */
.total-meta {
  font-size: 0.82rem; color: var(--muted);
  margin-bottom: 16px; font-style: italic;
}
.eleves-group { margin-bottom: 24px }
.eleves-group-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.eleves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.eleve-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  transition: box-shadow 0.15s;
}
.eleve-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07) }
.eleve-initial {
  width: 36px; height: 36px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.eleve-info { flex: 1; min-width: 0 }
.eleve-info strong { font-size: 0.9rem }
.eleve-notes {
  font-size: 0.75rem; color: var(--muted);
  margin-top: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.eleve-actions {
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}

/* ─── Import blocs CJ ────────────────────────────────────────────────────── */
.import-blocs-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 360px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px;
}
.import-bloc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  transition: background 0.12s;
}
.import-bloc-row:hover { background: var(--accent-light) }
.import-bloc-row input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--accent) }
.import-bloc-info { display: flex; flex-direction: column; gap: 2px }
.import-bloc-info strong { font-size: 0.875rem }
.import-bloc-info small { font-size: 0.75rem }

/* ─── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .sidebar, .mobile-header, .mobile-nav, .view-actions, .btn-primary, .btn-sync,
  .print-btn, .btn-icon, .modal-overlay, .card-actions { display: none !important }
  .view { display: block !important }
  .app-shell { grid-template-columns: 1fr }
  .main-content { padding: 0 }
  body { background: #fff }
}
