/* ProjectB&C — charte identique aux autres modules du portail (Tempo, InsightB&C, Ventes, DescenteOriane), 06/11/2026.
   Valeurs reprises de styles.css + theme-bc.css (mesurées sur InsightB&C et Tempo) : polices Barlow Semi Condensed /
   Source Sans 3, corps 15 px, titre 28 px, sous-titres 18 px, sur-titres ocre 12 px en capitales, cartes givrées
   arrondies à 12 px, cartes de chiffres à cadre jaune et bord gauche épais, boutons 13 px arrondis à 8 px, en-têtes de
   tableau jaunes soulignés d'anthracite, onglets en pastilles (actif jaune), barre latérale anthracite de 236 px (grand
   logo, module en jaune, ⊞, rubriques de 39 px, sous-rubriques à repère jaune, utilisateur et « Déconnexion » en bas),
   pas de bandeau blanc en haut, pied de page centré. Chargée en dernier par src/projets.js : elle ne fait que redéfinir. */
:root {
  --bc-jaune: #F6C611; --bc-jaune-vif: #FFD43B; --bc-jaune-fonce: #D9A900; --bc-anthracite: #383E42; --bc-nuit: #23282B;
  --side: 236px;
  --bg: #f2f1ed; --surface: #ffffff; --surface-2: #f3f2ee; --line: #e4e2dc; --line-strong: #cfccc3;
  --ink: #23282B; --muted: #5b6267; --accent: #383E42; --accent-text: #765c00; --accent-soft: #fdf6d6;
  --ok-bg: #eaf7ef; --ok: #1d7a44; --warn-bg: #fff1e7; --warn: #b4460c; --err-bg: #fdeeed; --err: #b42318;
  --glass: rgb(255 255 255 / .66); --glass-strong: rgb(255 255 255 / .86); --glass-line: rgb(255 255 255 / .78);
  --glass-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 1px 2px rgb(35 40 43 / .05), 0 12px 30px rgb(35 40 43 / .08);
  --blur: saturate(160%) blur(18px);
  --font-display: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-md: .9375rem; --fs-lg: 1.125rem; --fs-xl: 1.5rem;
}
html body {
  margin: 0; font: 400 var(--fs-md)/1.45 var(--font-body); color: var(--ink);
  background:
    radial-gradient(1000px 560px at 10% -10%, rgb(246 198 17 / .22), transparent 62%),
    radial-gradient(900px 640px at 105% 0%, rgb(56 62 66 / .10), transparent 60%),
    radial-gradient(760px 520px at 55% 118%, rgb(246 198 17 / .12), transparent 60%),
    linear-gradient(180deg, #f5f4f0, #ecebe6);
  background-attachment: fixed;
}
::selection { background: rgb(246 198 17 / .45); color: var(--bc-nuit); }
html body a { color: var(--accent-text); }
html body button, html body input, html body select, html body textarea { font-family: var(--font-body); }

/* ---------- Titres et textes ---------- */
html body h1, html body h2, html body h3, html body h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: 0; }
html body h1, html body .page-heading h1, html body .hub-heading h1, html body .plan-heading h1 { font-size: 28px; font-weight: 700; line-height: 1.1; margin: 2px 0 4px; }
html body h2, html body .section-head h2, html body .hub-panel h2, html body .bcit-section h2 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; margin: 0 0 12px; }
html body h3 { font-size: 16px; font-weight: 600; }
html body .eyebrow, html body .hub-chip, html body .bcit-eyebrow, html body .hub-kicker, html body .stat-label, html body .bcit-section > span {
  font: 600 var(--fs-xs)/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text);
}
html body .subtitle, html body .hub-help, html body .section-head p { color: var(--muted); font-size: var(--fs-md); }
html body small { color: var(--muted); }

