
:root {
  
  --bg:            #ffffff;
  --bg-subtle:     #f8fafc;
  --bg-muted:      #f1f5f9;
  --surface:       #ffffff;
  --surface-raised:#f8fafc;

  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --text:          #0f172a;
  --text-secondary:#475569;
  --text-tertiary: #94a3b8;

  --primary:       #1d4ed8;
  --primary-hover: #1e40af;
  --primary-light: #3b82f6;
  --primary-subtle:#eff6ff;
  --primary-border:#bfdbfe;
  --primary-glow:  rgba(29,78,216,.15);

  --success:       #059669;
  --success-bg:    #ecfdf5;
  --success-border:#a7f3d0;
  --success-glow:  rgba(5,150,105,.15);

  --warning:       #d97706;
  --warning-bg:    #fffbeb;
  --warning-border:#fde68a;

  --danger:        #dc2626;
  --danger-bg:     #fef2f2;
  --danger-border: #fecaca;
  --danger-glow:   rgba(220,38,38,.15);

  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-xs:  2px;
  --radius-sm:  3px;
  --radius:     4px;
  --radius-md:  6px;
  --radius-lg:  8px;
  --radius-xl:  12px;
  --radius-full:999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 2px 8px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.05);
  --shadow-primary: 0 2px 10px rgba(29,78,216,.2);

  --header-h: 60px;

  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in:  cubic-bezier(.4,0,1,1);
  --ease:     cubic-bezier(.4,0,.2,1);
}


[data-theme="dark"] {
  --bg:            #0d1117;
  --bg-subtle:     #161b27;
  --bg-muted:      #1e2535;
  --surface:       #161b27;
  --surface-raised:#1e2535;

  --border:        #253049;
  --border-strong: #2d3d5a;

  --text:          #e8edf5;
  --text-secondary:#8b9ab4;
  --text-tertiary: #4a5a78;

  --primary:       #60a5fa;
  --primary-hover: #93c5fd;
  --primary-light: #93c5fd;
  --primary-subtle:rgba(96,165,250,.08);
  --primary-border:rgba(96,165,250,.2);
  --primary-glow:  rgba(96,165,250,.2);

  --success:       #34d399;
  --success-bg:    rgba(52,211,153,.08);
  --success-border:rgba(52,211,153,.2);
  --success-glow:  rgba(52,211,153,.2);

  --warning:       #fbbf24;
  --warning-bg:    rgba(251,191,36,.08);
  --warning-border:rgba(251,191,36,.2);

  --danger:        #f87171;
  --danger-bg:     rgba(248,113,113,.08);
  --danger-border: rgba(248,113,113,.2);
  --danger-glow:   rgba(248,113,113,.2);

  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 1px 4px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow:    0 4px 12px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,.6), 0 4px 8px rgba(0,0,0,.3);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.7), 0 8px 16px rgba(0,0,0,.4);
  --shadow-primary: 0 4px 20px rgba(96,165,250,.3);
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s var(--ease), color .25s var(--ease);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }


*, *::before, *::after {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: .2s;
  transition-timing-function: var(--ease);
}

.btn, a, [class*="animate"] {
  transition: none;
}


.skip-link {
  position: absolute; top: -48px; left: 8px;
  background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; z-index: 10000;
  transition: top .2s !important;
}
.skip-link:focus { top: 8px; }

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


.container    { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.container--sm{ max-width: 680px;  margin: 0 auto; padding: 0 28px; }
.container--md{ max-width: 880px;  margin: 0 auto; padding: 0 28px; }
main { min-height: calc(100dvh - var(--header-h) - 80px); }


.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="dark"] .site-header {
  background: rgba(13,17,23,.88);
}

.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center; gap: 6px;
}

.nav-brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 15px; letter-spacing: -.02em;
  color: var(--text); text-decoration: none; margin-right: 28px;
  white-space: nowrap;
}
.nav-brand-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: box-shadow .2s, transform .2s !important;
}
.nav-brand:hover .nav-brand-icon {
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}
.nav-brand svg { filter: brightness(0) invert(1); }
.nav-brand:hover { text-decoration: none; color: var(--text); }

