/* RESET LIGHT */
* {
  box-sizing: border-box;
}

/* Général */
body {
  font-family: 'Inter', 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea, #764ba2);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #1f2933;
}

/* Conteneur principal */
.app-container {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(245, 247, 255, 0.9)
  );
  backdrop-filter: blur(12px);
  padding: 28px;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Titre */
.app-container h1 {
  font-size: 2.1rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Formulaire */
#todo-form {
  display: flex;
  margin-bottom: 24px;
  background: #f1f4ff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.15);
}

#todo-input {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  border: none;
  outline: none;
  background: transparent;
  color: #1f2933;
}

#todo-input::placeholder {
  color: #8a94a6;
}

/* Bouton principal */
button {
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #667eea, #764ba2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
  opacity: 0.95;
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Liste des tâches */
#todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Item */
#todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    #ffffff,
    #f4f6ff
  );
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#todo-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Tâche complétée */
#todo-list li.completed {
  text-decoration: line-through;
  color: #8a94a6;
  background: linear-gradient(
    135deg,
    #e5e7eb,
    #f1f5f9
  );
}

/* Checkbox */
.task-toggle {
  transform: scale(1.25);
  cursor: pointer;
  accent-color: #667eea;
}

/* Bouton supprimer */
.delete-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #ef4444;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.delete-btn:hover {
  color: #dc2626;
  transform: scale(1.15);
}

/* Responsive */
@media (max-width: 480px) {
  .app-container {
    padding: 22px;
  }

  #todo-form {
    flex-direction: column;
  }

  button {
    width: 100%;
    padding: 12px;
  }
}
