/* =============================================================================
   iFutur — Administration · STYLES DE COMPOSANTS
   Toutes les classes .ng-* de l'app vivent ici. Importe les tokens.
   ============================================================================= */
/* =============================================================================
   iFutur — Administration · TOKENS & TYPE
   Source unique de verite : couleurs, type, espacement, rayons, ombres.
   Couleurs : vert (primaire) + orange (accent) + neutres.
   delta-nation · systeme de design. Importez ce fichier depuis n'importe quelle UI.
   ============================================================================= */

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

:root {
  /* ── Vert (PRIMAIRE : action, navigation, validation) — base #127914 ── */
  --ng-green-50:  #E8F3E8;
  --ng-green-100: #CDE6CE;
  --ng-green-200: #9DCD9F;
  --ng-green-300: #5FAF62;
  --ng-green-400: #2E9233;
  --ng-green-500: #127914;   /* base */
  --ng-green-600: #0E6510;   /* hover */
  --ng-green-700: #0A4F0C;   /* pressed + texte/liens sur blanc */
  --ng-green-800: #073908;
  --ng-green: var(--ng-green-500);

  /* ── Orange (ACCENT : emphase, attention, « en cours ») — base #FF8C00 ── */
  --ng-orange-50:  #FFF4E5;
  --ng-orange-100: #FFE4C2;
  --ng-orange-200: #FFCD8F;
  --ng-orange-300: #FFB152;
  --ng-orange-400: #FF9D27;
  --ng-orange-500: #FF8C00;   /* base */
  --ng-orange-600: #E07700;   /* hover */
  --ng-orange-700: #B35E00;   /* pressed + texte/liens sur blanc */
  --ng-orange-800: #8A4700;
  --ng-orange: var(--ng-orange-500);

  /* ── Neutres institutionnels (très légèrement froids/neutres) ─────────── */
  --n-0:   #FFFFFF;
  --n-25:  #F7F8F8;   /* fond de page */
  --n-50:  #F1F3F2;   /* fond carte discret */
  --n-100: #E7EAE8;   /* séparateur */
  --n-200: #D8DCD9;   /* bordure */
  --n-300: #C0C6C2;   /* bordure forte */
  --n-400: #949B97;   /* icône muette */
  --n-500: #6B726E;   /* texte secondaire */
  --n-600: #4D534F;   /* corps appuyé */
  --n-700: #343935;
  --n-800: #20231F;
  --n-900: #121613;   /* encre / titres */

  --ink:   #121613;
  --ink-2: #20231F;

  /* ── Accents tableau de bord (tuiles pleines + pastilles d'icône) ─────── */
  --ng-teal-500: #2D8C86;  --ng-teal-50: #E4F1EF;   /* sarcelle */
  --ng-blue-500: #2C6DB5;  --ng-blue-50: #E5EFF9;   /* bleu (= info) */
  --ng-gold-500: #BE8A1F;  --ng-gold-50: #FAF1D8;   /* or / ocre */

  /* ── Sémantique (vert + orange d'abord ; brique pour l'erreur) ────────── */
  --ok:        var(--ng-green-600);
  --ok-bg:     var(--ng-green-50);
  --ok-border: var(--ng-green-200);

  --pending:        var(--ng-orange-600);
  --pending-bg:     var(--ng-orange-50);
  --pending-border: var(--ng-orange-200);

  /* erreur / rejet : brique — sœur harmonique de l'orange, jamais rouge vif */
  --danger:        #B23A24;
  --danger-bg:     #F8E7E1;
  --danger-border: #E8BCAD;

  /* ── Tokens de premier plan ───────────────────────────────────────────── */
  --fg-1: var(--n-900);
  --fg-2: var(--n-700);
  --fg-3: var(--n-500);
  --fg-4: var(--n-400);
  --fg-on-orange: var(--ink);   /* orange lumineux → texte encre (accessible) */
  --fg-on-green:  #FFFFFF;
  --fg-on-dark:   #EEF1EF;

  /* ── Tokens de fond ───────────────────────────────────────────────────── */
  --bg-page:    #f5f5f5;   /* fond de la zone de contenu principale */
  --bg-surface: var(--n-0);
  --bg-sunken:  var(--n-50);
  --bg-inverse: var(--ink);

  /* ── Bordures ─────────────────────────────────────────────────────────── */
  --border-subtle:  var(--n-100);
  --border-default: var(--n-200);
  --border-strong:  var(--n-300);

  /* ── Rayons ───────────────────────────────────────────────────────────── */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* ── Espacement (base 4px) ────────────────────────────────────────────── */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px;

  /* ── Ombres (douces, jamais noir pur) ─────────────────────────────────── */
  --shadow-xs: 0 1px 1px rgba(18, 22, 19, 0.04);
  --shadow-sm: 0 1px 2px rgba(18, 22, 19, 0.06), 0 1px 1px rgba(18, 22, 19, 0.04);
  --shadow-md: 0 4px 12px rgba(18, 22, 19, 0.06), 0 1px 2px rgba(18, 22, 19, 0.04);
  --shadow-lg: 0 12px 28px rgba(18, 22, 19, 0.10), 0 2px 4px rgba(18, 22, 19, 0.04);
  --shadow-inset: inset 0 1px 2px rgba(18, 22, 19, 0.06);
  --shadow-focus: 0 0 0 3px rgba(18, 121, 20, 0.26);

  /* ── Typographie (Open Sans — cohérence iFutur) ───────────────────────── */
  --font-sans: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  /* Pas de police mono : tout le texte est en Open Sans. Le token --font-mono
     est conservé (les classes .mono / .ref l'utilisent) mais pointe vers Open Sans. */
  --font-mono: var(--font-sans);

  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-black: 800;

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;

  --num-tabular: 'tnum' 1, 'lnum' 1;
}

/* =============================================================================
   Base typographique (classe racine .ng)
   ============================================================================= */
body, .ng, .ng * {
  box-shadow: none;
}
.ng, .ng * { box-sizing: border-box; }
.ng {
  font-family: var(--font-sans);
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'pnum' 1, 'lnum' 1;
}
.ng h1, .ng h2, .ng h3, .ng h4 { margin: 0; color: var(--fg-1); }
.ng .tnum { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: var(--num-tabular); }
.ng .eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.13em;
  font-weight: 700; color: var(--fg-3);
}
.ng .mono { font-family: var(--font-mono); }

/* =============================================================================
   App shell
   ============================================================================= */
