/* =============================================================================
   CielBoard — Feuille de style principale
   Charte graphique BTS CIEL
   Police : Inter (locale)
   ============================================================================= */

/* ----- Variables ----------------------------------------------------------- */
:root {
  /* Palette espace étudiant */
  --blue-primary:   #1A73E8;
  --blue-secondary: #E8F0FE;
  --bg-page:        #F8F9FA;
  --text-main:      #202124;
  --text-muted:     #5F6368;
  --border:         #DADCE0;

  /* Palette espace enseignant / admin */
  --orange-accent:  #F97316;
  --orange-bg:      #FFF7ED;
  --orange-dark:    #C2500A;

  /* Couleurs système (réservées) */
  --red-alert:      #EF4444;
  --green-done:     #22C55E;
  --yellow-warn:    #EAB308;

  /* Utilitaires */
  --radius:         8px;
  --radius-sm:      4px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --shadow-md:      0 4px 12px rgba(0,0,0,.10);
  --transition:     .15s ease;

  /* Navbar heights */
  --navbar-h:       56px;
}

/* ----- Reset / Base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .9375rem;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

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

/* =============================================================================
   NAVIGATION
   ============================================================================= */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--navbar-h);
  display: flex; align-items: center;
  box-shadow: var(--shadow-sm);
}
.nav-etudiant  { background: var(--blue-primary); }
.nav-enseignant { background: var(--orange-accent); }

.navbar-inner {
  width: 100%; max-width: 1400px;
  margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}

.navbar-brand {
  display: flex; align-items: center; gap: .5rem;
  color: #fff; font-weight: 700; font-size: 1.1rem;
  text-decoration: none; white-space: nowrap;
}
.navbar-brand:hover { text-decoration: none; opacity: .9; }

.navbar-nav {
  display: flex; align-items: center; gap: .25rem;
  flex: 1;
}

.nav-link {
  color: rgba(255,255,255,.85);
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(255,255,255,.22); color: #fff; font-weight: 600; }
.nav-link.disabled { opacity: .45; cursor: not-allowed; }

/* User menu */
.navbar-user { margin-left: auto; position: relative; }

.user-menu-btn {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.15);
  border: none; border-radius: var(--radius-sm);
  color: #fff; cursor: pointer;
  padding: .35rem .7rem;
  font-size: .875rem;
  transition: background var(--transition);
}
.user-menu-btn:hover { background: rgba(255,255,255,.25); }

.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
  color: #fff;
  flex-shrink: 0;
}
.user-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown {
  display: none;
  position: absolute; top: calc(100% + .5rem); right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  min-width: 220px; z-index: 200;
}
.user-dropdown.open { display: block; }

.dropdown-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .2rem;
}
.dropdown-item {
  display: block;
  padding: .55rem 1rem;
  color: var(--text-main); font-size: .875rem;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--blue-secondary); text-decoration: none; }
.dropdown-item-danger { color: var(--red-alert); }
.dropdown-item-danger:hover { background: #fef2f2; }
.dropdown-divider { border-top: 1px solid var(--border); margin: .25rem 0; }

/* =============================================================================
   FLASH MESSAGES
   ============================================================================= */
.flash-container {
  position: fixed; top: calc(var(--navbar-h) + .75rem); right: 1rem;
  z-index: 300; display: flex; flex-direction: column; gap: .5rem;
  max-width: 400px;
}
.flash {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  box-shadow: var(--shadow-md);
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity:0; } }

