/* ==========================================================================
   LuxGap Privacy — design system (extrait de la maquette v2, écran « Système
   de design »). « Une teinte, une seule signification. »
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --lxg-navy: #0F1A3D;
  --lxg-navy-deep: #060B22;
  --lxg-teal: #00C2B5;
  --lxg-teal-dark: #00A095;
  --lxg-teal-soft: #E6F8F6;
  --lxg-gold: #E5B566;
  --lxg-gold-soft: #FBF1DC;
  --lxg-ok: #11A65A;
  --lxg-ok-soft: #E5F6EC;
  --lxg-ko: #D04545;
  --lxg-ko-soft: #FBE8E8;
  --lxg-warn: #C99025;
  --lxg-warn-soft: #FBF4E0;
  --lxg-bg: #FAFBFC;
  --lxg-surface: #FFFFFF;
  --lxg-line: #E5E9F0;
  --lxg-soft: #F2F5FA;
  --lxg-line-soft: #F0F3F8;
  --lxg-ink2: #2D3A5E;
  --lxg-muted: #6C7590;
  --lxg-disabled: #B9C0D4;
  --lxg-blue: #155A9E;
  --lxg-blue-soft: #E8F0FA;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --font-title: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--lxg-bg); color: var(--lxg-navy); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
a { color: var(--lxg-teal-dark); text-decoration: none; }
a:hover { color: var(--lxg-teal); text-decoration: underline; }
button { font-family: var(--font-body); }
input::placeholder, textarea::placeholder { color: var(--lxg-muted); opacity: 0.7; }
:focus-visible { outline: 2px solid var(--lxg-teal); outline-offset: 2px; }
::selection { background: var(--lxg-teal-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Layout coquille ---------- */
.shell { display: flex; min-height: 100vh; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: 28px 32px 90px; max-width: 1460px; width: 100%; margin: 0 auto; }

