﻿    :root {
      /* Palette Lotus V5 â€” vert foncÃ© rgb(30, 78, 10) */
      --brand: #1e4e0a;
      --bg: #d8e4d4;
      --surface: #f4f8f2;
      --surface-2: #ccd9c8;
      --border: #94ae90;
      --text: #1a1714;
      --text-muted: #4a5648;
      --accent: #1e4e0a;
      --accent-mid: #255f0f;
      --accent-hover: #173d08;
      --accent-light: #9eb898;
      --accent-soft: #c5d4c0;
      --accent-dark: #142f06;
      --green: #1e4e0a;
      --green-bg: #c0d0bc;
      --red: #c03030;
      --red-bg: #fde8e8;
      --orange: #c96a10;
      --orange-bg: #ffecd6;
      --blue: #1a4535;
      --blue-bg: #b8d0c6;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
      --shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
      --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
      --radius: 12px;
      --radius-sm: 8px;
      --radius-lg: 18px;
      --sidebar-w: 280px;
      --sidebar-bg: color-mix(in srgb, var(--green-bg) 92%, var(--surface));
      --sidebar-bg-hover: color-mix(in srgb, var(--accent) 16%, var(--green-bg));
      --sidebar-border: color-mix(in srgb, var(--accent) 42%, var(--border));
      --font-display: 'Outfit', sans-serif;
      --font-body: 'Plus Jakarta Sans', sans-serif;
    }
    .dark {
      --brand: #1e4e0a;
      --bg: #0a0e09;
      --surface: #121810;
      --surface-2: #182016;
      --border: #243022;
      --text: #f0ece6;
      --text-muted: #8a9688;
      --accent: #2f7020;
      --accent-mid: #255f0f;
      --accent-hover: #3a8528;
      --accent-light: #152010;
      --accent-soft: #1a2814;
      --accent-dark: #5a9a48;
      --green: #3d8a2c;
      --green-bg: #101a0c;
      --red: #e06060;
      --red-bg: #2a1010;
      --orange: #e08830;
      --orange-bg: #2a1c08;
      --blue: #5ecf9a;
      --blue-bg: #0f2418;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
      --shadow: 0 4px 16px rgba(0,0,0,0.4);
      --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
      --sidebar-bg: color-mix(in srgb, var(--green-bg) 62%, var(--surface));
      --sidebar-bg-hover: color-mix(in srgb, var(--green-bg) 78%, var(--surface-2));
      --sidebar-border: color-mix(in srgb, var(--accent) 32%, var(--border));
    }

    /* ThÃ¨me clair â€” verts profonds (alignÃ©s sur la palette sombre) */
    html:not(.dark) body {
      background:
        radial-gradient(ellipse 110% 70% at 0% -8%, color-mix(in srgb, var(--green-bg) 85%, transparent), transparent 52%),
        radial-gradient(ellipse 85% 55% at 100% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 48%),
        var(--bg);
    }
    html:not(.dark) .sidebar {
      background: linear-gradient(
        175deg,
        color-mix(in srgb, var(--green-bg) 92%, var(--surface)) 0%,
        color-mix(in srgb, var(--brand) 8%, var(--surface-2)) 100%
      );
      box-shadow: inset -1px 0 0 color-mix(in srgb, var(--brand) 28%, var(--border));
    }
    html:not(.dark) .sidebar-logo--lgi {
      background: #fff;
      border-bottom-color: color-mix(in srgb, var(--brand) 22%, var(--border));
    }
    html:not(.dark) .nav-subitem.active,
    html:not(.dark) .nav-item.active {
      background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 14%, var(--green-bg)), var(--accent-soft));
      color: var(--brand);
      box-shadow: inset 3px 0 0 var(--brand);
    }
    html:not(.dark) .nav-item-highlight {
      background: var(--brand);
      color: #fff;
      font-weight: 600;
      border: 1px solid var(--brand);
      box-shadow: 0 2px 10px color-mix(in srgb, var(--brand) 35%, transparent);
    }
    html:not(.dark) .nav-item-highlight:hover {
      background: var(--accent-hover);
      border-color: var(--accent-hover);
      color: #fff;
    }
    html:not(.dark) .topbar {
      background: linear-gradient(90deg, color-mix(in srgb, var(--green-bg) 75%, var(--surface)) 0%, var(--surface) 58%);
      border-bottom-color: color-mix(in srgb, var(--brand) 32%, var(--border));
    }
    html:not(.dark) .page-header h1 .accent {
      color: var(--brand);
    }
    html:not(.dark) .accent-bar {
      width: 52px;
      height: 4px;
      background: linear-gradient(90deg, var(--brand), var(--accent-mid), var(--accent-dark));
    }
    html:not(.dark) .card:not(.card-section) {
      position: relative;
      overflow: hidden;
      border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
      background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--green-bg) 55%, var(--surface)) 0%,
        var(--surface) 72px
      );
      box-shadow: 0 2px 10px color-mix(in srgb, var(--brand) 14%, transparent), var(--shadow-sm);
    }
    html:not(.dark) .card:not(.card-section)::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--brand), var(--accent-mid), var(--accent-dark));
      opacity: 0.9;
    }
    html:not(.dark) .card:not(.card-section) .card-header {
      margin: -20px -20px 16px;
      padding: 14px 20px;
      background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--green-bg) 88%, var(--surface)) 0%,
        color-mix(in srgb, var(--brand) 6%, var(--surface)) 100%
      );
      border-bottom: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
    }
    html:not(.dark) .card:not(.card-section) .card-title {
      color: var(--brand);
    }
    html:not(.dark) thead th {
      background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--green-bg) 90%, var(--accent-soft)) 0%,
        color-mix(in srgb, var(--brand) 10%, var(--surface-2)) 100%
      );
      color: var(--brand);
      border-bottom-color: color-mix(in srgb, var(--accent) 30%, var(--border));
    }
    html:not(.dark) tbody tr:nth-child(even) td {
      background: color-mix(in srgb, var(--green-bg) 35%, var(--surface));
    }
    html:not(.dark) tbody tr:hover td {
      background: color-mix(in srgb, var(--accent-soft) 65%, var(--surface)) !important;
    }
    html:not(.dark) tfoot td {
      background: color-mix(in srgb, var(--green-bg) 70%, var(--surface-2));
    }
    html:not(.dark) input,
    html:not(.dark) select,
    html:not(.dark) textarea {
      background: color-mix(in srgb, var(--surface) 55%, var(--green-bg));
      border-color: color-mix(in srgb, var(--accent) 16%, var(--border));
    }
    html:not(.dark) .stat-card:not([class*="tone-"]) {
      background: linear-gradient(145deg, color-mix(in srgb, var(--green-bg) 80%, var(--surface)), var(--surface));
      border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    }
    html:not(.dark) .kpi-card {
      border-color: color-mix(in srgb, var(--brand) 28%, var(--border));
      background: linear-gradient(160deg, color-mix(in srgb, var(--green-bg) 50%, var(--surface)) 0%, var(--surface) 100%);
    }
    html:not(.dark) .badge.green { border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); }
    html:not(.dark) .badge.red { border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }
    html:not(.dark) .badge.orange { border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent); }
    html:not(.dark) .badge.blue { border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); }
    html:not(.dark) .badge.gold { border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
    html:not(.dark) .subnav-bar {
      background: linear-gradient(135deg, color-mix(in srgb, var(--green-bg) 82%, var(--surface)) 0%, color-mix(in srgb, var(--brand) 8%, var(--surface)) 100%);
      border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
      border-left-color: var(--brand);
    }
    html:not(.dark) .btn.secondary,
    html:not(.dark) a.btn.secondary {
      background: color-mix(in srgb, var(--green-bg) 55%, var(--surface));
      border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
    }
    html:not(.dark) .topbar-user {
      background: color-mix(in srgb, var(--green-bg) 60%, var(--surface));
      border-color: color-mix(in srgb, var(--brand) 28%, var(--border));
    }
    html:not(.dark) .topbar-user-avatar {
      background: linear-gradient(145deg, var(--accent-soft), var(--green-bg));
      color: var(--brand);
    }
    html:not(.dark) .alert.success { border: 1px solid color-mix(in srgb, var(--green) 28%, transparent); }
    html:not(.dark) .alert.error { border: 1px solid color-mix(in srgb, var(--red) 28%, transparent); }
    html:not(.dark) .alert.warning { border: 1px solid color-mix(in srgb, var(--orange) 28%, transparent); }
    html:not(.dark) .alert.info { border: 1px solid color-mix(in srgb, var(--blue) 28%, transparent); }

    /* Garde tout ton CSS existant ici... */
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; }
    body { font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
    
    /* Scrollbar */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

    /* Layout */
    .layout { display: flex; height: 100vh; overflow: hidden; }

    /* Sidebar avec menus dÃ©roulants */
    .sidebar {
      width: var(--sidebar-w);
      min-width: var(--sidebar-w);
      background: var(--sidebar-bg);
      border-right: 1px solid var(--sidebar-border);
      display: flex;
      flex-direction: column;
      height: 100vh;
      overflow: hidden;
      transition: width 0.25s ease, min-width 0.25s ease;
      z-index: 30;
    }
    .sidebar.collapsed { width: 64px; min-width: 64px; }
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .nav-section-label,
    .sidebar.collapsed .dropdown-icon { display: none; }

    .sidebar-logo {
      padding: 20px 18px;
      border-bottom: 1px solid var(--sidebar-border);
      background: color-mix(in srgb, var(--accent) 18%, var(--green-bg));
      display: flex;
      align-items: center;
      gap: 12px;
      flex-shrink: 0;
    }
    .sidebar-logo-icon {
      width: 36px; height: 36px;
      background: var(--accent);
      border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .sidebar-logo-icon svg { width: 18px; height: 18px; color: #fff; stroke: #fff; }
    .sidebar-logo-text { overflow: hidden; }
    .sidebar-logo-text h1 { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; }
    .sidebar-logo-text p { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
    .sidebar-logo--lgi {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 12px 14px;
      background: #fff;
      gap: 8px;
    }
    html:not(.dark) .sidebar-logo--lgi {
      border-bottom-color: color-mix(in srgb, var(--brand) 18%, var(--border));
    }
    .lgi-brand-logo {
      display: block;
      max-width: 100%;
      height: auto;
      object-fit: contain;
    }
    .lgi-brand-logo--sidebar {
      max-height: 96px;
      margin: 0 auto;
    }
    .sidebar.collapsed .sidebar-logo--lgi { padding: 8px 6px; }
    .sidebar.collapsed .lgi-brand-logo--sidebar {
      max-height: 48px;
      max-width: 48px;
      object-fit: cover;
      object-position: center top;
    }

    .sidebar-nav {
      flex: 1;
      overflow-y: auto;
      padding: 12px 10px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .sidebar-nav::-webkit-scrollbar-thumb {
      background: color-mix(in srgb, var(--accent) 35%, var(--border));
    }
    .nav-role-context {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--accent);
      padding: 4px 12px 12px;
      margin: -2px 0 4px;
      border-bottom: 1px solid var(--sidebar-border);
      line-height: 1.35;
    }
    .nav-section-label {
      padding: 16px 12px 6px;
      font-size: 10.5px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: color-mix(in srgb, var(--accent) 72%, var(--text-muted));
      opacity: 0.95;
    }
    .sidebar.collapsed .nav-role-context { display: none; }
    
    /* Menu section */
    .nav-section {
      margin-bottom: 4px;
    }
    .nav-section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 9px 12px;
      border: none;
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text-muted);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      cursor: pointer;
      transition: background 0.15s;
      text-align: left;
    }
    .nav-section-header-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
      flex: 1;
    }
    .nav-section-icon {
      display: flex;
      align-items: center;
      flex-shrink: 0;
      color: var(--accent);
      opacity: 0.92;
    }
    .nav-section-title {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .nav-section-header:hover {
      background: var(--sidebar-bg-hover);
      color: var(--accent);
    }
    .nav-section-header .nav-section-icon .nav-ico {
      width: 18px;
      height: 18px;
      flex-shrink: 0;
    }
    .nav-section-header .dropdown-icon {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      transition: transform 0.2s;
    }
    .nav-section.open .nav-section-header .dropdown-icon { transform: rotate(90deg); }
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .nav-section-header .dropdown-icon { display: none !important; }
    .sidebar.collapsed .nav-submenu { display: none !important; }
    .sidebar.collapsed .nav-section-header {
      justify-content: center;
      padding: 9px 8px;
    }
    .sidebar.collapsed .nav-section-header-left {
      flex: 0;
      justify-content: center;
    }
    
    .nav-submenu {
      padding-left: 16px;
      margin-top: 4px;
      display: none;
    }
    .nav-section.open .nav-submenu { display: block; }
    
    .nav-subitem {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      text-decoration: none;
      font-size: 13px;
      font-weight: 500;
      transition: background 0.15s, color 0.15s;
    }
    .nav-subitem:hover {
      background: var(--sidebar-bg-hover);
      color: var(--accent);
    }
    .nav-subitem.active {
      background: color-mix(in srgb, var(--accent-light) 85%, var(--green-bg));
      color: var(--accent);
      border-left: 3px solid var(--accent);
      padding-left: 9px;
    }
    .nav-subitem .nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.9; }
    .nav-subitem .nav-label { flex: 1; min-width: 0; }
    .nav-count-pill {
      flex-shrink: 0;
      font-size: 11px;
      font-weight: 700;
      min-width: 20px;
      height: 20px;
      padding: 0 7px;
      border-radius: 99px;
      background: var(--red);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

    .sidebar-footer {
      border-top: 1px solid var(--sidebar-border);
      padding: 12px 10px;
      flex-shrink: 0;
      background: color-mix(in srgb, var(--accent) 12%, var(--green-bg));
    }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      text-decoration: none;
      font-size: 13.5px;
      font-weight: 500;
      transition: background 0.15s, color 0.15s;
    }

    .suggestions-box {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  min-width: 250px;
  box-shadow: var(--shadow);
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.suggestion-item:hover {
  background: var(--accent-light);
}

.suggestion-code {
  font-weight: bold;
  color: var(--accent);
}

.suggestion-name {
  color: var(--text);
}
    .nav-item:hover {
      background: var(--sidebar-bg-hover);
      color: var(--accent);
    }
    .nav-item.active {
      background: color-mix(in srgb, var(--accent-light) 85%, var(--green-bg));
      color: var(--accent);
      border-left: 3px solid var(--accent);
      padding-left: 9px;
    }
    .nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

    /* Garde le reste de ton CSS existant... */
    .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
    .topbar {
      height: 58px; min-height: 58px; background: var(--surface);
      border-bottom: 1px solid color-mix(in srgb, var(--accent) 14%, var(--border));
      display: flex; align-items: center; justify-content: space-between; padding: 0 24px; gap: 16px; flex-shrink: 0;
    }
    .topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .topbar-crumb { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar-crumb strong { color: var(--text); font-weight: 600; }
    .topbar-right { display: flex; align-items: center; gap: 8px; }
    .topbar-notif-wrap { position: relative; flex-shrink: 0; }
    .topbar-notif-trigger { position: relative; }
    .topbar-notif-badge {
      position: absolute;
      top: -2px;
      right: -2px;
      min-width: 18px;
      height: 18px;
      padding: 0 5px;
      border-radius: 99px;
      background: var(--red);
      color: #fff;
      font-size: 10px;
      font-weight: 700;
      line-height: 18px;
      text-align: center;
      box-shadow: 0 0 0 2px var(--surface);
    }
    .topbar-notif-panel {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      width: min(380px, calc(100vw - 32px));
      max-height: min(420px, 70vh);
      display: flex;
      flex-direction: column;
      background: var(--surface);
      border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--border));
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      z-index: 200;
      overflow: hidden;
    }
    .topbar-notif-panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
      background: color-mix(in srgb, var(--accent-light) 35%, var(--surface));
    }
    .topbar-notif-panel-title {
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 14px;
      color: var(--text);
    }
    .topbar-notif-panel-count {
      font-size: 11px;
      font-weight: 600;
      color: var(--text-muted);
      white-space: nowrap;
    }
    .topbar-notif-panel-body {
      overflow-y: auto;
      flex: 1;
      min-height: 0;
    }
    .topbar-notif-item {
      display: flex;
      gap: 10px;
      padding: 10px 14px;
      text-decoration: none;
      color: inherit;
      border-bottom: 1px solid var(--border);
      transition: background 0.12s;
    }
    .topbar-notif-item:hover {
      background: color-mix(in srgb, var(--accent-light) 45%, var(--surface-2));
    }
    .topbar-notif-ico { flex-shrink: 0; font-size: 16px; line-height: 1.35; padding-top: 2px; }
    .topbar-notif-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
    .topbar-notif-titre { font-size: 13px; font-weight: 600; color: var(--text); }
    .topbar-notif-msg { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
    .topbar-notif-empty { padding: 16px 14px; margin: 0; font-size: 13px; }
    .topbar-notif-panel-foot {
      padding: 10px 14px;
      border-top: 1px solid var(--border);
      background: var(--surface-2);
    }
    .topbar-notif-see-all {
      display: block;
      text-align: center;
      font-size: 13px;
      font-weight: 600;
      color: var(--accent);
      text-decoration: none;
    }
    .topbar-notif-see-all:hover { text-decoration: underline; }
    .icon-btn {
      width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface);
      border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
      cursor: pointer; color: var(--text-muted); transition: all 0.15s;
    }
    .icon-btn:hover {
      background: color-mix(in srgb, var(--accent-light) 40%, var(--surface-2));
      color: var(--accent);
      border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    }
    /* SVG dans la topbar : pas de x-show sur <svg> (Alpine peut laisser display:none / rendu vide) */
    .icon-btn > svg {
      display: block;
      flex-shrink: 0;
      width: 18px;
      height: 18px;
      overflow: visible;
      color: inherit;
      stroke: currentColor;
      fill: none;
      pointer-events: none;
    }
    .topbar-notif-trigger > svg {
      width: 18px;
      height: 18px;
    }
    html:not(.dark) .icon-btn-theme .icon-btn-theme-dark {
      display: none !important;
    }
    html.dark .icon-btn-theme .icon-btn-theme-light {
      display: none !important;
    }
    .page-content { flex: 1; overflow-y: auto; padding: 24px 28px; }
    .page-header { margin-bottom: 24px; }
    .page-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; }
    .page-header p { color: var(--text-muted); margin-top: 4px; font-size: 13.5px; }
    .page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
    .card {
      background: var(--surface);
      border: 1px solid color-mix(in srgb, var(--accent) 9%, var(--border));
      border-radius: var(--radius);
      padding: 20px;
      box-shadow: var(--shadow-sm);
    }
    .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
    .card-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
    .badge {
      display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px;
      font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
    }
    .badge.green { background: var(--green-bg); color: var(--green); }
    .badge.red { background: var(--red-bg); color: var(--red); }
    .badge.orange { background: var(--orange-bg); color: var(--orange); }
    .badge.blue { background: var(--blue-bg); color: var(--blue); }
    .badge.gold { background: var(--accent-light); color: var(--accent); }
    .badge.neutral { background: var(--surface-2); color: var(--text-muted); }
    .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
    @media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-5 { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 800px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }
    .table-wrap { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; }
    thead th {
      padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 600;
      text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted);
      background: color-mix(in srgb, var(--accent-light) 42%, var(--surface-2));
      border-bottom: 1px solid color-mix(in srgb, var(--accent) 12%, var(--border));
    }
    tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
    tbody tr:hover td {
      background: color-mix(in srgb, var(--accent-light) 35%, var(--surface));
    }
    label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
    input, select, textarea {
      width: 100%; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-body); font-size: 13.5px; outline: none;
    }
    input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
    button, .btn {
      display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm);
      font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; border: none;
      transition: opacity 0.15s, transform 0.1s;
    }
    button[type="submit"], button.primary { background: var(--accent); color: #fff; }
    button.secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
    button.danger { background: var(--red-bg); border: 1px solid var(--red); color: var(--red); }
    button.success { background: var(--green-bg); border: 1px solid var(--green); color: var(--green); }
    form.inline { display: inline; }
    .form-grid { display: grid; gap: 14px; }
    .form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    @media (max-width: 700px) { .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; } }
    .flash-container { position: fixed; top: 70px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
    .flash-msg { padding: 12px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; box-shadow: var(--shadow); animation: slideInRight 0.3s ease; }
    .flash-msg.alert.success { border-left: 4px solid var(--accent); }
    .flash-msg.alert.info { border-left: 4px solid var(--green); }
    @keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    .alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; }
    .alert.success { background: var(--green-bg); color: var(--green); }
    .alert.error { background: var(--red-bg); color: var(--red); }
    .alert.warning { background: var(--orange-bg); color: var(--orange); }
    .alert.info { background: var(--blue-bg); color: var(--blue); }
    .divider { height: 1px; background: var(--border); margin: 16px 0; }
    .mt-4 { margin-top: 14px; }
    .mt-6 { margin-top: 20px; }
    .mb-4 { margin-bottom: 14px; }
    .mb-6 { margin-bottom: 20px; }
    .accent-bar { width: 36px; height: 3px; background: var(--accent); border-radius: 99px; margin-top: 6px; }
    .fade-in { animation: fadeUp 0.4s ease both; }
    @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
    [x-cloak] { display: none !important; }

    /* Titres & utilitaires */
    .page-header h1 .accent { color: var(--accent); font-weight: 800; }
    .muted { color: var(--text-muted); }
    .text-center { text-align: center; }
    .mt-2 { margin-top: 8px; }

    /* Boutons (liens & classes explicites) */
    a.btn { text-decoration: none; display: inline-flex; }
    .btn.primary, a.btn.primary, button.btn.primary {
      background: linear-gradient(165deg, var(--brand) 0%, var(--accent-dark) 100%);
      color: #fff !important;
      border: 1px solid var(--brand);
      box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 38%, transparent);
    }
    .btn.primary:hover, a.btn.primary:hover {
      background: linear-gradient(165deg, var(--accent-hover) 0%, var(--brand) 100%);
      transform: translateY(-1px);
    }
    .btn.secondary, a.btn.secondary, button.btn.secondary {
      background: var(--surface-2);
      border: 1px solid var(--border);
      color: var(--text);
    }
    .btn.secondary:hover {
      background: color-mix(in srgb, var(--accent-light) 38%, var(--surface-2));
      border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
    }
    .btn.danger, a.btn.danger, button.btn.danger {
      background: var(--red-bg);
      border: 1px solid color-mix(in srgb, var(--red) 50%, transparent);
      color: var(--red);
    }
    .btn.success, a.btn.success {
      background: var(--green-bg);
      border: 1px solid color-mix(in srgb, var(--green) 45%, transparent);
      color: var(--green);
    }
    .btn.sm, a.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

    /* Toolbar */
    .toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    /* Cartes KPI */
    .kpi-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      box-shadow: var(--shadow-sm);
      transition: box-shadow 0.2s, transform 0.2s;
      position: relative;
      overflow: hidden;
    }
    .kpi-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--green), color-mix(in srgb, var(--accent-dark) 70%, var(--green)));
      opacity: 0.92;
    }
    .kpi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
    .kpi-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin-bottom: 10px;
    }
    .kpi-value {
      font-family: var(--font-display);
      font-size: 1.65rem;
      font-weight: 700;
      color: var(--text);
      line-height: 1.15;
      letter-spacing: -0.02em;
    }
    .kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
    .kpi-icon {
      width: 32px; height: 32px;
      border-radius: var(--radius-sm);
      display: inline-flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .kpi-icon svg { display: block; }
    .kpi-icon.gold { background: var(--accent-light); color: var(--accent-dark); }
    .kpi-icon.blue { background: var(--blue-bg); color: var(--blue); }
    .kpi-icon.green { background: var(--green-bg); color: var(--green); }
    .kpi-icon.orange { background: color-mix(in srgb, var(--accent-light) 65%, var(--orange-bg)); color: var(--accent-dark); }
    .kpi-icon.purple { background: color-mix(in srgb, var(--accent) 16%, var(--surface-2)); color: var(--accent-dark); }
    .kpi-icon.cyan { background: color-mix(in srgb, var(--green) 14%, var(--surface-2)); color: var(--green); }
    .kpi-icon.pink { background: color-mix(in srgb, var(--accent-light) 75%, var(--surface-2)); color: var(--accent); }
    .dark .kpi-icon.purple { background: #142818; color: #7ddf9a; }
    .dark .kpi-icon.cyan { background: #0f2418; color: var(--green); }
    .dark .kpi-icon.pink { background: #1a2e1c; color: #8ee5a8; }

    /* Grille stats & tuiles KPI compactes */
    .stats-grid { display: grid; gap: 14px; }
    .stats-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
    .stats-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
    .stats-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    @media (max-width: 1100px) {
      .stats-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 700px) {
      .stats-grid.cols-6, .stats-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 480px) {
      .stats-grid.cols-6, .stats-grid.cols-4, .stats-grid.cols-3 { grid-template-columns: 1fr; }
    }
    .stat-card {
      background: var(--surface);
      border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
      border-radius: var(--radius-sm);
      padding: 14px 16px;
      text-align: center;
      transition: box-shadow 0.15s, border-color 0.15s;
    }
    .stat-card:hover { box-shadow: var(--shadow-sm); }
    .stat-label {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text-muted);
      margin-bottom: 8px;
    }
    .stat-label.green, .stat-label.tone-success { color: var(--green); }
    .stat-label.red, .stat-label.tone-danger { color: var(--red); }
    .stat-label.tone-info { color: var(--blue); }
    .stat-label.tone-accent { color: var(--accent-dark); }
    .stat-label.tone-warning { color: var(--orange); }
    .stat-value {
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
    }
    .stat-value.green { color: var(--green); }
    .stat-value.red { color: var(--red); }
    .stat-value.accent { color: var(--accent); }
    .stat-value.orange { color: var(--orange); }
    .stat-value.blue { color: var(--blue); }
    .stat-card.tone-neutral { background: var(--surface-2); }
    .stat-card.tone-success {
      background: var(--green-bg);
      border-color: color-mix(in srgb, var(--green) 30%, var(--border));
    }
    .stat-card.tone-danger {
      background: var(--red-bg);
      border-color: color-mix(in srgb, var(--red) 30%, var(--border));
    }
    .stat-card.tone-info {
      background: var(--blue-bg);
      border-color: color-mix(in srgb, var(--blue) 30%, var(--border));
    }
    .stat-card.tone-accent {
      background: color-mix(in srgb, var(--accent-light) 72%, var(--surface));
      border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
    }
    .stat-card.tone-warning {
      background: var(--orange-bg);
      border-color: color-mix(in srgb, var(--orange) 30%, var(--border));
    }

    /* Sections de page â€” cartes avec en-tÃªte teintÃ© */
    .card.card-section {
      overflow: hidden;
      padding: 0;
    }
    .card.card-section > .card-header,
    .card.card-section > .stats-grid,
    .card.card-section > .card-body,
    .card.card-section > .table-wrap,
    .card.card-section > form {
      padding-left: 20px;
      padding-right: 20px;
    }
    .card.card-section > .card-header {
      margin-bottom: 0;
      padding-top: 16px;
      padding-bottom: 14px;
    }
    .card.card-section > .stats-grid { padding-top: 16px; padding-bottom: 16px; }
    .card.card-section > .card-body,
    .card.card-section > form { padding-top: 16px; padding-bottom: 20px; }
    .card.card-section > .table-wrap { padding-top: 4px; padding-bottom: 16px; }
    .card.card-section[class*="section-tone"] { border-left: 4px solid transparent; }
    .card-section.section-tone-neutral { border-left-color: color-mix(in srgb, var(--text-muted) 35%, var(--border)); }
    .card-section.section-tone-neutral .card-header {
      background: var(--surface-2);
      border-bottom-color: var(--border);
    }
    .card-section.section-tone-info {
      border-color: color-mix(in srgb, var(--blue) 24%, var(--border));
      border-left-color: var(--blue);
    }
    .card-section.section-tone-info .card-header {
      background: linear-gradient(135deg, var(--blue-bg) 0%, color-mix(in srgb, var(--blue-bg) 38%, var(--surface)) 100%);
      border-bottom-color: color-mix(in srgb, var(--blue) 28%, var(--border));
    }
    .card-section.section-tone-info .card-title { color: var(--blue); }
    .card-section.section-tone-success {
      border-color: color-mix(in srgb, var(--green) 24%, var(--border));
      border-left-color: var(--green);
    }
    .card-section.section-tone-success .card-header {
      background: linear-gradient(135deg, var(--green-bg) 0%, color-mix(in srgb, var(--green-bg) 38%, var(--surface)) 100%);
      border-bottom-color: color-mix(in srgb, var(--green) 28%, var(--border));
    }
    .card-section.section-tone-success .card-title { color: var(--green); }
    .card-section.section-tone-warning {
      border-color: color-mix(in srgb, var(--orange) 24%, var(--border));
      border-left-color: var(--orange);
    }
    .card-section.section-tone-warning .card-header {
      background: linear-gradient(135deg, var(--orange-bg) 0%, color-mix(in srgb, var(--orange-bg) 38%, var(--surface)) 100%);
      border-bottom-color: color-mix(in srgb, var(--orange) 28%, var(--border));
    }
    .card-section.section-tone-warning .card-title { color: var(--orange); }
    .card-section.section-tone-accent {
      border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
      border-left-color: var(--accent);
    }
    .card-section.section-tone-accent .card-header {
      background: linear-gradient(135deg, var(--accent-light) 0%, color-mix(in srgb, var(--accent-light) 42%, var(--surface)) 100%);
      border-bottom-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    }
    .card-section.section-tone-accent .card-title { color: var(--accent-dark); }
    .card-section.section-tone-danger {
      border-color: color-mix(in srgb, var(--red) 24%, var(--border));
      border-left-color: var(--red);
    }
    .card-section.section-tone-danger .card-header {
      background: linear-gradient(135deg, var(--red-bg) 0%, color-mix(in srgb, var(--red-bg) 38%, var(--surface)) 100%);
      border-bottom-color: color-mix(in srgb, var(--red) 28%, var(--border));
    }
    .card-section.section-tone-danger .card-title { color: var(--red); }

    .panel-card {
      border-radius: var(--radius-sm);
      padding: 16px;
      text-align: center;
      background: var(--surface-2);
      border: 1px solid var(--border);
    }
    .panel-card.tone-accent {
      background: color-mix(in srgb, var(--accent-light) 72%, var(--surface));
      border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
    }
    .panel-card.tone-info {
      background: var(--blue-bg);
      border-color: color-mix(in srgb, var(--blue) 30%, var(--border));
    }
    .panel-card.tone-success {
      background: var(--green-bg);
      border-color: color-mix(in srgb, var(--green) 30%, var(--border));
    }
    .panel-card.tone-warning {
      background: var(--orange-bg);
      border-color: color-mix(in srgb, var(--orange) 30%, var(--border));
    }
    .panel-card.tone-danger {
      background: var(--red-bg);
      border-color: color-mix(in srgb, var(--red) 30%, var(--border));
    }
    .panel-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      margin-bottom: 8px;
    }
    .panel-value {
      font-family: var(--font-display);
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--text);
    }
    .panel-value.lg { font-size: 1.6rem; color: var(--accent); }
    .panel-value.green { color: var(--green); }
    .panel-value.orange { color: var(--orange); }
    .panel-value.red { color: var(--red); }

    .subnav-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      padding: 12px 16px;
      background: linear-gradient(135deg, color-mix(in srgb, var(--accent-light) 58%, var(--surface)) 0%, var(--surface) 100%);
      border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
      border-radius: var(--radius);
      border-left: 4px solid var(--accent);
      box-shadow: var(--shadow-sm);
    }

    .text-green, .green { color: var(--green); font-weight: 600; }
    .text-red, .red { color: var(--red); font-weight: 600; }

    /* Barres de progression */
    .progress-bar {
      position: relative;
      height: 10px;
      background: var(--surface-2);
      border-radius: 99px;
      overflow: hidden;
      border: 1px solid var(--border);
    }
    .progress-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--accent), var(--accent-dark));
      border-radius: 99px;
      transition: width 0.4s ease;
    }
    .progress-label {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 10px;
      font-weight: 700;
      color: var(--text-muted);
      pointer-events: none;
    }

    /* Pagination */
    .pagination-nav {
      margin-top: 20px;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-items: center;
      gap: 6px;
    }
    .pagination-nav a { min-width: 2.25rem; justify-content: center; }

    /* Topbar utilisateur */
    .topbar-user {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 6px 12px 6px 6px;
      background: var(--surface-2);
      border: 1px solid var(--border);
      border-radius: 99px;
      font-size: 13px;
      font-weight: 500;
    }
    .topbar-user-avatar {
      width: 32px; height: 32px;
      border-radius: 99px;
      background: var(--accent-light);
      color: var(--accent-dark);
      display: flex; align-items: center; justify-content: center;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 13px;
    }
    .topbar-user-name {
      max-width: 160px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    @media (max-width: 500px) {
      .topbar-user-name { display: none; }
    }

    /* Menu mobile (drawer) : Ã©crans â‰¤ 900px */
    .show-mobile { display: none; }
    .hide-mobile { display: inline-flex; }
    @media (max-width: 900px) {
      .show-mobile { display: inline-flex; }
      .hide-mobile { display: none; }
      .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        z-index: 40;
        width: min(var(--sidebar-w), 88vw);
        min-width: min(var(--sidebar-w), 88vw);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: var(--shadow-lg);
      }
      .sidebar.mobile-open { transform: translateX(0); }
      /* Ne jamais garder le mode rÃ©duit sur mobile */
      .sidebar.collapsed {
        width: min(var(--sidebar-w), 88vw);
        min-width: min(var(--sidebar-w), 88vw);
      }
      .sidebar.collapsed .nav-label,
      .sidebar.collapsed .nav-section-label,
      .sidebar.collapsed .dropdown-icon { display: unset !important; }
      .sidebar.collapsed .nav-section-title,
      .sidebar.collapsed .nav-section-header .dropdown-icon { display: flex !important; }
      .sidebar.collapsed .nav-submenu { display: none !important; }
      .sidebar.collapsed .nav-section.open .nav-submenu { display: block !important; }
      .sidebar.collapsed .nav-section-header {
        justify-content: space-between;
        padding: 9px 12px;
      }
      .sidebar.collapsed .nav-section-header-left { flex: 1; justify-content: flex-start; }
      .sidebar.collapsed .lgi-brand-logo--sidebar {
        max-height: 96px;
        max-width: 100%;
        object-fit: contain;
        object-position: center;
      }
      .sidebar-close-mobile { display: inline-flex; }
      .main { width: 100%; min-width: 0; }
      .topbar { padding: 0 12px; gap: 10px; }
      .topbar-crumb { font-size: 12px; max-width: 42vw; }
      body.lotus-mobile-nav-open { overflow: hidden; }
    }
    .sidebar-close-mobile {
      display: none;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      margin-left: auto;
      border: 1px solid var(--sidebar-border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      color: var(--text-muted);
      cursor: pointer;
      flex-shrink: 0;
    }
    .sidebar-close-mobile:hover { color: var(--text); background: var(--sidebar-bg-hover); }
    .sidebar-logo--lgi { position: relative; }
    @media (max-width: 900px) {
      .sidebar-logo--lgi { padding-right: 8px; }
    }
    .sidebar-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(15, 14, 12, 0.45);
      z-index: 35;
      backdrop-filter: blur(2px);
    }
    @media (max-width: 900px) {
      .sidebar-backdrop.is-open { display: block; }
    }

    /* Cartes liste vide */
    .empty-state {
      text-align: center;
      padding: 48px 24px;
      color: var(--text-muted);
      font-size: 14px;
    }

    /* Totaux / actions formulaires */
    .form-totals {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 24px;
      margin-top: 20px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    .form-totals-item { text-align: right; }
    .form-totals-item .label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
    .form-totals-item .amount { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
    .form-totals-item.highlight .amount { font-size: 1.5rem; color: var(--accent); }
    .form-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 12px;
      margin-top: 20px;
    }
    a.card-link { color: var(--accent); font-weight: 600; text-decoration: none; }
    a.card-link:hover { text-decoration: underline; }

    /* Layouts d'Ã©cran type \"poste de travail\" desktop-to-web */
    .workspace-layout {
      display: grid;
      grid-template-rows: auto 1fr auto;
      height: calc(100vh - 110px);
      gap: 10px;
    }
    .workspace-main {
      display: grid;
      grid-template-columns: minmax(0, 2.1fr) minmax(320px, 0.9fr);
      gap: 12px;
      overflow: hidden;
    }
    .workspace-main-left,
    .workspace-main-right {
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    .workspace-main-left > .card,
    .workspace-main-right > .card {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }
    .workspace-main-right {
      max-width: 420px;
    }
    .workspace-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }
    .workspace-footer-left {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }
    .workspace-footer-right {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      justify-content: flex-end;
    }
    @media (max-width: 1100px) {
      .workspace-layout {
        height: auto;
        grid-template-rows: auto auto auto;
      }
      .workspace-main {
        grid-template-columns: 1fr;
      }
      .workspace-main-right {
        max-width: none;
      }
    }

    /* Tables denses faÃ§on bureautique */
    .table-dense thead th {
      padding-top: 6px;
      padding-bottom: 6px;
      font-size: 10px;
    }
    .table-dense tbody td {
      padding-top: 6px;
      padding-bottom: 6px;
      font-size: 12.5px;
    }

    /* En-tÃªtes de document (facture, bon) */
    .doc-header {
      display: grid;
      grid-template-columns: 2fr 1.5fr auto;
      gap: 12px;
      align-items: flex-start;
    }
    .doc-header-section {
      background: var(--surface-2);
      border-radius: var(--radius-sm);
      padding: 10px 12px;
      border: 1px solid var(--border);
    }
    .doc-header-title {
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .doc-header-meta {
      font-size: 12px;
      color: var(--text-muted);
    }
    @media (max-width: 900px) {
      .doc-header {
        grid-template-columns: 1fr;
      }
    }

    /* Panneaux latÃ©raux statistiques / rÃ©sumÃ© */
    .side-panel {
      border-radius: var(--radius);
      border: 1px solid color-mix(in srgb, var(--accent) 10%, var(--border));
      background: var(--surface);
      padding: 16px 16px 14px;
      box-shadow: var(--shadow-sm);
    }
    .side-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .side-panel-title {
      font-size: 13px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
    }
    .side-panel-body {
      display: flex;
      flex-direction: column;
      gap: 8px;
      font-size: 13px;
    }

    /* Barre d'Ã©tat infÃ©rieure (infos caisse, utilisateur, messages rapides) */
    .status-bar {
      font-size: 11.5px;
      color: var(--text-muted);
      padding: 6px 10px;
      border-radius: var(--radius-sm);
      background: var(--surface-2);
      border: 1px solid var(--border);
      display: inline-flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }
    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 8px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--surface);
      font-size: 11px;
    }

    /* Validation navigateur (required) + loader requÃªtes longues */
    form.was-validated input:invalid,
    form.was-validated select:invalid,
    form.was-validated textarea:invalid {
      border-color: var(--red) !important;
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent);
    }
    #lotus-global-loading {
      position: fixed;
      inset: 0;
      z-index: 100000;
      display: flex;
      align-items: center;
      justify-content: center;
      background: color-mix(in srgb, var(--bg) 55%, rgba(0,0,0,0.35));
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    #lotus-global-loading.is-visible {
      opacity: 1;
      pointer-events: auto;
    }
    #lotus-global-loading .lotus-spinner-box {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
      padding: 22px 28px;
      border-radius: var(--radius-lg);
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: var(--shadow-lg);
      font-size: 13px;
      color: var(--text-muted);
    }
    #lotus-global-loading .lotus-spinner {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      animation: lotus-spin 0.75s linear infinite;
    }
    @keyframes lotus-spin {
      to { transform: rotate(360deg); }
    }

    /* IntÃ©gration iframe (ex. depuis formulaire vente dÃ©taillÃ©e) */
    body.lotus-embed-shell .layout .sidebar,
    body.lotus-embed-shell .layout .sidebar-backdrop,
    body.lotus-embed-shell .layout > .main > header.topbar,
    body.lotus-embed-shell .dreampos-seller-shell {
      display: none !important;
    }
    body.lotus-embed-shell .layout > .main {
      width: 100% !important;
      max-width: 100% !important;
    }
    body.lotus-embed-shell .page-content {
      padding: 12px 14px !important;
    }
    body.lotus-embed-shell .flash-container {
      top: 12px;
      right: 12px;
    }
    /* Style pour le lien actif - bien visible */
.nav-subitem.active,
.nav-item.active {
    background: var(--brand) !important;
    color: white !important;
    font-weight: 600 !important;
    border-left: 4px solid var(--accent-dark) !important;
    padding-left: 8px !important;
}

.nav-subitem.active .nav-label,
.nav-item.active .nav-label {
    color: white !important;
    font-weight: 600 !important;
}

.nav-subitem.active svg,
.nav-item.active svg {
    stroke: white !important;
    color: white !important;
}

/* Version mode sombre */
.dark .nav-subitem.active,
.dark .nav-item.active {
    background: var(--accent-dark) !important;
    color: white !important;
    border-left-color: var(--accent) !important;
}
