.taches-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.taches-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.taches-card {
  padding: 20px;
}

.taches-card h2 {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.toolbar-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.taches-select {
  min-width: 190px;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.taches-select:focus {
  border-color: rgba(236,72,153,0.35);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.12);
}

.taches-select option {
  background: #0f172a;
  color: #fff;
}

.tasks-list {
  display: grid;
  gap: 14px;
}

.task-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: 0.2s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236,72,153,0.25);
  box-shadow: 0 15px 30px rgba(0,0,0,0.18);
}

.task-deadline {
  background: linear-gradient(135deg, rgba(236,72,153,0.14), rgba(139,92,246,0.14));
  border: 1px solid rgba(236,72,153,0.16);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.task-deadline-day {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
  color: #fff;
}

.task-deadline-month {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.72);
}

.task-deadline-year {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

.task-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.task-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.task-project {
  font-size: 13px;
  color: rgba(255,255,255,0.56);
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.80);
  font-size: 12px;
  line-height: 1;
}

.task-description {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.74);
  white-space: pre-wrap;
}

.task-side {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.task-badge {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.task-status-a-faire {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.task-status-en-cours {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.task-status-terminee {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.task-priority-haute {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.task-priority-moyenne {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.task-priority-basse {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.12);
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.task-action-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(10px);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-action-btn:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.task-action-btn.done {
  background: rgba(34,197,94,0.14);
  border-color: rgba(34,197,94,0.24);
  color: #86efac;
}

.task-action-btn.done:hover {
  background: rgba(34,197,94,0.20);
  color: #fff;
}

.task-action-btn.delete {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.24);
  color: #fca5a5;
}

.task-action-btn.delete:hover {
  background: rgba(239,68,68,0.20);
  color: #fff;
}

.empty-tasks {
  text-align: center;
  padding: 44px 20px;
  color: rgba(255,255,255,0.62);
  font-size: 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,0.10);
}

.task-modal-box {
  width: min(640px, 92vw);
}

.task-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.task-modal-box textarea,
.task-modal-box input,
.task-modal-box select {
  width: 100%;
  box-sizing: border-box;
}

.task-modal-box textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

@media (max-width: 1100px) {
  .task-card {
    grid-template-columns: 1fr;
  }

  .task-side {
    min-width: 0;
    align-items: flex-start;
  }

  .task-badges,
  .task-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .toolbar-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .taches-select,
  .search-input {
    width: 100%;
    min-width: 100%;
  }

  .task-form-row {
    grid-template-columns: 1fr;
  }
}

.task-chip-countdown {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.task-chip-countdown-none {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.72);
}

.task-chip-countdown-normal {
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.22);
  color: #93c5fd;
}

.task-chip-countdown-soon {
  background: rgba(245,158,11,0.14);
  border: 1px solid rgba(245,158,11,0.28);
  color: #fbbf24;
}

.task-chip-countdown-today,
.task-chip-countdown-overdue {
  background: rgba(239,68,68,0.14);
  border: 1px solid rgba(239,68,68,0.30);
  color: #f87171;
}

.task-chip-countdown-done {
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.26);
  color: #86efac;
}

.task-card-overdue {
  border-color: rgba(239,68,68,0.22);
  box-shadow: 0 0 0 1px rgba(239,68,68,0.08), 0 18px 35px rgba(0,0,0,0.20);
}

.task-card-urgent {
  border-color: rgba(245,158,11,0.22);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.08), 0 18px 35px rgba(0,0,0,0.20);
}

.task-card-soon {
  border-color: rgba(245,158,11,0.16);
}

.task-card-done {
  opacity: 0.92;
}

.task-chip-countdown-today,
.task-chip-countdown-overdue {
  background: linear-gradient(135deg, rgba(255,0,0,0.25), rgba(239,68,68,0.15));
  border: 1px solid rgba(255,0,0,0.6);
  color: #ff4d4d;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255,0,0,0.6);
  animation: pulseWarning 1.5s infinite;
}

.task-card-overdue {
  border: 2px solid rgba(255,0,0,0.6);
  box-shadow: 
    0 0 0 1px rgba(255,0,0,0.2),
    0 0 20px rgba(255,0,0,0.25),
    0 18px 35px rgba(0,0,0,0.25);
}

.task-card-urgent {
  border: 2px solid rgba(255,120,0,0.6);
  box-shadow: 
    0 0 0 1px rgba(255,120,0,0.2),
    0 0 18px rgba(255,120,0,0.25),
    0 18px 35px rgba(0,0,0,0.25);
}

@keyframes pulseWarning {
  0% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(255,0,0,0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(255,0,0,0.9);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(255,0,0,0.4);
  }
}