/* =============================================================================
   SenGestion — Composants UI v3.0  ·  Minimaliste Premium
   Charte : Marine #021A3D | Or #F2B10E | Jaune pâle #E8E7A2
   Règle RGAA : or = FOND uniquement. Texte sur or = marine. JAMAIS de texte or/jaune sur clair.
   Charte STRICTE : 3 couleurs seulement. Aucune couleur sémantique (vert/rouge) — nuances marine/or/jaune pâle.
   Direction : Linear · Stripe · Notion — sobre, confiant, spacieux.
   Architecture : Layout → Navbar → Sidebar → Cards → Boutons → Formulaires
                  → Alertes → Tables → Badges → Auth → Pagination → Modales
                  → Utilitaires → Responsive
   ============================================================================= */

@import url('tokens.css');


/* =============================================================================
   1. LAYOUT PRINCIPAL — App Shell
   ============================================================================= */

.app-layout {
  display: flex;
  min-height: 100vh;
  /* pas de padding-top ici : la navbar fixe est déjà compensée par #main-content */
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-8) var(--space-8);
  min-width: 0;
  transition: margin-left var(--duration-slow) var(--ease-out);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

/* En-tête de page */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--marine);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: var(--space-2);
  font-family: var(--font-sans);
  line-height: var(--leading-base);
}

/* Grilles */
.grid   { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Section */
.section {
  margin-bottom: var(--space-12);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--marine);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  /* Séparateur discret : trait fin or, pas une barre épaisse */
  border-bottom: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Accent discret avant le titre de section (optionnel) */
.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 20px;
  background: var(--or);
  border-radius: 2px;
  flex-shrink: 0;
}


/* =============================================================================
   2. NAVBAR — Barre marine compacte (maquette minimaliste premium)
   ============================================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--marine);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: 0 var(--space-6);
  z-index: var(--z-navbar);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.navbar-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  flex-shrink: 0;
  padding: 8px 4px;
  margin-left: calc(-1 * var(--space-6) + 8px);
}
.navbar-logo-img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(242,177,14,.4);
}

.navbar-spacer { flex: 1; }

/* Badge essai gratuit — or plein, texte marine (charte : or = fond) */
.navbar-badge {
  background: var(--or);
  color: var(--marine);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Bloc utilisateur */
.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 5px 8px;
  border-radius: var(--radius-btn);
  transition: background var(--duration-fast);
}
.navbar-user:hover { background: rgba(255,255,255,.06); }

.navbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--or);
  color: var(--marine);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-user-info { display: flex; flex-direction: column; line-height: 1.2; }
.navbar-user-name { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--jaune-pale); }
.navbar-user-role { font-size: var(--text-xs); color: var(--jaune-pale); }

.navbar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-btn);
  color: var(--jaune-pale);
  text-decoration: none;
  transition: color var(--duration-fast), background var(--duration-fast);
}
.navbar-logout:hover { color: var(--marine); background: var(--or); }
.navbar-logout i { width: 20px; height: 20px; }

/* Burger (mobile) */
.navbar-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-btn);
  padding: var(--space-1);
  transition: background var(--duration-fast) var(--ease-out);
}
.navbar-burger:hover { background: rgba(255,255,255,.10); }
.navbar-burger:focus-visible { outline: none; box-shadow: var(--ring-focus-or); }
.navbar-burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--jaune-pale);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-out),
              opacity  var(--duration-base) var(--ease-out);
}
.navbar-burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navbar-burger.is-open span:nth-child(2) { opacity: 0; }
.navbar-burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* =============================================================================
   3. SIDEBAR — BLANCHE (maquette : item actif = jaune pâle + barre or)
   ============================================================================= */

.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--jaune-pale);
  border-right: 2px solid var(--marine);
  box-shadow: 2px 0 10px rgba(2, 26, 61, .10);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-6) 0;
  z-index: var(--z-sidebar);
  transition: transform var(--duration-slow) var(--ease-out);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--radius-full); }

.sidebar-section-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marine);
  padding: var(--space-4) var(--space-5) 0;
  margin: var(--space-5) 0 var(--space-2);
  border-top: 1px solid var(--marine);
}
.sidebar-section-label:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px var(--space-5);
  margin: 1px var(--space-3);
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  color: var(--marine);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--font-sans);
  transition: color var(--duration-fast), background var(--duration-fast),
              transform var(--duration-fast), box-shadow var(--duration-fast),
              border-color var(--duration-fast);
  white-space: nowrap;
}
.sidebar-item:hover {
  background: var(--jaune-pale);
  color: var(--marine);
  border-color: var(--marine);
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}
.sidebar-item:hover .sidebar-icon { opacity: 1; }

/* Item actif — jaune pâle plein + barre or (charte stricte) */
.sidebar-item.active {
  background: var(--or);
  color: var(--marine);
  font-weight: var(--weight-bold);
  border-color: var(--marine);
  border-left: 4px solid var(--marine);
  padding-left: calc(var(--space-5) - 4px);
  box-shadow: var(--shadow-md);
}
.sidebar-item.active:hover { transform: none; box-shadow: var(--shadow-md); }
.sidebar-item.active .sidebar-icon { color: var(--marine); opacity: 1; }
.sidebar-item:focus-visible {
  outline: none;
  border-color: var(--marine);
  box-shadow: 0 0 0 3px rgba(2,26,61,.18);
}

