/* ═══════════════════════════════════════════════════════════
   components.css — Composants UI réutilisables (crystal)
   ═══════════════════════════════════════════════════════════ */

/* ── Card glassmorphism ── */
.card {
  background: var(--gradient-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.card-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.card-action {
  color: var(--color-purple);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  transition: opacity var(--transition-fast);
}
.card-action:hover { opacity: 0.7; }

/* ── Avatar ── */
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gradient-purple);
  color: #fff;
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ── Burger ── */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-1);
}
.burger span {
  display: block; width: 20px; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition-base);
}

/* ── Dot ── */
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--blue   { background: var(--color-blue); }
.dot--yellow { background: var(--color-yellow); }
.dot--green  { background: var(--color-green); }
.dot--orange { background: var(--color-orange); }
.dot--purple { background: var(--color-purple); }
.dot--red    { background: var(--color-red); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: var(--weight-semi);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  border: 1px solid transparent;
  backdrop-filter: blur(4px);
}
.badge--actif     { background: rgba(52,211,153,.15);  color: var(--color-teal);   border-color: rgba(52,211,153,.3); }
.badge--demarrage { background: rgba(251,191,36,.12);  color: var(--color-yellow); border-color: rgba(251,191,36,.25); }
.badge--attente   { background: rgba(167,139,250,.12); color: var(--color-purple); border-color: rgba(167,139,250,.25); }
.badge--termine   { background: rgba(96,165,250,.12);  color: var(--color-blue);   border-color: rgba(96,165,250,.25); }

/* ── Tag ── */
.tag {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: var(--weight-medium);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  color: var(--color-muted);
}

/* ── Progress ── */
.progress-wrap {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s cubic-bezier(.4,0,.2,1);
}
.progress-bar--purple { background: var(--gradient-purple); }
.progress-bar--teal   { background: var(--gradient-teal); }
.progress-bar--blue   { background: linear-gradient(90deg, var(--color-blue), #3b82f6); }
.progress-bar--yellow { background: linear-gradient(90deg, var(--color-yellow), #f59e0b); }

/* ── Checkbox ── */
.task-check {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer; flex-shrink: 0; position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.task-check:checked { background: var(--color-purple); border-color: var(--color-purple); }
.task-check:checked::after {
  content: '';
  position: absolute; left: 3px; top: 1px;
  width: 4px; height: 7px;
  border: 1.5px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(40deg);
}

/* ── Doc icon ── */
.doc-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: var(--weight-bold);
  flex-shrink: 0;
}
.doc-icon--pdf  { background: rgba(248,113,113,.15); color: var(--color-red); }
.doc-icon--docx { background: rgba(96,165,250,.15);  color: var(--color-blue); }
.doc-icon--xlsx { background: rgba(52,211,153,.15);  color: var(--color-teal); }
.doc-icon--md   { background: rgba(167,139,250,.15); color: var(--color-purple); }

/* ── Btn arrow ── */
.btn-arrow {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-arrow:hover { background: var(--color-purple); color: #fff; border-color: var(--color-purple); }

/* ── Responsive ── */
@media (max-width: 768px) { .burger { display: flex; } }
@media (max-width: 480px) { .tag { display: none; } }

/* ── Color picker custom button ── */
.color-btn--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255,255,255,.3) !important;
  background: transparent !important;
}
.color-btn--custom:hover {
  border-color: rgba(255,255,255,.6) !important;
}
.color-btn--custom.active {
  border-color: #fff !important;
  border-style: solid !important;
}