.nav-links { display: flex; align-items: center; gap: 1px; flex: 1; }

.nav-link {
  position: relative;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  padding: 6px 11px; border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color .15s, background .15s !important;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: 2px; left: 11px; right: 11px;
  height: 2px; background: var(--primary); border-radius: 2px;
  transform: scaleX(0); transition: transform .2s var(--ease-out) !important;
  transform-origin: center;
}
.nav-link:hover { color: var(--text); background: var(--bg-muted); text-decoration: none; }
.nav-link.active { color: var(--text); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }


.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  cursor: pointer; font-size: 14px;
  transition: background .15s, color .15s, border-color .15s !important;
}
.theme-toggle:hover { background: var(--bg-subtle); color: var(--text); }


.theme-toggle--admin {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #94a3b8;
}
.theme-toggle--admin:hover { background: rgba(255,255,255,.15); color: #e2e8f0; }


.admin-topbar {
  position: sticky; top: 0; z-index: 200;
  background: #0f172a; border-bottom: 1px solid rgba(255,255,255,.07);
  height: var(--header-h);
}
.admin-topbar-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 15px; letter-spacing: -.02em;
  color: #f1f5f9; text-decoration: none;
}
.admin-topbar-brand:hover { text-decoration: none; color: #fff; }
.admin-topbar-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #475569;
  padding: 2px 7px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius-xs);
}
.admin-topbar-user {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: #94a3b8;
}
.user-avatar--sm { width: 24px; height: 24px; font-size: 10px; }


.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; padding: 8px; margin-left: auto; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s var(--ease-out), opacity .2s !important;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


.nav-user-menu { position: relative; }
.nav-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-muted); border: 1px solid var(--border);
  padding: 5px 10px 5px 5px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s !important;
}
.nav-user-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.user-avatar {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.nav-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 210px; padding: 5px; z-index: 200;
  transform-origin: top right;
}
.nav-dropdown.open {
  display: block;
  animation: dropdownIn .18s var(--ease-out) both;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: scale(.95) translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: 14px; color: var(--text);
  border-radius: var(--radius-sm); text-decoration: none;
  transition: background .12s !important;
}
.dropdown-item i { width: 16px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.dropdown-item:hover { background: var(--bg-muted); text-decoration: none; }
.dropdown-item--danger { color: var(--danger); }
.dropdown-item--danger i { color: var(--danger); }
.dropdown-item--danger:hover { background: var(--danger-bg); }
.dropdown-sep { border: none; border-top: 1px solid var(--border); margin: 4px 0; }


.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px; background: var(--bg-subtle);
  margin-top: auto;
}
.footer-container {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; color: var(--text-secondary);
}
.footer-brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); opacity: .5;
}
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { font-size: 13px; color: var(--text-secondary); transition: color .15s !important; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { font-size: 12px; color: var(--text-tertiary); width: 100%; }


.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  line-height: 1.4; font-family: var(--font);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s !important;
  position: relative; overflow: hidden;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}
.btn-primary:hover {
  background: var(--primary-hover); border-color: var(--primary-hover);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--bg-muted); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; box-shadow: 0 4px 12px var(--danger-glow); transform: translateY(-1px); }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { box-shadow: 0 4px 12px var(--success-glow); transform: translateY(-1px); }

.btn-warning { background: var(--warning); color: #000; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(.9); transform: translateY(-1px); }

.btn-sm   { padding: 5px 11px; font-size: 13px; }
.btn-lg   { padding: 11px 22px; font-size: 15px; font-weight: 600; }
.btn-xl   { padding: 14px 28px; font-size: 16px; font-weight: 600; border-radius: var(--radius-md); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-loading { opacity: .7; pointer-events: none; }
.btn i { font-size: .9em; }


.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 7px; letter-spacing: -.01em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-helper { font-size: 12px; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }
.form-error  {
  font-size: 12px; color: var(--danger); margin-top: 5px;
  display: flex; align-items: center; gap: 5px;
}

.form-control {
  display: block; width: 100%;
  padding: 9px 13px; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--radius); min-height: 40px;
  transition: border-color .15s, box-shadow .15s, background .15s !important;
  appearance: none;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-glow); }