.sidebar-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}
.sidebar-item:hover .sidebar-icon { transform: scale(1.08); }
.sidebar-icon i { width: 18px; height: 18px; }

/* Badge compteur (marine plein, texte or — contraste net sur le fond jaune pâle de la sidebar) */
.sidebar-badge {
  margin-left: auto;
  background: var(--marine);
  color: var(--or);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 1px 8px;
  border-radius: var(--radius-full);
}

/* Pied de sidebar */
.sidebar-footer {
  margin-top: auto;
  padding: var(--space-4) var(--space-3) 0;
  border-top: 1px solid var(--marine);
}
.sidebar-footer-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  color: var(--marine);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: background var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast);
}
.sidebar-footer-item:hover { background: var(--jaune-pale); color: var(--marine); border-color: var(--marine); }

/* Overlay mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,26,61,.45);
  z-index: calc(var(--z-sidebar) - 1);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}
.sidebar-overlay.is-visible { opacity: 1; }


/* =============================================================================
   4. CARTES — Épurées, peu d'ombre, beaucoup de padding
   ============================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  /* Ombre quasi nulle — la carte se distingue par la bordure fine */
  box-shadow: var(--shadow-xs);
  padding: var(--space-8);
  transition: box-shadow  var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}

.card-hoverable:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--marine);
  font-weight: var(--weight-bold);
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 3px;
}

.card-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Carte KPI / Statistique — minimaliste */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  /* Padding généreux vertical */
  padding: var(--space-8) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow   var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.stat-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-btn);
  /* Fond neutre très clair — pas de couleur criarde */
  background: var(--bg-soft);
  color: var(--marine);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}

/* Gros chiffre Palatino — la typo fait tout le travail */
.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--marine);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: var(--weight-normal);
  letter-spacing: 0.01em;
}

.stat-card-delta {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.stat-card-delta.up   { color: var(--success); }
.stat-card-delta.down { color: var(--danger);  }

/* Carte accent (fond or) — usage parcimonieux, 1 seule par écran */
.card-accent {
  background: var(--or);
  border-color: var(--or-600);
  color: var(--marine);
  box-shadow: none;
}
.card-accent .card-title  { color: var(--marine); }
.card-accent .card-footer { border-top-color: rgba(2,26,61,.12); }

/* Carte marine */
.card-marine {
  background: var(--marine);
  border-color: var(--marine-700);
  color: var(--jaune-pale);
  box-shadow: none;
}
.card-marine .card-title    { color: var(--or); }
.card-marine .card-subtitle { color: var(--jaune-pale); }
.card-marine .card-footer   { border-top-color: rgba(255,255,255,.10); }


/* =============================================================================
   5. BOUTONS — Sobres, hiérarchie claire
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  line-height: 1;
  padding: 11px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background    var(--duration-fast) var(--ease-out),
              color         var(--duration-fast) var(--ease-out),
              border-color  var(--duration-fast) var(--ease-out),
              box-shadow    var(--duration-fast) var(--ease-out),
              transform     var(--duration-fast) var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

.btn:active { transform: translateY(1px); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* Tailles */
.btn-sm {
  font-size: var(--text-xs);
  padding: 7px 14px;
  gap: var(--space-1);
}

.btn-lg {
  font-size: var(--text-base);
  padding: 14px 30px;
  gap: var(--space-3);
}

.btn-block { display: flex; width: 100%; }

.btn-icon {
  padding: 9px;
  border-radius: var(--radius-btn);
}
.btn-icon.btn-sm { padding: 6px; }
.btn-icon.btn-lg { padding: 12px; }

/* ── Variantes ── */

/* Primaire : fond marine — action principale, austère */
.btn-primary {
  background: var(--marine);
  color: var(--jaune-pale);
  border-color: var(--marine);
}
.btn-primary:hover {
  background: var(--marine-700);
  border-color: var(--marine-700);
  /* Ombre très légère au hover seulement */
  box-shadow: 0 2px 8px rgba(2,26,61,.18);
}
.btn-primary:active { background: var(--marine); }

/* Accent : fond or — UN SEUL par écran, action prioritaire */
.btn-accent {
  background: var(--or);
  color: var(--marine);   /* marine sur or → 9.09:1 ✓ */
  border-color: var(--or);
}
.btn-accent:hover {
  background: var(--or-600);
  border-color: var(--or-600);
  box-shadow: 0 2px 8px rgba(242,177,14,.30);
}
.btn-accent:active { background: var(--or-500); }
.btn-accent:focus-visible { box-shadow: var(--ring-focus-or); }

/* Secondaire : contour fin, sobre */
.btn-secondary {
  background: transparent;
  color: var(--marine);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--marine);
}
.btn-secondary:active { background: var(--marine-100); }

/* Fantôme : très discret */
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: var(--jaune-pale);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--marine);
  border-color: var(--marine);
  box-shadow: 0 2px 8px rgba(2,26,61,.20);
}

/* Succès */
.btn-success {
  background: var(--success);
  color: var(--jaune-pale);
  border-color: var(--success);
}
.btn-success:hover { background: var(--marine); box-shadow: 0 2px 8px rgba(2,26,61,.18); }


