:root {
    --primary: #6c5ce7;
    --secondary: #a29bfe;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass: rgba(255, 255, 255, 0.9);
    --glass-card: rgba(255, 255, 255, 0.65);
    --text: #2d3436;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Structure Principale */
.container {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    width: 90%;
    max-width: 1200px;
    margin: 20px 0;
    animation: fadeIn 0.6s ease;
}

h1, h2, h3 { color: var(--primary); text-align: center; margin-top: 0; }
a { text-decoration: none; color: inherit; }

/* Boutons & Inputs */
input, select, textarea, button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.1);
    box-sizing: border-box;
    font-family: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--primary); }

button {
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, background 0.2s;
}
button:hover { transform: translateY(-2px); background: #5649c0; }
.btn-small { width: auto; padding: 5px 15px; font-size: 0.9rem; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* Login Tabs */
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.tab-btn { background: rgba(255,255,255,0.3); color: #fff; width: auto; }
.tab-btn.active { background: #fff; color: var(--primary); }
.form-box { display: none; }
.form-box.active { display: block; animation: slideUp 0.4s; }

/* CALENDRIER STYLE */
.calendar-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}
.day-col {
    background: var(--glass-card);
    border-radius: 15px;
    padding: 15px;
    min-height: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.day-header {
    text-align: center;
    font-weight: bold;
    color: #555;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Devoirs (Cartes) */
.homework-card {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 0.95rem;
    position: relative;
    transition: transform 0.2s;
}
.homework-card:hover { transform: scale(1.02); }
.hw-author { font-size: 0.75rem; color: #888; margin-bottom: 4px; font-weight: 700; text-transform: uppercase; }
.delete-hw { position: absolute; top: 5px; right: 5px; color: #ff7675; cursor: pointer; background: none; width: auto; padding: 0; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center; z-index: 999;
}
.modal { background: white; padding: 25px; border-radius: 15px; width: 90%; max-width: 450px; animation: slideUp 0.3s; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.5); border-radius: 10px; overflow: hidden; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
th { background: rgba(108, 92, 231, 0.1); color: var(--primary); }

/* Utility */
.alert { padding: 10px; background: #dfe6e9; border-radius: 8px; margin-bottom: 15px; text-align: center; color: #2d3436; }
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
@keyframes slideUp { from {opacity:0; transform:translateY(20px);} to {opacity:1; transform:translateY(0);} }