/* VARIABLES DYNAMIQUES (Pilotées par le JS) */
:root {
    --p: #2563eb;
    --s: #0f172a;
    --radius: 8px;
    --font: 'Century Gothic', 'AppleGothic', 'CenturyGothic', sans-serif;
}

* { 
    box-sizing: border-box; 
    font-family: var(--font) !important; /* Force la Century Gothic partout */
}

body {
    margin: 0;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
}

.app-container { 
    display: flex; 
    min-height: 100vh; 
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: var(--s) !important;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.nav-link {
    padding: 12px 15px;
    border-radius: var(--radius) !important;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-active { 
    background-color: var(--p) !important; 
    color: white !important; 
    font-weight: bold;
}

/* CONTENU PRINCIPAL */
.content { 
    margin-left: 260px; 
    padding: 40px; 
    width: calc(100% - 260px); 
}

.card {
    background: white;
    padding: 25px;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

/* GRILLE ET FORMULAIRES */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 20px; 
}

.full-width { grid-column: 1 / -1; }

label { 
    display: block; 
    margin-bottom: 8px; 
    font-size: 12px; 
    font-weight: bold; 
    color: #64748b; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius) !important;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--p);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* BOUTONS */
.btn-primary {
    background-color: var(--p) !important;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius) !important;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }

.btn-small { 
    padding: 6px 12px; 
    font-size: 12px; 
    cursor: pointer; 
    border-radius: 4px; 
    border: 1px solid #e2e8f0; 
    background: #fff;
    color: #475569;
}

/* TABLEAUX */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: var(--radius) !important;
    border: 1px solid #e2e8f0;
}

table { 
    width: 100%; 
    border-collapse: collapse; 
}

th { 
    background: #f8fafc; 
    text-align: left; 
    padding: 15px; 
    border-bottom: 2px solid #edf2f7; 
    font-size: 13px;
    color: #64748b;
}

td { 
    padding: 15px; 
    border-bottom: 1px solid #edf2f7; 
    font-size: 14px;
}

tr:hover td { background-color: #f8fafc; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar { width: 70px; padding: 10px; }
    .nav-text { display: none; }
    .content { margin-left: 70px; padding: 20px; width: calc(100% - 70px); }
    .nav-link { justify-content: center; padding: 15px 0; }
}

/* IMPRESSION */
@media print {
    .no-print, .sidebar { display: none !important; }
    .content { margin-left: 0 !important; padding: 0 !important; width: 100% !important; }
    body { background: white; }
    .card { box-shadow: none !important; border: 1px solid #eee !important; margin: 0; }
}