/* ============================================================
   TFB HUB — DESIGN SYSTEM
   Trendy Foods Belgium — Charte graphique unifiée
   Version : 1.0 — Avril 2026
   Usage : importer dans tous les outils du Hub
   <link rel="stylesheet" href="/shared/design-system.css">
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   1. TOKENS — Variables CSS
   ============================================================ */
:root {

  /* --- Couleurs primaires TFB --- */
  --red:          #E31E24;
  --red-dark:     #C01820;
  --red-light:    rgba(227, 30, 36, .08);
  --red-light-2:  rgba(227, 30, 36, .04);
  --blue:         #1B75BC;
  --blue-dark:    #1258A0;
  --blue-light:   rgba(27, 117, 188, .08);
  --blue-light-2: rgba(27, 117, 188, .04);

  /* --- Couleurs neutres --- */
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #58595B;
  --gray-500: #6B7280;
  --gray-400: #939598;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;

  /* --- Couleurs sémantiques --- */
  --success:       #16A34A;
  --success-light: rgba(22, 163, 74, .10);
  --warning:       #D97706;
  --warning-light: rgba(217, 119, 6, .10);
  --danger:        #E31E24;
  --danger-light:  rgba(227, 30, 36, .08);
  --info:          #1B75BC;
  --info-light:    rgba(27, 117, 188, .08);

  /* --- Surfaces --- */
  --bg-app:     #F4F6F8;
  --bg-card:    #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-dark:    #111827;

  /* --- Texte --- */
  --text:         #111827;
  --text-2:       #475569;
  --text-muted:   #94A3B8;
  --text-inverse: #FFFFFF;

  /* --- Bordures --- */
  --border:       #E2E8F0;
  --border-focus: #1B75BC;

  /* --- Espacement --- */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  20px;
  --s6:  24px;
  --s8:  32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;

  /* --- Radius --- */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-full: 9999px;

  /* --- Ombres --- */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.03);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.10), 0 8px 10px rgba(0,0,0,.04);

  /* --- Transitions --- */
  --t: 150ms cubic-bezier(.4, 0, .2, 1);
  --t-slow: 250ms cubic-bezier(.4, 0, .2, 1);

  /* --- Sidebar --- */
  --sidebar-width: 220px;
  --topbar-height: 60px;

  /* --- Z-index --- */
  --z-dropdown: 100;
  --z-sidebar:  150;
  --z-modal:    200;
  --z-toast:    300;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-app);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ============================================================
   3. TYPOGRAPHIE
   ============================================================ */
.h1 { font-size: 36px; font-weight: 900; line-height: 1.1; letter-spacing: -.5px; }
.h2 { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }
.h3 { font-size: 24px; font-weight: 700; line-height: 1.3; }
.h4 { font-size: 20px; font-weight: 700; line-height: 1.4; }
.h5 { font-size: 17px; font-weight: 700; line-height: 1.4; }
.h6 { font-size: 15px; font-weight: 700; line-height: 1.5; }

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg   { font-size: 17px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }
.text-3xl  { font-size: 30px; }
.text-4xl  { font-size: 36px; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }
.font-black    { font-weight: 900; }

.label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
}

.text-primary   { color: var(--text); }
.text-secondary { color: var(--text-2); }
.text-muted     { color: var(--text-muted); }
.text-red       { color: var(--red); }
.text-blue      { color: var(--blue); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }

/* ============================================================
   4. LAYOUT — Coque Hub
   ============================================================ */
.hub-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.hub-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: var(--z-sidebar);
  box-shadow: var(--shadow-sm);
}

.hub-sidebar-logo {
  padding: var(--s4) var(--s4) var(--s4);
  border-bottom: 2px solid var(--red);
  display: flex;
  align-items: center;
  min-height: 72px;
}

.hub-sidebar-logo img {
  height: 56px;
  width: auto;
}

.hub-sidebar-nav {
  flex: 1;
  padding: var(--s3) 0;
  overflow-y: auto;
}

.hub-nav-section {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text-muted);
  padding: var(--s4) var(--s4) var(--s2);
  margin-top: var(--s2);
}

.hub-nav-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 9px var(--s4);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
  border-left: 3px solid transparent;
  text-decoration: none;
  position: relative;
}

.hub-nav-item:hover {
  color: var(--text);
  background: var(--red-light);
  text-decoration: none;
}

.hub-nav-item.active {
  color: #fff;
  background: var(--red);
  border-left-color: var(--red-dark);
  font-weight: 600;
}

.hub-nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}

.hub-nav-item.active .hub-nav-badge {
  background: rgba(255,255,255,.3);
}

