/* Extrait de teacher-dashboard.html. Ordre historique : 17. */
/* ── Variables couleurs Projets ── */
:root {
  --proj-bg: #f8fafc;
  --proj-card: #ffffff;
  --proj-border: #e2e8f0;
  --proj-indigo: #6366f1;
  --proj-violet: #8b5cf6;
  --proj-todo: #94a3b8;
  --proj-doing: #f59e0b;
  --proj-review: #3b82f6;
  --proj-done: #10b981;
  --proj-blocked: #ef4444;
}
/* ── Layout principal ── */
.proj-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  border-radius: 20px;
  padding: 28px 32px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.proj-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.proj-header::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 20%;
  width: 300px; height: 300px;
  background: rgba(139,92,246,0.15);
  border-radius: 50%;
}
/* ── Navigation vues ── */
.proj-view-nav {
  display: flex;
  gap: 4px;
  background: #e8eaf6;
  border-radius: 12px;
  padding: 4px;
  border: 2px solid #c5cae9;
}
.proj-view-btn {
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  border: none !important;
  background: transparent !important;
  color: #3730a3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-shadow: none !important;
}
.proj-view-btn.active {
  background: white !important;
  color: #4f46e5 !important;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25) !important;
}
.proj-view-btn:hover:not(.active) {
  background: rgba(255,255,255,0.85) !important;
  color: #1e1b4b !important;
}
/* ── Kanban ── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  min-height: 500px;
}
@media (max-width: 1200px) { .kanban-board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .kanban-board { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════
   KANBAN — Code couleur complet par colonne
   ══════════════════════════════════════════ */