.ng-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--bg-page); }
.ng-app.is-collapsed { grid-template-columns: 82px minmax(0, 1fr); }
.ng-app.is-collapsed .ng-brand { justify-content: center; padding: 0 12px; }
.ng-app.is-collapsed .ng-nav-item { justify-content: center; padding-left: 10px; padding-right: 10px; }
.ng-app.is-collapsed .ng-nav-item.child { padding-left: 10px; }
.ng-app.is-collapsed .ng-side-foot { padding-left: 10px; padding-right: 10px; }
.ng-app.is-collapsed .ng-user-menu { left: 10px; right: auto; width: 230px; }

.ng-side { background: var(--n-0); border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; padding: 0; position: sticky; top: 0; height: 100vh; }
.ng-brand { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 0 18px; box-sizing: border-box; border-bottom: 1px solid var(--border-subtle); color: inherit; text-decoration: none; }
.ng-brand:hover { background: var(--n-25); }
.ng-brand-mark { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--ng-green-600); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0; flex-shrink: 0; }
.ng-brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ng-brand-app { font-weight: 800; font-size: 16px; color: var(--fg-1); letter-spacing: -0.01em; }
.ng-brand-gov { font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; white-space: nowrap; }

.ng-nav { padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--n-300) transparent; }
.ng-nav-block { display: flex; flex-direction: column; gap: 2px; }
.ng-nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-4); padding: 18px 10px 7px; font-weight: 800; line-height: 1; }
.ng-nav-group:first-child { padding-top: 10px; }
.ng-nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; color: var(--fg-2); font-family: inherit; font-size: 13.5px; cursor: pointer; font-weight: 600; text-align: left; text-decoration: none; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.ng-nav-item:hover { background: var(--n-50); color: var(--fg-1); }
.ng-nav-item.active { background: var(--ng-green-500); color: #fff; font-weight: 700; border-radius: 10px; box-shadow: var(--shadow-sm); }
.ng-nav-item.active:hover { background: var(--ng-green-600); }
.ng-nav-item.active .lucide { color: #fff; }
.ng-nav-item .lucide { width: 17px; height: 17px; color: var(--fg-4); flex-shrink: 0; }
.ng-nav-text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-nav-item .count { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--fg-4); font-variant-numeric: tabular-nums; line-height: 1; }
.ng-nav-item.active .count { color: rgba(255, 255, 255, 0.85); }
.ng-nav-item .chev-x { margin-left: auto; width: 15px; height: 15px; color: var(--fg-4); }
.ng-nav-item.active .chev-x { color: rgba(255, 255, 255, 0.88); }
.ng-nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 3px 0 4px; }
.ng-nav-sub[hidden] { display: none; }
.ng-nav-item.child { min-height: 32px; padding-left: 38px; font-size: 13px; font-weight: 600; }
.ng-nav-item.child .lucide { width: 15px; height: 15px; }

.ng-side-foot { position: relative; padding: 12px 14px; border-top: 1px solid var(--border-subtle); }
.ng-side-foot .ng-user-menu { display: none; }
.ng-side-foot.is-open .ng-user-menu { display: block; }
.ng-side-foot details[open] .ng-user-menu { display: block; }
.ng-side-foot summary { list-style: none; }
.ng-side-foot summary::-webkit-details-marker { display: none; }
.ng-user-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; padding: 8px; border-radius: 9px; cursor: pointer; font-family: inherit; text-align: left; color: var(--fg-2); }
.ng-user-btn:hover { background: var(--n-50); }
.ng-user-btn .chev { margin-left: auto; color: var(--fg-4); width: 16px; height: 16px; flex-shrink: 0; }
.ng-user-name { display: block; color: var(--fg-1); font-size: 12.5px; font-weight: 800; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-user-role { display: block; color: var(--fg-3); font-size: 11.5px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-user-menu { position: absolute; left: 14px; right: 14px; bottom: calc(100% - 4px); background: #fff; border: 1px solid var(--border-default); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.ng-user-menu form { margin: 0; }
.ng-user-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-1); border-radius: 8px; cursor: pointer; text-align: left; }
.ng-user-item:hover { background: var(--n-50); }
.ng-user-item .lucide { width: 16px; height: 16px; color: var(--fg-3); flex-shrink: 0; }
.ng-user-item.danger { color: var(--danger); }
.ng-user-item.danger .lucide { color: var(--danger); }
.ng-user-menu hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 5px 4px; }

.ng-main { display: flex; flex-direction: column; min-width: 0; }
.ng-top { height: 60px; border-bottom: 1px solid rgba(216, 220, 217, 0.6); background: rgba(255, 255, 255, 0.66); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); display: flex; align-items: center; gap: 14px; padding: 0 26px; position: sticky; top: 0; z-index: 20; }
.ng-proj { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--border-default); border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; color: var(--fg-1); cursor: pointer; }
.ng-proj .lucide { width: 15px; height: 15px; color: var(--fg-4); }
.ng-proj-wrap { min-width: 0; }
.ng-year-form { flex-shrink: 0; }
.ng-year-select { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 190px; height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--border-default); border-radius: 8px; background: #fff; box-shadow: var(--shadow-xs); color: var(--fg-1); }
.ng-year-select > .lucide:first-child { width: 16px; height: 16px; color: var(--fg-4); flex-shrink: 0; }
.ng-year-select select { appearance: none; -webkit-appearance: none; width: 100%; border: 0; background: transparent; color: var(--fg-1); font: inherit; font-size: 13px; font-weight: 700; outline: none; cursor: pointer; }
.ng-year-chev { position: absolute; right: 11px; width: 15px; height: 15px; color: var(--fg-4); pointer-events: none; }
.ng-search { flex: 1; max-width: 380px; position: relative; }
.ng-search input { width: 100%; box-sizing: border-box; padding: 8px 12px 8px 34px; border-radius: 8px; border: 1px solid var(--border-default); background: var(--n-25); font-size: 13px; font-family: inherit; box-shadow: var(--shadow-inset); }
.ng-search input:focus { outline: none; border-color: var(--ng-green-500); box-shadow: var(--shadow-focus), var(--shadow-inset); }
.ng-search .lucide { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--fg-4); }
.ng-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ng-top .ng-user-btn { width: auto; border: 1px solid var(--border-default); background: #fff; box-shadow: var(--shadow-xs); }
.ng-top .ng-user-btn:hover { background: var(--n-25); }
.ng-iconbtn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-2); cursor: pointer; position: relative; }
.ng-iconbtn:hover { background: var(--n-50); }
.ng-iconbtn .lucide { width: 18px; height: 18px; }
.ng-iconbtn .ping { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--ng-orange-500); border: 1.5px solid #fff; }

