/* ============================================================
   SIAUAC — Design System Slim Flat Modern
   Sur base Bootstrap 5 personnalisé + tokens UAC
   ============================================================ */

:root {
  --uac-marine: #14315C;
  --uac-marine-2: #0D2240;
  --uac-marine-soft: #EEF2F8;
  --uac-or: #C9A84C;
  --uac-or-2: #A88A38;
  --uac-or-soft: #FBF6E7;
  --uac-rouge: #B91C1C;
  --uac-vert: #059669;

  --uac-bg: #F7F8FB;
  --uac-surface: #FFFFFF;
  --uac-border: #E5E9F0;
  --uac-border-strong: #D5DAE4;

  --uac-text: #0F1B33;
  --uac-text-muted: #64748B;
  --uac-text-soft: #94A3B8;
  --uac-gris-fonce: #475569;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(15,27,51,.04);
  --shadow-sm: 0 1px 3px rgba(15,27,51,.05), 0 1px 2px rgba(15,27,51,.03);
  --shadow-md: 0 4px 12px rgba(15,27,51,.06);
  --shadow-lg: 0 12px 32px rgba(15,27,51,.09);

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'DM Sans', 'Inter', system-ui, sans-serif;
}

/* ------- Base ------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--uac-text);
  background: var(--uac-bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}
h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--uac-marine);
  margin: 0 0 .6em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.075rem; }
h4 { font-size: .95rem; }
p  { margin: 0 0 .8em; }
a  { color: var(--uac-marine); text-decoration: none; transition: color .15s; }
a:hover { color: var(--uac-or-2); }
code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: .85em; color: var(--uac-marine); background: var(--uac-marine-soft); padding: 1px 6px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--uac-border); margin: 1.5rem 0; }

/* ------- Public shell ------- */
.uac-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--uac-border);
  position: sticky; top: 0; z-index: 40;
}
.uac-header .logo-box {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--uac-marine), var(--uac-marine-2));
  color: #fff; font-weight: 700; font-family: var(--display);
  display: grid; place-items: center; font-size: .9rem;
  letter-spacing: .5px;
}
.uac-header h1 { font-size: 1rem; margin: 0; line-height: 1.2; }
.uac-header small { color: var(--uac-text-muted); font-size: .78rem; }

main { padding: 32px 16px 56px; }

/* ------- Cards ------- */
.card-uac {
  background: var(--uac-surface);
  border: 1px solid var(--uac-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 640px;
  margin: 0 auto 20px;
}
.card-uac h2 { margin-top: 0; }
.subtitle { color: var(--uac-text-muted); margin-top: -.3rem; font-size: .92rem; }

/* ------- Wizard ------- */
.wizard-shell { max-width: 640px; margin: 0 auto; }
.progress-label {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .72rem; font-weight: 600;
  color: var(--uac-text-muted); text-align: center; margin-bottom: 8px;
}
.progress-bar-uac {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-bottom: 20px;
}
.progress-bar-uac .step {
  height: 4px; border-radius: 999px; background: var(--uac-border);
  transition: background .3s;
}
.progress-bar-uac .step.done    { background: var(--uac-vert); }
.progress-bar-uac .step.current { background: var(--uac-marine); }

/* ------- Forms ------- */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: .82rem; font-weight: 500;
  color: var(--uac-text); margin-bottom: 5px;
}
.form-required::after { content: ' *'; color: var(--uac-rouge); }
.form-help { color: var(--uac-text-muted); font-size: .78rem; margin-top: 4px; }
.form-error { color: var(--uac-rouge); font-size: .8rem; margin-top: 4px; }

.form-control-uac,
input[type=text], input[type=email], input[type=tel],
input[type=password], input[type=date], input[type=number],
input[type=search], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit; color: var(--uac-text);
  background: #fff;
  border: 1px solid var(--uac-border-strong);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus, .form-control-uac:focus {
  border-color: var(--uac-marine);
  box-shadow: 0 0 0 3px rgba(20,49,92,.12);
}
input[type=file] { padding: 8px; background: var(--uac-marine-soft); border-style: dashed; }
textarea { min-height: 90px; resize: vertical; }