/* =============================================================================
   6. FORMULAIRES
   ============================================================================= */

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--marine);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
  font-weight: var(--weight-bold);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--space-2);
  line-height: var(--leading-base);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  font-weight: var(--weight-medium);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Champs — bordure fine, ombre nulle */
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--surface);
  /* Bordure marine (charte) atténuée — visible mais pas lourde */
  border: 1px solid rgba(2, 26, 61, 0.35);
  border-radius: var(--radius-input);
  padding: 11px 14px;
  line-height: var(--leading-base);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow   var(--duration-fast) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--placeholder);
  font-style: italic;
}

/* Focus : anneau discret conforme RGAA */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--marine);
  box-shadow: var(--ring-focus);
}

.form-input.is-error,
.form-select.is-error,
.form-textarea.is-error {
  border-color: var(--danger);
}
.form-input.is-error:focus,
.form-select.is-error:focus,
.form-textarea.is-error:focus {
  box-shadow: 0 0 0 3px rgba(2,26,61,.15);
}

.form-input.is-valid,
.form-select.is-valid {
  border-color: var(--success);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--bg-soft);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.70;
}

/* Select — chevron custom */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23021A3D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Groupe input */
.input-group {
  display: flex;
  position: relative;
}
.input-group .form-input {
  border-radius: var(--radius-input) 0 0 var(--radius-input);
  flex: 1;
}
.input-group .btn {
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  border-left: none;
  flex-shrink: 0;
}

/* Input avec icône préfixe */
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-input { padding-left: 40px; }
.input-icon-wrap .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  cursor: pointer;
  margin-bottom: var(--space-3);
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--marine);
  cursor: pointer;
}
.form-check-label {
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: var(--leading-base);
  cursor: pointer;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.form-inline {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.form-inline .form-group { margin-bottom: 0; flex: 1; min-width: 160px; }


/* =============================================================================
   7. ALERTES & NOTIFICATIONS
   ============================================================================= */

/* Pile de messages flash rendus dans .main-content (alignés avec le contenu) */
.flash-stack { margin-bottom: var(--space-6); }

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: var(--leading-base);
  margin-bottom: var(--space-5);
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-content { flex: 1; }

.alert-title {
  font-weight: var(--weight-bold);
  margin-bottom: 2px;
  font-family: var(--font-sans);
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success-border);
}
.alert-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}
.alert-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: var(--warning-border);
}
.alert-info {
  background: var(--info-soft);
  color: var(--info);
  border-color: var(--info-border);
}

/* Alerte inline avec barre à gauche */
.alert-inline {
  border-left: 3px solid currentColor;
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  padding-left: var(--space-4);
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  max-width: 360px;
  z-index: var(--z-toast);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  animation: toast-in var(--duration-slow) var(--ease-out);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px) translateY(8px); }
  to   { opacity: 1; transform: none; }
}


/* =============================================================================
   8. BANNIÈRES
   ============================================================================= */

/* Bandeau accent : fond OR, texte MARINE — 9.09:1 ✓ */
.banner-accent {
  background: var(--or);
  color: var(--marine);
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.banner-accent .banner-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--marine);
}
.banner-accent .banner-text {
  font-size: var(--text-sm);
  color: var(--marine);
  opacity: 0.78;
  margin-top: 2px;
}

/* Bandeau marine */
.banner-marine {
  background: var(--marine);
  color: var(--jaune-pale);
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-card);
}
.banner-marine .banner-title {
  font-family: var(--font-display);
  color: var(--or);
}

/* Bandeau doux */
.banner-soft {
  background: var(--jaune-pale);
  color: var(--marine);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-card);
  border: 1px solid var(--jaune-pale-dark);
}


/* =============================================================================
   9. TABLES — Aérées, en-tête discret
   ============================================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-card);
  /* Ombre nulle — la bordure suffit */
  box-shadow: none;
  border: 1px solid var(--line);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  white-space: nowrap;
}

/* En-têtes — discrets, pas de fond marine plein */
.table thead th {
  background: var(--bg-soft);
  color: var(--muted);
  text-align: left;
  /* Padding plus généreux */
  padding: 13px 16px;
  font-weight: var(--weight-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

/* Arrondi du premier/dernier en-tête */
.table thead th:first-child { border-radius: var(--radius-card) 0 0 0; }
.table thead th:last-child  { border-radius: 0 var(--radius-card) 0 0; }

/* Cellules — plus de hauteur */
.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
  transition: background var(--duration-fast);
}

/* Lignes paires très subtiles */
.table tbody tr:nth-child(even) td { background: var(--bg-soft); }

/* Hover ligne */
.table tbody tr:hover td {
  background: var(--marine-100);
}

.table tbody tr:last-child td { border-bottom: none; }

.table .col-actions { text-align: right; white-space: nowrap; }

/* Pied de table */
.table tfoot td {
  background: var(--bg-soft);
  font-weight: var(--weight-bold);
  color: var(--marine);
  border-top: 1.5px solid var(--line-strong);
  padding: 13px 16px;
}


/* =============================================================================
   10. BADGES
   ============================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: var(--weight-bold);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge-dot::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
  flex-shrink: 0;
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger);  border: 1px solid var(--marine); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info    { background: var(--info-soft);    color: var(--info);    border: 1px solid var(--marine); }

.badge-marine {
  background: var(--marine);
  color: var(--jaune-pale);
}

/* Badge accent : FOND or, texte marine — 9.09:1 ✓ */
.badge-accent {
  background: var(--or);
  color: var(--marine);
}

.badge-neutral {
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}


/* =============================================================================
   11. AUTH — Pages de connexion / inscription
   ============================================================================= */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg);
  position: relative;
}

.auth-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: linear-gradient(180deg, var(--marine) 0%, transparent 100%);
  opacity: 0.03;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  /* Ombre légère — c'est une page critique, l'élévation est justifiée */
  box-shadow: var(--shadow-lg);
  padding: var(--space-12) var(--space-10);
  position: relative;
}

.auth-brand {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--marine);
  display: block;
}

.auth-brand-sub {
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--marine);
  text-align: center;
  margin-bottom: var(--space-2);
}

.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
  line-height: var(--leading-base);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-alt {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--muted);
}

/* --- Landing / présentation (page login) : hero + modules --- */

.landing-hero {
  position: relative;
  padding: var(--space-8) var(--space-6) var(--space-6);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.landing-hero > * { position: relative; }

/* Hero en 2 colonnes : texte + photo */
.landing-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: var(--space-10);
  align-items: end; /* bas de la photo aligné avec la barre de stats */
  text-align: left;
}
.landing-hero-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
}
.landing-hero-inner .landing-eyebrow { margin-bottom: var(--space-4); }
.landing-hero-inner .landing-title { margin: 0 0 var(--space-4); max-width: none; }
.landing-hero-inner .landing-sub { margin: 0 0 var(--space-6); max-width: none; }
.landing-hero-inner .landing-btns { justify-content: flex-start; margin-bottom: var(--space-6); }
.landing-hero-inner .landing-stats { margin: 0; }

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}
.landing-nav-actions { display: flex; gap: var(--space-3); }
.landing-nav img { height: 72px; width: auto; }
.landing-nav span {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--marine);
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  background: var(--jaune-pale);
  border: 1px solid var(--marine);
  color: var(--marine);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: var(--space-6);
}
.landing-eyebrow i { color: var(--or-text); width: 14px; height: 14px; }

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, var(--text-3xl));
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--marine);
  max-width: 18ch;
  margin: 0 auto var(--space-5);
}
.landing-title em {
  /* Mise en valeur du mot-clé : italique Palatino + soulignement or discret */
  font-style: italic;
  color: var(--marine);
  border-bottom: 6px solid var(--or);
}

.landing-sub {
  max-width: 620px;
  margin: 0 auto var(--space-8);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--muted);
}

.landing-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.landing-stats {
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 620px;
  margin: 0 auto var(--space-12);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.landing-stat {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  text-align: center;
  border-right: 1px solid var(--line);
}
.landing-stat:last-child { border-right: none; }
.landing-stat-val {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--marine);
  line-height: 1;
}
.landing-stat-label {
  margin-top: var(--space-1);
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* --- Section modules --- */
/* Bandeau photos "SenGestion au quotidien" (avant la section modules) */
.landing-showcase {
  padding: var(--space-8) var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.landing-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  max-width: 1240px;
  margin: 0 auto;
}
.landing-showcase-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}
@media (max-width: 900px) {
  .landing-showcase-grid { grid-template-columns: 1fr; }
}

.landing-modules {
  padding: var(--space-8) var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.landing-modules-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto var(--space-8);
}
.landing-modules-head h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}
.landing-modules-head p {
  color: var(--muted);
  font-size: var(--text-base);
  line-height: var(--leading-base);
}
.landing-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 1280px;
  margin: 0 auto;
}
.landing-module-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.landing-module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--jaune-pale-dark);
}
.landing-module-card:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}
.landing-module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-btn);
  background: var(--or);
  color: var(--marine);
  margin-bottom: var(--space-3);
}
.landing-module-icon i { width: 20px; height: 20px; }
.landing-module-card h3 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--marine);
  margin-bottom: 4px;
}
.landing-module-card p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--leading-base);
}
.landing-module-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--or-text);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.landing-module-more i { width: 13px; height: 13px; }

/* Vignette photo dans une carte module (fonctionnalités IA) */
.landing-module-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-btn);
  margin-bottom: var(--space-4);
  border: 1px solid var(--line);
}

/* Photo de la section "Pourquoi" */
.landing-why-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-top: var(--space-6);
}

/* --- Modale "détail module" --- */
.module-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-btn);
  background: var(--or);
  color: var(--marine);
  margin-bottom: var(--space-4);
}
.module-modal-icon i { width: 24px; height: 24px; }
.module-modal-lead {
  font-size: var(--text-base);
  color: var(--muted);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-5);
}
.module-modal-list { display: flex; flex-direction: column; gap: var(--space-3); }
.module-modal-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
  color: var(--ink);
}
.module-modal-list li .check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--jaune-pale);
  color: var(--marine);
  margin-top: 1px;
}
.module-modal-list li .check i { width: 12px; height: 12px; }

/* --- Formulaire de connexion (ancré sous la présentation) --- */
/* --- Section "Comment ça marche" (3 étapes) --- */
.landing-steps {
  padding: var(--space-10) var(--space-6);
  /* Photo d'ambiance + voile marine pour garantir la lisibilité (RGAA) */
  background:
    linear-gradient(rgba(2,26,61,.85), rgba(2,26,61,.90)),
    url('../img/landing/fond-bureau.jpg') center / cover no-repeat;
  border-top: 1px solid var(--line);
}
.landing-steps .landing-steps-head h2 { color: var(--jaune-pale); }
.landing-steps .landing-steps-head p { color: var(--jaune-pale); }
.landing-steps .landing-step h3 { color: var(--jaune-pale); }
.landing-steps .landing-step p { color: var(--jaune-pale); }
.landing-steps .landing-step-num { background: var(--or); color: var(--marine); box-shadow: none; }
.landing-steps .landing-step-arrow { color: var(--jaune-pale); }
.landing-steps-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto var(--space-10);
}
.landing-steps-head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.landing-steps-head p { color: var(--muted); font-size: var(--text-base); line-height: var(--leading-base); }

.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
}
.landing-step {
  position: relative;
  text-align: center;
  padding: var(--space-6) var(--space-4);
}
.landing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--marine);
  color: var(--or);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin: 0 auto var(--space-4);
  box-shadow: var(--shadow-md);
}
.landing-step h3 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--marine);
  margin-bottom: 6px;
}
.landing-step p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--leading-base);
  max-width: 32ch;
  margin: 0 auto;
}
.landing-step-arrow {
  position: absolute;
  top: 38px;              /* centré sur la pastille numérotée (padding 28px + rayon 22px - 12px) */
  right: -26px;           /* centré dans le gouttière de 28px entre colonnes */
  color: var(--line-strong);
}

/* --- Section "Pourquoi SenGestion" (avant / après) --- */
.landing-why {
  padding: var(--space-10) var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.landing-why-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: var(--space-10);
  align-items: start; /* la carte comparatif garde sa hauteur naturelle (pas de vide) */
}
.landing-why-head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.landing-why-head p {
  color: var(--muted);
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-6);
}
.landing-why-list { display: flex; flex-direction: column; gap: var(--space-3); }
.landing-why-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.landing-why-item .check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--jaune-pale);
  color: var(--marine);
  margin-top: 2px;
}
.landing-why-item .check i { width: 14px; height: 14px; }
.landing-why-item span { font-size: var(--text-base); color: var(--ink); line-height: var(--leading-base); }

.landing-compare {
  height: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.landing-compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
}
.landing-compare-col {
  padding: var(--space-8) var(--space-6);
}
.landing-compare-col:first-child { border-right: 1px solid var(--line); background: var(--bg2, var(--bg)); }
.landing-compare-col h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: var(--space-3);
}
.landing-compare-col:last-child h4 { color: var(--or-text); }
.landing-compare-col ul { display: flex; flex-direction: column; gap: var(--space-2); }
.landing-compare-col li {
  font-size: var(--text-sm);
  line-height: var(--leading-base);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.landing-compare-col:first-child li { color: var(--muted); }
.landing-compare-col li .cross,
.landing-compare-col li .check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-top: 2px;
}
.landing-compare-col li .cross { background: var(--marine); color: var(--jaune-pale); }
.landing-compare-col li .check { background: var(--jaune-pale); color: var(--marine); }
.landing-compare-col li .cross i,
.landing-compare-col li .check i { width: 12px; height: 12px; }
.landing-compare-col:last-child li { color: var(--ink); font-weight: var(--weight-medium); }

/* --- Bandeau confiance avant le formulaire --- */
.landing-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  max-width: 400px;
  margin: 0 auto var(--space-6);
  padding: var(--space-3) var(--space-4);
  background: var(--jaune-pale);
  border: 1px solid var(--jaune-pale-dark);
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  color: var(--marine);
  font-weight: var(--weight-medium);
  text-align: center;
}
.landing-trust i { flex-shrink: 0; width: 18px; height: 18px; color: var(--marine); }

.landing-login {
  padding: var(--space-10) var(--space-6);
  background: var(--bg);
}
.landing-login .auth-card { margin: 0 auto; }

/* --- Section tarif --- */
.landing-pricing {
  padding: var(--space-10) var(--space-6);
  background: var(--surface);
  border-top: 1px solid var(--line);
  text-align: center;
}
.landing-pricing-head { max-width: 560px; margin: 0 auto var(--space-8); }
.landing-pricing-head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.landing-pricing-head p { color: var(--muted); line-height: var(--leading-base); }

.landing-price-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg);
  border: 2px solid var(--or);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.landing-price-badge {
  display: inline-block;
  background: var(--jaune-pale);
  color: var(--marine);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}
.landing-price-value {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: var(--weight-bold);
  color: var(--marine);
  line-height: 1;
}
.landing-price-value small {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--muted);
}
.landing-price-sub {
  color: var(--muted);
  font-size: var(--text-sm);
  margin: var(--space-2) 0 var(--space-6);
}
.landing-price-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.landing-price-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: var(--leading-base);
}
.landing-price-list li .check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--jaune-pale);
  color: var(--marine);
  margin-top: 1px;
}
.landing-price-list li .check i { width: 12px; height: 12px; }
.landing-price-note {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--space-4);
}

/* --- Bandeau CTA final --- */
.landing-cta {
  background: var(--marine);
  padding: var(--space-10) var(--space-6);
  text-align: center;
}
.landing-cta h2 {
  color: var(--jaune-pale);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}
.landing-cta p {
  color: var(--jaune-pale);
  font-size: var(--text-base);
  max-width: 520px;
  margin: 0 auto var(--space-6);
  line-height: var(--leading-base);
}

/* --- Footer --- */
.landing-footer {
  background: var(--marine);
  border-top: 1px solid rgba(255,255,255,.12);
  padding: var(--space-8) var(--space-6);
}
.landing-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.landing-footer-brand img { height: 40px; width: auto; }
.landing-footer-brand span {
  color: var(--jaune-pale);
  font-size: var(--text-sm);
}
.landing-footer-links {
  display: flex;
  gap: var(--space-5);
}
.landing-footer-links a {
  color: var(--jaune-pale);
  font-size: var(--text-sm);
  text-decoration: none;
}
.landing-footer-links a:hover { color: var(--or); }
.landing-footer-copy {
  color: var(--jaune-pale);
  font-size: var(--text-xs);
}
@media (max-width: 700px) {
  .landing-footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 900px) {
  .landing-hero-inner { grid-template-columns: 1fr; text-align: center; gap: var(--space-6); }
  .landing-hero-inner .landing-btns { justify-content: center; }
  .landing-hero-photo { order: -1; max-width: 520px; margin: 0 auto; }
  .landing-modules-grid { grid-template-columns: 1fr; }
  .landing-steps-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .landing-step-arrow { display: none; }
  .landing-why-inner { grid-template-columns: 1fr; }
  .landing-compare-row { grid-template-columns: 1fr; }
  .landing-compare-col:first-child { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .landing-stats { flex-wrap: wrap; }
  .landing-stat { min-width: 50%; }
  .landing-stat:nth-child(2) { border-right: none; }
  .landing-stat:nth-child(3) { border-top: 1px solid var(--line); }
  .landing-stat:nth-child(4) { border-top: 1px solid var(--line); border-right: none; }
}


/* =============================================================================
   12. PAGINATION
   ============================================================================= */

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}
.pagination-btn:hover {
  border-color: var(--marine);
  color: var(--marine);
  background: var(--marine-100);
}
.pagination-btn.active {
  background: var(--marine);
  border-color: var(--marine);
  color: var(--jaune-pale);
  font-weight: var(--weight-bold);
}
.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pagination-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}


/* =============================================================================
   13. MODALES
   ============================================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2,26,61,.45);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-modal) - 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  animation: fade-in var(--duration-base) var(--ease-out);
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: var(--z-modal);
  animation: modal-in var(--duration-slow) var(--ease-out);
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--marine);
  font-weight: var(--weight-bold);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  transition: background var(--duration-fast), color var(--duration-fast);
}
.modal-close:hover   { background: var(--bg-soft); color: var(--ink); }
.modal-close:focus-visible { outline: none; box-shadow: var(--ring-focus); }

.modal-body {
  padding: var(--space-8);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-8);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}


/* =============================================================================
   14. UTILITAIRES
   ============================================================================= */

/* Marges */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Flex */
.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.flex-wrap  { flex-wrap: wrap; }
.flex-1     { flex: 1; }

/* Texte */
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.text-base    { font-size: var(--text-base); }
.text-lg      { font-size: var(--text-lg); }
.text-xl      { font-size: var(--text-xl); }
.text-muted   { color: var(--muted); }
.text-marine  { color: var(--marine); }
.text-or      { color: var(--or-text); }   /* or accessible sur fond clair */
.text-success { color: var(--success); }
.text-danger  { color: var(--danger);  }
.font-bold    { font-weight: var(--weight-bold); }
.font-medium  { font-weight: var(--weight-medium); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-display { font-family: var(--font-display); }

/* Visibilité */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.hidden { display: none !important; }

/* Séparateur */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--space-6) 0;
}

/* Ombre */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* Arrondis */
.rounded      { border-radius: var(--radius-btn); }
.rounded-lg   { border-radius: var(--radius-card); }
.rounded-full { border-radius: var(--radius-full); }

/* Fonds utilitaires */
.bg-marine  { background: var(--marine); color: var(--jaune-pale); }
.bg-or      { background: var(--or); color: var(--marine); }   /* RGAA 9.09:1 ✓ */
.bg-soft    { background: var(--bg-soft); }
.bg-surface { background: var(--surface); }

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--muted);
}
.empty-state-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--space-5);
  color: var(--line-strong);
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--marine);
  margin-bottom: var(--space-3);
}


/* =============================================================================
   15. RESPONSIVE
   ============================================================================= */

