/* =========================================================================
   THEME.CSS — Surcharge Bootstrap 5.3 + composants custom.
   NE PAS ÉDITER par projet. Tout est piloté par theme-tokens.css.
   À charger APRÈS bootstrap.min.css et APRÈS theme-tokens.css.
   ========================================================================= */

/* ═════════════════════════════════════════════════════════════════════════
   1. MAPPING DES TOKENS VERS LES VARIABLES BOOTSTRAP
   ═════════════════════════════════════════════════════════════════════════ */
:root,
[data-bs-theme="light"] {
  /* Primary */
  --bs-primary:        var(--brand-600);
  --bs-primary-rgb:    34, 139, 90; /* fallback, overridden by oklch below */
  --bs-primary-bg-subtle:     var(--brand-50);
  --bs-primary-border-subtle: var(--brand-200);
  --bs-primary-text-emphasis: var(--brand-700);

  /* Surfaces & body */
  --bs-body-bg:        var(--gray-50);
  --bs-body-color:     var(--gray-800);
  --bs-secondary-bg:   var(--gray-100);
  --bs-tertiary-bg:    var(--gray-100);
  --bs-emphasis-color: var(--gray-950);
  --bs-secondary-color: var(--gray-600);
  --bs-tertiary-color:  var(--gray-500);

  /* Borders */
  --bs-border-color:        var(--gray-200);
  --bs-border-color-translucent: var(--gray-200);

  /* Status */
  --bs-success: var(--success-600);
  --bs-warning: var(--warning-600);
  --bs-danger:  var(--danger-600);
  --bs-info:    var(--info-600);
  --bs-success-bg-subtle: var(--success-100);
  --bs-warning-bg-subtle: var(--warning-100);
  --bs-danger-bg-subtle:  var(--danger-100);
  --bs-info-bg-subtle:    var(--info-100);

  /* Radius */
  --bs-border-radius:    var(--radius-md);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-border-radius-xl: var(--radius-xl);
  --bs-border-radius-pill: var(--radius-pill);

  /* Type */
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size:   var(--fs-base);
  --bs-body-line-height: var(--lh-base);
  --bs-body-font-weight: 400;

  /* Links */
  --bs-link-color:       var(--accent-fg);
  --bs-link-hover-color: var(--brand-800);

  /* Surfaces app */
  --app-surface:        var(--gray-0);
  --app-surface-muted:  var(--gray-50);
  --app-surface-sunken: var(--gray-100);
  --app-border:         var(--gray-200);
  --app-border-strong:  var(--gray-300);
}

[data-bs-theme="dark"] {
  --bs-body-bg:        var(--gray-50);
  --bs-body-color:     var(--gray-800);
  --bs-secondary-bg:   var(--gray-100);
  --bs-tertiary-bg:    var(--gray-100);
  --bs-emphasis-color: var(--gray-950);
  --bs-secondary-color: var(--gray-600);
  --bs-tertiary-color:  var(--gray-500);
  --bs-border-color:    var(--gray-200);
  --bs-border-color-translucent: var(--gray-200);

  --bs-primary-bg-subtle:     color-mix(in oklch, var(--brand-500) 12%, var(--gray-100));
  --bs-primary-border-subtle: color-mix(in oklch, var(--brand-500) 30%, var(--gray-200));
  --bs-primary-text-emphasis: var(--brand-300);

  --app-surface:        var(--gray-50);
  --app-surface-muted:  var(--gray-0);
  --app-surface-sunken: var(--gray-100);
  --app-border:         var(--gray-200);
  --app-border-strong:  var(--gray-300);
}

/* ═════════════════════════════════════════════════════════════════════════
   2. RESET / BASE
   ═════════════════════════════════════════════════════════════════════════ */
html { -webkit-text-size-adjust: 100%; }

body {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11"; /* Inter polish */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: color-mix(in oklch, var(--brand-500) 30%, transparent);
  color: var(--gray-950);
}

/* Focus ring uniforme partout */
.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.page-link:focus,
.dropdown-item:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus) !important;
  border-color: var(--brand-500) !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   3. TYPOGRAPHIE
   ═════════════════════════════════════════════════════════════════════════ */
h1, .h1 { font-size: var(--fs-3xl); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.02em; color: var(--gray-950); }
h2, .h2 { font-size: var(--fs-2xl); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.015em; color: var(--gray-950); }
h3, .h3 { font-size: var(--fs-xl);  font-weight: 600; line-height: var(--lh-snug);  letter-spacing: -.01em;  color: var(--gray-950); }
h4, .h4 { font-size: var(--fs-lg);  font-weight: 600; line-height: var(--lh-snug);  color: var(--gray-950); }
h5, .h5 { font-size: var(--fs-md);  font-weight: 600; line-height: var(--lh-snug);  color: var(--gray-950); }
h6, .h6 { font-size: var(--fs-base); font-weight: 600; line-height: var(--lh-snug); color: var(--gray-950); }

.display-1 { font-size: var(--fs-5xl); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.display-2 { font-size: var(--fs-4xl); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; }

.text-muted { color: var(--gray-600) !important; }
.text-subtle { color: var(--gray-500); }
.text-strong { color: var(--gray-950); font-weight: 600; }
.text-mono { font-family: var(--font-mono); font-size: .92em; }
.eyebrow {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-500);
}

code, kbd, pre, samp { font-family: var(--font-mono); font-size: .92em; }
code {
  padding: 1px 5px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  color: var(--gray-900);
}
/* Fix : à l'intérieur d'un bloc <pre> à fond sombre, le <code> n'a pas son propre fond clair */
pre code, .sg-code code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}
kbd {
  display: inline-flex; align-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  font-size: 11px; font-weight: 500;
  background: var(--gray-0);
  border: 1px solid var(--gray-300);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  box-shadow: var(--shadow-xs);
}

/* ═════════════════════════════════════════════════════════════════════════
   4. BOUTONS
   ═════════════════════════════════════════════════════════════════════════ */
.btn {
  --bs-btn-padding-x: 12px;
  --bs-btn-padding-y: 6px;
  --bs-btn-font-size: var(--fs-base);
  --bs-btn-font-weight: 500;
  --bs-btn-border-radius: var(--radius-md);
  --bs-btn-line-height: 1.4;
  min-height: var(--control-h-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(0.5px); }

.btn-sm { --bs-btn-padding-x: 10px; --bs-btn-padding-y: 4px; --bs-btn-font-size: var(--fs-sm); min-height: var(--control-h-sm); }
.btn-xs { --bs-btn-padding-x: 8px;  --bs-btn-padding-y: 2px; --bs-btn-font-size: var(--fs-xs); min-height: var(--control-h-xs); border-radius: var(--radius-sm); }
.btn-lg { --bs-btn-padding-x: 16px; --bs-btn-padding-y: 8px; --bs-btn-font-size: var(--fs-md); min-height: var(--control-h-lg); }

/* Primary — solide, opinionné */
.btn-primary {
  --bs-btn-bg: var(--brand-600);
  --bs-btn-border-color: var(--brand-600);
  --bs-btn-hover-bg: var(--brand-700);
  --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-800);
  --bs-btn-active-border-color: var(--brand-800);
  --bs-btn-disabled-bg: var(--brand-300);
  --bs-btn-disabled-border-color: var(--brand-300);
  color: #fff; box-shadow: var(--shadow-xs);
}

/* Secondary — outline neutre, le bouton "par défaut" software */
.btn-secondary {
  --bs-btn-bg: var(--app-surface);
  --bs-btn-color: var(--gray-800);
  --bs-btn-border-color: var(--gray-300);
  --bs-btn-hover-bg: var(--gray-50);
  --bs-btn-hover-color: var(--gray-950);
  --bs-btn-hover-border-color: var(--gray-400);
  --bs-btn-active-bg: var(--gray-100);
  --bs-btn-active-color: var(--gray-950);
  --bs-btn-active-border-color: var(--gray-400);
  box-shadow: var(--shadow-xs);
}

/* Outline primary */
.btn-outline-primary {
  --bs-btn-color: var(--accent-fg);
  --bs-btn-border-color: var(--brand-300);
  --bs-btn-bg: transparent;
  --bs-btn-hover-bg: var(--brand-50);
  --bs-btn-hover-color: var(--brand-800);
  --bs-btn-hover-border-color: var(--brand-400);
  --bs-btn-active-bg: var(--brand-100);
}

/* Ghost — transparent jusqu'au hover */
.btn-ghost {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--gray-700);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--gray-100);
  --bs-btn-hover-color: var(--gray-950);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--gray-200);
}

/* Danger / Success / Warning */
.btn-danger {
  --bs-btn-bg: var(--danger-600); --bs-btn-border-color: var(--danger-600);
  --bs-btn-hover-bg: oklch(45% .19 var(--status-danger-hue));
  --bs-btn-hover-border-color: oklch(45% .19 var(--status-danger-hue));
  color: #fff;
}
.btn-success {
  --bs-btn-bg: var(--success-600); --bs-btn-border-color: var(--success-600);
  --bs-btn-hover-bg: oklch(43% .13 var(--status-success-hue));
  --bs-btn-hover-border-color: oklch(43% .13 var(--status-success-hue));
  color: #fff;
}

/* Icon button (carré, juste une icône) */
.btn-icon {
  width: var(--control-h-md); padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon.btn-sm { width: var(--control-h-sm); }
.btn-icon.btn-lg { width: var(--control-h-lg); }

/* ═════════════════════════════════════════════════════════════════════════
   5. FORMULAIRES
   ═════════════════════════════════════════════════════════════════════════ */
.form-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 4px;
}
.form-label .required { color: var(--danger-600); margin-left: 2px; }

.form-control,
.form-select {
  font-size: var(--fs-base);
  padding: 6px 10px;
  min-height: var(--control-h-md);
  background: var(--app-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  color: var(--gray-950);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-shadow: var(--shadow-xs);
}
.form-control::placeholder { color: var(--gray-500); }
.form-control:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) { border-color: var(--gray-400); }
.form-control:disabled,
.form-select:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }

.form-control-sm, .form-select-sm { min-height: var(--control-h-sm); font-size: var(--fs-sm); padding: 4px 8px; }
.form-control-lg, .form-select-lg { min-height: var(--control-h-lg); font-size: var(--fs-md); padding: 8px 12px; }

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

.form-text, .form-help { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 4px; }

/* Floating labels */
.form-floating > .form-control,
.form-floating > .form-select { min-height: 52px; padding-top: 18px; padding-bottom: 6px; }
.form-floating > label { padding: 8px 10px; font-size: var(--fs-sm); color: var(--gray-500); }

/* Checkbox / radio / switch */
.form-check-input {
  width: 16px; height: 16px;
  border: 1.5px solid var(--gray-400);
  background: var(--app-surface);
  margin-top: 3px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.form-check-input:checked {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
}
.form-check-input[type="checkbox"] { border-radius: var(--radius-sm); }
.form-check-label { font-size: var(--fs-base); color: var(--gray-800); cursor: pointer; padding-left: 2px; }
.form-switch .form-check-input { width: 32px; height: 18px; }

/* Validation */
.form-control.is-invalid,
.form-select.is-invalid { border-color: var(--danger-500); }
.form-control.is-invalid:focus,
.form-select.is-invalid:focus { box-shadow: 0 0 0 3px oklch(60% .2 var(--status-danger-hue) / .2) !important; }
.invalid-feedback, .form-errors { font-size: var(--fs-xs); color: var(--danger-600); margin-top: 4px; }
.form-control.is-valid { border-color: var(--success-500); }

/* Django form errorlist (sans aucune surcharge dans le template) */
.errorlist {
  list-style: none; padding: 0; margin: 4px 0 0;
  font-size: var(--fs-xs); color: var(--danger-600);
}
.errorlist li::before { content: "⚠ "; }
.helptext { display: block; font-size: var(--fs-xs); color: var(--gray-600); margin-top: 4px; }

/* Input group */
.input-group-text {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-600);
  font-size: var(--fs-sm);
  padding: 0 10px;
}

/* ═════════════════════════════════════════════════════════════════════════
   6. CARDS
   ═════════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--app-border);
  padding: 12px 16px;
  font-weight: 600;
  font-size: var(--fs-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}
.card-body { padding: 16px; }
.card-footer {
  background: var(--app-surface-muted);
  border-top: 1px solid var(--app-border);
  padding: 10px 16px;
}
.card-title { font-size: var(--fs-md); font-weight: 600; margin-bottom: 4px; }
.card-subtitle { font-size: var(--fs-sm); color: var(--gray-600); margin-bottom: 12px; }

/* Card interactive (hover lift) */
.card-interactive { cursor: pointer; transition: all var(--t-base); }
.card-interactive:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ═════════════════════════════════════════════════════════════════════════
   7. KPI / STAT CARDS
   ═════════════════════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-xs);
}
.stat-card__label {
  font-size: var(--fs-xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-600);
  display: flex; align-items: center; gap: 6px;
}
.stat-card__value {
  font-size: var(--fs-3xl); font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1; color: var(--gray-950);
  font-feature-settings: "tnum";
}
.stat-card__delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-xs); font-weight: 500;
  padding: 2px 6px; border-radius: var(--radius-pill);
}
.stat-card__delta--up { color: var(--success-600); background: var(--success-100); }
.stat-card__delta--down { color: var(--danger-600); background: var(--danger-100); }
.stat-card__delta--flat { color: var(--gray-700); background: var(--gray-100); }

/* ═════════════════════════════════════════════════════════════════════════
   8. BADGES
   ═════════════════════════════════════════════════════════════════════════ */
.badge {
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  letter-spacing: 0;
  display: inline-flex; align-items: center; gap: 4px;
  line-height: 1.5;
}
.badge.text-bg-primary { background: var(--brand-100) !important; color: var(--brand-800) !important; }
.badge.text-bg-success { background: var(--success-100); color: var(--success-600); }
.badge.text-bg-warning { background: var(--warning-100); color: oklch(45% .15 var(--status-warning-hue)); }
.badge.text-bg-danger { background: var(--danger-100); color: var(--danger-600); }
.badge.text-bg-info { background: var(--info-100); color: var(--info-600); }
.badge.text-bg-secondary { background: var(--gray-100); color: var(--gray-700); }

.badge-solid.text-bg-primary { background: var(--brand-600) !important; color: #fff !important; }
.badge-solid.text-bg-success { background: var(--success-600); color: #fff; }
.badge-solid.text-bg-danger { background: var(--danger-600); color: #fff; }

.badge-dot { padding-left: 5px; }
.badge-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block; margin-right: 4px;
}

/* ═════════════════════════════════════════════════════════════════════════
   9. ALERTS (+ Django messages mapping)
   ═════════════════════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: var(--fs-base);
  border-width: 1px;
  border-style: solid;
  display: flex; gap: 10px; align-items: flex-start;
}
.alert-primary { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-800); }
.alert-success { background: var(--success-100); border-color: oklch(85% .12 var(--status-success-hue)); color: oklch(35% .11 var(--status-success-hue)); }
.alert-warning { background: var(--warning-100); border-color: oklch(85% .15 var(--status-warning-hue)); color: oklch(38% .15 var(--status-warning-hue)); }
.alert-danger { background: var(--danger-100); border-color: oklch(85% .08 var(--status-danger-hue)); color: oklch(40% .17 var(--status-danger-hue)); }
.alert-info { background: var(--info-100); border-color: oklch(85% .07 var(--status-info-hue)); color: oklch(40% .13 var(--status-info-hue)); }

/* Django messages : .alert.alert-debug / .info / .success / .warning / .error */
.alert.alert-debug { background: var(--gray-100); border-color: var(--gray-300); color: var(--gray-800); }
.alert.alert-error { background: var(--danger-100); border-color: oklch(85% .08 var(--status-danger-hue)); color: oklch(40% .17 var(--status-danger-hue)); }

/* ═════════════════════════════════════════════════════════════════════════
   10. TABLES
   ═════════════════════════════════════════════════════════════════════════ */
.table {
  --bs-table-bg: transparent;
  font-size: var(--fs-base);
  margin: 0;
  color: var(--gray-800);
  border-collapse: separate;
  border-spacing: 0;
}
.table > thead {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-600);
  background: var(--app-surface-muted);
}
.table > thead > tr > th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
  border-top: 1px solid var(--app-border);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.table > tbody > tr > td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
  vertical-align: middle;
}
.table > tbody > tr:last-child > td { border-bottom: none; }
.table > tbody > tr:hover { background: var(--app-surface-muted); }

.table-sortable th[data-sort] {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 24px;
}
.table-sortable th[data-sort]:hover { color: var(--gray-900); }
.table-sortable th[data-sort]::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 10px; height: 10px; transform: translateY(-50%);
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 6l4-4 4 4M4 10l4 4 4-4" stroke="currentColor" fill="none" stroke-width="1.5"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 6l4-4 4 4M4 10l4 4 4-4" stroke="currentColor" fill="none" stroke-width="1.5"/></svg>') center / contain no-repeat;
  opacity: .4;
}
.table-sortable th[data-sort].asc::after  { opacity: 1; transform: translateY(-50%) rotate(180deg); }
.table-sortable th[data-sort].desc::after { opacity: 1; }

.table-compact > tbody > tr > td,
.table-compact > thead > tr > th { padding: 5px 10px; }

.table-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-card .table > thead > tr > th:first-child,
.table-card .table > tbody > tr > td:first-child { padding-left: 16px; }
.table-card .table > thead > tr > th:last-child,
.table-card .table > tbody > tr > td:last-child  { padding-right: 16px; }
.table-card .table > thead > tr > th { border-top: none; }

/* ═════════════════════════════════════════════════════════════════════════
   11. NAVBAR / TOPBAR / SIDEBAR
   ═════════════════════════════════════════════════════════════════════════ */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "sidebar topbar" "sidebar main";
  min-height: 100vh;
  background: var(--app-surface-muted);
}
.app-shell.app-shell--collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

.app-topbar {
  grid-area: topbar;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  position: sticky; top: 0; z-index: 100;
}

.app-sidebar {
  grid-area: sidebar;
  background: var(--app-surface);
  border-right: 1px solid var(--app-border);
  display: flex; flex-direction: column;
  padding: 8px 0;
  /* Sticky : reste visible quand on scroll. Scroll interne si la nav déborde. */
  position: sticky;
  top: 0;
  /* z-index > topbar (100) et main : le contexte d'empilement de la sidebar (et
     donc le flyout fixed en mode réduit) passe AU-DESSUS du contenu de la page. */
  z-index: 200;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  /* scrollbar discrète sur la sidebar */
  scrollbar-width: thin;
}
.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--gray-200); border: none; }
.app-sidebar::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* Pied de la sidebar (toujours en bas, ne scrolle pas avec la nav) */
.app-sidebar__footer {
  margin-top: auto;
  padding: 8px 12px;
  border-top: 1px solid var(--app-border);
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm);
  color: var(--gray-700);
}
.app-shell--collapsed .app-sidebar__footer span,
.app-shell--collapsed .app-sidebar__footer .app-sidebar__footer-text { display: none; }
.app-sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 16px;
  font-weight: 600; font-size: var(--fs-md);
  color: var(--gray-950);
}
.app-sidebar__brand-mark {
  width: 28px; height: 28px;
  background: var(--brand-600);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: var(--fs-md);
  flex-shrink: 0;
}
.app-sidebar__section { padding: 8px 8px 4px; }
.app-sidebar__section-title {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
  padding: 8px 8px 4px;
}
.app-sidebar__nav { display: flex; flex-direction: column; gap: 1px; padding: 0 8px; }
.app-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: var(--radius-md);
  font-size: var(--fs-base); color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--t-fast);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.app-nav-link i { font-size: 16px; flex-shrink: 0; width: 18px; text-align: center; color: var(--gray-500); }
.app-nav-link:hover { background: var(--gray-100); color: var(--gray-950); }
.app-nav-link:hover i { color: var(--gray-700); }
.app-nav-link.active {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 600;
}
.app-nav-link.active i { color: var(--accent-fg); }
[data-bs-theme="dark"] .app-nav-link.active {
  background: color-mix(in oklch, var(--brand-500) 15%, transparent);
  color: var(--brand-300);
}
.app-nav-link__badge {
  margin-left: auto; font-size: 10px; padding: 0 5px;
  background: var(--gray-200); color: var(--gray-700);
  border-radius: var(--radius-pill); min-width: 18px; text-align: center;
}
.app-nav-link.active .app-nav-link__badge { background: var(--brand-200); color: var(--brand-800); }

.app-shell--collapsed .app-sidebar__brand span,
.app-shell--collapsed .app-sidebar__section-title,
.app-shell--collapsed .app-nav-link span,
.app-shell--collapsed .app-nav-link__badge { display: none; }
.app-shell--collapsed .app-nav-link { justify-content: center; padding: 8px; }

