/* ===== Base ===== */
:root {
    --color-travaille: #17a2b8;
    --color-rtt:       #ffc107;
    --color-cp:        #fd7e14;
    --color-ferie:     #6c757d;
    --color-maladie:   #28a745;
    --color-maternite: #e83e8c;
    --color-famille:   #d4ac0d;
    --color-sans_solde:#dc3545;
}

body { background-color: #f5f6fa; }
.container-fluid { max-width: 1400px; }

/* ===== Navbar ===== */
.navbar { box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.navbar-brand { font-size: 1.1rem; letter-spacing: .02em; }

/* ===== KPI cards ===== */
.kpi-card { border-left: 4px solid #dee2e6 !important; transition: transform .15s; }
.kpi-card:hover { transform: translateY(-2px); }

/* ===== Badge-day (in summary table) ===== */
.badge-day {
    display: inline-block;
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: .8rem;
    font-weight: 600;
    text-align: center;
    background: #e9ecef;
    color: #495057;
}
.badge-day.travaille { background: var(--color-travaille); color: #fff; }
.badge-day.rtt       { background: var(--color-rtt);       color: #000; }
.badge-day.cp        { background: var(--color-cp);        color: #fff; }
.badge-day.ferie     { background: var(--color-ferie);     color: #fff; }
.badge-day.maladie   { background: var(--color-maladie);   color: #fff; }
.badge-day.maternite { background: var(--color-maternite); color: #fff; }
.badge-day.famille   { background: var(--color-famille);   color: #000; }
.badge-day.sans_solde{ background: var(--color-sans_solde);color: #fff; }

/* ===== Month table ===== */
.month-table { font-size: .875rem; }
.month-table th { white-space: nowrap; }
.month-table td { vertical-align: middle; }

.weekend-row { background-color: #e9ecef !important; }
.weekend-row td { color: #888 !important; }
.ferie-row { background-color: #f0f0f0; }
.today-row { box-shadow: inset 3px 0 0 #0d6efd; background-color: #eef3ff !important; }

.week-cell { background: #f8f9fa; border-right: 2px solid #dee2e6 !important; }

.editable-cell {
    cursor: pointer;
    transition: background .12s;
    min-width: 50px;
}
.editable-cell:hover { background: rgba(13,110,253,.12) !important; }
.weekend-row .editable-cell:hover { background: rgba(13,110,253,.18) !important; }

.weekend-cell          { cursor: default; background: #e9ecef !important; }
.weekend-editable-cell { cursor: pointer;  background: #e9ecef !important; transition: background .12s; min-width: 50px; }
.weekend-editable-cell:hover { background: rgba(80,80,80,.18) !important; }
.ferie-cell   { cursor: default; }
.locked-cell  { cursor: not-allowed; background: #f8f9fa; opacity: .8; }

.day-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    transition: transform .1s;
}
.day-mark:hover { transform: scale(1.1); }

.day-mark.planned {
    background: transparent !important;
    border: 2px dashed;
    font-size: .65rem;
    font-weight: 700;
    font-style: italic;
    opacity: .9;
}

.notes-input {
    font-size: .78rem;
    padding: 2px 6px;
    min-width: 120px;
}
.notes-input:focus { background: #fff !important; border-color: #86b7fe !important; box-shadow: 0 0 0 .2rem rgba(13,110,253,.15) !important; }

/* Active type indicator */
#active-type-banner {
    transition: all .2s;
}
#active-type-banner.has-type {
    border-left: 4px solid var(--active-color, #0d6efd);
}

/* ===== Summary table ===== */
.summary-table th, .summary-table td { font-size: .85rem; }

/* ===== Toast ===== */
.toast-msg {
    background: rgba(40,40,40,.92);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: .85rem;
    margin-top: 6px;
    animation: fadeInUp .2s ease;
}
.toast-msg.success { border-left: 4px solid #28a745; }
.toast-msg.error   { border-left: 4px solid #dc3545; }

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

/* ===== Overview table ===== */
.overview-table th, .overview-table td { vertical-align: middle; font-size: .82rem; }
.overview-table tbody tr:hover { filter: brightness(.97); }

/* ===== Signature pad ===== */
.sig-wrapper {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}
.sig-canvas {
    display: block;
    width: 100%;
    height: 150px;
    cursor: crosshair;
    touch-action: none;
}
.sig-preview-img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #fff;
    padding: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .month-table { font-size: .75rem; }
    .day-mark { width: 22px; height: 22px; font-size: .7rem; }
    .notes-input { min-width: 80px; }
}