.ng-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; background: var(--ng-green-100); color: var(--ng-green-700); border: 1px solid var(--ng-green-200); }
.ng-avatar.orange { background: var(--ng-orange-100); color: var(--ng-orange-700); border-color: var(--ng-orange-200); }
.ng-avatar.neutral { background: var(--n-100); color: var(--n-600); border-color: var(--n-200); }
.ng-avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }
.ng-avatar .lucide { width: 17px; height: 17px; }

.ng-page { padding: 28px 32px 48px; width: 100%; box-sizing: border-box; margin: 0 auto; }
.ng-page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ng-page-head > div:first-child { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ng-page-head > div:last-child { flex-shrink: 0; }
.ng-page-title { font-size: 27px; font-weight: 800; color: var(--fg-1); letter-spacing: -0.02em; }
.ng-page-sub { font-size: 14px; color: var(--fg-3); margin-top: 0; }

/* Empty state (pages à construire) */
.ng-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 440px; text-align: center; color: var(--fg-3); }
.ng-empty .ic { width: 56px; height: 56px; border-radius: 14px; background: var(--n-50); border: 1px solid var(--border-subtle); display: inline-flex; align-items: center; justify-content: center; color: var(--fg-4); }
.ng-empty .ic .lucide { width: 26px; height: 26px; }
.ng-empty h3 { font-size: 18px; font-weight: 700; color: var(--fg-1); }
.ng-empty p { font-size: 13.5px; max-width: 360px; margin: 0; }

.ng-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ng-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ng-mobile-list { display: none; }
.ng-card-body { padding: 18px 20px; }
.ng-top-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 288px; background: #fff; border: 1px solid var(--border-default); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.ng-top-menu[hidden] { display: none; }
.ng-index { display: flex; flex-direction: column; gap: 16px; }
.ng-index-head { margin-bottom: 4px; }
.ng-index-head .ng-page-sub { display: inline-flex; align-items: center; margin-left: 2px; }

/* =============================================================================
   Buttons
   ============================================================================= */
