/* Variables globales */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #f3f4f6;
    --surface: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

/* Base */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px 50px 20px;
}

/* Typographie & Utilitaires */
.page-title { margin-bottom: 25px; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-bold { font-weight: bold; font-size: 1.1em; }
.text-small { font-size: 0.8em; font-weight: normal; }
.text-center { text-align: center; }

/* Navbar */
.navbar {
    background: var(--surface);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.navbar h1 { margin: 0; font-size: 1.5rem; color: var(--primary); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--text-muted); transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }
.btn-logout { color: var(--danger) !important; }

/* Cartes */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.card-title {
    margin-top: 0;
    color: var(--text-main);
    font-weight: 500;
    border-bottom: 2px solid var(--bg);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Formulaires */
.form-group { margin-bottom: 15px; }
.form-group-large { margin-bottom: 25px; }
label { display: block; margin-bottom: 5px; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
input, select {
    width: 100%; padding: 10px; border: 1px solid var(--border);
    border-radius: 8px; box-sizing: border-box; font-family: 'Poppins', sans-serif;
    transition: all 0.3s; background-color: #f9fafb;
}
input:focus, select:focus {
    outline: none; border-color: var(--primary); background-color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Boutons */
.btn {
    display: inline-block; width: 100%; padding: 12px; background: var(--primary);
    color: white; border: none; border-radius: 8px; font-weight: 500;
    cursor: pointer; transition: background 0.3s; font-family: 'Poppins', sans-serif;
    text-align: center;
}
.btn:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #059669; }

/* Layouts (Grilles et Flexbox) */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-2-time { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.align-end { align-items: end; }
.flex-container { display: flex; gap: 20px; flex-wrap: wrap; }
.flex-large { flex: 2; min-width: 400px; }
.flex-small { flex: 1; min-width: 300px; height: fit-content; }

/* Page de connexion (spécifique) */
.login-wrapper { max-width: 400px; margin: 60px auto; }
.login-card { padding: 40px 30px; }
.login-header p { color: var(--text-muted); text-align: center; margin-bottom: 30px; margin-top: -5px;}

/* Tableaux */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background-color: var(--bg); color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.table tr:hover { background-color: #f9fafb; }

/* FullCalendar Customisation */
#calendar { background: var(--surface); padding: 10px; border-radius: 12px; }
.fc .fc-toolbar-title { font-size: 1.2em; color: var(--text-main); }
.fc-theme-standard .fc-scrollgrid { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

/* Alertes Flash */
.flash-messages { list-style: none; padding: 0; margin-bottom: 20px; }
.flash-messages li { padding: 15px; border-radius: 8px; margin-bottom: 10px; font-weight: 500; text-align: center; }
.flash-success { background-color: #d1fae5; color: #065f46; border: 1px solid #34d399; }
.flash-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #f87171; }