/* --- STYLES DRAG & DROP & LIGNE NEON --- */
.task-card,
.subtask-item,
.tree-item {
  position: relative;
}

.task-card[draggable="true"],
.subtask-item[draggable="true"],
.tree-item[draggable="true"] {
  cursor: grab;
}

.task-card[draggable="true"]:active,
.subtask-item[draggable="true"]:active,
.tree-item[draggable="true"]:active {
  cursor: grabbing;
}

.drag-handle {
  user-select: none;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--text-muted, #94a3b8);
  cursor: grab !important;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.drag-handle:hover {
  opacity: 1 !important;
  color: var(--primary, #3b82f6);
}

/* Neutralisation des événements enfants pendant le survol pour éviter la perte du drop */
.task-card.drag-over-top *,
.task-card.drag-over-bottom *,
.subtask-item.drag-over-top *,
.subtask-item.drag-over-bottom *,
.subtask-item.drag-over-inside * {
  pointer-events: none;
}

/* Indicateur Ligne Bleue NÉON Haut */
.task-card.drag-over-top::before,
.subtask-item.drag-over-top::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #3b82f6;
  border-radius: 4px;
  box-shadow: 0 0 10px #3b82f6, 0 0 4px #60a5fa;
  z-index: 100;
  pointer-events: none;
}

/* Indicateur Ligne Bleue NÉON Bas */
.task-card.drag-over-bottom::after,
.subtask-item.drag-over-bottom::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #3b82f6;
  border-radius: 4px;
  box-shadow: 0 0 10px #3b82f6, 0 0 4px #60a5fa;
  z-index: 100;
  pointer-events: none;
}

/* Insertion d'une sous-tâche dans une autre (devient sous-sous-tâche) */
.subtask-item.drag-over-inside {
  background: rgba(59, 130, 246, 0.15) !important;
  outline: 2px dashed #3b82f6 !important;
  outline-offset: -2px;
}

/* Feedback Drag & Drop sur l'arbre de la barre latérale */
.tree-item.drag-over-tree {
  background: rgba(59, 130, 246, 0.25) !important;
  outline: 1px dashed #60a5fa !important;
}

/* Selection visuelle active au clavier (Shift + Flèches) */
.keyboard-selected {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 1px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5) !important;
}