/* Contenu principal */
.hub-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.hub-topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s6);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.hub-topbar-left { display: flex; flex-direction: column; gap: 2px; }
.hub-topbar-title { font-size: 20px; font-weight: 800; color: var(--text); }
.hub-topbar-right { display: flex; align-items: center; gap: var(--s3); }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb-sep { color: var(--gray-300); }
.breadcrumb-item.active { color: var(--text-2); font-weight: 600; }

/* Zone de contenu */
.hub-content {
  flex: 1;
  padding: var(--s6);
}

/* ============================================================
   5. KPI BAND
   ============================================================ */
.kpi-band {
  background: linear-gradient(135deg, var(--red) 0%, #8B1A6B 40%, var(--blue-dark) 100%);
  border-radius: var(--r-lg);
  padding: var(--s6) var(--s8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s6);
  margin-bottom: var(--s6);
}

.kpi-band-item { position: relative; }

.kpi-band-item + .kpi-band-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--s3));
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255,255,255,.15);
}

.kpi-band-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: rgba(255,255,255,.65);
  margin-bottom: var(--s2);
}

.kpi-band-value {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}

.kpi-band-trend {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  margin-top: var(--s2);
}

.kpi-band-trend.up   { color: #86EFAC; }
.kpi-band-trend.down { color: #FCA5A5; }

/* ============================================================
   6. CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s5);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
}

.card-title   { font-size: 15px; font-weight: 700; }
.card-subtitle { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.card-footer {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tool card (Hub home) */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5);
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.tool-card.red  { background: var(--red-light-2);  border-left: 4px solid var(--red); }
.tool-card.blue { background: var(--blue-light-2); border-left: 4px solid var(--blue); }
.tool-card.red:hover  { background: var(--red-light); }
.tool-card.blue:hover { background: var(--blue-light); }

.tool-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: var(--s3);
}

.tool-card.red  .tool-card-icon { background: var(--red-light);  color: var(--red); }
.tool-card.blue .tool-card-icon { background: var(--blue-light); color: var(--blue); }

.tool-card-name { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.tool-card-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; }

.tool-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--border);
}

.tool-card-kpi       { font-size: 24px; font-weight: 900; }
.tool-card-kpi-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); }

/* KPI card standalone */
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s6);
  box-shadow: var(--shadow-sm);
}

.kpi-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: var(--s2); }
.kpi-card-value { font-size: 36px; font-weight: 900; color: var(--text); line-height: 1; }
.kpi-card-trend { font-size: 12px; font-weight: 600; margin-top: var(--s2); }
.kpi-card-trend.up   { color: var(--success); }
.kpi-card-trend.down { color: var(--red); }

/* ============================================================
   7. BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--r-md);
  line-height: 1;
}

.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Tailles */
.btn-sm  { font-size: 12px; padding: 6px 12px; }
.btn-md  { font-size: 14px; padding: 9px 18px; }
.btn-lg  { font-size: 15px; padding: 12px 24px; }
.btn-xl  { font-size: 16px; padding: 14px 28px; }

/* Variantes */
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(227,30,36,.30);
}
.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: 0 4px 14px rgba(227,30,36,.40);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(27,117,188,.25);
}
.btn-secondary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
  text-decoration: none;
}

.btn-subtle {
  background: var(--gray-100);
  color: var(--text-2);
}
.btn-subtle:hover {
  background: var(--gray-200);
  color: var(--text);
  text-decoration: none;
}

.btn-danger {
  background: var(--danger-light);
  color: var(--red);
  border: 1.5px solid rgba(227,30,36,.2);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   8. BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  letter-spacing: .2px;
  white-space: nowrap;
}

.badge-red     { background: var(--danger-light);  color: var(--red-dark); }
.badge-blue    { background: var(--info-light);    color: var(--blue-dark); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-gray    { background: var(--gray-100);      color: var(--gray-600); }
.badge-dark    { background: var(--gray-900);      color: #fff; }

.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

/* ============================================================
   9. FORMULAIRES
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-hint  { font-size: 11px; color: var(--text-muted); }
.form-error { font-size: 11px; color: var(--red); font-weight: 500; }

.input, .select, .textarea {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 13px;
  outline: none;
  transition: all var(--t);
  width: 100%;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,117,188,.12);
}

.input.error { border-color: var(--red); }
.input.error:focus { box-shadow: 0 0 0 3px rgba(227,30,36,.12); }

.textarea { resize: vertical; min-height: 96px; }

/* Input avec icône */
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 38px; }
.input-wrap .input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: var(--s3); cursor: pointer; user-select: none; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--gray-300);
  border-radius: var(--r-full);
  transition: var(--t);
}
.toggle-thumb {
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--t);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked ~ .toggle-track { background: var(--blue); }
.toggle input:checked ~ .toggle-track + .toggle-thumb,
.toggle input:checked + .toggle-track + .toggle-thumb { transform: translateX(18px); }