.ng-btn { display: inline-flex; align-items: center; gap: 8px; width: auto; font-family: var(--font-sans); font-size: 13.5px; font-weight: 700; line-height: 1; padding: 10px 15px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; transition: all var(--dur-fast) var(--ease-out); white-space: nowrap; }
.ng-btn .lucide { width: 15px; height: 15px; }
.ng-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ng-btn-primary { background: var(--ng-green-500); color: var(--fg-on-green); border-color: var(--ng-green-600); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), var(--shadow-xs); }
.ng-btn-primary:hover { background: var(--ng-green-600); }
.ng-btn-primary:active { background: var(--ng-green-700); transform: translateY(1px); }
.ng-btn-green { background: var(--ng-green-500); color: var(--fg-on-green); border-color: var(--ng-green-600); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), var(--shadow-xs); }
.ng-btn-green:hover { background: var(--ng-green-600); }
.ng-btn-green:active { background: var(--ng-green-700); transform: translateY(1px); }
.ng-btn-accent { background: var(--ng-orange-500); color: var(--ink); border-color: var(--ng-orange-600); box-shadow: inset 0 1px 0 rgba(255,255,255,0.20), var(--shadow-xs); }
.ng-btn-accent:hover { background: var(--ng-orange-600); }
.ng-btn-accent:active { background: var(--ng-orange-700); color: #fff; transform: translateY(1px); }
.ng-btn-secondary { background: #fff; color: var(--fg-1); border-color: var(--border-default); box-shadow: var(--shadow-xs); }
.ng-btn-secondary:hover { background: var(--n-25); border-color: var(--border-strong); }
.ng-btn-ghost { background: transparent; color: var(--fg-2); }
.ng-btn-ghost:hover { background: var(--n-50); }
.ng-btn-danger { background: #fff; color: var(--danger); border-color: var(--danger-border); }
.ng-btn-danger:hover { background: var(--danger-bg); }
.ng-btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 8px; }

/* =============================================================================
   Badges / statuts
   ============================================================================= */
.ng-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid; line-height: 1.45; white-space: nowrap; }
.ng-badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.ng-badge.ok      { background: var(--ng-green-50);  color: var(--ng-green-700);  border-color: var(--ng-green-200); }
.ng-badge.ok .dot { background: var(--ng-green-500); }
.ng-badge.pending      { background: var(--ng-orange-50);  color: var(--ng-orange-700);  border-color: var(--ng-orange-200); }
.ng-badge.pending .dot { background: var(--ng-orange-500); }
.ng-badge.danger      { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.ng-badge.danger .dot { background: var(--danger); }
.ng-badge.neutral      { background: var(--n-50); color: var(--n-600); border-color: var(--n-200); }
.ng-badge.neutral .dot { background: var(--n-400); }
.ng-badge.info      { background: #fff; color: var(--fg-2); border-color: var(--border-default); }
.ng-badge.info .dot { background: var(--fg-4); }

/* =============================================================================
   Cards & surfaces
   ============================================================================= */
.ng-card { background: #fff; border: 1px solid var(--border-subtle); border-radius: 13px; box-shadow: var(--shadow-xs); }
.ng-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); }
.ng-card-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ng-card-title { font-size: 15.5px; font-weight: 700; color: var(--fg-1); }
.ng-card-sub { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.ng-link { color: var(--ng-green-600); font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; background: none; border: 0; font-family: inherit; padding: 0; }
.ng-link:hover { color: var(--ng-green-700); }
.ng-link .lucide { width: 14px; height: 14px; }

/* Héro — carte verte pleine (aplat, sans dégradé) */
.ng-hero-card { background: var(--ng-green-600); border-radius: var(--radius-xl); padding: 28px 34px 30px; color: #fff; margin-bottom: 16px; }
.ng-hero-card .eyebrow { color: rgba(255,255,255,0.72); }
.ng-hero-val { font-size: 56px; font-weight: 800; color: #fff; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 14px; }
.ng-hero-val .cur { color: #fff; font-weight: 800; }
.ng-hero-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; background: rgba(255,255,255,0.16); color: #fff; font-weight: 700; font-size: 13.5px; padding: 8px 14px; border-radius: var(--radius-pill); }
.ng-hero-badge .lucide { width: 16px; height: 16px; }

/* Tuiles KPI — couleurs pleines + pastille d'icône translucide (tableau de bord) */
.ng-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ng-stat-tile { border-radius: var(--radius-lg); padding: 18px; color: #fff; box-shadow: var(--shadow-xs); }
.ng-stat-tile.green  { background: var(--ng-green-500); }
.ng-stat-tile.orange { background: var(--ng-orange-500); }
.ng-stat-tile.teal   { background: var(--ng-teal-500); }
.ng-stat-tile.gold   { background: var(--ng-gold-500); }
.ng-stat-tile.blue   { background: var(--ng-blue-500); }
.ng-stat-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ng-stat-tile-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.92); line-height: 1.35; }
.ng-stat-tile-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.18); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ng-stat-tile-ic .lucide { width: 16px; height: 16px; }
.ng-stat-tile-val { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 14px; line-height: 1; }
.ng-stat-tile-sub { font-size: 12.5px; color: rgba(255,255,255,0.82); font-weight: 600; margin-top: 8px; }

/* KPI cards — fond neutre + pastille de couleur devant le libellé (Statistiques, galerie) */
.ng-kpi { background: #fff; border: 1px solid var(--border-subtle); border-radius: 13px; padding: 16px; position: relative; box-shadow: var(--shadow-xs); }
.ng-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Le libellé porte une pastille colorée (le ton) ; neutre par défaut */
.ng-kpi-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); font-weight: 600; }
.ng-kpi-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--n-300); flex-shrink: 0; }
.ng-kpi.green  .ng-kpi-label::before { background: var(--ng-green-500); }
.ng-kpi.orange .ng-kpi-label::before { background: var(--ng-orange-500); }
.ng-kpi.danger .ng-kpi-label::before { background: var(--danger); }
.ng-kpi-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--n-50); color: var(--fg-4); flex-shrink: 0; }
.ng-kpi-ic .lucide { width: 16px; height: 16px; }
.ng-kpi-ic.green  { background: var(--ng-green-50); color: var(--ng-green-600); border: 1px solid var(--ng-green-200); }
.ng-kpi-ic.orange { background: var(--ng-orange-50); color: var(--ng-orange-600); border: 1px solid var(--ng-orange-200); }
.ng-kpi-ic.blue   { background: var(--ng-blue-50); color: var(--ng-blue-500); border: 1px solid #cde0f3; }
.ng-kpi-ic.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.ng-kpi-val { font-size: 26px; font-weight: 800; color: var(--fg-1); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 12px; line-height: 1; }
.ng-kpi-meta { font-size: 12px; color: var(--fg-3); margin-top: 7px; font-variant-numeric: tabular-nums; }
.ng-kpi-meta strong { font-weight: 700; color: var(--fg-2); }

/* Mini compteurs — pastille d'icône colorée à gauche */
.ng-counters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ng-counter { background: #fff; border: 1px solid var(--border-subtle); border-radius: 13px; padding: 14px 16px; display: flex; align-items: center; gap: 13px; box-shadow: var(--shadow-xs); }
.ng-counter .c-label { font-size: 12.5px; color: var(--fg-3); font-weight: 600; }
.ng-counter .c-val { font-size: 24px; font-weight: 800; color: var(--fg-1); font-variant-numeric: tabular-nums; line-height: 1; margin-top: 4px; }
.ng-counter .c-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--n-50); color: var(--fg-4); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ng-counter .c-ic.green  { background: var(--ng-green-50);  color: var(--ng-green-600); }
.ng-counter .c-ic.orange { background: var(--ng-orange-50); color: var(--ng-orange-600); }
.ng-counter .c-ic.teal   { background: var(--ng-teal-50);   color: var(--ng-teal-500); }
.ng-counter .c-ic.blue   { background: var(--ng-blue-50);   color: var(--ng-blue-500); }
.ng-counter .c-ic.gold   { background: var(--ng-gold-50);   color: var(--ng-gold-500); }
.ng-counter .c-ic.danger { background: var(--danger-bg);    color: var(--danger); }
.ng-counter .c-ic .lucide { width: 19px; height: 19px; }

/* =============================================================================
   Tables
   ============================================================================= */
.ng-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.ng-tbl thead th { font-size: 11px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; text-align: left; padding: 11px 18px; background: var(--n-25); border-bottom: 1px solid var(--border-subtle); }
.ng-tbl thead th.num { text-align: right; }
.ng-tbl tbody td { padding: 12px 18px; border-bottom: 1px solid var(--border-subtle); color: var(--fg-1); }
.ng-tbl tbody tr:last-child td { border-bottom: 0; }
.ng-tbl tbody tr:hover td { background: var(--n-25); }
.ng-tbl tbody tr.clickable { cursor: pointer; }
.ng-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ng-tbl td .sub { color: var(--fg-3); font-size: 12px; }
.ng-tbl td.date { color: var(--fg-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ng-tbl .ref { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-3); }
.ng-row-name { display: flex; align-items: center; gap: 11px; }

/* Alert list (stock faible) — en-tête orangé doux, sans filet latéral */
.ng-alert-card { background: #fff; border: 1px solid var(--border-subtle); border-radius: 13px; box-shadow: var(--shadow-xs); overflow: hidden; }
.ng-alert-card .ng-card-head { background: var(--ng-orange-50); }
.ng-alert-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid var(--border-subtle); }
.ng-alert-row:last-child { border-bottom: 0; }
.ng-alert-row:hover { background: var(--ng-orange-50); }
.ng-alert-name { font-weight: 700; color: var(--fg-1); font-size: 13.5px; }
.ng-alert-loc { font-size: 12.5px; color: var(--fg-3); margin-top: 1px; }
.ng-alert-qty { text-align: right; }
.ng-alert-qty .q { font-weight: 800; color: var(--danger); font-variant-numeric: tabular-nums; font-size: 14px; }
.ng-alert-qty .s { font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* =============================================================================
   Stepper (workflow horizontal)
   ============================================================================= */
.ng-stepper { display: flex; align-items: flex-start; gap: 0; }
.ng-step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; text-align: center; }
.ng-step .bar { position: absolute; top: 17px; height: 2px; background: var(--n-200); left: -50%; right: 50%; z-index: 0; }
.ng-step:first-child .bar { display: none; }
.ng-step.done .bar, .ng-step.current .bar { background: var(--ng-green-500); }
.ng-step .node { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--n-200); display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: var(--fg-4); font-weight: 800; font-size: 13px; }
.ng-step .node .lucide { width: 17px; height: 17px; }
.ng-step.done .node { background: var(--ng-green-500); border-color: var(--ng-green-600); color: #fff; }
.ng-step.current .node { background: #fff; border-color: var(--ng-green-500); color: var(--ng-green-600); box-shadow: 0 0 0 4px var(--ng-green-50); }
.ng-step .s-label { font-size: 12.5px; font-weight: 700; color: var(--fg-1); margin-top: 10px; }
.ng-step.todo .s-label { color: var(--fg-4); }
.ng-step .s-meta { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; }

/* Timeline verticale (multi-acteurs) */
.ng-tl { display: flex; flex-direction: column; }
.ng-tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.ng-tl-item:last-child { padding-bottom: 0; }
.ng-tl-line { position: absolute; left: 16px; top: 34px; bottom: -2px; width: 2px; background: var(--border-default); }
.ng-tl-item:last-child .ng-tl-line { display: none; }
.ng-tl-ic { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; z-index: 1; border: 2px solid; }
.ng-tl-ic .lucide { width: 15px; height: 15px; }
.ng-tl-ic.ok { background: var(--ng-green-50); border-color: var(--ng-green-200); color: var(--ng-green-600); }
.ng-tl-ic.pending { background: var(--ng-orange-50); border-color: var(--ng-orange-200); color: var(--ng-orange-600); }
.ng-tl-ic.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.ng-tl-ic.neutral { background: var(--n-50); border-color: var(--n-200); color: var(--fg-4); }
.ng-tl-body { flex: 1; padding-top: 2px; min-width: 0; }
.ng-tl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ng-tl-title { font-size: 13.5px; font-weight: 700; color: var(--fg-1); }
.ng-tl-actor { font-size: 12.5px; margin-top: 1px; }
.ng-tl-actor .by { color: var(--ng-orange-700); font-weight: 600; }
.ng-tl-time { font-size: 11.5px; color: var(--fg-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ng-tl-note { font-size: 13px; color: var(--fg-2); margin-top: 4px; }
.ng-tl-quote { font-size: 13px; color: var(--fg-2); margin-top: 8px; padding: 9px 13px; background: var(--n-25); border: 1px solid var(--border-subtle); border-radius: 9px; font-style: italic; }

/* Key-value detail */
.ng-kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--border-subtle); font-size: 13px; }
.ng-kv:last-child { border-bottom: 0; }
.ng-kv .k { color: var(--fg-3); }
.ng-kv .v { color: var(--fg-1); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ng-kv .v.mono { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; }

/* Validators list */
.ng-validator { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.ng-validator:last-child { border-bottom: 0; }
.ng-validator .vn { font-size: 13.5px; font-weight: 700; color: var(--fg-1); }
.ng-validator .vr { font-size: 12px; color: var(--fg-3); }

/* Chips / filtres */
.ng-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ng-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-default); background: #fff; color: var(--fg-2); cursor: pointer; font-family: inherit; white-space: nowrap; transition: background var(--dur-fast) var(--ease-out); }
.ng-chip:hover { background: var(--n-25); }
.ng-chip.active { background: var(--ng-green-500); border-color: var(--ng-green-600); color: #fff; }
.ng-chip .n { font-variant-numeric: tabular-nums; color: var(--fg-4); font-weight: 700; }
.ng-chip.active .n { color: var(--ng-green-100); }

/* KPI ton danger (rupture de stock) — la pastille du libellé porte le ton ;
   la valeur reste en rouge brique pour signaler le risque */
.ng-kpi.danger .ng-kpi-val { color: var(--danger); }

/* Champs / selects */
.ng-filters { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 16px; align-items: end; }
.ng-field { display: flex; flex-direction: column; gap: 6px; }
.ng-field > label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-3); }
.ng-select { position: relative; }
.ng-select select { appearance: none; -webkit-appearance: none; width: 100%; padding: 9px 34px 9px 12px; border: 1px solid var(--border-default); border-radius: 9px; background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-1); cursor: pointer; box-shadow: var(--shadow-inset); }
.ng-select select:focus { outline: none; border-color: var(--ng-green-500); box-shadow: var(--shadow-focus); }
.ng-select .chev { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--fg-4); width: 15px; height: 15px; }

/* Graphiques — barres horizontales */
.ng-hbars { display: flex; flex-direction: column; gap: 13px; }
.ng-hbar { display: grid; grid-template-columns: 92px 1fr 86px; align-items: center; gap: 12px; }
.ng-hbar .lbl { font-size: 12px; font-weight: 700; color: var(--fg-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ng-hbar .track { height: 18px; background: var(--n-50); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-subtle); }
.ng-hbar .fill { display: block; height: 100%; border-radius: 6px 0 0 6px; transition: width var(--dur-base) var(--ease-out); }
.ng-hbar .val { font-size: 12.5px; font-weight: 700; color: var(--fg-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ng-legend { display: flex; gap: 16px; align-items: center; }
.ng-legend .item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--fg-2); font-weight: 600; }
.ng-legend .sw { width: 12px; height: 12px; border-radius: 3px; }

/* Inputs texte / date */
.ng-input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--border-default); border-radius: 9px; background: #fff; font-family: inherit; font-size: 13.5px; color: var(--fg-1); box-shadow: var(--shadow-inset); }
.ng-input::placeholder { color: var(--fg-4); }
.ng-input:focus { outline: none; border-color: var(--ng-green-500); box-shadow: var(--shadow-focus); }
.ng-input.with-ic { padding-left: 36px; }
.ng-input-wrap { position: relative; }
.ng-input-wrap > .lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--fg-4); }

