/* www/custom.css — Delta Engineering Group */
html { font-size: 14px; }
:root { --delta-navy: #4B4886; --delta-orange: #E8672E; }
body { background-color: #f5f6fa; font-size: 0.95rem; }

h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.05rem; font-weight: 600; }

.app-header { background-color: var(--delta-navy); color: #fff; padding: 8px 20px; }
.app-logo { height: 30px; margin-right: 10px; border-radius: 4px; }
.app-title { font-weight: 600; font-size: 1rem; }

.app-body { display: flex; min-height: calc(100vh - 56px); }
.app-sidebar { width: 210px; background-color: #fff; border-right: 1px solid #e3e3e3; padding: 12px 0; flex-shrink: 0; max-height: calc(100vh - 56px); overflow-y: auto; position: sticky; top: 56px; }
.app-content { flex: 1; padding: 18px; overflow-x: auto; }

.nav-item-btn { display: block; width: 100%; text-align: left; border: none; background: none; padding: 9px 18px; font-size: 0.85rem; color: #333; border-radius: 0; }
.nav-item-btn:hover { background-color: #f0f0f5; }
.nav-item-btn.active { background-color: var(--delta-navy); color: #fff; font-weight: 600; }
.nav-section-label { padding: 14px 18px 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #999; }

.login-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--delta-navy), var(--delta-orange)); padding: 20px; }
.login-card { background: #fff; padding: 40px 30px; border-radius: 10px; width: 100%; max-width: 360px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.login-logo { height: 70px; margin-bottom: 10px; }

.kpi-card { border-radius: 8px; padding: 14px; color: #fff; margin-bottom: 10px; }
.kpi-title { font-size: 0.75rem; font-weight: 600; opacity: 0.9; }
.kpi-value { font-size: 1.4rem; font-weight: 700; margin-top: 4px; }
.kpi-primary { background-color: #2E75B6; }
.kpi-success { background-color: #548235; }
.kpi-warning { background-color: #BF8F00; }
.kpi-secondary { background-color: var(--delta-navy); }
.kpi-danger { background-color: #C00000; }

.kpi-card-light { background: #F4F3F0; border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.kpi-title-light { font-size: 0.75rem; color: #6c757d; }
.kpi-value-light { font-size: 1.4rem; font-weight: 500; margin-top: 4px; }
.project-ring-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 14px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; }
.project-ring-name { font-weight: 500; font-size: 0.85rem; }
.project-ring-status { font-size: 0.74rem; color: #6c757d; margin-top: 2px; }

.icon-btn { border: none; background: transparent; width: 26px; height: 26px; border-radius: 6px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; margin-left: 3px; transition: background-color 0.15s; font-size: 13px; }
.icon-btn:hover { background-color: #f1f1f1; }
.icon-btn-secondary { color: #6c757d; }
.icon-btn-secondary:hover { color: #333; }
.icon-btn-danger { color: #C00000; }
.icon-btn-danger:hover { background-color: #fdeaea; }
.icon-btn-success { color: #548235; }
.icon-btn-success:hover { background-color: #eaf3e6; }
.icon-btn-primary { color: #2E75B6; }
.icon-btn-primary:hover { background-color: #e8f1fa; }

.status-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; color: #fff; white-space: nowrap; }
.badge-pending    { background-color: #BF8F00; }
.badge-approved   { background-color: #548235; }
.badge-rejected   { background-color: #C00000; }
.badge-done       { background-color: #6c757d; }
.badge-inprogress { background-color: #2E75B6; }
.badge-late       { background-color: #C00000; }
.badge-finished-late { background-color: #E8672E; }
.badge-task-notstarted { background-color: #adb5bd; }
.badge-task-inprogress { background-color: #4B4886; }
.badge-task-done      { background-color: #548235; }
.badge-task-donelate  { background-color: #E8672E; }
.badge-task-late      { background-color: #C00000; }
.badge-upcoming   { background-color: #8a8fc7; }
.badge-muted      { background-color: #adb5bd; }

/* Cartes résumées (Projets, Budget, Employés, etc.) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.summary-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; }
.summary-card-header { padding: 10px 14px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: flex-start; }
.summary-card-body { padding: 10px 14px; flex: 1; }
.summary-card-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 2px 0; }
.employee-role-block { padding: 6px 0; border-bottom: 1px dashed #eee; font-size: 0.82rem; }
.employee-role-block:last-of-type { border-bottom: none; }
.employee-role-project { color: #888; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.02em; }
.employee-role-position { font-weight: 600; margin-top: 1px; }
.employee-role-rate { color: #555; margin-top: 1px; }
.employee-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.checkbox { padding: 8px 10px; border-radius: 6px; margin-bottom: 2px !important; }
.checkbox:hover { background-color: #f7f7fa; }
.checkbox label { display: flex !important; align-items: center; font-size: 0.9rem; cursor: pointer; }
.checkbox input[type="checkbox"] { margin-right: 10px; width: 16px; height: 16px; }
.summary-card-footer { padding: 8px 14px; border-top: 1px solid #eee; }

.mini-progress { background: #e9ecef; border-radius: 6px; height: 8px; overflow: hidden; margin: 4px 0; }
.mini-progress-fill { height: 100%; border-radius: 6px; }

.add-button-row { margin-bottom: 16px; }

@media (max-width: 768px) {
  .app-body { flex-direction: column; }
  .app-sidebar { width: 100%; display: flex; overflow-x: auto; overflow-y: visible; max-height: none; position: static; border-right: none; border-bottom: 1px solid #e3e3e3; padding: 6px; -webkit-overflow-scrolling: touch; }
  .nav-item-btn { width: auto; white-space: nowrap; padding: 10px 16px; margin-right: 4px; border-radius: 6px; }
  .nav-section-label { display: none; }
  .app-content { padding: 12px; }
  .card-grid { grid-template-columns: 1fr; }
}
.btn-sm, .btn-sm.icon-btn { min-height: unset; }
.form-control, .form-select { min-height: 34px; padding-top: 4px; padding-bottom: 4px; }
.form-group, .shiny-input-container { margin-bottom: 10px !important; }
label { margin-bottom: 3px !important; font-size: 0.88rem; }

.spinner { display: inline-block; width: 28px; height: 28px; border: 3px solid #e0e0e0; border-top-color: #E8672E;
  border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 0; gap: 12px; color: #6c757d; font-size: 0.85rem; }
