.todo-icon {
  margin-right: 8px;
  color: #666;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.icon-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 400px;
}

.icon-option {
  padding: 10px;
  text-align: center;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.icon-option:hover {
  background: #f0f0f0;
}

.icon-option.remove {
  grid-column: 1 / -1;
  color: #ff4444;
}

/* Ajoutez ces styles à votre fichier CSS */
.todo-item {
  cursor: grab;
  transition: background-color 0.2s, transform 0.2s;
}

.todo-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.todo-item.drag-over {
  background-color: rgba(0, 120, 255, 0.1);
  border: 2px dashed #0078ff;
}

.todo-item.drag-over-top {
  border-top: 2px solid #0078ff;
}

.todo-item.drag-over-bottom {
  border-bottom: 2px solid #0078ff;
}

.fold-buttons {
  margin: 10px 0;
}

.fold-buttons button {
  padding: 6px 12px;
  margin-right: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.fold-buttons button:hover {
  background: #f5f5f5;
}

.fold-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.fold-spacer {
    width: 24px;
    margin-right: 8px;
}

.fold-button i {
  transition: transform 0.2s;
}

.fold-button.folded {
    transform: rotate(-90deg);
}

.fold-button.folded i {
  transform: rotate(-90deg);
}

.todo-children {
    transition: height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
}

.todo-children.folded {
    height: 0;
    opacity: 0;
}

/* Styles pour les listes */
.todo-item.list-item {
  background-color: #f0f0f0; /* Gris très clair */
  border-radius: 4px;
  margin-bottom: 4px;
}

.todo-item.list-item:hover {
  background-color: #e5e5e5; /* Un peu plus foncé au survol */
}

.todo-item.list-item .todo-text {
  color: black;
}

.todo-item.list-item .todo-actions button {
  color: #444; /* Gris foncé pour les boutons */
}

.todo-item.list-item .todo-actions button:hover {
  color: black;
  background-color: rgba(0, 0, 0, 0.1);
}

/* Ajuster les styles des enfants d'une liste */
.todo-item.list-item .todo-children {
  margin-top: 4px;
  padding-top: 4px;
}

.todo-list {
  max-width: 800px;
  margin: 20px auto;
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.todo-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 4px 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.todo-item:hover {
  background-color: #f8f9fa;
}

.todo-children {
  margin-left: 20px; /* Réduit de 30px à 20px */
  border-left: 2px solid #eee;
  padding-left: 8px; /* Réduit de 10px à 8px */
}

.todo-text {
  flex-grow: 1;
  margin: 0 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.todo-text:hover {
  background-color: #f0f0f0;
}

.todo-text.completed {
  text-decoration: line-through;
  color: #888;
}

.todo-actions {
  display: flex;
  gap: 8px;
}

.todo-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #666;
  border-radius: 4px;
  transition: all 0.2s;
}

.todo-actions button:hover {
  color: #000;
  background-color: #eee;
}

.add-buttons {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.add-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.add-task {
  background-color: #4caf50;
  color: white;
}

.add-task:hover {
  background-color: #45a049;
}

.add-list {
  background-color: #2196f3;
  color: white;
}

.add-list:hover {
  background-color: #1e87db;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
}
.todo-children .todo-item {
    margin-left: 20px;
}