.flash-succes  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.flash-erreur  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash-info    { background: var(--blue-secondary); border: 1px solid #93c5fd; color: #1e40af; }
.flash-avert   { background: #fefce8; border: 1px solid #fde68a; color: #92400e; }
.flash-close   { background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: .6; line-height: 1; padding: 0; }
.flash-close:hover { opacity: 1; }

/* Toast rappel journal */
.toast-reminder {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 400;
  display: flex; align-items: center; gap: .875rem;
  background: #fff; border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius); padding: .875rem 1rem;
  box-shadow: var(--shadow-md); max-width: 360px;
  animation: toastIn .3s ease;
}
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } }
.toast-reminder-icon { font-size: 1.4rem; flex-shrink: 0; }
.toast-reminder-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.toast-reminder-text strong { font-size: .9rem; color: #92400e; }
.toast-reminder-text span { font-size: .8125rem; color: var(--text-muted); }
.toast-reminder-btn { white-space: nowrap; font-size: .8125rem; font-weight: 600; color: #fff; background: #f59e0b; border: none; border-radius: var(--radius-sm); padding: .35rem .75rem; text-decoration: none; cursor: pointer; }
.toast-reminder-btn:hover { background: #d97706; }
.toast-reminder-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; opacity: .5; line-height: 1; padding: 0; flex-shrink: 0; }
.toast-reminder-close:hover { opacity: 1; }

/* =============================================================================
   LAYOUT
   ============================================================================= */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: .75rem 1.5rem;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  font-size: .8rem; color: var(--text-muted);
}
.dev-badge {
  background: #fde68a; color: #92400e;
  padding: .1rem .4rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .7rem;
}

/* Page header */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Grille */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* =============================================================================
   CARDS
   ============================================================================= */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.card-header-flex {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: 1rem;
}
.card-header-flex .card-title { margin-bottom: 0; }
.card-footer { border-top: 1px solid var(--border); padding-top: .75rem; margin-top: .75rem; }

/* =============================================================================
   BOUTONS
   ============================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary   { background: var(--blue-primary);  color: #fff; }
.btn-secondary { background: var(--border);         color: var(--text-main); }
.btn-outline   { background: transparent; border: 1.5px solid var(--blue-primary); color: var(--blue-primary); }
.btn-danger    { background: var(--red-alert);      color: #fff; }
.btn-outline-teacher { background: transparent; border: 1.5px solid var(--orange-accent); color: var(--orange-accent); }

.btn-sm  { padding: .3rem .65rem; font-size: .8rem; }
.btn-lg  { padding: .7rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* =============================================================================
   FORMULAIRES
   ============================================================================= */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; color: var(--text-main); }
.form-label-inline { font-size: .875rem; font-weight: 500; color: var(--text-main); }

.form-input,
.form-control,
.form-select,
.form-textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  font-family: inherit;
  color: var(--text-main);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-control:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}
