:root { --p: #3b82f6; --d: #1a2639; --bg: #f8fafc; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg); display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--d); color: white; position: fixed; height: 100vh; padding: 20px; }
.logo { font-size: 1.5rem; font-weight: bold; color: var(--p); margin-bottom: 30px; border-bottom: 1px solid #334155; padding-bottom: 10px; }
.nav-link { color: #94a3b8; text-decoration: none; display: flex; align-items: center; padding: 12px; border-radius: 10px; margin-bottom: 5px; }
.nav-link:hover, .active { background: var(--p); color: white; }
.nav-link i { margin-right: 12px; }
.main { margin-left: 280px; width: 100%; padding: 40px; }
.card { background: white; padding: 25px; border-radius: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 25px; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th { text-align: left; padding: 12px; border-bottom: 2px solid #f1f5f9; color: #64748b; }
td { padding: 12px; border-bottom: 1px solid #f1f5f9; }
input, select, textarea { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 5px; }
.btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: bold; text-decoration: none; }
.btn-p { background: var(--p); color: white; }
/* --- SECTION LOGIN (EMULTEC PRO) --- */
.login-body {
    background: #0c1a2b !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    text-align: center;
}

.login-card h2 { color: #1a2639; font-size: 26px; margin: 0; }
.login-card p.slogan { color: var(--p); font-weight: bold; font-size: 13px; text-transform: uppercase; margin: 5px 0 30px; letter-spacing: 2px; }

.error-box {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fecaca;
}
/* VARIABLES ET RESET */
:root {
    --p: #3b82f6; 
    --p-dark: #2563eb;
    --d: #1a2639; 
    --bg: #f8fafc;
    --text: #334155;
    --sidebar-w: 280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, sans-serif; }

body { background: var(--bg); color: var(--text); min-height: 100vh; }

/* --- SECTION LOGIN (S'active uniquement sur login.php) --- */
.login-body {
    background: #0c1a2b !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    text-align: center;
}

.login-card h2 { color: #1a2639; font-size: 28px; margin-bottom: 5px; }
.login-card p.slogan { color: var(--p); font-weight: bold; font-size: 13px; text-transform: uppercase; margin-bottom: 30px; letter-spacing: 2px; }

/* --- INTERFACE PRINCIPALE --- */
.sidebar { 
    width: var(--sidebar-w); 
    background: var(--d); 
    color: white; 
    position: fixed; 
    height: 100vh; 
    padding: 20px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100;
}

.main { 
    margin-left: var(--sidebar-w); 
    width: calc(100% - var(--sidebar-w)); 
    padding: 40px; 
}

.card { 
    background: white; 
    padding: 25px; 
    border-radius: 15px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    margin-bottom: 25px; 
}

/* NAVIGATION */
.logo { margin-bottom: 30px; border-bottom: 1px solid #334155; padding-bottom: 15px; }
.nav-link { 
    color: #94a3b8; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    padding: 12px; 
    border-radius: 10px; 
    margin-bottom: 5px; 
    transition: 0.3s;
}
.nav-link:hover, .nav-link.active { background: var(--p); color: white; }
.nav-link i { margin-right: 12px; width: 20px; text-align: center; }

/* BOUTONS ET FORMULAIRES */
input, select, textarea { 
    width: 100%; 
    padding: 12px; 
    border: 2px solid #eef2f6; 
    border-radius: 10px; 
    margin-top: 5px; 
    background: #f8fafc;
    font-size: 14px;
    outline: none;
}
input:focus { border-color: var(--p); background: white; }

.btn { 
    padding: 12px 20px; 
    border-radius: 10px; 
    border: none; 
    cursor: pointer; 
    font-weight: bold; 
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-p { background: var(--p); color: white; }
.btn-p:hover { background: var(--p-dark); transform: translateY(-2px); }

.badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; }

/* TABLES */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px; border-bottom: 2px solid #f1f5f9; color: #64748b; font-size: 13px; text-transform: uppercase; }
td { padding: 15px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }