/* ========== TDB BOE Custom Styles ========== */
:root {
    --tdb-primary: #0d6efd;
    --tdb-success: #198754;
    --tdb-danger:  #dc3545;
    --tdb-warning: #ffc107;
    --tdb-info:    #0dcaf0;
}

body { font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }

/* Cartes KPI */
.kpi-card {
    border: none;
    border-left: 4px solid var(--tdb-primary);
    transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.kpi-card .kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.kpi-card .kpi-label { color: #6c757d; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-card .kpi-icon { font-size: 2.2rem; opacity: 0.25; }

.kpi-card.kpi-success { border-left-color: var(--tdb-success); }
.kpi-card.kpi-warning { border-left-color: var(--tdb-warning); }
.kpi-card.kpi-danger  { border-left-color: var(--tdb-danger); }
.kpi-card.kpi-info    { border-left-color: var(--tdb-info); }

/* Tableaux */
.table-responsive { max-width: 100%; }
.table thead th {
    background: #f1f5f9;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.table tbody td { font-size: 0.875rem; vertical-align: middle; }
.table-hover tbody tr:hover { background-color: #f8f9fb; }

/* Boutons d'action compact dans les listes */
.btn-action {
    padding: 0.2rem 0.45rem;
    font-size: 0.8rem;
}

/* Filtres */
.filter-card { background: #fff; border-radius: 0.5rem; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

/* Login */
.login-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #073a8a 100%);
    padding: 1rem;
}
.login-card {
    background: #fff; border-radius: 1rem; padding: 2.2rem 2rem; width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.login-card h1 { font-size: 1.4rem; font-weight: 700; }

/* Statuts (badges) */
.badge-status { font-size: 0.75rem; padding: 0.35em 0.6em; }

/* Responsive : table en mode compact mobile */
@media (max-width: 768px) {
    .navbar-brand { font-size: 1rem; }
    .table tbody td { font-size: 0.8rem; padding: 0.4rem; }
    .kpi-card .kpi-value { font-size: 1.4rem; }
    h1, .h1 { font-size: 1.4rem; }
    h2, .h2 { font-size: 1.2rem; }
    .table-responsive { font-size: 0.85rem; }
}

/* Loading */
.spinner-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}

/* Print */
@media print {
    .no-print, .navbar, footer, .btn { display: none !important; }
    .container-fluid { padding: 0; }
    .card { border: 1px solid #ddd !important; }
}