/* ── Mobile : < 640px ── */
@media (max-width: 639px) {

  .navbar-burger { display: flex; }
  .navbar-tagline { display: none; }
  /* Le logo a une marge négative pour se coller au bord quand il est le
     premier élément — mais sur mobile le bouton menu (☰) le précède,
     donc on annule cette marge pour retrouver un espacement normal. */
  .navbar-logo { margin-left: 0; }

  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar-overlay { display: block; }

  .main-content {
    margin-left: 0;
    padding: var(--space-6) var(--space-4);
  }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .form-grid-2 { grid-template-columns: 1fr; }

  .auth-card { padding: var(--space-8) var(--space-5); }

  .page-header { flex-direction: column; align-items: flex-start; }

  .btn-block-mobile {
    display: flex;
    width: 100%;
    margin-bottom: var(--space-2);
  }

  .table-wrap { border-radius: var(--radius-btn); }

  .toast {
    bottom: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}

/* ── Tablette : 640px – 1023px ── */
@media (min-width: 640px) and (max-width: 1023px) {

  .navbar-burger  { display: flex; }
  .navbar-tagline { display: block; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open   { transform: translateX(0); }
  .sidebar-overlay   { display: block; }

  .main-content {
    margin-left: 0;
    padding: var(--space-8) var(--space-6);
  }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Desktop : ≥ 1024px ── */
@media (min-width: 1024px) {

  .navbar-burger  { display: none; }
  .navbar-tagline { display: block; }

  .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: none !important; }

  .main-content { margin-left: var(--sidebar-width); }
}

/* ── Large : ≥ 1280px ── */
@media (min-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Préférence réduite de mouvement ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================================
   FIX — Compensation de la navbar fixe
   ============================================================================= */
body:has(.navbar) #main-content {
  padding-top: var(--navbar-height);
}

/* =============================================================================
   REDESIGN ÉPURÉ — classes complémentaires (dashboard v2)
   ============================================================================= */

/* Nom d'utilisateur navbar */
.navbar-username {
  color: var(--jaune-pale);
  font-size: var(--text-base);
  font-family: var(--font-sans);
}

/* Logo dans la navbar : pastille blanche */
.navbar-brand img {
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  display: block;
  width: auto;
}

/* Grille de KPI — responsive, aérée */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

/* Stat card minimaliste */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-label {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat-card-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--jaune-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon i { width: 17px; height: 17px; color: var(--or-text); }
.stat-card-value {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--marine);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-card-meta {
  font-size: var(--text-sm);
  color: var(--muted);
}
/* La tuile accentuée (trésorerie) : fond marine */
.stat-card--accent {
  background: var(--marine);
  border-color: var(--marine);
}
.stat-card--accent .stat-card-label { color: var(--jaune-pale); }
.stat-card--accent .stat-card-value { color: var(--or); }
.stat-card--accent .stat-card-meta  { color: var(--jaune-pale); }
.stat-card--accent .stat-card-icon  { background: rgba(242,177,14,.15); }
.stat-card--accent .stat-card-icon i { color: var(--or); }
/* Variante BEM (pages Factures / Devis / Charges) */
.stat-card--accent .stat-card__label { color: var(--jaune-pale); }
.stat-card--accent .stat-card__value { color: var(--or); }
.stat-card--accent .stat-card__sub   { color: var(--jaune-pale); }

/* Raccourcis modules */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
.shortcut-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}
.shortcut-card:hover {
  border-color: var(--or);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.shortcut-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--jaune-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shortcut-icon i { width: 19px; height: 19px; color: var(--or-text); }
.shortcut-name {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--marine);
  font-size: var(--text-base);
}
.shortcut-desc {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* En-tête de carte */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.card-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--jaune-pale);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-icon i { width: 17px; height: 17px; color: var(--or-text); }

/* Wrapper de table scrollable */
.table-wrapper { overflow-x: auto; }

/* Cellules typées */
.td-primary { color: var(--marine); font-weight: 600; }
.td-muted   { color: var(--muted); }
.td-nowrap  { white-space: nowrap; }
.td-clamp   { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =============================================================================
   REDESIGN ÉPURÉ — classes des modules (Expert 3)
   ============================================================================= */

/* Lien retour */
.back-link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--muted); font-size: var(--text-base); text-decoration: none;
  margin-bottom: var(--space-4);
}
.back-link:hover { color: var(--marine); }
.back-link i { width: 16px; height: 16px; }

/* Grille de détail (fiches) */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}
.detail-label {
  font-size: var(--text-sm); color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: var(--space-1);
}
.detail-value { font-size: var(--text-base); color: var(--marine); font-weight: 500; }

/* Stat card — variante BEM __ (utilisée par les modules) : alias du style dashboard */
.stat-card__header { display:flex; align-items:center; justify-content:space-between; margin-bottom: var(--space-3); }
.stat-card__label { font-size: var(--text-sm); color: var(--muted); font-weight:500; text-transform:uppercase; letter-spacing:.04em; }
.stat-card__icon { width:34px; height:34px; border-radius:8px; background: var(--jaune-pale); color: var(--marine); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.stat-card__icon i { width:17px; height:17px; color: var(--or-text); }
.stat-card__icon--pale { background: var(--jaune-pale); }
.stat-card__value { font-family: var(--font-display); font-size:36px; font-weight:700; color: var(--marine); line-height:1; letter-spacing:-0.02em; }
.stat-card__value--marine  { color: var(--marine); }
.stat-card__value--success { color: var(--success); }
.stat-card__value--danger  { color: var(--danger); }
.stat-card__sub { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-2); }
.stat-card--success { border-color: var(--success-border); }
.stat-card--danger  { border-color: var(--danger-border); }

/* Pilules de filtre */
.filter-pill {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--text-base);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}
.filter-pill:hover { border-color: var(--marine); color: var(--marine); }
.filter-pill--active { background: var(--marine); color: var(--jaune-pale); border-color: var(--marine); }

