:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --dark: #2d3436;
    --light: #f9f9fb;
    --success: #00b894;
    --weekend: #e17055;
    --timer-bg: #ffeaa7;
    --maths: #ff7675;
    --francais: #74b9ff;
    --histoire: #55efc4;
    --sciences: #a29bfe;
    --langues: #fdcb6e;
    --autre: #b2bec3;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
h1 { color: var(--primary); margin-bottom: 5px; }
.subtitle { color: #636e72; margin-bottom: 8px; text-align: center; }
.sync-status { color: #636e72; background: #fff; border: 1px solid #dfe6e9; border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; margin-bottom: 25px; }
.sync-status.ok { color: var(--success); }
.sync-status.error { color: #d63031; }
.sync-status.pending { color: var(--primary); }
.auth-card {
    width: 100%;
    max-width: 560px;
    background: white;
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    box-sizing: border-box;
}
.auth-help { color: #636e72; margin-top: -5px; }
.auth-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.secondary-btn { background: #00b894; }
.auth-error { color: #d63031; margin-top: 12px; font-weight: bold; }
.user-bar {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 16px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    box-sizing: border-box;
}
.logout-btn { background: #636e72; }
#appSection { width: 100%; }
.container { display: flex; gap: 20px; max-width: 1200px; width: 100%; flex-wrap: wrap; margin: 0 auto; }
.section-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); box-sizing: border-box; width: 100%; margin: 0 auto 20px auto; max-width: 1200px; }
h2 { margin-top: 0; color: var(--primary); border-bottom: 2px solid var(--light); padding-bottom: 10px; }
.recap-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.recap-table th, .recap-table td { border: 1px solid #dfe6e9; padding: 10px; text-align: left; }
.recap-table th { background-color: var(--primary); color: white; }
.progress-container { background: #eee; border-radius: 10px; height: 12px; width: 100%; margin: 10px 0 20px 0; overflow: hidden; }
.progress-bar { background: var(--success); height: 100%; width: 0%; transition: width 0.4s ease; }
.time-sum { font-weight: bold; color: var(--primary); margin-bottom: 10px; display: block; }
.calendar-section { flex: 1.5; min-width: 350px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.weekday { text-align: center; font-weight: bold; color: #b2bec3; padding: 5px 0; }
.day { border: 1px solid #dfe6e9; border-radius: 8px; min-height: 85px; padding: 5px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; background: #fff; }
.day:hover { border-color: var(--primary); background-color: #f1f0ff; }
.day.exam-zone { background-color: #ffeaa7 !important; border: 2px dashed #fdcb6e; }
.day.active { border: 2px solid var(--primary) !important; background-color: #e8e7ff !important; }
.day.is-weekend .day-number { color: var(--weekend); }
.exam-badge { background-color: #ff7675; color: white; font-size: 0.7rem; padding: 2px 4px; border-radius: 4px; margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-container { background-color: var(--timer-bg); border-radius: 8px; padding: 15px; margin-bottom: 20px; text-align: center; }
.timer-display { font-size: 2rem; font-weight: bold; margin: 10px 0; font-family: monospace; }
.todo-section { flex: 1; min-width: 320px; }
.todo-input-group { display: flex; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f2f6; }
.todo-item.completed span { text-decoration: line-through; color: #b2bec3; }
.subject-tag { font-size: 0.7rem; font-weight: bold; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; color: white; }
.time-badge { background: #f1f2f6; padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }
.weekend-section { border-left: 5px solid var(--weekend); display: none; }
.weekend-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f2f6; }
.weekend-item.completed { text-decoration: line-through; color: #b2bec3; }
input, select, button { padding: 8px; border: 1px solid #dfe6e9; border-radius: 6px; }
button { background: var(--primary); color: white; border: none; cursor: pointer; font-weight: bold; }
button:hover { opacity: 0.9; }
.delete-btn { background: #ff7675; padding: 2px 8px; font-size: 0.8rem; margin-left: auto; }
