/* ============================================================
   CERVAPEX — Feuille de style principale
   Couleurs : #722755 (primaire) · #FFA800 (secondaire)
   Police   : Alexandria (Google Fonts)
   Approche : Desktop-first, SPA monopage
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --primary:        #722755;
  --primary-dark:   #5a1e42;
  --primary-light:  #8f3469;
  --primary-muted:  rgba(114, 39, 85, 0.08);
  --secondary:      #FFA800;
  --secondary-dark: #e09500;
  --secondary-muted:rgba(255, 168, 0, 0.15);

  --text:           #1a1a2e;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;

  --bg:             #f7f5f9;
  --bg-week:         #ffdfa1;
  --card:           #ffffff;
  --border:         #e5e7eb;
  --border-light:   #f3f4f6;

  --danger:         #dc2626;
  --danger-muted:   rgba(220, 38, 38, 0.08);
  --success:        #16a34a;
  --success-muted:  rgba(22, 163, 74, 0.08);

  --sidebar-w:      248px;
  --radius:         10px;
  --radius-lg:      14px;
  --shadow:         0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:      0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:      0 20px 60px rgba(0,0,0,0.25);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Alexandria', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }

.hidden { display: none !important; }


/* ══════════════════════════════════════════════════════════════
   PAGE DE CONNEXION
   ══════════════════════════════════════════════════════════════ */

#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  padding: 24px;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img {
  height: 56px;
  object-fit: contain;
}
.login-brand-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
}
.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

.login-error {
  background: var(--danger-muted);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}


/* ══════════════════════════════════════════════════════════════
   LAYOUT APPLICATION
   ══════════════════════════════════════════════════════════════ */

#app {
  display: flex;
  min-height: 100vh;
}

/* ── Barre latérale ─────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  min-height: 72px;
}
.sidebar-logo img {
  height: 40px;
  object-fit: contain;
  max-width: 100%;
}
.sidebar-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  padding: 12px 20px 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 20px;
  cursor: pointer;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s, border-left-color 0.15s;
  border-left: 3px solid transparent;
  user-select: none;
  position: relative;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}
.nav-item.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-left-color: var(--secondary);
}
.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s;
}
.nav-item.active svg,
.nav-item:hover svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.sidebar-user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  margin-bottom: 2px;
}
.sidebar-user-role {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

/* ── Contenu principal ──────────────────────────────────────── */
#main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  background: var(--card);
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 64px;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.page-body {
  padding: 28px 32px;
  flex: 1;
}


/* ══════════════════════════════════════════════════════════════
   CARTES DE STATISTIQUES
   ══════════════════════════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card.c-km     { border-top-color: #64748b; }
.stat-card.c-ik     { border-top-color: var(--primary); }
.stat-card.c-frais  { border-top-color: var(--secondary); }
.stat-card.c-total  { border-top-color: var(--success); }

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 5px;
}


/* ══════════════════════════════════════════════════════════════
   GRAPHIQUES
   ══════════════════════════════════════════════════════════════ */

.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}
.chart-wrap {
  position: relative;
}


/* ══════════════════════════════════════════════════════════════
   TABLEAUX
   ══════════════════════════════════════════════════════════════ */

.table-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.table-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--card);
}
.table-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.855rem;
  white-space: nowrap;
}

thead th {
  padding: 9px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: #faf9fb;
  border-bottom: 1px solid var(--border);
}
thead th.td-right { text-align: right; }
thead th.td-center { text-align: center; }

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fdf9fc; }

tbody td {
  padding: 9px 16px;
  vertical-align: middle;
}
.td-right { text-align: right !important; }
.td-center { text-align: center !important; }
.td-muted  { color: var(--text-muted); }

/* Ligne totaux */
.row-total {
  background: #fdf4f9 !important;
  font-weight: 700;
}
.row-total td { color: var(--primary); border-top: 2px solid var(--border); }

/* Cellules montants */
.amt     { font-weight: 600; }
.amt-ik  { color: var(--primary); }
.amt-pos { color: var(--success); }
.amt-0   { color: var(--text-light); font-weight: 400; }

/* ── Zébrage — tableaux généraux ────────────────────────────── */
.table-card table:not(.no-zebra) tbody tr:not(.row-total):nth-child(even) {
  background: #fff2fa;
}
/* Zébrage — table frais (séparateurs de semaine → classes manuelles) */
.table-card table.no-zebra tbody tr.row-even {
  background: #fff2fa;
}

/* ── Séparateurs de semaine ─────────────────────────────────── */
tr.week-sep {
  background: var(--bg-week) !important;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
}
tr.week-sep td {
  padding: 5px 16px;
}
.week-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  margin-right: 10px;
}
.week-range {
  font-size: 0.7rem;
  color: var(--text-muted);
}


/* ══════════════════════════════════════════════════════════════
   FILTRES
   ══════════════════════════════════════════════════════════════ */

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* ══════════════════════════════════════════════════════════════
   FORMULAIRES
   ══════════════════════════════════════════════════════════════ */

.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Alexandria', sans-serif;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
}

.form-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

/* ── Checkbox ───────────────────────────────────────────────── */
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.875rem;
}
.check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}