.form-control::placeholder { color: var(--text-tertiary); }
textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.6; }
select.form-control {
  padding-right: 13px;
}

.form-control-password { position: relative; }
.form-control-password .form-control { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-tertiary); cursor: pointer;
  padding: 4px; line-height: 1; transition: color .15s !important;
}
.password-toggle:hover { color: var(--text-secondary); }

.form-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.form-check input[type="checkbox"] {
  width: 16px; height: 16px; border: 1.5px solid var(--border-strong);
  border-radius: 4px; cursor: pointer; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--primary);
}

/* File upload */
.file-drop {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-md);
  padding: 36px 24px; text-align: center; cursor: pointer;
  background: var(--bg-subtle);
  transition: border-color .2s, background .2s !important;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: var(--primary); border-style: solid;
  background: var(--primary-subtle);
}
.file-drop input[type="file"] { position: absolute; width: 0; height: 0; opacity: 0; }
.file-drop-icon {
  font-size: 36px; color: var(--text-tertiary); margin-bottom: 14px;
  transition: color .2s, transform .2s !important;
}
.file-drop:hover .file-drop-icon { color: var(--primary); transform: translateY(-3px); }
.file-drop-label { font-size: 14px; color: var(--text-secondary); }
.file-drop-label strong { color: var(--primary); }
.file-drop-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; animation: fadeUp .2s var(--ease-out) both;
}
.file-item i { color: var(--primary); width: 16px; text-align: center; }
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--text-tertiary); font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; }
.file-remove { background: none; border: none; color: var(--text-tertiary); cursor: pointer; padding: 3px 5px; border-radius: var(--radius-xs); transition: color .12s, background .12s !important; }
.file-remove:hover { color: var(--danger); background: var(--danger-bg); }

/* Signature */
.signature-wrap { border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-subtle); overflow: hidden; }
.signature-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.signature-toolbar span { font-size: 13px; color: var(--text-secondary); font-style: italic; }
#signature-canvas { display: block; width: 100%; cursor: crosshair; touch-action: none; background: #fff; }
[data-theme="dark"] #signature-canvas { background: #1a2030; }
.signature-empty-notice { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; gap: 5px; align-items: center; }

/* ─── 9. ALERTS ─────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius);
  font-size: 14px; border-left: 3px solid; margin-bottom: 16px;
  line-height: 1.5;
}
.alert i { margin-top: 1px; flex-shrink: 0; }
.alert-info    { background: var(--primary-subtle); border-color: var(--primary);  color: var(--primary); }
.alert-success { background: var(--success-bg);     border-color: var(--success);  color: var(--success); }
.alert-warning { background: var(--warning-bg);     border-color: var(--warning);  color: var(--warning); }
.alert-danger  { background: var(--danger-bg);      border-color: var(--danger);   color: var(--danger); }
.alert p, .alert span { color: var(--text); }
.alert strong { color: inherit; }

/* ─── 10. BADGES ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}

.badge-neutral { background: var(--bg-muted); color: var(--text-secondary); }
.badge-neutral .badge-dot { background: var(--text-tertiary); }

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-success .badge-dot { background: var(--success); }

.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-warning .badge-dot { background: var(--warning); animation: dotPulse 1.5s ease-in-out infinite; }

.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.badge-danger .badge-dot  { background: var(--danger); animation: dotPulse 1s ease-in-out infinite; }

.badge-primary { background: var(--primary-subtle); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-primary .badge-dot { background: var(--primary); }

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: .6; }
}

/* Badge legacy (::before dot) — rétrocompat */
.badge:not(:has(.badge-dot))::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.badge-neutral:not(:has(.badge-dot))::before  { background: var(--text-tertiary); }
.badge-success:not(:has(.badge-dot))::before  { background: var(--success); }
.badge-warning:not(:has(.badge-dot))::before  { background: var(--warning); }
.badge-danger:not(:has(.badge-dot))::before   { background: var(--danger); }
.badge-primary:not(:has(.badge-dot))::before  { background: var(--primary); }