/* Lignes de total (récaps devis/factures) */
.total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-2) 0; font-size: var(--text-base); color: var(--ink);
}
.total-row--muted { color: var(--muted); }
.total-row--final {
  border-top: 2px solid var(--line); margin-top: var(--space-2); padding-top: var(--space-3);
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; color: var(--marine);
}

/* Badge jaune pâle */
.badge-pale {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--jaune-pale); color: var(--or-text); font-size: var(--text-sm); font-weight: 600;
}

/* Auth : logo */
.auth-logo { height: 48px; width: auto; display: block; margin: 0 auto var(--space-4); }

/* Empty state — description */
.empty-state-desc { font-size: var(--text-base); color: var(--muted); margin-top: var(--space-2); }


/* =============================================================================
   16. DASHBOARD "MINIMALISTE PREMIUM" — composants portés de la maquette-1
   ============================================================================= */

/* Bandeau essai gratuit — or plein, texte marine */
.trial-banner {
  background: var(--or);
  border-radius: var(--radius-card);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.trial-banner-icon { color: var(--marine); flex-shrink: 0; width: 22px; height: 22px; }
.trial-banner-text { flex: 1; }
.trial-banner-title { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--marine); }
.trial-banner-sub { font-size: var(--text-sm); color: var(--marine); margin-top: 1px; }
.trial-banner-cta {
  background: var(--marine);
  color: var(--jaune-pale);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity var(--duration-fast);
}
.trial-banner-cta:hover { opacity: 0.88; color: var(--jaune-pale); }

/* En-tête de page avec eyebrow + action */
.page-header-left { flex: 1; min-width: 0; }
.page-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marine);
  margin-bottom: 4px;
}

/* Section title (maquette : Palatino 18px, sans grosse barre) */
.section-title-plain {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--marine);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

/* ---- KPI CARDS ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--duration-fast);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.accent-marine { background: var(--marine); }
.accent-or     { background: var(--or); }
.accent-pale   { background: var(--jaune-pale); }

.kpi-icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--radius-btn);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: var(--marine);
}
.kpi-icon-wrap i { width: 18px; height: 18px; }
.bg-pale        { background: var(--jaune-pale); }
.bg-or-pale     { background: var(--jaune-pale); }
.bg-marine-pale { background: var(--jaune-pale); }

.kpi-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--marine);
  line-height: 1;
  margin-bottom: 8px;
}
.kpi-unit { font-size: var(--text-xs); color: var(--muted); margin-bottom: 4px; }
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}
.kpi-delta i { width: 11px; height: 11px; }
.kpi-delta.up      { background: var(--jaune-pale); color: var(--marine); }
.kpi-delta.neutral { background: var(--jaune-pale); color: var(--muted); }

/* KPI accent (tuile marine pleine) */
.kpi-card--accent { background: var(--marine); border-color: var(--marine); }
.kpi-card--accent .kpi-label { color: var(--jaune-pale); }
.kpi-card--accent .kpi-value { color: var(--or); }
.kpi-card--accent .kpi-unit  { color: var(--jaune-pale); }
.kpi-card--accent .kpi-icon-wrap { background: rgba(232,231,162,.15); color: var(--or); }

/* ---- RACCOURCIS ---- */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.shortcut-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: box-shadow var(--duration-fast), border-color var(--duration-fast);
}
.shortcut-card:hover { border-color: var(--or); box-shadow: 0 1px 8px var(--jaune-pale); }
.shortcut-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-btn);
  background: var(--jaune-pale);
  color: var(--marine);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shortcut-icon i { width: 20px; height: 20px; }
.shortcut-label { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--marine); }
.shortcut-sub   { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }

/* ---- TABLE CARD (activité récente) ---- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.table-header {
  display: flex;
  align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  gap: var(--space-3);
}
.table-header-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--marine);
  flex: 1;
}
.table-header-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--marine);
  text-decoration: none;
}
.table-header-link:hover { text-decoration: underline; color: var(--marine); }

/* ---- BADGES STATUT (points colorés, nuances charte) ---- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--marine); }
.badge-paye, .badge-accepte, .badge-en-attente { background: var(--jaune-pale); color: var(--marine); }
.badge-envoye  { background: var(--info-soft); color: var(--marine); border: 1px solid var(--marine); }
.badge-refuse  { background: var(--bg); color: var(--marine); }
.badge-brouillon { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge-brouillon .badge-dot { background: var(--line-strong); }

/* ---- FILTRES TABS ---- */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 4px;
  width: fit-content;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.filter-tab {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  border: none;
  background: transparent;
  text-decoration: none;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.filter-tab:hover { background: var(--bg); color: var(--marine); }
.filter-tab.active { background: var(--marine); color: var(--jaune-pale); }

/* KPI 2 colonnes (page devis) */
.kpi-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  max-width: 560px;
}

/* Responsive dashboard */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .shortcuts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .kpi-grid, .shortcuts-grid, .kpi-grid-2 { grid-template-columns: 1fr; }
  .trial-banner { flex-direction: column; align-items: flex-start; }
  /* Navbar étroite : le badge d'essai et le nom/rôle utilisateur débordent
     sur petit écran (texte long en white-space:nowrap) — on les masque et
     on garde uniquement le logo, l'avatar et la déconnexion. */
  .navbar { padding: 0 var(--space-3); gap: var(--space-2); }
  .navbar-badge { display: none; }
  .navbar-user-info { display: none; }
}