/* ══════════════════════════════════════════════════════════════
   BOUTONS
   ══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Alexandria', sans-serif;
  font-size: 0.855rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-secondary { background: var(--secondary); color: #1a1a2e; }
.btn-secondary:hover:not(:disabled) { background: var(--secondary-dark); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }

.btn-sm { padding: 5px 11px; font-size: 0.78rem; }
.btn-xs { padding: 3px 8px;  font-size: 0.72rem; }
.btn-block { width: 100%; }

.btn-icon {
  padding: 6px 7px;
  border-radius: 6px;
  line-height: 1;
}


/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-muted); color: var(--primary); }
.badge-warning  { background: var(--secondary-muted); color: #8a5c00; }
.badge-success  { background: var(--success-muted); color: var(--success); }
.badge-neutral  { background: var(--border-light); color: var(--text-muted); }
.badge-danger   { background: var(--danger-muted); color: var(--danger); }


/* ══════════════════════════════════════════════════════════════
   NAVIGATION ANNÉE
   ══════════════════════════════════════════════════════════════ */

.year-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}
.year-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.12s;
}
.year-btn:hover { background: var(--primary-muted); }
.year-display {
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 44px;
  text-align: center;
  color: var(--text);
}


/* ══════════════════════════════════════════════════════════════
   MODALE
   ══════════════════════════════════════════════════════════════ */

#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  backdrop-filter: blur(2px);
}

#modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card);
  border-radius: var(--radius-lg);
  z-index: 201;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
#modal.modal-lg { max-width: 720px; }

@keyframes modalIn {
  from { transform: translate(-50%, -52%); opacity: 0; }
  to   { transform: translate(-50%, -50%); opacity: 1; }
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.modal-actions-left { margin-right: auto; }


/* ══════════════════════════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════════════════════════ */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 240px;
  max-width: 340px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.28s ease;
  pointer-events: auto;
}
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toastOut {
  to { transform: translateX(110%); opacity: 0; }
}
.toast-out { animation: toastOut 0.25s ease forwards; }

.toast-success { background: var(--success); color: #fff; }
.toast-error   { background: var(--danger);  color: #fff; }
.toast-info    { background: var(--primary); color: #fff; }


/* ══════════════════════════════════════════════════════════════
   ÉTATS VIDES ET CHARGEMENT
   ══════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-state p { font-size: 0.9rem; }

.loader {
  display: flex;
  justify-content: center;
  padding: 48px 24px;
}
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ══════════════════════════════════════════════════════════════
   JUSTIFICATIFS
   ══════════════════════════════════════════════════════════════ */

/* ── Grille miniatures justificatifs ── */
.justif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.justif-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.justif-thumb:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(114,39,85,.12);
}
.justif-thumb-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.justif-thumb-img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  display: block;
}
.justif-thumb-pdf {
  height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff0f0;
  color: #c0392b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .04em;
  gap: 4px;
}
.justif-thumb-pdf svg {
  width: 30px;
  height: 30px;
}
.justif-thumb-name {
  font-size: 0.68rem;
  padding: 5px 6px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 500;
}
.justif-thumb-meta {
  font-size: 0.63rem;
  padding: 0 6px 6px;
  color: var(--text-muted);
}
.justif-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  line-height: 1;
}
.justif-thumb:hover .justif-thumb-del { opacity: 1; }
.justif-thumb-del:hover { background: var(--danger); }

/* ── Zone drag & drop upload ── */
.upload-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .2s, background .2s;
  position: relative;
}
.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, white);
}
.upload-drop-zone.uploading {
  pointer-events: none;
  opacity: .7;
}
.upload-drop-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.upload-drop-inner { pointer-events: none; }
.upload-drop-icon  { font-size: 1.8rem; margin-bottom: 6px; }
.upload-drop-text  { font-size: 0.85rem; color: var(--text); }
.upload-drop-browse { color: var(--primary); text-decoration: underline; }
.upload-drop-hint  { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* ── Barre de progression upload ── */
.upload-progress-wrap {
  margin-top: 8px;
  background: var(--border);
  border-radius: 20px;
  height: 26px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.78rem;
  color: var(--text);
}
.upload-progress-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: color-mix(in srgb, var(--primary) 20%, white);
  transition: width .3s ease;
}
.upload-progress-wrap span { position: relative; z-index: 1; }


/* ══════════════════════════════════════════════════════════════
   DÉTAIL FRAIS (dans modale)
   ══════════════════════════════════════════════════════════════ */

.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.detail-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg);
  border-radius: 8px;
  padding: 9px 14px;
  min-width: 90px;
}
.detail-chip-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.detail-chip-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.detail-chip-value.is-ik { color: var(--primary); }


/* ══════════════════════════════════════════════════════════════
   SECTION TITRE INTERNE
   ══════════════════════════════════════════════════════════════ */

.section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 20px;
}
.section-title:first-child { margin-top: 0; }


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE (mobile minimal — desktop first)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  #sidebar { display: none; }
  #main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .page-body { padding: 16px; }
  .page-header { padding: 14px 16px; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  #modal { padding: 22px 18px; }
}
