:root {
  --primary: #1d4ed8;
  --primary-600: color-mix(in srgb, var(--primary) 88%, black);
  --primary-50: color-mix(in srgb, var(--primary) 8%, white);
  --primary-100: color-mix(in srgb, var(--primary) 16%, white);
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --success: #15803d; --success-bg: #dcfce7;
  --warning: #b45309; --warning-bg: #fef3c7;
  --danger: #b91c1c; --danger-bg: #fee2e2;
  --info: #1d4ed8; --info-bg: #dbeafe;
  --neutral-bg: #f1f5f9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --sidebar-w: 248px;
  color-scheme: light;
}
[data-theme="dark"] {
  --primary-50: color-mix(in srgb, var(--primary) 18%, #0f172a);
  --primary-100: color-mix(in srgb, var(--primary) 30%, #0f172a);
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #16213a;
  --border: #24314d;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --success: #4ade80; --success-bg: #0f2e1d;
  --warning: #fbbf24; --warning-bg: #33260a;
  --danger: #f87171; --danger-bg: #3a1414;
  --info: #93c5fd; --info-bg: #13254a;
  --neutral-bg: #1c2742;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
[data-theme="dark"] a, [data-theme="dark"] .nav a.active, [data-theme="dark"] .tabs button.active { color: color-mix(in srgb, var(--primary) 50%, white); }
[data-theme="dark"] .tabs button.active { border-bottom-color: color-mix(in srgb, var(--primary) 50%, white); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
code, pre { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; overflow: auto; white-space: pre-wrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.mono { font-family: Consolas, monospace; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); min-height: 64px; }
.sidebar .brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; }
.sidebar .brand .logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.sidebar .brand .t1 { font-weight: 700; font-size: 15px; line-height: 1.2; }
.sidebar .brand .t2 { font-size: 11.5px; color: var(--muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 4px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-50); color: var(--primary); }
.nav a .ico { width: 20px; text-align: center; flex: none; }
.nav a .cnt { margin-left: auto; background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 30; }
.topbar .title { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .burger { display: none; }
.content { padding: 20px; max-width: 1400px; width: 100%; margin: 0 auto; }
.banner { padding: 9px 20px; font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.warn { background: var(--warning-bg); color: var(--warning); }
.banner.danger { background: var(--danger-bg); color: var(--danger); }
.banner.info { background: var(--info-bg); color: var(--info); }
.banner.imp { background: #7c3aed; color: #fff; }
.banner .btn { padding: 3px 10px; }

.user-menu { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; cursor: pointer; border: none; }
.dropdown { position: absolute; right: 0; top: 44px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); min-width: 240px; padding: 6px; z-index: 60; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: none; font: inherit; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .head { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

.icon-btn { position: relative; background: none; border: 1px solid transparent; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; color: var(--text); font-size: 17px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 3px; right: 2px; background: var(--danger); color: #fff; font-size: 10px; border-radius: 9px; padding: 0 5px; line-height: 16px; }
.notif-panel { position: absolute; right: 0; top: 44px; width: 380px; max-width: calc(100vw - 24px); max-height: 70vh; overflow: auto; }
.notif { padding: 10px; border-radius: 8px; cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--primary-50); }
.notif .nt { font-weight: 600; font-size: 13px; }
.notif .nb { font-size: 12px; color: var(--muted); white-space: pre-line; max-height: 54px; overflow: hidden; }

/* ---------- Composants ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; flex: 1; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; flex: 1; min-width: 200px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi .k { color: var(--muted); font-size: 12.5px; }
.kpi .v { font-size: 26px; font-weight: 700; margin-top: 2px; }
.kpi .s { font-size: 12px; color: var(--muted); }
.kpi.link { cursor: pointer; } .kpi.link:hover { border-color: var(--primary); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 7px 13px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-600); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 3px 9px; font-size: 12.5px; }
.btn.danger-text { color: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
[data-theme="dark"] .btn.success, [data-theme="dark"] .btn.danger { color: #0b1220; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--muted); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.primary { background: var(--primary-100); color: var(--primary); }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: 13.5px; }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.warning { background: var(--warning-bg); color: var(--warning); }
.alert.danger { background: var(--danger-bg); color: var(--danger); }
.alert.success { background: var(--success-bg); color: var(--success); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.tbl th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl td.actions { white-space: nowrap; text-align: right; }
.tbl input, .tbl select { padding: 4px 6px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; }
.field { grid-column: span 12; display: flex; flex-direction: column; gap: 4px; }
.field.c6 { grid-column: span 6; } .field.c4 { grid-column: span 4; } .field.c3 { grid-column: span 3; } .field.c8 { grid-column: span 8; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .req { color: var(--danger); }
.field .help { font-size: 11.5px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-100); border-color: var(--primary); }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=color] { padding: 2px; height: 38px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text) !important; font-size: 14px !important; cursor: pointer; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; }
.toolbar input[type=checkbox] { min-width: 0; }
.toolbar .search { min-width: 220px; flex: 1; max-width: 340px; }

/* ---------- Modale ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.modal.lg { max-width: 920px; } .modal.xl { max-width: 1180px; } .modal.sm { max-width: 440px; }
.modal-h { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); gap: 10px; }
.modal-h h3 { margin: 0; flex: 1; font-size: 16px; }
.modal-b { padding: 18px; overflow-y: auto; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.toasts { position: fixed; bottom: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 420px; animation: slidein .2s; font-size: 13.5px; }
.toast.error { background: #b91c1c; } .toast.success { background: #15803d; }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: none; padding: 10px 14px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

.progress { height: 8px; background: var(--neutral-bg); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--success); border-radius: 6px; }
.progress.warn > div { background: #f59e0b; } .progress.danger > div { background: #dc2626; }

.list-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.pcard .t { font-weight: 600; font-size: 15px; }
.pcard .d { color: var(--muted); font-size: 13px; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal .dh { background: var(--surface-2); padding: 6px; font-size: 12px; font-weight: 600; text-align: center; color: var(--muted); }
.cal .day { background: var(--surface); min-height: 96px; padding: 4px; font-size: 12px; }
.cal .day.other { background: var(--surface-2); color: var(--muted); }
.cal .day.today .n { background: var(--primary); color: #fff; border-radius: 50%; }
.cal .n { display: inline-grid; place-items: center; width: 22px; height: 22px; font-weight: 600; }
.cal .ev { display: block; margin-top: 2px; padding: 2px 4px; border-radius: 4px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; background: var(--primary-100); color: var(--primary); }
.cal .ev.pending { background: var(--warning-bg); color: var(--warning); }
.cal .ev.done { background: var(--success-bg); color: var(--success); }
.cal .ev.missed, .cal .ev.rejected { background: var(--danger-bg); color: var(--danger); }

.steps { display: flex; gap: 0; align-items: center; flex-wrap: wrap; font-size: 12px; }
.steps .st { padding: 4px 10px; border-radius: 20px; background: var(--neutral-bg); color: var(--muted); }
.steps .st.on { background: var(--success-bg); color: var(--success); font-weight: 600; }
.steps .st.cur { background: var(--primary); color: #fff; font-weight: 600; }
.steps .sep { width: 14px; height: 2px; background: var(--border); }

.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-line; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Connexion ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { background: linear-gradient(135deg, #0b3a8c, #1d4ed8 55%, #0891b2); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero h1 { font-size: 34px; margin-top: 30px; }
.login-hero p { opacity: .9; font-size: 15px; max-width: 520px; }
.login-hero ul { padding-left: 18px; opacity: .92; line-height: 1.9; }
.login-box { display: flex; align-items: center; justify-content: center; padding: 30px; background: var(--surface); }
.login-box form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch button { border: none; background: var(--surface); padding: 6px 12px; cursor: pointer; font: inherit; font-weight: 600; color: var(--muted); }
.lang-switch button.on { background: var(--primary); color: #fff; }

.sim-canvas { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; display: block; }
.prose { line-height: 1.7; }
.prose h2 { margin-top: 1.4em; } .prose h3 { margin-top: 1.2em; }
.prose table { border-collapse: collapse; margin: 10px 0; }
.prose td, .prose th { border: 1px solid var(--border); padding: 6px 10px; }
.prose ul, .prose ol { padding-left: 22px; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 35; display: none; }

/* ---------- Console SaaS Admin (super admin), style adminsoins ---------- */
.saas { --primary: #1A4E8F; --saas-blue: #1A4E8F; --saas-green: #2E8B6E; --saas-light: #EAF1FB; --sidebar-w: 220px; }
[data-theme="dark"] .saas { --saas-light: #16284a; }
.saas .sidebar { background: var(--saas-blue); border-right: none; color: #fff; }
.saas .sidebar .brand { border-bottom: 1px solid rgba(255,255,255,.12); padding: 20px 16px; }
.saas .sidebar .brand .t1 { color: #fff; font-size: 16px; }
.saas .sidebar .brand .t2 { color: rgba(255,255,255,.6); font-size: 12px; }
.saas .nav { padding: 6px 0 12px; }
.saas .nav .sec { color: rgba(255,255,255,.45); padding: 14px 16px 4px; }
.saas .nav a { color: rgba(255,255,255,.82); border-radius: 0; padding: 10px 16px; font-size: 13.5px; font-weight: 500; gap: 10px; }
.saas .nav a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.saas .nav a.active, [data-theme="dark"] .saas .nav a.active { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.saas .nav a .ico { font-size: 15px; }
.saas .nav a .cnt { background: #f8a5a5; color: #6b0f0f; }
.saas .side-foot { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 16px; }
.saas .side-foot .who { color: rgba(255,255,255,.75); font-size: 12.5px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saas .side-foot a, .saas .side-foot button { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); padding: 5px 0; font-size: 13px; background: none; border: none; font: inherit; cursor: pointer; width: 100%; text-align: left; }
.saas .side-foot a:hover, .saas .side-foot button:hover { color: #fff; text-decoration: none; }
.saas .side-foot .logout { color: #f8a5a5; }
.saas .topbar { height: 54px; }
.saas .topbar .title { color: var(--saas-blue); font-size: 14.5px; }
[data-theme="dark"] .saas .topbar .title, [data-theme="dark"] .saas .page-head h1 { color: #9ec5f4; }
.saas .topbar .clock { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.saas .page-head h1 { color: var(--saas-blue); font-size: 22px; display: flex; align-items: center; gap: 10px; }
.saas .tbl th { background: var(--saas-light); color: var(--saas-blue); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
[data-theme="dark"] .saas .tbl th { color: #9ec5f4; }
.saas .tbl tr.click { cursor: pointer; }
.saas .kpi { text-align: center; border-radius: 10px; }
.saas .kpi .v { font-size: 28px; color: var(--saas-blue); }
[data-theme="dark"] .saas .kpi .v { color: #9ec5f4; }
.saas .kpi .v.ok { color: #198754; } .saas .kpi .v.warn { color: #d39e00; } .saas .kpi .v.mute { color: #6c757d; } .saas .kpi .v.bad { color: #dc3545; }
.saas .card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill { border: 1px solid currentColor; background: transparent; border-radius: 6px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; font-weight: 500; }
.pill.c-primary { color: #1A4E8F; } .pill.c-success { color: #198754; } .pill.c-warning { color: #b8860b; } .pill.c-secondary { color: #6c757d; } .pill.c-danger { color: #dc3545; } .pill.c-info { color: #0aa2c0; }
.pill.on.c-primary { background: #1A4E8F; color: #fff; border-color: #1A4E8F; } .pill.on.c-success { background: #198754; color: #fff; border-color: #198754; }
.pill.on.c-warning { background: #ffc107; color: #3d2c00; border-color: #ffc107; } .pill.on.c-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.pill.on.c-danger { background: #dc3545; color: #fff; border-color: #dc3545; } .pill.on.c-info { background: #0dcaf0; color: #053742; border-color: #0dcaf0; }
.sbadge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700; color: #fff; }
.sbadge.s-active { background: #198754; } .sbadge.s-demo { background: #ffc107; color: #3d2c00; } .sbadge.s-suspended { background: #6c757d; }
.sbadge.s-terminated, .sbadge.s-expired { background: #dc3545; } .sbadge.s-nouvelle { background: #dc3545; } .sbadge.s-contactee { background: #ffc107; color: #3d2c00; }
.sbadge.s-convertie, .sbadge.s-reussi { background: #198754; } .sbadge.s-sans_suite { background: #6c757d; } .sbadge.s-en_attente { background: #ffc107; color: #3d2c00; } .sbadge.s-echoue { background: #dc3545; }
.alert-link { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.alert-link i { font-size: 22px; }
.actions-grid { display: grid; gap: 8px; }
.actions-grid .btn { justify-content: center; }
.btn.outline-primary { color: #1A4E8F; border-color: #1A4E8F; } .btn.outline-warning { color: #b8860b; border-color: #e0a800; } .btn.outline-danger { color: #dc3545; border-color: #dc3545; }
.btn.outline-primary:hover { background: #1A4E8F; color: #fff; } .btn.outline-warning:hover { background: #ffc107; color: #3d2c00; } .btn.outline-danger:hover { background: #dc3545; color: #fff; }
.feat-list .check { align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--border); }
.feat-list .check small { display: block; color: var(--muted); font-weight: 400; }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; width: 38px; height: 21px; border-radius: 12px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; flex: none; padding: 0; border: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: #1A4E8F; } .switch input:checked::after { left: 19px; }
.demo-page { min-height: 100vh; background: linear-gradient(160deg, #0b3a8c 0%, #1A4E8F 45%, #2E8B6E 100%); padding: 30px 16px; }
.demo-page .box { max-width: 880px; margin: auto; background: var(--surface); border-radius: 14px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar.open ~ .overlay { display: block; }
  .main { margin-left: 0; }
  .topbar .burger { display: grid; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .field.c6, .field.c4, .field.c3, .field.c8 { grid-column: span 12; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .content { padding: 14px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: minmax(0, 1fr); } .notif-panel { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; } }
@media print { .sidebar, .topbar, .banner, .no-print { display: none !important; } .main { margin: 0; } }