.form-input-sm { padding: .3rem .5rem; font-size: .875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; }
.form-textarea { min-height: 120px; resize: vertical; }
.form-actions { display: flex; gap: .5rem; margin-top: 1.25rem; flex-wrap: wrap; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

.inline-form { display: flex; align-items: center; gap: .5rem; }

/* Mot de passe */
.input-password-wrapper { position: relative; }
.input-password-wrapper .form-input { padding-right: 2.5rem; }
.toggle-password {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: .2rem;
}

/* Color picker */
.color-picker-form { }
.color-preview-wrapper { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
.color-preview { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; }
.color-input { width: 48px; height: 36px; padding: 0; border: none; cursor: pointer; border-radius: var(--radius-sm); }

/* =============================================================================
   ALERTES
   ============================================================================= */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1rem;
}
.alert p { margin: 0; }
.alert p + p { margin-top: .25rem; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info    { background: var(--blue-secondary); border: 1px solid #93c5fd; color: #1e40af; }
.alert-warning { background: #fefce8; border: 1px solid #fde68a; color: #92400e; }

/* =============================================================================
   BADGES
   ============================================================================= */
.badge {
  display: inline-flex; align-items: center;
  padding: .15rem .5rem;
  border-radius: 99px;
  font-size: .75rem; font-weight: 600;
  white-space: nowrap;
  background: var(--blue-secondary); color: var(--blue-primary);
}
.badge-alert    { background: #fef2f2; color: var(--red-alert); }
.badge-green    { background: #dcfce7; color: #166534; }
.badge-gray     { background: var(--bg-page); color: var(--text-muted); }
.role-badge     { background: var(--bg-page); color: var(--text-muted); font-size: .7rem; font-weight: 500; padding: .1rem .4rem; border-radius: 99px; }
.hidden         { display: none !important; }

/* Priorité Kanban */
.badge-priority        { }
.badge-priority-high   { background: #fef2f2; color: var(--red-alert); }
.badge-priority-normal { background: var(--blue-secondary); color: var(--blue-primary); }
.badge-priority-low    { background: #f9fafb; color: var(--text-muted); }

/* =============================================================================
   STATS
   ============================================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card-success { border-top: 3px solid var(--green-done); }
.stat-card-warning { border-top: 3px solid var(--yellow-warn); }
.stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--blue-primary); }
.stat-label { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }

/* Stat mini (tableau de bord enseignant) */
.group-stats { display: flex; gap: .75rem; margin: .75rem 0; }
.stat-mini { text-align: center; flex: 1; padding: .4rem; background: var(--bg-page); border-radius: var(--radius-sm); }
.stat-mini-val { display: block; font-weight: 700; font-size: 1.1rem; }
.stat-mini-label { font-size: .7rem; color: var(--text-muted); }
.stat-mini-warning .stat-mini-val { color: #d97706; }
.stat-mini-success .stat-mini-val { color: var(--green-done); }

/* =============================================================================
   PROGRESS BAR
   ============================================================================= */
.progress-bar {
  height: 8px; background: var(--bg-page);
  border-radius: 99px; overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 99px; transition: width .4s ease; min-width: 2px; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; margin-bottom: .25rem; color: var(--text-muted); }

.progress-bar-sm { height: 4px; background: var(--bg-page); border-radius: 99px; overflow: hidden; flex: 1; }

.progress-section { margin: .75rem 0; }

/* =============================================================================
   LISTES
   ============================================================================= */
.task-list { display: flex; flex-direction: column; gap: .5rem; }
.task-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem;
  border-left: 3px solid var(--border);
  background: var(--bg-page);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .875rem;
}
.task-num { color: var(--text-muted); font-size: .8rem; white-space: nowrap; }
.task-title { flex: 1; font-weight: 500; }
.task-info { flex: 1; display: flex; flex-direction: column; gap: .15rem; }

.member-list { display: flex; flex-direction: column; gap: .5rem; }
.member-item { display: flex; align-items: center; gap: .75rem; }
.member-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.member-name { font-size: .9rem; }
.member-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* Info list (profil) */
.info-list { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem 1rem; font-size: .9rem; }
.info-list dt { color: var(--text-muted); font-weight: 500; }
.info-list dd { color: var(--text-main); }

/* =============================================================================
   QUICK LINKS (dashboard)
   ============================================================================= */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.quick-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .75rem;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main); font-size: .875rem;
  transition: background var(--transition), border-color var(--transition);
}
.quick-link:hover {
  background: var(--blue-secondary);
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  text-decoration: none;
}
.quick-link svg { color: var(--blue-primary); flex-shrink: 0; }

/* =============================================================================
   TABLEAU DE BORD ENSEIGNANT — Groups grid
   ============================================================================= */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.group-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: .75rem;
}
.group-card-inactive { border-left: 4px solid var(--red-alert); }
.group-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.group-name { font-size: 1rem; font-weight: 600; }
.group-membres { font-size: .8rem; color: var(--text-muted); }
.group-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Dropdown inline (tableau de bord enseignant) */
.dropdown-inline { position: relative; }
.dropdown-menu-list {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 50;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 180px;
}
.dropdown-menu-list.open { display: block; }
.dropdown-menu-list .dropdown-item { padding: .45rem .75rem; font-size: .85rem; }

/* =============================================================================
   PAGE LOGIN
   ============================================================================= */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg-page);
}
.login-wrapper { width: 100%; max-width: 420px; padding: 1.5rem; }
.login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.login-header { text-align: center; margin-bottom: 1.75rem; }
.login-logo { display: flex; justify-content: center; margin-bottom: .75rem; }
.login-title { font-size: 1.75rem; font-weight: 700; color: var(--text-main); }
.login-subtitle { color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }
.login-form .btn { margin-top: .5rem; }
.login-hint { text-align: center; font-size: .8rem; color: var(--text-muted); margin-top: 1.25rem; }

/* =============================================================================
   KANBAN
   ============================================================================= */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}
.kanban-column {
  background: var(--bg-page);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 400px;
}
.kanban-col-header {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
}
.kanban-col-title { font-weight: 600; font-size: .9rem; }
.kanban-col-count { background: var(--border); color: var(--text-muted); padding: .1rem .45rem; border-radius: 99px; font-size: .75rem; }

.kanban-cards { padding: .75rem; display: flex; flex-direction: column; gap: .5rem; min-height: 300px; }

/* Carte Kanban — vue compacte */
.kanban-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-left: 4px solid currentColor;
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  cursor: pointer;
  display: flex; align-items: center; gap: .5rem;
  transition: box-shadow var(--transition), transform var(--transition);
  font-size: .85rem;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.ui-sortable-helper { box-shadow: var(--shadow-md); transform: rotate(1.5deg); }
.kanban-card-num { color: var(--text-muted); font-size: .78rem; white-space: nowrap; }
.kanban-card-title { flex: 1; font-weight: 500; }
.kanban-col-termine .kanban-card { border-left-color: var(--green-done) !important; }

/* Priorité : épaisseur de bordure */
.kanban-card[data-priorite="haute"]  { border-left-width: 5px; }
.kanban-card[data-priorite="basse"]  { border-left-width: 2px; }

/* =============================================================================
   GANTT
   ============================================================================= */
/* Conteneur principal */
.gantt-outer {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
/* Colonne labels (gauche) */
.gantt-labels-col {
  flex-shrink: 0; width: 220px;
  border-right: 1px solid var(--border);
  background: #fff;
}
.gantt-label-header {
  height: 40px; padding: 0 .75rem;
  display: flex; align-items: center;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
}
.gantt-label-row {
  height: 42px; padding: 0 .75rem;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Colonne graphique (droite, scrollable) */
.gantt-chart-col { flex: 1; overflow-x: auto; overflow-y: hidden; min-width: 0; }
.gantt-inner { position: relative; }
/* En-tête semaines */
.gantt-weeks-header {
  height: 40px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch;
}
.gantt-week-cell {
  flex-shrink: 0; width: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-right: 1px solid var(--border);
  font-size: .72rem; font-weight: 500; color: var(--text-muted);
  line-height: 1.2; text-align: center; cursor: default;
}
.gantt-week-cell.gantt-week-today {
  background: rgba(26,115,232,.08);
  color: var(--blue-primary); font-weight: 700;
}
.gantt-week-month { font-size: .6rem; color: #b0b0b0; }
/* Corps du gantt */
.gantt-body { position: relative; }
/* Calque vacances (derrière les barres) */
.gantt-holidays-layer {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
}
.gantt-holiday-band {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 3px; overflow: hidden;
}
.gantt-holiday-label {
  font-size: .6rem; color: #aaa;
  writing-mode: vertical-lr; text-orientation: mixed;
  transform: rotate(180deg); white-space: nowrap;
}
/* Ligne aujourd'hui */
.gantt-today-line {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: var(--blue-primary); opacity: .45;
  z-index: 3; pointer-events: none; display: none;
}
/* Lignes de tâches */
.gantt-row {
  height: 42px; position: relative;
  border-bottom: 1px solid var(--border);
  z-index: 1; background: transparent;
}
.gantt-row:hover { background: rgba(248,250,252,.88); }
.gantt-week-sep {
  position: absolute; top: 0; bottom: 0;
  width: 1px; background: #f0f0f0; pointer-events: none;
}
/* Barres */
.gantt-bar {
  position: absolute; z-index: 2;
  height: 22px; top: 50%; transform: translateY(-50%);
  border-radius: 3px;
  display: flex; align-items: center;
  padding: 0 6px;
  cursor: pointer;
  transition: opacity var(--transition);
  min-width: 4px; overflow: hidden;
}
.gantt-bar:hover { opacity: .82; }
.gantt-bar-text {
  font-size: .72rem; color: #fff; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  position: relative; z-index: 1;
}
.gantt-bar-progress {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,.15); border-radius: 3px 0 0 3px;
}
/* Légende membres (gantt groupe) */
.gantt-legend {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  margin-top: 1rem; font-size: .8rem;
}
.gantt-legend-item { display: flex; align-items: center; gap: .4rem; }
.gantt-legend-dot { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }

/* =============================================================================
   JOURNAL
   ============================================================================= */
.journal-entry {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.journal-entry-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: 1rem;
}
.journal-entry-date { font-weight: 600; }
.journal-entry-actions { display: flex; gap: .4rem; }
.journal-entry-content { font-size: .9375rem; line-height: 1.7; display: flex; flex-direction: column; gap: .75rem; }
.journal-section { padding: .875rem 1rem; border-radius: var(--radius-sm); background: var(--bg-page); border-left: 3px solid var(--blue-primary); }
.journal-section--warn { border-left-color: #d97706; }
.journal-section--next { border-left-color: #059669; }
.journal-section-label { display: block; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--blue-primary); margin-bottom: .5rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
.journal-section-label--warn { color: #d97706; }
.journal-section-label--next { color: #059669; }
.journal-section-body { white-space: pre-wrap; font-size: .9375rem; line-height: 1.7; }
.journal-comment-form { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.btn-xs { padding: .15rem .5rem; font-size: .75rem; }
.journal-comment {
  margin-top: .75rem; padding-top: .75rem;
  border-top: 1px solid var(--border);
  font-size: .875rem;
}
.journal-comment-author { font-weight: 600; color: var(--orange-accent); }
.journal-comment-date { font-size: .75rem; color: var(--text-muted); }

/* =============================================================================
   ADMIN — Tableaux
   ============================================================================= */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: .875rem;
}
.data-table th {
  text-align: left; padding: .65rem .9rem;
  background: var(--bg-page);
  border-bottom: 2px solid var(--border);
  font-weight: 600; color: var(--text-muted);
  white-space: nowrap;
}
.data-table td {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-page); }

/* Status dot */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: .4rem;
}
.status-dot-active   { background: var(--green-done); }
.status-dot-inactive { background: var(--border); }

/* =============================================================================
   EMPTY STATE
   ============================================================================= */
.empty-state {
  text-align: center; padding: 2rem 1rem;
  color: var(--text-muted); font-size: .9rem;
}

/* =============================================================================
   MODAL
   ============================================================================= */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.45);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } }
.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-weight: 600; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 1.4rem; line-height: 1; padding: .2rem;
}
.modal-close:hover { color: var(--text-main); }
.modal-body    { padding: 1.25rem; }
.modal-footer  { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; justify-content: flex-end; }

/* =============================================================================
   UTILITAIRES
   ============================================================================= */
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: .875rem; }
.text-xs      { font-size: .8rem; }
.text-center  { text-align: center; }
.font-medium  { font-weight: 500; }
.font-bold    { font-weight: 700; }
.mt-1  { margin-top: .25rem; }
.mt-2  { margin-top: .5rem; }
.mt-4  { margin-top: 1rem; }
.mb-4  { margin-bottom: 1rem; }
.d-flex { display: flex; }
.gap-2  { gap: .5rem; }
.align-center { align-items: center; }

/* =============================================================================
   RESPONSIVE (tablette)
   ============================================================================= */
@media (max-width: 768px) {
  .main-content { padding: 1rem; }
  .navbar-inner { padding: 0 1rem; }
  .user-name { display: none; }
  .kanban-board { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .groups-grid { grid-template-columns: 1fr; }
  .quick-links { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .navbar-nav { display: none; } /* menu hamburger à implémenter si besoin */
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================================================
   IMPRESSION / EXPORT PDF
   ============================================================================= */
@media print {
  /* Masquer les éléments non essentiels */
  .navbar,
  .site-footer,
  .flash-container,
  .toast-reminder,
  .page-actions,
  .gantt-controls .btn,
  #btnExportGanttPng,
  #btnExportKanbanPng,
  .modal-overlay { display: none !important; }

  /* Mise en page impression */
  body { background: #fff; font-size: 11pt; }
  .main-content { padding: 0; max-width: none; }
  .page-title { font-size: 16pt; margin-bottom: .5rem; }

  /* Gantt : déployer la zone scrollable */
  .gantt-chart-col { overflow: visible !important; width: auto !important; flex: 1 !important; }
  .gantt-outer     { overflow: visible !important; }
  #ganttCard       { overflow: visible !important; page-break-inside: avoid; }
  #ganttExportZone { overflow: visible !important; }

  /* Kanban : colonnes verticales à l'impression */
  .kanban-board { display: block !important; }
  .kanban-column { break-inside: avoid; margin-bottom: 1rem; }
  #kanbanExportZone { overflow: visible !important; }

  /* Éviter les coupures de page dans les cartes et entrées */
  .card { break-inside: avoid; }
}
