/* SAS Suivi Valeurs Horaires - Styles */

:root {
    --primary: #0d6efd;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    font-size: 14px;
}

/* Login Page */
.login-container {
    max-width: 420px;
    margin: 80px auto;
}

.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-header {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 30px;
    text-align: center;
}

/* Dashboard */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Tableau de saisie */
.table-saisie {
    font-size: 13px;
}

.table-saisie th {
    background-color: #0d6efd;
    color: white;
    text-align: center;
    font-size: 12px;
    padding: 6px 4px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-saisie td {
    padding: 2px;
    text-align: center;
    vertical-align: middle;
}

.table-saisie input[type="number"] {
    width: 70px;
    padding: 3px 5px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.table-saisie input[type="number"]:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.table-saisie .heure-col {
    background-color: #e8f0fe;
    font-weight: 600;
    width: 50px;
}

.table-saisie .arrivee-header {
    background-color: #198754;
}

.table-saisie .depart-header {
    background-color: #dc3545;
}

.table-saisie .max-row {
    background-color: #fff3cd;
    font-weight: 700;
}

.table-saisie .min-row {
    background-color: #d1ecf1;
    font-weight: 700;
}

.table-saisie .heure-max {
    color: #856404;
    font-style: italic;
}

.table-saisie .heure-min {
    color: #0c5460;
    font-style: italic;
}

/* Section headers */
.section-arrivee {
    border-left: 4px solid #198754;
    padding-left: 10px;
}

.section-depart {
    border-left: 4px solid #dc3545;
    padding-left: 10px;
}

/* Container saisie scrollable */
.saisie-container {
    overflow-x: auto;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Badge validation */
.badge-valide {
    background-color: #198754;
}

.badge-en-cours {
    background-color: #ffc107;
    color: #333;
}

/* Tabs navigation pour arrivées/départs */
.nav-section .nav-link {
    font-weight: 500;
    padding: 8px 20px;
}

.nav-section .nav-link.active {
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .table-saisie input[type="number"] {
        width: 55px;
        font-size: 11px;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .no-print {
        display: none !important;
    }

    .table-saisie th {
        background-color: #333 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Recap tables */
.recap-table th {
    background-color: #343a40;
    color: white;
    font-size: 12px;
    padding: 6px;
}

.recap-table td {
    font-size: 12px;
    padding: 4px 6px;
}

/* Status indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-dot.active { background-color: #198754; }
.status-dot.inactive { background-color: #dc3545; }

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
}

/* Recap MAX/MIN headers */
.max-header {
    background-color: #dc3545 !important;
    color: white !important;
}

.min-header {
    background-color: #0d6efd !important;
    color: white !important;
}

.recap-table .table-primary td {
    background-color: rgba(13, 110, 253, 0.08);
}

.recap-table .table-dark td,
.recap-table .table-dark {
    background-color: #212529;
    color: #fff;
}

.recap-table .table-dark small {
    color: #adb5bd;
}

/* Arrivee/Depart row styling in recap */
.arrivee-row td:first-child {
    border-left: 4px solid #198754;
}

.depart-row td:first-child {
    border-left: 4px solid #dc3545;
}

/* Nav tabs improvements */
.nav-section {
    flex-wrap: wrap;
}

.nav-section .nav-link {
    font-size: 13px;
    padding: 6px 12px;
}

/* Better table hover */
.recap-table tbody tr:hover:not(.table-dark) {
    background-color: rgba(13, 110, 253, 0.06);
}
