/* =============================================================================
   SenGestion - UI Components v3.0  ·  Minimaliste Premium
   Brand: Navy #021A3D | Gold #F2B10E | Pale yellow #E8E7A2
   RGAA rule: gold = BACKGROUND only. Text on gold = navy. NEVER gold/yellow text on light.
   STRICT palette: 3 colors only. No semantic colors (green/red) - navy/gold/pale yellow shades.
   Direction: Linear · Stripe · Notion - sober, confident, spacious.
   Architecture: Layout → Navbar → Sidebar → Cards → Buttons → Forms
                  → Alerts → Tables → Badges → Auth → Pagination → Modals
                  → Utilities → Responsive
   ============================================================================= */

@import url('tokens.css');


/* =============================================================================
   1. MAIN LAYOUT - App Shell
   ============================================================================= */

.app-layout {
  display: flex;
  min-height: 100vh;
  /* no padding-top here: the fixed navbar is already offset by #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%;
}

/* Page header */
.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);
}

/* Grids */
.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);
  /* Subtle separator: thin gold line, not a thick bar */
  border-bottom: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Subtle accent before the section title (optional) */
.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 20px;
  background: var(--or);
  border-radius: 2px;
  flex-shrink: 0;
}


/* =============================================================================
   2. NAVBAR - Compact navy bar (minimalist premium mockup)
   ============================================================================= */

.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; }

/* Free-trial badge - solid gold, navy text (brand: gold = background) */
.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;
}

/* User block */
.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 - WHITE (mockup: active item = pale yellow + gold bar)
   ============================================================================= */

.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; }

/* Active item - solid pale yellow + gold bar (strict palette) */
.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; }

/* Counter badge (solid navy, gold text - sharp contrast on the sidebar's pale yellow background) */
.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);
}

/* Sidebar footer */
.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); }

/* Mobile overlay */
.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. CARDS - Clean, little shadow, generous padding
   ============================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  /* Near-zero shadow - the card stands out through its thin border */
  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);
}

/* KPI / Stat card - minimalist */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  /* Generous vertical padding */
  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);
  /* Very light neutral background - no garish color */
  background: var(--bg-soft);
  color: var(--marine);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}

/* Big Palatino number - the typography does all the work */
.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);  }

/* Accent card (gold background) - sparing use, only 1 per screen */
.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); }

/* Navy card */
.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. BUTTONS - Sober, clear hierarchy
   ============================================================================= */

.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;
}

/* Sizes */
.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; }

/* -- Variants -- */

/* Primary: navy background - main action, austere */
.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);
  /* Very light shadow on hover only */
  box-shadow: 0 2px 8px rgba(2,26,61,.18);
}
.btn-primary:active { background: var(--marine); }

/* Accent: gold background - ONLY ONE per screen, priority action */
.btn-accent {
  background: var(--or);
  color: var(--marine);   /* navy on gold → 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); }

/* Secondary: thin outline, sober */
.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); }

/* Ghost: very subtle */
.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);
}

/* Success */
.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. FORMS
   ============================================================================= */

.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;
}

/* Fields - thin border, no shadow */
.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);
  /* Softened navy border (brand) - visible but not heavy */
  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: subtle ring, RGAA-compliant */
.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;
}

/* Input group */
.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 with prefix icon */
.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. ALERTS & NOTIFICATIONS
   ============================================================================= */

/* Stack of flash messages rendered in .main-content (aligned with the content) */
.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);
}

/* Inline alert with a left bar */
.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. BANNERS
   ============================================================================= */

/* Accent banner: GOLD background, NAVY text - 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;
}

/* Navy banner */
.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);
}

/* Soft banner */
.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 - Airy, subtle header
   ============================================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-card);
  /* No shadow - the border is enough */
  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;
}

/* Headers - subtle, no solid navy background */
.table thead th {
  background: var(--bg-soft);
  color: var(--muted);
  text-align: left;
  /* More generous padding */
  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;
}

/* Rounded first/last header */
.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; }

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

/* Very subtle even rows */
.table tbody tr:nth-child(even) td { background: var(--bg-soft); }

/* Row hover */
.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; }

/* Table footer */
.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);
}

/* Accent badge: gold BACKGROUND, navy text - 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 - Login / sign-up pages
   ============================================================================= */

.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);
  /* Light shadow - this is a critical page, the elevation is justified */
  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 / presentation (login page): 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; }

/* 2-column hero: text + 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; /* bottom of the photo aligned with the stats bar */
  text-align: left;
}
.landing-hero-photo img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  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 {
  /* Keyword emphasis: Palatino italic + subtle gold underline */
  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;
}

/* --- Modules section --- */
/* "SenGestion au quotidien" photo strip (before the modules section) */
.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);
  display: block;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}

