/* =============================================================
   Labo Conseil RB - Suivi Agroalimentaire
   Styles personnalisés
   ============================================================= */

/* Variables */
:root {
    --lcrb-primary: #0d6efd;
    --lcrb-secondary: #6c757d;
    --lcrb-success: #198754;
    --lcrb-bg: #f8f9fa;
}

/* Global */
body {
    background-color: var(--lcrb-bg);
    font-size: 0.9rem;
}

/* Navbar compact sur mobile */
.navbar-brand {
    font-weight: 600;
}

.navbar .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
}

/* Cards */
.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    font-weight: 600;
}

/* Tables */
.table th {
    font-size: 0.8rem;
    white-space: nowrap;
}

.table td {
    font-size: 0.85rem;
    vertical-align: middle;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* Formulaires */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

fieldset legend {
    font-size: 1rem;
}

/* Boutons compacts */
.btn-sm {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}

.btn-group-sm .btn {
    padding: 0.2rem 0.4rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
}

/* Footer */
footer {
    font-size: 0.8rem;
}

/* Select2 adjustments */
.select2-container .select2-selection--single {
    height: 38px !important;
    padding: 4px 0;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--lcrb-login-start, #667eea) 0%, var(--lcrb-login-end, #764ba2) 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-card .card-body {
    padding: 2rem;
}

.login-logo {
    font-size: 3rem;
    color: var(--lcrb-primary);
}

/* Responsive mobile */
@media (max-width: 576px) {
    main.container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    .table td, .table th {
        padding: 0.3rem 0.4rem;
        font-size: 0.78rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.15rem 0.3rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .navbar .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.82rem;
    }
}

/* Print */
@media print {
    .navbar, footer, .btn, .pagination, form, .card-header {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 0.7rem;
    }
    
    body {
        background: white;
    }
}

/* Animation flash messages */
.alert {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sticky filter bar */
.card.mb-3 {
    position: sticky;
    top: 56px;
    z-index: 100;
    background: white;
}