/* ------- Buttons ------- */
.btn-uac, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  font: 500 .9rem/1 var(--sans);
  color: #fff; background: var(--uac-marine);
  border: 1px solid var(--uac-marine);
  border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: all .15s ease;
  box-shadow: var(--shadow-xs);
}
.btn-uac:hover, .btn:hover { background: var(--uac-marine-2); border-color: var(--uac-marine-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-uac:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  font: 500 .9rem/1 var(--sans);
  color: var(--uac-marine); background: #fff;
  border: 1px solid var(--uac-border-strong);
  border-radius: var(--radius); cursor: pointer; text-decoration: none;
  transition: all .15s;
}
.btn-outline:hover { background: var(--uac-marine-soft); border-color: var(--uac-marine); }
.btn-gold {
  background: var(--uac-or); border-color: var(--uac-or); color: var(--uac-marine);
}
.btn-gold:hover { background: var(--uac-or-2); border-color: var(--uac-or-2); color: var(--uac-marine); }
.btn-ghost {
  background: transparent; border-color: transparent; color: var(--uac-text-muted);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--uac-marine-soft); color: var(--uac-marine); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn i.bi { font-size: 1em; line-height: 1; }

.actions-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ------- Charte scroll ------- */
.charte-scroll {
  max-height: 340px; overflow-y: auto;
  background: var(--uac-bg);
  border: 1px solid var(--uac-border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: .9rem;
}
.principe-item, .interdit-item {
  padding: 8px 12px; margin: 6px 0; border-radius: 8px; font-size: .88rem;
}
.principe-item { background: rgba(5,150,105,.08); border-left: 3px solid var(--uac-vert); }
.interdit-item { background: rgba(185,28,28,.06); border-left: 3px solid var(--uac-rouge); }
.scroll-notice {
  margin-top: 10px; text-align: center; font-size: .82rem;
  color: var(--uac-text-muted);
}
.scroll-notice.done { color: var(--uac-vert); font-weight: 500; }
.engagement-box {
  background: var(--uac-marine-soft); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; border: 1px solid #DAE2ED;
}
.engagement-box label { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.engagement-box input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--uac-marine); }

/* ------- Confirmation / verification ------- */
.confirm-success { text-align: center; margin-bottom: 20px; }
.confirm-success .icon {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--uac-vert); color: #fff;
  display: grid; place-items: center; font-size: 1.8rem; font-weight: 700;
  box-shadow: 0 6px 20px rgba(5,150,105,.28);
}
.recap-list { list-style: none; padding: 0; margin: 0; }
.recap-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--uac-border);
  font-size: .9rem;
}
.recap-list li:last-child { border-bottom: 0; }
.recap-list li strong { color: var(--uac-text-muted); font-weight: 500; }
.uuid-badge {
  font-family: 'JetBrains Mono', monospace;
  background: var(--uac-marine-soft); color: var(--uac-marine);
  padding: 2px 8px; border-radius: 6px; font-size: .8rem;
}

/* ------- Admin shell ------- */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: #fff;
  border-right: 1px solid var(--uac-border);
  padding: 20px 14px;
  position: sticky; top: 0; align-self: start; height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand {
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  color: var(--uac-marine);
  padding: 4px 10px 18px; border-bottom: 1px solid var(--uac-border); margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.admin-sidebar .brand::before {
  content: ''; width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--uac-marine), var(--uac-marine-2));
  background-image: linear-gradient(135deg, var(--uac-marine), var(--uac-marine-2));
  flex-shrink: 0;
}
.admin-sidebar .brand small { font-size: .68rem; font-weight: 400; color: var(--uac-text-muted); letter-spacing: .05em; text-transform: uppercase; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--uac-gris-fonce); font-size: .88rem; font-weight: 500;
  transition: all .15s;
}
.admin-sidebar nav a i.bi { font-size: 1.05rem; width: 20px; text-align: center; color: var(--uac-text-soft); }
.admin-sidebar nav a:hover { background: var(--uac-marine-soft); color: var(--uac-marine); }
.admin-sidebar nav a:hover i.bi { color: var(--uac-marine); }
.admin-sidebar nav a.active {
  background: var(--uac-marine); color: #fff;
}
.admin-sidebar nav a.active i.bi { color: var(--uac-or); }