/* ============================================================
   10. TABLE
   ============================================================ */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table thead th {
  background: var(--gray-50);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--text);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr:hover td {
  background: rgba(27,117,188,.03);
}

.table-actions { display: flex; align-items: center; gap: var(--s2); }

/* ============================================================
   11. ALERTES
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  font-size: 14px;
  border-left: 4px solid;
}

.alert-icon { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.alert-title { font-weight: 700; margin-bottom: 2px; font-size: 14px; }
.alert-desc  { font-size: 13px; opacity: .85; }

.alert-info    { background: var(--info-light);    border-color: var(--blue);    color: var(--blue-dark); }
.alert-success { background: var(--success-light); border-color: var(--success); color: #14532D; }
.alert-warning { background: var(--warning-light); border-color: var(--warning); color: #78350F; }
.alert-danger  { background: var(--danger-light);  border-color: var(--red);     color: var(--red-dark); }

/* ============================================================
   12. PROGRESS BARS
   ============================================================ */
.progress {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-lg { height: 10px; }

.progress-bar {
  height: 100%;
  border-radius: var(--r-full);
  transition: width .5s ease;
}

.progress-bar.red   { background: linear-gradient(90deg, var(--red-dark), var(--red)); }
.progress-bar.blue  { background: linear-gradient(90deg, var(--blue-dark), var(--blue)); }
.progress-bar.green { background: linear-gradient(90deg, #15803D, var(--success)); }

/* ============================================================
   13. AVATAR
   ============================================================ */
.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: var(--blue);
  color: #fff;
  flex-shrink: 0;
}

.avatar-sm  { width: 28px; height: 28px; font-size: 11px; }
.avatar-md  { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 16px; }
.avatar-red { background: var(--red); }

/* ============================================================
   14. TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  padding: 3px;
  border-radius: var(--r-md);
  width: fit-content;
}

.tab {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  border-radius: calc(var(--r-md) - 2px);
  cursor: pointer;
  transition: all var(--t);
  border: none;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.tab:hover { color: var(--text); background: rgba(255,255,255,.6); }

.tab.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Tabs underline style */
.tabs-line {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.tab-line {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--t);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Outfit', sans-serif;
}

.tab-line:hover { color: var(--text); }
.tab-line.active { color: var(--red); border-bottom-color: var(--red); font-weight: 700; }

/* ============================================================
   15. EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--s12) var(--s6);
}

.empty-icon  { font-size: 40px; opacity: .4; margin-bottom: var(--s3); }
.empty-title { font-size: 16px; font-weight: 700; margin-bottom: var(--s2); }
.empty-desc  { font-size: 14px; color: var(--text-2); max-width: 320px; margin-bottom: var(--s5); }

/* ============================================================
   16. SKELETON LOADER
   ============================================================ */
@keyframes tfb-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(90deg,
    var(--gray-100) 25%,
    var(--gray-50) 50%,
    var(--gray-100) 75%
  );
  background-size: 1200px 100%;
  animation: tfb-shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

/* ============================================================
   17. SYNC INDICATOR (ERP)
   ============================================================ */
.sync-indicator {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.sync-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.sync-dot.syncing { background: var(--warning); animation: tfb-pulse 1s infinite; }
.sync-dot.error   { background: var(--red); }

@keyframes tfb-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ============================================================
   18. UTILITAIRES
   ============================================================ */

/* Flexbox */
.flex     { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--s1); }
.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }
.gap-6 { gap: var(--s6); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }

/* Espacement */
.mt-2 { margin-top: var(--s2); }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.mb-4 { margin-bottom: var(--s4); }
.mb-6 { margin-bottom: var(--s6); }
.p-4  { padding: var(--s4); }
.p-6  { padding: var(--s6); }

/* Divers */
.rounded    { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.shadow     { box-shadow: var(--shadow-md); }
.border     { border: 1px solid var(--border); }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full     { width: 100%; }
.cursor-pointer { cursor: pointer; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: var(--s4) 0; }
.divider-v { width: 1px; background: var(--border); align-self: stretch; }

/* ============================================================
   19. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hub-sidebar { transform: translateX(-100%); }
  .hub-sidebar.open { transform: translateX(0); }
  .hub-main { margin-left: 0; }
  .kpi-band { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hub-content { padding: var(--s4); }
  .kpi-band { grid-template-columns: 1fr 1fr; padding: var(--s4); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hub-topbar-title { font-size: 17px; }
}
