/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f4;
    color: #333;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

.main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.task-list, .calendar {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex: 1 1 400px;
}

h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.add-task-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.add-task-form input[type="text"],
.add-task-form input[type="date"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    flex: 1;
    min-width: 150px;
}

.add-task-form button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-task-form button:hover {
    background: #2980b9;
}

.task-list ul {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.task-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.task-list li.done {
    text-decoration: line-through;
    color: #888;
}

.task-list a {
    margin-left: 10px;
    text-decoration: none;
    color: #555;
}

.task-list a:hover {
    color: #000;
}

#calendar {
    max-width: 900px;
    margin: 20px auto;
    height: 600px; /* important : donne une hauteur fixe sinon FullCalendar reste invisible */
    border: 1px solid #ddd;
    background-color: #fff;
}

/* --- AJOUT FULLCALENDAR : Retour à la ligne dans le titre des événements --- */
.fc .fc-event-title {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
}

.fc-daygrid-event {
    max-height: none !important;
    height: auto !important;
}
