/* Styles principaux pour l'application ToDo List */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin: 0;
}

main {
    padding: 20px;
}

.app-controls {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

#todo-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#add-btn {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#add-btn:hover {
    background: #2980b9;
}

.mode-toggle {
    margin-bottom: 20px;
    text-align: center;
}

.mode-toggle input[type="checkbox"] {
    margin-right: 8px;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background: #ecf0f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #3498db;
    color: white;
}

.filter-btn:hover:not(.active) {
    background: #bdc3c7;
}

.todo-list {
    list-style: none;
    margin-bottom: 20px;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.todo-item:hover {
    background: #f9f9f9;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #95a5a6;
}

.todo-checkbox {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.todo-text {
    flex: 1;
    word-break: break-word;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #c0392b;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 4px;
}

#clear-completed {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

#clear-completed:hover {
    background: #7f8c8d;
}

footer {
    text-align: center;
    padding: 15px;
    background: #ecf0f1;
    color: #7f8c8d;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        margin: 10px;
    }
    
    .app-controls {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .filters {
        flex-wrap: wrap;
    }
}