/* ── Sidebar : sous-menus + flyout (mode réduit) ──────────────────────── */
.app-nav-link--parent {
  width: 100%; border: 0; background: transparent;
  font-family: inherit; text-align: left; cursor: pointer;
}
/* Le label prend l'espace ; badge + caret restent à droite. */
.app-nav-link > span:not(.app-nav-link__badge):not(.app-nav-flyout) {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.app-nav-link__caret {
  margin-left: 4px; font-size: 12px !important; width: auto !important;
  color: var(--gray-400); transition: transform var(--t-fast);
}
.app-nav-link--parent[aria-expanded="true"] .app-nav-link__caret { transform: rotate(90deg); }

/* Sous-liste (mode déployé) : rail vertical + items alignés sous le label parent */
.app-nav-sub { list-style: none; margin: 2px 0; padding: 0 0 0 18px; position: relative; }
.app-nav-sub::before {
  content: ""; position: absolute; left: 19px; top: 2px; bottom: 2px;
  width: 1px; background: var(--app-border);
}
.app-nav-sublink {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 16px; border-radius: var(--radius-md);
  font-size: var(--fs-sm); color: var(--gray-600);
  text-decoration: none; font-weight: 500;
  position: relative; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.app-nav-sublink:hover { background: var(--gray-100); color: var(--gray-950); }
.app-nav-sublink.active { background: var(--brand-50); color: var(--accent-fg); font-weight: 600; }
[data-bs-theme="dark"] .app-nav-sublink.active { background: color-mix(in oklch, var(--brand-500) 14%, transparent); color: var(--brand-300); }
/* pastille de marque sur le rail pour l'item actif */
.app-nav-sublink.active::before {
  content: ""; position: absolute; left: -3px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-500);
}
.app-nav-sublink .app-nav-link__badge { margin-left: auto; }

/* En mode réduit : plus de caret ni de sous-liste inline — le flyout prend le relais. */
.app-shell--collapsed .app-nav-link__caret,
.app-shell--collapsed .app-nav-sub { display: none !important; }
/* Mode réduit : chaque item = une pastille 40px centrée dans le rail. Taille
   EXPLICITE (indépendante du flex/scrollbar) → cible de survol fiable + icône
   centrée. margin:auto centre horizontalement dans la colonne. */
.app-shell--collapsed .app-nav-group { display: block; width: 40px; margin: 0 auto; }
.app-shell--collapsed .app-sidebar__nav > .app-nav-link,
.app-shell--collapsed .app-nav-group > .app-nav-link--parent {
  width: 40px; height: 38px; padding: 0; margin: 1px auto;
  justify-content: center; border-radius: var(--radius-md);
}

/* Flyout (mode réduit) — popover thémé. Caché en mode déployé. */
.app-nav-flyout { display: none; }
/* position:fixed → échappe l'overflow de la sidebar ; top/left écrits par theme.js.
   Spécificité > la règle qui masque les <span> en mode réduit. */
.app-shell--collapsed .app-nav-link .app-nav-flyout,
.app-shell--collapsed .app-nav-group .app-nav-flyout {
  display: block;
  position: fixed; left: 0; top: 0; z-index: 1080;
  min-width: 190px; max-width: 280px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateX(-6px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  pointer-events: none;
}
.app-shell--collapsed .app-nav-flyout.is-visible {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
}
/* pont invisible : ne pas perdre le survol dans le vide entre l'icône et le flyout */
.app-shell--collapsed .app-nav-flyout::before {
  content: ""; position: absolute; left: -10px; top: 0; bottom: 0; width: 10px;
}
/* petite flèche vers le rail (façon tooltip) */
.app-shell--collapsed .app-nav-flyout::after {
  content: ""; position: absolute; left: -5px; top: 13px;
  width: 9px; height: 9px; background: var(--app-surface);
  border-left: 1px solid var(--app-border); border-bottom: 1px solid var(--app-border);
  transform: rotate(45deg);
}
/* feuille (item sans enfants) : label seul, façon tooltip */
.app-nav-flyout--label {
  font-size: var(--fs-sm); font-weight: 600; color: var(--gray-950);
  white-space: nowrap; padding: 6px 10px;
}
/* groupe : en-tête + items stylés comme les liens de nav */
.app-nav-flyout__title {
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--gray-500); padding: 4px 10px 8px;
  border-bottom: 1px solid var(--app-border); margin-bottom: 4px;
}
.app-nav-flyout__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.app-nav-flyout__list a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-md);
  font-size: var(--fs-sm); color: var(--gray-700); text-decoration: none; white-space: nowrap;
  font-weight: 500; transition: background var(--t-fast), color var(--t-fast);
}
.app-nav-flyout__list a:hover { background: var(--gray-100); color: var(--gray-950); }
.app-nav-flyout__list a.active { background: var(--brand-50); color: var(--accent-fg); font-weight: 600; }
[data-bs-theme="dark"] .app-nav-flyout__list a.active { background: color-mix(in oklch, var(--brand-500) 14%, transparent); color: var(--brand-300); }
.app-nav-flyout__list .app-nav-link__badge { margin-left: auto; }

.app-main {
  grid-area: main;
  padding: 20px 24px 40px;
  overflow-x: hidden;
  max-width: 100%;
}

/* Mobile : sidebar en offcanvas */
@media (max-width: 991.98px) {
  .app-shell { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
  .app-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
    transform: translateX(-100%); transition: transform var(--t-base);
    z-index: 1050; box-shadow: var(--shadow-xl);
  }
  .app-shell.app-shell--mobile-open .app-sidebar { transform: translateX(0); }
  .app-main { padding: 16px; }
}

/* Backdrop mobile */
.app-shell__backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .4);
  z-index: 1040; opacity: 0; pointer-events: none; transition: opacity var(--t-base);
}
.app-shell.app-shell--mobile-open .app-shell__backdrop { opacity: 1; pointer-events: auto; }

/* ═════════════════════════════════════════════════════════════════════════
   12. PAGE HEADER
   ═════════════════════════════════════════════════════════════════════════ */
.page-header {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: flex-end; justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--app-border);
}
.page-header__title { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -.015em; margin: 0; color: var(--gray-950); }
.page-header__subtitle { font-size: var(--fs-sm); color: var(--gray-600); margin-top: 2px; }
.page-header__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-header__breadcrumb { margin-bottom: 4px; }

/* ═════════════════════════════════════════════════════════════════════════
   13. BREADCRUMBS
   ═════════════════════════════════════════════════════════════════════════ */
.breadcrumb {
  font-size: var(--fs-sm);
  margin: 0;
  --bs-breadcrumb-divider: '/';
  --bs-breadcrumb-divider-color: var(--gray-400);
}
.breadcrumb-item a {
  color: var(--gray-600);
  text-decoration: none;
}
.breadcrumb-item a:hover { color: var(--accent-fg); }
.breadcrumb-item.active { color: var(--gray-900); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-400); padding: 0 6px; }

/* ═════════════════════════════════════════════════════════════════════════
   14. PAGINATION (Django-friendly)
   ═════════════════════════════════════════════════════════════════════════ */
.pagination {
  --bs-pagination-padding-y: 4px;
  --bs-pagination-padding-x: 8px;
  --bs-pagination-font-size: var(--fs-sm);
  --bs-pagination-border-radius: var(--radius-md);
  --bs-pagination-color: var(--gray-700);
  --bs-pagination-bg: var(--app-surface);
  --bs-pagination-border-color: var(--gray-300);
  --bs-pagination-hover-color: var(--gray-950);
  --bs-pagination-hover-bg: var(--gray-100);
  --bs-pagination-hover-border-color: var(--gray-300);
  --bs-pagination-active-color: #fff;
  --bs-pagination-active-bg: var(--brand-600);
  --bs-pagination-active-border-color: var(--brand-600);
  --bs-pagination-disabled-color: var(--gray-400);
  --bs-pagination-disabled-bg: var(--app-surface);
  --bs-pagination-disabled-border-color: var(--gray-200);
  gap: 4px;
}
.pagination .page-link {
  min-width: var(--control-h-sm); height: var(--control-h-sm);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 500;
}

/* ═════════════════════════════════════════════════════════════════════════
   15. NAV TABS / PILLS
   ═════════════════════════════════════════════════════════════════════════ */
.nav-tabs {
  border-bottom: 1px solid var(--app-border);
  gap: 4px;
  --bs-nav-tabs-border-color: transparent;
  --bs-nav-tabs-border-radius: 0;
}
.nav-tabs .nav-link {
  border: none;
  padding: 8px 12px;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
}
.nav-tabs .nav-link:hover { color: var(--gray-900); border-bottom-color: var(--gray-300); }
.nav-tabs .nav-link.active {
  color: var(--accent-fg);
  border-bottom-color: var(--brand-600);
  background: transparent;
}

.nav-pills .nav-link {
  padding: 4px 10px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-md);
}
.nav-pills .nav-link.active {
  background: var(--gray-900);
  color: var(--gray-0);
}

/* ═════════════════════════════════════════════════════════════════════════
   16. DROPDOWN
   ═════════════════════════════════════════════════════════════════════════ */
.dropdown-menu {
  --bs-dropdown-min-width: 180px;
  --bs-dropdown-padding-y: 4px;
  --bs-dropdown-padding-x: 4px;
  --bs-dropdown-font-size: var(--fs-base);
  --bs-dropdown-bg: var(--app-surface);
  --bs-dropdown-border-color: var(--app-border);
  --bs-dropdown-border-radius: var(--radius-lg);
  --bs-dropdown-link-color: var(--gray-800);
  --bs-dropdown-link-hover-bg: var(--gray-100);
  --bs-dropdown-link-hover-color: var(--gray-950);
  box-shadow: var(--shadow-lg);
  padding: 4px;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-base);
}
.dropdown-item i { color: var(--gray-500); width: 16px; }
.dropdown-divider { border-color: var(--app-border); margin: 4px 0; }
.dropdown-header {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500); padding: 6px 10px 2px;
}

/* ═════════════════════════════════════════════════════════════════════════
   17. MODAL / OFFCANVAS
   ═════════════════════════════════════════════════════════════════════════ */
.modal-content {
  border: 1px solid var(--app-border);
  border-radius: var(--radius-xl);
  background: var(--app-surface);
  box-shadow: var(--shadow-xl);
}
.modal-header {
  border-bottom: 1px solid var(--app-border);
  padding: 14px 20px;
}
.modal-title { font-size: var(--fs-lg); font-weight: 600; }
.modal-body { padding: 20px; font-size: var(--fs-base); }
.modal-footer {
  border-top: 1px solid var(--app-border);
  padding: 12px 20px;
  background: var(--app-surface-muted);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  gap: 8px;
}

.offcanvas {
  background: var(--app-surface);
  border-color: var(--app-border) !important;
}
.offcanvas-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-border);
}
.offcanvas-title { font-size: var(--fs-lg); font-weight: 600; }
.offcanvas-body { padding: 20px; }

/* ═════════════════════════════════════════════════════════════════════════
   18. TOASTS
   ═════════════════════════════════════════════════════════════════════════ */
.toast-container { padding: 16px; gap: 8px; display: flex; flex-direction: column; }
.toast {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-base);
  width: 340px;
  max-width: 100%;
  --bs-toast-bg: var(--app-surface);
  --bs-toast-color: var(--gray-900);
}
.toast-header {
  background: transparent;
  border-bottom: 1px solid var(--app-border);
  padding: 8px 12px;
  font-weight: 600;
}
.toast-body { padding: 10px 12px; color: var(--gray-700); }
.toast--success { border-left: 3px solid var(--success-500); }
.toast--danger  { border-left: 3px solid var(--danger-500); }
.toast--warning { border-left: 3px solid var(--warning-500); }
.toast--info    { border-left: 3px solid var(--info-500); }

/* ═════════════════════════════════════════════════════════════════════════
   19. PROGRESS / SPINNER / PLACEHOLDER (skeleton)
   ═════════════════════════════════════════════════════════════════════════ */
.progress {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar { background: var(--brand-600); }
.progress.progress-thin { height: 3px; }
.progress.progress-thick { height: 10px; }

.spinner-border, .spinner-grow { --bs-spinner-border-width: 2px; }

.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.skeleton-text { height: 12px; width: 100%; }
.skeleton-text.skeleton-text--short { width: 40%; }
.skeleton-text.skeleton-text--medium { width: 70%; }
.skeleton-block { display: block; height: 80px; width: 100%; border-radius: var(--radius-md); }
.skeleton-circle { border-radius: 50%; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═════════════════════════════════════════════════════════════════════════
   20. AVATAR
   ═════════════════════════════════════════════════════════════════════════ */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--app-border);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 20px; height: 20px; font-size: 10px; }
.avatar-sm { width: 24px; height: 24px; font-size: 11px; }
.avatar-lg { width: 40px; height: 40px; font-size: var(--fs-md); }
.avatar-xl { width: 56px; height: 56px; font-size: var(--fs-lg); }

.avatar-square { border-radius: var(--radius-md); }

.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -6px; border: 2px solid var(--app-surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack__more {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gray-100); color: var(--gray-700);
  font-size: var(--fs-xs); font-weight: 600;
  border-radius: 50%;
  width: 32px; height: 32px;
  border: 2px solid var(--app-surface);
  margin-left: -6px;
}

/* Colored avatars (for initials) */
.avatar--primary { background: var(--brand-100); color: var(--brand-800); }
.avatar--success { background: var(--success-100); color: var(--success-600); }
.avatar--warning { background: var(--warning-100); color: oklch(45% .15 var(--status-warning-hue)); }
.avatar--danger  { background: var(--danger-100); color: var(--danger-600); }
.avatar--info    { background: var(--info-100); color: var(--info-600); }

/* ═════════════════════════════════════════════════════════════════════════
   21. STEPPER / WIZARD
   ═════════════════════════════════════════════════════════════════════════ */
.stepper {
  display: flex; align-items: flex-start;
  gap: 0;
  width: 100%;
}
.stepper__step {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  gap: 6px;
  padding: 0 8px;
}
.stepper__step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(-50% + 16px);
  right: calc(50% + 16px);
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.stepper__step:first-child::before { display: none; }
.stepper__step--done::before,
.stepper__step--active::before { background: var(--brand-500); }
.stepper__bullet {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--app-surface);
  border: 2px solid var(--gray-300);
  color: var(--gray-600);
  font-size: var(--fs-xs); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.stepper__step--active .stepper__bullet {
  border-color: var(--brand-600);
  color: var(--brand-700);
  background: var(--brand-50);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-500) 20%, transparent);
}
.stepper__step--done .stepper__bullet {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.stepper__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.3;
}
.stepper__step--active .stepper__label { color: var(--gray-950); font-weight: 600; }
.stepper__step--done .stepper__label { color: var(--gray-800); }

/* ═════════════════════════════════════════════════════════════════════════
   22. EMPTY STATE
   ═════════════════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 12px;
}
.empty-state__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  background: var(--gray-100);
  color: var(--gray-500);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.empty-state__title { font-size: var(--fs-lg); font-weight: 600; color: var(--gray-950); margin: 4px 0 0; }
.empty-state__desc { font-size: var(--fs-sm); color: var(--gray-600); max-width: 360px; }
.empty-state__actions { display: flex; gap: 8px; margin-top: 8px; }

/* ═════════════════════════════════════════════════════════════════════════
   23. COMMAND PALETTE (⌘K)
   ═════════════════════════════════════════════════════════════════════════ */
.cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 1070;
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  backdrop-filter: blur(2px);
}
[data-bs-theme="dark"] .cmdk-backdrop { background: rgba(0, 0, 0, .65); }
.cmdk-backdrop.is-open { display: flex; }
.cmdk {
  width: 640px; max-width: calc(100% - 32px);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 70vh;
}
.cmdk__input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border);
}
.cmdk__input-wrap i { color: var(--gray-500); font-size: 16px; }
.cmdk__input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: var(--fs-lg);
  color: var(--gray-950);
}
.cmdk__input::placeholder { color: var(--gray-500); }
.cmdk__list { overflow-y: auto; padding: 6px; }
.cmdk__group-title {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
  padding: 8px 10px 4px;
}
.cmdk__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  color: var(--gray-800);
  cursor: pointer;
}
.cmdk__item i { color: var(--gray-500); width: 18px; font-size: 15px; }
.cmdk__item:hover, .cmdk__item.is-selected {
  background: var(--gray-100);
  color: var(--gray-950);
}
.cmdk__item.is-selected i { color: var(--brand-600); }
.cmdk__item-shortcut { margin-left: auto; display: flex; gap: 3px; }
.cmdk__footer {
  border-top: 1px solid var(--app-border);
  padding: 8px 14px;
  background: var(--app-surface-muted);
  display: flex; align-items: center; gap: 12px;
  font-size: var(--fs-xs); color: var(--gray-600);
}
.cmdk__footer kbd { font-size: 10px; height: 16px; min-width: 16px; }

/* ═════════════════════════════════════════════════════════════════════════
   24. SEARCH INPUT (avec icône)
   ═════════════════════════════════════════════════════════════════════════ */
.search-input {
  position: relative;
  display: inline-flex; align-items: center;
  width: 100%;
}
.search-input > i {
  position: absolute; left: 10px;
  color: var(--gray-500); font-size: 14px;
  pointer-events: none;
}
.search-input > .form-control { padding-left: 32px; }
.search-input > kbd { position: absolute; right: 10px; }
.search-input.search-input--with-kbd > .form-control { padding-right: 40px; }

/* ═════════════════════════════════════════════════════════════════════════
   25. LIST GROUP
   ═════════════════════════════════════════════════════════════════════════ */
.list-group { --bs-list-group-bg: var(--app-surface); --bs-list-group-border-color: var(--app-border); }
.list-group-item {
  padding: 10px 14px;
  font-size: var(--fs-base);
  color: var(--gray-800);
  border-color: var(--app-border);
}
.list-group-item.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

/* ═════════════════════════════════════════════════════════════════════════
   26. ACCORDION
   ═════════════════════════════════════════════════════════════════════════ */
.accordion {
  --bs-accordion-bg: var(--app-surface);
  --bs-accordion-border-color: var(--app-border);
  --bs-accordion-border-radius: var(--radius-md);
  --bs-accordion-active-bg: var(--brand-50);
  --bs-accordion-active-color: var(--brand-800);
  --bs-accordion-btn-focus-box-shadow: var(--shadow-focus);
}
.accordion-button {
  font-size: var(--fs-base);
  font-weight: 500;
  padding: 12px 14px;
}
.accordion-button:not(.collapsed) { box-shadow: none; }
.accordion-body { padding: 12px 14px; font-size: var(--fs-base); color: var(--gray-700); }

/* ═════════════════════════════════════════════════════════════════════════
   27. SECTIONS / DIVIDERS / HELPERS
   ═════════════════════════════════════════════════════════════════════════ */
.section-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0;
}
.section-divider::before, .section-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--app-border);
}
.section-divider__label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
}

.surface { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-lg); }
.surface-muted { background: var(--app-surface-muted); }
.bordered { border: 1px solid var(--app-border); }
.bordered-top { border-top: 1px solid var(--app-border); }
.bordered-bottom { border-bottom: 1px solid var(--app-border); }

/* Status dot inline */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-400);
  vertical-align: middle;
}
.status-dot--online { background: var(--success-500); box-shadow: 0 0 0 3px color-mix(in oklch, var(--success-500) 25%, transparent); }
.status-dot--busy { background: var(--danger-500); }
.status-dot--away { background: var(--warning-500); }
.status-dot--offline { background: var(--gray-400); }

/* ═════════════════════════════════════════════════════════════════════════
   28. UTILITAIRES SUPPLÉMENTAIRES
   ═════════════════════════════════════════════════════════════════════════ */
.bg-app { background: var(--app-surface) !important; }
.bg-app-muted { background: var(--app-surface-muted) !important; }
.text-brand { color: var(--brand-600) !important; }
.border-app { border-color: var(--app-border) !important; }

.fs-xs { font-size: var(--fs-xs) !important; }
.fs-sm { font-size: var(--fs-sm) !important; }
.fs-base { font-size: var(--fs-base) !important; }
.fs-md { font-size: var(--fs-md) !important; }
.fs-lg { font-size: var(--fs-lg) !important; }
.fs-xl { font-size: var(--fs-xl) !important; }

.tabular-nums { font-variant-numeric: tabular-nums; }

/* ═════════════════════════════════════════════════════════════════════════
   29. FOOTERS (4 variantes)
   ═════════════════════════════════════════════════════════════════════════ */

/* — 29a. App footer : en bas d'un dashboard, discret, status + version — */
.app-footer {
  display: flex; align-items: center;
  gap: 16px;
  padding: 10px 16px;
  margin: 24px -24px -40px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface);
  font-size: var(--fs-xs);
  color: var(--gray-600);
}
.app-footer__divider { width: 1px; height: 12px; background: var(--app-border); }
.app-footer a { color: var(--gray-700); text-decoration: none; }
.app-footer a:hover { color: var(--accent-fg); }
.app-footer__status { display: inline-flex; align-items: center; gap: 6px; }
.app-footer__version { font-family: var(--font-mono); color: var(--gray-500); }
.app-footer__links { display: inline-flex; gap: 14px; margin-left: auto; }
@media (max-width: 767.98px) {
  .app-footer { flex-wrap: wrap; padding: 12px; margin: 16px -16px -16px; }
  .app-footer__links { margin-left: 0; width: 100%; padding-top: 8px; border-top: 1px solid var(--app-border); }
}

