/* --- 1. VARIABLES & RESET --- */
:root {
    --primary: #4f46e5;       /* Indigo */
    --primary-hover: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-body);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
}

body.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- 2. LAYOUT STRUCTURE --- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.4rem;
    letter-spacing: -0.025em;
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.navbar-nav li a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.navbar-nav li a:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1rem;
}

.site-footer {
    text-align: center;
    padding: 1.5rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* --- 3. COMPONENTS GÉNÉRIQUES --- */
.main-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    font-size: 0.95rem;
}

/* S'assurer que le bouton primaire a un texte blanc lisible */
.btn-primary {
    background-color: var(--primary);
    color: #ffffff !important; /* Force le texte en blanc */
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-primary:hover { background: var(--primary-hover); }

/* Force la couleur de l'icône Material à hériter de la couleur du texte du bouton */
.btn-primary .material-symbols-outlined {
    color: inherit;
}

.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }

/* Tableaux */
.table-responsive { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th { background: #f8fafc; text-align: left; padding: 1rem; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border-color); }
td { padding: 1rem; border-bottom: 1px solid var(--border-color); }