/* ─── 11. TABLES ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: var(--bg-subtle); color: var(--text-secondary);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s !important; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }
tbody td { padding: 13px 16px; color: var(--text); vertical-align: middle; }
td.mono { font-family: var(--font-mono); font-size: 13px; }
.table-actions { display: flex; gap: 6px; align-items: center; }

/* Clickable row */
tbody tr.row-link { cursor: pointer; }

/* ─── 12. PANELS ────────────────────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.panel-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg-subtle);
}
.panel-title { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.panel-title i { color: var(--primary); font-size: 15px; }
.panel-body   { padding: 22px; }
.panel-footer {
  padding: 13px 20px; border-top: 1px solid var(--border);
  background: var(--bg-subtle); border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ─── 13. PAGE HEADERS ──────────────────────────────────── */
.page-header {
  padding: 36px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 36px;
  background: var(--bg-subtle);
}
.page-header .container { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.25; letter-spacing: -.03em; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 5px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-tertiary); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb-sep { color: var(--text-tertiary); }

/* Ref mono */
.ref {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary);
  background: var(--bg-muted); padding: 2px 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}

/* ─── 14. AUTH PAGES ────────────────────────────────────── */
.auth-page {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 56px 16px; min-height: calc(100dvh - var(--header-h));
  background: var(--bg-subtle);
}
.auth-box { width: 100%; max-width: 440px; }
.auth-logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 16px; color: var(--text); margin-bottom: 36px;
}
.auth-logo .nav-brand-icon { width: 32px; height: 32px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -.03em; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.55; }
.auth-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm);
}
.auth-footer { margin-top: 18px; font-size: 14px; color: var(--text-secondary); text-align: center; }

/* ─── 15. HERO ───────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px; border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 640px; }

.hero-title {
  font-size: clamp(38px, 5.5vw, 58px); font-weight: 800; color: var(--text);
  line-height: 1.14; letter-spacing: -.04em; margin-bottom: 22px;
}
.hero-title-accent { color: var(--primary); }

.hero-desc {
  font-size: 17px; color: var(--text-secondary); line-height: 1.72;
  margin-bottom: 36px; max-width: 520px; font-weight: 400;
}
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 28px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-value {
  font-size: 24px; font-weight: 800; color: var(--text);
  font-family: var(--font-mono); letter-spacing: -.03em;
}
.hero-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; font-weight: 500; }
.hero-stat-divider { width: 1px; height: 32px; background: var(--border); align-self: center; }

/* ─── 16. SECTIONS ──────────────────────────────────────── */
.section { padding: 56px 0; }
.section-title {
  font-size: 28px; font-weight: 800; color: var(--text);
  letter-spacing: -.03em; margin-bottom: 8px; line-height: 1.25;
}
.section-subtitle { font-size: 15px; color: var(--text-secondary); margin-bottom: 36px; line-height: 1.6; }
.section + .section { border-top: 1px solid var(--border); }