/* — 29b. Site footer : pour landing/marketing, multi-colonnes — */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 56px 0 0;
  font-size: var(--fs-sm);
  margin-top: 80px;
}
[data-bs-theme="dark"] .site-footer { background: var(--gray-100); }
.site-footer__container {
  max-width: var(--content-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 40px;
}
.site-footer__brand h4 { color: #fff; font-size: var(--fs-lg); margin: 12px 0 8px; }
[data-bs-theme="dark"] .site-footer__brand h4 { color: var(--gray-950); }
.site-footer__brand p { color: var(--gray-400); margin: 0 0 16px; max-width: 280px; }
.site-footer__brand-logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-md); font-weight: 700; color: #fff;
}
[data-bs-theme="dark"] .site-footer__brand-logo { color: var(--gray-950); }
.site-footer__brand-mark {
  width: 32px; height: 32px;
  background: var(--brand-600);
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
}
.site-footer__social { display: flex; gap: 8px; margin-top: 16px; }
.site-footer__social a {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .06);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-300);
  transition: all var(--t-fast);
  text-decoration: none;
}
.site-footer__social a:hover { background: var(--brand-600); color: #fff; }
[data-bs-theme="dark"] .site-footer__social a { background: var(--gray-200); color: var(--gray-700); }
[data-bs-theme="dark"] .site-footer__social a:hover { background: var(--brand-600); color: #fff; }

.site-footer__col h6 {
  color: #fff;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 12px;
}
[data-bs-theme="dark"] .site-footer__col h6 { color: var(--gray-950); }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer__col a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: color var(--t-fast);
}
.site-footer__col a:hover { color: #fff; }
[data-bs-theme="dark"] .site-footer__col a { color: var(--gray-700); }
[data-bs-theme="dark"] .site-footer__col a:hover { color: var(--gray-950); }
.site-footer__col .badge { margin-left: 4px; }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-size: var(--fs-xs);
  color: var(--gray-500);
  max-width: var(--content-max-w);
  margin: 0 auto;
}
[data-bs-theme="dark"] .site-footer__bottom { border-top-color: var(--gray-200); color: var(--gray-600); }
.site-footer__bottom a { color: var(--gray-400); text-decoration: none; margin-left: 14px; }
.site-footer__bottom a:hover { color: #fff; }
[data-bs-theme="dark"] .site-footer__bottom a { color: var(--gray-700); }

@media (max-width: 991.98px) {
  .site-footer__container { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .site-footer__container { grid-template-columns: 1fr; }
}

/* — 29c. Simple footer : centré, juste une ligne — */
.simple-footer {
  border-top: 1px solid var(--app-border);
  padding: 20px 24px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--gray-600);
  background: var(--app-surface);
}
.simple-footer a { color: var(--gray-700); text-decoration: none; }
.simple-footer a:hover { color: var(--accent-fg); }
.simple-footer__sep { margin: 0 8px; color: var(--gray-400); }

/* — 29d. CTA footer : grand bandeau pleine largeur, conversion — */
.cta-footer {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  padding: 64px 24px;
  text-align: center;
  border-radius: var(--radius-xl);
  margin: 24px 0;
  position: relative;
  overflow: hidden;
}
.cta-footer::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0%, transparent 50%);
  pointer-events: none;
}
.cta-footer__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  background: rgba(255, 255, 255, .12);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  position: relative;
}
.cta-footer__title {
  font-size: var(--fs-4xl); font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 12px; line-height: 1.1;
  color: #fff;
  position: relative;
}
.cta-footer__desc {
  font-size: var(--fs-lg); color: rgba(255, 255, 255, .8);
  margin: 0 auto 24px; max-width: 540px;
  position: relative;
}
.cta-footer__actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  position: relative;
}
.cta-footer .btn-primary {
  background: #fff; color: var(--brand-800); border-color: #fff;
}
.cta-footer .btn-primary:hover { background: var(--gray-50); color: var(--brand-900); border-color: var(--gray-50); }
.cta-footer .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta-footer .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ═════════════════════════════════════════════════════════════════════════
   30. CARDS — variantes additionnelles
   ═════════════════════════════════════════════════════════════════════════ */

/* Cover card : image en haut, contenu en bas */
.card-cover { display: flex; flex-direction: column; overflow: hidden; }
.card-cover__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--brand-200), var(--brand-500));
  position: relative;
  overflow: hidden;
}
.card-cover__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover__badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px;
}

/* Profile card : avatar + meta + actions */
.card-profile {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 20px;
  text-align: center;
}
.card-profile__avatar { margin-bottom: 12px; }
.card-profile__name { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 2px; color: var(--gray-950); }
.card-profile__title { font-size: var(--fs-sm); color: var(--gray-600); margin: 0 0 16px; }
.card-profile__meta {
  display: flex; gap: 24px; padding: 12px 0;
  border-top: 1px solid var(--app-border);
  border-bottom: 1px solid var(--app-border);
  width: 100%; justify-content: center; margin-bottom: 16px;
}
.card-profile__meta-item { text-align: center; }
.card-profile__meta-value { font-size: var(--fs-lg); font-weight: 600; color: var(--gray-950); display: block; }
.card-profile__meta-label { font-size: var(--fs-xs); color: var(--gray-600); text-transform: uppercase; letter-spacing: .04em; }

/* Pricing card */
.pricing-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  transition: all var(--t-base);
}
.pricing-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); }
.pricing-card--featured {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 1px var(--brand-500), var(--shadow-md);
}
.pricing-card__ribbon {
  position: absolute; top: -10px; right: 16px;
  background: var(--brand-600); color: #fff;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: .04em;
}
.pricing-card__name { font-size: var(--fs-md); font-weight: 600; color: var(--gray-950); margin: 0; }
.pricing-card__desc { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; }
.pricing-card__price {
  display: flex; align-items: baseline; gap: 4px;
  font-feature-settings: "tnum";
}
.pricing-card__amount { font-size: var(--fs-4xl); font-weight: 700; color: var(--gray-950); letter-spacing: -.02em; line-height: 1; }
.pricing-card__period { font-size: var(--fs-sm); color: var(--gray-600); }
.pricing-card__features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pricing-card__features li { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-sm); color: var(--gray-800); }
.pricing-card__features i { color: var(--success-500); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.pricing-card__features li.is-disabled { color: var(--gray-500); text-decoration: line-through; }
.pricing-card__features li.is-disabled i { color: var(--gray-400); }

/* Stat card with sparkline */
.stat-card__chart {
  height: 32px;
  width: 100%;
  margin-top: 4px;
}

/* Feature card (icon + text, pour landing) */
.feature-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}
.feature-card__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.feature-card__title { font-size: var(--fs-md); font-weight: 600; color: var(--gray-950); margin: 0 0 4px; }
.feature-card__desc { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; line-height: 1.55; }

/* ═════════════════════════════════════════════════════════════════════════
   31. HERO / BANNER (landing pages)
   ═════════════════════════════════════════════════════════════════════════ */
.hero {
  padding: 64px 24px;
  text-align: center;
  background: var(--app-surface);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  color: var(--brand-800);
  margin-bottom: 16px;
}
.hero__title {
  font-size: var(--fs-5xl);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--gray-950);
  margin: 0 auto 16px;
  max-width: 720px;
  text-wrap: balance;
}
.hero__desc {
  font-size: var(--fs-lg);
  color: var(--gray-600);
  margin: 0 auto 24px;
  max-width: 560px;
  line-height: 1.55;
}
.hero__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero__trust {
  margin-top: 32px;
  font-size: var(--fs-xs);
  color: var(--gray-500);
  display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap;
}

/* ═════════════════════════════════════════════════════════════════════════
   32. FILE UPLOAD (dropzone)
   ═════════════════════════════════════════════════════════════════════════ */
.file-drop {
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: var(--app-surface-muted);
  transition: all var(--t-fast);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.file-drop:hover, .file-drop.is-dragover {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-800);
}
.file-drop__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-600);
  font-size: 18px;
  margin-bottom: 4px;
}
.file-drop:hover .file-drop__icon { color: var(--accent-fg); border-color: var(--brand-300); }
.file-drop__title { font-weight: 600; color: var(--gray-950); font-size: var(--fs-base); }
.file-drop__hint { font-size: var(--fs-sm); color: var(--gray-600); }
.file-drop__hint strong { color: var(--accent-fg); }
.file-drop input[type=file] { display: none; }

/* Item de fichier uploadé */
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  background: var(--app-surface);
  font-size: var(--fs-sm);
}
.file-item__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--gray-700);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.file-item__name { font-weight: 500; color: var(--gray-950); }
.file-item__meta { font-size: var(--fs-xs); color: var(--gray-600); }
.file-item__progress { flex-grow: 1; }

/* ═════════════════════════════════════════════════════════════════════════
   33. TIMELINE
   ═════════════════════════════════════════════════════════════════════════ */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 1px; background: var(--app-border);
}
.timeline__item { position: relative; padding-left: 36px; padding-bottom: 20px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__bullet {
  position: absolute; left: 4px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--app-surface);
  border: 2px solid var(--gray-300);
  z-index: 1;
}
.timeline__item--active .timeline__bullet { border-color: var(--brand-600); background: var(--brand-100); box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-500) 20%, transparent); }
.timeline__item--done .timeline__bullet { background: var(--brand-600); border-color: var(--brand-600); }
.timeline__item--danger .timeline__bullet { background: var(--danger-500); border-color: var(--danger-500); }
.timeline__time { font-size: var(--fs-xs); color: var(--gray-500); font-family: var(--font-mono); display: block; margin-bottom: 2px; }
.timeline__title { font-size: var(--fs-base); font-weight: 600; color: var(--gray-950); margin: 0 0 2px; }
.timeline__desc { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; }

/* ═════════════════════════════════════════════════════════════════════════
   34. TAGS / CHIPS INPUT
   ═════════════════════════════════════════════════════════════════════════ */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-sm);
  padding: 2px 4px 2px 8px;
  background: var(--gray-100);
  color: var(--gray-800);
  border-radius: var(--radius-pill);
  font-weight: 500;
}
.chip--primary { background: var(--brand-50); color: var(--brand-800); }
.chip--success { background: var(--success-100); color: var(--success-600); }
.chip__remove {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}
.chip__remove:hover { background: var(--gray-200); color: var(--gray-950); }
.chip--primary .chip__remove:hover { background: var(--brand-200); color: var(--brand-900); }

.chip-input {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  border: 1px solid var(--gray-300);
  background: var(--app-surface);
  border-radius: var(--radius-md);
  padding: 4px 6px;
  min-height: var(--control-h-md);
  box-shadow: var(--shadow-xs);
}
.chip-input:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.chip-input > input {
  flex: 1; min-width: 80px;
  border: none; outline: none; background: transparent;
  font-size: var(--fs-base); padding: 2px 4px;
  color: var(--gray-950);
}
.chip-input > input::placeholder { color: var(--gray-500); }

/* ═════════════════════════════════════════════════════════════════════════
   35. AUTH SCREENS (login / signup)
   ═════════════════════════════════════════════════════════════════════════ */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--app-surface-muted);
}
.auth-shell--split { grid-template-columns: 1fr 1fr; }
.auth-shell--split .auth-side {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px;
  position: relative; overflow: hidden;
}
.auth-shell--split .auth-side::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 80%, rgba(255,255,255,.1), transparent 60%);
}
@media (max-width: 767.98px) { .auth-shell--split { grid-template-columns: 1fr; } .auth-shell--split .auth-side { display: none; } }

.auth-card {
  width: 100%; max-width: 400px;
  margin: auto;
  padding: 40px 32px;
  background: var(--app-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--app-border);
}
.auth-card__brand {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
  font-weight: 600; font-size: var(--fs-md);
}
.auth-card__brand-mark {
  width: 32px; height: 32px;
  background: var(--brand-600); color: #fff;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.auth-card__title { font-size: var(--fs-2xl); font-weight: 600; margin: 0 0 4px; color: var(--gray-950); }
.auth-card__subtitle { font-size: var(--fs-sm); color: var(--gray-600); margin: 0 0 24px; }
.auth-card__form { display: flex; flex-direction: column; gap: 12px; }
.auth-card__footer-text { font-size: var(--fs-sm); color: var(--gray-600); text-align: center; margin-top: 16px; }
.auth-card__divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--gray-500);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em;
}
.auth-card__divider::before, .auth-card__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--app-border);
}
.auth-card__social { display: flex; flex-direction: column; gap: 8px; }

/* ═════════════════════════════════════════════════════════════════════════
   36. NEWSLETTER INLINE
   ═════════════════════════════════════════════════════════════════════════ */
/* Wrapper vertical : titre + desc empilés, puis le form (input-group gère la
   ligne input+bouton). L'ancien `display:flex` mettait tout côte à côte → cassé. */
.newsletter { max-width: 480px; }
.newsletter__title {
  font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em;
  color: var(--gray-950); margin: 0 0 4px;
}
.newsletter__desc { font-size: var(--fs-sm); color: var(--gray-600); margin: 0 0 12px; }
.newsletter__form { max-width: 440px; }

/* ═════════════════════════════════════════════════════════════════════════
   37. FILTER BAR (au-dessus d'un tableau / liste)
   ═════════════════════════════════════════════════════════════════════════ */
.filter-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
}
.filter-bar__divider { width: 1px; height: 20px; background: var(--app-border); }
.filter-bar__chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px 2px 10px;
  font-size: var(--fs-sm);
  background: var(--brand-50);
  color: var(--brand-800);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  font-weight: 500;
}
.filter-bar__chip-remove { font-size: 13px; cursor: pointer; }

/* ═════════════════════════════════════════════════════════════════════════
   38. CALENDAR / DATE PICKER (visual, à brancher avec une lib JS)
   ═════════════════════════════════════════════════════════════════════════ */
.calendar {
  width: 280px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 12px;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-sm);
}
.calendar__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.calendar__title { font-weight: 600; color: var(--gray-950); font-size: var(--fs-base); }
.calendar__nav { display: flex; gap: 2px; }
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar__dow {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500);
  text-align: center;
  padding: 4px 0;
}
.calendar__day {
  aspect-ratio: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--gray-800);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  border: none;
  background: transparent;
  transition: all var(--t-fast);
}
.calendar__day:hover { background: var(--gray-100); }
.calendar__day.is-muted { color: var(--gray-400); }
.calendar__day.is-today {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand-400);
  color: var(--accent-fg);
}
.calendar__day.is-selected {
  background: var(--brand-600);
  color: #fff;
}
.calendar__day.is-in-range { background: var(--brand-50); color: var(--brand-800); border-radius: 0; }
.calendar__day.is-range-start { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); background: var(--brand-600); color: #fff; }
.calendar__day.is-range-end { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); background: var(--brand-600); color: #fff; }
.calendar__day:disabled { color: var(--gray-300); cursor: not-allowed; }
.calendar__day.has-event { position: relative; }
.calendar__day.has-event::after {
  content: ""; position: absolute; bottom: 3px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand-500);
}
.calendar__day.is-selected.has-event::after { background: #fff; }
.calendar__footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 8px; margin-top: 8px;
  border-top: 1px solid var(--app-border);
}

/* Date input avec icône (preset pour ouvrir un picker custom) */
.date-input { position: relative; }
.date-input > .form-control { padding-right: 32px; }
.date-input > i {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%); pointer-events: none;
  color: var(--gray-500);
}

/* ═════════════════════════════════════════════════════════════════════════
   39. AUTOCOMPLETE / COMBOBOX
   ═════════════════════════════════════════════════════════════════════════ */
.combobox { position: relative; }
.combobox__input { padding-right: 32px; }
.combobox__caret {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--gray-500); pointer-events: none;
}
.combobox__panel {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  z-index: 50;
}
.combobox__item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--gray-800);
  cursor: pointer;
}
.combobox__item:hover, .combobox__item.is-active {
  background: var(--gray-100);
  color: var(--gray-950);
}
.combobox__item.is-selected {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 500;
}
.combobox__item.is-selected i.bi-check { margin-left: auto; color: var(--brand-600); }
.combobox__item-avatar { flex-shrink: 0; }
.combobox__item-label { flex-grow: 1; min-width: 0; }
.combobox__item-meta { font-size: var(--fs-xs); color: var(--gray-500); }
.combobox__group-label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500);
  padding: 6px 8px 2px;
}
.combobox__empty {
  padding: 12px;
  text-align: center;
  color: var(--gray-500);
  font-size: var(--fs-sm);
}

/* highlight matched text */
.combobox__match { background: color-mix(in oklch, var(--brand-300) 40%, transparent); color: inherit; padding: 0 1px; border-radius: 2px; }

/* ═════════════════════════════════════════════════════════════════════════
   40. TREE VIEW (arborescence pliable)
   ═════════════════════════════════════════════════════════════════════════ */
.tree {
  font-size: var(--fs-sm);
  user-select: none;
}
.tree ul {
  list-style: none;
  padding-left: 18px;
  margin: 0;
  border-left: 1px dashed var(--gray-200);
  margin-left: 9px;
}
.tree > ul { padding-left: 0; border-left: none; margin-left: 0; }
.tree__node {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--gray-800);
  position: relative;
}
.tree__node:hover { background: var(--gray-100); }
.tree__node.is-selected {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 500;
}
.tree__chevron {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: transform var(--t-fast);
}
.tree__chevron.is-empty { visibility: hidden; }
.tree__item.is-open > .tree__node .tree__chevron { transform: rotate(90deg); }
.tree__item:not(.is-open) > ul { display: none; }
.tree__icon { color: var(--gray-500); flex-shrink: 0; font-size: 14px; }
.tree__node.is-selected .tree__icon { color: var(--accent-fg); }
.tree__label { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree__meta { font-size: var(--fs-xs); color: var(--gray-500); font-variant-numeric: tabular-nums; }
.tree__badge { font-size: 10px; padding: 0 5px; background: var(--gray-100); color: var(--gray-700); border-radius: var(--radius-pill); }

/* ═════════════════════════════════════════════════════════════════════════
   41. ANNOUNCEMENT BANNER (top of app, dismissable)
   ═════════════════════════════════════════════════════════════════════════ */
.announce-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: var(--brand-700);
  color: #fff;
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--brand-800);
}
.announce-bar--info { background: var(--info-600); border-bottom-color: oklch(45% .13 var(--status-info-hue)); }
.announce-bar--warning { background: oklch(50% .15 var(--status-warning-hue)); color: #fff; border-bottom-color: oklch(40% .15 var(--status-warning-hue)); }
.announce-bar--danger { background: var(--danger-600); border-bottom-color: oklch(45% .19 var(--status-danger-hue)); }
.announce-bar__icon { font-size: 16px; flex-shrink: 0; }
.announce-bar__content { flex-grow: 1; }
.announce-bar__content strong { font-weight: 600; }
.announce-bar__content a { color: #fff; text-decoration: underline; font-weight: 500; }
.announce-bar__cta {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.24);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-md);
  font-size: var(--fs-xs); font-weight: 500;
  text-decoration: none;
  transition: all var(--t-fast);
}
.announce-bar__cta:hover { background: rgba(255,255,255,.24); color: #fff; }
.announce-bar__close {
  width: 22px; height: 22px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: .8;
  transition: opacity var(--t-fast);
}
.announce-bar__close:hover { opacity: 1; background: rgba(255,255,255,.12); }

/* ═════════════════════════════════════════════════════════════════════════
   42. COOKIE CONSENT (banner flottant bas)
   ═════════════════════════════════════════════════════════════════════════ */
.cookie-consent {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 480px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 16px 20px;
  z-index: 1080;
  display: flex; flex-direction: column; gap: 12px;
}
.cookie-consent__title { font-weight: 600; color: var(--gray-950); margin: 0; font-size: var(--fs-base); }
.cookie-consent__body { font-size: var(--fs-sm); color: var(--gray-700); margin: 0; line-height: 1.55; }
.cookie-consent__body a { color: var(--accent-fg); }
.cookie-consent__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═════════════════════════════════════════════════════════════════════════
   43. NOTIFICATION CENTER (panel / inbox)
   ═════════════════════════════════════════════════════════════════════════ */
.notif-panel {
  width: 360px; max-width: 100%;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.notif-panel__head {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--app-border);
}
.notif-panel__title { font-weight: 600; font-size: var(--fs-md); color: var(--gray-950); margin: 0; }
.notif-panel__tabs {
  display: flex; gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--app-border);
}
.notif-panel__tabs a {
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
}
.notif-panel__tabs a.is-active { color: var(--accent-fg); border-bottom-color: var(--brand-600); }
.notif-panel__list {
  max-height: 360px;
  overflow-y: auto;
}
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 16px;
  border-bottom: 1px solid var(--app-border);
  cursor: pointer;
  position: relative;
}
.notif-item:hover { background: var(--app-surface-muted); }
.notif-item:last-child { border-bottom: none; }
.notif-item--unread::before {
  content: "";
  position: absolute; left: 6px; top: 16px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-600);
}
.notif-item__icon {
  flex-shrink: 0;
}
.notif-item__body { flex-grow: 1; min-width: 0; }
.notif-item__title { font-size: var(--fs-sm); color: var(--gray-950); margin: 0; line-height: 1.4; }
.notif-item--unread .notif-item__title { font-weight: 600; }
.notif-item__desc { font-size: var(--fs-xs); color: var(--gray-600); margin: 2px 0 0; }
.notif-item__time { font-size: var(--fs-xs); color: var(--gray-500); margin-top: 2px; }
.notif-panel__foot {
  padding: 8px 16px;
  text-align: center;
  border-top: 1px solid var(--app-border);
}
.notif-panel__foot a { font-size: var(--fs-sm); color: var(--accent-fg); text-decoration: none; font-weight: 500; }

/* ═════════════════════════════════════════════════════════════════════════
   44. COMPARISON TABLE (features par plan)
   ═════════════════════════════════════════════════════════════════════════ */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--app-border);
  text-align: center;
  font-size: var(--fs-sm);
}
.compare-table th:first-child, .compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--gray-800);
  background: var(--app-surface-muted);
}
.compare-table thead th {
  background: var(--app-surface-muted);
  font-weight: 600;
  color: var(--gray-950);
  font-size: var(--fs-base);
  padding-top: 16px; padding-bottom: 16px;
}
.compare-table thead th .compare-table__price {
  display: block;
  font-size: var(--fs-xs);
  color: var(--gray-600);
  font-weight: 400;
  margin-top: 2px;
}
.compare-table thead th.is-featured {
  background: var(--brand-50);
  color: var(--brand-800);
  position: relative;
}
.compare-table thead th.is-featured::before {
  content: "POPULAIRE";
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--brand-600); color: #fff;
  font-size: 9px; font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: .08em;
}
.compare-table td.is-featured-col { background: color-mix(in oklch, var(--brand-500) 8%, transparent); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table .check { color: var(--success-500); font-size: 16px; }
.compare-table .cross { color: var(--gray-400); font-size: 14px; }
.compare-table__group {
  background: var(--gray-100) !important;
  font-weight: 600 !important;
  font-size: var(--fs-xs) !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-700) !important;
}
[data-bs-theme="dark"] .compare-table__group { background: var(--gray-200) !important; }

/* ═════════════════════════════════════════════════════════════════════════
   45. TESTIMONIALS
   ═════════════════════════════════════════════════════════════════════════ */
.testimonial {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  font-size: var(--fs-base);
}
.testimonial__quote-mark {
  position: absolute; top: 16px; right: 20px;
  font-size: 48px; line-height: 1;
  color: var(--brand-100);
  font-family: Georgia, serif;
}
.testimonial__rating {
  display: flex; gap: 2px;
  color: var(--warning-500);
  font-size: 14px;
}
.testimonial__rating .empty { color: var(--gray-300); }
.testimonial__quote { color: var(--gray-900); font-size: var(--fs-base); line-height: 1.6; margin: 0; flex-grow: 1; }
.testimonial__author {
  display: flex; align-items: center; gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
}
.testimonial__author-name { font-weight: 600; color: var(--gray-950); font-size: var(--fs-sm); }
.testimonial__author-meta { font-size: var(--fs-xs); color: var(--gray-600); }
.testimonial--featured { background: linear-gradient(135deg, var(--brand-50), var(--app-surface)); border-color: var(--brand-200); }
[data-bs-theme="dark"] .testimonial--featured { background: color-mix(in oklch, var(--brand-500) 8%, var(--app-surface)); }

/* ═════════════════════════════════════════════════════════════════════════
   46. FAQ
   ═════════════════════════════════════════════════════════════════════════ */
.faq { display: flex; flex-direction: column; gap: 1px; }
.faq__item {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
}
.faq__question {
  padding: 14px 16px;
  font-weight: 500;
  font-size: var(--fs-base);
  color: var(--gray-950);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.faq__question:hover { color: var(--accent-fg); }
.faq__question i { transition: transform var(--t-fast); color: var(--gray-500); }
.faq__item.is-open .faq__question i { transform: rotate(180deg); color: var(--accent-fg); }
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-base);
}
.faq__item.is-open .faq__answer { max-height: 320px; }
.faq__answer-inner {
  padding: 0 16px 16px;
  font-size: var(--fs-sm);
  color: var(--gray-700);
  line-height: 1.6;
}

/* ═════════════════════════════════════════════════════════════════════════
   47. SPARKLINE (mini-graph dans une stat-card)
   ═════════════════════════════════════════════════════════════════════════ */
.sparkline {
  width: 100%; height: 40px;
  display: block;
}
.sparkline__line {
  fill: none;
  stroke: var(--brand-500);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sparkline__area {
  fill: url(#sparklineGradient);
  opacity: .35;
}
.sparkline__dot {
  fill: var(--brand-600);
  stroke: var(--app-surface);
  stroke-width: 2;
}
.sparkline--success .sparkline__line { stroke: var(--success-500); }
.sparkline--success .sparkline__dot { fill: var(--success-600); }
.sparkline--danger .sparkline__line { stroke: var(--danger-500); }
.sparkline--danger .sparkline__dot { fill: var(--danger-600); }

/* Bar sparkline (alternative) */
.spark-bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 32px;
}
.spark-bars__bar {
  flex: 1;
  background: var(--brand-300);
  border-radius: 1px;
  min-height: 2px;
}
.spark-bars__bar--last { background: var(--brand-600); }

/* ═════════════════════════════════════════════════════════════════════════
   48. DIFF VIEWER
   ═════════════════════════════════════════════════════════════════════════ */
.diff {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.diff__head {
  padding: 8px 12px;
  background: var(--app-surface-muted);
  border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
}
.diff__filename { font-weight: 600; color: var(--gray-950); }
.diff__stats { display: flex; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-xs); }
.diff__stats .add { color: var(--success-600); }
.diff__stats .del { color: var(--danger-600); }
.diff__body { padding: 0; }
.diff__row {
  display: grid;
  grid-template-columns: 40px 40px 1fr;
  border-bottom: 1px solid transparent;
}
.diff__lineno {
  text-align: right;
  padding: 1px 8px;
  color: var(--gray-400);
  background: var(--app-surface-muted);
  user-select: none;
  border-right: 1px solid var(--app-border);
}
.diff__code {
  padding: 1px 12px;
  white-space: pre;
  color: var(--gray-800);
  overflow-x: auto;
}
.diff__row--add { background: color-mix(in oklch, var(--success-500) 8%, transparent); }
.diff__row--add .diff__lineno { background: color-mix(in oklch, var(--success-500) 14%, var(--app-surface-muted)); color: var(--success-600); }
.diff__row--add .diff__code::before { content: "+ "; color: var(--success-600); font-weight: 600; }
.diff__row--del { background: color-mix(in oklch, var(--danger-500) 8%, transparent); }
.diff__row--del .diff__lineno { background: color-mix(in oklch, var(--danger-500) 14%, var(--app-surface-muted)); color: var(--danger-600); }
.diff__row--del .diff__code::before { content: "- "; color: var(--danger-600); font-weight: 600; }
.diff__row--hunk {
  background: color-mix(in oklch, var(--info-500) 8%, transparent);
  color: var(--info-600);
}
.diff__row--hunk .diff__code { color: var(--info-600); font-weight: 500; }
.diff__row--hunk .diff__code::before { content: ""; }

/* ═════════════════════════════════════════════════════════════════════════
   49. ERROR PAGES (404 / 500 / maintenance)
   ═════════════════════════════════════════════════════════════════════════ */
.error-page {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 16px;
}
.error-page__code {
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.error-page__code--mono {
  background: linear-gradient(135deg, var(--gray-700), var(--gray-900));
  -webkit-background-clip: text; background-clip: text;
}
.error-page__code--danger {
  background: linear-gradient(135deg, var(--danger-500), oklch(40% .17 var(--status-danger-hue)));
  -webkit-background-clip: text; background-clip: text;
}
.error-page__title {
  font-size: var(--fs-2xl); font-weight: 600;
  color: var(--gray-950);
  margin: 0;
}
.error-page__desc {
  font-size: var(--fs-md);
  color: var(--gray-600);
  max-width: 480px;
  margin: 0;
  line-height: 1.55;
}
.error-page__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.error-page__details {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--gray-500);
  padding: 8px 12px;
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
}

/* ═════════════════════════════════════════════════════════════════════════
   50. CONTEXTUAL TOOLBAR (bulk actions sur une sélection)
   ═════════════════════════════════════════════════════════════════════════ */
.bulkbar {
  position: sticky;
  top: var(--topbar-h);
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-900);
  color: var(--gray-50);
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  z-index: 50;
  animation: bulkbar-in var(--t-base);
}
@keyframes bulkbar-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-bs-theme="dark"] .bulkbar { background: var(--gray-200); color: var(--gray-950); }
.bulkbar__count {
  background: rgba(255, 255, 255, .12);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
[data-bs-theme="dark"] .bulkbar__count { background: var(--gray-50); color: var(--gray-950); }
.bulkbar__divider { width: 1px; height: 20px; background: rgba(255, 255, 255, .15); }
[data-bs-theme="dark"] .bulkbar__divider { background: var(--gray-300); }
.bulkbar__btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #fff;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
}
[data-bs-theme="dark"] .bulkbar__btn { color: var(--gray-950); }
.bulkbar__btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
[data-bs-theme="dark"] .bulkbar__btn:hover { background: var(--gray-50); color: var(--gray-950); }
.bulkbar__btn--danger:hover { background: var(--danger-600); color: #fff; }
.bulkbar__close {
  margin-left: auto;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .7);
  background: transparent; border: none;
  cursor: pointer;
}
[data-bs-theme="dark"] .bulkbar__close { color: var(--gray-700); }
.bulkbar__close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
[data-bs-theme="dark"] .bulkbar__close:hover { background: var(--gray-50); color: var(--gray-950); }

/* ═════════════════════════════════════════════════════════════════════════
   51. CAROUSEL (override Bootstrap natif + nos styles)
   ═════════════════════════════════════════════════════════════════════════ */
.carousel { border-radius: var(--radius-lg); overflow: hidden; }
.carousel-control-prev, .carousel-control-next {
  width: 44px; opacity: 1;
  background: transparent;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
  width: 36px; height: 36px;
  background-color: var(--app-surface);
  border-radius: 50%;
  background-size: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--app-border);
  opacity: .95;
}
.carousel-control-prev-icon:hover, .carousel-control-next-icon:hover { background-color: var(--gray-50); }
.carousel-indicators { gap: 6px; margin-bottom: 16px; }
.carousel-indicators [data-bs-target] {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  border: none;
  margin: 0;
  opacity: 1;
  transition: all var(--t-fast);
}
.carousel-indicators [data-bs-target].active {
  width: 24px;
  border-radius: 999px;
  background: #fff;
}
.carousel-caption {
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
  left: 0; right: 0; bottom: 0;
  padding: 60px 20px 20px;
  text-align: left;
}

/* ═════════════════════════════════════════════════════════════════════════
   52. DRAWER / BOTTOM SHEET (mobile-style)
   ═════════════════════════════════════════════════════════════════════════ */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 1075;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--app-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, .2);
  z-index: 1076;
  transform: translateY(100%);
  transition: transform var(--t-base);
  max-height: 85vh;
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateY(0); }
.drawer__handle {
  width: 32px; height: 4px;
  background: var(--gray-300);
  border-radius: 999px;
  margin: 8px auto 0;
  flex-shrink: 0;
}
.drawer__head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: space-between;
}
.drawer__title { font-weight: 600; color: var(--gray-950); margin: 0; font-size: var(--fs-md); }
.drawer__body { padding: 16px 20px; overflow-y: auto; flex-grow: 1; }
.drawer__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--app-border);
  display: flex; gap: 8px;
}
.drawer__footer .btn { flex: 1; }

/* Drawer side (desktop, depuis la droite) */
.drawer--right {
  left: auto; bottom: 0; top: 0; right: 0;
  width: 420px; max-width: 100%;
  max-height: 100vh;
  border-radius: 0;
  transform: translateX(100%);
}
.drawer--right.is-open { transform: translateX(0); }

/* ═════════════════════════════════════════════════════════════════════════
   53. ONBOARDING TOUR (popover guidé avec pointeur)
   ═════════════════════════════════════════════════════════════════════════ */
.tour-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 1085;
}
.tour-popover {
  position: absolute;
  width: 320px;
  background: var(--app-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  z-index: 1086;
  border: 1px solid var(--app-border);
}
.tour-popover__step {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand-600);
  margin-bottom: 6px;
}
.tour-popover__title { font-size: var(--fs-md); font-weight: 600; color: var(--gray-950); margin: 0 0 4px; }
.tour-popover__desc { font-size: var(--fs-sm); color: var(--gray-700); margin: 0 0 16px; line-height: 1.55; }
.tour-popover__footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
}
.tour-popover__progress {
  display: flex; gap: 4px;
}
.tour-popover__progress-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-300);
}
.tour-popover__progress-dot.is-active { background: var(--brand-600); width: 20px; border-radius: 999px; }
.tour-popover__actions { display: flex; gap: 6px; }
/* Pointeur (flèche) — 4 positions */
.tour-popover::before {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  transform: rotate(45deg);
}
.tour-popover--top::before { bottom: -7px; left: 24px; border-top: none; border-left: none; }
.tour-popover--bottom::before { top: -7px; left: 24px; border-bottom: none; border-right: none; }
.tour-popover--left::before { right: -7px; top: 24px; border-bottom: none; border-left: none; }
.tour-popover--right::before { left: -7px; top: 24px; border-top: none; border-right: none; }

/* Spotlight (anneau autour de l'élément cible) */
.tour-spotlight {
  position: absolute;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-500) 50%, transparent),
              0 0 0 9999px rgba(15, 23, 42, .55);
  pointer-events: none;
  z-index: 1084;
}

/* ═════════════════════════════════════════════════════════════════════════
   54. LOGO ROW (clients / partenaires)
   ═════════════════════════════════════════════════════════════════════════ */
.logo-row {
  display: flex; flex-wrap: wrap; gap: 40px;
  align-items: center; justify-content: center;
  padding: 24px 0;
}
.logo-row__caption {
  width: 100%; text-align: center;
  font-size: var(--fs-sm);
  color: var(--gray-600);
  margin-bottom: 12px;
}
.logo-row__item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-lg); font-weight: 700;
  color: var(--gray-500);
  filter: grayscale(1);
  opacity: .8;
  transition: all var(--t-base);
  letter-spacing: -.01em;
}
.logo-row__item:hover { filter: grayscale(0); opacity: 1; color: var(--gray-900); }
.logo-row__item i { font-size: 24px; }

/* ═════════════════════════════════════════════════════════════════════════
   55. STATS SECTION (gros chiffres marketing)
   ═════════════════════════════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 0;
}
.stats-row__item {
  text-align: center;
  padding: 16px;
  border-right: 1px solid var(--app-border);
}
.stats-row__item:last-child { border-right: none; }
.stats-row__value {
  font-size: var(--fs-5xl); font-weight: 700;
  letter-spacing: -.03em;
  color: var(--gray-950);
  font-feature-settings: "tnum";
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stats-row__label {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  margin-top: 8px;
}
@media (max-width: 767.98px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stats-row__item:nth-child(2) { border-right: none; }
  .stats-row__item:nth-child(-n+2) { border-bottom: 1px solid var(--app-border); padding-bottom: 24px; }
}

/* ═════════════════════════════════════════════════════════════════════════
   56. BENTO GRID (cellules asymétriques, style Apple/Linear)
   ═════════════════════════════════════════════════════════════════════════ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 12px;
}
.bento__cell {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.bento__cell--accent {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  border-color: transparent;
}
.bento__cell--accent .bento__title, .bento__cell--accent .bento__value { color: #fff; }
.bento__cell--accent .bento__desc { color: rgba(255, 255, 255, .8); }
.bento__cell--accent::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15), transparent 60%);
  pointer-events: none;
}
.bento__cell--muted { background: var(--app-surface-muted); }
.bento__cell--w-2 { grid-column: span 2; }
.bento__cell--w-3 { grid-column: span 3; }
.bento__cell--w-4 { grid-column: span 4; }
.bento__cell--h-2 { grid-row: span 2; }
.bento__eyebrow {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  opacity: .7;
}
.bento__title { font-size: var(--fs-lg); font-weight: 600; color: var(--gray-950); margin: 0; line-height: 1.2; }
.bento__desc { font-size: var(--fs-sm); color: var(--gray-700); margin: 0; line-height: 1.5; flex-grow: 1; }
.bento__value { font-size: var(--fs-4xl); font-weight: 700; color: var(--gray-950); line-height: 1; letter-spacing: -.02em; font-feature-settings: "tnum"; }
.bento__icon { font-size: 28px; color: var(--brand-600); }
.bento__cell--accent .bento__icon { color: #fff; opacity: .9; }
@media (max-width: 991.98px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__cell--w-2, .bento__cell--w-3, .bento__cell--w-4 { grid-column: span 2; }
}

/* ═════════════════════════════════════════════════════════════════════════
   57. NUMBERED STEPS (process en 3-4 étapes)
   ═════════════════════════════════════════════════════════════════════════ */
.num-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  counter-reset: numstep;
}
.num-step {
  position: relative;
  padding: 20px 16px 16px;
  counter-increment: numstep;
}
.num-step::before {
  content: "0" counter(numstep);
  display: block;
  font-size: var(--fs-4xl); font-weight: 700;
  color: var(--brand-500);
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 12px;
  font-feature-settings: "tnum";
}
.num-step__title { font-size: var(--fs-md); font-weight: 600; color: var(--gray-950); margin: 0 0 6px; }
.num-step__desc { font-size: var(--fs-sm); color: var(--gray-600); margin: 0; line-height: 1.55; }

/* Variant avec ligne de connexion */
.num-steps--connected .num-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px; right: -16px;
  width: 32px; height: 1px;
  background: var(--app-border);
}

/* ═════════════════════════════════════════════════════════════════════════
   58. HEATMAP CALENDAR (style GitHub contributions)
   ═════════════════════════════════════════════════════════════════════════ */
.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  padding: 8px;
}
.heatmap__cell {
  width: 12px; height: 12px;
  border-radius: 2px;
  background: var(--gray-100);
  cursor: pointer;
  transition: transform var(--t-fast);
}
.heatmap__cell:hover { transform: scale(1.2); outline: 1px solid var(--gray-400); }
.heatmap__cell[data-level="1"] { background: color-mix(in oklch, var(--brand-500) 25%, var(--gray-100)); }
.heatmap__cell[data-level="2"] { background: color-mix(in oklch, var(--brand-500) 50%, var(--gray-100)); }
.heatmap__cell[data-level="3"] { background: color-mix(in oklch, var(--brand-500) 75%, var(--gray-100)); }
.heatmap__cell[data-level="4"] { background: var(--brand-600); }
.heatmap-wrap { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: var(--radius-lg); padding: 16px; overflow-x: auto; }
.heatmap-legend {
  display: flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); color: var(--gray-600);
  justify-content: flex-end; margin-top: 8px;
}
.heatmap-legend__cell {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--gray-100);
}

/* ═════════════════════════════════════════════════════════════════════════
   59. DONUT / GAUGE (SVG)
   ═════════════════════════════════════════════════════════════════════════ */
.donut {
  position: relative;
  width: 140px; height: 140px;
}
.donut__svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut__track {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 10;
}
.donut__fill {
  fill: none;
  stroke: var(--brand-600);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--t-slow);
}
.donut__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.donut__value { font-size: var(--fs-2xl); font-weight: 700; color: var(--gray-950); line-height: 1; font-feature-settings: "tnum"; }
.donut__label { font-size: var(--fs-xs); color: var(--gray-600); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

/* Gauge (demi-cercle) */
.gauge {
  position: relative;
  width: 160px; height: 88px;
}
.gauge__svg { width: 100%; height: 100%; }
.gauge__track { fill: none; stroke: var(--gray-200); stroke-width: 12; stroke-linecap: round; }
.gauge__fill { fill: none; stroke: var(--brand-600); stroke-width: 12; stroke-linecap: round; }
.gauge--success .gauge__fill { stroke: var(--success-500); }
.gauge--warning .gauge__fill { stroke: var(--warning-500); }
.gauge--danger .gauge__fill { stroke: var(--danger-500); }
.gauge__center {
  position: absolute; left: 0; right: 0; bottom: 0;
  text-align: center;
}
.gauge__value { font-size: var(--fs-xl); font-weight: 700; color: var(--gray-950); font-feature-settings: "tnum"; line-height: 1; }
.gauge__label { font-size: var(--fs-xs); color: var(--gray-600); text-transform: uppercase; letter-spacing: .04em; }

/* ═════════════════════════════════════════════════════════════════════════
   60. MULTI-STEP FORM LAYOUT
   ═════════════════════════════════════════════════════════════════════════ */
.multistep {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.multistep__head {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-muted);
}
.multistep__body {
  padding: 32px;
  min-height: 280px;
}
.multistep__footer {
  padding: 16px 32px;
  border-top: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: var(--app-surface-muted);
}
.multistep__progress-text { font-size: var(--fs-sm); color: var(--gray-600); font-variant-numeric: tabular-nums; }
.multistep__step-title { font-size: var(--fs-xl); font-weight: 600; margin: 8px 0 4px; color: var(--gray-950); }
.multistep__step-desc { font-size: var(--fs-sm); color: var(--gray-600); }

/* ═════════════════════════════════════════════════════════════════════════
   61. RICH TEXT EDITOR (toolbar visuelle)
   ═════════════════════════════════════════════════════════════════════════ */
.rte {
  background: var(--app-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.rte:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.rte__toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  flex-wrap: wrap;
}
.rte__group { display: flex; gap: 1px; }
.rte__divider { width: 1px; height: 20px; background: var(--app-border); margin: 0 4px; }
.rte__btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--t-fast);
}
.rte__btn:hover { background: var(--gray-200); color: var(--gray-950); }
.rte__btn.is-active { background: var(--brand-100); color: var(--brand-800); }
.rte__select {
  height: 28px;
  padding: 0 6px;
  border: none;
  background: transparent;
  font-size: var(--fs-sm);
  color: var(--gray-800);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.rte__select:hover { background: var(--gray-200); }
.rte__content {
  padding: 12px 14px;
  min-height: 140px;
  font-size: var(--fs-base);
  color: var(--gray-950);
  line-height: 1.6;
  outline: none;
}
.rte__content p { margin: 0 0 8px; }
.rte__content p:last-child { margin-bottom: 0; }
.rte__statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 10px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  font-size: var(--fs-xs);
  color: var(--gray-600);
}

/* ═════════════════════════════════════════════════════════════════════════
   62. SPINNERS (enrichis)
   ═════════════════════════════════════════════════════════════════════════ */
.spinner-border {
  --bs-spinner-width: 1em;
  --bs-spinner-height: 1em;
  --bs-spinner-border-width: 2px;
  border-color: currentColor;
  border-right-color: transparent;
  color: var(--brand-600);
}
.spinner-border-xs { --bs-spinner-width: 10px; --bs-spinner-height: 10px; --bs-spinner-border-width: 1.5px; }
.spinner-border-sm { --bs-spinner-width: 14px; --bs-spinner-height: 14px; }
.spinner-border-lg { --bs-spinner-width: 32px; --bs-spinner-height: 32px; --bs-spinner-border-width: 3px; }

.spinner-grow { color: var(--brand-600); }

/* Loading dots animés */
.spinner-dots {
  display: inline-flex; gap: 4px;
  align-items: center;
}
.spinner-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: spinner-dot 1.2s ease-in-out infinite;
}
.spinner-dots span:nth-child(2) { animation-delay: .2s; }
.spinner-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes spinner-dot {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* Pulse dot (status) */
.spinner-pulse {
  position: relative;
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--success-500);
}
.spinner-pulse::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--success-500);
  animation: spinner-pulse 1.6s ease-out infinite;
  opacity: .6;
}
@keyframes spinner-pulse {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(3); opacity: 0; }
}

/* Bouton en état loading : .btn.is-loading */
.btn.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  top: 50%; left: 50%;
  margin-top: -7px; margin-left: -7px;
  border: 2px solid currentColor;
  border-color: rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after,
.btn-outline-primary.is-loading::after {
  border-color: color-mix(in oklch, var(--brand-500) 30%, transparent);
  border-top-color: var(--brand-600);
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Overlay de chargement plein-écran ou local */
.loading-overlay {
  position: absolute; inset: 0;
  background: color-mix(in oklch, var(--app-surface) 75%, transparent);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  z-index: 10;
  backdrop-filter: blur(2px);
}
.loading-overlay--fixed { position: fixed; z-index: 9999; }
.loading-overlay__text { font-size: var(--fs-sm); color: var(--gray-700); }

/* Progress bar indéterminée (top of page, style YouTube) */
.progress-indeterminate {
  position: relative;
  height: 2px;
  width: 100%;
  background: var(--gray-100);
  overflow: hidden;
}
.progress-indeterminate::before {
  content: "";
  position: absolute; left: -30%; top: 0;
  width: 30%; height: 100%;
  background: var(--brand-500);
  animation: progress-indeterm 1.4s ease-in-out infinite;
}
@keyframes progress-indeterm {
  0% { left: -30%; }
  60% { left: 100%; }
  100% { left: 100%; }
}

/* ═════════════════════════════════════════════════════════════════════════
   63. FAB (Floating Action Button)
   ═════════════════════════════════════════════════════════════════════════ */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1040;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all var(--t-fast);
}
.fab:hover { background: var(--brand-700); transform: translateY(-1px); box-shadow: var(--shadow-xl); }
.fab:active { transform: translateY(0.5px); }
.fab--sm { width: 36px; height: 36px; font-size: 16px; }
.fab--lg { width: 56px; height: 56px; font-size: 24px; }
.fab--extended {
  width: auto; border-radius: var(--radius-pill);
  padding: 0 18px; gap: 8px;
  font-size: var(--fs-base); font-weight: 500;
}
.fab--bottom-left { right: auto; left: 24px; }
.fab--top-right { bottom: auto; top: 80px; }
.fab--success { background: var(--success-600); }
.fab--success:hover { background: oklch(43% .13 var(--status-success-hue)); }
.fab--danger { background: var(--danger-600); }
.fab--danger:hover { background: oklch(45% .19 var(--status-danger-hue)); }
.fab--secondary {
  background: var(--app-surface);
  color: var(--gray-900);
  border: 1px solid var(--app-border);
}
.fab--secondary:hover { background: var(--gray-50); }

/* Badge sur FAB (notif count) */
.fab__badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--danger-500); color: #fff;
  font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--app-surface);
}

/* Speed-dial : groupe de FAB avec mini-actions au survol */
.fab-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1040;
  display: flex; flex-direction: column-reverse; align-items: flex-end;
  gap: 12px;
}
.fab-stack__actions {
  display: flex; flex-direction: column-reverse;
  gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
}
.fab-stack.is-open .fab-stack__actions { opacity: 1; pointer-events: auto; }
.fab-stack__action {
  display: inline-flex; align-items: center; gap: 10px;
  flex-direction: row-reverse;
}
.fab-stack__action .fab { box-shadow: var(--shadow-md); }
.fab-stack__action-label {
  background: var(--gray-900);
  color: var(--gray-50);
  font-size: var(--fs-xs);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  font-weight: 500;
}
[data-bs-theme="dark"] .fab-stack__action-label { background: var(--gray-200); color: var(--gray-950); }
.fab-stack__trigger i { transition: transform var(--t-base); }
.fab-stack.is-open .fab-stack__trigger i { transform: rotate(45deg); }

/* ═════════════════════════════════════════════════════════════════════════
   64. SCROLLSPY (styles pour la nav qui suit le scroll)
   ═════════════════════════════════════════════════════════════════════════ */
.scrollspy-nav {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  align-self: start;
}
.scrollspy-nav__title {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
  padding: 4px 12px;
  margin-bottom: 4px;
}
.scrollspy-nav .nav-link {
  font-size: var(--fs-sm);
  color: var(--gray-600);
  padding: 4px 12px;
  border-left: 2px solid var(--app-border);
  border-radius: 0;
  margin-left: 0;
  transition: all var(--t-fast);
}
.scrollspy-nav .nav-link:hover { color: var(--gray-900); border-left-color: var(--gray-400); }
.scrollspy-nav .nav-link.active {
  color: var(--accent-fg);
  font-weight: 600;
  border-left-color: var(--brand-600);
  background: transparent;
}
.scrollspy-nav .nav-link.nested { padding-left: 24px; font-size: var(--fs-xs); }

/* ═════════════════════════════════════════════════════════════════════════
   65. SELECT2-STYLE (single + multi, avec recherche, dropdown stylé)
   ═════════════════════════════════════════════════════════════════════════ */
.select2 {
  position: relative;
  width: 100%;
}

/* Control (le faux input) */
.select2__control {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
  padding: 4px 32px 4px 8px;
  min-height: var(--control-h-md);
  background: var(--app-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.select2.is-open .select2__control { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.select2.is-disabled .select2__control { background: var(--gray-100); cursor: not-allowed; color: var(--gray-500); }

.select2__placeholder {
  color: var(--gray-500);
  font-size: var(--fs-base);
  padding: 2px 4px;
}
.select2__value {
  font-size: var(--fs-base);
  color: var(--gray-950);
  padding: 2px 4px;
}
.select2__value-meta {
  display: inline-flex; align-items: center; gap: 6px;
}

/* Chips dans le control (mode multi) */
.select2__chips {
  display: contents;
}
.select2__chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px 2px 8px;
  background: var(--brand-50);
  color: var(--brand-800);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.5;
}
.select2__chip-remove {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--accent-fg);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.select2__chip-remove:hover { background: var(--brand-200); color: var(--brand-900); }

/* Caret (chevron à droite) */
.select2__caret {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 14px;
  pointer-events: none;
  transition: transform var(--t-fast);
}
.select2.is-open .select2__caret { transform: translateY(-50%) rotate(180deg); }

/* Clear button (croix) */
.select2__clear {
  position: absolute; right: 28px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 12px;
}
.select2__clear:hover { background: var(--gray-100); color: var(--gray-900); }

/* Dropdown */
.select2__dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
  display: none;
}
.select2.is-open .select2__dropdown { display: block; }

.select2__search-wrap {
  padding: 8px;
  border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; gap: 8px;
  position: relative;
}
.select2__search-wrap > i {
  position: absolute; left: 18px;
  color: var(--gray-500);
}
.select2__search-input {
  flex: 1;
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 4px 10px 4px 28px;
  font-size: var(--fs-sm);
  background: var(--app-surface);
  color: var(--gray-950);
  outline: none;
}
.select2__search-input:focus { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }

.select2__options {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}
.select2__group-label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500);
  padding: 6px 10px 2px;
}
.select2__option {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--gray-800);
  cursor: pointer;
  user-select: none;
}
.select2__option:hover, .select2__option.is-active {
  background: var(--gray-100);
  color: var(--gray-950);
}
.select2__option.is-selected {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 500;
}
.select2__option.is-selected i.bi-check { margin-left: auto; color: var(--brand-600); }
.select2__option.is-disabled { color: var(--gray-400); cursor: not-allowed; }
.select2__option-meta { font-size: var(--fs-xs); color: var(--gray-500); margin-left: auto; }
.select2__option-avatar { flex-shrink: 0; }
.select2__option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.select2__empty {
  padding: 16px;
  text-align: center;
  color: var(--gray-500);
  font-size: var(--fs-sm);
}

.select2__footer {
  padding: 6px 10px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--gray-600);
}
.select2__footer a, .select2__footer button {
  color: var(--accent-fg);
  background: transparent;
  border: none;
  padding: 0;
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.select2__footer a:hover, .select2__footer button:hover { text-decoration: underline; }

/* Tailles */
.select2--sm .select2__control { min-height: var(--control-h-sm); font-size: var(--fs-sm); }
.select2--lg .select2__control { min-height: var(--control-h-lg); font-size: var(--fs-md); }

/* ═════════════════════════════════════════════════════════════════════════
   66. INTERNATIONAL PHONE INPUT
   ═════════════════════════════════════════════════════════════════════════ */
.phone-input {
  display: flex; align-items: stretch;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--app-surface);
  box-shadow: var(--shadow-xs);
  position: relative;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.phone-input:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }

.phone-input__country {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 10px;
  background: var(--app-surface-muted);
  border: none;
  border-right: 1px solid var(--app-border);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  cursor: pointer;
  color: var(--gray-900);
  font-size: var(--fs-base);
  white-space: nowrap;
  transition: background var(--t-fast);
}
.phone-input__country:hover { background: var(--gray-100); }
.phone-input.is-open .phone-input__country { background: var(--gray-100); }

.phone-input__flag {
  font-size: 18px;
  line-height: 1;
  display: inline-block;
}
.phone-input__code {
  font-variant-numeric: tabular-nums;
  color: var(--gray-700);
  font-weight: 500;
}
.phone-input__caret {
  font-size: 10px;
  color: var(--gray-500);
  transition: transform var(--t-fast);
}
.phone-input.is-open .phone-input__caret { transform: rotate(180deg); }

.phone-input__field {
  flex: 1;
  border: none;
  outline: none;
  padding: 6px 12px;
  background: transparent;
  font-size: var(--fs-base);
  color: var(--gray-950);
  font-variant-numeric: tabular-nums;
  min-width: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.phone-input__field::placeholder { color: var(--gray-500); }

/* Dropdown du sélecteur de pays */
.phone-input__dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  width: 320px; max-width: 100%;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  overflow: hidden;
  display: none;
}
.phone-input.is-open .phone-input__dropdown { display: block; }

.phone-input__search {
  padding: 8px;
  border-bottom: 1px solid var(--app-border);
  position: relative;
}
.phone-input__search > i {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}
.phone-input__search input {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 4px 10px 4px 28px;
  font-size: var(--fs-sm);
  background: var(--app-surface);
  color: var(--gray-950);
  outline: none;
}
.phone-input__search input:focus { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }

.phone-input__list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.phone-input__group-label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-500);
  padding: 6px 10px 2px;
}
.phone-input__country-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--gray-800);
  cursor: pointer;
}
.phone-input__country-item:hover, .phone-input__country-item.is-active {
  background: var(--gray-100);
  color: var(--gray-950);
}
.phone-input__country-item.is-selected { background: var(--brand-50); color: var(--brand-800); font-weight: 500; }
.phone-input__country-item .phone-input__flag { font-size: 16px; }
.phone-input__country-item .phone-input__code {
  margin-left: auto;
  color: var(--gray-500);
  font-size: var(--fs-xs);
}
.phone-input__country-item.is-selected .phone-input__code { color: var(--accent-fg); }
.phone-input__country-name {
  flex-grow: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Tailles */
.phone-input--sm { min-height: var(--control-h-sm); }
.phone-input--sm .phone-input__country, .phone-input--sm .phone-input__field { font-size: var(--fs-sm); padding-top: 4px; padding-bottom: 4px; }

/* ═════════════════════════════════════════════════════════════════════════
   67. GPS PICKER (carte + sélecteur de point/polygone, 3 couches)
   ═════════════════════════════════════════════════════════════════════════ */

/* — Input compact (lat/lng + bouton "ouvrir sur carte") — */
.gps-input {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--app-surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.gps-input:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.gps-input__field {
  flex: 1;
  border: none; outline: none;
  padding: 6px 12px;
  background: transparent;
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
  color: var(--gray-950);
  min-width: 0;
}
.gps-input__field--lat { border-right: 1px solid var(--app-border); }
.gps-input__field::placeholder { color: var(--gray-500); }
.gps-input__btn {
  background: var(--app-surface-muted);
  border: none;
  border-left: 1px solid var(--app-border);
  padding: 0 12px;
  color: var(--gray-700);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm);
  transition: background var(--t-fast);
}
.gps-input__btn:hover { background: var(--gray-100); color: var(--gray-950); }

/* — Picker complet (carte + chrome) — */
.gps-picker {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}

/* Toolbar du haut */
.gps-picker__toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  flex-wrap: wrap;
}
.gps-picker__toolbar .vr {
  width: 1px; height: 20px;
  background: var(--app-border);
  margin: 0 2px;
}

/* Switcher de tuiles (3 couches) */
.gps-layers {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--app-surface);
}
.gps-layers__btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: var(--fs-sm);
  color: var(--gray-700);
  cursor: pointer;
  border-right: 1px solid var(--app-border);
  transition: all var(--t-fast);
}
.gps-layers__btn:last-child { border-right: none; }
.gps-layers__btn:hover { background: var(--gray-100); color: var(--gray-950); }
.gps-layers__btn.is-active {
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 600;
}
.gps-layers__btn i { font-size: 14px; }

/* Outils de dessin */
.gps-tools {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--app-surface);
}
.gps-tools__btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  border-right: 1px solid var(--app-border);
  transition: all var(--t-fast);
}
.gps-tools__btn:last-child { border-right: none; }
.gps-tools__btn:hover { background: var(--gray-100); color: var(--gray-950); }
.gps-tools__btn.is-active {
  background: var(--brand-600);
  color: #fff;
}

/* La zone carte */
.gps-picker__map {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  cursor: crosshair;
}

/* ─── Backgrounds mock pour les 3 couches (à remplacer par Leaflet/Mapbox) ─── */

/* Standard (rues, light) */
.gps-picker__map[data-layer="standard"] {
  background-color: oklch(96% 0.015 90);
  background-image:
    /* Eau (rivière diagonale) */
    linear-gradient(115deg, transparent 38%, oklch(82% 0.05 230) 40%, oklch(82% 0.05 230) 45%, transparent 47%),
    /* Parcs (blobs verts) */
    radial-gradient(ellipse 18% 22% at 22% 28%, oklch(86% 0.08 145), transparent 60%),
    radial-gradient(ellipse 12% 14% at 76% 64%, oklch(86% 0.08 145), transparent 60%),
    /* Quartiers (gris) */
    radial-gradient(ellipse 24% 16% at 55% 35%, oklch(90% 0.005 90), transparent 70%),
    radial-gradient(ellipse 20% 14% at 30% 78%, oklch(90% 0.005 90), transparent 70%),
    /* Grille routes */
    repeating-linear-gradient(0deg, transparent 0, transparent 50px, oklch(78% 0.01 90) 50px, oklch(78% 0.01 90) 51px),
    repeating-linear-gradient(90deg, transparent 0, transparent 50px, oklch(78% 0.01 90) 50px, oklch(78% 0.01 90) 51px);
}

/* Satellite (sombre, vert/marron) */
.gps-picker__map[data-layer="satellite"] {
  background-color: oklch(28% 0.04 135);
  background-image:
    radial-gradient(ellipse 30% 35% at 28% 30%, oklch(38% 0.06 130), transparent 60%),
    radial-gradient(ellipse 24% 30% at 72% 68%, oklch(32% 0.05 70), transparent 65%),
    radial-gradient(ellipse 16% 20% at 50% 50%, oklch(45% 0.08 140), transparent 70%),
    /* Eau */
    linear-gradient(115deg, transparent 38%, oklch(35% 0.08 230) 40%, oklch(35% 0.08 230) 45%, transparent 47%),
    /* Texture grain */
    radial-gradient(circle at 15% 80%, oklch(22% 0.03 130), transparent 30%);
}
.gps-picker__map[data-layer="satellite"] .gps-picker__attr,
.gps-picker__map[data-layer="satellite"] .gps-picker__scale { color: rgba(255,255,255,.85); }

/* Topo (beige + contours) */
.gps-picker__map[data-layer="topo"] {
  background-color: oklch(94% 0.03 80);
  background-image:
    /* Contours topographiques */
    repeating-radial-gradient(circle at 35% 45%, transparent 0, transparent 26px, oklch(75% 0.08 50) 26px, oklch(75% 0.08 50) 27px),
    repeating-radial-gradient(circle at 70% 65%, transparent 0, transparent 22px, oklch(75% 0.08 50) 22px, oklch(75% 0.08 50) 23px),
    /* Eau */
    linear-gradient(115deg, transparent 38%, oklch(78% 0.06 220) 40%, oklch(78% 0.06 220) 45%, transparent 47%);
}

/* Markers de point */
.gps-marker {
  position: absolute;
  width: 24px; height: 32px;
  transform: translate(-50%, -100%);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.gps-marker::before {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 24px; height: 24px;
  transform: translateX(-50%);
  background: var(--brand-600);
  border: 2px solid #fff;
  border-radius: 50%;
}
.gps-marker::after {
  content: "";
  position: absolute; left: 50%; bottom: -2px;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--brand-600);
}
.gps-marker--danger::before { background: var(--danger-500); }
.gps-marker--danger::after { border-top-color: var(--danger-500); }
.gps-marker--success::before { background: var(--success-500); }
.gps-marker--success::after { border-top-color: var(--success-500); }
.gps-marker__label {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--gray-50);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  font-weight: 600;
}

/* Polygone tracé (SVG overlay) */
.gps-overlay {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.gps-polygon {
  fill: color-mix(in oklch, var(--brand-500) 25%, transparent);
  stroke: var(--brand-600);
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}
.gps-polyline {
  fill: none;
  stroke: var(--brand-600);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gps-circle {
  fill: color-mix(in oklch, var(--brand-500) 15%, transparent);
  stroke: var(--brand-600);
  stroke-width: 2;
  stroke-dasharray: 4 4;
}
.gps-vertex {
  fill: #fff;
  stroke: var(--brand-600);
  stroke-width: 2;
}

/* Contrôles flottants sur la carte */
.gps-picker__zoom {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.gps-picker__zoom-btn {
  width: 32px; height: 32px;
  background: var(--app-surface);
  border: none;
  border-bottom: 1px solid var(--app-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-800);
  cursor: pointer;
  font-size: 14px;
  transition: background var(--t-fast);
}
.gps-picker__zoom-btn:last-child { border-bottom: none; }
.gps-picker__zoom-btn:hover { background: var(--gray-100); }

/* Recherche overlay */
.gps-picker__search {
  position: absolute; top: 12px; left: 12px;
  width: 280px; max-width: calc(100% - 80px);
  display: flex; align-items: center; gap: 6px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  padding: 4px 8px 4px 30px;
  box-shadow: var(--shadow-md);
  position: absolute;
}
.gps-picker__search > i {
  position: absolute; left: 10px;
  color: var(--gray-500);
}
.gps-picker__search input {
  flex: 1;
  border: none; outline: none;
  background: transparent;
  font-size: var(--fs-sm);
  color: var(--gray-950);
  padding: 4px 0;
}

/* Localiser (bouton en bas-droite) */
.gps-picker__locate {
  position: absolute; bottom: 36px; right: 12px;
  width: 36px; height: 36px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-fg);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--t-fast);
}
.gps-picker__locate:hover { background: var(--brand-50); color: var(--brand-800); }

/* Échelle (bas-gauche) */
.gps-picker__scale {
  position: absolute; bottom: 12px; left: 12px;
  font-size: 10px;
  color: var(--gray-800);
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(255, 255, 255, .85);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 6px;
}
.gps-picker__scale::after {
  content: "";
  width: 40px; height: 8px;
  border-left: 2px solid var(--gray-900);
  border-right: 2px solid var(--gray-900);
  border-bottom: 2px solid var(--gray-900);
}

/* Attribution */
.gps-picker__attr {
  position: absolute; bottom: 4px; right: 56px;
  font-size: 9px;
  color: var(--gray-700);
  background: rgba(255, 255, 255, .7);
  padding: 1px 5px;
  border-radius: 2px;
}

/* Footer (coordonnées + actions) */
.gps-picker__footer {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 14px;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  font-size: var(--fs-sm);
  flex-wrap: wrap;
}
.gps-picker__coord-group {
  display: inline-flex; align-items: center; gap: 6px;
}
.gps-picker__coord-label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray-600);
}
.gps-picker__coord-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--gray-950);
  font-weight: 500;
}

/* Liste des points placés (cas point multi ou vertices d'un polygone) */
.gps-points-list {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--fs-sm);
}
.gps-points-list__item {
  display: grid;
  grid-template-columns: 24px 1fr auto 32px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--app-border);
}
.gps-points-list__item:last-child { border-bottom: none; }
.gps-points-list__item:hover { background: var(--app-surface-muted); }
.gps-points-list__index {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-800);
  font-size: 10px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.gps-points-list__coord {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--gray-800);
}
.gps-points-list__name { font-weight: 500; color: var(--gray-950); }
.gps-points-list__meta { font-size: var(--fs-xs); color: var(--gray-600); font-family: var(--font-mono); }

/* ═════════════════════════════════════════════════════════════════════════
   68. NUMBER STEPPER (input quantité avec +/-)
   ═════════════════════════════════════════════════════════════════════════ */
.qty-stepper {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--app-surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.qty-stepper:focus-within { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.qty-stepper__btn {
  width: 30px;
  background: var(--app-surface-muted);
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.qty-stepper__btn:hover:not(:disabled) { background: var(--gray-100); color: var(--gray-950); }
.qty-stepper__btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-stepper__btn--minus { border-right: 1px solid var(--app-border); }
.qty-stepper__btn--plus { border-left: 1px solid var(--app-border); }
.qty-stepper__input {
  width: 48px;
  text-align: center;
  border: none; outline: none;
  background: transparent;
  font-size: var(--fs-base);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--gray-950);
  -moz-appearance: textfield;
}
.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.qty-stepper--sm .qty-stepper__btn { width: 24px; font-size: 12px; }
.qty-stepper--sm .qty-stepper__input { width: 36px; font-size: var(--fs-sm); }
.qty-stepper--lg .qty-stepper__btn { width: 36px; font-size: 16px; }
.qty-stepper--lg .qty-stepper__input { width: 56px; font-size: var(--fs-md); }

/* ═════════════════════════════════════════════════════════════════════════
   69. E-COMMERCE / SHOPPING
   ═════════════════════════════════════════════════════════════════════════ */

/* ─── Product card (grid) ─── */
.product-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all var(--t-base);
  position: relative;
}
.product-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--app-surface-muted);
  overflow: hidden;
}
.product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }

.product-card__badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.product-card__wishlist {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 14px;
  backdrop-filter: blur(4px);
  transition: all var(--t-fast);
}
.product-card__wishlist:hover, .product-card__wishlist.is-active { color: var(--danger-500); }
.product-card__wishlist.is-active i.bi { font-weight: bold; }

.product-card__quick-add {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--t-base);
}
.product-card:hover .product-card__quick-add { opacity: 1; transform: translateY(0); }
.product-card__quick-add .btn {
  width: 100%;
  background: var(--gray-950);
  color: var(--gray-50);
  border-color: var(--gray-950);
}
.product-card__quick-add .btn:hover { background: var(--brand-600); border-color: var(--brand-600); }

.product-card__body { padding: 12px 14px; flex-grow: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card__category {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-500);
}
.product-card__title {
  font-size: var(--fs-base); font-weight: 600;
  color: var(--gray-950);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.product-card__rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs);
  color: var(--gray-600);
}
.product-card__rating .stars { color: var(--warning-500); }

/* Prix */
.price {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.price__current {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--gray-950);
}
.price__current--discount { color: var(--danger-600); }
.price__old {
  font-size: var(--fs-sm);
  color: var(--gray-500);
  text-decoration: line-through;
}
.price__discount {
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--danger-100);
  color: var(--danger-600);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}
.price--lg .price__current { font-size: var(--fs-2xl); }
.price--lg .price__old { font-size: var(--fs-md); }
.price__per { font-size: var(--fs-xs); color: var(--gray-500); }

/* Star rating */
.star-rating {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: var(--fs-sm);
  color: var(--warning-500);
}
.star-rating .empty { color: var(--gray-400); }
.star-rating__count { color: var(--gray-600); font-size: var(--fs-xs); margin-left: 4px; }

/* Badges produit */
.product-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.product-badge--new { background: var(--brand-600); color: #fff; }
.product-badge--sale { background: var(--danger-600); color: #fff; }
.product-badge--exclusive { background: var(--gray-900); color: var(--gray-50); }
.product-badge--limited { background: var(--warning-500); color: oklch(25% .15 var(--status-warning-hue)); }
.product-badge--bestseller { background: var(--success-600); color: #fff; }

/* Swatches : couleur */
.swatches { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--app-surface);
  outline: 1px solid var(--gray-300);
  cursor: pointer;
  position: relative;
  transition: all var(--t-fast);
}
.swatch:hover { outline-color: var(--gray-500); }
.swatch.is-active {
  outline: 2px solid var(--brand-600);
  outline-offset: 1px;
}
.swatch--more {
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 10px;
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-300);
  outline: none;
}

/* Swatches : taille (pills) */
.size-swatches { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.size-swatch {
  min-width: 36px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--gray-300);
  background: var(--app-surface);
  color: var(--gray-800);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--t-fast);
}
.size-swatch:hover:not(:disabled) { border-color: var(--gray-500); }
.size-swatch.is-active {
  background: var(--gray-950);
  border-color: var(--gray-950);
  color: var(--gray-50);
}
.size-swatch:disabled, .size-swatch.is-out {
  color: var(--gray-400);
  text-decoration: line-through;
  cursor: not-allowed;
  background: var(--gray-50);
}

/* ─── Cart : ligne (item) ─── */
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--app-border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item__media {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--app-surface-muted);
  flex-shrink: 0;
}
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__body { min-width: 0; }
.cart-item__title { font-size: var(--fs-base); font-weight: 600; color: var(--gray-950); margin: 0; }
.cart-item__variant { font-size: var(--fs-xs); color: var(--gray-600); margin: 2px 0 0; }
.cart-item__price { font-weight: 600; color: var(--gray-950); white-space: nowrap; }
.cart-item__remove {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-item__remove:hover { background: var(--danger-100); color: var(--danger-600); }
@media (max-width: 575.98px) {
  .cart-item { grid-template-columns: 56px 1fr; }
  .cart-item__price, .cart-item__remove { grid-column: 2; justify-self: start; }
}

/* ─── Cart summary ─── */
.cart-summary {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.cart-summary__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-sm);
  padding: 6px 0;
  color: var(--gray-700);
}
.cart-summary__row--total {
  border-top: 1px solid var(--app-border);
  padding-top: 12px; margin-top: 8px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--gray-950);
}
.cart-summary__row strong { color: var(--gray-950); }
.cart-summary__row--discount { color: var(--success-600); }

/* ─── Product gallery (main + thumbnails) ─── */
.product-gallery {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
}
.product-gallery__main {
  aspect-ratio: 1 / 1;
  background: var(--app-surface-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--app-border);
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumbs { display: flex; flex-direction: column; gap: 8px; }
.product-gallery__thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.product-gallery__thumb:hover { border-color: var(--gray-400); }
.product-gallery__thumb.is-active { border-color: var(--brand-600); border-width: 2px; }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Delivery options (radio cards) ─── */
.delivery-options {
  display: flex; flex-direction: column; gap: 8px;
}
.delivery-option {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  background: var(--app-surface);
  cursor: pointer;
  transition: all var(--t-fast);
}
.delivery-option:hover { border-color: var(--gray-400); }
.delivery-option.is-active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: 0 0 0 1px var(--brand-500);
}
[data-bs-theme="dark"] .delivery-option.is-active { background: color-mix(in oklch, var(--brand-500) 12%, transparent); }
.delivery-option input[type="radio"] { margin: 0; }
.delivery-option__title { font-weight: 600; color: var(--gray-950); font-size: var(--fs-base); }
.delivery-option__meta { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 2px; }
.delivery-option__icon { font-size: 20px; color: var(--gray-600); }
.delivery-option.is-active .delivery-option__icon { color: var(--accent-fg); }
.delivery-option__price { font-weight: 600; color: var(--gray-950); white-space: nowrap; }
.delivery-option__price--free { color: var(--success-600); }

/* ═════════════════════════════════════════════════════════════════════════
   70. DELIVERY MAP (zones tarifaires, points relais)
   ═════════════════════════════════════════════════════════════════════════ */
.delivery-map { position: relative; }
.delivery-zone {
  fill-opacity: .25;
  stroke-width: 2;
  stroke-dasharray: 4 3;
  transition: fill-opacity var(--t-fast);
  cursor: pointer;
}
.delivery-zone:hover { fill-opacity: .4; }
.delivery-zone--free { fill: var(--success-500); stroke: var(--success-600); }
.delivery-zone--standard { fill: var(--brand-500); stroke: var(--brand-600); }
.delivery-zone--express { fill: var(--warning-500); stroke: var(--warning-600); }
.delivery-zone--unavailable { fill: var(--gray-500); stroke: var(--gray-600); stroke-dasharray: 2 2; }

/* Légende */
.delivery-legend {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  position: absolute; top: 12px; right: 12px;
  font-size: var(--fs-xs);
  box-shadow: var(--shadow-md);
}
.delivery-legend__title {
  font-weight: 600; color: var(--gray-950);
  margin-bottom: 2px;
}
.delivery-legend__item {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gray-700);
}
.delivery-legend__swatch {
  width: 12px; height: 12px;
  border-radius: 2px;
  border: 1.5px solid;
}
.delivery-legend__swatch--free { background: color-mix(in oklch, var(--success-500) 25%, transparent); border-color: var(--success-600); }
.delivery-legend__swatch--standard { background: color-mix(in oklch, var(--brand-500) 25%, transparent); border-color: var(--brand-600); }
.delivery-legend__swatch--express { background: color-mix(in oklch, var(--warning-500) 25%, transparent); border-color: var(--warning-600); }

/* Point relais sur carte */
.relay-point {
  position: absolute;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--app-surface);
  border: 2px solid var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.relay-point.is-active { background: var(--brand-600); color: #fff; transform: translate(-50%, -50%) scale(1.15); }
.relay-point:hover { transform: translate(-50%, -50%) scale(1.1); }

/* ═════════════════════════════════════════════════════════════════════════
   71. PUBLIC NAVBAR (marketing top nav horizontal)
   ═════════════════════════════════════════════════════════════════════════ */
.public-nav {
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  position: sticky; top: 0; z-index: 100;
}
.public-nav__container {
  max-width: var(--content-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center;
  gap: 16px;
  height: 64px;
}
.public-nav__brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-md); font-weight: 700;
  color: var(--gray-950);
  text-decoration: none;
  margin-right: 8px;
  white-space: nowrap;
}
.public-nav__brand-mark {
  width: 28px; height: 28px;
  background: var(--brand-600);
  color: #fff;
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.public-nav__menu {
  display: flex; align-items: center; gap: 2px;
  list-style: none;
  margin: 0; padding: 0;
}
.public-nav__menu > li { position: relative; }
.public-nav__link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--t-fast);
  white-space: nowrap;
}
.public-nav__link:hover { color: var(--gray-950); background: var(--gray-100); }
.public-nav__link.is-active { color: var(--accent-fg); font-weight: 600; }
.public-nav__link i.bi-chevron-down { font-size: 10px; opacity: .7; transition: transform var(--t-fast); }
.public-nav__menu > li:hover > .public-nav__link i.bi-chevron-down { transform: rotate(180deg); }

.public-nav__cta {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}

/* Mega menu */
.mega-menu {
  position: absolute;
  top: 100%; left: 0;
  width: 720px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  display: none;
  z-index: 80;
}
.public-nav__menu > li:hover > .mega-menu,
.public-nav__menu > li.is-open > .mega-menu { display: grid; }
.mega-menu {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mega-menu__col h6 {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
  margin: 0 0 6px;
}
.mega-menu__item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--gray-800);
  transition: background var(--t-fast);
}
.mega-menu__item:hover { background: var(--gray-100); color: var(--gray-950); }
.mega-menu__item-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.mega-menu__item-title { font-weight: 600; font-size: var(--fs-sm); }
.mega-menu__item-desc { font-size: var(--fs-xs); color: var(--gray-600); }
.mega-menu__featured {
  grid-column: 3;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
  color: #fff;
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mega-menu__featured h4 { color: #fff; font-size: var(--fs-md); margin: 0 0 4px; }
.mega-menu__featured p { color: rgba(255,255,255,.85); font-size: var(--fs-xs); margin: 0 0 12px; }

/* Cart icon avec badge */
.cart-icon {
  position: relative;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  border: none;
  font-size: 18px;
  transition: all var(--t-fast);
}
.cart-icon:hover { background: var(--gray-100); color: var(--gray-950); }
.cart-icon__badge {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger-500); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--app-surface);
}

/* Mobile hamburger */
.public-nav__hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--gray-800);
  align-items: center; justify-content: center;
  font-size: 20px;
}
@media (max-width: 991.98px) {
  .public-nav__menu, .public-nav__cta > *:not(.cart-icon):not(.public-nav__hamburger) { display: none; }
  .public-nav__hamburger { display: inline-flex; }
  .mega-menu { display: none !important; }
}

/* ═════════════════════════════════════════════════════════════════════════
   72. IMAGE LIGHTBOX + ZOOM
   ═════════════════════════════════════════════════════════════════════════ */
.lightbox-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 10, 15, .92);
  z-index: 1090;
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  padding: 32px;
  gap: 16px;
  backdrop-filter: blur(8px);
}
.lightbox-backdrop.is-open { display: flex; }
.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: none;
  color: #fff; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.lightbox__close:hover { background: rgba(255, 255, 255, .18); }
.lightbox__nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: none;
  color: #fff; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .18); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__stage {
  flex: 1; max-width: 90vw; max-height: 75vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.lightbox__image {
  width: min(80vw, 900px); height: min(70vh, 620px);
  max-width: 100%; max-height: 100%;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  transition: transform var(--t-base);
  user-select: none;
}
.lightbox__image.is-zoomed { cursor: zoom-out; transform: scale(2); }
.lightbox__caption {
  color: rgba(255, 255, 255, .85);
  font-size: var(--fs-sm);
  text-align: center;
  max-width: 600px;
}
.lightbox__counter {
  color: rgba(255, 255, 255, .6);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.lightbox__thumbs {
  display: flex; gap: 6px;
  justify-content: center; flex-wrap: wrap;
  max-width: 90vw;
}
.lightbox__thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: .5;
  border: 2px solid transparent;
  transition: all var(--t-fast);
  background: var(--gray-800);
}
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb:hover { opacity: .8; }
.lightbox__thumb.is-active { opacity: 1; border-color: #fff; }
.lightbox__zoom-controls {
  position: absolute; bottom: 12px; right: 12px;
  display: flex; gap: 4px;
  background: rgba(0, 0, 0, .6);
  border-radius: var(--radius-md);
  padding: 4px;
}
.lightbox__zoom-controls button {
  width: 32px; height: 32px;
  background: transparent; border: none; color: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.lightbox__zoom-controls button:hover { background: rgba(255, 255, 255, .15); }

/* Trigger : image zoomable au survol (sur les images produit) */
.zoomable {
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.zoomable img { transition: transform var(--t-slow); display: block; }
.zoomable:hover img { transform: scale(1.5); }
.zoomable__hint {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0, 0, 0, .6);
  color: #fff; font-size: var(--fs-xs);
  padding: 3px 8px; border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.zoomable:hover .zoomable__hint { opacity: 1; }

/* ═════════════════════════════════════════════════════════════════════════
   73. VIDEO PLAYER (custom HTML5)
   ═════════════════════════════════════════════════════════════════════════ */
.video-player {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-player__poster {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.video-player video {
  width: 100%; height: 100%;
  display: block;
}
.video-player__overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(0,0,0,.1) 0%, rgba(0,0,0,.4) 70%, rgba(0,0,0,.8) 100%);
  transition: opacity var(--t-base);
  z-index: 2;
}
.video-player.is-playing .video-player__overlay { opacity: 0; pointer-events: none; }
.video-player__play {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  border: none;
  color: var(--gray-950);
  font-size: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  transition: all var(--t-fast);
  padding-left: 4px;
}
.video-player__play:hover { background: #fff; transform: scale(1.05); }
.video-player__title {
  position: absolute; top: 16px; left: 16px;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  z-index: 3;
}
.video-player__duration {
  position: absolute; bottom: 16px; right: 16px;
  background: rgba(0, 0, 0, .7);
  color: #fff; font-size: var(--fs-xs);
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  z-index: 3;
}
/* Controls bar */
.video-player__controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  padding: 30px 16px 12px;
  display: flex; flex-direction: column; gap: 6px;
  color: #fff;
  z-index: 3;
  opacity: 1;
  transition: opacity var(--t-base);
}
.video-player.is-playing:not(:hover) .video-player__controls { opacity: 0; }
.video-player__progress {
  height: 4px;
  background: rgba(255, 255, 255, .25);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}
.video-player__progress-fill {
  height: 100%;
  background: var(--brand-500);
  border-radius: 999px;
  position: relative;
}
.video-player__progress-fill::after {
  content: "";
  position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brand-500);
}
.video-player__bottom {
  display: flex; align-items: center; gap: 8px;
}
.video-player__btn {
  background: transparent; border: none;
  color: #fff;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.video-player__btn:hover { background: rgba(255, 255, 255, .15); }
.video-player__time {
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  opacity: .9;
}
.video-player__volume {
  width: 60px; height: 4px;
  background: rgba(255, 255, 255, .25);
  border-radius: 999px;
  position: relative;
}
.video-player__volume-fill {
  height: 100%;
  background: #fff;
  border-radius: 999px;
}
.video-player__spacer { flex: 1; }
.video-player__speed-pill {
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

/* ═════════════════════════════════════════════════════════════════════════
   74. CATEGORY CARDS + SUB-CATEGORY NAV
   ═════════════════════════════════════════════════════════════════════════ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border);
  display: flex; flex-direction: column;
  transition: all var(--t-base);
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-card__media {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.category-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.category-card:hover .category-card__media img { transform: scale(1.06); }
.category-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.7));
}
.category-card__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  color: #fff;
}
.category-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}
.category-card__count {
  font-size: var(--fs-xs);
  opacity: .85;
  display: block;
  margin-top: 2px;
}
/* Variant : carte simple (light bg, sans image dominante) */
.category-card--simple {
  background: var(--app-surface);
  aspect-ratio: auto;
  padding: 16px;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.category-card--simple .category-card__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.category-card--simple .category-card__title { color: var(--gray-950); }
.category-card--simple .category-card__count { color: var(--gray-600); }
.category-card--simple .category-card__overlay,
.category-card--simple .category-card__media { display: none; }

/* Sub-category nav (chips horizontaux scrollables) */
.subcat-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.subcat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  color: var(--gray-800);
  font-size: var(--fs-sm); font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.subcat-chip:hover { border-color: var(--gray-400); color: var(--gray-950); }
.subcat-chip.is-active {
  background: var(--gray-950);
  border-color: var(--gray-950);
  color: var(--gray-50);
}
.subcat-chip__count {
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 10px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.subcat-chip.is-active .subcat-chip__count {
  background: color-mix(in srgb, var(--gray-50) 15%, transparent);
  color: var(--gray-50);
}

/* ═════════════════════════════════════════════════════════════════════════
   75. CHARTS AVANCÉS (bar / line / area en SVG inline)
   ═════════════════════════════════════════════════════════════════════════ */
.chart {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.chart__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}
.chart__title { font-size: var(--fs-md); font-weight: 600; color: var(--gray-950); margin: 0; }
.chart__subtitle { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 2px; }
.chart__total { font-size: var(--fs-2xl); font-weight: 700; color: var(--gray-950); font-variant-numeric: tabular-nums; line-height: 1; margin-top: 4px; letter-spacing: -.01em; }
.chart__svg { width: 100%; height: auto; display: block; }
.chart__grid line { stroke: var(--app-border); stroke-width: 1; stroke-dasharray: 2 3; }
.chart__axis text { font-size: 10px; fill: var(--gray-500); font-family: var(--font-sans); }
.chart__bar { fill: var(--brand-500); transition: fill var(--t-fast); }
.chart__bar:hover { fill: var(--brand-700); }
.chart__bar--muted { fill: var(--gray-200); }
.chart__bar--success { fill: var(--success-500); }
.chart__bar--danger { fill: var(--danger-500); }
.chart__line {
  fill: none;
  stroke: var(--brand-500);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart__line--dashed { stroke-dasharray: 4 3; opacity: .6; }
.chart__area { fill: url(#chartGradient); opacity: .4; }
.chart__point { fill: var(--brand-600); stroke: var(--app-surface); stroke-width: 2; }
.chart__legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--gray-700);
  margin-top: 12px;
}
.chart__legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart__legend-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
}

/* ═════════════════════════════════════════════════════════════════════════
   76. ORDER TRACKING (timeline horizontale e-commerce)
   ═════════════════════════════════════════════════════════════════════════ */
.order-tracking {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.order-tracking__header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.order-tracking__number {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--gray-700);
}
.order-tracking__status-badge {
  background: var(--brand-50);
  color: var(--brand-800);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.order-tracking__eta {
  font-size: var(--fs-sm);
  color: var(--gray-700);
  margin-left: auto;
}
.order-tracking__eta strong { color: var(--gray-950); }

.order-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  padding: 16px 0;
}
.order-step {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: 8px;
  padding: 0 8px;
}
.order-step::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -50%; right: 50%;
  height: 3px;
  background: var(--gray-200);
  z-index: 0;
}
.order-step:first-child::before { display: none; }
.order-step--done::before, .order-step--active::before { background: var(--brand-500); }
.order-step__bullet {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--app-surface);
  border: 2px solid var(--gray-300);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--gray-500);
  position: relative;
  z-index: 1;
}
.order-step--done .order-step__bullet {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.order-step--active .order-step__bullet {
  border-color: var(--brand-600);
  color: var(--brand-700);
  background: var(--brand-50);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-500) 20%, transparent);
  animation: order-pulse 2s ease-in-out infinite;
}
@keyframes order-pulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in oklch, var(--brand-500) 20%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in oklch, var(--brand-500) 5%, transparent); }
}
.order-step--failed .order-step__bullet {
  background: var(--danger-100);
  border-color: var(--danger-500);
  color: var(--danger-600);
}
.order-step__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gray-700);
}
.order-step--done .order-step__label, .order-step--active .order-step__label { color: var(--gray-950); }
.order-step__time {
  font-size: var(--fs-xs);
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}

.order-tracking__detail {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border);
}
.order-tracking__detail-item .label {
  font-size: var(--fs-xs); color: var(--gray-600);
  text-transform: uppercase; letter-spacing: .04em;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}
.order-tracking__detail-item .value { font-size: var(--fs-sm); color: var(--gray-950); font-weight: 500; }

@media (max-width: 575.98px) {
  .order-steps { grid-template-columns: 1fr; gap: 12px; }
  .order-step { flex-direction: row; align-items: flex-start; text-align: left; }
  .order-step::before { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════════
   77. STOCK INDICATOR
   ═════════════════════════════════════════════════════════════════════════ */
.stock-indicator {
  font-size: var(--fs-sm);
  display: flex; flex-direction: column; gap: 4px;
}
.stock-indicator__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.stock-indicator--high .stock-indicator__label { color: var(--success-600); }
.stock-indicator--medium .stock-indicator__label { color: var(--warning-600); }
.stock-indicator--low .stock-indicator__label { color: var(--danger-600); }
.stock-indicator--out .stock-indicator__label { color: var(--gray-600); }
.stock-indicator__label::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.stock-indicator__bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}
.stock-indicator__bar-fill {
  height: 100%;
  background: var(--success-500);
  border-radius: 999px;
  transition: width var(--t-slow);
}
.stock-indicator--medium .stock-indicator__bar-fill { background: var(--warning-500); }
.stock-indicator--low .stock-indicator__bar-fill { background: var(--danger-500); }

.stock-pulse {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs);
  color: var(--gray-700);
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 500;
}
.stock-pulse::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success-500);
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--success-500) 30%, transparent);
}

/* ═════════════════════════════════════════════════════════════════════════
   78. REVIEWS (avis détaillés clients)
   ═════════════════════════════════════════════════════════════════════════ */
.reviews-summary {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  align-items: center;
}
.reviews-summary__overall { text-align: center; }
.reviews-summary__score {
  font-size: var(--fs-5xl);
  font-weight: 700;
  color: var(--gray-950);
  letter-spacing: -.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.reviews-summary__max { font-size: var(--fs-xl); color: var(--gray-500); font-weight: 500; }
.reviews-summary__stars { margin: 8px 0 4px; font-size: 18px; color: var(--warning-500); }
.reviews-summary__count { font-size: var(--fs-sm); color: var(--gray-600); }
.reviews-summary__bars {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  gap: 6px 10px;
  align-items: center;
  font-size: var(--fs-sm);
}
.reviews-summary__bar-label {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--gray-700);
}
.reviews-summary__bar {
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.reviews-summary__bar-fill {
  height: 100%;
  background: var(--warning-500);
  border-radius: 999px;
}
.reviews-summary__bar-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--gray-600);
  font-size: var(--fs-xs);
}
@media (max-width: 575.98px) {
  .reviews-summary { grid-template-columns: 1fr; }
}

