/* Styles généraux */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    min-height: 100vh;
    max-width: 100vw;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header */
header h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

header p {
    text-align: center;
    color: #555;
    margin-bottom: 30px;
    font-size: 1rem;
}

/* Formulaires d'authentification */
.auth-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.auth-box {
    width: fit-content;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.auth-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
}
.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

textarea {
    height: 80px;
}

.btn {
    background-color: #28a745;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #218838;
}

.btn-logout {
    background-color: #dc3545;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Quill editor */
#task-editor {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-height: 150px;
    padding: 10px;
}

.ql-container {
    border: none;
}

/* Section des tâches */
.tasks-container {
    background-color: #f9f9f9;
    max-width: calc(100vw - 50px);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-tasks {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-task-form {
    margin-bottom: 30px;
}

.task-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.task-list > li {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.task-list > li .task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-list > li h3 {
    margin: 0;
    font-size: 1.4rem; /* Augmenter la taille du titre */
    color: #2c3e50; /* Utiliser une couleur plus sombre et marquée */
    font-weight: 600; /* Rendre le titre plus gras */
    display: flex;
    align-items: center; /* Centrer l'icône avec le texte */
}

.task-list > li .task-header h3::before {
    content: "📝"; /* Ajouter une icône devant le titre */
    margin-right: 10px;
    font-size: 1.2rem;
}

.task-list > li {
    border-left: 5px solid #3498db; /* Ajoute une bordure colorée à gauche pour marquer la tâche */
    padding-left: 15px; /* Espace supplémentaire pour compenser la bordure */
}

.task-list li.completed {
    background-color: #f0f0f0; /* Arrière-plan légèrement grisé */
    border-left: 5px solid #27ae60; /* Bordure verte pour indiquer que c'est terminé */
    color: #95a5a6; /* Couleur du texte grisée */
}

.task-list > li.completed .task-header h3 {
    text-decoration: line-through; /* Barrer le texte si la tâche est complétée */
    color: #95a5a6; /* Couleur plus fade pour les tâches complétées */
}

.task-list > li.completed .task-header h3::before {
    content: "✅"; /* Remplacer l'icône par une icône de validation pour les tâches complétées */
}

/* Isolation des styles pour le contenu généré par Quill */
.task-list > li .task-content {
    color: #333;
    margin-bottom: 15px;
    word-wrap: break-word;
}

.task-list > li .task-content p,
.task-list > li .task-content div {
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.task-list > li .btn-container {
        display: flex;
}

.task-list > li .btn-delete {
    align-self: flex-end;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.task-list > li .btn-delete:hover {
    background-color: #c82333;
}

/* Bouton pour marquer une tâche comme terminée */
.btn-complete {
    background-color: #f39c12; /* Couleur jaune/orangée pour attirer l'attention */
    color: #fff;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 10px; /* Ajouter un peu d'espace à gauche du bouton */
    transition: background-color 0.3s ease; /* Transition fluide sur le hover */
}

.btn-complete:hover {
    background-color: #e67e22; /* Couleur légèrement plus foncée au survol */
}

.modal { position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.9); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999; 
}
.modal-content { 
    background: #fff;
    padding: 30px; 
    border-radius: 12px; 
    text-align: center; 
    max-width: 400px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.form-control { 
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #ddd;
    border-radius: 8px; 
    font-size: 1.1rem;
}

@media screen and (max-width: 850px){
    .container{
        width: 85%;   
    }
 
    .auth-container{
        flex-direction: column;
        align-items: center;
    }

}