/* How it works */
.how-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.how-item {
  padding: 28px; background: var(--surface);
  transition: background .15s !important;
}
.how-item:hover { background: var(--bg-subtle); }
.how-step-num {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--text-tertiary); margin-bottom: 14px;
}
.how-icon {
  width: 44px; height: 44px;
  background: var(--primary-subtle); border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 18px; margin-bottom: 16px;
  transition: background .15s, transform .15s !important;
}
.how-item:hover .how-icon { background: var(--primary); color: #fff; transform: scale(1.05); }
.how-title { font-size: 15px; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.how-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ─── 17. DASHBOARD ─────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 32px;
}
.stat-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px 20px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .15s !important;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px; background: var(--primary); opacity: 0;
  transition: opacity .2s !important;
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-card:hover::after { opacity: 1; }
.stat-card.stat-warning::after { background: var(--warning); }
.stat-card.stat-success::after { background: var(--success); }
.stat-card.stat-danger::after  { background: var(--danger); }

.stat-value {
  font-family: var(--font-mono); font-size: 28px; font-weight: 700;
  color: var(--text); line-height: 1; margin-bottom: 5px; letter-spacing: -.03em;
}
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.stat-icon {
  position: absolute; top: 16px; right: 16px;
  font-size: 20px; color: var(--border-strong); opacity: .5;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 56px 24px; color: var(--text-secondary);
}
.empty-state-icon {
  width: 64px; height: 64px; border-radius: var(--radius-lg);
  background: var(--bg-muted); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 26px; color: var(--text-tertiary);
}
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; margin-bottom: 24px; line-height: 1.55; }