.admin-main { padding: 28px 32px; min-width: 0; }
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.admin-topbar h1 { margin: 0; font-size: 1.4rem; }

.admin-hero {
  background: linear-gradient(135deg, var(--uac-marine), var(--uac-marine-2));
  color: #fff; padding: 22px 26px; border-radius: var(--radius-lg);
  margin-bottom: 22px; display: flex; align-items: center; gap: 16px;
}
.admin-hero i.bi { font-size: 1.8rem; color: var(--uac-or); }
.admin-hero h1 { color: #fff; margin: 0; font-size: 1.25rem; }
.admin-hero p { margin: 3px 0 0; opacity: .8; font-size: .88rem; }

/* ------- Stat cards ------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: #fff; border: 1px solid var(--uac-border);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.stat-card .label, .stat-card .lbl {
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--uac-text-muted); font-size: .72rem; font-weight: 500;
}
.stat-card .value, .stat-card .val {
  font-family: var(--display); font-size: 1.8rem; font-weight: 600;
  color: var(--uac-marine); margin-top: 4px; letter-spacing: -.02em;
}

/* ------- Tables ------- */
.data-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--uac-border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-xs);
  font-size: .88rem;
}
.data-table thead th {
  background: var(--uac-bg); color: var(--uac-text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  font-size: .72rem; font-weight: 600; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--uac-border);
}
.data-table tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--uac-border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--uac-bg); }

/* ------- Filters ------- */
.filters-bar {
  display: grid; grid-template-columns: 1fr repeat(4, auto) auto;
  gap: 8px; margin-bottom: 18px;
  background: #fff; border: 1px solid var(--uac-border);
  padding: 12px; border-radius: var(--radius);
}
.filters-bar input, .filters-bar select { padding: 8px 10px; font-size: .85rem; }
@media (max-width: 900px) { .filters-bar { grid-template-columns: 1fr 1fr; } }

/* ------- Badges ------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 500;
  background: var(--uac-marine-soft); color: var(--uac-marine);
}
.badge.success { background: rgba(5,150,105,.12); color: var(--uac-vert); }
.badge.warning { background: rgba(201,168,76,.18); color: var(--uac-or-2); }
.badge.danger  { background: rgba(185,28,28,.10); color: var(--uac-rouge); }

/* ------- Flash ------- */
.flash {
  padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: .9rem;
  border: 1px solid transparent;
  display: flex; align-items: center; gap: 10px;
}
.flash.ok, .flash.success { background: rgba(5,150,105,.08); color: var(--uac-vert); border-color: rgba(5,150,105,.25); }
.flash.error, .flash.danger { background: rgba(185,28,28,.06); color: var(--uac-rouge); border-color: rgba(185,28,28,.2); }

/* ------- Pager ------- */
.pager {
  display: flex; gap: 4px; align-items: center;
  margin-top: 18px; flex-wrap: wrap; font-size: .85rem;
}
.pager a, .pager span {
  padding: 6px 12px; border-radius: 8px;
  color: var(--uac-gris-fonce); text-decoration: none;
  border: 1px solid var(--uac-border);
  background: #fff; transition: all .15s;
}
.pager a:hover { border-color: var(--uac-marine); color: var(--uac-marine); }
.pager a.current, .pager span.current {
  background: var(--uac-marine); color: #fff; border-color: var(--uac-marine);
}
.pager a.disabled { opacity: .4; pointer-events: none; }