.review {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.review__head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 8px;
}
.review__author { flex-grow: 1; }
.review__author-name {
  font-weight: 600;
  color: var(--gray-950);
  font-size: var(--fs-base);
  display: inline-flex; align-items: center; gap: 6px;
}
.review__author-meta {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  margin-top: 2px;
}
.review__verified {
  font-size: 10px;
  background: var(--success-100);
  color: var(--success-600);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 2px;
}
.review__stars {
  font-size: var(--fs-sm);
  color: var(--warning-500);
}
.review__stars .empty { color: var(--gray-400); }
.review__title {
  font-weight: 600;
  font-size: var(--fs-base);
  color: var(--gray-950);
  margin: 4px 0 6px;
}
.review__body {
  font-size: var(--fs-sm);
  color: var(--gray-800);
  line-height: 1.6;
  margin: 0;
}
.review__photos {
  display: flex; gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.review__photo {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  cursor: pointer;
}
.review__photo img { width: 100%; height: 100%; object-fit: cover; }
.review__footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
  font-size: var(--fs-sm);
}
.review__helpful {
  background: transparent; border: 1px solid var(--app-border);
  color: var(--gray-700);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.review__helpful:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-950); }
.review__helpful.is-active {
  background: var(--brand-50);
  border-color: var(--brand-300);
  color: var(--brand-800);
}

/* Réponse du vendeur */
.review__reply {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--app-surface-muted);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand-500);
}
.review__reply-author {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--gray-950);
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 4px;
}
.review__reply-body {
  font-size: var(--fs-sm);
  color: var(--gray-700);
  margin: 0;
  line-height: 1.55;
}

/* ═════════════════════════════════════════════════════════════════════════
   79. CHAT / MESSAGING UI
   ═════════════════════════════════════════════════════════════════════════ */
.chat {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 480px;
  overflow: hidden;
}
.chat__header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface);
}
.chat__header-name { font-weight: 600; color: var(--gray-950); font-size: var(--fs-base); }
.chat__header-status { font-size: var(--fs-xs); color: var(--gray-600); display: inline-flex; align-items: center; gap: 4px; }
.chat__body {
  padding: 16px;
  overflow-y: auto;
  background: var(--app-surface-muted);
  display: flex; flex-direction: column; gap: 4px;
}
.chat__day-sep {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--gray-500);
  margin: 12px 0 8px;
  display: flex; align-items: center; gap: 10px;
}
.chat__day-sep::before, .chat__day-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--app-border);
}
.chat__msg {
  display: flex; gap: 8px;
  max-width: 75%;
  align-self: flex-start;
}
.chat__msg--out { align-self: flex-end; flex-direction: row-reverse; }
.chat__bubble {
  padding: 8px 12px;
  border-radius: 14px 14px 14px 4px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  font-size: var(--fs-sm);
  color: var(--gray-950);
  line-height: 1.5;
  position: relative;
}
.chat__msg--out .chat__bubble {
  background: var(--brand-600);
  color: #fff;
  border-color: var(--brand-600);
  border-radius: 14px 14px 4px 14px;
}
.chat__msg--continuation .chat__bubble { border-radius: 14px; }
.chat__msg--out.chat__msg--continuation .chat__bubble { border-radius: 14px; }
.chat__bubble-time {
  font-size: 10px;
  opacity: .7;
  margin-top: 2px;
  display: inline-flex; align-items: center; gap: 3px;
}
.chat__bubble-time .bi-check2-all { font-size: 12px; }
.chat__avatar { flex-shrink: 0; align-self: flex-end; }
.chat__msg--continuation .chat__avatar { visibility: hidden; }
.chat__typing {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px 14px 14px 4px;
}
.chat__typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gray-500);
  animation: chat-typing 1.4s ease-in-out infinite;
}
.chat__typing span:nth-child(2) { animation-delay: .2s; }
.chat__typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chat-typing {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.chat__composer {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 10px 12px;
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
}
.chat__composer-input {
  flex: 1;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: var(--fs-sm);
  resize: none;
  outline: none;
  color: var(--gray-950);
  background: var(--app-surface);
  min-height: 32px;
  max-height: 100px;
}
.chat__composer-input:focus { border-color: var(--brand-500); box-shadow: var(--shadow-focus); }
.chat__attachment {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs);
  margin-top: 4px;
  padding: 4px 8px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
}

/* Conversation list (sidebar inbox) */
.chat-list {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.chat-list__item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--app-border);
  cursor: pointer;
  transition: background var(--t-fast);
}
.chat-list__item:last-child { border-bottom: none; }
.chat-list__item:hover { background: var(--app-surface-muted); }
.chat-list__item.is-active { background: var(--brand-50); }
[data-bs-theme="dark"] .chat-list__item.is-active { background: color-mix(in oklch, var(--brand-500) 14%, transparent); }
.chat-list__name {
  font-weight: 600; font-size: var(--fs-sm);
  color: var(--gray-950);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-list__preview {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-list__meta { text-align: right; }
.chat-list__time { font-size: 10px; color: var(--gray-500); }
.chat-list__unread {
  background: var(--brand-600); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 5px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
}

/* ═════════════════════════════════════════════════════════════════════════
   80. COMMENTS THREAD (nested, type Reddit / Disqus)
   ═════════════════════════════════════════════════════════════════════════ */
.comments { display: flex; flex-direction: column; gap: 16px; }
.comment {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
}
.comment__avatar { flex-shrink: 0; }
.comment__body {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.comment__head {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs);
  color: var(--gray-600);
  margin-bottom: 4px;
}
.comment__author {
  font-weight: 600;
  color: var(--gray-950);
  font-size: var(--fs-sm);
}
.comment__role {
  background: var(--brand-100); color: var(--brand-800);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
}
.comment__text {
  font-size: var(--fs-sm);
  color: var(--gray-800);
  margin: 0;
  line-height: 1.55;
}
.comment__actions {
  display: flex; align-items: center; gap: 12px;
  margin-top: 8px;
  font-size: var(--fs-xs);
}
.comment__action {
  background: transparent; border: none;
  color: var(--gray-600);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}
.comment__action:hover { color: var(--gray-950); background: var(--gray-100); }
.comment__action.is-active { color: var(--accent-fg); }
.comment__action.is-active.upvote i.bi-arrow-up-circle::before { content: "\f135"; } /* fill */
.comment__votes {
  display: inline-flex; align-items: center; gap: 2px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gray-800);
}
.comment__replies {
  margin-top: 12px;
  padding-left: 20px;
  border-left: 2px solid var(--app-border);
  display: flex; flex-direction: column; gap: 12px;
}
.comment--collapsed .comment__text, .comment--collapsed .comment__actions, .comment--collapsed .comment__replies {
  display: none;
}
.comment__collapse {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  background: none; border: none;
  cursor: pointer;
  padding: 0 4px;
}

/* ═════════════════════════════════════════════════════════════════════════
   81. PRICING TOGGLE (Mensuel / Annuel)
   ═════════════════════════════════════════════════════════════════════════ */
.pricing-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-pill);
  padding: 4px;
  position: relative;
}
.pricing-toggle__option {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: var(--gray-700);
  font-size: var(--fs-sm); font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all var(--t-fast);
  position: relative;
}
.pricing-toggle__option.is-active {
  background: var(--gray-950);
  color: var(--gray-50);
}
.pricing-toggle__save {
  background: var(--success-100);
  color: var(--success-600);
  font-size: 10px; font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}
.pricing-toggle__option.is-active .pricing-toggle__save {
  background: var(--success-500);
  color: #fff;
}

/* ═════════════════════════════════════════════════════════════════════════
   82. TRUST BADGES ROW
   ═════════════════════════════════════════════════════════════════════════ */
.trust-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 16px;
  background: var(--app-surface-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--app-border);
}
.trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm);
  color: var(--gray-800);
}
.trust-item__icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-fg);
  font-size: 16px;
  flex-shrink: 0;
}
.trust-item__icon--success { color: var(--success-600); }
.trust-item__title { font-weight: 600; color: var(--gray-950); font-size: var(--fs-sm); }
.trust-item__desc { font-size: var(--fs-xs); color: var(--gray-600); }

/* Logos paiement */
.payment-logos { display: inline-flex; align-items: center; gap: 8px; }
.payment-logo {
  width: 38px; height: 24px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* ═════════════════════════════════════════════════════════════════════════
   83. MOBILE BOTTOM NAV
   ═════════════════════════════════════════════════════════════════════════ */
.mobile-nav {
  display: flex;
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
  padding: 6px 4px env(safe-area-inset-bottom, 6px);
}
.mobile-nav--fixed {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, .08);
}
.mobile-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 4px;
  gap: 2px;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-md);
  position: relative;
  transition: color var(--t-fast);
}
.mobile-nav__item i { font-size: 20px; }
.mobile-nav__item.is-active { color: var(--accent-fg); }
.mobile-nav__item.is-active i.bi { font-weight: bold; }
.mobile-nav__item:hover { color: var(--gray-950); }
.mobile-nav__item-badge {
  position: absolute; top: 2px; right: calc(50% - 18px);
  background: var(--danger-500); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 14px; height: 14px; padding: 0 4px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--app-surface);
}
.mobile-nav__item--cta i {
  background: var(--brand-600);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 2px;
  box-shadow: var(--shadow-md);
}
.mobile-nav__item--cta { color: var(--accent-fg); }

/* ═════════════════════════════════════════════════════════════════════════
   84. STICKY MOBILE CTA BAR
   ═════════════════════════════════════════════════════════════════════════ */
.sticky-cta {
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
  padding: 10px 12px env(safe-area-inset-bottom, 10px);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
}
.sticky-cta--fixed {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
}
.sticky-cta__price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gray-950);
  display: flex; flex-direction: column;
  line-height: 1.2;
}
.sticky-cta__price-label { font-size: 10px; color: var(--gray-600); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.sticky-cta__price-value { font-size: var(--fs-md); }
.sticky-cta__price-old { font-size: var(--fs-xs); color: var(--gray-500); text-decoration: line-through; font-weight: 500; }
.sticky-cta__btn { flex: 1; }

/* ═════════════════════════════════════════════════════════════════════════
   85. ADDRESS AUTOCOMPLETE
   ═════════════════════════════════════════════════════════════════════════ */
.addr-input { position: relative; }
.addr-input__field { padding-left: 36px; }
.addr-input > .icon-left {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}
.addr-input__suggestions {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  padding: 4px;
  max-height: 320px;
  overflow-y: auto;
}
.addr-suggestion {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
}
.addr-suggestion:hover, .addr-suggestion.is-active {
  background: var(--gray-100);
}
.addr-suggestion__icon {
  color: var(--gray-500);
  font-size: 16px;
}
.addr-suggestion__main { color: var(--gray-950); font-weight: 500; }
.addr-suggestion__main mark {
  background: color-mix(in oklch, var(--brand-300) 40%, transparent);
  color: inherit; padding: 0 1px; border-radius: 2px;
}
.addr-suggestion__sub { font-size: var(--fs-xs); color: var(--gray-600); }
.addr-suggestion__type {
  font-size: 10px;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.addr-suggestion.is-current { background: var(--brand-50); }
[data-bs-theme="dark"] .addr-suggestion.is-current { background: color-mix(in oklch, var(--brand-500) 12%, transparent); }

/* ═════════════════════════════════════════════════════════════════════════
   86. SEARCH OVERLAY (plein écran)
   ═════════════════════════════════════════════════════════════════════════ */
.search-overlay {
  position: fixed; inset: 0;
  background: var(--app-surface);
  z-index: 1100;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.search-overlay.is-open { display: flex; }
.search-overlay__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--app-border);
}
.search-overlay__head-icon { font-size: 20px; color: var(--gray-500); }
.search-overlay__input {
  flex: 1;
  border: none; outline: none;
  font-size: var(--fs-xl);
  background: transparent;
  color: var(--gray-950);
  padding: 4px 0;
}
.search-overlay__close {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--gray-700);
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.search-overlay__body {
  flex: 1;
  padding: 24px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.search-overlay__section { margin-bottom: 24px; }
.search-overlay__section-title {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.search-result {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.search-result:hover, .search-result.is-active { background: var(--gray-100); }
.search-result__media {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--app-surface-muted);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-fg);
  font-size: 20px;
  overflow: hidden;
}
.search-result__media img { width: 100%; height: 100%; object-fit: cover; }
.search-result__title { font-weight: 600; color: var(--gray-950); font-size: var(--fs-base); }
.search-result__title mark { background: color-mix(in oklch, var(--brand-300) 40%, transparent); color: inherit; padding: 0 1px; border-radius: 2px; }
.search-result__desc { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 2px; }
.search-result__price { font-weight: 600; color: var(--gray-950); font-variant-numeric: tabular-nums; }
.search-result__type {
  font-size: 10px;
  background: var(--gray-100); color: var(--gray-700);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}

.search-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-sm);
  padding: 4px 10px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-pill);
  color: var(--gray-800);
  cursor: pointer;
  margin-right: 6px; margin-bottom: 6px;
}
.search-tag:hover { background: var(--gray-100); color: var(--gray-950); }
.search-tag i { font-size: 12px; color: var(--gray-500); }

/* ═════════════════════════════════════════════════════════════════════════
   87. BEFORE / AFTER IMAGE SLIDER
   ═════════════════════════════════════════════════════════════════════════ */
.before-after {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
  cursor: ew-resize;
  background: var(--app-surface-muted);
}
.before-after__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
}
.before-after__after {
  clip-path: inset(0 0 0 50%);
}
.before-after__divider {
  position: absolute; top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
  transform: translateX(-1px);
  pointer-events: none;
}
.before-after__handle {
  position: absolute; top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-900);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.before-after__handle::before, .before-after__handle::after {
  content: "";
  position: absolute;
  width: 6px; height: 6px;
  border-top: 2px solid var(--gray-900);
  border-left: 2px solid var(--gray-900);
}
.before-after__handle::before { transform: rotate(-45deg); margin-right: 14px; }
.before-after__handle::after { transform: rotate(135deg); margin-left: 14px; }
.before-after__label {
  position: absolute;
  top: 12px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: .04em;
  pointer-events: none;
}
.before-after__label--before { left: 12px; }
.before-after__label--after { right: 12px; }
.before-after__input {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

/* ═════════════════════════════════════════════════════════════════════════
   88. DRAG-TO-REORDER LIST (kanban / tri)
   ═════════════════════════════════════════════════════════════════════════ */
.reorder-list {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.reorder-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface);
  cursor: grab;
  transition: background var(--t-fast);
}
.reorder-item:last-child { border-bottom: none; }
.reorder-item:hover { background: var(--app-surface-muted); }
.reorder-item.is-dragging {
  opacity: .5;
  cursor: grabbing;
  background: var(--brand-50);
}
.reorder-item.is-drop-target {
  border-top: 2px solid var(--brand-500);
  margin-top: -1px;
}
.reorder-handle {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  font-size: 16px;
  border-radius: var(--radius-sm);
  cursor: grab;
}
.reorder-handle:hover { color: var(--gray-700); background: var(--gray-100); }
.reorder-item__body { min-width: 0; }
.reorder-item__title { font-size: var(--fs-sm); font-weight: 500; color: var(--gray-950); margin: 0; }
.reorder-item__meta { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 2px; }
.reorder-item__actions { display: inline-flex; gap: 4px; }

/* ═════════════════════════════════════════════════════════════════════════
   89. INBOX UI (email-style 2 colonnes)
   ═════════════════════════════════════════════════════════════════════════ */
.inbox {
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 480px;
}
@media (max-width: 767.98px) { .inbox { grid-template-columns: 1fr; } .inbox__detail { display: none; } }
.inbox__sidebar {
  border-right: 1px solid var(--app-border);
  display: flex; flex-direction: column;
}
.inbox__search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--app-border);
}
.inbox__list { overflow-y: auto; flex: 1; }
.inbox-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--app-border);
  cursor: pointer;
  position: relative;
  transition: background var(--t-fast);
}
.inbox-item:hover { background: var(--app-surface-muted); }
.inbox-item.is-active { background: var(--brand-50); }
[data-bs-theme="dark"] .inbox-item.is-active { background: color-mix(in oklch, var(--brand-500) 12%, transparent); }
.inbox-item.is-unread::before {
  content: "";
  position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px;
  background: var(--brand-600);
  border-radius: 50%;
}
.inbox-item__from {
  font-weight: 600;
  color: var(--gray-950);
  font-size: var(--fs-sm);
  display: flex; justify-content: space-between; gap: 8px;
}
.inbox-item.is-unread .inbox-item__from { font-weight: 700; }
.inbox-item__time { font-size: 10px; color: var(--gray-500); font-weight: 500; }
.inbox-item__subject {
  font-size: var(--fs-sm);
  color: var(--gray-800);
  margin: 2px 0 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.inbox-item.is-unread .inbox-item__subject { font-weight: 600; color: var(--gray-950); }
.inbox-item__preview {
  font-size: var(--fs-xs);
  color: var(--gray-600);
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inbox-item__tags { display: inline-flex; gap: 4px; margin-top: 4px; }
.inbox-item__star {
  position: absolute; right: 8px; bottom: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  background: transparent;
  border: none;
  cursor: pointer;
}
.inbox-item__star:hover, .inbox-item__star.is-active { color: var(--warning-500); }

.inbox__detail { display: flex; flex-direction: column; }
.inbox__detail-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-border);
}
.inbox__detail-subject { font-size: var(--fs-lg); font-weight: 600; color: var(--gray-950); margin: 0 0 6px; }
.inbox__detail-tags { display: inline-flex; gap: 4px; }
.inbox__detail-from {
  padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--app-border);
}
.inbox__detail-from-info { flex-grow: 1; }
.inbox__detail-from-name { font-weight: 600; color: var(--gray-950); font-size: var(--fs-sm); }
.inbox__detail-from-meta { font-size: var(--fs-xs); color: var(--gray-600); }
.inbox__detail-body {
  padding: 20px;
  font-size: var(--fs-sm);
  color: var(--gray-800);
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
}
.inbox__detail-body p { margin: 0 0 12px; }
.inbox__detail-actions {
  padding: 12px 20px;
  border-top: 1px solid var(--app-border);
  display: flex; gap: 8px;
  background: var(--app-surface-muted);
}

/* ═════════════════════════════════════════════════════════════════════════
   90. RECENTLY VIEWED STRIP (carousel horizontal compact)
   ═════════════════════════════════════════════════════════════════════════ */
.recent-strip {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.recent-strip__item {
  width: 140px;
  flex-shrink: 0;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.recent-strip__media {
  aspect-ratio: 1 / 1;
  background: var(--app-surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--app-border);
  overflow: hidden;
  margin-bottom: 6px;
}
.recent-strip__media img { width: 100%; height: 100%; object-fit: cover; }
.recent-strip__title {
  font-size: var(--fs-xs);
  color: var(--gray-950);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.recent-strip__price {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--gray-950);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.recent-strip__price-old {
  font-size: var(--fs-xs);
  color: var(--gray-500);
  text-decoration: line-through;
  font-weight: 500;
  margin-left: 4px;
}

/* ═════════════════════════════════════════════════════════════════════════
   91. PROMO COUNTDOWN TIMER
   ═════════════════════════════════════════════════════════════════════════ */
.countdown {
  display: inline-flex; align-items: stretch;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.countdown__unit {
  background: var(--gray-950);
  color: var(--gray-50);
  padding: 6px 8px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 44px;
  display: flex; flex-direction: column;
}
.countdown__value {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.countdown__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .65;
  margin-top: 2px;
  font-weight: 500;
}
.countdown__sep {
  display: flex; align-items: center;
  font-size: var(--fs-lg);
  color: var(--gray-500);
  font-weight: 700;
  padding: 0 2px;
}
.countdown--inline {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 0;
}
.countdown--inline .countdown__unit {
  background: transparent;
  color: var(--gray-950);
  border-right: 1px solid var(--app-border);
}
.countdown--inline .countdown__unit:last-child { border-right: none; }
.countdown--inline .countdown__label { color: var(--gray-600); opacity: 1; }
.countdown--danger .countdown__unit { background: var(--danger-600); }
.countdown--brand .countdown__unit { background: var(--brand-700); }
.countdown--sm .countdown__unit { padding: 4px 6px; min-width: 32px; }
.countdown--sm .countdown__value { font-size: var(--fs-md); }

/* Banner avec countdown intégré */
.promo-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--brand-50), var(--app-surface));
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
[data-bs-theme="dark"] .promo-banner {
  background: linear-gradient(135deg, color-mix(in oklch, var(--brand-500) 12%, var(--app-surface)), var(--app-surface));
}
.promo-banner__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--brand-600);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.promo-banner__content { flex: 1; min-width: 200px; }
.promo-banner__title { font-size: var(--fs-md); font-weight: 700; color: var(--gray-950); margin: 0; }
.promo-banner__desc { font-size: var(--fs-sm); color: var(--gray-700); margin: 2px 0 0; }

/* ═════════════════════════════════════════════════════════════════════════
   92. AUDIO PLAYER
   ═════════════════════════════════════════════════════════════════════════ */
.audio-player {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.audio-player__cover {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-400), var(--brand-700));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.audio-player__cover img { width: 100%; height: 100%; object-fit: cover; }
.audio-player__body { flex: 1; min-width: 0; }
.audio-player__title {
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--gray-950);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audio-player__meta { font-size: var(--fs-xs); color: var(--gray-600); }
.audio-player__progress {
  height: 4px;
  background: var(--gray-200);
  border-radius: 999px;
  position: relative;
  margin-top: 6px;
  cursor: pointer;
}
.audio-player__progress-fill {
  height: 100%;
  background: var(--brand-600);
  border-radius: 999px;
  position: relative;
}
.audio-player__progress-fill::after {
  content: "";
  position: absolute; right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  background: var(--brand-600);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.audio-player__time {
  font-size: 10px;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
  display: flex; justify-content: space-between;
  margin-top: 2px;
}
.audio-player__controls {
  display: inline-flex; align-items: center; gap: 4px;
}
.audio-player__btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--gray-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--t-fast);
}
.audio-player__btn:hover { background: var(--gray-100); color: var(--gray-950); }
.audio-player__btn--play {
  background: var(--brand-600);
  color: #fff;
  width: 40px; height: 40px;
  font-size: 16px;
}
.audio-player__btn--play:hover { background: var(--brand-700); color: #fff; }

/* Variant : audio player avec waveform */
.audio-player--wave .audio-player__wave {
  flex: 1;
  display: flex; align-items: end; gap: 1px;
  height: 32px;
  cursor: pointer;
}
.audio-player__wave-bar {
  flex: 1;
  background: var(--gray-300);
  border-radius: 1px;
  min-height: 4px;
  transition: background var(--t-fast);
}
.audio-player__wave-bar.is-played { background: var(--brand-600); }
.audio-player__wave-bar.is-cursor { background: var(--brand-700); }

/* Variant : audio player compact */
.audio-player--compact { padding: 6px 10px; gap: 8px; }
.audio-player--compact .audio-player__cover { width: 32px; height: 32px; font-size: 14px; }
.audio-player--compact .audio-player__btn--play { width: 32px; height: 32px; font-size: 14px; }

/* ═════════════════════════════════════════════════════════════════════════
   93. PDF VIEWER
   ═════════════════════════════════════════════════════════════════════════ */
.pdf-viewer {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.pdf-viewer__toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  flex-wrap: wrap;
}
.pdf-viewer__filename {
  font-weight: 600; color: var(--gray-950);
  font-size: var(--fs-sm);
  display: inline-flex; align-items: center; gap: 6px;
}
.pdf-viewer__page-input {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--app-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: var(--fs-sm);
}
.pdf-viewer__page-input input {
  width: 32px;
  text-align: center;
  border: none;
  outline: none;
  background: transparent;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--gray-950);
}
.pdf-viewer__page-total {
  font-variant-numeric: tabular-nums;
  color: var(--gray-600);
}
.pdf-viewer__zoom { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); min-width: 44px; text-align: center; }

