/* ============================================================
   Reloca CRM — Design System v2
   ============================================================ */

/* --- Tokens ---------------------------------------------- */
:root {
  --bg:          #F0F4F8;
  --surface:     #FFFFFF;
  --border:      #E2E8F0;
  --border-lt:   #EEF2F7;

  --primary:     #4A6FA5;
  --primary-dk:  #3A5A8C;
  --primary-lt:  #EEF3FB;

  --text:        #1A2332;
  --text-2:      #4A5568;
  --text-3:      #8A9AB0;

  --danger:      #E53E3E;
  --danger-lt:   #FFF5F5;
  --success-bg:  #F0FFF4;
  --success-bdr: #9AE6B4;
  --success-txt: #276749;

  --shadow-xs:   0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07);
  --shadow:      0 4px 16px rgba(0,0,0,.09);
  --shadow-md:   0 8px 28px rgba(0,0,0,.11);

  --r-sm:   8px;
  --r:      12px;
  --r-lg:   18px;
  --r-xl:   24px;

  --sidebar-w:   240px;
  --topbar-h:    56px;
  --bnav-h:      64px;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Reset ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
svg { display: block; }

/* --- App layout ------------------------------------------ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 28px) 36px 36px;
  min-width: 0;
  max-width: 1280px;
}

/* --- Sidebar --------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border-lt);
  text-decoration: none;
  transition: opacity .15s;
}
.sidebar-brand:hover { opacity: .85; }
.brand-icon { width: 30px; height: 30px; flex-shrink: 0; }
.brand-name { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -.3px; }

.sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .65; display: flex; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { line-height: 1; }
.nav-item:hover { background: var(--primary-lt); color: var(--primary); }
.nav-item:hover .nav-icon { opacity: 1; }
.nav-item.active { background: var(--primary-lt); color: var(--primary); font-weight: 600; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-lt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.user-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  flex-shrink: 0;
}
.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .72rem; color: var(--text-3); }

.btn-logout {
  background: none; border: none;
  padding: 6px; border-radius: var(--r-sm);
  color: var(--text-3); cursor: pointer;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.btn-logout:hover { color: var(--danger); background: var(--danger-lt); }
.btn-logout svg { width: 17px; height: 17px; }

/* --- Topbar ---------------------------------------------- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 36px;
  z-index: 90;
  gap: 12px;
  overflow: visible;
}
.topbar-brand {
  display: none; /* shown mobile only */
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}
.topbar-brand svg { width: 28px; height: 28px; }
.topbar-spacer { flex: 1; }
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user-wrap { position: relative; overflow: visible; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.topbar-user:hover { background: var(--bg); }

.topbar-username { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .5px;
}

/* Dropdown */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
}
.topbar-user-wrap.open .user-dropdown { display: block; }

.user-dropdown-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.user-dropdown-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.user-dropdown-name { font-size: .875rem; font-weight: 600; color: var(--text); }
.user-dropdown-role { font-size: .75rem; color: var(--text-3); margin-top: 1px; }

.user-dropdown-sep { height: 1px; background: var(--border-lt); margin: 0; }

.user-dropdown-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--danger);
  transition: background .15s;
  text-align: left;
}
.user-dropdown-logout:hover { background: var(--danger-lt); }
.user-dropdown-logout svg { width: 16px; height: 16px; flex-shrink: 0; }

/* --- Bottom nav (mobile only, hidden on desktop) ---------- */
.bottom-nav { display: none; }

/* --- KPI scroll row -------------------------------------- */
.kpi-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 18px;
  min-width: 168px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
  flex-shrink: 0;
}
.kpi-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kpi-total { cursor: default; }
.kpi-total:hover { box-shadow: var(--shadow-xs); transform: none; }

.kpi-icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon-wrap svg { width: 18px; height: 18px; }

.kpi-icon-blue              { background: #DBEAFE; color: #2563EB; }
.kpi-icon-recherche_active  { background: #DBEAFE; color: #2563EB; }
.kpi-icon-visite_en_cours   { background: #FEF3C7; color: #D97706; }
.kpi-icon-offre_soumise     { background: #EDE9FE; color: #7C3AED; }
.kpi-icon-bail_signe        { background: #D1FAE5; color: #059669; }
.kpi-icon-suivi_apres_vente { background: #CFFAFE; color: #0891B2; }
.kpi-icon-complete          { background: #F1F5F9; color: #64748B; }

.kpi-body { display: flex; flex-direction: column; gap: 2px; }
.kpi-value { font-size: 1.55rem; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -.5px; }
.kpi-label { font-size: .72rem; font-weight: 500; color: var(--text-3); line-height: 1.2; max-width: 90px; }

/* --- Filters bar ----------------------------------------- */
.filters-bar { margin-bottom: 20px; }
.filters-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-group {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}
.filter-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-3); pointer-events: none;
  z-index: 1;
}
.filter-input {
  width: 100%;
  padding: 8px 12px 8px 2.5rem !important;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-size: .875rem;
}
.filter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,111,165,.12); }
.filter-input::placeholder { color: var(--text-3); }
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  outline: none;
  cursor: pointer;
  font-size: .875rem;
  transition: border-color .15s;
}
.filter-select:focus { border-color: var(--primary); }

/* --- Cards meta ------------------------------------------ */
.cards-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.table-count { font-size: .82rem; color: var(--text-3); font-weight: 500; }

/* --- Client cards grid ----------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s, border-color .15s;
  text-decoration: none;
  color: inherit;
}
.client-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  border-color: #C9D8EC;
}

.client-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.client-initial {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--primary-lt);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 700;
  flex-shrink: 0;
}
.client-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.client-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.client-sector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--text-3);
}
.client-sector svg { width: 11px; height: 11px; flex-shrink: 0; }

.client-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-lt);
}
.client-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.client-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--text-3);
}
.client-meta-item svg { width: 12px; height: 12px; flex-shrink: 0; }
.client-date { font-size: .75rem; color: var(--text-3); white-space: nowrap; }

/* --- Status badges --------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-recherche_active  { background: #DBEAFE; color: #1D4ED8; }
.badge-visite_en_cours   { background: #FEF3C7; color: #92400E; }
.badge-offre_soumise     { background: #EDE9FE; color: #5B21B6; }
.badge-bail_signe        { background: #D1FAE5; color: #065F46; }
.badge-suivi_apres_vente { background: #CFFAFE; color: #155E75; }
.badge-complete          { background: #F1F5F9; color: #475569; }
.badge-admin             { background: #FEF3C7; color: #92400E; }
.badge-courtier          { background: var(--primary-lt); color: var(--primary); }

/* --- Buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(74,111,165,.3);
}
.btn-primary:hover { background: var(--primary-dk); box-shadow: 0 3px 8px rgba(74,111,165,.35); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); color: var(--text); }

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

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #C53030; }
.btn-danger-ghost { background: transparent; color: var(--danger); border: 1px solid transparent; }
.btn-danger-ghost:hover { background: var(--danger-lt); border-color: var(--danger); }

.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }

/* --- Page header (client detail, admin) ------------------ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-header-left { display: flex; align-items: flex-start; gap: 14px; }
.page-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.page-sub { font-size: .82rem; color: var(--text-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background .15s, color .15s;
  margin-top: 3px;
  white-space: nowrap;
}
.btn-back:hover { background: var(--bg); color: var(--primary); }
.btn-back svg { width: 13px; height: 13px; }

/* --- Table card (admin users) ---------------------------- */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-lt);
  color: var(--text-2);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.table-row { cursor: pointer; transition: background .1s; }
.table-row:hover { background: #FAFBFC; }
.td-action { white-space: nowrap; text-align: right; }
.td-name strong { color: var(--text); }

/* --- Empty state ----------------------------------------- */
.empty-state {
  padding: 72px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.empty-state svg { width: 64px; height: 64px; }
.empty-state p { color: var(--text-3); font-size: .95rem; }

/* --- Forms ---------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .82rem; font-weight: 600; color: var(--text-2); }
.required { color: var(--danger); }
.text-muted { font-weight: 400; color: var(--text-3); font-size: .78rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,111,165,.12);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { resize: vertical; }
select { cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Client form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-lt);
  margin-bottom: 4px;
}
.notes-group textarea { min-height: 200px; }
.meta-info { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.meta-row { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-3); }
.meta-label { font-weight: 500; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* --- Alerts --------------------------------------------- */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.alert svg { width: 17px; height: 17px; flex-shrink: 0; }
.alert-error { background: var(--danger-lt); border: 1px solid #FEB2B2; color: var(--danger); }
.alert-success { background: var(--success-bg); border: 1px solid var(--success-bdr); color: var(--success-txt); transition: opacity .5s; }

/* --- Auth page ------------------------------------------ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo svg { width: 48px; height: 48px; }
.auth-title { text-align: center; font-size: 1.5rem; font-weight: 800; letter-spacing: -.4px; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-3); font-size: .875rem; margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* --- Modals --------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-md); width: 100%; max-width: 440px; overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--border-lt); }
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1rem; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 4px; line-height: 1; }
.modal-close:hover { color: var(--text); background: var(--bg); }
.modal-form { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }

/* --- Error page ----------------------------------------- */
.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; gap: 12px; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--border); letter-spacing: -1px; }
.error-title { font-size: 1.25rem; font-weight: 700; }
.error-msg { color: var(--text-3); max-width: 400px; }

/* --- Responsive ----------------------------------------- */
@media (max-width: 1024px) {
  .form-grid { grid-template-columns: 1fr; }
  .main-content { padding: calc(var(--topbar-h) + 24px) 24px 24px; }
}

@media (max-width: 768px) {
  /* Hide sidebar, show bottom nav */
  .sidebar { display: none; }

  .main-content {
    margin-left: 0;
    padding: calc(var(--topbar-h) + 20px) 16px calc(var(--bnav-h) + 16px);
  }

  /* Topbar: full width, show brand logo */
  .topbar {
    left: 0;
    padding: 0 16px;
  }
  .topbar-brand { display: flex; }

  /* Bottom nav */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bnav-h);
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    align-items: stretch;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: .68rem;
    font-weight: 500;
    color: var(--text-3);
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: var(--r-sm);
    transition: color .15s;
    text-decoration: none;
  }
  .bnav-item svg { width: 20px; height: 20px; }
  .bnav-item:hover, .bnav-item.active { color: var(--primary); }
  .bnav-item.active svg { stroke: var(--primary); }
  .bnav-item-form { flex: 1; display: flex; }
  .bnav-item-form .bnav-item { flex: 1; width: 100%; }

  /* KPI: tighter on mobile */
  .kpi-card { min-width: 140px; padding: 12px 14px; }
  .kpi-value { font-size: 1.3rem; }

  /* Cards: single column */
  .cards-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Filters */
  .filters-form { flex-direction: column; align-items: stretch; }
  .filter-group { max-width: 100%; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .page-header { flex-direction: column; }
  .page-header-left { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .kpi-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
  }
  .kpi-scroll::-webkit-scrollbar { display: none; }
  .kpi-card { min-width: 130px; flex-shrink: 0; }
}

/* ============================================================
   Champs en lecture seule (rôle courtier)
   ============================================================ */
.field-readonly {
  background: var(--bg) !important;
  color: var(--text-2);
  border-color: transparent !important;
  box-shadow: none !important;
  cursor: default;
  user-select: text;
}

/* ============================================================
   Indicateur auto-save
   ============================================================ */
.autosave-indicator {
  font-size: .72rem;
  color: var(--text-3);
  margin-left: 6px;
  opacity: 0;
  transition: opacity .4s ease;
}
.autosave-indicator.visible { opacity: 1; }

/* ============================================================
   Fil de conversation (messages SMS-style)
   ============================================================ */
.messages-thread {
  min-height: 220px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  scroll-behavior: smooth;
}

.messages-empty {
  text-align: center;
  color: var(--text-3);
  font-size: .85rem;
  margin: auto;
  padding: 1.5rem 0;
}
.messages-empty-new {
  padding: 2rem 0;
}

/* Bulle wrapper */
.msg-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}
.msg-bubble-wrap.msg-own   { align-self: flex-end;   align-items: flex-end; }
.msg-bubble-wrap.msg-other { align-self: flex-start; align-items: flex-start; }

/* Bulle */
.msg-bubble {
  padding: 8px 13px;
  border-radius: 18px;
  font-size: .875rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-own   .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-other .msg-bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Méta (nom · heure) */
.msg-meta {
  font-size: .68rem;
  color: var(--text-3);
  margin-top: 3px;
  padding: 0 4px;
}

/* Zone de saisie */
.msg-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.msg-input {
  flex: 1;
  resize: none;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.msg-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,111,165,.12);
}
.msg-send-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   KPI cards — lien + état actif
   ============================================================ */
a.kpi-card {
  text-decoration: none;
  cursor: pointer;
}
.kpi-card.kpi-active {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow);
  transform: translateY(-1px);
}

/* ============================================================
   Topbar — bouton icône (cloche)
   ============================================================ */
.topbar-icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.topbar-icon-btn:hover { background: var(--bg); }

/* Badge rouge */
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #E53E3E;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Notifications — wrapper + dropdown
   ============================================================ */
.topbar-notif-wrap {
  position: relative;
  margin-right: 4px;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-lt);
}

.notif-mark-all {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .75rem;
  color: var(--primary);
  padding: 0;
  font-family: inherit;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-lt);
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }

.notif-item.notif-unread { background: var(--primary-lt); }
.notif-item.notif-unread:hover { background: #e0eaf7; }

.notif-msg {
  font-size: .82rem;
  color: var(--text);
  line-height: 1.4;
}
.notif-item.notif-unread .notif-msg { font-weight: 500; }

.notif-time {
  font-size: .7rem;
  color: var(--text-3);
  margin-top: 3px;
}

.notif-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-3);
  margin: 0;
}

/* ============================================================
   Admin stats strip
   ============================================================ */
.admin-stats-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-stat-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--text-2);
}

.admin-stat-item svg { color: var(--text-3); }

.admin-stat-warn {
  color: #92400E;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 4px 10px;
}
.admin-stat-warn svg { color: #D97706; }

/* ============================================================
   Dashboard — filter selects
   ============================================================ */
.filter-select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.filter-select:focus { border-color: var(--primary); }

/* ============================================================
   Dashboard — cards-meta (count + actions)
   ============================================================ */
.cards-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   Dashboard — client card wrap + admin action bar
   ============================================================ */
.client-card-wrap {
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow .18s, transform .18s;
}
.client-card-wrap:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Override card's own border-radius/shadow since wrap handles it */
.client-card-wrap .client-card {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  margin: 0;
}
.client-card-wrap .client-card:hover {
  transform: none;
  box-shadow: none;
}

.card-admin-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-top: 1px solid var(--border-lt);
  background: #F8FAFC;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s;
  font-family: inherit;
}
.btn-card-action:hover { background: var(--border-lt); color: var(--text); }
.btn-card-danger       { color: var(--danger); }
.btn-card-danger:hover { background: var(--danger-lt); color: var(--danger); }

/* ============================================================
   Badge — inactive 30j
   ============================================================ */
.badge-inactive {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
  font-size: .65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.client-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

/* ============================================================
   Admin/users — badges role & status
   ============================================================ */
.badge-admin {
  background: #EEF3FB;
  color: var(--primary);
  border: 1px solid #C3D4EE;
}
.badge-courtier {
  background: #F0FFF4;
  color: #276749;
  border: 1px solid #9AE6B4;
}

.user-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.user-status-active   { background: #F0FFF4; color: #276749; border: 1px solid #9AE6B4; }
.user-status-inactive { background: #FFF5F5; color: #C53030; border: 1px solid #FEB2B2; }

.user-row-inactive td { opacity: .55; }
.user-row-inactive td:last-child { opacity: 1; }

.text-muted { color: var(--text-3); font-size: .82rem; }

/* ============================================================
   Admin/users — modal body + temp password
   ============================================================ */
.modal-body {
  padding: 0 0 16px;
}

.temp-pwd-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.temp-pwd-code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--text);
  word-break: break-all;
}
.temp-pwd-warn {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: .78rem;
  color: #92400E;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1.4;
}

/* ============================================================
   Map page
   ============================================================ */
.map-page {
  padding: 0 !important;
  max-width: 100% !important;
  overflow: hidden;
}
.map-page #map {
  width: 100%;
  height: calc(100vh - var(--topbar-h));
  margin-top: var(--topbar-h);
}
@media (max-width: 768px) {
  .map-page #map {
    height: calc(100vh - var(--topbar-h) - var(--bnav-h, 60px));
  }
}

/* Map popup */
.mpopup { min-width: 180px; font-family: 'Inter', sans-serif; }
.mpopup-name { font-size: .95rem; font-weight: 700; color: #0F172A; margin-bottom: 6px; }
.mpopup-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.mpopup-row { font-size: .8rem; color: #475569; margin-bottom: 3px; }
.mpopup-link {
  display: inline-block;
  margin-top: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: #4A6FA5;
  text-decoration: none;
}
.mpopup-link:hover { text-decoration: underline; }
.mpopup-hint { font-size: .73rem; color: #94A3B8; font-style: italic; margin-top: 5px; }

/* Spotlight (focus) popup — multi-client */
.mpopup-focus { }
.mpopup-sector {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #4A6FA5;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #E2E8F0;
}
.mpopup-focus-item {
  padding: 9px 0;
  border-bottom: 1px solid #F1F5F9;
}
.mpopup-focus-item:last-child { border-bottom: none; padding-bottom: 2px; }

/* Leaflet popup customisation for spot-popup */
.spot-popup .leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(15,23,42,.18);
}

/* Map legend (Leaflet control) */
.map-legend {
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(15,23,42,.14);
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  min-width: 160px;
}
.map-legend-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748B;
  margin-bottom: 8px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #334155;
  margin-bottom: 5px;
}
.map-legend-item:last-child { margin-bottom: 0; }
.map-legend-hint {
  font-size: .7rem;
  color: #94A3B8;
  font-style: italic;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #F1F5F9;
  line-height: 1.5;
}
.map-legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

/* Geocoding toast */
.map-geocode-toast {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(15,23,42,.82);
  color: #fff;
  font-size: .78rem;
  font-family: 'Inter', sans-serif;
  padding: 6px 14px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

/* ============================================================
   Reassign modal — client name (legacy)
   ============================================================ */
.modal .modal-body p { font-size: .9rem; color: var(--text-2); }

/* ============================================================
   Reassign modal — redesigned
   ============================================================ */
.modal.modal-reassign {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(15,23,42,.18), 0 2px 8px rgba(15,23,42,.10);
  overflow: hidden;
  max-width: 420px;
}

.modal-reassign-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #4A6FA5;
  padding: 18px 22px;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.modal-reassign-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background .12s, color .12s;
}
.modal-reassign-close:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.modal-reassign-body {
  padding: 26px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-reassign-client-name {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  margin: 0;
}

.modal-reassign-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-reassign-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.modal-reassign-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer;
  appearance: auto;
}
.modal-reassign-select:focus {
  border-color: #4A6FA5;
  box-shadow: 0 0 0 3px rgba(74,111,165,.15);
}

.modal-reassign-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 22px;
}

.modal-reassign-btn-cancel {
  padding: 9px 20px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.modal-reassign-btn-cancel:hover {
  border-color: #94A3B8;
  background: #F8FAFC;
  color: var(--text);
}

.modal-reassign-btn-confirm {
  padding: 9px 22px;
  border: none;
  border-radius: 8px;
  background: #4A6FA5;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.modal-reassign-btn-confirm:hover {
  background: #3B5F94;
  box-shadow: 0 2px 8px rgba(74,111,165,.30);
}
.modal-reassign-btn-confirm:disabled {
  background: #94A3B8;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============================================================
   Performance page
   ============================================================ */
.perf-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.perf-section-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.perf-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .perf-charts { grid-template-columns: 1fr; } }

.perf-chart-card { margin-bottom: 0; }
.chart-wrap { height: 260px; position: relative; }

/* Period tabs */
.period-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px;
}
.period-tab {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.period-tab:hover { background: rgba(74,111,165,.08); color: var(--primary); }
.period-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); }

/* Table tweaks */
.ta-r { text-align: right; }
.td-num { font-variant-numeric: tabular-nums; }
.td-name { font-weight: 500; }
.td-date { color: var(--text-3); font-size: .8rem; }
.td-empty { text-align: center; color: var(--text-3); padding: 28px; }

/* Conversion rate badge */
.perf-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  background: #E2E8F0;
  color: var(--text-2);
}
.perf-badge[data-high] { background: #4A6FA5; color: #fff; }
.perf-badge[data-mid]  { background: #7FA3CC; color: #fff; }

/* ─── News ticker ─────────────────────────────────────────── */
.news-ticker {
  display: none; /* shown by JS once feed loaded */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: #fff;
  border-top: 1px solid #E2E8F0;
  color: #64748B;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  align-items: center;
  z-index: 80;
  overflow: hidden;
}
.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748B;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}
.ticker-item:hover { color: #4A6FA5; }
.ticker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4A6FA5;
  flex-shrink: 0;
}
.ticker-title { color: #334155; }
.ticker-source {
  color: #94A3B8;
  font-size: 10px;
}
.ticker-sep {
  display: inline-block;
  padding: 0 16px;
  color: #CBD5E1;
  font-size: 13px;
  line-height: 1;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Add bottom padding to main-content so ticker doesn't overlap */
.main-content { padding-bottom: calc(36px + 28px); }
@media (max-width: 768px) {
  .news-ticker { display: none !important; }
  .main-content { padding-bottom: calc(var(--bnav-h) + 16px); }
}

/* ─── Actualités page ─────────────────────────────────────── */
.actu-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.actu-filters--secondary { margin-bottom: 24px; }
.actu-filter {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: none;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.actu-filter:hover  { border-color: #4A6FA5; color: #4A6FA5; }
.actu-filter.active { background: #4A6FA5; border-color: #4A6FA5; color: #fff; }
/* source filters (smaller, plainer) */
.actu-filter-src {
  padding: 4px 11px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: none;
  font-size: .76rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.actu-filter-src:hover  { border-color: #94A3B8; color: var(--text-2); }
.actu-filter-src.active { background: #F1F5F9; border-color: #94A3B8; color: var(--text-1); }
/* category pill on card */
.actu-cat-pill {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.actu-cat--logement    { background: #FEF9C3; color: #854D0E; }
.actu-cat--immigration { background: #DBEAFE; color: #1E40AF; }
.actu-cat--emploi      { background: #D1FAE5; color: #065F46; }
.actu-cat--viequebec   { background: #EDE9FE; color: #5B21B6; }
.actu-cat--economie    { background: #DCFCE7; color: #166534; }
.actu-cat--autre       { background: #F1F5F9; color: #64748B; }
.actu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.actu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.actu-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  border-color: #C7D9F0;
  transform: translateY(-2px);
}
.actu-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.actu-source {
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.actu-source--rc-immigration { background: #FCE7F3; color: #9D174D; }
.actu-source--rc-societe     { background: #DBEAFE; color: #1D4ED8; }
.actu-source--rc-economie    { background: #E0E7FF; color: #3730A3; }
.actu-source--metro          { background: #FEF3C7; color: #92400E; }
.actu-source--immigrer       { background: #D1FAE5; color: #065F46; }
.actu-source--lactualite     { background: #F3F4F6; color: #374151; }
.actu-date {
  font-size: .75rem;
  color: var(--text-3);
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}
.actu-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  margin: 0;
}
.actu-summary {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.actu-read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  color: #4A6FA5;
  text-decoration: none;
  margin-top: auto;
  transition: color .15s;
}
.actu-read-link:hover { color: #3a5a8f; }
.actu-refresh-info { font-size: .8rem; color: var(--text-3); }

