/* Style global de base */
body {
  margin: 0;
  background: #f6f6f9;
  color: #1a233a;
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* Global link hover */
a{
  transition: transform .15s ease, filter .15s ease;
}
a:hover{
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* Table styling shared across dashboards */
.table-modern{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.table-modern thead th{
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}
.table-modern tbody td{
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
  color: #1f2937;
}
.table-modern tbody tr:hover{
  background: #f9fafb;
  transition: background-color 0.15s ease-in-out;
}
.table-modern tbody tr:last-child td{
  border-bottom: none;
}
.table-modern tbody a{
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}
.table-modern tbody a:hover{
  text-decoration: underline;
}

/* Unified block component */
.u-block {
  --accent: #64748b;      /* left border color */
  --bg-soft: #ffffff;     /* card background */
  --bd: rgba(148,163,184,0.35); /* outline */
  background: var(--bg-soft);
  border: 1px solid var(--bd);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

/* Accent helpers (optional) */
.accent-amber  { --accent:#d97706; --bg-soft:#fff3e0; }
.accent-emerald{ --accent:#059669; --bg-soft:#ecfdf5; }
.accent-iris   { --accent:#7c3aed; --bg-soft:#f5f3ff; }
.accent-sky    { --accent:#0284c7; --bg-soft:#e3f2fd; }
.accent-rose   { --accent:#e11d48; --bg-soft:#fce7f3; }
.accent-slate  { --accent:#334155; --bg-soft:#f1f5f9; }

.page-title {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}

.container {
  max-width: 1200px;
  margin: 24px auto;
}

/* Carte générique (alignée avec Portefeuille) */
.content-wrapper, .card {
  max-width: 1400px;
  margin: 24px auto;
  background-color: #ffffff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Style global responsive pour mobile */

@media (max-width: 768px) {
  /* Header et navigation */
  header { padding: 10px 14px !important; }
  header nav { 
    overflow-x: auto; 
    white-space: nowrap; 
    gap: 8px !important;
  }
  header nav a { font-size: 0.9rem !important; padding: 6px 8px; }

  /* Conteneurs génériques */
  .container { max-width: 100% !important; margin: 12px auto !important; padding: 12px !important; }

  /* Cartes génériques (index / actions) */
  .cards { gap: 10px !important; }
  .action-card { min-width: auto !important; max-width: 100% !important; flex: 1 1 100% !important; }
  .card-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .head-right { align-items: flex-start !important; }
  .card-title { font-size: 1rem !important; }

  /* Listes horizontales d’actions */
  .actions-strip-inner { padding-bottom: 6px; }

  /* Board missions/tâches */
  .missions-board { flex-direction: column; overflow-x: visible; gap: 18px; }
  .mission-column { flex: 1 1 auto; }
  .mission-column { scroll-snap-align: unset; }
}

/* Petits écrans très étroits */
@media (max-width: 420px) {
  header nav a { font-size: 0.85rem !important; }
}

/* Admin tâches */
.admin-taches {
  display: block;
}

.admin-taches-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.page-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.page-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  max-width: 720px;
  line-height: 1.5;
}

.head-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.head-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-header-block {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 28px;
}
.head-stats li {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  text-align: center;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.head-stats li .stat-label {
  margin-top: 4px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}


.admin-taches-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.admin-card {
  flex: 1 1 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.admin-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.admin-card-text {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #475569;
}

.admin-card-bullets {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #334155;
}

.admin-card-highlight {
  background: linear-gradient(165deg, #eef2ff 0%, #ffffff 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 18px 32px rgba(79, 70, 229, 0.12);
}

.admin-card-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stacked-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #334155;
}

.stacked-form input,
.stacked-form select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  color: #111827;
}

.stacked-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-light,
.btn-chip {
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  padding: 10px 14px;
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
}

.btn-secondary {
  padding: 8px 12px;
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-light {
  padding: 8px 12px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-chip {
  padding: 4px 8px;
  font-size: 0.8rem;
  background: #fbbf24;
  color: #1f2937;
  border-radius: 999px;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-light:hover {
  background: #f9fafb;
}

.btn-chip:hover {
  background: #f59e0b;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f3f4f6;
  text-decoration: none;
  font-size: 0.95rem;
}

.icon-link.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.icon-link:hover {
  background: #e5e7eb;
}

.icon-link.danger:hover {
  background: #fecaca;
}

.missions-board {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.missions-board::-webkit-scrollbar {
  height: 8px;
}

.missions-board::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.mission-column {
  flex: 0 0 360px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.09);
  scroll-snap-align: start;
}

.mission-column-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission-column-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mission-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
}

.mission-column-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mission-column-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #eef2ff;
  color: #4338ca;
}

.chip-soft {
  background: #f8fafc;
  color: #475569;
}

.chip-muted {
  background: #e2e8f0;
  color: #475569;
}

.mission-empty {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  font-style: italic;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.task-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.task-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.task-card-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.task-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pill-type {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
  text-transform: uppercase;
}

.pill-recurrente {
  background: rgba(34, 197, 94, 0.18);
  color: #047857;
}

.pill-ponctuelle {
  background: rgba(251, 191, 36, 0.25);
  color: #b45309;
}

.pill-soft {
  background: #e0f2fe;
  color: #0369a1;
}

.task-meta-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.task-meta-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #475569;
}

.task-meta-form select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: #1f2937;
}

.task-meta-form .btn-light {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.05);
}

.action-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-label {
  flex: 1;
  font-weight: 600;
  color: #1e293b;
}

.action-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #cbd5f5;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4338ca;
}

.action-item-ops {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.action-item .inline-form {
  display: inline-flex;
}

.action-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.action-add {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed #c7d2fe;
}

.action-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.action-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
}

.action-add-form input[type="text"],
.action-add-form input[type="number"],
.action-add-form select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.95rem;
}

.action-item .row-edit {
  background: #ffffff;
  border: 1px dashed #cbd5f5;
  border-radius: 12px;
  padding: 12px;
}
.task-table .td-ops{ text-align:right; }
.task-table .td-ops .inline-form, .task-table .td-ops a, .task-table .td-ops .row-edit-btn{ vertical-align:middle; }
.task-title{ margin:0 0 2px; }
.task-badges{ display:flex; gap:6px; flex-wrap:wrap; }
.td-task-wrap{ display:flex; flex-direction:column; gap:8px; }
.task-meta-actions{ display:flex; justify-content:flex-end; margin-top:8px; }
.row-add{ background:#f8fafc; }
.td-type-task, .td-period{ text-align:center; font-weight:600; color:#334155; }
.task-meta-form{ margin-top:10px; }
.task-meta-fields{ display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end; margin-top:6px; }
.task-meta-fields label{ display:flex; flex-direction:column; gap:4px; font-size:.8rem; color:#4b5563; }
.task-meta-fields select{ border:1px solid #cbd5e1; border-radius:6px; padding:6px 8px; font-size:.9rem; }
.row-add-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.row-add-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.row-add-form input[type="text"], .row-add-form input[type="number"], .row-add-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }
.row-edit td{ background:#f8fafc; }
.row-edit-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.row-edit-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.row-edit-form input[type="text"], .row-edit-form input[type="number"], .row-edit-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }
.row-edit-form .btn-light{ padding:6px 10px; border:1px solid #e5e7eb; background:#fff; border-radius:8px; }
.row-edit-form .btn-secondary{ padding:6px 10px; border:1px solid #d1d5db; background:#f3f4f6; border-radius:8px; }
.row-edit-btn{ border:none; background:#fff; border:1px solid #d1d5db; border-radius:6px; padding:4px 8px; cursor:pointer; }
.row-edit-btn:hover{ background:#e5e7eb; }

.task-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.task-node {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-node-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f1f5f9;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.task-node-title {
  font-weight: 600;
  color: #0f172a;
}

.task-node-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-node-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-node-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
}

.task-node-form select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #1f2937;
}

.badge-soft {
  background: #f1f5f9;
  color: #475569;
}

.badge-type.badge-recurrente {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-type.badge-ponctuelle {
  background: #fef3c7;
  color: #b45309;
}


.action-lane {
  --lane-color: #94a3b8;
  --lane-color-light: rgba(148, 163, 184, 0.22);
  position: relative;
  padding-left: 48px;
}

.action-lane::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 48px;
  height: 28px;
  border-top: 4px solid var(--lane-color);
  border-left: 4px solid var(--lane-color);
  border-top-left-radius: 28px;
  transform: translateY(-50%);
}

.lane-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--lane-color);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.lane-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lane-color-light), rgba(255,255,255,0));
  border: 2px solid var(--lane-color);
}

.lane-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2937;
}

.lane-type {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--lane-color);
}

.lane-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.lane-actions .lane-edit-btn{
  border:none; background:transparent; cursor:pointer; color:#64748b; font-weight:700; padding:2px 4px; border-radius:6px;
}
.lane-actions .lane-edit-btn:hover{ background:#e5e7eb; color:#111827; }

.lane-toggle {
  border: none;
  background: transparent;
  color: var(--lane-color);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.lane-toggle:hover {
  text-decoration: underline;
}

.lane-delete {
  font-weight: 600;
  color: #ef4444;
  text-decoration: none;
  font-size: 1rem;
  padding: 0 4px;
}

.lane-delete:hover {
  color: #b91c1c;
}
.lane-edit{ margin:8px 0 0 48px; }
.lane-edit-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:10px; }
.lane-edit-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.lane-edit-form input[type="text"], .lane-edit-form input[type="number"], .lane-edit-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }
.lane-edit-form .btn-light{ padding:6px 10px; border:1px solid #e5e7eb; background:#fff; border-radius:8px; }
.lane-edit-form .btn-secondary{ padding:6px 10px; border:1px solid #d1d5db; background:#f3f4f6; border-radius:8px; }
.flex-1{ flex:1; min-width:200px; }
.is-hidden{ display:none !important; }

.lane-1 {
  --lane-color: #f97316;
  --lane-color-light: rgba(249, 115, 22, 0.18);
}

.lane-2 {
  --lane-color: #38bdf8;
  --lane-color-light: rgba(56, 189, 248, 0.2);
}

.lane-3 {
  --lane-color: #a855f7;
  --lane-color-light: rgba(168, 85, 247, 0.2);
}

.lane-4 {
  --lane-color: #34d399;
  --lane-color-light: rgba(52, 211, 153, 0.2);
}

.lane-5 {
  --lane-color: #f87171;
  --lane-color-light: rgba(248, 113, 113, 0.2);
}

.task-lanes {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-lanes-empty {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}


.lane-body {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.lane-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2937;
}



.lane-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.lane-add {
  --lane-color: #94a3b8;
  --lane-color-light: rgba(148, 163, 184, 0.16);
  background: transparent;
  padding: 6px 0;
}


.lane-add .lane-body {
  background: rgba(148, 163, 184, 0.08);
  border-style: dashed;
}

.lane-add input,
.lane-add select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.lane-add .btn-secondary {
  white-space: nowrap;
}











.order-input {
  width: 60px;
  padding: 6px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
}

.badge-type.badge-core {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-type.badge-periphery {
  background: #fef3c7;
  color: #b45309;
}

.inline-form {
  display: inline;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .task-node-form {
    flex-direction: column;
    align-items: flex-start;
  }
  .task-node-form button {
    align-self: flex-start;
  }
  .action-lane .lane-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .admin-taches-forms {
    flex-direction: column;
  }
  .task-visual {
    flex-direction: column;
  }
  .order-input {
    width: 100%;
  }
}

.task-head-row td{ background:#eef2ff; border-bottom:1px solid #dbeafe; }
.task-head{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-start; }
.task-head-main{ display:flex; flex-direction:column; gap:4px; }
.task-head-badges{ display:flex; gap:6px; flex-wrap:wrap; }
.task-head-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; margin-left:auto; }
.task-head-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.task-head-form select{ border:1px solid #cbd5e1; border-radius:6px; padding:6px 8px; font-size:.9rem; }
.row-add-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.row-add-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.row-add-form input[type="text"], .row-add-form input[type="number"], .row-add-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }

/* --- Admin Tâches Kanban --- */
.admin-taches-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-taches-grid .admin-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
  padding: 22px;
}

.admin-card .stacked-form label span {
  font-weight: 600;
  color: #1f2937;
}

.admin-card .stacked-form input,
.admin-card .stacked-form select {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-card .btn-primary {
  align-self: flex-start;
  box-shadow: 0 10px 18px rgba(79, 70, 229, 0.2);
}


.kanban-board {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 4px 4px 32px;
  scroll-snap-type: x proximity;
}

.kanban-board::-webkit-scrollbar {
  height: 8px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.kanban-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.12) 0%, rgba(244, 245, 255, 1) 100%);
  border-radius: 28px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  padding: 28px;
  box-shadow: 0 26px 48px rgba(79, 70, 229, 0.15);
}

.kanban-wrapper-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.kanban-wrapper-texts h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #1f2937;
}

.kanban-wrapper-texts p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 0.95rem;
}

.kanban-sync-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

.kanban-sync-indicator .indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.kanban-sync-indicator.is-active {
  display: inline-flex;
}

.kanban-sync-indicator.is-success .indicator-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.kanban-sync-indicator.is-error {
  display: inline-flex;
  background: rgba(248, 113, 113, 0.18);
  color: #b91c1c;
}

.kanban-sync-indicator.is-error .indicator-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.kanban-column {
  position: relative;
  flex: 0 0 360px;
  --accent-main: #4f46e5;
  --accent-dark: #3730a3;
  --accent-soft: rgba(79, 70, 229, 0.12);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-top: 6px solid var(--accent-main);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  scroll-snap-align: start;
  overflow: hidden;
}

/* Compact view for Trello-like small blocks */
.kanban-board.is-compact .kanban-column {
  flex: 0 0 300px;
  padding: 14px;
  gap: 12px;
}

.kanban-board.is-compact .kanban-column-body {
  gap: 8px;
  min-height: 80px;
}

.kanban-board.is-compact .kanban-handle {
  padding: 2px 6px;
  font-size: 0.8rem;
}

.kanban-board.is-compact .kanban-card {
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.kanban-board.is-compact .kanban-card-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.kanban-board.is-compact .kanban-card-bubble {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 0.9rem;
  box-shadow: 0 8px 12px rgba(79, 70, 229, 0.25);
}

.kanban-board.is-compact .task-title {
  font-size: 0.95rem;
}

.kanban-board.is-compact .kanban-card-meta {
  display: none;
}

.kanban-board.is-compact .kanban-card-add {
  padding: 10px;
}

.kanban-column::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}

.mission-accent {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mission-accent.dragging-column {
  opacity: 0.5;
  box-shadow: none;
}

.mission-accent-iris { --accent-main: #4f46e5; --accent-dark: #3730a3; --accent-soft: rgba(79, 70, 229, 0.14); }
.mission-accent-sky { --accent-main: #0284c7; --accent-dark: #0369a1; --accent-soft: rgba(14, 165, 233, 0.14); }
.mission-accent-emerald { --accent-main: #059669; --accent-dark: #047857; --accent-soft: rgba(16, 185, 129, 0.16); }
.mission-accent-amber { --accent-main: #d97706; --accent-dark: #b45309; --accent-soft: rgba(217, 119, 6, 0.18); }
.mission-accent-rose { --accent-main: #e11d48; --accent-dark: #be123c; --accent-soft: rgba(225, 29, 72, 0.22); }
.mission-accent-slate { --accent-main: #334155; --accent-dark: #1e293b; --accent-soft: rgba(51, 65, 85, 0.14); }

.kanban-column-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-column-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-column-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mission-accent .chip {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mission-accent .chip-muted {
  background: rgba(248, 250, 252, 0.95);
  color: #475569;
}

.kanban-handle {
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.6);
  color: #475569;
  border-radius: 8px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: grab;
}

.kanban-handle:focus {
  outline: 2px solid var(--accent-main);
  outline-offset: 2px;
}

.kanban-handle.is-dragging,
.kanban-handle:active {
  cursor: grabbing;
  background: var(--accent-soft);
  border-color: var(--accent-main);
}

.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

.kanban-column-body:empty::before {
  content: 'Déposez une tâche ici';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
  background: rgba(148, 163, 184, 0.12);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  min-height: 92px;
}

.kanban-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  border-left: 4px solid var(--accent-main);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kanban-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.kanban-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 42px rgba(15, 23, 42, 0.16);
}

.kanban-card:hover::after {
  opacity: 1;
}

.kanban-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.kanban-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kanban-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-card-bubble {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-main), var(--accent-dark));
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 18px rgba(79, 70, 229, 0.35);
}

.kanban-card.dragging {
  opacity: 0.6;
  box-shadow: none;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kanban-card-meta .pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mission-accent .pill-type {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-dark);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.kanban-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-compact {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}

.btn-compact:hover {
  background: #f3f4f6;
}

.kanban-card-actions .btn-light {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #1e293b;
}

.kanban-card-actions .btn-light:hover {
  background: var(--accent-soft);
  border-color: var(--accent-main);
}

.mission-edit-form,
.task-edit-form {
  background: #ffffff;
  border: 1px dashed #cbd5f5;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mission-edit-grid,
.task-edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mission-edit-form label,
.task-edit-form label,
.kanban-card-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
}

.mission-edit-form input[type="text"],
.mission-edit-form input[type="number"],
.task-edit-form input[type="text"],
.task-edit-form select,
.kanban-card-add-form input[type="text"],
.kanban-card-add-form select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: #1f2937;
}

.mission-edit-actions,
.task-edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.kanban-card-add {
  margin-top: 12px;
  border-top: 1px dashed #cbd5f5;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.mission-accent .kanban-card-add {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.kanban-card-add-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-card-add-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.kanban-card-add-form .btn-secondary {
  align-self: flex-start;
}

.mission-accent .kanban-card-add-form .btn-secondary {
  background: var(--accent-main);
  border-color: var(--accent-main);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.mission-accent .kanban-card-add-form .btn-secondary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.kanban-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cbd5f5;
  border-radius: 20px;
  background: #f8fafc;
  padding: 32px;
  color: #475569;
  font-size: 1rem;
  text-align: center;
}

@media (max-width: 960px) {
  .kanban-column {
    flex: 0 0 85vw;
  }
}

/* --- Kanban visual refinements --- */
.content-wrapper.admin-taches {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 45%, #f8fafc 100%);
  padding: 32px 28px 40px;
  border-radius: 28px;
}

.content-wrapper.admin-taches .admin-taches-head {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.08);
  padding: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.content-wrapper.admin-taches .admin-taches-head .head-left {
  max-width: 440px;
}

.content-wrapper.admin-taches .admin-taches-head .head-stats {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.content-wrapper.admin-taches .admin-taches-head .head-stats li {
  list-style: none;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  min-width: 110px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}


@media (max-width: 720px) {
  .content-wrapper.admin-taches {
    padding: 20px 16px 28px;
    border-radius: 0;
  }

  .kanban-board {
    padding: 16px;
  }
}

/* --- Overrides to ensure unified block background applies even if other card styles set background later --- */
.task-card.u-block,
.bloc-tache.u-block,
.action-card.u-block {
  background: var(--bg-soft) !important;
  border-left: 4px solid var(--accent) !important;
}
