:root {
    --primary: #e67e22;
    --primary-dark: #d35400;
    --bg: #f8f9fa;
    --card-shadow: 0 2px 8px rgba(0,0,0,.08);
    --bottom-nav-h: 64px;
}

/* ---- Thème général ---- */
body {
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
}

.navbar.bg-primary { background-color: var(--primary) !important; }

/* ---- Navigation bas (mobile) ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-size: 0.65rem;
    gap: 2px;
    transition: color .2s;
}

.bottom-nav-item i { font-size: 1.3rem; }

.bottom-nav-item.active,
.bottom-nav-item:hover { color: var(--primary); }

/* ---- Cartes dashboard ---- */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

/* ---- Tableaux ---- */
.table-responsive { border-radius: 10px; overflow: hidden; }
.table { margin-bottom: 0; }
.table thead th { background: var(--primary); color: #fff; border: none; font-weight: 600; }
.table tbody tr:hover { background: #fff8f2; }

/* ---- Formulaires ---- */
.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(230,126,34,.25);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ---- Badges personnalisés ---- */
.badge { font-size: 0.78em; padding: .35em .6em; }

/* ---- Page header ---- */
.page-header {
    background: #fff;
    padding: 1rem 1.25rem .75rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1.25rem;
}
.page-header h1 { font-size: 1.2rem; font-weight: 700; color: #333; margin: 0; }

/* ---- Cards list items ---- */
.item-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: .75rem;
    padding: .9rem 1rem;
    border-left: 4px solid var(--primary);
}

/* ---- Footer ---- */
.footer-bar {
    background: #fff;
    border-top: 1px solid #eee;
    padding: .75rem 0;
    margin-top: 2rem;
}

/* ---- PWA Install Banner ---- */
.pwa-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 8px);
    left: 12px; right: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    padding: 1rem 1.25rem;
    z-index: 1040;
    border: 1px solid #ddd;
}

/* ---- Justificatif preview ---- */
.justif-preview { max-width: 120px; max-height: 90px; object-fit: cover; border-radius: 6px; }

/* ---- Filtres ---- */
.filter-bar {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

/* ---- Progress bar ---- */
.progress { height: 8px; border-radius: 4px; }

/* ---- Responsive tweaks ---- */
@media (max-width: 576px) {
    .form-card { padding: 1rem; border-radius: 0; box-shadow: none; }
    .container-fluid { padding-left: .75rem; padding-right: .75rem; }
    h1.display-6 { font-size: 1.3rem; }
}

/* ---- Animations ---- */
.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
