/* ==========================================================================
   Le Hub by Belacom — design system « lehub »
   Objectif : lisibilité. Une seule famille de composants, peu de couleurs,
   des textes à taille normale, une hiérarchie claire (titre > sous-titre > corps).
   ========================================================================== */

:root {
  /* Surfaces & bordures */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --surface-3: #EEF0F3;
  --border: #E4E7EC;
  --border-strong: #CBD1DA;

  /* Texte */
  --text: #1B1F24;
  --text-2: #3F4854;
  --muted: #6B7280;
  --muted-2: #9AA3AF;

  /* Marque Belacom (le turquoise d'origine, assombri pour le texte) */
  --brand: #32DBC4;
  --accent: #0E9F8A;
  --accent-strong: #0B8574;
  --accent-soft: #E3F8F4;
  --accent-ring: rgba(14, 159, 138, .25);

  /* Couleur du client (injectée au login par hub-sdk) */
  --client-color: #32DBC4;
  --client-color-light: rgba(50, 219, 196, .14);

  /* Sémantique */
  --success: #15803D; --success-soft: #DCFCE7;
  --warning: #B45309; --warning-soft: #FEF3C7;
  --danger:  #B91C1C; --danger-soft:  #FEE2E2;
  --info:    #1D4ED8; --info-soft:    #DBEAFE;

  /* Palette Belacom conservée pour les phases / secteurs (en teintes douces) */
  --jaune: #FEE7AA; --vert-eau: #32DBC4; --vert-clair: #9DF9C5;
  --rose: #EE9BA6; --bleu-ciel: #B4DFFC; --violet: #CBB4FC; --orange: #FDBA74;
  --noir: #1B1F24; --blanc: #FFFFFF;

  /* Rythme */
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 6px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 16px 40px rgba(16, 24, 40, .14);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', 'Inter', system-ui, sans-serif;

  --sidebar-w: 248px;
}

/* --------------------------------------------------------------------------
   Reset léger
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.25; margin: 0; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; } h4 { font-size: 14px; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, canvas { max-width: 100%; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   Coquille applicative : barre latérale + contenu
   -------------------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 32px 64px; }
.page-wide { max-width: 1480px; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 16px; gap: 20px; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.sidebar-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--noir); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 700; font-size: 13px;
}
.sidebar-brand-name { font-family: var(--font-head); font-weight: 600; font-size: 15px; line-height: 1.1; }
.sidebar-brand-sub { font-size: 12px; color: var(--muted); }

.sidebar-tenant {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.sidebar-tenant-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--client-color); flex-shrink: 0; box-shadow: 0 0 0 3px var(--client-color-light); }
.sidebar-tenant-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-tenant-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 4px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px; text-decoration: none; transition: background .12s, color .12s;
}
.nav-link i { width: 18px; text-align: center; font-size: 14px; color: var(--muted); }
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.nav-link.active i { color: var(--accent-strong); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--client-color); color: var(--noir);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.sidebar-user-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 12px; color: var(--muted); }

/* Barre mobile (remplace la sidebar sous 960px) */
.topbar { display: none; }
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(27, 31, 36, .35); z-index: 55; }
  .topbar {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
  }
  .topbar-title { font-family: var(--font-head); font-weight: 600; }
  .page { padding: 20px 16px 48px; }
}

/* --------------------------------------------------------------------------
   En-tête de page
   -------------------------------------------------------------------------- */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-header h1 { font-size: 24px; }