.pdf-viewer__body {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 400px;
  max-height: 600px;
}
.pdf-viewer__thumbs {
  background: var(--gray-100);
  border-right: 1px solid var(--app-border);
  padding: 8px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
[data-bs-theme="dark"] .pdf-viewer__thumbs { background: var(--gray-50); }
.pdf-viewer__thumb {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  aspect-ratio: 0.71;
  position: relative;
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 8px;
  color: var(--gray-400);
  padding: 6px 4px;
  overflow: hidden;
}
.pdf-viewer__thumb:hover { border-color: var(--gray-500); }
.pdf-viewer__thumb.is-active { border-color: var(--brand-500); box-shadow: 0 0 0 2px color-mix(in oklch, var(--brand-500) 30%, transparent); }
.pdf-viewer__thumb-number {
  position: absolute; bottom: 2px; right: 4px;
  font-size: 8px;
  font-weight: 700;
  color: var(--gray-700);
  background: rgba(255,255,255,.9);
  padding: 0 4px;
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
.pdf-viewer__thumb-content {
  display: flex; flex-direction: column; gap: 1px;
}
.pdf-viewer__thumb-content div { background: var(--gray-200); height: 2px; border-radius: 1px; }

.pdf-viewer__stage {
  background: var(--gray-200);
  overflow: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px;
  gap: 12px;
}
[data-bs-theme="dark"] .pdf-viewer__stage { background: var(--gray-100); }
.pdf-page {
  background: #fff;
  width: 100%; max-width: 380px;
  aspect-ratio: 0.71;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  padding: 28px 24px;
  font-size: 8px;
  color: var(--gray-950);
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}
.pdf-page__title { font-size: 12px; font-weight: 700; margin: 0 0 4px; }
.pdf-page__h2 { font-size: 9px; font-weight: 700; margin: 8px 0 3px; }
.pdf-page p { margin: 0 0 4px; font-size: 7px; color: var(--gray-800); }
.pdf-page__num {
  position: absolute; bottom: 12px; right: 16px;
  font-size: 7px;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
  .pdf-viewer__body { grid-template-columns: 1fr; }
  .pdf-viewer__thumbs { display: none; }
}

/* ═════════════════════════════════════════════════════════════════════════
   94. IMAGE VIEWER (avec pan/zoom/rotation)
   ═════════════════════════════════════════════════════════════════════════ */
.image-viewer {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.image-viewer__toolbar {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  flex-wrap: wrap;
}
.image-viewer__title { font-size: var(--fs-sm); font-weight: 500; color: var(--gray-800); margin-right: 8px; }
.image-viewer__zoom { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--gray-700); min-width: 44px; text-align: center; }
.image-viewer__stage {
  background: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  min-height: 320px;
  position: relative;
  cursor: grab;
}
.image-viewer__stage.is-grabbing { cursor: grabbing; }
.image-viewer__img {
  max-width: 100%; max-height: 100%;
  transition: transform var(--t-base);
  user-select: none;
  pointer-events: none;
}
.image-viewer__placeholder {
  width: 70%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, oklch(70% .12 30), oklch(50% .14 50));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 14px;
  transition: transform var(--t-base);
}
.image-viewer__exif {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  display: flex; flex-direction: column; gap: 2px;
}

/* ═════════════════════════════════════════════════════════════════════════
   95. EXCEL / SPREADSHEET VIEWER (lecture seule)
   ═════════════════════════════════════════════════════════════════════════ */
.xls-viewer {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}
.xls-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--app-border);
  background: oklch(40% .08 130);
  color: #fff;
  font-size: var(--fs-sm);
}
.xls-toolbar__filename {
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.xls-toolbar__btn {
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.xls-toolbar__btn:hover { background: rgba(255,255,255,.22); }

.xls-formula-bar {
  display: grid;
  grid-template-columns: 48px 1fr;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.xls-formula-bar__cell-ref {
  padding: 4px 8px;
  border-right: 1px solid var(--app-border);
  background: var(--app-surface);
  font-weight: 600;
  color: var(--gray-950);
}
.xls-formula-bar__formula {
  padding: 4px 8px;
  color: var(--gray-800);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.xls-grid-wrap {
  overflow: auto;
  background: var(--app-surface);
  max-height: 380px;
}
.xls-grid {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
}
.xls-grid th, .xls-grid td {
  border: 1px solid oklch(85% 0.012 235);
  padding: 4px 8px;
  text-align: left;
  vertical-align: middle;
  height: 22px;
  white-space: nowrap;
  background: var(--app-surface);
  color: var(--gray-950);
}
[data-bs-theme="dark"] .xls-grid th, [data-bs-theme="dark"] .xls-grid td { border-color: var(--gray-300); }
.xls-grid thead th {
  background: var(--gray-100);
  text-align: center;
  font-weight: 600;
  color: var(--gray-700);
  position: sticky; top: 0;
  z-index: 2;
  min-width: 80px;
}
.xls-grid tbody th {
  background: var(--gray-100);
  text-align: center;
  font-weight: 600;
  color: var(--gray-700);
  width: 36px;
  position: sticky; left: 0;
  z-index: 1;
}
.xls-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.xls-grid .selected {
  outline: 2px solid var(--brand-600);
  outline-offset: -2px;
  background: var(--brand-50);
  font-weight: 600;
}
.xls-grid .bold { font-weight: 700; }
.xls-grid .pos { color: var(--success-600); }
.xls-grid .neg { color: var(--danger-600); }

.xls-sheet-tabs {
  display: flex; align-items: center;
  background: var(--app-surface-muted);
  border-top: 1px solid var(--app-border);
  overflow-x: auto;
}
.xls-sheet-tab {
  padding: 5px 14px;
  font-size: var(--fs-xs);
  border-right: 1px solid var(--app-border);
  color: var(--gray-700);
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.xls-sheet-tab.is-active {
  background: var(--app-surface);
  color: var(--gray-950);
  font-weight: 600;
  border-bottom-color: oklch(40% .08 130);
}

/* ═════════════════════════════════════════════════════════════════════════
   96. WORD / DOCUMENT VIEWER (lecture seule)
   ═════════════════════════════════════════════════════════════════════════ */
.doc-viewer {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.doc-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--app-border);
  background: oklch(38% .15 245);
  color: #fff;
  font-size: var(--fs-sm);
}
.doc-toolbar__filename {
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.doc-toolbar__btn {
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.doc-toolbar__btn:hover { background: rgba(255,255,255,.22); }

.doc-stage {
  background: var(--gray-200);
  padding: 20px;
  overflow-y: auto;
  max-height: 580px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
[data-bs-theme="dark"] .doc-stage { background: var(--gray-100); }
.doc-page {
  background: #fff;
  width: 100%; max-width: 600px;
  aspect-ratio: 0.71;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
  padding: 56px 64px;
  color: #1a1a1a;
  font-family: "Calibri", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 11px;
  line-height: 1.5;
  position: relative;
}
.doc-page h1 { font-size: 18px; font-weight: 600; margin: 0 0 10px; color: #2b579a; }
.doc-page h2 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; color: #2b579a; }
.doc-page p { margin: 0 0 8px; }
.doc-page ul, .doc-page ol { margin: 0 0 8px 18px; padding: 0; }
.doc-page ul li, .doc-page ol li { margin-bottom: 2px; }
.doc-page__pagenum {
  position: absolute; bottom: 18px; right: 32px;
  font-size: 9px;
  color: #999;
}

/* ═════════════════════════════════════════════════════════════════════════
   97. SIGNATURE PAD
   ═════════════════════════════════════════════════════════════════════════ */
.signature-pad {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.signature-pad__head {
  padding: 8px 14px;
  border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--app-surface-muted);
}
.signature-pad__label {
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--gray-950);
}
.signature-pad__hint {
  font-size: var(--fs-xs); color: var(--gray-600);
}
.signature-pad__canvas-wrap {
  position: relative;
  background: oklch(99% 0.005 90);
  height: 180px;
  cursor: crosshair;
  /* lignes de guidage */
  background-image: linear-gradient(to bottom, transparent calc(100% - 1px), oklch(80% 0.02 90) 100%);
  background-position: 0 calc(100% - 32px);
  background-size: 100% 32px;
}
.signature-pad__placeholder {
  position: absolute;
  bottom: 38px; left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-xs);
  color: var(--gray-500);
  font-style: italic;
  pointer-events: none;
  letter-spacing: .04em;
}
.signature-pad.is-signed .signature-pad__placeholder { display: none; }
.signature-pad canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.signature-pad__x {
  position: absolute; left: 16px; bottom: 32px;
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-700);
  pointer-events: none;
}
.signature-pad__actions {
  padding: 8px 14px;
  border-top: 1px solid var(--app-border);
  display: flex; align-items: center; gap: 8px;
  background: var(--app-surface-muted);
}
.signature-pad__actions .ms-auto { margin-left: auto; }
.signature-pad__meta {
  font-size: var(--fs-xs); color: var(--gray-600);
  display: inline-flex; align-items: center; gap: 4px;
}

/* Affichage compact (en lecture seule) */
.signature-display {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--radius-md);
}
.signature-display__img {
  width: 120px; height: 48px;
  background: var(--app-surface-muted);
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-700);
  font-family: "Brush Script MT", "Lucida Handwriting", cursive;
  font-size: 22px;
  font-style: italic;
  border-bottom: 1px solid var(--gray-400);
}
.signature-display__meta {
  font-size: var(--fs-xs); color: var(--gray-600);
}
.signature-display__name { font-weight: 600; color: var(--gray-950); font-size: var(--fs-sm); }

/* Scrollbars discrètes desktop */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; border: 2px solid var(--app-surface-muted); }
  ::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
}

/* ── Rich-text (Quill snow) — accord BS5/--brand. Scopé .rte pour battre le CDN. */
.rte .ql-toolbar.ql-snow,
.rte .ql-container.ql-snow { border-color: var(--app-border); }
.rte .ql-toolbar.ql-snow {
  border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md);
  background: var(--app-surface-muted);
}
.rte .ql-container.ql-snow {
  border-bottom-left-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md);
  font-family: inherit; font-size: var(--fs-base);
}
.rte .ql-editor { min-height: var(--rte-h, 180px); color: var(--app-text, var(--gray-900)); }
.rte .ql-editor.ql-blank::before { color: var(--gray-500); font-style: normal; }
/* Icônes/labels de la toolbar */
.rte .ql-snow .ql-stroke { stroke: var(--gray-600); }
.rte .ql-snow .ql-fill { fill: var(--gray-600); }
.rte .ql-snow .ql-picker { color: var(--gray-700); }
.rte .ql-snow .ql-toolbar button:hover .ql-stroke,
.rte .ql-snow .ql-toolbar button.ql-active .ql-stroke { stroke: var(--brand-600); }
.rte .ql-snow .ql-toolbar button:hover .ql-fill,
.rte .ql-snow .ql-toolbar button.ql-active .ql-fill { fill: var(--brand-600); }
.rte .ql-snow .ql-toolbar button.ql-active,
.rte .ql-snow .ql-picker-label.ql-active,
.rte .ql-snow .ql-picker-item.ql-selected { color: var(--brand-600); }
.rte .ql-snow a { color: var(--accent-fg); }
/* Focus visible cohérent avec le thème */
.rte:focus-within .ql-container.ql-snow,
.rte:focus-within .ql-toolbar.ql-snow { border-color: var(--brand-400); }
/* Mode sombre : Quill snow est clair par défaut → on adapte fonds/traits. */
[data-bs-theme="dark"] .rte .ql-snow .ql-stroke { stroke: var(--gray-500); }
[data-bs-theme="dark"] .rte .ql-snow .ql-fill { fill: var(--gray-500); }
[data-bs-theme="dark"] .rte .ql-picker-options {
  background: var(--app-surface); border-color: var(--app-border);
}
[data-bs-theme="dark"] .rte .ql-editor.ql-blank::before { color: var(--gray-400); }

/* ── Datepicker (flatpickr) — accord --brand + mode sombre.
   Préfixé .flatpickr-calendar pour battre en spécificité le CSS CDN (chargé après). */
.flatpickr-calendar .flatpickr-day.selected, .flatpickr-calendar .flatpickr-day.selected:hover,
.flatpickr-calendar .flatpickr-day.startRange, .flatpickr-calendar .flatpickr-day.endRange {
  background: var(--brand-600); border-color: var(--brand-600); color: #fff;
}
.flatpickr-calendar .flatpickr-day.inRange { background: var(--brand-50); border-color: var(--brand-50); box-shadow: -5px 0 0 var(--brand-50), 5px 0 0 var(--brand-50); }
.flatpickr-calendar .flatpickr-day.today { border-color: var(--brand-400); }
.flatpickr-calendar .flatpickr-day:hover { background: var(--gray-100); }
[data-bs-theme="dark"] .flatpickr-calendar {
  background: var(--app-surface); color: var(--gray-900);
  box-shadow: var(--shadow-lg); border: 1px solid var(--app-border);
}
[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
[data-bs-theme="dark"] .flatpickr-current-month input.cur-year,
[data-bs-theme="dark"] .flatpickr-monthDropdown-months,
[data-bs-theme="dark"] span.flatpickr-weekday { color: var(--gray-900); fill: var(--gray-900); }
[data-bs-theme="dark"] .flatpickr-day { color: var(--gray-800); }
[data-bs-theme="dark"] .flatpickr-day.flatpickr-disabled { color: var(--gray-500); }
[data-bs-theme="dark"] .flatpickr-day:hover { background: var(--gray-100); }
[data-bs-theme="dark"] .flatpickr-prev-month svg, [data-bs-theme="dark"] .flatpickr-next-month svg { fill: var(--gray-700); }
[data-bs-theme="dark"] .flatpickr-calendar .flatpickr-day.inRange { background: color-mix(in srgb, var(--brand-500) 18%, transparent); border-color: transparent; box-shadow: none; }

/* ── Téléphone international (intl-tel-input) — mode sombre ───────────── */
[data-bs-theme="dark"] .iti__dropdown-content {
  background: var(--app-surface); border: 1px solid var(--app-border);
}
[data-bs-theme="dark"] .iti__country.iti__highlight { background: var(--gray-100); }
[data-bs-theme="dark"] .iti__country { color: var(--gray-900); }
.iti { width: 100%; }
.iti__search-input { background: var(--app-surface); color: var(--gray-900); }

/* ── Scrollspy nav ────────────────────────────────────────────────────── */
.scrollspy-nav .nav-link { color: var(--gray-700); padding: 4px 10px; border-radius: var(--radius-md); }
.scrollspy-nav .nav-link:hover { color: var(--gray-950); }
.scrollspy-nav.nav-pills .nav-link.active { background: var(--brand-600); color: #fff; }
.scrollspy-nav .nav-link.active { color: var(--accent-fg); font-weight: 600; }
[data-bs-theme="dark"] .scrollspy-nav .nav-link.active { color: var(--brand-300); }
[data-bs-theme="dark"] .scrollspy-nav.nav-pills .nav-link.active { color: #fff; }
.scrollspy-nav__sub { font-size: var(--fs-sm); }

/* ── Trust badges : sous-éléments (item + icône + titre + desc) ───────── */
.trust-row__item { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 200px; min-width: 0; }
.trust-row__icon { font-size: 22px; color: var(--accent-fg); flex-shrink: 0; line-height: 1.2; }
.trust-row__title { font-size: var(--fs-sm); font-weight: 600; color: var(--gray-950); }
.trust-row__desc { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 1px; }

/* ── Pricing toggle : variante interrupteur (labels + switch) ─────────── */
.pricing-toggle__label { font-size: var(--fs-sm); font-weight: 500; color: var(--gray-700); }
.pricing-toggle__switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.pricing-toggle__switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pricing-toggle__slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--gray-300); border-radius: var(--radius-pill);
  transition: background var(--t-fast);
}
.pricing-toggle__slider::before {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast);
}
.pricing-toggle__switch input:checked + .pricing-toggle__slider { background: var(--brand-600); }
.pricing-toggle__switch input:checked + .pricing-toggle__slider::before { transform: translateX(18px); }
.pricing-toggle__switch input:focus-visible + .pricing-toggle__slider { box-shadow: var(--shadow-focus); }

/* ── Auth : composants (icônes, sessions, meter, resend) ─────────────── */
.auth-locked__icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-3xl);
  background: var(--brand-50); color: var(--accent-fg);
}
.auth-locked--danger .auth-locked__icon { background: var(--danger-100); color: var(--danger-600); }
.auth-locked__timer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--app-surface-muted); border: 1px solid var(--app-border);
  border-radius: var(--radius-md); padding: 10px 14px;
  font-size: var(--fs-sm); color: var(--gray-700);
  margin: 12px 0 18px;
}
.auth-locked__actions { display: flex; flex-direction: column; gap: 8px; }

.auth-magic__icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--brand-50); color: var(--accent-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-3xl);
}
.auth-magic__hint {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--app-surface-muted); border: 1px solid var(--app-border);
  border-radius: var(--radius-md); padding: 10px 12px;
  font-size: var(--fs-sm); color: var(--gray-700); margin-top: 16px;
}
.auth-magic__hint i { color: var(--accent-fg); margin-top: 1px; }
.auth-magic__resend { text-align: center; font-size: var(--fs-sm); color: var(--gray-600); margin-top: 14px; }

.auth-otp__resend { text-align: center; font-size: var(--fs-sm); color: var(--gray-600); margin-top: 12px; }

.auth-pwd-meter__bar {
  height: 100%; width: 0;
  background: var(--danger-500); border-radius: var(--radius-pill);
  transition: width var(--t-base), background var(--t-base);
}
.auth-pwd-meter__label { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 4px; min-height: 1.1em; }

.auth-sessions { list-style: none; margin: 0; padding: 0; }
.auth-sessions__item {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--app-border);
}
.auth-sessions__item:last-child { border-bottom: none; }
.auth-sessions__item.is-current { background: color-mix(in oklch, var(--success-500) 10%, transparent); }
.auth-sessions__icon {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: var(--app-surface-muted); border: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-700); font-size: var(--fs-lg);
}
.auth-sessions__item.is-current .auth-sessions__icon { background: color-mix(in oklch, var(--success-500) 16%, transparent); color: var(--success-600); border-color: transparent; }
.auth-sessions__body { min-width: 0; }
.auth-sessions__title { font-weight: 600; font-size: var(--fs-sm); color: var(--gray-950); display: flex; align-items: center; gap: 8px; }
.auth-sessions__meta { font-size: var(--fs-xs); color: var(--gray-600); margin-top: 2px; }
.auth-sessions__time { font-size: var(--fs-xs); color: var(--gray-500); margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.auth-sessions__action { white-space: nowrap; }
.auth-sessions__footer { border-top: 1px solid var(--app-border); padding: 12px 16px; text-align: right; }
.auth-sessions__empty { font-size: var(--fs-sm); color: var(--gray-500); text-align: center; padding: 24px 16px; }

.auth-verify__steps {
  list-style: none; margin: 16px 0 8px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--app-surface-muted); border: 1px solid var(--app-border);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.auth-verify__steps li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--gray-800); }
.auth-verify__steps i { font-size: var(--fs-lg); color: var(--accent-fg); }

/* ── Address autocomplete (coquille : bouton position + dropdown) ─────── */
.addr-autocomplete { position: relative; }
.addr-autocomplete__locate {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; background: transparent;
  color: var(--gray-500); border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.addr-autocomplete__locate:hover { background: var(--gray-100); color: var(--accent-fg); }
.addr-autocomplete__suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 4px;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  max-height: 240px; overflow-y: auto; padding: 4px;
}