/* ─── 18. MODALS ────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 500;
  align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); max-width: 500px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s var(--ease-out) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-secondary);
  font-size: 18px; cursor: pointer; padding: 4px; border-radius: var(--radius-xs);
  transition: color .12s, background .12s !important;
}
.modal-close:hover { color: var(--text); background: var(--bg-muted); }
.modal-body   { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ─── 19. TOAST ──────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  padding: 11px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-md);
  animation: toastIn .25s var(--ease-out) both;
  max-width: 340px; min-width: 220px;
}
.toast i { font-size: 15px; flex-shrink: 0; }
.toast-success { background: var(--success); color: #fff; }
.toast-danger  { background: var(--danger);  color: #fff; }
.toast-warning { background: var(--warning); color: #fff; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(.95); }
  to   { opacity: 1; transform: none; }
}

/* ─── 20. ADMIN LAYOUT ───────────────────────────────────── */
.admin-layout {
  display: grid; grid-template-columns: 230px 1fr;
  min-height: calc(100dvh - var(--header-h));
}
.admin-sidebar {
  border-right: 1px solid var(--border); background: var(--bg-subtle);
  padding: 16px 0; position: sticky; top: var(--header-h);
  height: calc(100dvh - var(--header-h)); overflow-y: auto;
}
.sidebar-section { margin-bottom: 6px; }
.sidebar-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-tertiary); padding: 10px 16px 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 14px; color: var(--text-secondary);
  text-decoration: none; margin: 0 8px; border-radius: var(--radius-sm);
  transition: background .12s, color .12s !important; position: relative;
}
.sidebar-link i { width: 16px; text-align: center; font-size: 14px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.sidebar-link.active {
  color: var(--primary); font-weight: 600;
  background: var(--primary-subtle);
}
.admin-content { padding: 36px; min-width: 0; }
.admin-badge {
  display: inline-flex; align-items: center;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  border-radius: var(--radius-full); margin-left: auto; min-width: 18px; justify-content: center;
}

/* ─── 21. FILTERS BAR ────────────────────────────────────── */
.filters-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filters-bar .form-control { max-width: 180px; min-height: 36px; font-size: 13px; padding: 6px 11px; }
.filters-bar .form-control--search { max-width: 240px; }

/* ─── 22. PAGINATION ────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; padding: 20px 0; justify-content: center; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text-secondary); text-decoration: none;
  transition: background .12s, border-color .12s, color .12s !important;
}
.page-link:hover { background: var(--bg-muted); color: var(--text); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.page-link.disabled { opacity: .35; pointer-events: none; }

/* ─── 23. PROOF GRID ────────────────────────────────────── */
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.proof-thumb {
  aspect-ratio: 1; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; position: relative; background: var(--bg-muted);
  transition: border-color .15s, transform .15s !important;
}
.proof-thumb:hover { border-color: var(--primary); transform: scale(1.02); }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-file {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 8px; gap: 8px; font-size: 12px; color: var(--text-secondary);
  text-align: center; text-decoration: none; aspect-ratio: 1;
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, background .15s !important;
}
.proof-file i { font-size: 22px; color: var(--primary); }
.proof-file:hover { background: var(--primary-subtle); border-color: var(--primary-border); text-decoration: none; }

/* ─── 24. ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes scaleIn  { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes shimmer  {
  from { background-position: -400% 0; }
  to   { background-position:  400% 0; }
}

.animate-fadein  { animation: fadeIn  .35s var(--ease-out) both; }
.animate-fadeup  { animation: fadeUp  .4s  var(--ease-out) both; }
.animate-scalein { animation: scaleIn .3s  var(--ease-out) both; }

/* Stagger helpers */
.stagger > * { opacity: 0; animation: fadeUp .4s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .10s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .20s; }
.stagger > *:nth-child(5) { animation-delay: .25s; }
.stagger > *:nth-child(6) { animation-delay: .30s; }
.stagger > *:nth-child(n+7) { animation-delay: .35s; }

/* Scroll reveal */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out) !important;
}
.reveal.visible { opacity: 1; transform: none; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 50%, var(--bg-muted) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ─── 25. UTILITIES ──────────────────────────────────────── */
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-danger    { color: var(--danger); }
.text-success   { color: var(--success); }
.text-primary   { color: var(--primary); }
.text-sm        { font-size: 13px; }
.text-xs        { font-size: 12px; }
.text-lg        { font-size: 17px; }
.font-mono      { font-family: var(--font-mono); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.lh-relaxed { line-height: 1.7; }
.mt-4  { margin-top: 4px;  } .mt-8  { margin-top: 8px;  } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mb-8  { margin-bottom: 8px;  } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.p-4   { padding: 4px;  } .p-8   { padding: 8px;  } .p-12  { padding: 12px; }
.p-16  { padding: 16px; } .p-20  { padding: 20px; } .p-24  { padding: 24px; }
.gap-8  { gap: 8px;  } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.d-flex        { display: flex; }
.d-grid        { display: grid; }
.align-center  { align-items: center; }
.align-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.w-full        { width: 100%; }
.divider       { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* Highlight strip */
.highlight-strip {
  background: linear-gradient(135deg, var(--primary-subtle) 0%, var(--surface) 100%);
  border: 1px solid var(--primary-border); border-radius: var(--radius-lg);
  padding: 24px 28px;
}
[data-theme="dark"] .highlight-strip {
  background: linear-gradient(135deg, rgba(96,165,250,.06) 0%, var(--surface) 100%);
}

/* RGPD banner */
.rgpd-banner {
  background: var(--bg-subtle); border-top: 1px solid var(--border);
  padding: 12px 24px; font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}

/* ─── 26. INDEX — ÉDITORIAL ─────────────────────────────── */

/* Titre de section sobre */
.index-section-title {
  font-size: clamp(26px, 3.5vw, 38px); font-weight: 800;
  color: var(--text); letter-spacing: -.035em; line-height: 1.18;
  margin-bottom: 40px;
}
.index-section-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.75;
}

/* Étapes numérotées — style éditorial */
.steps-list { border-top: 1px solid var(--border); }
.step-row {
  display: grid; grid-template-columns: 72px 1fr;
  gap: 0 24px; padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.step-num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--text-tertiary); padding-top: 3px;
  letter-spacing: .02em;
}
.step-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 6px; letter-spacing: -.01em;
}
.step-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }

/* Deux colonnes éditoriales */
.index-two-col {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 64px; align-items: start;
}
@media (max-width: 860px) {
  .index-two-col { grid-template-columns: 1fr; gap: 32px; }
}

/* Liste catégories — simple, texte uniquement */
.cat-list { list-style: none; padding: 0; }
.cat-list-item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text); font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.cat-list-item:last-child { border-bottom: none; }
.cat-list-item::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-strong); flex-shrink: 0;
}