.ng-password-field { position: relative; }
.ng-password-field > .lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--fg-4); pointer-events: none; }
.ng-password-field .ng-input { padding-left: 38px; padding-right: 42px; min-height: 40px; }
.ng-password-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-4); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast); }
.ng-password-toggle:hover { background: var(--n-50); color: var(--fg-1); }
.ng-password-toggle:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.ng-password-toggle .lucide { width: 16px; height: 16px; }
.ng-password-toggle .hidden { display: none; }

/* Sélecteur de projet (menu) */
.ng-proj-wrap { position: relative; }
.ng-proj-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 248px; background: #fff; border: 1px solid var(--border-default); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.ng-proj-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--fg-4); padding: 9px 10px 4px; }
.ng-proj-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-1); border-radius: 8px; cursor: pointer; text-align: left; }
.ng-proj-item:hover { background: var(--n-50); }
.ng-proj-item .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--n-300); flex-shrink: 0; }
.ng-proj-item.sel .pdot { background: var(--ng-green-500); }
.ng-proj-item .chk { margin-left: auto; color: var(--ng-green-600); width: 15px; height: 15px; }

/* Fil d'Ariane */
.ng-crumb { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 12.5px; }
.ng-crumb .crumb-link { background: none; border: 0; padding: 0; font-family: inherit; font-size: inherit; color: var(--fg-3); font-weight: 600; cursor: pointer; }
.ng-crumb .crumb-link:hover { color: var(--ng-green-700); }
.ng-crumb .crumb-cur { color: var(--fg-1); font-weight: 700; }
.ng-crumb .sep { width: 13px; height: 13px; color: var(--fg-4); flex-shrink: 0; }

