/* ─── Fonts ──────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ─── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-page:     #F2F5FB;
  --bg-surface:  #FFFFFF;
  --bg-elevated: #F7F9FD;
  --bg-hover:    #EEF3FC;
  --bg-active:   #E5EDFA;

  /* Borders */
  --border:       #E0E7F2;
  --border-muted: #EDF1F9;

  /* Accent — Blue */
  --accent:       #2563EB;
  --accent-dim:   #1D4ED8;
  --accent-light: #3B82F6;
  --accent-text:  #2563EB;
  --accent-bg:    rgba(37, 99, 235, 0.07);
  --accent-glow:  rgba(37, 99, 235, 0.20);

  /* Semantic */
  --success:    #16A34A;
  --success-bg: rgba(22, 163, 74, 0.09);
  --warning:    #D97706;
  --warning-bg: rgba(217, 119, 6, 0.09);
  --danger:     #DC2626;
  --danger-bg:  rgba(220, 38, 38, 0.08);
  --info:       #0284C7;
  --info-bg:    rgba(2, 132, 199, 0.08);

  /* Text */
  --text:       #0F172A;
  --text-muted: #64748B;
  --text-faint: #A8B6CC;

  /* Layout */
  --sidebar-w: 256px;
  --topbar-h:  60px;
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 15px;

  /* Shadows */
  --shadow-xs:   0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm:   0 2px 6px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.05);
  --shadow-md:   0 4px 20px rgba(15,23,42,0.10), 0 2px 4px rgba(15,23,42,0.06);
  --shadow-lg:   0 8px 32px rgba(15,23,42,0.13), 0 3px 8px rgba(15,23,42,0.07);
  --shadow-glow: 0 0 0 3px var(--accent-glow);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
  background: var(--bg-page);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, #1a3a8f 0%, #1e40af 60%, #1d4ed8 100%);
  border-right: none;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  box-shadow: 4px 0 24px rgba(30, 64, 175, 0.18);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1.25rem;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.sidebar-brand-icon {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.sidebar-brand-name {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar-brand-name span {
  color: rgba(147, 197, 253, 1);
}

.sidebar-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0.6rem 0.75rem 0.3rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.70);
  font-size: 0.875rem;
  font-weight: 400;
  margin-bottom: 1px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-item i {
  font-size: 0.875rem;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.nav-item.active {
  background: rgba(255,255,255,0.20);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #93c5fd;
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 0.5rem 0.25rem;
}

/* ── Sub-menu (Conversion Document) ── */
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.70);
  font-size: 0.875rem;
  font-weight: 400;
  margin-bottom: 1px;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
}
.nav-group-toggle i { font-size: 0.875rem; flex-shrink: 0; width: 16px; text-align: center; }
.nav-group-toggle .nav-caret { margin-left: auto; font-size: 0.7rem; transition: transform 0.2s; }
.nav-group-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-group-toggle.open { background: rgba(255,255,255,0.10); color: #fff; }
.nav-group-toggle.open .nav-caret { transform: rotate(90deg); }
.nav-group-toggle.has-active { color: #fff; font-weight: 600; }

.nav-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.nav-sub.open { max-height: 300px; }

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.75rem 0.42rem 2.2rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.60);
  font-size: 0.82rem;
  font-weight: 400;
  margin-bottom: 1px;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.nav-sub-item i { font-size: 0.8rem; flex-shrink: 0; width: 14px; text-align: center; }
.nav-sub-item:hover { background: rgba(255,255,255,0.10); color: #fff; }
.nav-sub-item.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #93c5fd; }

/* Sidebar footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
}

.sidebar-user:hover {
  background: rgba(255,255,255,0.10);
}


.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
}

/* ─── Main content ───────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.ai-badge {
  background: var(--accent-bg);
  color: var(--accent);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.18);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.content-area {
  padding: 1.75rem;
  flex: 1;
}

/* ─── Flash messages ─────────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-md);
  border: 1px solid;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.alert-success {
  background: var(--success-bg);
  border-color: rgba(22, 163, 74, 0.25);
  color: #15803D;
}

.alert-danger {
  background: var(--danger-bg);
  border-color: rgba(220, 38, 38, 0.25);
  color: #B91C1C;
}

.alert-warning {
  background: var(--warning-bg);
  border-color: rgba(217, 119, 6, 0.25);
  color: #92400E;
}

.btn-close {
  opacity: 0.5;
  margin-left: auto;
  padding: 0;
}

.btn-close:hover {
  opacity: 0.8;
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.card-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.25rem;
  color: var(--text);
}

.card.ai-panel {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.04), var(--shadow-xs);
}

/* ─── Stat Cards ─────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s, border-color 0.15s;
}

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

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.stat-icon-box.blue {
  background: var(--info-bg);
  color: var(--info);
}

.stat-icon-box.green {
  background: var(--success-bg);
  color: var(--success);
}

.stat-icon-box.red {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-icon-box.amber {
  background: var(--warning-bg);
  color: var(--warning);
}

.stat-icon-box.purple {
  background: var(--accent-bg);
  color: var(--accent);
}

/* Legacy (backward compat) */
.stat-icon {
  display: none;
}

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.2rem;
}

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table {
  color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--bg-hover);
  margin: 0;
}