/* Check-list sécurité */
.check-list { list-style: none; padding: 0; }
.check-list li {
  padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 12px;
  line-height: 1.5;
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '✓'; font-size: 12px; font-weight: 700;
  color: var(--success); flex-shrink: 0; width: 18px;
}

/* Section avec double bordure */
.section--ruled {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* CTA simple — pas de box */
.section--cta-simple {
  border-top: 1px solid var(--border);
  padding: 72px 0;
}

/* ─── 27. PDF DROP ZONE ──────────────────────────────────── */
.file-drop-pdf {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-md);
  padding: 32px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s !important;
  background: var(--bg-subtle);
}
.file-drop-pdf:hover, .file-drop-pdf.drag-over {
  border-color: var(--primary); background: var(--primary-subtle);
}
.file-input-hidden { display: none; }
.btn-link {
  background: none; border: none; padding: 0;
  color: var(--primary); font-size: inherit; font-weight: 600;
  cursor: pointer; text-decoration: underline;
}
.btn-link:hover { color: var(--primary-hover); }
.file-selected-info {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-align: left; max-width: 360px; margin: 0 auto;
}

/* ─── 27. INDEX PAGE COMPONENTS ─────────────────────────── */

/* Section head */
.section-head { margin-bottom: 40px; }
.section-label {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 3px 10px; border-radius: var(--radius-full); margin-bottom: 14px;
}

/* Hero stat items */
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-divider {
  width: 1px; height: 32px; background: var(--border); align-self: center;
}

/* Section muted */
.section--muted { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* How step number */
.how-step {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--text-tertiary); margin-bottom: 12px; display: block;
}

/* Categories grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.cat-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color .15s, box-shadow .15s, transform .15s !important;
  cursor: default;
}
.cat-card:hover {
  border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px);
}
.cat-icon {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.cat-icon--danger   { background: var(--danger-bg);   color: var(--danger);   border: 1px solid var(--danger-border); }
.cat-icon--warning  { background: var(--warning-bg);  color: var(--warning);  border: 1px solid var(--warning-border); }
.cat-icon--primary  { background: var(--primary-subtle); color: var(--primary); border: 1px solid var(--primary-border); }
.cat-icon--secondary{ background: var(--bg-muted);    color: var(--text-secondary); border: 1px solid var(--border); }
.cat-label { font-size: 13px; font-weight: 600; color: var(--text); }

/* Trust section */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; gap: 36px; } }
.trust-text { }
.trust-features { display: flex; flex-direction: column; gap: 2px; }
.trust-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-md);
  transition: background .15s !important;
}
.trust-item:hover { background: var(--bg-subtle); }
.trust-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-sm);
  background: var(--primary-subtle); border: 1px solid var(--primary-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-size: 15px;
}
.trust-item-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.trust-item-desc  { font-size: 13px; color: var(--text-secondary); line-height: 1.55; }

/* CTA section */
.section--cta { background: var(--bg-subtle); border-top: 1px solid var(--border); }
.cta-box {
  text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 56px 40px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 300px;
  background: radial-gradient(ellipse, var(--primary-subtle) 0%, transparent 70%);
  pointer-events: none;
}
.cta-icon {
  font-size: 40px; color: var(--primary);
  display: block; margin: 0 auto 20px; position: relative;
}
.cta-title {
  font-size: 28px; font-weight: 800; color: var(--text);
  letter-spacing: -.03em; margin-bottom: 14px; position: relative;
}
.cta-desc {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.7; max-width: 440px; margin: 0 auto 28px; position: relative;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */

/* Prevent ALL horizontal overflow */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }

/* ─── Info DL (remplace les inline styles) ──────────────── */
.info-dl {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 8px 20px; font-size: 14px;
}
.info-dl dt { color: var(--text-secondary); }
.info-dl dd { word-break: break-word; }