.page-header .eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.page-header .lead { color: var(--muted); margin-top: 6px; max-width: 640px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Cartes & sections
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 22px;
}
.card-sm { padding: 16px; }
.card-flat { box-shadow: none; }
.card-dark { background: var(--noir); color: #fff; border-color: var(--noir); }
.card-dark .muted { color: rgba(255, 255, 255, .6); }
.card-dark h2, .card-dark h3 { color: #fff; }
.card-accent { background: var(--accent-soft); border-color: #C9EFE7; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--accent); font-size: 14px; }
.card-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

.section { margin-bottom: 28px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { font-size: 16px; }
.section-title .hint { color: var(--muted); font-size: 13px; }

/* Cartes cliquables (outils, références…) */
.card-link {
  display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, border-color .15s, transform .15s;
}
.card-link:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-selectable { cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.card-selectable:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-selectable.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: #FAFFFE; }

/* --------------------------------------------------------------------------
   Grilles & mises en page
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.layout-side-left { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.layout-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.sticky { position: sticky; top: 24px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { gap: 8px; } .stack-lg { gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-right { text-align: right; } .text-center { text-align: center; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .strong { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scroll-y { overflow-y: auto; } .scroll-x { overflow-x: auto; }
@media (max-width: 1100px) { .layout-side, .layout-side-left, .layout-split { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .sticky { position: static; } }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s, transform .05s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: var(--muted-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--noir); color: #fff; border-color: var(--noir); }
.btn-primary:hover { background: #2B3138; border-color: #2B3138; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-danger { color: var(--danger); border-color: #F5C2C2; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-icon { padding: 7px; width: 32px; height: 32px; border-radius: 8px; }
.btn-icon.btn-sm { width: 28px; height: 28px; padding: 5px; }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.help { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); font-size: 14px; color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.input-num { text-align: right; font-variant-numeric: tabular-nums; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input-group { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input-group .input { border: 0; border-radius: 0; box-shadow: none; }
.input-group .addon { padding: 0 12px; color: var(--muted); font-size: 13px; background: var(--surface-2); align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--border); }
.search { position: relative; }
.search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 13px; }
.search .input { padding-left: 34px; }

.choice { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--surface); transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--border-strong); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice.selected, .choice:has(input:checked) { border-color: var(--accent); background: #FAFFFE; }
.choice-title { font-weight: 600; font-size: 13.5px; }
.choice-sub { color: var(--muted); font-size: 12.5px; }

/* Boutons-pilules de filtre (objectif, secteur…) */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: all .12s; white-space: nowrap;
}
.chip:hover { border-color: var(--muted-2); background: var(--surface-2); }
.chip.active { background: var(--noir); color: #fff; border-color: var(--noir); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* --------------------------------------------------------------------------
   Onglets
   -------------------------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 14px; border: 0; background: none; color: var(--muted); font-weight: 500; font-size: 13.5px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color .12s, border-color .12s; display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--noir); font-weight: 600; }
.tab .count { font-size: 11px; background: var(--surface-3); color: var(--muted); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.tab.active .count { background: var(--noir); color: #fff; }

/* Onglets « segment » (petits groupes) */
.segment { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.segment button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.segment button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }

/* --------------------------------------------------------------------------
   Étapes (wizard)
   -------------------------------------------------------------------------- */
.stepper { display: flex; align-items: center; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.step { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 9px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step:hover { color: var(--text); }
.step.active { background: var(--noir); color: #fff; font-weight: 600; }
.step.active .step-num { background: var(--brand); color: var(--noir); }
.step.completed .step-num { background: var(--success-soft); color: var(--success); }
.step-sep { width: 18px; height: 1px; background: var(--border-strong); flex-shrink: 0; }
@media (max-width: 760px) { .step span.step-label { display: none; } }

/* --------------------------------------------------------------------------
   Badges, statuts, indicateurs
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge-accent { background: var(--accent-soft); color: var(--accent-strong); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.badge-dark { background: var(--noir); color: #fff; }
.badge-tint { color: var(--noir); }  /* utiliser avec style="background:<couleur>" */

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat-value { font-family: var(--font-head); font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 4px; font-family: var(--font); }
.stat-sub { font-size: 12.5px; color: var(--muted); }

.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.progress-client > div { background: var(--client-color); }
.progress-lg { height: 12px; }

.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* --------------------------------------------------------------------------
   Listes
   -------------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: inherit; text-decoration: none; transition: border-color .12s, background .12s;
}
a.list-item:hover { border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.list-item .icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface-3); font-size: 15px; }
.list-item-title { font-weight: 600; font-size: 13.5px; }
.list-item-sub { font-size: 12.5px; color: var(--muted); }
.list-compact .list-item { padding: 8px 10px; }

.empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }

/* Accordéon (pôles du référentiel, groupes) */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.accordion-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; cursor: pointer; user-select: none; background: var(--surface); }
.accordion-head:hover { background: var(--surface-2); }
.accordion-head h4 { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.accordion-body { padding: 12px 16px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* Timeline verticale */
.timeline { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 16px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); }
.timeline-item.done::before { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.timeline-item.current::before { background: var(--warning); box-shadow: 0 0 0 1px var(--warning); }
.timeline-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 2px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Tableaux
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .input, .table .select { padding: 6px 8px; font-size: 13px; border-radius: 8px; min-width: 70px; }
.table .input-num { text-align: center; }
.table th.center, .table td.center { text-align: center; }

/* --------------------------------------------------------------------------
   Notifications, panneaux latéraux, bannières
   -------------------------------------------------------------------------- */
.toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--noir); color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease-out; font-size: 13px;
}
.toast i { color: var(--brand); margin-top: 2px; }
.toast strong { display: block; font-weight: 600; }
.toast span { color: rgba(255, 255, 255, .75); }
.toast.toast-error i { color: #FCA5A5; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.save-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.save-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.save-status.saving::before { background: var(--warning); animation: pulse 1s infinite; }
.save-status.saved::before { background: var(--success); }
.save-status.error { color: var(--danger); } .save-status.error::before { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 20px; }
.banner i { font-size: 15px; }
.banner-info { background: var(--info-soft); color: var(--info); }
.banner-warning { background: var(--warning-soft); color: var(--warning); }
.banner-locked { background: var(--surface-3); color: var(--text-2); }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(27, 31, 36, .4); z-index: 90; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(560px, 100%); background: var(--surface); z-index: 100;
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 24px; overflow-y: auto; flex: 1; }

.overlay-loading { position: fixed; inset: 0; background: rgba(244, 245, 247, .8); z-index: 500; display: flex; align-items: center; justify-content: center; }
.overlay-loading .box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; font-weight: 600; box-shadow: var(--shadow-md); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bouton d'action flottant (valider une version) */
.fab-bar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 900; display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-lg); }
@media (max-width: 960px) { .fab-bar { left: 16px; right: 16px; transform: none; justify-content: space-between; } }

/* Impression / export : masquer ce qui ne doit pas apparaître dans les PNG */
@media print { .no-print, .sidebar, .topbar, .fab-bar, .toast-host { display: none !important; } .page { padding: 0; max-width: none; } }

/* Détails repliables (progressive disclosure) */
details.disclosure { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
details.disclosure > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: '\f078'; font-family: 'Font Awesome 7 Free', 'Font Awesome 6 Free'; font-weight: 900; font-size: 11px; color: var(--muted); transition: transform .15s; }
details.disclosure[open] > summary::after { transform: rotate(180deg); }
details.disclosure > .disclosure-body { padding: 0 16px 16px; }

/* Infobulle (tooltip) : petite icône, conseil en overlay au survol / focus / tap */
.tip { position: relative; display: inline-flex; flex-shrink: 0; }
.tip-icon {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--muted); font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: help;
  padding: 0; font-family: inherit; transition: background .15s, color .15s, border-color .15s;
}
.tip-icon:hover, .tip:focus-within .tip-icon, .tip.open .tip-icon { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }
.tip-icon:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 1px; }
.tip-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 280px; max-width: min(280px, 80vw);
  padding: 12px 14px; border-radius: var(--radius); background: var(--noir); color: var(--blanc);
  font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
  pointer-events: none;
}
.tip-panel::before { content: ''; position: absolute; right: 8px; top: -5px; width: 10px; height: 10px; background: var(--noir); transform: rotate(45deg); }
.tip-panel .tip-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); margin-bottom: 4px; }
.tip:hover .tip-panel, .tip:focus-within .tip-panel, .tip.open .tip-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }

.fade-in { animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Sélecteur de client (comptes Belacom) ---- */
.sidebar-switch { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-switch .label { font-size: 11px; }
.sidebar-switch .select { width: 100%; font-size: 12.5px; padding: 6px 30px 6px 10px; }

/* ---- Livrables par section (tableau de bord) ---- */
.livrables-section + .livrables-section { margin-top: 14px; }
.livrables-section .section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.livrables-section .section-head .icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.livrables-section .section-head h4 { flex: 1; font-size: 13.5px; font-weight: 600; margin: 0; }
.livrables-section .empty { padding: 12px; font-size: 12.5px; }
.livrables-section .list-item .btn-icon { width: 30px; height: 30px; flex-shrink: 0; }
