/* ============================================
   TODO - LAYOUT
   ============================================ */
.page_todo {
  padding: 20px;
}
.todo-container {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-align: left;
}

/* ============================================
   PANNEAU LISTE (gauche)
   ============================================ */
.todo-list-panel {
  min-width: 200px;
  max-width: 240px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  overflow: hidden;
}
.todo-list-header {
  background: #f8f9fa;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 10pt;
  color: #444;
  border-bottom: 1px solid #e8eaed;
}
.todo-list-header .fa {
  color: var(--main-bg-color);
  margin-right: 6px;
}
.todo-list-container {
  display: flex;
  flex-direction: column;
  padding: 6px;
}
.todo-list-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 10pt;
  color: #333;
  transition: all 0.15s ease;
}
.todo-list-btn:hover {
  background: #f0f0f0;
}
.todo-list-btn.active {
  background: var(--main-bg-color);
  color: white;
  font-weight: 600;
}


/* ============================================
   PANNEAU TÂCHES (droite)
   ============================================ */
.todo-tasks-panel {
  flex: 1;
  min-width: 0;
}
.todo-tasks-empty {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  color: #999;
  font-size: 11pt;
}
.todo-tasks-empty .fa {
  margin-right: 6px;
}

/* Section (En cours / Terminé) */
.todo-task-section {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.todo-task-section-title {
  background: #f8f9fa;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 10pt;
  color: #444;
  border-bottom: 1px solid #e8eaed;
  display: flex;
  align-items: center;
  gap: 6px;
}
.todo-task-section-title .fa,
.todo-task-section-title .fas {
  color: var(--main-bg-color);
  width: 16px;
  text-align: center;
}
.todo-task-count {
  background: #e8eaed;
  color: #666;
  font-size: 8pt;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Ajout de tâche */
.todo-task-add {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.todo-task-add-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 10pt;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}
.todo-task-add-input:focus {
  border-color: var(--main-bg-color);
  box-shadow: 0 0 0 3px rgba(38, 154, 142, 0.12);
}
.todo-task-add-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: var(--main-bg-color);
  color: white;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.todo-task-add-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Item de tâche */
.todo-task-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s ease;
  gap: 10px;
}
.todo-task-item:last-child {
  border-bottom: none;
}
.todo-task-item:hover {
  background: #f8fafa;
}
.todo-task-done {
  opacity: 0.6;
}
.todo-task-wip {
  border-left: 3px solid var(--main-bg-color);
}

.todo-task-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.todo-task-label {
  font-weight: 600;
  font-size: 10pt;
  color: #333;
}
.todo-task-done .todo-task-label {
  text-decoration: line-through;
  color: #999;
}
.todo-task-desc {
  font-size: 9pt;
  color: #888;
  line-height: 1.4;
}

/* Actions tâche */
.todo-task-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}
.todo-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
  padding: 0;
}
.todo-action-check {
  background: #e8f5e9;
  color: #43a047;
}
.todo-action-check:hover {
  background: #c8e6c9;
}
.todo-action-play {
  background: #e3f2fd;
  color: #1e88e5;
}
.todo-action-play:hover {
  background: #bbdefb;
}
.todo-action-undo {
  background: #fff3e0;
  color: #e65100;
}
.todo-action-undo:hover {
  background: #ffe0b2;
}
.todo-action-delete {
  background: #ffebee;
  color: #c62828;
}
.todo-action-delete:hover {
  background: #ffcdd2;
}
.todo-task-wip-badge {
  font-size: 8pt;
  font-weight: 600;
  color: var(--main-bg-color);
  background: rgba(38, 154, 142, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Vide */
.todo-task-empty {
  color: #bbb;
  font-size: 10pt;
  padding: 24px;
  text-align: center;
}
.todo-task-empty .fa {
  margin-right: 4px;
  font-size: 14pt;
  vertical-align: middle;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
  .page_todo {
    padding: 10px;
  }
  .todo-container {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .todo-list-panel {
    max-width: 100%;
    min-width: auto;
  }
  .todo-list-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
  }
  .todo-list-btn {
    width: auto;
    padding: 6px 10px;
    font-size: 9pt;
  }
  .todo-task-section-title {
    font-size: 9pt;
    padding: 6px 10px;
  }
  .todo-task-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    gap: 6px;
  }
  .todo-task-actions {
    align-self: flex-end;
  }
  .todo-task-add {
    padding: 8px 10px;
  }
  .todo-task-add-input {
    font-size: 9pt;
    padding: 6px 10px;
  }
  .todo-task-label {
    font-size: 9pt;
  }
  .todo-task-desc {
    font-size: 8pt;
  }
  .todo-task-empty {
    padding: 16px;
    font-size: 9pt;
  }
  .todo-tasks-empty {
    padding: 20px;
    font-size: 10pt;
  }
}