/* ── Base colonne ── */
.kanban-col {
  border-radius: 16px;
  padding: 14px;
  border: 2px solid;
  min-height: 400px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

/* ── Couleurs fond + bordure par statut ── */
.kanban-col[data-status="todo"] {
  background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
}
.kanban-col[data-status="doing"] {
  background: linear-gradient(160deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fcd34d;
}
.kanban-col[data-status="review"] {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
}
.kanban-col[data-status="done"] {
  background: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}
.kanban-col[data-status="blocked"] {
  background: linear-gradient(160deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fca5a5;
}

/* ── Header colonne ── */
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border-bottom: none;
}
.kanban-col[data-status="todo"]    .kanban-col-header { background: rgba(148,163,184,0.15); }
.kanban-col[data-status="doing"]   .kanban-col-header { background: rgba(245,158,11,0.15);  }
.kanban-col[data-status="review"]  .kanban-col-header { background: rgba(59,130,246,0.15);  }
.kanban-col[data-status="done"]    .kanban-col-header { background: rgba(16,185,129,0.15);  }
.kanban-col[data-status="blocked"] .kanban-col-header { background: rgba(239,68,68,0.15);   }

/* ── Titre colonne ── */
.kanban-col-title {
  font-weight: 800;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}
.kanban-col[data-status="todo"]    .kanban-col-title { color: #64748b; }
.kanban-col[data-status="doing"]   .kanban-col-title { color: #b45309; }
.kanban-col[data-status="review"]  .kanban-col-title { color: #1d4ed8; }
.kanban-col[data-status="done"]    .kanban-col-title { color: #047857; }
.kanban-col[data-status="blocked"] .kanban-col-title { color: #b91c1c; }

/* ── Badge compteur ── */
.kanban-count {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  border: 2px solid currentColor;
}
.kanban-col[data-status="todo"]    .kanban-count { color: #64748b; background: #f1f5f9; }
.kanban-col[data-status="doing"]   .kanban-count { color: #b45309; background: #fef3c7; }
.kanban-col[data-status="review"]  .kanban-count { color: #1d4ed8; background: #dbeafe; }
.kanban-col[data-status="done"]    .kanban-count { color: #047857; background: #dcfce7; }
.kanban-col[data-status="blocked"] .kanban-count { color: #b91c1c; background: #ffe4e6; }

/* ── Cartes tâches ── */
.task-card {
  background: white;
  border-radius: 12px;
  padding: 14px 14px 14px 18px;
  margin-bottom: 10px;
  border: 1.5px solid;
  cursor: grab;
  transition: all 0.2s;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Couleur de bordure des cartes selon la colonne */
.kanban-col[data-status="todo"]    .task-card { border-color: #e2e8f0; }
.kanban-col[data-status="doing"]   .task-card { border-color: #fde68a; }
.kanban-col[data-status="review"]  .task-card { border-color: #bfdbfe; }
.kanban-col[data-status="done"]    .task-card { border-color: #bbf7d0; }
.kanban-col[data-status="blocked"] .task-card { border-color: #fecaca; }

/* Hover coloré par colonne */
.kanban-col[data-status="todo"]    .task-card:hover { border-color: #94a3b8; box-shadow: 0 6px 20px rgba(148,163,184,0.25); transform: translateY(-2px); }
.kanban-col[data-status="doing"]   .task-card:hover { border-color: #f59e0b; box-shadow: 0 6px 20px rgba(245,158,11,0.25);  transform: translateY(-2px); }
.kanban-col[data-status="review"]  .task-card:hover { border-color: #3b82f6; box-shadow: 0 6px 20px rgba(59,130,246,0.25);  transform: translateY(-2px); }
.kanban-col[data-status="done"]    .task-card:hover { border-color: #10b981; box-shadow: 0 6px 20px rgba(16,185,129,0.25);  transform: translateY(-2px); }
.kanban-col[data-status="blocked"] .task-card:hover { border-color: #ef4444; box-shadow: 0 6px 20px rgba(239,68,68,0.25);   transform: translateY(-2px); }

/* ── Barre gauche colorée (priorité) ── */
.task-card::before {
  content: '';
  position: absolute;
  top: 10%; left: 0;
  width: 5px; height: 80%;
  border-radius: 0 4px 4px 0;
}
.task-card[data-priority="haute"]::before   { background: linear-gradient(180deg, #ef4444, #dc2626); }
.task-card[data-priority="normale"]::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.task-card[data-priority="basse"]::before   { background: linear-gradient(180deg, #10b981, #059669); }

.task-title { font-weight: 700; font-size: 13px; color: #1e293b; margin-bottom: 6px; }
.task-meta  { font-size: 11px; color: #94a3b8; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-tag   { padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.task-assignees {
  display: flex;
  margin-top: 8px;
}
.task-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: 2px solid white;
  margin-left: -6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; color: white;
}
.task-avatar:first-child { margin-left: 0; }

/* ── Vue Tableau ── */
.proj-table { width: 100%; border-collapse: collapse; }
.proj-table thead th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}
/* Largeurs fixes par colonne */
.proj-table th:nth-child(1) { width: 36px; }       /* point priorité */
.proj-table th:nth-child(2) { width: 22%; }         /* tâche */
.proj-table th:nth-child(3) { width: 11%; }         /* projet */
.proj-table th:nth-child(4) { width: 11%; }         /* assignés */
.proj-table th:nth-child(5) { width: 9%; }          /* priorité */
.proj-table th:nth-child(6) { width: 10%; }         /* statut */
.proj-table th:nth-child(7) { width: 11%; }         /* échéance */
.proj-table th:nth-child(8) { width: 15%; }         /* avancement */
.proj-table th:nth-child(9) { width: 110px; }       /* actions */

.proj-table thead th:hover { background: #f1f5f9; color: #6366f1; }
.proj-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
  cursor: pointer;
}
.proj-table tbody tr:hover { background: #fafbff; }
.proj-table tbody td { padding: 12px 16px; font-size: 13px; color: #334155; vertical-align: middle; overflow: hidden; }
.status-pill {
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  display: inline-block;
  border: 1.5px solid transparent;
}
.status-pill.todo     { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.status-pill.doing    { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.status-pill.review   { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.status-pill.done     { background: #dcfce7; color: #166534; border-color: #86efac; }
.status-pill.blocked  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.priority-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px white, 0 0 0 3px currentColor;
}
.priority-dot.haute   { background: #ef4444; color: #ef4444; }
.priority-dot.normale { background: #f59e0b; color: #f59e0b; }
.priority-dot.basse   { background: #10b981; color: #10b981; }
/* ── Vue Timeline ── */
.timeline-wrapper {
  overflow-x: auto;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: white;
}
.timeline-header-row {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  position: sticky; top: 0; z-index: 2;
}
.timeline-name-col {
  min-width: 220px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  border-right: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.timeline-dates-row {
  display: flex;
  flex: 1;
}
.timeline-date-cell {
  flex: 1;
  min-width: 60px;
  padding: 8px 4px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  border-right: 1px solid #f1f5f9;
}
.timeline-date-cell.today { background: #fef3c7; color: #92400e; }
.timeline-row {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  min-height: 50px;
}
.timeline-row:hover { background: #fafbff; }
.timeline-task-name {
  min-width: 220px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  border-right: 2px solid #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.timeline-bar-area {
  flex: 1;
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
}
.timeline-bar {
  position: absolute;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.timeline-bar:hover { opacity: 0.85; }
/* ── Modal tâche ── */
.proj-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.7);
  z-index: 99999;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.proj-modal-overlay.active { display: flex; }
.proj-modal {
  background: white;
  border-radius: 20px;
  width: 95%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: projModalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes projModalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.proj-modal-header {
  padding: 24px 28px 20px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.proj-modal-body { padding: 24px 28px; }
.proj-form-group { margin-bottom: 20px; }
.proj-form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 6px;
}
.proj-form-input, .proj-form-select, .proj-form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  transition: border-color 0.2s;
  background: #fafbff;
  font-family: inherit;
}
.proj-form-input:focus, .proj-form-select:focus, .proj-form-textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: white;
}
.proj-form-textarea { min-height: 100px; resize: vertical; }
/* ── Projet card (liste projets) ── */
.project-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99,102,241,0.12);
  transform: translateY(-2px);
}
.project-card-accent {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
}
.proj-progress-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.proj-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 10px;
  transition: width 0.6s ease;
}
/* ── Filtres ── */
.proj-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.proj-filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid #e2e8f0;
  background: white;
  color: #64748b;
  transition: all 0.15s;
}
.proj-filter-chip.active, .proj-filter-chip:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #6366f1;
}
/* ── Drop zones kanban ── */
.kanban-drop-zone {
  min-height: 50px;
  border: 2px dashed transparent;
  border-radius: 10px;
  transition: all 0.2s;
  margin-bottom: 6px;
}
.kanban-drop-zone.drag-over {
  border-color: #6366f1;
  background: rgba(99,102,241,0.06);
}

/* ── Drag & Drop amélioré ── */
.kanban-col {
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.kanban-col[data-status="todo"].col-drag-over    { background: #e2e8f0 !important; border-color: #94a3b8 !important; box-shadow: 0 0 0 3px rgba(148,163,184,0.3) !important; }
.kanban-col[data-status="doing"].col-drag-over   { background: #fde68a !important; border-color: #f59e0b !important; box-shadow: 0 0 0 3px rgba(245,158,11,0.3) !important; }
.kanban-col[data-status="review"].col-drag-over  { background: #bfdbfe !important; border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,0.3) !important; }
.kanban-col[data-status="done"].col-drag-over    { background: #bbf7d0 !important; border-color: #10b981 !important; box-shadow: 0 0 0 3px rgba(16,185,129,0.3) !important; }
.kanban-col[data-status="blocked"].col-drag-over { background: #fecaca !important; border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.3) !important; }

/* Carte en cours de drag */
.task-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg) scale(0.97);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  cursor: grabbing !important;
}
.task-card:active {
  cursor: grabbing;
}
/* ── Onglets projet ── */
.proj-sub-tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
  gap: 0;
}
.proj-sub-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.proj-sub-tab.active { color: #6366f1; border-bottom-color: #6366f1; }
.proj-sub-tab:hover:not(.active) { color: #475569; }
/* ── Stats ── */
.proj-stat-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.proj-stat-card:hover { border-color: #6366f1; box-shadow: 0 4px 16px rgba(99,102,241,0.08); }
/* ── Empty states ── */
.proj-empty {
  text-align: center;
  padding: 48px 24px;
  color: #94a3b8;
}
.proj-empty-icon { font-size: 48px; margin-bottom: 12px; }
.proj-empty-title { font-size: 16px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.proj-empty-sub { font-size: 13px; }

/* ── SURCHARGES GLOBALES DASHBOARD (éviter écrasement par CSS global) ── */
#content-projets button {
  /* Pas de surcharge globale ici - géré par les classes spécifiques */
}
#content-projets .proj-view-btn {
  color: #3730a3 !important;
}
#content-projets .proj-view-btn.active {
  color: #4f46e5 !important;
  background: white !important;
}
#content-projets .proj-header h2,
#content-projets .proj-header * {
  color: white;
}
#content-projets .proj-header h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#content-projets .proj-header p {
  color: rgba(255,255,255,0.9) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.9) !important;
}
