/* Bootstrap 5 — habillage épuré par-dessus Comnja */
:root {
    --bg: #f8f9fa;
    --card: #ffffff;
    --text: #212529;
    --muted: #6c757d;
    --accent: #198754;
    --accent-hover: #157347;
    --danger: #dc3545;
    --border: #dee2e6;
    --input-bg: #ffffff;
    --bar: #198754;
    --bar-text: #ffffff;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar {
    background: var(--bar);
    color: var(--bar-text);
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.topbar a, .topbar summary { color: var(--bar-text); }
.topbar .menu-list {
    background: #fff;
    color: #212529;
    border: 1px solid #dee2e6;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
}
.topbar .menu-list a { color: #212529; }
.topbar .menu-list a:hover { background: #f8f9fa; }

.page { max-width: 1100px; margin: 1.25rem auto; padding: 0 1rem 2rem; }

.card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.alert { border-radius: .375rem; }
.alert-ok { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }

button, .btn {
    background: #198754;
    color: #fff;
    border-radius: .375rem;
    font-weight: 600;
    box-shadow: none;
}
button:hover, .btn:hover { background: #157347; color: #fff; }
button.linkish {
    background: none;
    color: #dc3545;
    width: auto;
    margin: 0;
    min-height: auto;
    padding: 0;
    font-weight: 600;
}

.filter-bar select,
.filter-bar button,
.filter-bar .btn {
    width: auto;
    margin: 0;
}

table.data {
    width: 100%;
    border-collapse: collapse;
}
table.data th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}
table.data td { border-bottom: 1px solid #f1f3f5; }

.nav-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
}
.nav-box a { color: #198754; }
.nav-box a:hover { background: #f8f9fa; }

.view-switch a {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #212529;
    border-radius: .375rem;
}
.view-switch a.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.cal-tag { border-radius: .25rem; }
.kpi .card { border: 1px solid #dee2e6; }

.auth-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.06);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea,
.form-control,
.form-select {
    background: #fff !important;
    border: 1px solid #d7dde3 !important;
    border-radius: 14px !important;
    min-height: 48px;
    padding: .75rem 1.1rem !important;
    box-shadow: none !important;
}
input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.12) !important;
}

/* Ombres + transitions */
.card,
.auth-card,
.kpi .card {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 20px rgba(16, 24, 40, .06);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover,
.kpi .card:hover {
    box-shadow: 0 2px 6px rgba(16, 24, 40, .06), 0 14px 28px rgba(16, 24, 40, .08);
}

.topbar {
    box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(16, 24, 40, .12);
}

.topbar .menu-list {
    box-shadow: 0 10px 30px rgba(16, 24, 40, .14);
    transition: opacity .15s ease, transform .15s ease;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea,
.form-control,
.form-select {
    transition: border-color .18s ease, box-shadow .18s ease;
}
input:hover,
select:hover,
textarea:hover {
    border-color: #b8c0c8 !important;
}

button,
.btn,
.view-switch a,
.nav-box a {
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .15s ease;
}
button:hover,
.btn:hover {
    box-shadow: 0 6px 14px rgba(25, 135, 84, .28);
    transform: translateY(-1px);
}
button:active,
.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.nav-box {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.cal-cell .cal-sq,
.cal-tag {
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.cal-cell:hover .cal-sq {
    box-shadow: 0 6px 16px rgba(16, 24, 40, .1);
    transform: translateY(-2px);
}

.switch i,
.toggle {
    transition: background-color .18s ease;
}
.switch i:before {
    transition: transform .18s ease;
}

table.data tbody tr {
    transition: background-color .15s ease;
}
table.data tbody tr:hover {
    background: #f8f9fa;
}

a {
    transition: color .15s ease;
}

form input:not([type]),
form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.grid-form input:not([type="checkbox"]) {
    background: #fff !important;
    border: 1px solid #d7dde3 !important;
    border-radius: 14px !important;
    min-height: 48px;
    padding: .75rem 1.1rem !important;
    box-shadow: none !important;
}

/* champs globaux — toutes pages */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="image"]):not([type="reset"]),
select,
textarea,
.form-control,
.form-select {
    width: 100%;
    min-height: 48px;
    padding: .75rem 1.1rem !important;
    border-radius: 14px !important;
    border: 1px solid #d7dde3 !important;
    background: #fff !important;
    color: #212529 !important;
    box-shadow: none !important;
    outline: none;
}
input:focus, select:focus, textarea:focus, .form-control:focus, .form-select:focus {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.12) !important;
}