/* ─── Message thread ─────────────────────────────────────── */
.msg-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; max-height: 320px; overflow-y: auto; }
.msg-bubble { max-width: 82%; padding: 10px 14px; border-radius: var(--radius-md); font-size: 14px; line-height: 1.6; }
.msg-bubble--admin { align-self: flex-start; background: var(--primary-bg); border: 1px solid var(--primary-border); color: var(--text); }
.msg-bubble--user  { align-self: flex-end;   background: var(--bg-subtle);    border: 1px solid var(--border);          color: var(--text); }
.msg-meta { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; }

/* ─── Tablet (max 900px) ─────────────────────────────────── */
@media (max-width: 900px) {
  /* Collapse 2-col panel layouts */
  .two-col-layout { grid-template-columns: 1fr !important; }
}

/* ─── Mobile (max 768px) ─────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 16px; gap: 2px; z-index: 99;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; animation: fadeDown .2s var(--ease-out); }
  .nav-link { padding: 11px 14px; }
  .nav-link::after { display: none; }

  /* Hide register button text label on very small nav, keep icon */
  .nav-actions .btn-primary span { display: none; }
  .nav-actions { gap: 4px; }

  /* Admin layout */
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border);
    padding: 6px 10px; display: flex; flex-wrap: nowrap; gap: 4px;
    overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .sidebar-label { display: none; }
  .sidebar-link { border-radius: var(--radius-sm); margin: 0; padding: 6px 10px; white-space: nowrap; font-size: 12px; }
  .sidebar-link span { font-size: 12px; }
  .admin-content { padding: 14px; }
  .admin-topbar .nav-container { padding: 0 14px; }
  .admin-topbar-label { display: none; }
  .admin-topbar-user span:last-child { display: none; } /* hide username text */

  /* Hero */
  .hero { padding: 52px 0 44px; }
  .hero-title { letter-spacing: -.03em; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Steps */
  .step-row { grid-template-columns: 44px 1fr; gap: 0 16px; padding: 24px 0; }
  .index-section-title { margin-bottom: 28px; }

  /* Page header */
  .page-header { padding: 20px 0 16px; margin-bottom: 20px; }
  .page-header .container { flex-direction: column; gap: 10px; align-items: flex-start; }
  .page-title { font-size: 20px; }

  /* Auth */
  .auth-page { padding: 32px 16px; background: var(--bg); }
  .auth-panel { padding: 20px; }

  /* Filters */
  .filters-bar .form-control, .filters-bar .form-control--search { max-width: 100%; }

  /* Panel */
  .panel-body { padding: 14px; }
  .panel-header { padding: 12px 14px; }

  /* Info DL collapse */
  .info-dl { grid-template-columns: 1fr; gap: 2px; }
  .info-dl dt { font-size: 11px; margin-top: 10px; }
  .info-dl dt:first-child { margin-top: 0; }

  /* Form grids collapse */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] { display: flex !important; flex-direction: column; }

  /* Proof grid */
  .proof-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }

  /* Tables */
  .table-wrap { border-radius: 0; }
  table { min-width: 540px; }

  /* Msg bubble */
  .msg-bubble { max-width: 90%; }
}

/* ─── Small mobile (max 480px) ───────────────────────────── */
@media (max-width: 480px) {
  .container, .container--sm, .container--md { padding: 0 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nav-container { padding: 0 14px; }
  .admin-content { padding: 12px; }
  .panel-body { padding: 12px; }

  /* Full-width buttons in page headers */
  .page-header .container > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .page-header .container > div:last-child .btn { flex: 1; justify-content: center; min-width: 120px; }

  /* Proof grid tighter */
  .proof-grid { grid-template-columns: repeat(3, 1fr); }

  /* Status tracker - smaller text */
  .status-tracker p { font-size: 11px; }

  /* Hide secondary stat cards */
  .stat-card { padding: 14px 12px; }
  .stat-value { font-size: 22px; }
}

@media print {
  .site-header, .site-footer, .btn, .nav-user-menu, #toast-container, .admin-sidebar { display: none !important; }
  .admin-layout { display: block; }
  body { background: #fff; color: #000; }
}