/* Panneau de filtres repliable */
.ng-filterpanel { overflow: hidden; }
.ng-filter-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 18px; background: none; border: 0; border-bottom: 1px solid transparent; font-family: inherit; cursor: pointer; }
.ng-filter-head:hover { background: var(--n-25); }
.ng-filterpanel.is-open .ng-filter-head { border-bottom-color: var(--border-subtle); }
.ng-filter-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--fg-1); }
.ng-filter-title .lucide { width: 16px; height: 16px; color: var(--fg-3); }
.ng-filter-toggle { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--ng-green-600); }
.ng-filter-toggle .lucide { width: 15px; height: 15px; }
.ng-filter-body { padding: 16px 18px 18px; }
.ng-filter-search { position: relative; max-width: 360px; margin-bottom: 16px; }
.ng-filter-search > .lucide { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--fg-4); pointer-events: none; z-index: 1; }
.ng-filter-search .ng-input { padding-left: 38px; min-height: 38px; }
.ng-filter-actions { justify-content: flex-end; align-items: center; margin-top: 16px; }
.ng-filter-actions .ng-btn { flex: 0 0 auto; min-width: 132px; justify-content: center; padding-inline: 14px; }

/* Grille de filtres intégrée (ng-index-filters) — query + filtres + submit en un seul grid */
.ng-index-filters { padding: 16px 18px 18px; }
.ng-index-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 16px; align-items: end; }
.ng-index-filter-query .ng-input { padding-left: 36px; }
.ng-index-filter-submit { display: flex; gap: 8px; align-items: flex-end; }
.ng-index-filter-submit .ng-btn { flex: 1; justify-content: center; }

/* Menu d'actions de ligne (portail, position fixe) */
.ng-rowmenu { position: fixed; min-width: 178px; background: #fff; border: 1px solid var(--border-default); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 200; font-family: var(--font-sans); }
.ng-rowmenu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--fg-1); border-radius: 7px; cursor: pointer; text-align: left; }
.ng-rowmenu-item:hover { background: var(--n-50); }
.ng-rowmenu-item .lucide { width: 15px; height: 15px; color: var(--fg-3); }
.ng-rowmenu-item.danger { color: var(--danger); }
.ng-rowmenu-item.danger .lucide { color: var(--danger); }
.ng-rowmenu hr { border: 0; border-top: 1px solid var(--border-subtle); margin: 4px 2px; }