/* ---------- Sidebar ---------- */
.sidebar { width: 248px; flex: 0 0 248px; background: linear-gradient(135deg, var(--lxg-navy) 0%, var(--lxg-navy-deep) 100%); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.sidebar-brand { padding: 24px 16px 14px; }
.sidebar-brand img { height: 24px; width: auto; filter: brightness(0) invert(1); }
.sidebar-brand .brand-tag { font-weight: 600; font-size: 11px; color: var(--lxg-teal); letter-spacing: 0.12em; margin-left: 8px; }
.sidebar-brand .brand-host { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 6px; }
.sidebar-section { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.38); padding: 8px 10px 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar nav { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 8px; }
.sidebar nav::-webkit-scrollbar { display: none; }
.nav-item { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 8px 12px; border: none; border-left: 3px solid transparent; border-radius: 8px; cursor: pointer; font-size: 14px; background: transparent; color: rgba(255,255,255,0.72); font-weight: 400; transition: background 150ms var(--ease); }
.nav-item:hover { background: rgba(255,255,255,0.04); }
.nav-item.active { background: rgba(255,255,255,0.07); color: #FFF; font-weight: 600; border-left-color: var(--lxg-teal); }
.nav-badge { font-size: 11px; font-weight: 600; background: var(--lxg-teal); color: var(--lxg-navy); border-radius: 999px; padding: 1px 8px; font-family: var(--font-mono); }
.nav-badge.warn { background: var(--lxg-gold); }
.nav-badge.ko { background: var(--lxg-ko); color: #FFF; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.7; }
.sidebar-foot .mono { font-family: var(--font-mono); }

/* Sélecteur de tenant — objet de sécurité */
.tenant-picker { padding: 0 12px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); position: relative; }
.tenant-picker-label { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.38); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.tenant-picker-btn { width: 100%; text-align: left; background: rgba(255,255,255,0.05); border: none; border-left: 2px solid var(--tenant-accent, var(--lxg-teal)); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: block; transition: background 150ms var(--ease); }
.tenant-picker-btn:hover { background: rgba(255,255,255,0.09); }
.tenant-picker-btn .t-name { font-weight: 600; font-size: 13px; color: #FFF; }
.tenant-picker-btn .t-sub { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; }
.tenant-menu { position: absolute; left: 12px; top: calc(100% - 6px); z-index: 60; background: #FFF; border: 1px solid var(--lxg-line); border-radius: 10px; max-height: 420px; overflow: auto; width: 480px; box-shadow: 0 24px 48px rgba(15,26,61,0.10), 0 8px 16px rgba(15,26,61,0.05); }
.tenant-menu-warn { padding: 10px 14px; border-bottom: 1px solid var(--lxg-line-soft); font-size: 12px; color: var(--lxg-warn); background: var(--lxg-warn-soft); border-radius: 10px 10px 0 0; font-weight: 500; }
.tenant-option { width: 100%; text-align: left; padding: 9px 14px; background: transparent; border: none; border-bottom: 1px solid var(--lxg-line-soft); cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background 150ms var(--ease); }
.tenant-option:hover { background: var(--lxg-soft); }
.tenant-option .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.tenant-option .t-name { display: block; font-size: 13px; font-weight: 500; color: var(--lxg-navy); }
.tenant-option .t-sub { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--lxg-muted); }

/* ---------- Topbar ---------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 32px; background: #FFF; border-bottom: 1px solid var(--lxg-line); position: sticky; top: 0; z-index: 40; }
.topbar-search { flex: 1; max-width: 440px; border: 1px solid var(--lxg-line); border-radius: 10px; padding: 8px 14px; font-size: 13px; background: var(--lxg-soft); color: var(--lxg-navy); }
.chip-group { display: flex; gap: 2px; border: 1px solid var(--lxg-line); border-radius: 999px; padding: 2px; background: var(--lxg-soft); }
.chip { border: none; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent; color: var(--lxg-muted); white-space: nowrap; transition: background 150ms var(--ease); }
.chip.active { background: var(--lxg-navy); color: #FFF; }
.chip:hover:not(.active) { background: rgba(15,26,61,0.06); }
.chip:disabled { color: var(--lxg-disabled); cursor: not-allowed; }
.topbar-user { display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--lxg-line); padding-left: 16px; }
.avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--lxg-navy); color: #FFF; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }

/* ---------- Bandeaux de contexte ---------- */
.context-bar { padding: 8px 32px; font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--lxg-line); background: var(--lxg-soft); color: var(--lxg-ink2); }
.context-bar .mono { font-family: var(--font-mono); }
.context-bar.tenant { background: var(--lxg-navy); color: #FFF; border-bottom: none; }
.context-bar.write { background: var(--lxg-ko); color: #FFF; }
.banner { padding: 12px 16px; border-radius: 10px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.banner.warn { background: var(--lxg-warn-soft); color: var(--lxg-warn); border: 1px solid var(--lxg-gold); }
.banner.ko { background: var(--lxg-ko-soft); color: var(--lxg-ko); border: 1px solid #EFB9B9; }
.banner.ok { background: var(--lxg-ok-soft); color: var(--lxg-ok); border: 1px solid #A9DEC2; }
.banner.info { background: var(--lxg-teal-soft); color: var(--lxg-teal-dark); border: 1px solid #AEE7E2; }
.banner .grow { flex: 1; }

/* ---------- Cartes & grilles ---------- */
.card { background: var(--lxg-surface); border: 1px solid var(--lxg-line); border-radius: 10px; padding: 18px; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.card.hoverable:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(15,26,61,0.08); }
.card-title { font-family: var(--font-title); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.card-sub { font-size: 12px; color: var(--lxg-muted); margin: 0 0 14px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: 1fr; } }

.page-title { font-family: var(--font-title); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.page-sub { font-size: 13px; color: var(--lxg-muted); margin: 0 0 22px; }
.section-title { font-family: var(--font-title); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 26px 0 10px; }

/* ---------- Puces de statut ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pill .pdot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill.draft { background: var(--lxg-soft); color: var(--lxg-muted); }
.pill.in_review, .pill.pending, .pill.modified { background: var(--lxg-gold-soft); color: var(--lxg-warn); }
.pill.validated, .pill.ok, .pill.active, .pill.signed, .pill.done, .pill.published, .pill.answered { background: var(--lxg-ok-soft); color: var(--lxg-ok); }
.pill.locked { background: var(--lxg-navy); color: #FFF; }
.pill.ko, .pill.missing, .pill.exceeded, .pill.rejected, .pill.rompu { background: var(--lxg-ko-soft); color: var(--lxg-ko); }
.pill.info, .pill.sent, .pill.in_progress { background: var(--lxg-blue-soft); color: var(--lxg-blue); }
.pill.na, .pill.obsolete, .pill.archived { background: var(--lxg-soft); color: var(--lxg-muted); text-decoration: line-through; }
.pill.recommended { background: transparent; border: 1.5px dashed var(--lxg-teal-dark); color: var(--lxg-teal-dark); }
.pill.blocked { background: var(--lxg-ko-soft); color: var(--lxg-ko); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all 150ms var(--ease); text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--lxg-teal) 0%, var(--lxg-teal-dark) 100%); color: var(--lxg-navy); }
.btn-primary:hover { filter: brightness(1.06); color: var(--lxg-navy); }
.btn-secondary { background: #FFF; color: var(--lxg-navy); border-color: var(--lxg-line); }
.btn-secondary:hover { background: var(--lxg-soft); }
.btn-danger { background: var(--lxg-ko); color: #FFF; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--lxg-teal-dark); border-color: var(--lxg-teal); }
.btn-ghost:hover { background: var(--lxg-teal-soft); }
.btn:disabled, .btn.disabled { background: var(--lxg-soft); color: var(--lxg-disabled); border-color: var(--lxg-line); cursor: not-allowed; filter: none; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }

/* Barre d'action sticky (formulaires longs) */
.action-bar { position: sticky; bottom: 0; background: #FFF; border-top: 1px solid var(--lxg-line); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; z-index: 20; margin: 24px -32px -90px; padding-left: 32px; padding-right: 32px; }

/* ---------- Tableaux ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--lxg-surface); border: 1px solid var(--lxg-line); border-radius: 10px; overflow: hidden; }
.table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--lxg-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 14px; border-bottom: 1px solid var(--lxg-line); background: var(--lxg-soft); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--lxg-line-soft); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; transition: background 150ms var(--ease); }
.table tr.clickable:hover { background: var(--lxg-soft); }
.table tr.flagged { background: #FDF2F2; box-shadow: inset 3px 0 0 var(--lxg-ko); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ref { font-family: var(--font-mono); font-size: 12px; color: var(--lxg-ink2); }
.muted { color: var(--lxg-muted); }
.small { font-size: 12px; }
.accent-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }

/* Pastille d'origine : pleine = back office, creuse = portail client */
.origin-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; }
.origin-dot.backoffice { background: var(--lxg-navy); }
.origin-dot.client { background: transparent; border: 2px solid var(--lxg-teal-dark); }

/* ---------- Compteurs d'échéance ---------- */
.deadline { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.deadline.hours { font-size: 22px; color: var(--lxg-navy); }
.deadline.exceeded { color: var(--lxg-ko); }
.progress { height: 6px; background: var(--lxg-soft); border-radius: 999px; position: relative; overflow: visible; }
.progress .fill { height: 100%; border-radius: 999px; background: var(--lxg-teal-dark); transition: width 600ms var(--ease); }
.progress .fill.gold { background: var(--lxg-gold); }
.progress .fill.ko { background: var(--lxg-ko); }
.progress .marker { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--lxg-navy); border-radius: 2px; }
.progress .overrun { position: absolute; top: 0; right: 0; height: 100%; border-radius: 0 999px 999px 0; background: repeating-linear-gradient(45deg, var(--lxg-ko), var(--lxg-ko) 3px, transparent 3px, transparent 6px); opacity: 0.55; }

/* Bandes de risque : 0-39 vert, 40-59 teal, 60-74 or, 75-100 rouge */
.risk-band { display: flex; height: 8px; border-radius: 999px; overflow: hidden; }
.risk-band span { display: block; height: 100%; }

/* ---------- Scores ---------- */
.score-num { font-family: var(--font-title); font-weight: 600; letter-spacing: -0.02em; }
.kpi { background: var(--lxg-surface); border: 1px solid var(--lxg-line); border-radius: 10px; padding: 16px 18px; }
.kpi .kpi-label { font-size: 12px; color: var(--lxg-muted); margin-bottom: 6px; }
.kpi .kpi-value { font-family: var(--font-title); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.kpi .kpi-sub { font-size: 12px; color: var(--lxg-muted); margin-top: 4px; }
.kpi.clickable { cursor: pointer; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.kpi.clickable:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(15,26,61,0.08); }

/* ---------- Tiroirs / modales ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,26,61,0.32); z-index: 80; opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease); }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(1080px, 96vw); background: var(--lxg-bg); z-index: 90; transform: translateX(100%); transition: transform 250ms var(--ease); display: flex; flex-direction: column; box-shadow: -24px 0 48px rgba(15,26,61,0.18); }
.drawer.open { transform: translateX(0); }
.drawer-head { background: var(--lxg-navy); color: #FFF; padding: 14px 24px; display: flex; align-items: center; gap: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; display: flex; gap: 20px; }
.drawer-main { flex: 1; min-width: 0; }
.drawer-rail { width: 236px; flex: 0 0 236px; border-left: 1px solid var(--lxg-line); padding-left: 18px; transition: all 200ms var(--ease); }
.drawer-rail.collapsed { flex-basis: 18px; width: 18px; padding-left: 0; overflow: hidden; }
.drawer-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--lxg-line); margin-bottom: 18px; flex-wrap: wrap; }
.drawer-tab { border: none; background: transparent; padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--lxg-muted); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.drawer-tab.active { color: var(--lxg-navy); font-weight: 600; border-bottom-color: var(--lxg-teal); }
.drawer-tab .tab-badge { font-family: var(--font-mono); font-size: 10.5px; background: var(--lxg-ko); color: #FFF; border-radius: 999px; padding: 0 6px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(15,26,61,0.4); z-index: 100; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #FFF; border-radius: 14px; width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; padding: 24px; box-shadow: 0 24px 48px rgba(15,26,61,0.20); }

/* ---------- Panneau Copilote ---------- */
.copilot-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: #FFF; z-index: 95; transform: translateX(100%); transition: transform 250ms var(--ease); display: flex; flex-direction: column; box-shadow: -16px 0 40px rgba(15,26,61,0.14); border-left: 1px solid var(--lxg-line); }
.copilot-panel.open { transform: translateX(0); }
.copilot-head { padding: 14px 18px; border-bottom: 1px solid var(--lxg-line); background: var(--lxg-navy); color: #FFF; }
.copilot-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.copilot-foot { padding: 12px 18px; border-top: 1px solid var(--lxg-line); }
.copilot-msg { border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; max-width: 92%; }
.copilot-msg.user { background: var(--lxg-navy); color: #FFF; margin-left: auto; }
.copilot-msg.ai { background: var(--lxg-soft); color: var(--lxg-ink2); }
.copilot-src { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; background: var(--lxg-teal-soft); color: var(--lxg-teal-dark); border-radius: 6px; padding: 1px 7px; margin: 2px 3px 0 0; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--lxg-navy); color: #FFF; border-radius: 10px; padding: 12px 18px; font-size: 13px; box-shadow: 0 12px 24px rgba(15,26,61,0.24); opacity: 0; transform: translateY(8px); transition: all 250ms var(--ease); max-width: 420px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { background: var(--lxg-ok); }
.toast.ko { background: var(--lxg-ko); }

/* ---------- Fil de preuve ---------- */
.proof-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--lxg-line-soft); font-size: 12px; }
.proof-dot { width: 10px; height: 10px; border-radius: 999px; flex: 0 0 10px; margin-top: 4px; }
.proof-dot.dpo { background: var(--lxg-teal-dark); }
.proof-dot.system { background: var(--lxg-navy); }
.proof-dot.client { background: transparent; border: 2px solid var(--lxg-teal-dark); }
.proof-dot.ai_pending { background: transparent; border: 2px dashed var(--lxg-gold); }
.proof-dot.ai_decided { background: var(--lxg-gold); }
.proof-hash { font-family: var(--font-mono); font-size: 10px; color: var(--lxg-muted); word-break: break-all; }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--lxg-ink2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--lxg-muted); margin-top: 4px; }
.field.required label::after { content: ' *'; color: var(--lxg-ko); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--lxg-line); border-radius: 10px; padding: 9px 13px; font-size: 13px; font-family: var(--font-body); color: var(--lxg-navy); background: #FFF; transition: border-color 150ms var(--ease); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--lxg-teal); outline: none; }
.input.missing { border-color: var(--lxg-ko); background: #FDF6F6; }
.textarea { min-height: 90px; resize: vertical; }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--lxg-soft); color: var(--lxg-muted); }
.lock-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--lxg-navy); background: var(--lxg-soft); border-radius: 6px; padding: 2px 8px; margin-left: 8px; }

/* Tuiles (choix de droit, types de violation…) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { border: 1.5px solid var(--lxg-line); border-radius: 10px; padding: 14px; cursor: pointer; background: #FFF; transition: all 150ms var(--ease); text-align: left; }
.tile:hover { border-color: var(--lxg-teal); }
.tile.selected { border-color: var(--lxg-teal-dark); background: var(--lxg-teal-soft); }
.tile .tile-title { font-weight: 600; font-size: 13px; }
.tile .tile-sub { font-size: 11.5px; color: var(--lxg-muted); margin-top: 2px; }

/* Steppers */
.stepper { display: flex; gap: 0; margin-bottom: 26px; }
.step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--lxg-muted); padding-top: 26px; }
.step::before { content: attr(data-n); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 999px; background: var(--lxg-soft); color: var(--lxg-muted); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.step::after { content: ''; position: absolute; top: 11px; left: calc(-50% + 12px); right: calc(50% + 12px); height: 2px; background: var(--lxg-line); }
.step:first-child::after { display: none; }
.step.done::before { background: var(--lxg-ok); color: #FFF; }
.step.done::after { background: var(--lxg-ok); }
.step.current { color: var(--lxg-navy); font-weight: 600; }
.step.current::before { background: var(--lxg-teal); color: var(--lxg-navy); }

/* OTP cases */
.otp-row { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.otp-cell { width: 46px; height: 54px; border: 1.5px solid var(--lxg-line); border-radius: 10px; text-align: center; font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--lxg-navy); }
.otp-cell:focus { border-color: var(--lxg-teal); outline: none; }

/* ---------- États (squelettes, vides, erreurs) ---------- */
@keyframes lgshimmer { 0% { opacity: 0.5; } 50% { opacity: 0.9; } 100% { opacity: 0.5; } }
.skeleton { border-radius: 8px; background: var(--lxg-soft); animation: lgshimmer 1.6s infinite; }
.empty-state { text-align: center; padding: 48px 24px; background: var(--lxg-surface); border: 1px dashed var(--lxg-line); border-radius: 12px; }
.empty-state .empty-icon { font-size: 30px; margin-bottom: 10px; }
.empty-state .empty-title { font-family: var(--font-title); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.error-state { text-align: center; padding: 40px 24px; background: var(--lxg-ko-soft); border: 1px solid #EFB9B9; border-radius: 12px; color: var(--lxg-ko); }
.denied-state { text-align: center; padding: 48px 24px; background: var(--lxg-navy); border-radius: 12px; color: #FFF; }

/* ---------- Divers ---------- */
.divider { border: none; border-top: 1px solid var(--lxg-line); margin: 22px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--lxg-soft); border-radius: 8px; padding: 3px 10px; font-size: 12px; color: var(--lxg-ink2); }
.tag.warn { background: var(--lxg-warn-soft); color: var(--lxg-warn); }
.tag .tag-x { border: none; background: none; color: var(--lxg-muted); cursor: pointer; font-size: 13px; padding: 0; }
.timeline-phase { display: flex; gap: 0; }
.footer-note { font-size: 11px; color: var(--lxg-muted); text-align: center; margin-top: 40px; }
.hide { display: none !important; }
.flex { display: flex; align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.grow { flex: 1; }
.right { text-align: right; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
pre.code { font-family: var(--font-mono); font-size: 12px; background: var(--lxg-navy); color: #D6E4FF; border-radius: 10px; padding: 14px; overflow-x: auto; }

/* Zone dangereuse */
.danger-zone { border: 1px solid #EFB9B9; border-radius: 10px; padding: 16px; background: #FFFBFB; }
.danger-zone .dz-title { color: var(--lxg-ko); font-weight: 600; font-size: 13px; margin-bottom: 6px; }

/* Responsive */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform 250ms var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 18px 16px 90px; }
  .drawer-rail { display: none; }
  .topbar { padding: 10px 16px; }
}
