:root {
  --scr-navy: #0f2a44;
  --scr-navy-2: #16395c;
  --scr-accent: #c8a24a;
  --scr-bg: #f4f6f9;
  --scr-border: #dde3ea;
}
body { background: var(--scr-bg); font-size: .92rem; }
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 270px; flex: 0 0 270px; background: var(--scr-navy); color: #cfd8e3;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; gap: .7rem; align-items: center; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .logo { width: 42px; height: 42px; border-radius: 8px; background: var(--scr-accent); color: var(--scr-navy); font-weight: 800; display: grid; place-items: center; letter-spacing: .5px; }
.sidebar .t1 { color: #fff; font-weight: 600; }
.sidebar .t2 { font-size: .75rem; opacity: .7; }
.sidebar .nav-section { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; opacity: .55; padding: 1rem 1rem .3rem; }
.sidebar .nav-link { color: #cfd8e3; padding: .38rem 1rem; display: flex; gap: .6rem; align-items: center; border-left: 3px solid transparent; font-size: .86rem; }
.sidebar .nav-link:hover { background: var(--scr-navy-2); color: #fff; }
.sidebar .nav-link.active { background: var(--scr-navy-2); color: #fff; border-left-color: var(--scr-accent); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--scr-border); padding: .7rem 1.3rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.content { padding: 1.3rem; flex: 1; }
.footer { padding: .8rem 1.3rem; border-top: 1px solid var(--scr-border); background: #fff; }
.content-login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--scr-navy), #24527f); }
.card { border-color: var(--scr-border); }
.card-header { background: #fff; font-weight: 600; }
.kpi { border-left: 4px solid var(--scr-navy); }
.kpi .v { font-size: 1.6rem; font-weight: 700; color: var(--scr-navy); }
.table thead th { background: #eef2f6; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; color: #4a5a6b; white-space: nowrap; }
.table td { vertical-align: middle; }
.btn-primary { background: var(--scr-navy); border-color: var(--scr-navy); }
.btn-primary:hover { background: var(--scr-navy-2); border-color: var(--scr-navy-2); }

/* Formulaires SCR */
.scr-node { border: 1px solid var(--scr-border); border-radius: 8px; padding: .6rem .9rem .8rem; margin: .7rem 0; background: #fff; }
.scr-node.depth-2 { background: #fbfcfd; }
.scr-node.depth-3 { background: #f7f9fb; }
.scr-node.depth-4 { background: #f3f6f9; }
.scr-legend { float: none; width: auto; font-size: .95rem; font-weight: 600; margin-bottom: .4rem; padding: 0; color: var(--scr-navy); }
.scr-legend .tag { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: #7a8796; font-weight: 400; }
.scr-item { border-top: 1px dashed var(--scr-border); padding-top: .5rem; margin-top: .5rem; }
.scr-items > .scr-item:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.scr-hidden { display: none !important; }
.form-label code { font-size: .7rem; }
.is-warning { border-color: #e0a800 !important; background: #fffaf0; }
.scr-ac { position: absolute; z-index: 1000; background: #fff; border: 1px solid var(--scr-border); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; min-width: 320px; }
.scr-ac div { padding: .3rem .6rem; cursor: pointer; font-size: .82rem; }
.scr-ac div:hover, .scr-ac div.on { background: #eef4fb; }
.scr-ac b { font-family: ui-monospace, Menlo, Consolas, monospace; margin-right: .4rem; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244,246,249,.95); padding: .7rem 0; border-top: 1px solid var(--scr-border); z-index: 10; }
pre.xml { background: #0f1b28; color: #d6e2ee; padding: 1rem; border-radius: 8px; max-height: 520px; overflow: auto; font-size: .78rem; }
.issue-E { color: #b02a37; }
.issue-A { color: #997404; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

@media (max-width: 991px) {
  .sidebar { position: fixed; left: -280px; z-index: 50; transition: left .2s; }
  .sidebar.open { left: 0; }
}
@media print {
  .sidebar, .topbar, .footer, .no-print { display: none !important; }
}