/* ------- Toast ------- */
.toast-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--uac-marine); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: .88rem;
  min-width: 260px; max-width: 360px;
  animation: slideIn .3s ease;
}
.toast.error { background: var(--uac-rouge); }
.toast.success { background: var(--uac-vert); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------- Responsive ------- */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: relative; height: auto;
    border-right: 0; border-bottom: 1px solid var(--uac-border);
  }
  .admin-sidebar nav { flex-direction: row; overflow-x: auto; }
  .admin-sidebar nav a { white-space: nowrap; font-size: .8rem; padding: 8px 10px; }
  .admin-sidebar .brand::before { display: none; }
  .admin-main { padding: 20px 16px; }
  .stat-card .value, .stat-card .val { font-size: 1.4rem; }
  main { padding: 16px 12px 40px; }
  .card-uac { padding: 20px 18px; }
}

[x-cloak] { display: none !important; }

/* ============================================================
   Combobox (select recherchable) — étape 1 du wizard
   ============================================================ */
.combo { position: relative; }
.combo .combo-input {
  width: 100%;
  padding-right: 2.4rem;
  cursor: text;
}
.combo .combo-caret {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--uac-marine);
  font-size: .85rem;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  transition: transform .18s ease;
}
.combo.is-open .combo-caret { transform: translateY(-50%) rotate(180deg); }
.combo-list {
  position: absolute;
  z-index: 40;
  left: 0; right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow-y: auto;
  background: var(--uac-surface);
  border: 1px solid var(--uac-border-strong);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 49, 92, 0.14);
  padding: 6px 0;
}
.combo-group {
  padding: 8px 14px 4px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--uac-marine);
  background: var(--uac-marine-soft);
}
.combo-item {
  padding: 9px 14px;
  font-size: .92rem;
  cursor: pointer;
  color: #1f2937;
  line-height: 1.35;
  transition: background .12s ease;
}
.combo-item:hover { background: var(--uac-or-soft); }
.combo-item.active {
  background: var(--uac-marine);
  color: #fff;
  font-weight: 600;
}
.combo-empty {
  padding: 12px 14px;
  color: var(--uac-text-muted, #6b7280);
  font-style: italic;
  font-size: .88rem;
}

/* ============================================================
   Responsive v3 — tables scrollables + charts contenus
   ============================================================ */

/* Empêche tout débordement horizontal global */
html, body { max-width: 100%; overflow-x: hidden; }
.admin-shell, .admin-main { min-width: 0; max-width: 100%; }
.admin-main { overflow-x: hidden; }

/* Wrapper scroll horizontal pour les tableaux */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--uac-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  background: #fff;
  margin-bottom: 12px;
}
.table-scroll .data-table {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  min-width: 720px; /* force scroll sur petits écrans */
}
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--uac-border-strong); border-radius: 4px; }

/* Cellules : autoriser le retour à la ligne des textes longs */
.data-table td, .data-table th { word-break: break-word; }
.data-table code { word-break: break-all; }

/* Grille dashboard responsive */
.dashboard-charts {
  display: grid;
  gap: 20px;
  grid-template-columns: 2fr 1fr;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .dashboard-charts { grid-template-columns: 1fr; }
}

/* Conteneur graphique avec hauteur fixe → canvas responsive */
.chart-box {
  position: relative;
  width: 100%;
  height: 300px;
  max-width: 100%;
}
.chart-box.chart-tall { height: 360px; }
.chart-box canvas {
  max-width: 100% !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
}
@media (max-width: 640px) {
  .chart-box { height: 240px; }
  .chart-box.chart-tall { height: 280px; }
}

/* Stat cards : empêcher débordement contenu */
.stat-card { min-width: 0; overflow: hidden; }

/* Filtres : flex-wrap pour éviter les débordements */
.filters-bar {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}
.filters-bar input, .filters-bar select { min-width: 140px; flex: 1 1 160px; }
.filters-bar button { flex: 0 0 auto; }

/* Topbar + hero admin */
.admin-topbar { min-width: 0; }
.admin-topbar h1 { min-width: 0; word-break: break-word; }
.admin-hero { flex-wrap: wrap; }

/* Toast : ne dépasse pas l'écran mobile */
@media (max-width: 480px) {
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; max-width: 100%; }
}

