/* ==============================================
   Saisie paie — Styles spécifiques
   ============================================== */

.saisie-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
    margin-top: 1rem;
}

.saisie-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

.saisie-table thead th {
    background: #f8f9fa;
    padding: 0.6rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
    border-bottom: 2px solid #e2e5ea;
    white-space: nowrap;
    text-align: center;
}

.saisie-table thead th:first-child { text-align: left; padding-left: 1rem; }

.saisie-table thead .th-group { color: #fff; font-size: 0.7rem; padding: 0.35rem 0.5rem; }
.saisie-table thead .th-group.heures { background: #2d5be3; }
.saisie-table thead .th-group.absences { background: #e67e22; }
.saisie-table thead .th-group.conges { background: #27ae60; }
.saisie-table thead .th-group.divers { background: #7f8fa6; }

.saisie-table tbody tr { border-bottom: 1px solid #f0f2f5; transition: background 0.15s; }
.saisie-table tbody tr:hover { background: #f8f9fb; }
.saisie-table tbody td { padding: 0.5rem 0.35rem; vertical-align: middle; }
.saisie-table tbody td:first-child { padding-left: 1rem; }

.emp-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 140px; }
.emp-info .emp-name { font-weight: 700; font-size: 0.88rem; color: #1a1a2e; white-space: nowrap; }
.emp-info .emp-poste { font-size: 0.73rem; color: #7f8fa6; }

.saisie-table input, .saisie-table select {
    padding: 0.4rem 0.45rem;
    border: 1px solid #e2e5ea;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fafbfc;
    transition: border-color 0.2s;
}

.saisie-table input:focus, .saisie-table select:focus {
    outline: none;
    border-color: #2d5be3;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(45,91,227,0.1);
}

.saisie-table input[type="number"] { width: 70px; text-align: right; }
.saisie-table input[type="date"] { width: 130px; }
.saisie-table input[type="text"] { width: 120px; }
.saisie-table select { width: 120px; }

/* Sticky save bar */
.saisi-bar {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    position: sticky;
    bottom: 1rem;
    z-index: 10;
}

.saisi-bar input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e5ea;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    width: 220px;
}

.saisi-bar input:focus { outline: none; border-color: #2d5be3; }

/* Locked rows */
.saisie-table tbody tr.locked { background: #f8f9fa; }
.saisie-table tbody tr.locked:hover { background: #f0f1f3; }

.saisie-table tbody tr.locked input,
.saisie-table tbody tr.locked select {
    background: #eef0f3;
    color: #999;
    border-color: #e2e5ea;
    cursor: not-allowed;
}

.lock-icon { font-size: 0.8rem; }
.lock-label { color: #c0392b; font-weight: 600; font-size: 0.7rem; }
.badge-locked { background: #fce4e4; color: #c0392b; font-size: 0.72rem; white-space: nowrap; }
.btn-lock { background: #e67e22; color: #fff; white-space: nowrap; font-size: 0.75rem; }
.td-lock { text-align: center; }

/* Responsive */
@media (max-width: 768px) {
    .saisie-table-wrap { border-radius: 8px; }
    .saisi-bar { flex-direction: column; align-items: stretch; }
    .saisi-bar input { width: 100%; }
}