/* Scroll-reveal wrapper: fades/slides each showcase photo in as it enters the viewport,
   staggered per-item via inline transition-delay set in the template. A spring easing
   (slight overshoot) gives the entrance a bit of bounce instead of a flat linear settle. */
.showcase-reveal {
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(28px) scale(.98);
  transition: opacity .6s ease-out,
              transform .7s cubic-bezier(.34, 1.56, .64, 1),
              box-shadow .35s var(--ease-out, ease);
}
.showcase-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.showcase-reveal:hover {
  /* Warm gold-tinted shadow on hover instead of a neutral one - ties the interaction back
     to the brand accent color rather than a generic elevation effect. */
  box-shadow: 0 20px 40px -12px rgba(2, 26, 61, .28), 0 0 0 1px rgba(242, 177, 14, .18),
              0 10px 24px -8px rgba(242, 177, 14, .22);
}
.showcase-reveal:hover img {
  transform: scale(1.06);
}
@media (prefers-reduced-motion: reduce) {
  .showcase-reveal {
    opacity: 1;
    transform: none;
    transition: box-shadow .35s ease;
  }
  .landing-showcase-grid img { transition: none; }
}

@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; }

/* Photo thumbnail in a module card (AI features) */
.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 of the "Pourquoi" section */
.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);
}

/* --- Module detail modal --- */
.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-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  margin-bottom: var(--space-5);
  animation: module-image-in .5s cubic-bezier(.34, 1.56, .64, 1),
             module-image-float 3.6s ease-in-out .5s infinite;
}
@keyframes module-image-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes module-image-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .module-modal-image { animation: none; }
}
.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; }

/* --- Login form (anchored below the presentation) --- */
/* --- "Comment ça marche" section (3 steps) --- */
.landing-steps {
  padding: var(--space-10) var(--space-6);
  /* Ambiance photo + navy overlay to guarantee readability (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;              /* centered on the numbered dot (padding 28px + radius 22px - 12px) */
  right: -26px;           /* centered in the 28px gutter between columns */
  color: var(--line-strong);
}

/* --- "Pourquoi SenGestion" section (before / after) --- */
.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; /* the comparison card keeps its natural height (no empty space) */
}
.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); }

/* --- Trust banner before the form --- */
.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; }

/* --- Pricing section --- */
.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);
}

/* --- Final CTA banner --- */
.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. MODALS
   ============================================================================= */

.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. UTILITIES
   ============================================================================= */

/* Margins */
.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; }

/* Text */
.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); }   /* accessible gold on light background */
.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); }

/* Visibility */
.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; }

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

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

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

/* Utility backgrounds */
.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; }
  /* The logo has a negative margin to hug the edge when it is the
     first element - but on mobile the menu button (☰) precedes it,
     so we cancel that margin to restore normal spacing. */
  .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;
  }
}

/* -- Tablet: 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); }
}

/* -- Reduced-motion preference -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================================
   FIX - Fixed navbar offset
   ============================================================================= */
body:has(.navbar) #main-content {
  padding-top: var(--navbar-height);
}

/* =============================================================================
   CLEAN REDESIGN - complementary classes (dashboard v2)
   ============================================================================= */

/* Navbar user name */
.navbar-username {
  color: var(--jaune-pale);
  font-size: var(--text-base);
  font-family: var(--font-sans);
}

/* Logo in the navbar: white disc */
.navbar-brand img {
  background: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  display: block;
  width: auto;
}

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

/* Minimalist stat card */
.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);
}
/* The accented tile (cash flow): navy background */
.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); }
/* BEM variant (Invoices / Quotes / Expenses pages) */
.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); }

/* Module shortcuts */
.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);
}

/* Card header */
.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); }

/* Scrollable table wrapper */
.table-wrapper { overflow-x: auto; }

/* Typed cells */
.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; }

/* =============================================================================
   CLEAN REDESIGN - module classes (Expert 3)
   ============================================================================= */

/* Back link */
.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; }

/* Detail grid (record sheets) */
.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 - BEM __ variant (used by the modules): alias of the dashboard style */
.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); }

/* Filter pills */
.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); }

/* Total rows (quote/invoice summaries) */
.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);
}

/* Pale yellow badge */
.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. "MINIMALISTE PREMIUM" DASHBOARD - components ported from maquette-1
   ============================================================================= */

/* Free-trial banner - solid gold, navy text */
.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); }

/* Page header with 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 (mockup: Palatino 18px, no big bar) */
.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); }

/* Accent KPI (solid navy tile) */
.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); }

/* ---- SHORTCUTS ---- */
.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 (recent activity) ---- */
.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); }

