/* Configuration de base */
:root {
    --primary: #4a90e2;
    --success: #2ecc71;
    --danger: #e74c3c;
    --bg: #f5f7fa;
    --text: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px; /* Taille idéale pour mobile et lecture PC */
}

h1 {
    text-align: center;
    color: var(--primary);
}

/* Le Formulaire */
.card-form {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

input, textarea, button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-sizing: border-box; /* Évite que les inputs dépassent */
    font-size: 16px; /* Empêche le zoom auto sur iPhone */
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:active { transform: scale(0.98); }

/* La Liste des Tâches */
.task-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.task-info {
    flex-grow: 1;
}

.task-date {
    display: block;
    font-size: 0.85em;
    color: #888;
}

.btn-delete {
    background-color: #ffebee;
    color: var(--danger);
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
}

/* Alertes */
.alert {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}
.alert-success { background: #d4edda; color: #155724; }