/* Pagination */
.ng-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--border-subtle); background: var(--n-25); }
.ng-pagination .pp { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg-3); font-weight: 600; }
.ng-pagination .ng-select.sm select { padding: 6px 30px 6px 10px; font-size: 12.5px; box-shadow: var(--shadow-xs); }
.ng-pagination .ng-select.sm .chev { right: 9px; width: 14px; height: 14px; }
.ng-pagination .nav { display: flex; align-items: center; gap: 12px; }
.ng-pagination .rng { font-size: 12.5px; color: var(--fg-3); font-weight: 600; }
.pg-btn { width: 32px; height: 32px; border: 1px solid var(--border-default); background: #fff; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--fg-2); }
.pg-btn:hover:not(:disabled) { background: var(--n-50); }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-btn .lucide { width: 16px; height: 16px; }

/* Formulaires */
.ng-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ng-form-grid .col-2 { grid-column: span 2; }
.ng-hint { font-size: 12px; color: var(--fg-4); margin-top: 5px; }
textarea.ng-input { resize: vertical; min-height: 88px; line-height: 1.5; }
.ng-form-actions { display: flex; gap: 10px; margin-top: 24px; }
.ng-form-actions-right { justify-content: flex-end; }

/* Détail (fiches) */
.ng-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 36px; }
.ng-detail-field .k { font-size: 12px; color: var(--fg-3); font-weight: 600; margin-bottom: 3px; }
.ng-detail-field .v { font-size: 15px; color: var(--fg-1); font-weight: 600; }
.ng-detail-field .vsub { font-size: 12px; color: var(--fg-4); margin-top: 2px; }
.ng-section-title { font-size: 15px; font-weight: 700; color: var(--fg-1); margin: 0 0 12px; }
.ng-limit-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--n-25); border: 1px solid var(--border-subtle); border-radius: 10px; font-size: 13.5px; }
.ng-limit-row .ln { font-weight: 700; color: var(--fg-1); }
.ng-limit-row .lv { color: var(--fg-3); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Profil utilisateur */
.ng-profile { display: flex; flex-direction: column; gap: 18px; }
.ng-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.ng-profile-main,
.ng-profile-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ng-profile-identity { overflow: hidden; }
.ng-profile-identity .ng-card-body { background: linear-gradient(180deg, var(--n-25), #fff 72%); }
.ng-profile-hero { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ng-profile-avatar { width: 64px; height: 64px; border-radius: 16px; font-size: 20px; font-weight: 900; }
.ng-profile-hero-copy { min-width: 0; flex: 1; }
.ng-profile-name { font-size: 22px; font-weight: 800; color: var(--fg-1); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-profile-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; color: var(--fg-3); font-size: 13px; font-weight: 600; }
.ng-profile-meta span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.ng-profile-meta .lucide { width: 15px; height: 15px; color: var(--fg-4); flex-shrink: 0; }
.ng-profile-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.ng-profile-form .dn-auth-err { color: var(--danger); font-size: 12px; font-weight: 600; margin: 2px 0 0; }
.ng-profile-status-list { display: flex; flex-direction: column; gap: 12px; }
.ng-profile-status { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border-subtle); border-radius: 11px; background: var(--n-25); }
.ng-profile-status-title { color: var(--fg-1); font-size: 13.5px; font-weight: 800; }
.ng-profile-status p { color: var(--fg-3); font-size: 12.5px; line-height: 1.45; margin: 3px 0 0; }

/* Swatch (fondations) */
.ng-sw { border-radius: 10px; height: 64px; border: 1px solid rgba(18,22,19,0.10); display: flex; align-items: flex-end; padding: 7px 9px; }
.ng-sw .hex { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; }

/* =============================================================================
   Notifications (toasts) — glissent depuis le haut, disparaissent après 3 s
   ============================================================================= */
.ng-notice-stack { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.ng-notice {
  display: flex; align-items: flex-start; gap: 11px; width: 380px; max-width: calc(100vw - 32px);
  padding: 12px 12px 12px 14px; border-radius: 12px; background: #fff;
  border: 1px solid var(--border-default); box-shadow: var(--shadow-lg);
  pointer-events: auto; animation: ng-notice-in var(--dur-base) var(--ease-out);
}
.ng-notice.is-leaving { animation: ng-notice-out 220ms var(--ease-out) forwards; }
.ng-notice-ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--n-50); color: var(--fg-4); }
.ng-notice-ic .lucide { width: 17px; height: 17px; }
.ng-notice-body { flex: 1; min-width: 0; }
.ng-notice-title { font-size: 13.5px; font-weight: 700; color: var(--fg-1); line-height: 1.3; }
.ng-notice-msg { font-size: 12.5px; color: var(--fg-3); margin-top: 1px; line-height: 1.4; }
.ng-notice-close { flex-shrink: 0; width: 24px; height: 24px; border: 0; background: none; border-radius: 6px; color: var(--fg-4); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ng-notice-close:hover { background: var(--n-50); color: var(--fg-2); }
.ng-notice-close .lucide { width: 15px; height: 15px; }
/* Tons */
.ng-notice.success { border-color: var(--ng-green-200); }
.ng-notice.success .ng-notice-ic { background: var(--ng-green-50); color: var(--ng-green-600); }
.ng-notice.info { border-color: var(--info-border); }
.ng-notice.info .ng-notice-ic { background: var(--ng-blue-50); color: var(--ng-blue-500); }
.ng-notice.error { border-color: var(--danger-border); }
.ng-notice.error .ng-notice-ic { background: var(--danger-bg); color: var(--danger); }
@keyframes ng-notice-in { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ng-notice-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-14px); } }

/* =============================================================================
   Écran de connexion (verrou côté client) + mini-jeu de pied de page
   ============================================================================= */
.dn-auth { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 40px 24px 0; overflow-y: auto;
  background: radial-gradient(circle at 30% 20%, rgba(18,121,20,0.14) 0%, transparent 55%), var(--ink); }
.dn-auth-card { flex-shrink: 0; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg-surface); border-radius: 16px; padding: 34px 32px 30px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04); }
.dn-auth-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--ng-green-700); }
.dn-auth-title { margin: 2px 0 0; font-size: 24px; font-weight: 800; color: var(--fg-1); letter-spacing: -0.01em; line-height: 1.15; }
.dn-auth-sub { margin: 4px 0 10px; color: var(--fg-3); font-size: 13.5px; line-height: 1.5; }
.dn-auth-label { font-size: 12px; font-weight: 700; color: var(--fg-2); margin-bottom: -6px; }
.dn-auth-input { font-family: var(--font-sans); font-size: 14px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 10px; background: #fff; box-shadow: var(--shadow-inset); outline: none; transition: border-color 120ms, box-shadow 120ms; }
.dn-auth-input:focus { border-color: var(--ng-green-500); box-shadow: var(--shadow-inset), var(--shadow-focus); }
.dn-auth-input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(178,58,36,0.18); }
.dn-auth-err { color: var(--danger); font-size: 12.5px; margin-top: -4px; font-weight: 600; }
.dn-auth-btn { background: var(--ng-green-500); color: #fff; border: 1px solid var(--ng-green-600); border-radius: 10px; padding: 11px 16px; font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 6px; transition: background 120ms, transform 120ms; font-family: inherit; }
.dn-auth-btn:hover { background: var(--ng-green-600); }
.dn-auth-btn:active { background: var(--ng-green-700); transform: translateY(1px); }
.dn-game { margin-top: auto; width: 100%; max-width: 980px; display: flex; flex-direction: column; }
.dn-game-canvas { width: 100%; height: auto; display: block; background: var(--ink); border: 1px solid rgba(255,255,255,0.08); border-bottom: 0; border-radius: 14px 14px 0 0; image-rendering: pixelated; }
.dn-game-hud { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-top: 0; border-radius: 0 0 14px 14px; padding: 12px 18px 14px; color: rgba(255,255,255,0.72); font-size: 12px; line-height: 1.5; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.dn-game-hud-title { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--ng-green-300); }
.dn-game-hud-mission { color: rgba(238,241,239,0.85); font-weight: 500; text-align: center; max-width: 720px; }
.dn-game-hud-mission b { color: #fff; font-weight: 700; }
.dn-game-hud-controls { display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; color: rgba(255,255,255,0.65); font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; }
.dn-game-hud-tip { font-size: 11px; color: rgba(255,255,255,0.45); font-style: italic; text-align: center; }
.dn-game-hud kbd { font-family: var(--font-mono); background: rgba(46,146,51,0.14); border: 1px solid rgba(46,146,51,0.30); padding: 2px 7px; border-radius: 4px; font-size: 11px; color: var(--ng-green-300); margin-right: 4px; }
/* Bouton de déconnexion (pied de la barre latérale du navigateur) */
.ds-signout { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: #8E938C; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.ds-signout:hover { color: #fff; }
.ds-signout i[data-lucide] { width: 14px; height: 14px; }

/* =============================================================================
   Responsive — mobile & tablette (barre latérale en tiroir, grilles empilées)
   ============================================================================= */
.ng-menu-btn { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: -2px; border: 1px solid var(--border-default); border-radius: 8px; background: #fff; color: var(--fg-1); cursor: pointer; flex-shrink: 0; }
.ng-menu-btn .lucide { width: 18px; height: 18px; }
.ng-scrim { display: none; }

@media (max-width: 860px) {
  /* Barre latérale en tiroir hors-écran */
  .ng-app { grid-template-columns: 1fr; }
  .ng-app.is-collapsed { grid-template-columns: 1fr; }
  .ng-side { position: fixed; top: 0; left: 0; height: 100vh; width: 280px; max-width: 84vw;
    transform: translateX(-100%); transition: transform var(--dur-base) var(--ease-out);
    z-index: 80; box-shadow: var(--shadow-lg); }
  .ng-side.is-open { transform: translateX(0); }
  .ng-scrim { display: block; position: fixed; inset: 0; background: rgba(18,22,19,0.45); z-index: 70; }
  .ng-menu-btn { display: inline-flex; }

  /* Topbar */
  .ng-top { padding: 0 14px; gap: 10px; }
  .ng-search { display: none; }
  .ng-proj { max-width: 50vw; overflow: hidden; }
  .ng-year-select { min-width: 160px; }

  /* Contenu */
  .ng-page { padding: 16px 14px 36px; }
  .ng-page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .ng-page-head > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
  .ng-page-title { font-size: 22px; }

  /* Grilles → empilées */
  .ng-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ng-counters { grid-template-columns: repeat(2, 1fr); }
  .ng-split { grid-template-columns: 1fr !important; }
  .ng-filters { grid-template-columns: 1fr; }
  .ng-index-filter-grid { grid-template-columns: 1fr 1fr; }
  .ng-form-grid { grid-template-columns: 1fr; }
  .ng-form-grid .col-2 { grid-column: auto; }
  .ng-detail-grid { grid-template-columns: 1fr; }
  .ng-profile-grid { grid-template-columns: 1fr; }
  .ng-profile-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Héro */
  .ng-hero-card { padding: 22px 20px 24px; }
  .ng-hero-val { font-size: 38px; }

  /* Tableaux : défilement horizontal dans leur carte */
  .ng-card:has(> .ng-tbl) { overflow-x: auto !important; }
  .ng-card > .ng-tbl { min-width: 600px; }
  .ng-desktop-table { display: none; }
  .ng-mobile-list { display: block; }

  /* Stepper : défilement horizontal si besoin */
  .ng-stepper { overflow-x: auto; padding-bottom: 4px; }
  .ng-step { min-width: 92px; }
}

@media (max-width: 640px) {
  .ng-proj-wrap { display: none; }
  .ng-year-form { min-width: 0; flex: 1; }
  .ng-year-select { width: 100%; min-width: 0; }
}

@media (max-width: 520px) {
  .ng-kpi-grid { grid-template-columns: 1fr; }
  .ng-counters { grid-template-columns: 1fr; }
  .ng-index-filter-grid { grid-template-columns: 1fr; }
  .ng-index-filter-submit { flex-direction: row; }
  .ng-pagination { flex-direction: column; gap: 10px; align-items: stretch; }
  .ng-pagination .nav { justify-content: space-between; }
  .ng-profile-hero { align-items: flex-start; }
  .ng-profile-avatar { width: 52px; height: 52px; border-radius: 13px; font-size: 17px; }
  .ng-profile-name { font-size: 18px; white-space: normal; }
  .ng-profile-side { display: flex; }
  .ng-profile-meta { flex-direction: column; gap: 7px; }
  .ng-form-actions-right { justify-content: stretch; }
  .ng-form-actions-right .ng-btn { width: 100%; justify-content: center; }
}

/* =============================================================================
   Toasts / Notifications flash
   ============================================================================= */
@keyframes ng-toast-enter {
  from { opacity: 0; transform: translateX(12px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0)   scale(1); }
}
@keyframes ng-toast-leave {
  from { opacity: 1; transform: translateX(0)   scale(1); }
  to   { opacity: 0; transform: translateX(12px) scale(0.97); }
}

.ng-toast-stack {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  width: min(92vw, 28rem);
  pointer-events: none;
}

.ng-toast {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  pointer-events: auto;
  box-shadow: var(--shadow-md);
}
.ng-toast-enter {
  animation: ng-toast-enter 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ng-toast.is-leaving {
  animation: ng-toast-leave 200ms cubic-bezier(0.4, 0, 1, 1) both;
}

.ng-toast-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
}

.ng-toast-ic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
}
.ng-toast-ic .lucide { width: 16px; height: 16px; }

.ng-toast-text { display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.ng-toast-title { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.ng-toast-msg   { margin: 0; font-size: 13px; color: var(--fg-2); line-height: 1.45; }

.ng-toast-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--fg-4);
  flex-shrink: 0;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.ng-toast-close:hover { background: rgba(0,0,0,0.07); color: var(--fg-1); }
.ng-toast-close .lucide { width: 14px; height: 14px; }

.ng-toast-bar      { height: 3px; background: rgba(0,0,0,0.07); }
.ng-toast-progress { height: 100%; width: 100%; transform-origin: left; }

@media (max-width: 600px) {
  .ng-toast-stack { top: 4.5rem; right: 0.75rem; left: 0.75rem; width: auto; }
}

/* ── Row Menu (menu contextuel ⋮ dans les tableaux) ──────────────────────── */
.ng-row-menu-th { width: 44px; }

.ng-row-menu-cell {
  width: 44px;
  text-align: center;
  padding: 0 8px !important;
}

.ng-row-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ng-row-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
  padding: 0;
}
.ng-row-menu-btn:hover,
.ng-row-menu-btn.is-active {
  background: var(--n-50);
  color: var(--fg-1);
  border-color: var(--n-200);
}
.ng-row-menu-btn .lucide { width: 16px; height: 16px; }

.ng-row-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
  min-width: 152px;
  z-index: 200;
  padding: 4px;
  animation: ng-row-menu-in var(--dur-fast) ease;
}
@keyframes ng-row-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)  scale(1); }
}

.ng-row-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-1);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast);
}
.ng-row-menu-item:hover { background: var(--n-50); }
.ng-row-menu-item .lucide { width: 15px; height: 15px; color: var(--fg-3); flex-shrink: 0; }

.ng-row-menu-item--danger { color: var(--danger); }
.ng-row-menu-item--danger .lucide { color: var(--danger); }
.ng-row-menu-item--danger:hover { background: var(--danger-bg); }

.ng-row-menu-item--ok { color: var(--ok); }
.ng-row-menu-item--ok .lucide { color: var(--ok); }
.ng-row-menu-item--ok:hover { background: var(--ok-bg); }

.ng-row-menu-sep {
  border: none;
  border-top: 1px solid var(--n-100);
  margin: 4px 0;
}