.table thead th {
  background: var(--bg-elevated);
  border-color: var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.table td {
  border-color: var(--border);
  padding: 0.8rem 1rem;
  vertical-align: middle;
  font-size: 0.875rem;
}

.table-hover tbody tr {
  transition: background 0.1s;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
}

.btn-primary,
.btn-cyan {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2), 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover,
.btn-cyan:hover {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent-dim);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.btn-outline-cyan {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.btn-outline-cyan:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.btn-outline-danger {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.btn-outline-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

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

.btn-outline-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
}

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-control,
.form-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-xs);
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  color: var(--text);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-faint);
}

.form-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-text {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.form-check-input {
  background-color: var(--bg-surface);
  border-color: var(--border);
  width: 1rem;
  height: 1rem;
}

.form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.form-check-label {
  color: var(--text);
  font-size: 0.875rem;
}

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

/* ─── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28em 0.65em;
  border-radius: 99px;
  letter-spacing: 0.01em;
}

/* Catégories */
.cat-urgent {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.cat-commercial {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.cat-administratif {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
}

.cat-rh {
  background: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.cat-technique {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.cat-finance {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.cat-autre {
  background: #F8FAFC;
  color: #475569;
  border: 1px solid #E2E8F0;
}

/* Priorités */
.prio-haute {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.prio-normale {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.prio-basse {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* Sentiments */
.sent-positif {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.sent-neutre {
  background: #F8FAFC;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.sent-negatif {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

/* Statuts */
.status-sent {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.status-draft {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.status-completed {
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.status-pending {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* Bootstrap overrides */
.bg-success {
  background: #F0FDF4 !important;
  color: #15803D !important;
  border: 1px solid #BBF7D0;
}

.bg-danger {
  background: #FEF2F2 !important;
  color: #B91C1C !important;
  border: 1px solid #FECACA;
}

.bg-warning {
  background: #FFFBEB !important;
  color: #92400E !important;
  border: 1px solid #FDE68A;
}

/* ─── Dropdown ───────────────────────────────────────────────────────────────── */
.dropdown-menu,
.dropdown-menu-dark {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  min-width: 180px;
}

.dropdown-item {
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: background 0.1s, color 0.1s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.dropdown-item:focus {
  background: var(--bg-hover);
  color: var(--text);
}

.dropdown-item.text-danger {
  color: var(--danger) !important;
}

.dropdown-item.text-danger:hover {
  background: var(--danger-bg);
}

.dropdown-divider {
  border-color: var(--border);
  margin: 0.3rem 0;
}

/* Topbar bell btn */
.topbar .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-xs);
}

.topbar .dropdown-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.topbar .dropdown-toggle::after {
  display: none;
}

/* Sidebar user dropdown toggle */
.sidebar-footer .dropdown-toggle::after {
  display: none;
}

/* ─── AI Result Panel ────────────────────────────────────────────────────────── */
.ai-result {
  background: var(--accent-bg);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-md);
  padding: 1rem;
}

/* ─── Agent items ────────────────────────────────────────────────────────────── */
.agent-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.agent-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-xs);
}

/* ─── Empty State ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}

.empty-state-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.empty-state-desc {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ─── Action items ───────────────────────────────────────────────────────────── */
.action-item {
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.6rem 0.875rem;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.action-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ─── Provider cards (settings) ─────────────────────────────────────────────── */
.provider-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.provider-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-sm);
}

.provider-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--shadow-xs);
}

/* ─── Auth pages ─────────────────────────────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Panneau gauche — fond bleu */
.auth-left {
  flex: 1;
  background: linear-gradient(145deg, #1a3a8f 0%, #1e40af 50%, #2563eb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(96,165,250,0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(147,197,253,0.20) 0%, transparent 50%);
}

.auth-left-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  max-width: 360px;
}

.auth-left-icon {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin: 0 auto 1.5rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
}

.auth-left-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.auth-left-title span { color: #93c5fd; }

.auth-left-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
}

/* Panneau droit — formulaire blanc */
.auth-right {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  min-height: 100vh;
}

.auth-wrapper {
  width: 100%;
  max-width: 360px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.auth-logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.auth-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.auth-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.btn-auth {
  width: 100%;
  padding: 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  justify-content: center;
}

.auth-link {
  color: var(--accent);
  font-weight: 500;
}

/* Responsive : empiler sur mobile */
@media (max-width: 700px) {
  .auth-layout { flex-direction: column; }
  .auth-left   { padding: 2rem 1.5rem; min-height: 220px; }
  .auth-right  { width: 100%; padding: 2rem 1.5rem; }
}

.auth-link:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

/* ─── Prose ──────────────────────────────────────────────────────────────────── */
.prose {
  color: var(--text);
  line-height: 1.75;
  font-size: 0.9rem;
}

.prose h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.25rem;
}

.prose p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.25rem;
  color: var(--text-muted);
}

/* ─── Utilities ──────────────────────────────────────────────────────────────── */
.text-accent {
  color: var(--accent) !important;
}

.text-cyan {
  color: var(--accent) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-faint {
  color: var(--text-faint) !important;
}

.border-cyan {
  border-color: var(--accent) !important;
}

.fw-semibold {
  font-weight: 600;
}

.small {
  font-size: 0.8rem;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}