/* Petites tailles : réduire paddings tables */
@media (max-width: 640px) {
  .data-table thead th, .data-table tbody td { padding: 8px 10px; font-size: .82rem; }
  .admin-main { padding: 16px 12px; }
}

/* ============================================================
   Page admin — Détail d'un utilisateur (déclarations)
   ============================================================ */

/* Hero */
.user-hero {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 55%, #A855F7 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 32px -12px rgba(124, 58, 237, .45);
  position: relative;
  overflow: hidden;
}
.user-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 92% -10%, rgba(255,255,255,.18) 0, transparent 45%),
    radial-gradient(circle at 5% 110%, rgba(255,255,255,.12) 0, transparent 50%);
  pointer-events: none;
}
.user-hero-avatar {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  font-size: 1.8rem; font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.25);
}
.user-hero-main { position: relative; min-width: 0; }
.user-hero-name {
  color: #fff; margin: 0 0 8px;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  word-break: break-word;
}
.user-hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: .88rem;
}
.user-hero-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.user-hero-chip code {
  color: #fff; background: rgba(255,255,255,.2); padding: 1px 6px;
}

/* Stats */
.user-stat-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
}
.stat-card-glass {
  background: #fff;
  border: 1px solid var(--uac-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.stat-card-label {
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--uac-text-muted); font-size: .72rem; font-weight: 600;
}
.stat-card-value {
  font-family: var(--display); font-size: 1.85rem; font-weight: 600;
  color: var(--uac-marine); margin-top: 4px; letter-spacing: -.02em;
}

/* Filtres modernes avec label au-dessus */
.user-filters-bar {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 180px)) auto;
  gap: 14px;
  align-items: end;
  background: #fff;
  border: 1px solid var(--uac-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.filter-field label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--uac-text-muted);
  line-height: 1;
}
.filter-field input,
.filter-field select {
  width: 100%;
  padding: 9px 12px;
  font-size: .88rem;
  color: var(--uac-text);
  background: #fff;
  border: 1px solid var(--uac-border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--uac-marine);
  box-shadow: 0 0 0 3px rgba(20,49,92,.12);
}
.filter-field-search input {
  padding-left: 36px;
}
.search-input-wrap {
  position: relative;
}
.search-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--uac-text-soft);
  font-size: .95rem;
  pointer-events: none;
}
.filter-field-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-field-spacer {
  display: block;
  height: .7rem;
  width: 100%;
}

/* Tableau en carte */
.table-card {
  background: #fff;
  border: 1px solid var(--uac-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  margin-bottom: 14px;
}
.table-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--uac-border);
  background: var(--uac-bg);
}
.table-card-header h2 {
  font-size: 1rem; margin: 0; color: var(--uac-marine);
}
.table-card-count {
  font-size: .85rem; color: var(--uac-text-muted); font-weight: 500;
}
.table-card .table-scroll {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
}
.table-card .data-table {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Badges / pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  background: var(--uac-marine-soft); color: var(--uac-marine);
}
.pill-warn { background: rgba(201,168,76,.18); color: var(--uac-or-2); }
.pill-info { background: rgba(20,49,92,.12); color: var(--uac-marine); }
.pill-ok { background: rgba(5,150,105,.12); color: var(--uac-vert); }

/* Responsive user detail */
@media (max-width: 1100px) {
  .user-filters-bar {
    grid-template-columns: 1fr 1fr;
  }
  .filter-field-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .filter-field-spacer { display: none; }
}
@media (max-width: 900px) {
  .user-hero { flex-wrap: wrap; gap: 14px; padding: 20px; }
  .user-hero-avatar { width: 52px; height: 52px; font-size: 1.5rem; }
  .user-hero-name { font-size: 1.25rem; }
  .user-hero-meta { font-size: .82rem; }
  .user-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .user-filters-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .filter-field-actions {
    grid-column: auto;
    justify-content: flex-start;
  }
  .filter-field-actions .btn,
  .filter-field-actions .btn-outline {
    flex: 1 1 auto;
    justify-content: center;
  }
  .user-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card-value { font-size: 1.5rem; }
}