/* ---- STATUS BADGES (colored dots, brand shades) ---- */
.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); }

/* ---- FILTER 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); }

/* 2-column KPI (quotes page) */
.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; }
  /* Narrow navbar: the trial badge and the user name/role overflow
     on small screens (long text with white-space:nowrap) - we hide them and
     keep only the logo, the avatar and the logout button. */
  .navbar { padding: 0 var(--space-3); gap: var(--space-2); }
  .navbar-badge { display: none; }
  .navbar-user-info { display: none; }
}

/* Voice button: AI feature.
   Base look = universal CSS only (works on any browser): pale-yellow face,
   gold border, pulsing gold mic badge. The rotating gradient frame is a
   progressive enhancement, gated behind @supports (@property + conic),
   so unsupported browsers keep the full styled fallback. */
.btn-voice {
  position: relative;
  color: var(--marine);
  background: var(--jaune-pale);
  border: 2px solid var(--marine);
  overflow: hidden;               /* contains the shine sweep */
  transition: transform var(--duration-fast), box-shadow var(--duration-fast),
              background var(--duration-fast);
}
.btn-voice .mic-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--or);          /* gold as BACKGROUND only (brand rule) */
  color: var(--marine);
  animation: voice-pulse 2.2s ease-out infinite;
}
.btn-voice .mic-wrap i,
.btn-voice .mic-wrap svg { width: 13px; height: 13px; }
@keyframes voice-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(242, 177, 14, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(242, 177, 14, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 177, 14, 0); }
}
/* Shine sweep on hover: a light band crossing the button once */
.btn-voice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%,
              rgba(255, 255, 255, 0.45) 48%, transparent 62%);
  background-size: 240% 100%;
  background-position: 120% 0;
  pointer-events: none;
}
.btn-voice:hover::after { animation: voice-shine 0.9s ease-out; }
@keyframes voice-shine {
  from { background-position: 120% 0; }
  to   { background-position: -60% 0; }
}
.btn-voice:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(242, 177, 14, 0.35),
              0 2px 8px rgba(2, 26, 61, 0.12);
}
.btn-voice:hover .mic-wrap { animation-duration: 0.9s; }
.btn-voice:active { transform: translateY(0); background: var(--jaune-pale); }

@media (prefers-reduced-motion: reduce) {
  .btn-voice, .btn-voice .mic-wrap { animation: none; }
  .btn-voice:hover::after { animation: none; }
  .btn-voice, .btn-voice:hover { transform: none; }
}

/* ── Bascule de vue Liste / Kanban (page Prospects) ─────────────────── */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--marine);
  border-radius: var(--radius-btn);
  overflow: hidden;
}
.view-toggle-btn {
  padding: 9px 16px;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--marine);
  text-decoration: none;
  background: #fff;
  transition: background var(--duration-fast);
}
.view-toggle-btn + .view-toggle-btn { border-left: 1.5px solid var(--marine); }
.view-toggle-btn:hover { background: var(--jaune-pale); }
.view-toggle-btn.is-active { background: var(--marine); color: var(--jaune-pale); }

/* ── Tableau kanban du pipeline prospects ───────────────────────────── */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 16px;
  align-items: start;
}
.kanban-col {
  background: var(--bg-soft, #f4f6f8);
  border: 1.5px solid var(--line-strong, #d5dbe3);
  border-radius: var(--radius-card);
  padding: 12px;
  min-height: 240px;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
.kanban-col.is-over { border-color: var(--or); background: var(--jaune-pale); }
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.kanban-count {
  min-width: 26px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--marine);
  color: var(--jaune-pale);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.kanban-cards { display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.kanban-card {
  background: #fff;
  border: 1px solid var(--line-strong, #d5dbe3);
  border-left: 4px solid var(--or);
  border-radius: var(--radius-btn);
  padding: 12px 14px;
  cursor: grab;
  transition: box-shadow var(--duration-fast), transform var(--duration-fast);
}
.kanban-card:hover { box-shadow: 0 4px 12px rgba(2, 26, 61, 0.12); transform: translateY(-1px); }
.kanban-card.is-dragging { opacity: 0.5; cursor: grabbing; }
.kanban-card[draggable="false"] { cursor: default; border-left-color: var(--marine); }
.kanban-card-name { font-weight: var(--weight-bold); color: var(--marine); font-size: var(--text-sm); }
.kanban-card-sub { color: var(--muted, #5a6b80); font-size: var(--text-xs); margin-top: 2px; }
.kanban-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 8px;
}
.kanban-card-link {
  font-size: var(--text-xs); font-weight: var(--weight-bold);
  color: var(--marine); text-decoration: underline;
}
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .kanban { grid-template-columns: 1fr; } }