/* ---------- Barre latérale (identique aux autres modules) ---------- */
html body .sidebar {
  width: var(--side); padding: 0; gap: 0; overflow-y: auto; overflow-x: hidden; color: #fff; z-index: 30;
  background: linear-gradient(180deg, rgb(43 47 50 / .97), rgb(35 40 43 / .98));
  border-right: 1px solid rgb(255 255 255 / .06); box-shadow: 8px 0 30px rgb(20 24 26 / .18);
  scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .2) transparent;
}
html body .main { margin-left: var(--side); background: transparent; min-height: 100vh; }
.pbc-portail { display: flex; justify-content: center; padding: 18px 16px 2px; }
.pbc-portail img { width: 112px; height: 112px; border-radius: 8px; box-shadow: 0 10px 26px rgb(0 0 0 / .4); display: block; }
html body .sidebar .brand {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px 10px; margin: 0; padding: 12px 16px 14px;
  border-bottom: 1px solid rgb(255 255 255 / .08); text-decoration: none; letter-spacing: 0; cursor: pointer;
  font: 700 18px/1.15 var(--font-display); color: var(--bc-jaune);
}
html body .sidebar .brand:hover { background: rgb(255 255 255 / .04); }
/* Hauteurs figées : un contenu passager de l'application (ancien logo, titre sur deux lignes) ne décale plus le menu */
html body .sidebar .brand { height: 58px; box-sizing: border-box; overflow: hidden; flex: none; }
html body .sidebar .workspace { height: 30px; box-sizing: border-box; overflow: hidden; white-space: nowrap; flex: none; }
html body .sidebar .brand img:not(.pbc-mark), html body .sidebar .brand .brand-name, html body .sidebar .brand .logo { display: none; }
.pbc-mark { width: 32px; height: 32px; display: block; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .4)); }
.pbc-nom { color: var(--bc-jaune); white-space: normal; }
.pbc-switch { color: var(--bc-jaune); font-size: 18px; padding: 2px 4px; border-radius: 6px; }
html body .sidebar .brand:hover .pbc-switch { background: rgb(246 198 17 / .15); }
/* Titres de section : nom du module, « Portefeuille » */
html body .sidebar .workspace, html body .sidebar .side-label {
  margin: 0; padding: 14px 20px 6px; background: none; border: 0; box-shadow: none; border-radius: 0;
  font: 700 10.5px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .42);
}
html body .sidebar .workspace span { display: none; }
html body .sidebar .side-label { display: flex; align-items: center; justify-content: space-between; padding-right: 14px; }
html body .sidebar .side-label button { background: transparent; color: var(--bc-jaune); border: 1px solid rgb(255 255 255 / .22); border-radius: 6px; width: 22px; height: 22px; padding: 0; display: grid; place-items: center; font-size: 14px; }
html body .sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 6px; margin: 0; }
html body .sidebar .nav {
  display: flex; align-items: center; gap: 9px; width: 100%; height: auto; min-height: 39px; margin: 0; padding: 9px 10px; border: 0; border-radius: 8px; box-shadow: none;
  background: transparent; color: rgb(255 255 255 / .86); font: 600 14.5px/1.3 var(--font-body); text-align: left; cursor: pointer;
}
html body .sidebar nav > * + * { margin-top: 0; }
html body .sidebar .nav:hover { background: rgb(255 255 255 / .07); color: #fff; }
html body .sidebar .nav.active { background: linear-gradient(180deg, var(--bc-jaune-vif), var(--bc-jaune)); color: var(--bc-nuit); box-shadow: 0 6px 16px rgb(246 198 17 / .22); }
html body .sidebar .nav small { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; text-align: center; background: rgb(255 255 255 / .12); color: #fff; font: 700 11.5px/1.5 var(--font-body); }
html body .sidebar .nav small:empty { display: none; }
html body .sidebar .nav.active small { background: var(--bc-nuit); color: var(--bc-jaune); }
/* Projets du portefeuille : comme les sous-rubriques dépliées (repère jaune à gauche) */
html body .sidebar #projectList { padding: 0 10px 10px 18px; display: flex; flex-direction: column; gap: 1px; }
html body .sidebar .side-project { color: rgb(255 255 255 / .72); border-radius: 6px; background: transparent; padding: 6px 10px; font: 600 13.5px/1.3 var(--font-body); border-left: 2px solid transparent; }
html body .sidebar .side-project:hover { background: rgb(255 255 255 / .06); color: #fff; }
html body .sidebar .side-project.selected { background: rgb(246 198 17 / .12); color: var(--bc-jaune); border-left-color: var(--bc-jaune); box-shadow: none; }
html body .sidebar .side-project .tiny-square { display: none; }
/* Bas de la barre : utilisateur et Déconnexion, comme les autres modules */
html body .sidebar .sidebar-bottom {
  margin-top: auto; padding: 12px 14px 14px; border-top: 1px solid rgb(255 255 255 / .08); background: rgb(0 0 0 / .14);
  color: rgb(255 255 255 / .6); font-size: 12px; border-radius: 0; display: flex; flex-direction: column; gap: 10px;
}
html body .sidebar .sidebar-bottom > :not(.pbc-user):not(.pbc-actions) { display: none; }
html body .sidebar .sidebar-bottom { font-size: 0; } /* texte « Sauvegarde sur le serveur » (l'état d'enregistrement reste en pied de page) */
.pbc-user { display: flex; align-items: center; gap: 10px; }
.pbc-av { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; font: 700 12px/1 var(--font-display);
  background: linear-gradient(180deg, var(--bc-jaune-vif), var(--bc-jaune)); color: var(--bc-nuit); box-shadow: 0 0 0 2px rgb(255 255 255 / .12); }
.pbc-id { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.pbc-id b { color: #fff; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
.pbc-id small { color: rgb(255 255 255 / .6); font-size: 11.5px; }
.pbc-actions { display: flex; }
.pbc-actions button {
  flex: 1 1 100%; justify-content: center; padding: 7px 10px; border-radius: 8px; cursor: pointer;
  background: transparent; color: #fff; border: 1px solid rgb(255 255 255 / .22); font: 600 var(--fs-sm)/1 var(--font-body);
}
.pbc-actions button:hover { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .4); }

/* ---------- Haut de page : pas de bandeau, sur-titre ocre du module (comme « ANALYSES · RÉSEAU ») ---------- */
html body .topbar {
  height: auto; min-height: 0; padding: 14px 16px 0; background: transparent; border: 0; box-shadow: none;
  max-width: 1480px; margin: 0 auto; width: 100%; box-sizing: border-box;
}
html body .breadcrumb { font-size: 0; }
html body .breadcrumb > span { display: none; }
html body .breadcrumb b { font: 600 var(--fs-xs)/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); }
html body .breadcrumb b::before { content: 'ProjectB&C · '; }
html body .top-actions { gap: 10px; color: var(--muted); font-size: var(--fs-sm); }
html body .top-actions .avatar { display: none; }
html body .top-actions .quiet { color: var(--accent-text); font-weight: 600; font-size: var(--fs-sm); }
html body main { padding: 16px; max-width: 1480px; margin: 0 auto; box-sizing: border-box; width: 100%; }
html body .page-heading, html body .hub-heading, html body .plan-heading { margin: 0 0 14px; padding: 0; gap: 12px; }

/* ---------- Boutons (13 px, arrondi 8 px ; principal jaune) ---------- */
html body .button, html body button.button, html body .top-actions button {
  font: 600 var(--fs-sm)/1 var(--font-body); padding: 9px 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / .8); color: var(--ink); box-shadow: none; min-height: 0; transition: background .15s, border-color .15s, box-shadow .15s;
}
html body .button:hover, html body .top-actions button:hover { border-color: var(--bc-anthracite); background: #fff; }
html body .button.primary, html body .primary {
  background: linear-gradient(180deg, var(--bc-jaune-vif), var(--bc-jaune)); border: 1px solid var(--bc-jaune-fonce); color: var(--bc-nuit);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), 0 4px 14px rgb(246 198 17 / .32);
}
html body .button.primary:hover, html body .primary:hover { background: linear-gradient(180deg, var(--bc-jaune), #e4b400); border-color: #cc9f00; }
html body .button.secondary, html body .secondary, html body .quiet.button { background: rgb(255 255 255 / .8); border: 1px solid var(--line-strong); color: var(--ink); }
html body input, html body select, html body textarea { background: rgb(255 255 255 / .88); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font-size: var(--fs-md); }
html body input:focus, html body select:focus, html body textarea:focus { border-color: var(--bc-jaune); outline: 3px solid rgb(246 198 17 / .3); outline-offset: 0; }

/* ---------- Cartes givrées (arrondi 12 px, comme les tableaux de bord) ---------- */
html body .hub-panel, html body .history-panel, html body .project-card, html body .bottom-panel, html body .plan-panel, html body .plan-banner,
html body .plan-outlook, html body .plan-controls, html body .bcit-workstream, html body .bcit-review, html body .column, html body .callout, html body .empty-card,
html body .hub-hero, html body .bcit-hero, html body .detail-summary, html body .domain-progress > div, html body .gp-agent {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); border-radius: 12px; color: var(--ink);
}
html body .hub-panel, html body .plan-panel, html body .bcit-review { padding: 18px; }
html body .hub-record, html body .task-card { background: rgb(255 255 255 / .6); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
/* Bandeaux d'en-tête de l'application : cartes claires (pas de bloc sombre dans les autres modules) */
html body .hub-hero, html body .bcit-hero { background: var(--glass); color: var(--ink); }
html body .hub-hero:after, html body .bcit-hero:before { display: none; }
html body .hub-hero h2, html body .bcit-hero h2 { color: var(--ink); font-size: 24px; font-weight: 700; }
html body .hub-hero p, html body .bcit-hero p { color: var(--muted); }
html body .hub-hero-links button, html body .hub-hero-links a, html body .bcit-hero-tags span {
  color: var(--ink); background: rgb(255 255 255 / .8); border: 1px solid var(--line-strong); border-radius: 999px;
}
/* Cartes de chiffres : cadre jaune, bord gauche épais (comme les indicateurs des autres modules) */
html body .stat, html body .hub-kpis > section, html body .hub-kpis button, html body .plan-kpis > section, html body .bcit-metrics > div, html body .hub-focus, html body .bcit-focus {
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 2px solid var(--bc-jaune); border-left-width: 7px; border-radius: 6px; box-shadow: var(--glass-shadow); color: var(--ink); padding: 10px 12px;
}
html body .stat-value, html body .hub-kpis h3, html body .hub-kpis strong, html body .plan-kpis strong, html body .bcit-metrics b, html body .hub-focus strong, html body .bcit-focus strong {
  font: 700 var(--fs-xl)/1.1 var(--font-display); color: var(--bc-nuit); font-variant-numeric: tabular-nums;
}
html body .hub-kpis span, html body .plan-kpis span, html body .bcit-metrics span { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
html body .hub-focus small, html body .bcit-focus small, html body .hub-focus > span, html body .bcit-focus > span, html body .bcit-focus p { font-size: var(--fs-xs); color: var(--muted); text-transform: none; letter-spacing: 0; }
html body .bcit-focus small:first-child { text-transform: uppercase; letter-spacing: .04em; }
html body .bcit-focus .progress { background: #e8e6df; }
/* Cartes de chiffres dont la « valeur » est un texte (chantiers) : taille de sous-titre */
html body .bcit-metrics b { font-size: var(--fs-lg); font-weight: 700; }

/* ---------- Onglets et sélecteurs : pastilles, actif jaune (comme le sous-menu des autres modules) ---------- */
html body .tabs { gap: 4px; border-bottom: 0; }
html body .tab { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; font: 600 var(--fs-sm)/1.2 var(--font-body); }
html body .tab.active { background: var(--bc-jaune); color: var(--bc-nuit); border-bottom: 1px solid transparent; box-shadow: 0 3px 10px rgb(246 198 17 / .3); }
html body .switch { background: rgb(255 255 255 / .6); border: 1px solid var(--line); border-radius: 999px; }
html body .switch button { border-radius: 999px; font: 600 var(--fs-sm)/1.2 var(--font-body); color: var(--muted); }
html body .switch button.active { background: var(--bc-jaune); color: var(--bc-nuit); }

/* ---------- Pastilles d'état (comme .badge des autres modules) ---------- */
html body .badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font: 600 var(--fs-xs)/1.5 var(--font-body); background: var(--surface-2); color: var(--muted); }
html body .badge.green { background: var(--ok-bg); color: var(--ok); }
html body .badge.orange { background: var(--warn-bg); color: var(--warn); }
html body .badge.red { background: var(--err-bg); color: var(--err); }
html body .progress { background: #e8e6df; border-radius: 999px; }
html body .progress i { background: linear-gradient(90deg, var(--bc-jaune-fonce), var(--bc-jaune)); border-radius: 999px; }

/* ---------- Tableaux : en-têtes jaunes soulignés d'anthracite ---------- */
html body .table-wrap { background: rgb(255 255 255 / .92); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow); border-radius: 10px; }
html body th, html body .plan-table th { background: var(--bc-jaune); color: var(--bc-nuit); font: 700 13px/1.3 var(--font-body); padding: 8px 10px; border-bottom: 2px solid var(--bc-anthracite); text-transform: none; letter-spacing: 0; }
html body td, html body .plan-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
html body tbody tr:hover, html body tbody tr:hover td { background: rgb(246 198 17 / .10); }

/* ---------- Fenêtres, notifications, pied de page centré ---------- */
html body dialog { border: 1px solid var(--glass-line); border-radius: 12px; background: rgb(255 255 255 / .96); box-shadow: 0 25px 80px rgb(35 40 43 / .25); color: var(--ink); }
html body dialog::backdrop { background: rgb(35 40 43 / .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
html body .modal-head h2 { font-size: var(--fs-xl); }
html body #toast { background: var(--bc-nuit); color: #fff; border-left: 4px solid var(--bc-jaune); border-radius: 8px; font-size: var(--fs-md); }
html body footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 18px 16px 22px; text-align: center; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
html body footer > span + span::before { content: '· '; }

/* ---------- Petit écran : la barre reste en haut, comme les autres modules ---------- */
@media (max-width: 1099px) {
  html body .sidebar { position: static; width: 100%; max-height: none; }
  html body .main { margin-left: 0; }
  .pbc-portail img { width: 64px; height: 64px; }
}
