/* Reset de base */
body {
    background-color: #f4f1ec;
    color: #2c2c2c;
    line-height: 1.6;
    font-family: Arial, sans-serif;
}

/* Navigation */
nav {
    background-color: #3b3a36;
    padding: 15px;
}

nav a {
    color: #f4f1ec;
    margin-right: 15px;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

/* Container général */
.container {
    max-width: 900px;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Titres */
h1, h2 {
    margin-bottom: 20px;
    color: #3b3a36;
}

/* Formulaires classiques */
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="file"],
form input[type="number"],
form input[type="date"],
form select,
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Boutons */
form button {
    background-color: #3b3a36;
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #5a584f;
}

/* Messages */
.error {
    color: #a00000;
    margin-bottom: 10px;
}

.success {
    color: green;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9em;
    color: #777;
}

/* Bouton création */
.btn-create {
    display: inline-block;
    background-color: #3b3a36;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
}

.btn-create:hover {
    background-color: #5a584f;
}

/* ----------------- */
/* FORMULAIRE 2 COLONNES */
/* ----------------- */
.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-column {
    flex: 1;
    min-width: 280px;
    padding: 15px;
    border-radius: 6px;
}

.form-column.general { background-color: #e8f0f2; }
.form-column.naissance { background-color: #f9f4e6; }
.form-column.deces { background-color: #fce8e6; }

form h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
    color: #3b3a36;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

form label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

form textarea {
    resize: vertical;
    min-height: 60px;
}

/* Responsive */
@media screen and (max-width: 700px) {
    .form-row {
        flex-direction: column;
    }
    .form-column {
        margin-bottom: 20px;
    }
}

/* ----------------- */
/* PROFIL VISUEL */
/* ----------------- */
.profile-view {
    margin-top: 20px;
}

.profile-view .form-column p {
    margin: 6px 0;
}

.profile-view .form-column strong {
    color: #3b3a36;
}

/* Bouton Modifier */
button[onclick] {
    background-color: #3b3a36;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
}

button[onclick]:hover {
    background-color: #5a584f;
}

/* ----------------- */
/* TABLEAUX */
/* ----------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #ccc;
    padding: 8px;
}

table th {
    background-color: #3b3a36;
    color: #fff;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* ----------------- */
/* TO-DO LIST – NOUVELLE VERSION */
/* ----------------- */
.todo-section {
    margin-top: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.todo-add {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.todo-add input[type="text"] {
    flex: 1;
}

.todo-list {
    list-style: none;
    padding: 0;
}

.todo-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f4f1ec;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.todo-list li.done {
    text-decoration: line-through;
    color: #777;
}

.todo-list form {
    display: inline;
}

.todo-list button.delete {
    background-color: #a00000;
    padding: 4px 8px;
    border-radius: 3px;
    color: #fff;
    border: none;
    cursor: pointer;
}

.todo-list button.delete:hover {
    background-color: #d00000;
}

/* ----------------- */
/* ANCIENNE TO-DO (COMPATIBILITÉ) */
/* ----------------- */
#taskList {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

#taskList li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f4f1ec;
    padding: 8px 10px;
    border-radius: 4px;
}
