  /* Les tokens (:root) vivent dans theme-baresto.css (charte Baresto + Bootstrap 5.3) : ce fichier ne fait que
     décrire les composants de la coquille Pulse avec ces tokens. Ordre de chargement : bootstrap → theme → styles. */
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }   /* l'attribut hidden doit toujours gagner sur les display: des classes (.spinner-sm, .btn-*, .legacy .d-flex…) */
  html, body { margin: 0; padding: 0; height: 100%; }
  body { background: var(--bg-app); font-family: var(--font-sans); color: var(--text-primary); display: flex; flex-direction: column; min-height: 100vh; font-size: 13px; line-height: 1.45; }
  h1, h2, h3, h4, h5, h6 { margin-top: 0; }

  /* ── Top bar (#header.topbar · Design System Baresto) ─────── */
  .topbar { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 8px 20px; min-height: 54px; display: flex; align-items: center; gap: 14px; position: relative; z-index: 1030; }
  .topbar .pulse-logo { font-size: 20px; }
  .topbar .logo-sub { font-size: 12px; font-weight: 700; color: var(--text-secondary); padding-left: 12px; border-left: 1px solid var(--border-strong); line-height: 1.1; }
  .topbar .logo-sub small { display: block; font-weight: 400; font-size: 10px; color: var(--text-tertiary); }
  .topbar .tb-badge { padding: 2px 8px; background: var(--bg-tile-gray); border-radius: 10px; font-size: 10px; color: var(--text-tertiary); }
  .topbar .tb-retour { margin-left: 10px; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 12px; color: var(--br-lie-de-vin); text-decoration: none; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 6px; }
  .topbar .tb-retour:hover { background: var(--bg-tile-gray); }
  .topbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
  .topbar .tb-search { position: relative; margin-left: 16px; flex: 0 1 380px; }
  .topbar .tb-search input { width: 100%; font: inherit; font-size: 12.5px; padding: 6px 56px 6px 32px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236F6664' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center; outline: none; transition: border-color .15s, background-color .15s; }
  .topbar .tb-search input:focus { border-color: var(--br-lie-de-vin); background-color: var(--bg-card); box-shadow: 0 0 0 2px rgba(151, 55, 86, 0.12); }
  .topbar .tb-search-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: var(--bg-app); border: 1px solid var(--border-strong); border-radius: 4px; padding: 1px 5px; font-size: 10px; color: var(--text-tertiary); font-family: inherit; pointer-events: none; }
  .tb-sugg { position: absolute; top: calc(100% + 6px); left: 0; width: min(560px, 90vw); max-height: 70vh; overflow: auto; background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(31,26,26,.18); z-index: 200; font-size: 12.5px; }
  .tb-sugg-grp { padding: 6px 12px 3px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-tertiary); background: var(--bg-tile-gray); }
  .tb-sugg-it { display: block; padding: 6px 12px; text-decoration: none; color: inherit; border-bottom: 0.5px solid var(--border); }
  .tb-sugg-it .t { display: block; font-weight: 600; } .tb-sugg-it .s { display: block; font-size: 11px; color: var(--text-tertiary); }
  .tb-sugg-it:hover, .tb-sugg-it.on { background: var(--br-lie-de-vin-tint, #F6E9EE); }
  .tb-sugg-tout { text-align: center; color: var(--br-lie-de-vin); font-weight: 600; }
  .tb-sugg-vide { padding: 10px 12px; color: var(--text-tertiary); }
  .topbar .role-picker { display: flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--bg-tile-gray); border-radius: 6px; }
  .topbar .role-picker select { background: transparent; color: var(--text-primary); border: none; font-family: inherit; font-size: 12px; cursor: pointer; outline: none; }
  .topbar .user { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 8px; border-radius: 6px; background: #F4F1EF; border: none; font-size: 12.5px; color: var(--text-primary); }
  .topbar .tb-user-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--br-lie-de-vin-tint); color: var(--br-lie-de-vin); font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .topbar .tb-user-name { color: var(--text-primary); text-decoration: none; }
  .topbar .tb-user-name strong { color: var(--text-primary); font-weight: 600; }
  .topbar .tb-logout { color: var(--text-secondary); width: 30px; height: 30px; border-radius: 6px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; transition: background .15s, color .15s; }
  .topbar .tb-logout:hover { color: var(--br-rouge); background: var(--br-rouge-tint); }
  .topbar .help { color: var(--text-secondary); cursor: pointer; }

  /* ── App shell (.baresto-wrapper) + Rail Chatter global ──── */
  .shell { display: flex; flex: 1; overflow: hidden; min-height: 0; }
  .sidebar { flex: 0 0 232px; width: 232px; }
  @media (max-width: 1100px) { .sidebar { flex: 0 0 208px; width: 208px; } }
  .global-chatter-rail { width: 310px; flex: 0 0 310px; background: var(--bg-card); border-left: 1px solid var(--border-strong); box-shadow: -2px 0 10px rgba(112, 21, 15, 0.04); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; transition: width 0.18s ease, flex-basis 0.18s ease, background 0.15s ease; }
  .global-chatter-rail.is-collapsed { width: 80px; flex: 0 0 80px; overflow: hidden; background: linear-gradient(180deg, #FFFFFF 0%, #FAF5F6 100%); border-left: 2px solid #EAD5DC; }
  .global-chatter-rail.is-collapsed:hover { background: var(--br-lie-de-vin-tint, #F6E9EE); border-left-color: var(--br-lie-de-vin, #973756); }
  .global-chatter-collapsed { display: none; flex-direction: column; align-items: center; gap: 16px; padding: 16px 8px; height: 100%; cursor: pointer; user-select: none; }
  .global-chatter-rail.is-collapsed .global-chatter-collapsed { display: flex; }
  .global-chatter-rail.is-collapsed .global-chatter-expanded { display: none; }
  .global-chatter-chevron { width: 34px; height: 34px; border-radius: 8px; background: var(--br-lie-de-vin); color: #fff; border: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; flex-shrink: 0; box-shadow: 0 2px 6px rgba(151, 55, 86, 0.25); transition: background .15s, transform .15s; }
  .global-chatter-chevron:hover { background: var(--br-lie-de-vin-dark); transform: scale(1.05); }
  .global-chatter-icon { color: var(--br-lie-de-vin); font-size: 18px; line-height: 1; }
  .global-chatter-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13.5px; font-weight: 700; color: var(--br-bordeaux, #70150F); white-space: nowrap; letter-spacing: 0.4px; }
  .global-chatter-count { background: var(--br-lie-de-vin); color: #fff; font-size: 12px; font-weight: 700; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 2px 5px rgba(151, 55, 86, 0.22); }
  .global-chatter-body { padding: 10px 14px; flex: 1; overflow-y: auto; }
  .shell:has(.fiche-rail) .global-chatter-rail { display: none; }

  /* ── Sidebar (#menu.sidebar · Bordeaux #70150F DS Baresto) ─ */
  .sidebar { background: var(--br-bordeaux, #70150F); color: rgba(255, 255, 255, 0.9); border-right: none; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; }
  .sidebar-mobile-head { display: none; align-items: center; justify-content: space-between; padding: 4px 6px 12px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .sidebar-mobile-close { background: rgba(255, 255, 255, 0.12); border: none; color: #fff; width: 34px; height: 34px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; }
  .sidebar .main-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .menu-section { margin-bottom: 2px; }
  .menu-header { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; color: rgba(255, 255, 255, 0.9); font-weight: 500; cursor: pointer; border-radius: 6px; transition: background 0.12s ease, color 0.12s ease; }
  .menu-header a { color: inherit; text-decoration: none; flex: 1; }
  .menu-header:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
  .menu-header .icon { width: 18px; text-align: center; opacity: 0.9; font-size: 13.5px; flex-shrink: 0; color: inherit; }
  .menu-header .caret { margin-left: auto; font-size: 0; opacity: 0.85; line-height: 1; padding: 2px 4px; }
  .menu-header .caret::after { content: "+"; font-size: 14px; font-weight: 600; display: inline-block; }
  .menu-section.expanded > .menu-header > .caret::after,
  .menu-header.expanded > .caret::after { content: "−"; }
  .menu-badge-alert { background: var(--br-rouge, #E50040); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; line-height: 1.3; margin-left: auto; margin-right: 4px; }
  .submenu { padding: 3px 0 6px 28px; display: none; }
  .menu-section.expanded > .submenu { display: block; }
  .menu-subsection { margin: 2px 0; }
  .menu-subsection > .menu-header { padding: 5px 10px; font-size: 12px; }
  .menu-subsection > .menu-header .icon { width: 16px; font-size: 12px; }
  .menu-subsection > .submenu { padding-left: 14px; }
  .submenu .item { display: flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: 12.5px; color: rgba(255, 255, 255, 0.78); cursor: pointer; border-radius: 6px; text-decoration: none; transition: background 0.12s ease, color 0.12s ease; }
  .submenu .item:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
  .submenu .item.active { background: #FFFFFF; color: var(--br-bordeaux, #70150F); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
  .submenu .item.disabled { color: rgba(255, 255, 255, 0.4); cursor: not-allowed; }
  .sidebar .legacy-hint { font-size: 10.5px; color: rgba(255, 255, 255, 0.5); padding: 4px 10px; font-style: italic; }
  .sidebar .badge-src { font-size: 9.5px; background: rgba(255, 255, 255, 0.16); color: #fff; padding: 1px 5px; border-radius: 4px; margin-left: auto; }
  .menu-item-direct { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; color: rgba(255, 255, 255, 0.9); font-weight: 500; cursor: pointer; border-radius: 6px; text-decoration: none; transition: background 0.12s ease, color 0.12s ease; }
  .menu-item-direct:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
  .menu-item-direct.active,
  .menu-header:has(> a.active) { background: #FFFFFF; color: var(--br-bordeaux, #70150F); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
  .menu-item-direct .icon { width: 18px; text-align: center; opacity: 0.9; font-size: 13.5px; flex-shrink: 0; color: inherit; }
  .sidebar-divider { height: 1px; background: rgba(255, 255, 255, 0.14); margin: 8px 6px; }
  .sidebar-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .sidebar-footer a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12px; color: rgba(255, 255, 255, 0.78); text-decoration: none; border-radius: 6px; }
  .sidebar-footer a:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }

  /* ── Main content ────────────────────────────────────────── */
  .main { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; min-width: 0; padding: 20px 26px 32px; }
  .breadcrumb { display: block; padding: 0; margin: 0 0 6px; list-style: none; font-size: 11px; color: var(--text-tertiary); }
  .breadcrumb a { color: var(--text-tertiary); text-decoration: none; }
  .breadcrumb a:hover { color: var(--text-bordeaux); }
  .breadcrumb .sep { margin: 0 6px; opacity: 0.5; }
  h1.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 3px 0; }
  .page-sub { font-size: 12.5px; color: var(--text-tertiary); margin: 0 0 16px 0; }

  /* ── Filter bar (D'Clic-style) ──────────────────────────── */
  .filter-bar { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .filter-bar input, .filter-bar select { padding: 5px 10px; border: 0.5px solid var(--border-strong); border-radius: 5px; font-family: inherit; font-size: 12px; background: var(--bg-card); }
  .filter-bar input { min-width: 180px; }
  .filter-bar .spacer { flex: 1; }
  .filter-bar .btn { padding: 5px 12px; }
  /* Boutons : composant Bootstrap 5.3 + Design System Baresto (primary = lie de vin #973756, secondary = teinte lie de vin, tertiary = neutre blanc, accept = sauge, decline/danger = rouge). */
  .btn { --bs-btn-padding-y: 7px; --bs-btn-padding-x: 14px; --bs-btn-font-size: 12.5px; --bs-btn-border-radius: 6px; --bs-btn-line-height: 1.35;
         --bs-btn-color: var(--text-primary); --bs-btn-bg: var(--bg-card); --bs-btn-border-color: var(--border-strong);
         --bs-btn-hover-color: var(--text-primary); --bs-btn-hover-bg: var(--bg-side-hover); --bs-btn-hover-border-color: var(--br-lie-de-vin);
         --bs-btn-active-color: var(--text-primary); --bs-btn-active-bg: var(--bg-side-hover); --bs-btn-active-border-color: var(--br-lie-de-vin);
         --bs-btn-disabled-color: var(--text-muted); --bs-btn-disabled-bg: var(--bg-card); --bs-btn-disabled-border-color: var(--border);
         border-width: 1px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
  .btn-primary { --bs-btn-color: #fff; --bs-btn-bg: var(--br-lie-de-vin); --bs-btn-border-color: var(--br-lie-de-vin); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--br-lie-de-vin-dark); --bs-btn-hover-border-color: var(--br-lie-de-vin-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--br-lie-de-vin-dark); --bs-btn-active-border-color: var(--br-lie-de-vin-dark); --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--br-lie-de-vin); --bs-btn-disabled-border-color: var(--br-lie-de-vin); font-weight: 600; }
  .btn-secondary { --bs-btn-color: var(--br-lie-de-vin-dark); --bs-btn-bg: var(--br-lie-de-vin-tint); --bs-btn-border-color: #E7CBD6; --bs-btn-hover-color: var(--br-lie-de-vin-dark); --bs-btn-hover-bg: #EDD8E1; --bs-btn-hover-border-color: #DAB3C3; --bs-btn-active-color: var(--br-lie-de-vin-dark); --bs-btn-active-bg: #E7CBD6; --bs-btn-active-border-color: #DAB3C3; font-weight: 600; }
  .btn-tertiary { --bs-btn-color: var(--text-primary); --bs-btn-bg: var(--bg-card); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-color: var(--text-primary); --bs-btn-hover-bg: var(--bg-side-hover); --bs-btn-hover-border-color: var(--br-lie-de-vin); --bs-btn-active-color: var(--text-primary); --bs-btn-active-bg: var(--bg-side-hover); font-weight: 600; }
  .btn-tertiary > i, .btn-tertiary > .fa-solid, .btn-tertiary > .fa-regular { color: var(--br-lie-de-vin); }
  .btn-accept { --bs-btn-color: #5A6238; --bs-btn-bg: var(--br-sauge-tint); --bs-btn-border-color: var(--br-sauge); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--br-sauge-dark); --bs-btn-hover-border-color: var(--br-sauge-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: #5A6138; font-weight: 600; }
  .btn-square-check { width: 32px; height: 32px; padding: 0 !important; border-radius: 6px !important; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
  .btn-decline { --bs-btn-color: var(--br-rouge-dark); --bs-btn-bg: var(--br-rouge-tint); --bs-btn-border-color: #F7BFCF; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--br-rouge); --bs-btn-hover-border-color: var(--br-rouge); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--br-rouge-dark); font-weight: 600; }
  .btn-danger { --bs-btn-color: #fff; --bs-btn-bg: var(--br-rouge); --bs-btn-border-color: var(--br-rouge); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--br-rouge-dark); --bs-btn-hover-border-color: var(--br-rouge-dark); font-weight: 600; }
  .btn-bordeaux { --bs-btn-color: #fff; --bs-btn-bg: var(--br-bordeaux); --bs-btn-border-color: var(--br-bordeaux); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--br-bordeaux-dark); --bs-btn-hover-border-color: var(--br-bordeaux-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--br-bordeaux-dark); font-weight: 600; }
  .btn-blue, .btn-info { --bs-btn-color: #fff; --bs-btn-bg: var(--br-lie-de-vin); --bs-btn-border-color: var(--br-lie-de-vin); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--br-lie-de-vin-dark); --bs-btn-hover-border-color: var(--br-lie-de-vin-dark); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--br-lie-de-vin-dark); font-weight: 500; }
  .btn-amber, .btn-warning { --bs-btn-color: var(--br-bordeaux-dark); --bs-btn-bg: var(--br-rose); --bs-btn-border-color: var(--br-rose); --bs-btn-hover-color: var(--br-bordeaux-dark); --bs-btn-hover-bg: #EE8383; --bs-btn-hover-border-color: #EE8383; font-weight: 500; }
  .btn-teal, .btn-success { --bs-btn-color: #fff; --bs-btn-bg: var(--br-sauge-dark); --bs-btn-border-color: var(--br-sauge-dark); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #5A6138; --bs-btn-hover-border-color: #5A6138; --bs-btn-active-color: #fff; --bs-btn-active-bg: #5A6138; font-weight: 500; }
  .btn-sm { --bs-btn-padding-y: 5px; --bs-btn-padding-x: 10px; --bs-btn-font-size: 12px; --bs-btn-border-radius: 6px; border-radius: 6px; }
  .btn-icon { width: 28px; height: 28px; padding: 0 !important; border-radius: 6px !important; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

  /* ── KPI tiles & .card-statistics (Design System Baresto) ── */
  .kpi-row, .card-statistics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
  .kpi-tile, .card-statistics { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 13px 16px; position: relative; transition: border-color .15s, box-shadow .15s; text-decoration: none; color: inherit; }
  .kpi-tile { cursor: pointer; }
  .kpi-tile:hover, a.card-statistics:hover, .card-statistics.clickable:hover { border-color: var(--br-lie-de-vin); box-shadow: 0 2px 8px rgba(151, 55, 86, 0.08); text-decoration: none; }
  .kpi-tile.active, .card-statistics.active { border-color: var(--br-lie-de-vin); box-shadow: inset 0 0 0 1px var(--br-lie-de-vin); }
  .kpi-tile .v, .card-statistics .cs-value { font-size: 24px; font-weight: 700; line-height: 1.15; color: var(--text-primary); font-variant-numeric: tabular-nums; }
  .kpi-tile .l, .card-statistics .cs-label { font-size: 12px; color: var(--text-tertiary); font-weight: 500; text-transform: none; letter-spacing: 0; display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin-bottom: 5px; }
  .card-statistics .cs-label .cs-icon { order: -1; width: auto; height: auto; background: transparent !important; color: var(--br-lie-de-vin) !important; font-size: 13px; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .kpi-tile .h, .card-statistics .cs-meta { font-size: 11.5px; color: var(--text-tertiary); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  /* Variantes couleur de border-left sur kpi-tile legacy uniquement (sur .card-statistics la carte reste blanche 1px) */
  .kpi-tile.tile-info:not(.card-statistics)     { border-left: 3px solid var(--text-info); }
  .kpi-tile.tile-success:not(.card-statistics)  { border-left: 3px solid var(--text-success); }
  .kpi-tile.tile-warning:not(.card-statistics)  { border-left: 3px solid var(--text-warning); }
  .kpi-tile.tile-coral:not(.card-statistics)    { border-left: 3px solid var(--text-coral); }
  .kpi-tile.tile-purple:not(.card-statistics)   { border-left: 3px solid var(--text-purple); }
  .kpi-tile.tile-bordeaux:not(.card-statistics) { border-left: 3px solid var(--text-bordeaux); }
  .kpi-tile.tile-teal:not(.card-statistics)     { border-left: 3px solid var(--text-teal); }
  /* Mapping des bandeaux .eb-band / .eb-kpi vers .card-statistics */
  .eb-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; margin-bottom: 12px; }
  .eb-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
  a.eb-kpi:hover, .eb-kpi[onclick]:hover { border-color: var(--br-lie-de-vin); box-shadow: 0 2px 8px rgba(151, 55, 86, 0.08); text-decoration: none; }
  .eb-kpi.on, .eb-kpi.active { border-color: var(--br-lie-de-vin); box-shadow: inset 0 0 0 1px var(--br-lie-de-vin); background: var(--br-lie-de-vin-tint); }
  .eb-kpi .l { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-tertiary); margin-bottom: 4px; }
  .eb-kpi .v { font-size: 21px; font-weight: 700; color: var(--text-primary); line-height: 1.15; font-variant-numeric: tabular-nums; }
  .eb-kpi .s { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }

  /* KPI hero · même charte blanche · layout flex pour valeur + sous-info + jauge */
  .kpi-hero {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--text-warning);
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .kpi-hero.hero-spectrum { border-left-color: var(--text-warning); }
  .kpi-hero.hero-warm     { border-left-color: var(--text-success); }
  .kpi-hero .hero-l { font-size: 10.5px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; line-height: 1; }
  .kpi-hero .hero-v { font-size: 26px; font-weight: 700; color: var(--text-bordeaux); line-height: 1.15; margin-top: 2px; }
  .kpi-hero .hero-h { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

  /* Mini-KPI ligne (captation économique · 6 colonnes) */
  .kpi-mini { padding: 4px 0 4px 6px; border-left: 2px solid var(--text-tertiary); }
  .kpi-mini.mini-success { border-left-color: var(--text-success); }
  .kpi-mini.mini-coral   { border-left-color: var(--text-coral); }
  .kpi-mini.mini-warning { border-left-color: var(--text-warning); }
  .kpi-mini.mini-info    { border-left-color: var(--text-info); }
  .kpi-mini .mini-l { color: var(--text-tertiary); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; }
  .kpi-mini .mini-v { font-weight: 600; font-size: 14px; }
  .kpi-mini .mini-h { color: var(--text-tertiary); font-size: 10.5px; }

  /* Bandeau synthèse · blanc avec border-left bordeaux */
  .kpi-band {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--text-bordeaux);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .kpi-band .band-l { color: var(--text-bordeaux); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
  .kpi-band .band-v { font-weight: 700; font-size: 20px; color: var(--text-bordeaux); }
  .kpi-band .band-h { font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; }

  /* Vignettes étapes Candidats · cartes blanches cliquables, border-left selon étape */
  .step-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-left-width: 3px;
    border-left-style: solid;
    border-left-color: var(--text-tertiary);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
    user-select: none;
  }
  .step-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.10); border-color: var(--border-strong); }
  .step-card.active { box-shadow: 0 4px 14px rgba(0,0,0,0.14); border-color: var(--border-strong); }
  .step-card[data-step="1"] { border-left-color: var(--text-info); }
  .step-card[data-step="2"] { border-left-color: var(--text-purple); }
  .step-card[data-step="3"] { border-left-color: var(--text-teal); }
  .step-card[data-step="4"] { border-left-color: var(--text-success); }
  .step-card[data-step="5"] { border-left-color: var(--text-bordeaux); }
  .step-card.active[data-step="1"] { border-color: var(--text-info); }
  .step-card.active[data-step="2"] { border-color: var(--text-purple); }
  .step-card.active[data-step="3"] { border-color: var(--text-teal); }
  .step-card.active[data-step="4"] { border-color: var(--text-success); }
  .step-card.active[data-step="5"] { border-color: var(--text-bordeaux); }
  .kpi-tile .corner-icon { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; }
  .corner-blue { background: var(--bg-tile-info); color: var(--text-info); }
  .corner-green { background: var(--bg-tile-success); color: var(--text-success); }
  .corner-red { background: var(--bg-tile-coral); color: var(--text-coral); }
  .corner-gray { background: var(--bg-tile-gray); color: var(--text-tertiary); }
  .corner-amber { background: var(--bg-tile-warning); color: var(--text-warning); }
  .corner-teal { background: var(--bg-tile-teal); color: var(--text-teal); }

  /* ── Panels, listings DS Baresto & tables ───────────────── */
  .panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  .panel-header, .table-actions { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .panel-header h3, .table-actions h2, .table-actions h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
  /* Boutons d'affichage des groupes de colonnes (Global, Achat, Financier, Commissions, Contrat...) : coloré quand actif, neutre quand masqué */
  .btn[data-collapsed="0"] {
    background: var(--br-lie-de-vin, #973756) !important;
    border-color: var(--br-lie-de-vin, #973756) !important;
    color: #ffffff !important;
    opacity: 1 !important;
  }
  .btn[data-collapsed="0"] > i {
    color: #ffffff !important;
  }
  .btn[data-collapsed="0"]:hover {
    background: var(--br-lie-de-vin-dark, #782A43) !important;
    border-color: var(--br-lie-de-vin-dark, #782A43) !important;
    color: #ffffff !important;
  }
  .btn[data-collapsed="1"] {
    background: var(--bg-card, #ffffff) !important;
    border-color: var(--border-strong) !important;
    color: var(--text-secondary) !important;
    opacity: 1 !important;
  }
  .btn[data-collapsed="1"] > i {
    color: var(--text-tertiary) !important;
  }
  .btn[data-collapsed="1"]:hover {
    background: var(--bg-side-hover) !important;
    border-color: var(--br-lie-de-vin) !important;
    color: var(--text-primary) !important;
  }
  .panel-header .right, .table-actions .right, .table-actions-right { margin-left: auto; font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .table-cards-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-card); }
  .card-tab { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; transition: border-color .15s, box-shadow .15s, background .15s; text-align: left; }
  .card-tab > div:not(.ct-head):not(.ct-label):not(.ct-count):not(.ct-sub) { display: contents; }
  .card-tab:hover { border-color: var(--br-lie-de-vin); text-decoration: none; color: inherit; }
  .card-tab .ct-label, .card-tab .ct-head { order: 1; font-size: 12px; color: var(--text-secondary); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
  .card-tab .ct-label > i, .card-tab .ct-head > i { order: 2; margin-left: auto; font-size: 13px; color: var(--text-tertiary) !important; }
  .card-tab .ct-count { order: 2; font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--text-primary); font-variant-numeric: tabular-nums; margin-top: 2px; }
  .card-tab .ct-sub { order: 3; font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
  .card-tab.active,
  .card-tab.card-tab-danger.active,
  .card-tab.card-tab-sauge.active { border-color: var(--br-lie-de-vin); box-shadow: inset 0 0 0 0.5px var(--br-lie-de-vin); background: var(--br-lie-de-vin-tint); }
  .card-tab.active .ct-label,
  .card-tab.active .ct-head,
  .card-tab.active .ct-count,
  .card-tab.active .ct-label > i,
  .card-tab.active .ct-head > i { color: var(--br-lie-de-vin-dark) !important; }
  .table-filters { padding: 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--bg-card); }
  .table-filters.etabs-top-filters { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; padding: 10px 12px; flex-wrap: nowrap; }
  .table-filters .input-query { position: relative; flex: 1 1 240px; max-width: none; min-width: 0; display: flex; align-items: center; gap: 6px; }
  .table-filters .input-query > i { position: absolute; left: 10px; color: var(--text-tertiary); font-size: 12.5px; pointer-events: none; }
  .table-filters .input-query input { width: 100%; min-width: 0; padding: 6px 12px 6px 30px; border: 1px solid var(--border-strong); border-radius: 6px; font: inherit; font-size: 12.5px; background: var(--bg-card); outline: none; }
  .table-filters .input-query input:focus { border-color: var(--br-lie-de-vin); background: var(--bg-card); box-shadow: 0 0 0 2px rgba(151, 55, 86, 0.12); }
  .table-filters .btn-search { width: 32px; height: 32px; padding: 0; border-radius: 6px; flex-shrink: 0; }
  .table-filters-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; flex-shrink: 0; }
  .table-wrap { overflow-x: auto; }
  table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
  table.data th { text-align: left; padding: 9px 12px; background: var(--bg-table-head); font-size: 11px; color: var(--text-tertiary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); }
  table.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
  table.data tr.clickable:hover, table.data tbody tr:hover { background: var(--bg-side-hover); }
  table.data tr.clickable { cursor: pointer; }
  table.data tr.alert { background: rgba(229, 0, 64, 0.06); padding: 0; margin: 0; border: 0; border-radius: 0; --bs-alert-bg: transparent; }
  table.data .strong { font-weight: 600; color: var(--text-primary); }
  table.data .muted { color: var(--text-tertiary); font-size: 11px; }
  table.data .amount { text-align: right; font-variant-numeric: tabular-nums; }
  table.data .cell-val { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
  table.data td.amount .cell-val { align-items: flex-end; text-align: right; }
  table.data .etab-actions-group { display: inline-flex; align-items: center; gap: 5px; }
  /* Mobile : transformation Table -> Cards sous 768 px (breakpoint sm) pour les tables avec td[data-label] */
  @media (max-width: 767.98px) {
    table.data.table-cards-mobile { min-width: 0 !important; display: block; }
    table.data.table-cards-mobile thead,
    table.data.table-cards-mobile tfoot { display: none; }
    table.data.table-cards-mobile tbody { display: flex; flex-direction: column; gap: 10px; padding: 10px; background: var(--bg-app); }
    table.data.table-cards-mobile tbody tr { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
    table.data.table-cards-mobile tbody tr.carto-marche { background: var(--bg-table-head); padding: 8px 12px; }
    table.data.table-cards-mobile tbody td { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); text-align: right !important; }
    table.data.table-cards-mobile tbody td:last-child { border-bottom: none; padding-bottom: 0; }
    table.data.table-cards-mobile tbody td:first-child { display: block; padding-top: 0; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 4px; text-align: left !important; font-weight: 700; }
    table.data.table-cards-mobile tbody td[data-label]::before { content: attr(data-label); font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.3px; text-align: left; flex-shrink: 0; margin-right: auto; }
    table.data.table-cards-mobile tbody td:first-child::before { display: none; }
    table.data.table-cards-mobile tbody td .cell-val { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; margin-left: auto; }
    table.data.table-cards-mobile tbody td .eb-bar { width: 76px; margin: 2px 0 0 auto; }
    table.data.table-cards-mobile tbody td.etab-td-actions { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); border-bottom: none; }
    table.data.table-cards-mobile tbody td.etab-td-actions::before { display: none !important; }
    table.data.table-cards-mobile tbody td .etab-actions-group { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
    table.data.table-cards-mobile tbody td .etab-actions-group > a:first-child { margin-right: auto; }
    /* Mise en forme compacte spécifique de Mes actions sur l'Accueil mobile */
    table.data.table-cards-mobile.acc-actions-table tbody { gap: 0; padding: 0; background: var(--bg-card); }
    table.data.table-cards-mobile.acc-actions-table tbody tr { display: grid; grid-template-columns: 36px 1fr auto; grid-template-areas: "chk main ech" "chk last last"; column-gap: 10px; row-gap: 3px; align-items: start; border: none; border-bottom: 1px solid var(--border); border-radius: 0; padding: 10px 12px; box-shadow: none; }
    table.data.table-cards-mobile.acc-actions-table tbody tr:last-child { border-bottom: none; }
    table.data.table-cards-mobile.acc-actions-table tbody td { display: block; padding: 0; margin: 0; border: none !important; text-align: left !important; font-weight: 400; width: auto !important; }
    table.data.table-cards-mobile.acc-actions-table tbody td::before { display: none !important; }
    table.data.table-cards-mobile.acc-actions-table tbody td.acc-td-check { grid-area: chk; padding-top: 2px; }
    table.data.table-cards-mobile.acc-actions-table tbody td.acc-td-main { grid-area: main; min-width: 0; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 1px; }
    table.data.table-cards-mobile.acc-actions-table tbody td.acc-td-ech { grid-area: ech; text-align: right !important; }
    table.data.table-cards-mobile.acc-actions-table tbody td.acc-td-last { grid-area: last; font-size: 11.5px; color: var(--text-tertiary); }
  }

  /* ── Chips & Badges subtils (Design System Baresto) ─────── */
  .chip, .badge-subtle { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.35; }
  .chip-phase-1, .badge-secondary.badge-subtle, .chip-muted { background: var(--bg-tile-gray); color: var(--text-tertiary); }
  .chip-phase-2, .chip-phase-4, .chip-info, .badge-primary.badge-subtle, .badge-info.badge-subtle { background: var(--br-lie-de-vin-tint); color: var(--br-lie-de-vin-dark); }
  .chip-phase-3, .chip-stade-C, .chip-success, .badge-success.badge-subtle { background: var(--br-sauge-tint); color: var(--br-sauge-dark); }
  .chip-stade-A, .chip-warning, .badge-warning.badge-subtle { background: var(--br-rose-tint); color: var(--br-rose-dark); }
  .chip-stade-B { background: var(--br-lie-de-vin-tint); color: var(--br-lie-de-vin-dark); }
  .chip-alert, .badge-danger.badge-subtle { background: var(--br-rouge-tint); color: var(--br-rouge-dark); }
  .chip-bordeaux, .badge-brand.badge-subtle { background: var(--br-bordeaux-tint); color: var(--br-bordeaux); font-weight: 700; }

  /* ── IA hint banner (when something is enriched) ───────── */
  .ai-hint { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--br-sauge-tint); border-radius: 6px; font-size: 11px; color: var(--br-sauge-dark); font-weight: 600; margin-bottom: 12px; }
  .ai-hint::before { content: "\f0d0"; font-family: "Font Awesome 6 Free"; font-weight: 900; }

  /* ── Toast de confirmation DS Baresto ──────────────────── */
  .pulse-toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 1080; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
  .pulse-toast { pointer-events: auto; background: var(--br-noir, #1A1A1A); color: #fff; border-radius: 8px; padding: 10px 14px; font-size: 12.5px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.22); border-left: 4px solid var(--br-sauge); }
  @media (max-width: 900px) { .pulse-toast-container { bottom: 68px; left: 12px; right: 12px; } }

  /* ── Inbox cards & Detail header ────────────────────────── */
  .inbox-section { margin-bottom: 14px; }
  .inbox-header { padding: 8px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; border-radius: 5px; margin-bottom: 6px; }
  .inbox-header.urgent { background: var(--bg-tile-coral); color: var(--text-coral); }
  .inbox-header.week { background: var(--bg-tile-info); color: var(--text-info); }
  .inbox-header.opp { background: var(--bg-tile-gray); color: var(--text-tertiary); }
  .inbox-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; margin-bottom: 6px; display: flex; align-items: center; gap: 12px; transition: border-color .15s; }
  .inbox-card:hover { border-color: var(--border-strong); }
  .inbox-card.urgent { border-left: 3px solid var(--text-coral); }
  .inbox-card .icn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
  .inbox-card .body { flex: 1; }
  .inbox-card .ttl { font-size: 13px; font-weight: 600; }
  .inbox-card .sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
  .inbox-card .meta { font-size: 11px; color: var(--text-tertiary); }
  .inbox-card .source { font-size: 10px; color: var(--text-tertiary); font-style: italic; }
  .detail-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
  .detail-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-tile-info); color: var(--text-info); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; }
  .detail-name { font-size: 18px; font-weight: 600; margin-bottom: 2px; }
  .detail-meta { font-size: 11px; color: var(--text-tertiary); }
  .detail-actions { margin-left: auto; display: flex; gap: 6px; }

  /* ── Tabs (.tabs & .nav-tabs Design System Baresto) ────── */
  .tabs, .nav-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; overflow-y: hidden; max-width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: thin; list-style: none; padding-left: 0; }
  .tabs::-webkit-scrollbar, .nav-tabs::-webkit-scrollbar { height: 5px; }
  .tabs::-webkit-scrollbar-thumb, .nav-tabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
  .tab, .nav-tabs .nav-link { padding: 9px 14px; font-size: 12.5px; font-weight: 500; white-space: nowrap; flex: 0 0 auto; color: var(--text-tertiary); cursor: pointer; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border-radius: 0; }
  .tab:hover, .nav-tabs .nav-link:hover { color: var(--br-lie-de-vin); border-bottom-color: rgba(151, 55, 86, 0.3); text-decoration: none; }
  .tab.active, .nav-tabs .nav-link.active { color: var(--br-lie-de-vin); border-bottom-color: var(--br-lie-de-vin); font-weight: 700; background: transparent; }

  /* ── Phase bar ──────────────────────────────────────────── */
  .phase-bar { padding: 14px 18px; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; margin-bottom: 12px; }
  .phase-bar h4 { margin: 0 0 12px 0; font-size: 12px; color: var(--text-tertiary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
  .phase-track { position: relative; padding: 0 16px; }
  .phase-line { position: absolute; top: 11px; left: 28px; right: 28px; height: 2px; background: var(--border-strong); z-index: 0; }
  .phase-line-fill { position: absolute; top: 11px; left: 28px; height: 2px; background: var(--text-bordeaux); z-index: 1; }
  .phase-steps { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; z-index: 2; }
  .phase-step { text-align: center; }
  .phase-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-tile-gray); color: var(--text-tertiary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 11px; border: 2px solid var(--bg-card); }
  .phase-dot.done, .phase-dot.current { background: var(--text-bordeaux); color: #fff; }
  .phase-step .label { font-size: 11px; margin-top: 6px; }
  .phase-step .label.active { color: var(--text-bordeaux); font-weight: 700; }
  .phase-step .sub { font-size: 10px; color: var(--text-tertiary); }
  .phase-step .sub.muted { opacity: 0.6; }

  /* ── Milestones ─────────────────────────────────────────── */
  .milestones { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .milestone { padding: 10px 14px; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 5px; display: flex; align-items: center; gap: 10px; }
  .milestone.done { background: var(--bg-side); }
  .milestone.current { background: var(--bg-side-active); border-color: var(--text-bordeaux); border-left-width: 3px; }
  .milestone .mdot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0; }
  .milestone.done .mdot, .milestone.current .mdot { background: var(--text-bordeaux); }
  .milestone.pending .mdot { background: var(--border-strong); }
  .milestone .body { flex: 1; }
  .milestone .ttl { font-size: 13px; font-weight: 500; }
  .milestone .ttl.muted { color: var(--text-tertiary); }
  .milestone .sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
  .milestone .when { font-size: 11px; color: var(--text-tertiary); margin-right: 8px; white-space: nowrap; }

  /* ── Section title within page ──────────────────────────── */
  h2.section { font-size: 13.5px; font-weight: 700; margin: 18px 0 8px 0; color: var(--text-bordeaux); display: flex; align-items: center; gap: 8px; }
  h2.section .ai-tag { font-size: 9px; padding: 2px 6px; background: var(--bg-tile-teal); color: var(--text-teal); border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

  /* ── Two-col layout ─────────────────────────────────────── */
  .two-col { display: grid; grid-template-columns: 2.2fr 1fr; gap: 14px; }
  @media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

  /* ── Cobot interface ────────────────────────────────────── */
  .cobot-shell { display: grid; grid-template-columns: 1fr 320px; gap: 14px; }
  @media (max-width: 1100px) { .cobot-shell { grid-template-columns: 1fr; } }
  .cobot-chat { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; padding: 14px; }
  .cobot-msg { padding: 10px 14px; margin-bottom: 8px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
  .cobot-msg.bot { background: var(--bg-tile-teal); border-left: 3px solid var(--text-teal); }
  .cobot-msg.user { background: var(--bg-side-hover); margin-left: 40px; }
  .cobot-msg .who { font-size: 10px; color: var(--text-tertiary); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
  .cobot-suggestion { padding: 10px 12px; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 5px; margin-bottom: 6px; }
  .cobot-suggestion .name { font-size: 12px; font-weight: 500; color: var(--text-teal); }
  .cobot-suggestion .why { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }

  /* ── Placeholder ────────────────────────────────────────── */
  .placeholder-block { padding: 40px 30px; text-align: center; background: var(--bg-card); border: 0.5px dashed var(--border-strong); border-radius: 8px; }
  .placeholder-block h3 { color: var(--text-tertiary); margin-top: 0; font-weight: 500; font-size: 15px; }
  .placeholder-block p { color: var(--text-tertiary); font-size: 12px; line-height: 1.55; max-width: 600px; margin: 6px auto; }
  .placeholder-block .badge-existing { display: inline-block; padding: 3px 10px; background: var(--bg-tile-success); color: var(--text-success); border-radius: 10px; font-size: 11px; font-weight: 500; margin-bottom: 14px; }
  .placeholder-block .badge-enriched { background: var(--bg-tile-teal); color: var(--text-teal); }
  .placeholder-block .badge-readonly { background: var(--bg-tile-gray); color: var(--text-tertiary); }

  /* ── Score circle for candidats ─────────────────────────── */
  .score-circle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; font-weight: 600; font-size: 13px; }
  .score-high { background: var(--text-success); }
  .score-mid { background: var(--text-warning); }
  .score-low { background: var(--text-muted); }

  /* ── Sub-list inside fiche ──────────────────────────────── */
  .sub-list-item { padding: 10px 14px; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 5px; margin-bottom: 5px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
  .sub-list-item:hover { border-color: var(--border-strong); background: var(--bg-side-hover); }
  .sub-list-item .name { font-size: 13px; font-weight: 500; }
  .sub-list-item .meta { font-size: 11px; color: var(--text-tertiary); }
  .sub-list-item .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

  /* ── Timeline ───────────────────────────────────────────── */
  .timeline { position: relative; padding-left: 32px; }
  .timeline::before { content: ''; position: absolute; top: 6px; bottom: 6px; left: 10px; width: 2px; background: var(--border-strong); }
  .tl-event { position: relative; padding: 8px 0 8px 12px; margin-bottom: 4px; }
  .tl-event::before { content: ''; position: absolute; left: -28px; top: 11px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-bordeaux); border: 2px solid var(--bg-app); }
  .tl-event.amber::before { background: var(--text-warning); }
  .tl-event.muted::before { background: var(--text-tertiary); }
  .tl-event.special::before { background: var(--text-coral); }
  .tl-event .date { font-size: 10px; color: var(--text-tertiary); }
  .tl-event .ttl { font-size: 12.5px; font-weight: 500; }
  .tl-event .sub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

  /* ── Diag access tiles ──────────────────────────────────── */
  .diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .diag-tile { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; padding: 14px 16px; cursor: pointer; }
  .diag-tile:hover { border-color: var(--text-teal); }
  .diag-tile .name { font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-teal); }
  .diag-tile .desc { font-size: 11px; color: var(--text-tertiary); line-height: 1.5; }
  .diag-tile .status { margin-top: 8px; font-size: 11px; }

  /* ── Show/hide ──────────────────────────────────────────── */
  .screen { display: none; }
  .screen.active { display: block; }
  .sidebar[data-role] { display: none; }
  .sidebar[data-role].active { display: block; }

  /* ── Counter tiles (D'Clic spécifique) ──────────────────── */
  .counter-tile { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; padding: 14px 16px; display: flex; align-items: center; cursor: pointer; }
  .counter-tile .left { flex: 1; }
  .counter-tile .left .v { font-size: 26px; font-weight: 500; line-height: 1.1; }
  .counter-tile .left .l { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
  .counter-tile .left .h { font-size: 11px; color: var(--text-bordeaux); cursor: pointer; }
  .counter-tile .right-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }


  /* ── Filter-bar standardisée · 1 ligne · filtres uniformes ───── */
  .filter-bar-std { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; }
  .filter-bar-std > input,
  .filter-bar-std > select { flex: 1 1 0; min-width: 0; width: auto; text-overflow: ellipsis; }
  .filter-bar-std > .btn,
  .filter-bar-std > .btn-sm,
  .filter-bar-std > .spacer { flex: 0 0 auto; }
  .filter-bar-std .spacer { width: 6px; }
  /* ── Toggle vs N-1 partagé sur toutes les vues ─────────────── */
  /* Mode N (défaut) · seules les valeurs N sont visibles · aucun delta · aucune progression */
  .val-n { display: inline; }
  .val-n1, .progress-to-n, .delta-n1 { display: none; }
  /* Mode vs N-1 · valeur N-1 grise + flèche → valeur N + badges delta */
  body.show-n1 .val-n { display: none; }
  body.show-n1 .val-n1,
  body.show-n1 .progress-to-n,
  body.show-n1 .delta-n1 { display: inline; }
  .btn-vs-n1-active { background: var(--text-bordeaux) !important; color: white !important; }
  .val-n1 { color: var(--text-tertiary); }
  .progress-to-n { color: var(--text-success); font-weight: 600; margin-left: 8px; }

  /* ══════════════════════════════════════════════════════════
     Compléments Pulse (hors maquette) · formulaires, flashs,
     modales, sidebar cliquable, états vides
     ══════════════════════════════════════════════════════════ */
  .sidebar a.item, .sidebar a.menu-item-direct, .sidebar a.menu-header { text-decoration: none; }
  .sidebar .menu-header a { color: inherit; text-decoration: none; flex: 1; }
  .sidebar .legacy-hint { font-size: 10px; color: var(--text-muted); padding: 2px 10px 6px 26px; }
  .topbar .user a { color: inherit; text-decoration: none; }
  .topbar .notif { position: relative; cursor: pointer; text-decoration: none; color: var(--text-secondary); }
  .topbar .notif .count,
  .topbar .tb-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: #e11d48;
    color: #ffffff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--bg-card, #ffffff);
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
  }

  /* Volet déroulant Notifications dans le Header */
  .tb-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 330px;
    max-width: 90vw;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-strong, #cbd5e1);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .tb-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-tile-gray, #f8fafc);
    border-bottom: 1px solid var(--border, #e2e8f0);
  }
  .tb-notif-list {
    max-height: 360px;
    overflow-y: auto;
  }
  .tb-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 12px;
    text-decoration: none;
    color: var(--text-primary, #1e293b);
    border-bottom: 1px solid var(--border, #f1f5f9);
    transition: background 0.15s ease;
    font-size: 11.5px;
  }
  .tb-notif-item:hover {
    background: var(--bg-tile-info, #f0f9ff);
  }
  .tb-notif-item.unread {
    background: rgba(185, 28, 28, 0.05);
    font-weight: 600;
  }
  .tb-notif-item .notif-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
  }
  .tb-notif-item .notif-body {
    flex: 1;
    min-width: 0;
  }
  .tb-notif-item .notif-text {
    line-height: 1.35;
    word-break: break-word;
  }
  .tb-notif-item .notif-date {
    font-size: 10px;
    color: var(--text-muted, #64748b);
    margin-top: 2px;
    font-weight: normal;
  }
  .tb-notif-check-btn {
    display: none;
    align-self: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #64748b;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 6px;
    transition: all 0.15s ease;
  }
  .tb-notif-item:hover .tb-notif-check-btn {
    display: inline-flex;
  }
  .tb-notif-check-btn:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    transform: scale(1.1);
  }
  .tb-notif-footer {
    padding: 8px 12px;
    text-align: center;
    background: var(--bg-tile-gray, #f8fafc);
    border-top: 1px solid var(--border, #e2e8f0);
  }

  .flash { padding: 9px 14px; border-radius: 5px; font-size: 12px; margin-bottom: 10px; border: 0.5px solid var(--border); background: var(--bg-tile-info); color: var(--text-info); }
  .flash.info { background: var(--bg-tile-info); color: var(--text-info); }
  .flash.success { background: var(--bg-tile-success); color: var(--text-success); }
  .flash.warning { background: var(--bg-tile-warning); color: var(--text-warning); }
  .flash.error, .flash.danger { background: var(--bg-tile-coral); color: var(--text-coral); }

  .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
  .form-grid .full { grid-column: 1 / -1; }
  .field label { display: block; font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; font-weight: 500; }
  .field input, .field select, .field textarea { width: 100%; padding: 7px 10px; border: 0.5px solid var(--border-strong); border-radius: 5px; font-family: inherit; font-size: 12.5px; background: var(--bg-card); color: var(--text-primary); }
  .field input[type="radio"], .field input[type="checkbox"] { width: auto; padding: 0; border: none; background: transparent; }
  .field .rdv-card-opt { text-transform: none !important; letter-spacing: 0 !important; }
  .field .rdv-card-opt:hover { border-color: var(--border-strong, #cbd5e1) !important; }
  .field input:focus, .field select:focus, .field textarea:focus, .filter-bar input:focus, .filter-bar select:focus, .fil-form textarea:focus { outline: none; border-color: var(--text-bordeaux); box-shadow: 0 0 0 3px rgba(112,21,15,.12); }
  .field textarea { min-height: 80px; resize: vertical; }
  .field .hint { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }
  .form-actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
  .panel-body { padding: 14px 16px; }
  .empty { padding: 28px 16px; text-align: center; color: var(--text-muted); font-size: 12px; font-style: italic; }
  .placeholder-note { background: var(--bg-tile-warning); color: var(--text-warning); padding: 8px 12px; border-radius: 5px; font-size: 11.5px; margin-bottom: 12px; }
  .inline-form { display: inline; }
  .badge-src { font-size: 9.5px; padding: 1px 6px; border-radius: 8px; background: var(--bg-tile-gray); color: var(--text-tertiary); margin-left: 4px; }
  .gauge { display: inline-block; width: 60px; height: 6px; background: var(--bg-tile-gray); border-radius: 3px; vertical-align: middle; margin-right: 6px; position: relative; overflow: hidden; }
  .gauge > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--text-bordeaux); border-radius: 3px; }
  .gauge.ok > i { background: var(--text-success); }
  .gauge.low > i { background: var(--text-coral); }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  @media (max-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
  .three-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
  @media (max-width: 1000px) { .three-col { grid-template-columns: minmax(0, 1fr); } }
  .two-col > *, .three-col > *, .hero-band > *, .cobot-shell > * { min-width: 0; }
  .kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; font-size: 12px; }
  .kv dt { color: var(--text-tertiary); }
  .kv dd { margin: 0; }
  .link { color: var(--text-bordeaux); text-decoration: none; }
  .link:hover { text-decoration: underline; }
  .modal-bg { display: none; position: fixed; inset: 0; background: rgba(31,26,26,0.45); z-index: 1040; align-items: center; justify-content: center; }
  .modal-bg.open { display: flex; }
  .pmodal { background: var(--bg-card); border-radius: 8px; padding: 18px 20px; width: min(560px, 92vw); max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
  .pmodal h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--text-bordeaux); }
  .step-card { cursor: pointer; }
  .step-card a { color: inherit; text-decoration: none; }
  .sortable { cursor: pointer; user-select: none; }
  .sortable::after { content: " ⇅"; opacity: 0.4; font-size: 10px; }
  .sortable.sort-asc::after { content: " ▲"; opacity: 0.9; color: var(--text-bordeaux); }
  .sortable.sort-desc::after { content: " ▼"; opacity: 0.9; color: var(--text-bordeaux); }
  .map-box {
    height: clamp(580px, calc(100vh - 230px), 1200px);
    min-height: 580px;
    width: 100%;
    border-radius: 0 0 8px 8px;
    border: 0.5px solid var(--border);
  }
  @media (min-width: 1400px) {
    .map-box {
      height: clamp(680px, calc(100vh - 200px), 1350px);
      min-height: 680px;
    }
  }
  @media (max-width: 767.98px) {
    .map-box {
      height: calc(100vh - 220px);
      min-height: 420px;
    }
  }
  .text-right { text-align: right; }
  .nowrap { white-space: nowrap; }
  .mt { margin-top: 14px; }
  .mb { margin-bottom: 14px; }

  /* ── Fiches détaillées (candidat / établissement) ─────────── */
  .acc .acc-head { cursor: pointer; user-select: none; }
  .acc .acc-caret { font-size: 11px; color: var(--text-tertiary); transition: transform .15s; }
  .acc:not(.open) .acc-caret { transform: rotate(-90deg); }
  .acc:not(.open) .acc-body { display: none; }
  .acc-body { padding: 12px 16px; }
  .kv3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 18px; font-size: 12.5px; }
  .kv3-item { padding: 4px 0; border-bottom: 0.5px dashed var(--border); }
  .kv3-item--full { grid-column: 1 / -1; }
  .kv3-l { color: var(--text-tertiary); }
  .kv3-v { font-weight: 500; }
  .kv3-v.muted { font-weight: 400; color: var(--text-muted); font-style: italic; }
  .kv3-v.wysiwyg-content { margin-top: 4px; padding: 6px 10px; background: var(--bg-subtle, rgba(0,0,0,0.02)); border-left: 2px solid var(--text-bordeaux, #800020); border-radius: 4px; font-weight: 400; line-height: 1.45; }
  .kv3-v.wysiwyg-content p, .kv3-v.wysiwyg-content ul, .kv3-v.wysiwyg-content ol { margin: 0 0 4px; }
  .kv3-v.wysiwyg-content p:last-child, .kv3-v.wysiwyg-content ul:last-child, .kv3-v.wysiwyg-content ol:last-child { margin-bottom: 0; }
  .kv3-v.wysiwyg-content ul, .kv3-v.wysiwyg-content ol { padding-left: 18px; }
  .wysiwyg-wrap { border: 1px solid var(--border-strong, #cbd5e1); border-radius: 6px; background: var(--bg-card, #fff); overflow: hidden; }
  .wysiwyg-wrap:focus-within { border-color: var(--text-bordeaux, #800020); box-shadow: 0 0 0 2px rgba(128, 0, 32, 0.1); }
  .wysiwyg-toolbar { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; padding: 5px 8px; background: var(--bg-tile-gray, #f8fafc); border-bottom: 1px solid var(--border, #e2e8f0); }
  .wysiwyg-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-secondary, #334155); font-size: 12px; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
  .wysiwyg-btn:hover { background: var(--bg-card, #fff); border-color: var(--border-strong, #cbd5e1); color: var(--text-bordeaux, #800020); }
  .wysiwyg-sep { width: 1px; height: 16px; background: var(--border-strong, #cbd5e1); margin: 0 4px; }
  .wysiwyg-editor { min-height: 92px; max-height: 280px; overflow-y: auto; padding: 8px 10px; font-size: 12.5px; line-height: 1.45; color: var(--text-primary, #0f172a); outline: none; }
  .wysiwyg-editor:empty::before { content: attr(data-placeholder); color: var(--text-muted, #94a3b8); font-style: italic; pointer-events: none; }
  .wysiwyg-editor p, .wysiwyg-editor ul, .wysiwyg-editor ol { margin: 0 0 4px; }
  .wysiwyg-editor ul, .wysiwyg-editor ol { padding-left: 20px; }
  .src { font-size: 11px; opacity: .8; }
  .chip-purple { background: var(--bg-tile-purple); color: var(--text-purple); }
  .cand-step { padding: 5px 11px; border-radius: 999px; font-weight: 600; font-size: 12px; cursor: pointer; background: var(--bg-tile-gray); color: var(--text-tertiary); border: none; font-family: inherit; transition: transform .12s, box-shadow .12s; }
  .cand-step:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
  .cand-step.done { background: var(--bg-tile-success); color: var(--text-success); }
  a.cand-step { text-decoration: none; display: inline-block; }
  .cand-step.viewed { outline: 2px dashed var(--text-bordeaux); outline-offset: 2px; }
  .cand-step.active { background: var(--text-bordeaux); color: #fff; }
  .steps-band { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; margin-bottom: 12px; }
  .steps-band .arrow { color: var(--text-muted); font-size: 12px; }
  .steps-band .lbl { font-size: 10.5px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .4px; margin-right: 4px; }
  .etape-bloc { border-left: 3px solid var(--text-bordeaux); }
  .etape-bloc.dim { opacity: .55; }
  .hero-band { display: grid; grid-template-columns: 2fr 3fr; gap: 14px; margin-bottom: 12px; }
  @media (max-width: 1100px) { .hero-band { grid-template-columns: 1fr; } }
  .hero-id { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; }
  .hero-id .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--text-bordeaux); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 18px; flex-shrink: 0; }
  .hero-id h1 { font-size: 19px; margin: 0; }
  .hero-kpis { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 6px; padding: 10px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 12px; }
  .hero-kpis.plan-achats-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  @media (max-width: 1150px) { .hero-kpis.plan-achats-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .hero-kpis .k { padding: 4px 0 4px 8px; border-left: 2px solid var(--border-strong); }
  .hero-kpis .k .l { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .3px; }
  .hero-kpis .k .v { font-size: 15px; font-weight: 600; }
  .hero-kpis .k .h { font-size: 10.5px; color: var(--text-tertiary); }
  .subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
  .subtabs .tab { padding: 6px 12px; border: 0.5px solid var(--border); border-radius: 5px; margin: 0; }
  .subtabs .tab.active { background: var(--bg-side-active); border-color: var(--text-bordeaux); }
  .calendar-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
  .calendar-months .m { text-align: center; padding: 6px 0; border-radius: 4px; background: var(--bg-tile-gray); font-size: 11px; color: var(--text-tertiary); }
  .calendar-months .m.hi { background: var(--bg-tile-success); color: var(--text-success); font-weight: 600; }
  .calendar-months .m.lo { background: var(--bg-tile-coral); color: var(--text-coral); }
  .bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; }
  .bars .b { flex: 1; background: var(--text-bordeaux); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
  .bars .b.hc { background: var(--br-rose); }
  .bars-lbl { display: flex; gap: 3px; font-size: 9px; color: var(--text-muted); }
  .bars-lbl span { flex: 1; text-align: center; }

/* Saisies hors .field (tableaux de propositions, CR) : même police que la page */
table.data input[type="text"], table.data input[type="date"], table.data input[type="number"], table.data textarea, table.data select,
.panel-body > form > textarea, textarea[name="transcript"], textarea[name="note"] { font-family: inherit; font-size: 12px; padding: 4px 6px; border: 0.5px solid var(--border-strong); border-radius: 4px; background: var(--bg-card); color: var(--text-primary); }
/* Puces participants (modale RDV) */
.rdv-pchip { cursor: pointer; border: 1px solid var(--border-strong); background: var(--bg-card); font-family: inherit; }
.rdv-pchip.on { border-color: var(--text-success); }
/* Choix multiples (type multi du dictionnaire) */
.multi { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
.field .multi label, .multi label { display: inline-flex; align-items: center; gap: 5px; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--text-primary); font-weight: 400; white-space: nowrap; margin: 0; cursor: pointer; }
.field .multi input[type="checkbox"], .multi input[type="checkbox"] { width: auto; margin: 0; }
/* Bloc compact de sélection de contacts (pilules + saisie libre) sous Établissement / Partenaire */
.contact-strip { margin-top: 6px; padding: 6px 8px; background: var(--bg-subtle, rgba(0,0,0,0.02)); border: 1px solid var(--border); border-radius: 5px; }
.contact-strip-head { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; }
.contact-pills { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 5px; }
.contact-pills:empty { display: none; margin-bottom: 0; }
.field .contact-pill, .contact-pill { display: inline-flex !important; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-card, #fff); font-size: 11.5px !important; color: var(--text-primary) !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; margin: 0 !important; cursor: pointer; line-height: 1.3; user-select: none; }
.field .contact-pill:hover, .contact-pill:hover { border-color: var(--text-bordeaux); }
.field .contact-pill input[type="checkbox"], .contact-pill input[type="checkbox"] { width: 13px !important; height: 13px !important; margin: 0 !important; padding: 0 !important; flex: 0 0 auto; accent-color: var(--text-bordeaux); }
.field .contact-strip input[type="text"], .contact-strip input[type="text"] { padding: 4px 8px !important; font-size: 11.5px !important; height: 27px; }
/* En-tête figé (sticky) de la modale / fiche dossier (Tâche, Opportunité, Litige) + barre de statut rapide colorée */
.dossier-modal-sticky-head { position: sticky; top: 0; z-index: 50; background: var(--bg-card, #fff); margin: 0 -22px 14px -22px; padding: 14px 22px 12px 22px; border-bottom: 1px solid var(--border-strong, #cbd5e1); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06); }
.dossier-page-sticky-head { position: sticky; top: 0; z-index: 30; background: var(--bg-app, #f8fafc); margin: -18px -26px 14px -26px; padding: 14px 26px 12px 26px; border-bottom: 1px solid var(--border-strong, #cbd5e1); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05); }
.status-bar-box { background: var(--bg-subtle, #f8fafc); border: 1px solid var(--border-strong, #e2e8f0); border-radius: 6px; padding: 7px 12px; margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.status-step-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; font-size: 11.5px; font-weight: 500; border-radius: 6px; border: 1px solid var(--border-strong, #cbd5e1); background: var(--bg-card, #fff); color: var(--text-secondary, #475569); cursor: pointer; transition: all 0.15s ease; line-height: 1.3; opacity: 1 !important; }
.status-step-btn:hover:not(:disabled) { border-color: var(--br-bordeaux, #70150F); color: var(--br-bordeaux, #70150F); background: #fdf8f8; }
.status-step-btn.is-done { background: #e8f5e9 !important; color: #1b5e20 !important; border-color: #81c784 !important; font-weight: 600 !important; opacity: 1 !important; }
.status-step-btn.is-done:hover:not(:disabled) { background: #c8e6c9 !important; }
.status-step-btn.is-current, .status-step-btn.is-current:disabled { background: var(--br-bordeaux, #70150F) !important; color: #fff !important; border-color: var(--br-bordeaux, #70150F) !important; font-weight: 700 !important; box-shadow: 0 2px 8px rgba(112, 21, 15, 0.28) !important; opacity: 1 !important; cursor: default; }
.status-step-btn.is-won, .status-step-btn.is-won:disabled, .status-step-btn.is-current.is-won, .status-step-btn.is-current.is-won:disabled { background: #2e7d32 !important; color: #fff !important; border-color: #2e7d32 !important; font-weight: 700 !important; box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3) !important; opacity: 1 !important; }
.status-step-btn.is-lost, .status-step-btn.is-lost:disabled, .status-step-btn.is-current.is-lost, .status-step-btn.is-current.is-lost:disabled { background: #c0392b !important; color: #fff !important; border-color: #c0392b !important; font-weight: 700 !important; box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3) !important; opacity: 1 !important; }
.status-step-btn.is-warn, .status-step-btn.is-warn:disabled, .status-step-btn.is-current.is-warn, .status-step-btn.is-current.is-warn:disabled { background: #d97706 !important; color: #fff !important; border-color: #d97706 !important; font-weight: 700 !important; box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3) !important; opacity: 1 !important; }
/* Rendu Markdown minimal (compte rendu de RDV) */
.md { font-size: 12.5px; line-height: 1.5; }
.md .md-h { margin: 8px 0 3px; font-size: 13px; font-weight: 600; color: var(--text-bordeaux); }
.md h3.md-h { font-size: 13.5px; }
.md .md-ul { margin: 2px 0 6px; padding-left: 18px; }
.md .md-p { margin: 3px 0; }

/* Barre de navigation d'un audit ouvert depuis une fiche (diag achats) */
.audit-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--bg-tile-teal); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin-bottom: 12px; font-size: 12px; }

/* Registre d'identités (clé SIREN/SIRET) */
.identite-ligne{font-size:12px;color:var(--text-tertiary)}
.identite-ligne .inline-details{display:inline-block}
.identite-ligne .inline-details summary{cursor:pointer;display:inline;list-style:none}
.identite-ligne .inline-form{display:inline-flex;gap:4px;margin-left:6px}
.identite-ligne .inline-form input{font-size:12px;padding:2px 6px;width:170px}

/* Cartographie des achats · édition en ligne */
.carto .carto-marche td{font-size:10px;text-transform:uppercase;letter-spacing:.6px;font-weight:700;color:var(--text-bordeaux);background:var(--bg-soft);padding:5px 12px}
.carto .carto-cat.vide td{opacity:.6}
.carto .carto-toggle{cursor:pointer}
.carto .chev{color:var(--text-bordeaux);font-size:10px}
.carto .carto-det td{background:#FBF9F8;font-size:12px}
.ed{display:inline-block;min-width:48px;min-height:16px;border-bottom:1px dashed var(--border-strong);padding:1px 3px;border-radius:2px;cursor:text;font-size:12px;color:var(--text-secondary)}
.ed.strong{color:inherit;font-weight:600}
.ed.num{min-width:36px;text-align:right}
.ed:hover{background:var(--bg-tile-gray)}
.ed:empty:not(:focus):before{content:attr(data-placeholder);color:var(--text-tertiary);font-style:italic}
.ed:focus{outline:none;background:var(--bg-tile-warning)}
.ed:empty::before{content:'+ note';color:var(--text-muted)}
.ed.num:empty::before{content:'—'}
.ed.saving{opacity:.5}
.ed.saved{background:var(--bg-tile-success)}
.ed.err{background:var(--bg-tile-coral)}
.sat{cursor:pointer;font-size:14px;user-select:none}

/* Recalcul du diag achats : voile sur tout le bloc pour ne pas décider sur des chiffres périmés */
.diag-overlay{position:absolute;inset:0;z-index:5;background:rgba(255,255,255,.78);backdrop-filter:blur(1.5px);display:flex;align-items:flex-start;justify-content:center;padding-top:60px;border-radius:6px}
.diag-overlay-box{background:var(--bg-card,#fff);border:1px solid var(--border-strong);border-radius:8px;padding:14px 20px;box-shadow:0 8px 30px rgba(0,0,0,.12);text-align:center;font-size:13px;position:sticky;top:80px}
.diag-overlay .spinner-sm{vertical-align:middle}   /* battement charte : theme-baresto.css */
@keyframes diag-spin{to{transform:rotate(360deg)}}

  /* ─── Dossiers (Actions à mener façon Salesforce) : kanban + fil d'activité ─── */
  .kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
  .kcol { background: var(--bg-tile-gray); border-radius: 8px; padding: 8px; min-height: 120px; }
  .kcol.done { opacity: 0.75; }
  .khead { font-size: 12px; font-weight: 500; color: var(--text-secondary); padding: 2px 4px 8px; display: flex; align-items: center; gap: 6px; }
  .kcard { display: block; background: var(--bg-card); border: 0.5px solid var(--border); border-left: 3px solid var(--text-bordeaux); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; text-decoration: none; color: inherit; }
  .kcard:hover { border-color: var(--border-strong); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
  .kcard.late { border-left-color: var(--text-coral); }
  .kcard.crit { border-left-color: var(--text-alert); }
  .kttl { font-size: 12.5px; font-weight: 500; }
  .ksub { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
  .kmeta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 10.5px; color: var(--text-secondary); margin-top: 6px; }
  .kmeta .late { color: var(--text-coral); font-weight: 500; }
  .kempty { font-size: 11px; color: var(--text-tertiary); text-align: center; padding: 12px 0; }
  .fil-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; }
  .fil-form textarea { flex: 1; padding: 7px 10px; border: 0.5px solid var(--border-strong); border-radius: 5px; font-family: inherit; font-size: 12.5px; resize: vertical; }
  .fil-item { display: flex; gap: 10px; padding: 8px 0; border-top: 0.5px solid var(--border); }
  .fil-item.evenement .fil-text { color: var(--text-secondary); font-style: italic; }
  .fil-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-tile-info); color: var(--text-info); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .fil-meta { font-size: 11px; color: var(--text-tertiary); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .fil-text { font-size: 12.5px; white-space: pre-wrap; margin-top: 2px; }

  /* ═══════════════════════════════════════════════════════════════════════
     Mobile (≤ 900 px) : sidebar off-canvas + burger, barre de navigation basse,
     grilles en une colonne, onglets défilants, tableaux et kanban en défilement horizontal.
     Rien ne change au-dessus de 900 px.
     ═══════════════════════════════════════════════════════════════════════ */
  .burger { display: none; border: none; background: transparent; border-radius: 6px; font-size: 18px; line-height: 1; min-width: 38px; min-height: 38px; padding: 6px 8px; cursor: pointer; color: var(--text-primary); align-items: center; justify-content: center; }
  .side-backdrop { display: none; }
  .bottom-nav { display: none; }
  .tb-mobile-search-btn { display: none !important; }
  .sidebar-mobile-user, .sidebar-mobile-logout { display: none; }
  .show-mobile, .show-mobile-inline, .show-mobile-flex { display: none !important; }
  @media (max-width: 900px) {
    html, body { height: auto; }
    body { display: block; min-height: 100vh; -webkit-text-size-adjust: 100%; }
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
    .show-mobile-inline { display: inline !important; }
    .show-mobile-flex { display: flex !important; }
    .topbar { padding: 8px 12px; gap: 8px; position: sticky; top: 0; z-index: 1030; flex-wrap: wrap; min-height: 52px; }
    .topbar .logo-sub, .topbar .tb-badge, .topbar .help, .topbar .tb-search-kbd, .topbar .tb-user-name, .topbar .tb-asst, .topbar .tb-logout { display: none !important; }
    .tb-mobile-search-btn { display: inline-flex !important; }
    .topbar .tb-retour { max-width: 140px; }
    .topbar .tb-search { display: none; flex: 1 0 100%; order: 10; max-width: none; margin: 4px 0 2px; }
    .topbar.is-mobile-search-open .tb-search { display: flex; }
    .topbar .tb-search input { padding-left: 30px; padding-right: 10px; font-size: 14px; min-height: 38px; }
    .topbar .pulse-logo { font-size: 17px; }
    .topbar .right { gap: 8px; margin-left: auto; }
    .topbar .user, .topbar .user.welcome { padding: 0; border: none; background: transparent; }
    .topbar .user .tb-user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--br-lie-de-vin-tint, #F6E9EE); color: var(--br-lie-de-vin, #973756); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
    .burger { display: inline-flex; }
    .shell { display: block; overflow: visible; }
    .global-chatter-rail { display: none !important; }
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 84vw); z-index: 1050; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 0 0 30px rgba(0,0,0,0.35); padding-top: 12px; }
    .sidebar-mobile-head { display: flex; }
    .sidebar-mobile-user { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 2px 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); color: #ffffff; text-decoration: none; font-size: 13px; }
    .sidebar-mobile-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #ffffff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
    .sidebar-footer { display: flex; flex-direction: column; gap: 6px; }
    .sidebar-mobile-logout { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.85); text-decoration: none; font-size: 12px; padding-top: 4px; }
    body.side-open .sidebar { transform: translateX(0); }
    body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1045; }
    body.side-open { overflow: hidden; }
    .sidebar .item, .sidebar .menu-header, .sidebar .menu-item-direct { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }   /* cibles tactiles ≥ 44 px */
    .main { padding: 12px 12px 88px; overflow: visible; min-width: 0; }
    .audit-nav { flex-wrap: wrap; }
    h1.page-title, .heading h1 { font-size: 21px; }
    .accueil-heading { margin-bottom: 8px; }
    .breadcrumb { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .kpi-row:not(.accueil-kpis) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
    .kpi-tile { min-width: 0; }
    .kpi-tile .v { font-size: 20px; }
    /* Tablette (768px - 900px) : on conserve les KPIs ; Mobile (< 768px) : masqués pour laisser plus de place au Point du jour */
    .kpi-row.accueil-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .two-col, .three-col, .hero-band, .cobot-shell, .sharepoint-folders-grid, .sites-cards-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
    .two-col > *, .three-col > *, .hero-band > *, .cobot-shell > *, .form-grid > *, .sharepoint-folders-grid > *, .sites-cards-grid > * { min-width: 0; max-width: 100%; }
    .shell, .main, .fiche-2col, .fiche-main, #fiche-tab-pane, .panel, .panel-body, .acc-body, details { min-width: 0; max-width: 100%; }
    body, .main { overflow-x: clip; }
    .panel-body code { overflow-wrap: anywhere; word-break: break-word; }
    .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .mb { margin-bottom: 10px; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tabs::-webkit-scrollbar { display: none; }
    .tabs .tab { padding: 10px 12px; flex: 0 0 auto; min-height: 44px; }
    .subtabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .subtabs .tab { flex: 0 0 auto; }
    .filter-bar { padding: 8px; gap: 6px; }
    .filter-bar input, .filter-bar select { min-width: 0; flex: 1 1 45%; font-size: 14px; min-height: 44px; }   /* 14 px = pas de zoom iOS au focus */
    .filter-bar .btn { flex: 0 0 auto; min-height: 44px; }
    .btn { --bs-btn-padding-y: 8px; --bs-btn-padding-x: 12px; --bs-btn-font-size: 13px; }
    .btn-sm { --bs-btn-padding-y: 5px; --bs-btn-padding-x: 10px; --bs-btn-font-size: 12px; }
    .field input, .field select, .field textarea, .fil-form textarea, .ed { font-size: 14px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .panel-header { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
    .panel-header .right, .panel-header .table-actions-right { margin-left: auto; width: auto; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .panel-body { padding-left: 12px; padding-right: 12px; }
    .accueil-cards-tabs { grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px; }
    .accueil-cards-tabs .card-tab { padding: 8px 10px; min-height: 0; gap: 2px; }
    .accueil-cards-tabs .card-tab .ct-count { font-size: 18px; }
    .accueil-equipe-mobile { padding: 11px 14px; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-primary); text-decoration: none; }
    .accueil-equipe-mobile:hover { text-decoration: none; color: var(--br-lie-de-vin); }
    .table-wrap, .table-responsive { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.data { min-width: 560px; }
    table.data th, table.data td { padding: 8px 8px; }
    :not(.table-wrap):not(.table-responsive) > table.data:not(.table-cards-mobile),
    :not(.table-wrap):not(.table-responsive) > table.table:not(.table-cards-mobile) {
      display: block;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      overflow-x: auto !important;
      -webkit-overflow-scrolling: touch;
    }
    .kanban { grid-auto-columns: 84vw; scroll-snap-type: x mandatory; }
    .kcol { scroll-snap-align: start; }
    .pmodal { width: 96vw; max-height: 92vh; padding: 14px; }
    .inbox-card { flex-wrap: wrap; }
    .fil-form { flex-direction: column; align-items: stretch; }
    .cand-steps, .cand-step { font-size: 11px; }
    /* Barre basse (5 raccourcis DS Baresto : Accueil, Actions, Micro Assistant central surélevé, Agenda, Chatter) */
    .bottom-nav { display: flex; align-items: center; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; background: var(--bg-card, #ffffff); border-top: 1px solid var(--border); padding: 2px 4px calc(2px + env(safe-area-inset-bottom)); min-height: 58px; box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05); }
    .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; font-size: 10.5px; font-weight: 500; color: var(--text-tertiary); text-decoration: none; padding: 4px 0; position: relative; }
    .bottom-nav a > span:not(.bottom-nav-mic-circle) { font-size: 18px; line-height: 1; position: relative; display: inline-flex; align-items: center; justify-content: center; }
    .bottom-nav a.active { color: var(--br-lie-de-vin, #973756); font-weight: 700; }
    .bottom-nav .dot { position: absolute; top: -6px; right: -11px; min-width: 17px; height: 17px; background: var(--br-lie-de-vin, #973756); color: #fff; border: 1.5px solid #ffffff; border-radius: 999px; font-size: 9.5px; padding: 0 4px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
    .bottom-nav a.bottom-nav-mic { flex: 0 0 64px; min-height: 54px; padding: 0; }
    .bottom-nav .bottom-nav-mic-circle { width: 52px; height: 52px; border-radius: 50%; background: var(--br-lie-de-vin, #973756); color: #ffffff; border: 4px solid #ffffff; box-shadow: 0 4px 12px rgba(151, 55, 86, 0.35), 0 0 0 1px var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; transform: translateY(-13px); transition: transform 0.15s ease, background 0.15s ease; }
    .bottom-nav a.bottom-nav-mic:active .bottom-nav-mic-circle { transform: translateY(-13px) scale(0.95); background: var(--br-lie-de-vin-dark, #782A43); }
    #feedback-btn { bottom: 74px !important; }
  }
  @media (max-width: 767.98px) {
    .kpi-row.accueil-kpis { display: none !important; }
    .topbar .tb-retour { display: none !important; }
    .tabs, .nav-tabs { flex-wrap: wrap; overflow-x: visible; gap: 2px; }
    .tabs .tab, .nav-tabs .nav-link { padding: 8px 8px; font-size: 11.5px; gap: 4px; min-height: 38px; }
    .panel-header.table-actions .right,
    .panel-header .table-actions-right { width: 100%; margin-left: 0; }
  }
  @media (max-width: 480px) {
    .kpi-row:not(.accueil-kpis) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-tile { padding: 10px; }
    .kanban { grid-auto-columns: 88vw; }
  }
  /* Chatter · réponses sous un message */
  .fil-reponses { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--br-bordeaux-tint); }
  .fil-item.fil-rep { border-top: 0; padding: 5px 0; }
  .fil-form-rep { margin: 6px 0 0; }
  .fil-form-rep textarea { min-height: 30px; font-size: 12px; }
  .fil-item:target { background: var(--br-bordeaux-tint); border-radius: 6px; padding-left: 6px; padding-right: 6px; }
  /* @mentions : liste de l'équipe sous ou au-dessus de la zone de saisie (y compris dans les modales z-index 9999) */
  .mention-box { position: fixed; z-index: 10050; background: var(--bg-card, #fff); border: 1px solid var(--border-strong, #cbd5e1); border-radius: 8px; box-shadow: 0 12px 32px rgba(15,23,42,.18); padding: 4px; font-size: 12.5px; max-width: 94vw; }
  .mention-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 8px 6px; border-bottom: 1px solid var(--border, #e2e8f0); font-size: 11px; font-weight: 600; color: var(--text-secondary, #64748b); }
  .mention-list { max-height: 230px; overflow-y: auto; padding-top: 2px; }
  .mention-item { padding: 6px 8px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; transition: background 0.1s ease; }
  .mention-av { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-tile-info, #e0f2fe); color: var(--text-info, #0369a1); font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .mention-main { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mention-item.sel, .mention-item:hover { background: var(--bg-side-active, #f5edec); color: var(--text-bordeaux, #70150f); }
  .mention-item.sel .mention-av, .mention-item:hover .mention-av { background: var(--text-bordeaux, #70150f); color: #fff; }
  /* Dictée vocale rapide sur les champs de description (Tâches, Opportunités, Litiges) */
  .field-label-dictee { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
  .dictee-champ-wrap { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
  .btn-dictee-champ { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; border-radius: 999px; border: 1px solid var(--border-strong, #cbd5e1); background: var(--bg-subtle, #f8fafc); color: var(--text-secondary, #475569); cursor: pointer; transition: all .15s ease; line-height: 1.4; }
  .btn-dictee-champ:hover { background: var(--bg-tile-info, #e0f2fe); color: var(--text-info, #0369a1); border-color: var(--text-info, #38bdf8); }
  .btn-dictee-champ.recording { background: var(--bg-tile-coral, #fee2e2); color: var(--text-coral, #dc2626); border-color: var(--text-coral, #ef4444); animation: pulse-dictee-ring 1.4s infinite; }
  .dictee-champ-status { font-size: 10.5px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-muted, #64748b); }
  @keyframes pulse-dictee-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); } 50% { box-shadow: 0 0 0 4px rgba(239,68,68,0); } }

  /* ── Assistant Pulse (panneau latéral · Ctrl+J) ─────────────── */
  .topbar .tb-asst { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s; }
  .topbar .tb-asst > i { color: var(--br-lie-de-vin); }
  .topbar .tb-asst:hover { background: var(--bg-side-hover); border-color: var(--br-lie-de-vin); color: var(--text-primary); }
  .asst { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 96vw); background: var(--bg-card); border-left: 0.5px solid var(--border-strong); box-shadow: -8px 0 30px rgba(31,26,26,.16); z-index: 150; display: flex; flex-direction: column; font-size: 12.5px; }
  .asst-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 0.5px solid var(--border); background: linear-gradient(120deg, #fff6f3, #f3eef8); }
  .asst-title { font-weight: 700; font-size: 13.5px; } .asst-ctx { font-weight: 500; color: var(--text-secondary); font-size: 12px; }
  .asst-tools { display: flex; gap: 4px; }
  .asst-ib { font: inherit; font-size: 13px; line-height: 1; padding: 5px 7px; border: 0.5px solid transparent; border-radius: 6px; background: transparent; color: var(--text-secondary); cursor: pointer; text-decoration: none; }
  .asst-ib:hover { border-color: var(--border-strong); background: var(--bg-card); color: var(--text-primary); }
  .asst-histlist { max-height: 40vh; overflow: auto; border-bottom: 0.5px solid var(--border); background: var(--bg-tile-gray); }
  .asst-histit { display: block; padding: 7px 12px; text-decoration: none; color: inherit; border-bottom: 0.5px solid var(--border); }
  .asst-histit:hover, .asst-histit.on { background: var(--bg-tile-bordeaux, #F5EDEC); }
  .asst-body { flex: 1; overflow: auto; padding: 12px; }
  .asst-note { color: var(--text-secondary); font-size: 12px; margin: 0 0 10px; }
  .asst-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
  .asst-chip { font: inherit; font-size: 12px; padding: 5px 10px; border: 0.5px solid var(--border-strong); border-radius: 14px; background: var(--bg-tile-gray); cursor: pointer; text-align: left; }
  .asst-chip:hover { border-color: var(--text-bordeaux); color: var(--text-bordeaux); }
  .asst-msg { margin: 10px 0; }
  .asst-bubble { padding: 8px 12px; border-radius: 10px; background: var(--bg-tile-gray); }
  .asst-user .asst-bubble { background: var(--bg-tile-bordeaux, #F5EDEC); margin-left: 14%; }
  .asst-erreur .asst-bubble { background: var(--bg-tile-coral); color: var(--text-coral); }
  .asst-bubble .md-h { font-size: 12.5px; margin: 8px 0 4px; } .asst-bubble .md-p { margin: 4px 0; } .asst-bubble .md-ul { margin: 4px 0; padding-left: 18px; }
  .asst-bubble .md-q, .md-q { margin: 4px 0; padding: 4px 10px; border-left: 3px solid var(--border-strong); color: var(--text-secondary); font-style: italic; }
  .asst-src { font-size: 11px; color: var(--text-tertiary); margin: 4px 4px 0; }
  .asst-prop { margin: 8px 0 0 10px; padding: 8px 10px; border: 0.5px solid var(--border-strong); border-left: 3px solid var(--text-bordeaux); border-radius: 8px; background: var(--bg-card); }
  .asst-prop-valide { border-left-color: var(--text-success, #2e7d32); } .asst-prop-rejete { opacity: .6; border-left-color: var(--border-strong); }
  .asst-prop-t { font-weight: 700; margin-bottom: 4px; }
  .asst-prop label { display: block; font-size: 11px; color: var(--text-secondary); margin: 4px 0; }
  .asst-prop input, .asst-prop textarea, .asst-prop select { display: block; width: 100%; font: inherit; font-size: 12px; padding: 4px 6px; border: 0.5px solid var(--border-strong); border-radius: 6px; margin-top: 2px; }
  .asst-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .asst-prop-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
  .asst-brouillon-txt { margin-top: 6px; padding: 8px 10px; background: var(--bg-tile-gray); border-radius: 6px; max-height: 40vh; overflow: auto; }
  .asst-form { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-top: 0.5px solid var(--border); align-items: stretch; }
  .asst-form textarea { width: 100%; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 6px; resize: vertical; min-height: 60px; box-sizing: border-box; }
  .asst-form .asst-form-actions { display: flex; gap: 8px; width: 100%; }
  .asst-form .asst-form-actions > .btn { flex: 1 1 0; justify-content: center; min-height: 38px; }
  .asst-foot { padding: 4px 12px 10px; font-size: 10.5px; color: var(--text-tertiary); }
  .asst-dots i { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: var(--text-tertiary); animation: asst-b 1s infinite; } .asst-dots i:nth-child(2) { animation-delay: .2s; } .asst-dots i:nth-child(3) { animation-delay: .4s; }
  @keyframes asst-b { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
  body.asst-open .main { padding-right: min(470px, 96vw); }
  /* mode page */
  .asst-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
  .asst.asst-page { position: static; width: auto; height: min(74vh, 820px); box-shadow: none; border: 0.5px solid var(--border-strong); border-radius: 10px; }
  .asst-synth .md-h { font-size: 14px; margin: 12px 0 6px; color: var(--text-bordeaux); }
  .asst-synth > :first-child { margin-top: 0 !important; }
  /* Point du jour : entier sur desktop, synthèse repliée par défaut sur mobile avec bouton Lire la suite */
  @media (max-width: 767.98px) {
    #pdj-body.pdj-body-clamped {
      max-height: 135px;
      overflow: hidden;
      position: relative;
    }
    #pdj-body.pdj-body-clamped::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 26px;
      background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg-card, #ffffff));
      pointer-events: none;
    }
  }
  /* bloc « à surveiller » des fiches */
  .asst-alertes { display: flex; flex-direction: column; gap: 4px; }
  .asst-al { display: flex; gap: 8px; align-items: baseline; padding: 5px 8px; border-radius: 6px; background: var(--bg-tile-gray); font-size: 12px; text-decoration: none; color: inherit; }
  .asst-al.alerte { background: var(--bg-tile-coral); } .asst-al.attention { background: var(--bg-tile-warning, #FFF4E0); }
  .asst-al:hover { outline: 0.5px solid var(--border-strong); }
  @media (max-width: 900px) {
    .asst-layout { grid-template-columns: 1fr; }
    body.asst-open .main { padding-right: 12px; }
    .asst:not(.asst-page) { width: 100vw; top: 52px; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); height: auto; z-index: 1015; }
    .asst-form textarea { font-size: 14px; min-height: 68px; }
    .asst-foot { padding-bottom: 18px; }
  }
  .asst-prop .md-h, .asst-brouillon-txt .md-h { font-size: 12.5px; margin: 6px 0 3px; }
  .asst-prop .md-p, .asst-prop .md-ul { margin: 3px 0; } .asst-prop .md-ul { padding-left: 18px; }
  table.data tr.row-alert td { background: var(--bg-tile-coral); }
  .cle-affichee { user-select: all; font-size: 12px; padding: 2px 6px; background: var(--bg-card); border: 0.5px solid var(--border-strong); border-radius: 4px; }

/* ── Chantier · frise des six étapes (15/09) ── */
.ch-frise .ch-cartes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 10px 12px 4px; }
.ch-carte { border: 0.5px solid var(--border-strong); border-radius: 8px; background: var(--bg-card); padding: 8px 10px; font-size: 11.5px; position: relative; transition: transform .12s; }
.ch-carte.fait { border-color: var(--text-success); background: var(--bg-tile-success); }
.ch-carte.courant { border: 2px solid var(--br-bordeaux); background: var(--br-bordeaux-tint); transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.ch-carte.a_venir { opacity: .72; }
.ch-carte.arrete { border-color: var(--text-tertiary); border-style: dashed; }
.ch-carte.retard.courant, .ch-carte.retard .ch-date { color: var(--text-coral); }
.ch-tete { display: flex; align-items: center; gap: 5px; font-size: 12.5px; }
.ch-num { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; background: var(--bg-tile-gray); color: var(--text-secondary); }
.ch-carte.fait .ch-num { background: var(--text-success); color: #fff; }
.ch-carte.courant .ch-num { background: var(--br-bordeaux); color: #fff; }
.ch-date { margin-left: auto; font-size: 10.5px; color: var(--text-tertiary); white-space: nowrap; }
.ch-carte.fait .ch-date { color: var(--text-success); font-weight: 600; }
.ch-carte.courant .ch-date { color: var(--br-bordeaux); font-weight: 700; }
.ch-indic { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ch-indic .chip { font-size: 9.5px; }
.ch-txt { margin: 0; }
.ch-txt dt { font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); margin-top: 5px; }
.ch-txt dd { margin: 1px 0 0; line-height: 1.4; color: var(--text-secondary); }
.ch-carte.courant .ch-txt dd { color: var(--text-primary); }
.ch-action { margin-top: 8px; }
.ch-pied { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 12px 10px; }
/* mode compact : une ligne, cartes dépliables */
.ch-frise.compact .ch-cartes { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ch-frise.compact .ch-carte { padding: 5px 8px; cursor: pointer; transform: none; }
.ch-frise.compact .ch-carte:not(.open) .ch-corps { display: none; }
.ch-frise.compact .ch-carte:not(.open) .ch-tete b { font-size: 11.5px; }
@media (max-width: 1100px) { .ch-frise .ch-cartes { grid-template-columns: repeat(3, 1fr); } .ch-frise.compact .ch-cartes { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 700px) { .ch-frise .ch-cartes { grid-template-columns: 1fr; } }
/* mini-frise (plan achats, listes) : six points + étape courante */
.ch-mini { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; font-size: 10.5px; }
.ch-mini i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bg-tile-gray); border: 0.5px solid var(--border-strong); }
.ch-mini i.fait { background: var(--text-success); border-color: var(--text-success); }
.ch-mini i.courant { background: var(--br-bordeaux); border-color: var(--br-bordeaux); width: 10px; height: 10px; }
.ch-mini i.courant.retard { background: var(--text-coral); border-color: var(--text-coral); }
.ch-mini i.arrete { background: var(--text-tertiary); }
.ch-mini b { margin-left: 4px; font-weight: 600; }

/* ── Chantier · parcours par partenaire (4 jalons) ── */
.ch-parts { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; }
.ch-part { border: 0.5px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; background: var(--bg-card); }
.ch-part.perdue { opacity: .6; } .ch-part.active { border-color: var(--text-success); background: var(--bg-tile-success); }
.ch-part-tete { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.ch-jalons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.ch-jalon { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; border-radius: 6px; padding: 6px 8px; border: 0.5px solid var(--border-strong); background: var(--bg-card); }
.ch-jalon > i { flex: 0 0 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 10.5px; font-weight: 700; background: var(--bg-tile-gray); color: var(--text-secondary); }
.ch-jalon > div { min-width: 0; } .ch-jalon b { display: block; font-size: 11.5px; } .ch-jalon span { display: block; color: var(--text-tertiary); font-size: 10.5px; line-height: 1.35; margin: 1px 0 4px; }
.ch-jalon.fait { border-color: var(--text-success); } .ch-jalon.fait > i { background: var(--text-success); color: #fff; }
.ch-jalon.courant { border: 1.5px solid var(--br-bordeaux); background: var(--br-bordeaux-tint); } .ch-jalon.courant > i { background: var(--br-bordeaux); color: #fff; }
.ch-jalon.a_venir { opacity: .65; }
@media (max-width: 1100px) { .ch-jalons { grid-template-columns: repeat(2, 1fr); } }

/* ── Analyse des achats mensuels (onglet Diags) : barres empilées mercuriale / hors mercuriale, colonnes glissables → nouveau diag ── */
.am-leg { display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:middle; } .am-leg.cat { background: var(--br-bordeaux); } .am-leg.hc { background: #c9c7c0; }
.am-scroll { width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; }
.am-wrap { position:relative; height:260px; min-width:580px; padding: 6px 8px 24px 48px; }
.am-grid { position:absolute; left:48px; right:8px; top:6px; bottom:24px; pointer-events:none; }
.am-gl { position:absolute; left:0; right:0; border-top: 1px solid var(--border); }
.am-gl span { position:absolute; left:-46px; top:-7px; width:40px; text-align:right; font-size:10px; color: var(--text-tertiary); }
.am-chart { position:relative; display:flex; gap:10px; align-items:flex-end; height:100%; }
.am-col { flex:1 1 0; min-width:36px; display:flex; flex-direction:column; align-items:stretch; justify-content:flex-end; height:100%; position:relative; }
.am-col[draggable="true"] { cursor: grab; } .am-col[draggable="true"]:hover .am-stack { filter: brightness(1.08); } .am-col.dragging { opacity:.5; }
.am-stack { display:flex; flex-direction:column; width:100%; min-height:1px; }
.am-seg { display:flex; align-items:center; justify-content:center; font-size:10.5px; font-weight:600; min-height:0; overflow:hidden; }
.am-seg.cat { background: var(--br-bordeaux); color:#fff; } .am-seg.hc { background: #c9c7c0; color: var(--text-primary); }
.am-lbl { position:absolute; top:100%; left:0; right:0; text-align:center; font-size:10px; color: var(--text-tertiary); margin-top:5px; white-space:nowrap; }
#am-drop { font-size:11.5px; border: 1.5px dashed var(--border-strong); border-radius: 8px; padding: 5px 10px; color: var(--text-secondary); transition: all .15s; }
#am-drop.armee { border-color: var(--br-bordeaux); color: var(--br-bordeaux); background: var(--br-bordeaux-tint); }
#am-drop.survol { background: var(--bg-tile-success); border-color: var(--text-success); color: var(--text-success); transform: scale(1.04); }

/* ── Pages legacy (rapport stratégie, achats…) dans la coquille : --bs-body-bg est mis à transparent par ces pages, ce qui rendait
   invisibles les modales Bootstrap (fond, champs, cartes). Règles communes, quel que soit le layout (15/09). ── */
.legacy .modal { --bs-modal-bg: var(--bg-card, #fff); --bs-modal-color: var(--text-primary); }
.legacy .modal-content { background-color: var(--bg-card, #fff); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.legacy .modal .card.bg-light, .legacy .modal .bg-light { background-color: var(--bg-tile-gray, #F5F3F0) !important; }
.legacy .form-control, .legacy .form-select, .legacy .input-group-text { background-color: var(--bg-card, #fff); color: var(--text-primary); }
.legacy .form-control:disabled, .legacy .form-control[readonly] { background-color: var(--bg-tile-gray, #F5F3F0); color: var(--text-secondary); }
.legacy .modal .table-light th, .legacy .modal .table thead th { background: var(--bg-table-head); }
.legacy .modal .table-group-divider { border-top-color: var(--border-strong); }
.legacy .modal-header.bg-dark { background-color: var(--br-bordeaux-dark, #4a0d09) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   Indicateur de chargement global (Page Loader - délai 0.5s)
   ═══════════════════════════════════════════════════════════════════════════ */
.pulse-page-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.pulse-page-loader.is-loading {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── Barre supérieure animée (style NProgress avec dégradé charte) ── */
.pulse-page-loader-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #70150F 0%, #E50040 30%, #959D64 60%, #E50040 85%, #70150F 100%);
  background-size: 250% 100%;
  animation: pulsePageLoaderBarAnim 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 10px rgba(229, 0, 64, 0.55), 0 0 4px rgba(112, 21, 15, 0.35);
  z-index: 1000001;
}

@keyframes pulsePageLoaderBarAnim {
  0% { background-position: 250% 0; }
  100% { background-position: -150% 0; }
}

/* ── Voile en verre poli (backdrop blur) ── */
.pulse-page-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 245, 243, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: wait;
  z-index: 1000000;
}

/* ── Carte centrale Pulse ── */
.pulse-page-loader-box {
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(112, 21, 15, 0.12);
  border-radius: 16px;
  padding: 26px 36px 20px;
  box-shadow: 0 20px 48px -10px rgba(112, 21, 15, 0.14), 0 6px 18px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  transform: translateY(10px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.pulse-page-loader.is-loading .pulse-page-loader-box {
  transform: translateY(0) scale(1);
}

/* ── Battement d'icône Pulse ── */
.pulse-loader-heartbeat-wrap {
  width: 56px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pulse-loader-heartbeat {
  width: 48px;
  height: 48px;
  color: var(--br-bordeaux, #70150F);
  animation: pulseLoaderHeartbeat 1.15s ease-in-out infinite;
  transform-origin: center;
}

@keyframes pulseLoaderHeartbeat {
  0%, 100% { transform: scale(1); color: var(--br-bordeaux, #70150F); filter: drop-shadow(0 0 0 rgba(229,0,64,0)); }
  14% { transform: scale(1.18); color: var(--br-rouge, #E50040); filter: drop-shadow(0 0 10px rgba(229,0,64,0.45)); }
  28% { transform: scale(0.98); color: var(--br-bordeaux, #70150F); }
  42% { transform: scale(1.12); color: var(--br-rouge, #E50040); filter: drop-shadow(0 0 6px rgba(229,0,64,0.35)); }
  70% { transform: scale(1); color: var(--br-bordeaux, #70150F); }
}

.pulse-loader-title {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #1F1A1A);
  letter-spacing: 0.1px;
  margin: 0;
}

.pulse-loader-subtitle {
  font-size: 12px;
  color: var(--text-tertiary, #6F6664);
  margin: 0;
  line-height: 1.4;
}

/* ── Micro-points d'animation ── */
.pulse-loader-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.pulse-loader-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--br-lie-de-vin, #973756);
  opacity: 0.3;
  animation: pulseLoaderDotsAnim 1.3s infinite ease-in-out both;
}

.pulse-loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.pulse-loader-dots span:nth-child(2) { animation-delay: -0.16s; }
.pulse-loader-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes pulseLoaderDotsAnim {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.3; }
  40% { transform: scale(1.15); opacity: 1; background: var(--br-rouge, #E50040); }
}

.pulse-loader-cancel {
  background: transparent;
  border: 1px solid var(--border, #E6E0DD);
  color: var(--text-tertiary, #6F6664);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 4px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.pulse-loader-cancel:hover {
  background: var(--br-gris-tint, #F3F0EE);
  color: var(--text-primary, #1F1A1A);
  border-color: var(--border-strong, #D8D0CD);
}

@media (prefers-reduced-motion: reduce) {
  .pulse-loader-heartbeat, .pulse-page-loader-bar, .pulse-loader-dots span {
    animation: none !important;
  }
}

/* ─── Tempo Badges (Sidebar & Topbar) ─────────────────────── */
.tempo-menu-badges {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tempo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tempo-badge.todo {
  background-color: #2563EB;
  color: #ffffff;
}

.tempo-badge.progress {
  background-color: #D97706;
  color: #ffffff;
}

.tempo-dot-critique {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #DC2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
  display: inline-block;
  animation: tempo-critique-pulse 2s infinite ease-in-out;
}

@keyframes tempo-critique-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* ── Boutons d'action et pastilles uniformisées dans la Topbar (Option 1) ── */
.tb-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar .tb-btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.topbar .tb-btn-icon:hover {
  background: #F4F1EF;
  color: var(--br-lie-de-vin);
}

.topbar .tb-btn-icon:active {
  transform: scale(0.95);
}

.topbar .tb-btn-icon-symbol {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Pastille critique avec pulsation */
.topbar .tb-badge-count.is-critique {
  background: #dc2626;
  box-shadow: 0 0 0 2px var(--bg-card, #ffffff), 0 0 6px rgba(220, 38, 38, 0.5);
  animation: tempo-critique-pulse 2s infinite ease-in-out;
}

/* ── Dropzone & Drag & Drop Pièces Jointes ────────────────── */
.pulse-dropzone {
  border: 2px dashed var(--border-color, #cbd5e1);
  border-radius: 8px;
  padding: 16px 12px;
  background: var(--bg-subtle, #f8fafc);
  text-align: center;
  position: relative;
  transition: all 0.18s ease-in-out;
  cursor: pointer;
  user-select: none;
}
.pulse-dropzone:hover {
  border-color: var(--text-bordeaux, #800020);
  background: #fdf8f8;
}
.pulse-dropzone.is-dragover {
  border-color: var(--text-bordeaux, #800020) !important;
  border-style: solid !important;
  background: #fbf0f2 !important;
  box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.12), 0 4px 12px rgba(128, 0, 32, 0.08);
  transform: scale(1.01);
}
.pulse-dropzone-icon {
  font-size: 26px;
  margin-bottom: 4px;
  transition: transform 0.18s ease;
  display: inline-block;
  line-height: 1;
}
.pulse-dropzone.is-dragover .pulse-dropzone-icon {
  transform: translateY(-3px) scale(1.2);
}
.pulse-pj-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-primary, #1e293b);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  max-width: 100%;
}
.pulse-pj-chip-nom {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.pulse-pj-chip-del {
  border: none;
  background: none;
  color: #dc2626;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.pulse-pj-chip-del:hover {
  background: #fee2e2;
  color: #991b1b;
}

/* ==========================================================================
   Barre de pagination standard (RDV, Dossiers, etc.)
   ========================================================================== */
.pagination-bar, .table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--bg-card, #ffffff);
  border-radius: 0 0 8px 8px;
}
.table-pagination-info {
  font-size: 12.5px;
  color: var(--text-tertiary, #6F6664);
}
.table-pagination-info strong {
  color: var(--text-primary);
  font-weight: 600;
}
.table-pagination-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination-ellipsis {
  padding: 0 4px;
  color: var(--text-tertiary);
  font-size: 12px;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card, #ffffff);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}
.pagination-btn:hover:not(.disabled):not(.active) {
  background: var(--bg-side-hover);
  border-color: var(--br-lie-de-vin);
  text-decoration: none;
}
.pagination-btn.active {
  background: var(--br-lie-de-vin, #973756);
  border-color: var(--br-lie-de-vin, #973756);
  color: #ffffff;
}
.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination-per-page {
  display: inline-flex;
  align-items: center;
}
.pagination-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 30px;
  color: var(--text-primary, #0f172a);
  background-color: var(--bg-card, #ffffff);
  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='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}
.pagination-select:hover {
  border-color: var(--border-hover, #94a3b8);
  background-color: var(--bg-tile-gray, #f8fafc);
}
.pagination-select:focus {
  border-color: var(--br-lie-de-vin, #973756);
  box-shadow: 0 0 0 2px rgba(151, 55, 86, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════
   Fiche Établissement : Rail latéral fixe du Fil d'activité (façon Salesforce)
   Charte Baresto : bordeaux #70150F, rouge #E50040, rose #FBE4E4
   Angles droits sauf pastilles et avatars
   ═══════════════════════════════════════════════════════════════════════ */

.fiche-2col {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  width: 100%;
}

.fiche-main {
  flex: 1 1 0;
  min-width: 0;
}

.fiche-rail {
  flex: 0 0 360px;
  max-width: 380px;
  min-width: 300px;
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  border: 1px solid #FBE4E4;
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(112, 21, 15, 0.05);
  box-sizing: border-box;
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease, max-width 0.2s ease, flex 0.2s ease;
}

/* En-tête du panneau */
.fil-panneau-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #FBE4E4;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.fil-panneau-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fil-panneau-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #70150F;
}

.fil-panneau-badge {
  background: #FBE4E4;
  color: #70150F;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
}

.btn-replier-rail {
  background: transparent;
  border: 1px solid #FBE4E4;
  color: #70150F;
  border-radius: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-replier-rail:hover, .btn-replier-rail:focus {
  background: #FBE4E4;
  color: #70150F;
}

.btn-fermer-drawer {
  display: none;
  background: transparent;
  border: 1px solid #FBE4E4;
  color: #70150F;
  border-radius: 0;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-fermer-drawer:hover, .btn-fermer-drawer:focus {
  background: #FBE4E4;
  color: #70150F;
}

/* Formulaire haut */
.fil-panneau-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  background: #ffffff;
  border-bottom: 1px solid #FBE4E4;
  padding-bottom: 12px;
}

.fil-panneau-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fil-panneau-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #70150F;
  white-space: nowrap;
}

.fil-panneau-select {
  flex: 1;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #FBE4E4;
  border-radius: 0;
  background: #ffffff;
  color: #0f172a;
  outline: none;
}

.fil-panneau-select:focus {
  border-color: #70150F;
}

.fil-panneau-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #FBE4E4;
  border-radius: 0;
  font-family: inherit;
  font-size: 12.5px;
  resize: vertical;
  min-height: 64px;
  outline: none;
}

.fil-panneau-textarea:focus {
  border-color: #70150F;
}

.fil-panneau-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.fil-panneau-actions-left {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-mention {
  background: #ffffff;
  border: 1px solid #FBE4E4;
  color: #70150F;
  border-radius: 0;
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mention:hover, .btn-mention:focus {
  background: #FBE4E4;
  color: #70150F;
}

.btn-publier {
  background: #E50040;
  border: 1px solid #E50040;
  color: #ffffff;
  border-radius: 0;
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-publier:hover, .btn-publier:focus {
  background: #cc0039;
  border-color: #cc0039;
}

.fil-panneau-chatter-link {
  font-size: 11.5px;
  font-weight: 600;
  color: #70150F;
  text-decoration: none;
}

.fil-panneau-chatter-link:hover {
  text-decoration: underline;
}

/* Pastilles de filtres */
.fil-panneau-filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.fil-filter-pill {
  background: #ffffff;
  border: 1px solid #FBE4E4;
  color: #475569;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1.2;
}

.fil-filter-pill:hover {
  background: #FBE4E4;
  color: #70150F;
}

.fil-filter-pill.active {
  background: #70150F;
  border-color: #70150F;
  color: #ffffff;
}

/* Liste des messages */
.fil-panneau-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.fil-panneau-empty-filter,
.fil-panneau-empty-initial {
  font-size: 12px;
  color: #64748b;
  text-align: center;
  padding: 18px 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0;
}

/* Items dans le rail */
.fil-panneau-item {
  width: 100%;
}

/* Événement en ligne compacte grisée */
.fil-panneau-item[data-type="evenement"] .fil-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #cbd5e1;
  border-radius: 0;
  padding: 6px 8px;
  margin: 0;
  gap: 8px;
}

.fil-panneau-item[data-type="evenement"] .fil-avatar {
  width: 22px;
  height: 22px;
  font-size: 9.5px;
}

.fil-panneau-item[data-type="evenement"] .fil-text {
  font-size: 11.5px;
  color: #475569;
  font-style: italic;
  margin-top: 2px;
}

.fil-panneau-item[data-type="evenement"] a.link[onclick*="rep-"] {
  display: none !important;
}

/* Commentaire en bulle avec Répondre */
.fil-panneau-item[data-type="commentaire"] .fil-item {
  background: #ffffff;
  border: 1px solid #FBE4E4;
  box-shadow: 0 1px 3px rgba(112, 21, 15, 0.03);
  border-radius: 0;
  padding: 8px 10px;
  margin: 0;
  gap: 8px;
}

.fil-panneau-item[data-type="commentaire"] .fil-text {
  font-size: 12px;
  color: #0f172a;
  margin-top: 4px;
}

.fil-panneau-item .chip {
  border-radius: 999px;
}

.fil-panneau-item .chip-info {
  background: #FBE4E4;
  color: #70150F;
  border: none;
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
}

.fil-panneau-item .chip-info:hover {
  background: #70150F;
  color: #ffffff;
}

.fil-panneau-footer {
  text-align: center;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid #FBE4E4;
}

.fil-panneau-footer .link {
  font-size: 11.5px;
  font-weight: 600;
  color: #70150F;
  text-decoration: none;
}

.fil-panneau-footer .link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════
   Mode replié (barre verticale de 56 px)
   ═══════════════════════════════════════════════════════════════════════ */
.fil-rail-replie-view {
  display: none;
}

.fiche-rail.replie {
  flex: 0 0 80px !important;
  max-width: 80px !important;
  min-width: 80px !important;
  width: 80px !important;
  padding: 14px 6px !important;
  cursor: pointer;
  align-items: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF5F6 100%) !important;
  border-left: 2px solid #EAD5DC !important;
}

.fiche-rail.replie:hover {
  background: var(--br-lie-de-vin-tint, #F6E9EE) !important;
}

.fiche-rail.replie .fil-panneau-content {
  display: none !important;
}

.fiche-rail.replie .fil-rail-replie-view {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.btn-deplier-rail {
  background: transparent;
  border: 1px solid #FBE4E4;
  color: #70150F;
  border-radius: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.btn-deplier-rail:hover, .btn-deplier-rail:focus {
  background: #FBE4E4;
}

.fil-vertical-icon {
  color: #70150F;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fil-vertical-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  font-weight: 700;
  color: #70150F;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.fil-vertical-count {
  background: #FBE4E4;
  color: #70150F;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Responsive sous 1280 px : Masquer rail, bouton flottant, tiroir latéral
   ═══════════════════════════════════════════════════════════════════════ */
.btn-flottant-activite {
  display: none;
  position: fixed;
  right: 82px;
  bottom: 74px;
  z-index: 45;
  background: #70150F;
  color: #ffffff;
  border: 1px solid #FBE4E4;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(112, 21, 15, 0.3);
  font-family: inherit;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-flottant-activite:hover, .btn-flottant-activite:focus {
  background: #54100b;
  transform: translateY(-1px);
}

.fiche-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1055;
  backdrop-filter: blur(2px);
}

@media (max-width: 900px) {
  .fiche-rail:not(.is-drawer-open) {
    display: none !important;
  }

  .btn-flottant-activite {
    display: flex !important;
  }

  .fiche-rail.is-drawer-open {
    display: flex !important;
    position: fixed !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 420px !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    z-index: 1060 !important;
    background: #ffffff !important;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.22) !important;
    border-left: 1px solid #FBE4E4 !important;
    border-top: none !important;
    border-bottom: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
  }

  .fiche-rail.is-drawer-open .btn-fermer-drawer {
    display: inline-flex !important;
  }

  .fiche-rail.is-drawer-open .btn-replier-rail {
    display: none !important;
  }

  .fiche-rail.is-drawer-open .fil-rail-replie-view {
    display: none !important;
  }

  .fiche-rail.is-drawer-open .fil-panneau-content {
    display: block !important;
  }

  body.fiche-drawer-active {
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .fiche-rail.is-drawer-open {
    width: 100% !important;
    max-width: 100% !important;
  }
  .btn-flottant-activite {
    right: 20px;
    bottom: 74px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Navigation par onglets mobile « hybride + Plus » (Option 3) & Lot 3/4
   - Desktop (> 900 px) : strictement identique à l'existant
   - Mobile (≤ 900 px) : barre 56 px sticky + bottom sheet « Plus » + subtabs pilules
   ═══════════════════════════════════════════════════════════════════════ */
.fiche-tabs-mobile,
.fiche-plus-sheet,
.hero-btn-fil-mobile,
.hero-kpis-toggle {
  display: none;
}

.subtabs .tab .subtab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(151, 55, 86, 0.12);
  color: #973756;
  line-height: 1;
}

/* ── En-tête de fiche établissement iso maquette (avatar haut-gauche, badges espacés, boutons sur 1 ligne) ── */
.hero-id.hero-id--etab {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #E2E2E3;
  background: #FFFFFF;
}

.hero-id--etab .hero-id-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hero-id--etab .avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #70150F;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-id--etab .hero-id-main {
  flex: 1;
  min-width: 0;
}

.hero-id--etab h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #70150F;
  line-height: 1.2;
}

.hero-id--etab .hero-id-sub {
  font-size: 13px;
  color: #67676C;
  margin-top: 2px;
  line-height: 1.35;
}

.hero-id--etab .hero-id-adherent {
  font-size: 12.5px;
  color: #67676C;
  margin-top: 4px;
  line-height: 1.35;
}

.hero-id--etab .hero-id-adherent a {
  color: #973756;
  font-weight: 600;
  text-decoration: none;
}

.hero-id--etab .hero-id-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hero-id--etab .hero-id-badges .chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  margin: 0;
}

.hero-id--etab .hero-id-badges .chip-muted {
  background: #F1F1F2;
  color: #3C3C43;
}

.hero-id--etab .hero-id-badges .chip-success {
  background: #F3F4EC;
  color: #4A4F2E;
}

.hero-id--etab .hero-id-badges [class*="chip-phase-"] {
  background: #F2E6EA;
  color: #973756;
}

.hero-actions-bar.hero-actions-bar--etab {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.hero-actions-bar--etab > .hero-etab-btn,
.hero-actions-bar--etab > form > .hero-etab-btn {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
  text-decoration: none;
}

.hero-actions-bar--etab > form {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}

.hero-actions-bar--etab > .hero-etab-btn--primary {
  background: #973756;
  color: #FFFFFF;
  border: 1px solid #973756;
}

.hero-actions-bar--etab > .hero-etab-btn--secondary,
.hero-actions-bar--etab > form > .hero-etab-btn--secondary {
  background: #FFFFFF;
  color: var(--text-primary, #1F1A1A);
  border: 1px solid var(--border-strong, #D5CECC);
}

.hero-actions-bar--etab > .hero-etab-btn--icon-only {
  width: 36px;
  padding: 0;
}

.hero-actions-bar--etab > .hero-etab-btn--icon.hero-btn-fil-mobile {
  display: none;
}

@media (max-width: 900px) {
  /* ── Masquer la barre d'onglets desktop et le bouton flottant Activité ── */
  .fiche-tabs-desktop {
    display: none !important;
  }

  .btn-flottant-activite {
    display: none !important;
  }

  /* ── Lot 4 : En-tête de fiche compact (boutons sur la même ligne + Fil d'activité intégré) ── */
  .hero-actions-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .hero-actions-bar.hero-actions-bar--etab {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin-top: 10px !important;
  }

  .hero-actions-bar > .btn,
  .hero-actions-bar > form > .btn {
    min-height: 36px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
  }

  .hero-actions-bar--etab > .hero-etab-btn,
  .hero-actions-bar--etab > form > .hero-etab-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 11px !important;
    font-size: 12.5px !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
  }

  .hero-actions-bar--etab > .hero-etab-btn--icon-only {
    width: 36px !important;
    padding: 0 !important;
  }

  .hero-btn-fil-mobile {
    display: inline-flex !important;
    background: #FFFFFF !important;
    color: #973756 !important;
    border: 1px solid #E2E2E3 !important;
  }

  .hero-actions-bar--etab > .hero-etab-btn--icon.hero-btn-fil-mobile {
    display: inline-flex !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border: 1px solid var(--border-strong, #D5CECC) !important;
  }

  /* ── Lot 4 : Synthèse des chiffres repliée à 4 indicateurs par défaut ── */
  .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hero-kpis .k {
    min-width: 0;
  }

  .hero-kpis:not(.is-expanded) .k-mobile-extra {
    display: none !important;
  }

  .hero-kpis-toggle {
    grid-column: 1 / -1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 40px;
    margin-top: 2px;
    padding: 8px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E2E3;
    border-radius: 6px;
    color: #973756;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }

  .hero-kpis-toggle__chevron {
    font-size: 11px;
    transition: transform 0.2s ease;
  }

  .hero-kpis.is-expanded .hero-kpis-toggle__chevron {
    transform: rotate(180deg);
  }

  /* ── Lot 1 & 2 : Barre d'onglets mobile « hybride + Plus » (56 px, sticky) ── */
  .fiche-tabs-mobile {
    display: flex !important;
    align-items: stretch;
    width: 100%;
    height: 56px;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E2E3;
    position: sticky;
    top: 52px;
    z-index: 25;
    margin-bottom: 12px;
  }

  body.pulse-embed .fiche-tabs-mobile {
    top: 0;
  }

  .fiche-mob-tab {
    flex: 1 1 0;
    min-width: 0;
    height: 56px;
    padding: 6px 4px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none !important;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #67676C;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  }

  .fiche-mob-tab:hover,
  .fiche-mob-tab:focus-visible {
    color: #973756;
    background: #FAF7F8;
    outline: none;
  }

  .fiche-mob-tab.active {
    color: #973756;
    font-weight: 700;
    border-bottom-color: #973756;
  }

  .fiche-mob-tab__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
  }

  .fiche-mob-tab__icon {
    font-size: 16px;
    line-height: 1;
  }

  .fiche-mob-tab__label {
    display: block;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .fiche-mob-tab__badge {
    position: absolute;
    top: -5px;
    right: -14px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #F2E6EA;
    color: #973756;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid #FFFFFF;
  }

  .fiche-mob-tab__badge.is-alert {
    background: #E50040;
    color: #FFFFFF;
  }

  /* ── Volet « Plus » (Bottom sheet Bootstrap 5.3 Offcanvas) ── */
  .fiche-plus-sheet.offcanvas-bottom {
    display: flex !important;
    height: auto !important;
    max-height: 82vh !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-top: 1px solid #E2E2E3 !important;
    background: #FFFFFF !important;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18) !important;
  }

  .fiche-plus-sheet__handle {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: #CBD5E1;
    margin: 8px auto 2px;
    flex-shrink: 0;
  }

  .fiche-plus-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px 8px 16px;
    border-bottom: 1px solid #E2E2E3;
    flex-shrink: 0;
  }

  .fiche-plus-sheet__title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1F1A1A;
  }

  .fiche-plus-sheet__close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #67676C;
    font-size: 18px;
    cursor: pointer;
  }

  .fiche-plus-sheet__close:hover,
  .fiche-plus-sheet__close:focus-visible {
    background: #F3F0EE;
    color: #1F1A1A;
  }

  .fiche-plus-sheet__body {
    padding: 14px 16px 22px !important;
    overflow-y: auto;
  }

  .fiche-plus-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .fiche-plus-tile {
    position: relative;
    min-height: 72px;
    padding: 10px 6px;
    border: 1px solid #E2E2E3;
    border-radius: 8px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    text-decoration: none !important;
    color: #1F1A1A;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }

  .fiche-plus-tile:hover,
  .fiche-plus-tile:focus-visible {
    border-color: #973756;
    background: #FAF7F8;
  }

  .fiche-plus-tile.active {
    border: 2px solid #973756;
    background: #F2E6EA;
    font-weight: 700;
  }

  .fiche-plus-tile__icon {
    font-size: 18px;
    color: #973756;
    line-height: 1;
  }

  .fiche-plus-tile__label {
    font-size: 12px;
    line-height: 1.2;
    color: #1F1A1A;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fiche-plus-tile__badge {
    position: absolute;
    top: 5px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #F2E6EA;
    color: #973756;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .fiche-plus-tile__badge.is-alert {
    background: #E50040;
    color: #FFFFFF;
  }

  .fiche-plus-tile--back {
    border-style: dashed;
    border-color: #973756;
    background: #FAF7F8;
    color: #973756;
  }

  .fiche-plus-tile--back .fiche-plus-tile__label {
    color: #973756;
    font-weight: 600;
  }

  /* ── Lot 3 : Sous-onglets .subtabs en pastilles défilantes horizontalement ── */
  .subtabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    padding: 4px 2px 8px !important;
    background: transparent !important;
    border: 0 !important;
  }

  .subtabs::-webkit-scrollbar {
    display: none;
  }

  .subtabs .tab {
    flex-shrink: 0 !important;
    height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    border: 1px solid #E2E2E3 !important;
    background: #FFFFFF !important;
    color: #67676C !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-shadow: none !important;
  }

  .subtabs .tab.active {
    border: 2px solid #973756 !important;
    background: #F2E6EA !important;
    color: #973756 !important;
    font-weight: 700 !important;
  }

  .subtabs .tab.active .subtab-count {
    background: #973756;
    color: #FFFFFF;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   Tableau « Par établissement » (CA & Volumes · Fiche Partenaire) :
   - 15 premiers par défaut + bouton « Voir tout »
   - En-têtes de colonnes fixes (sticky) au défilement vertical
   - Recherche avec auto-complétion des établissements présents
   ═══════════════════════════════════════════════════════════════════════ */
#panel-ca-etablissements,
#partenaires,
#panel-dwh-fournisseurs,
#panel-partenaire-contacts,
#panel-partenaire-contacts-globaux,
#relations,
#panel-partenaire-catalogue {
  overflow: visible;
}

.ca-etabs-table-wrap {
  max-height: 56vh;
  overflow-y: auto;
  overflow-x: auto;
  position: relative;
}

.ca-etabs-table-wrap:not(.is-expanded):not(.is-filtering) .ca-etab-row--extra {
  display: none;
}

.ca-etabs-table-wrap.is-expanded,
.ca-etabs-table-wrap.is-filtering {
  max-height: 68vh;
}

table.data.ca-etabs-table {
  border-collapse: separate;
  border-spacing: 0;
}

.ca-etabs-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-table-head, #F6F2F0);
  box-shadow: inset 0 -1px 0 var(--border, #E2E2E3);
}

.ca-etabs-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: var(--bg-card, #FFFFFF);
  box-shadow: inset 0 1px 0 var(--border, #E2E2E3);
}

.ca-etabs-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border, #E2E2E3);
  background: #FAF8F7;
  display: flex;
  justify-content: center;
}

.ca-etabs-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--br-lie-de-vin, #973756);
  border-color: var(--border-strong, #D8D0CD);
  background: #FFFFFF;
  font-weight: 600;
}

.ca-etabs-toggle-btn .js-ca-etabs-toggle-icon {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.ca-etabs-toggle-btn[aria-expanded="true"] .js-ca-etabs-toggle-icon {
  transform: rotate(180deg);
}

.ca-etab-search-wrap {
  position: relative;
  min-width: 240px;
  flex: 1 1 220px;
  max-width: 320px;
}

.ca-etab-search-input {
  width: 100%;
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--border-strong, #CBD5E1);
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--text-primary, #1F1A1A);
}

.ca-etab-search-input:focus {
  outline: none;
  border-color: var(--br-lie-de-vin, #973756);
  box-shadow: 0 0 0 2px rgba(151, 55, 86, 0.14);
}

.ca-etab-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #FFFFFF;
  border: 1px solid var(--border-strong, #CBD5E1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.ca-etab-autocomplete__item {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-primary, #1F1A1A);
  cursor: pointer;
}

.ca-etab-autocomplete__item:hover,
.ca-etab-autocomplete__item.is-active {
  background: var(--br-lie-de-vin-tint, #F6E9EE);
  color: var(--br-lie-de-vin, #973756);
}

.ca-etab-autocomplete__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-etab-autocomplete__vol {
  font-size: 11px;
  color: var(--text-tertiary, #6F6664);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .ca-etab-search-wrap {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .ca-etab-search-input {
    font-size: 14px;
    min-height: 40px;
  }
}

/* ── Colonne & champ « Commentaire transverse » (Établissement ↔ Partenaire) ── */
th.transverse-comment-col,
td.transverse-comment-cell {
  min-width: 260px;
  max-width: 340px;
  width: 300px;
}

td.transverse-comment-cell {
  vertical-align: middle;
}

.transverse-comment-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.transverse-comment-field {
  width: 100%;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.35;
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background-color: var(--bg-soft);
  color: var(--text-primary);
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 26px;
  max-height: calc(2 * 1.35em + 10px);
}

.transverse-comment-field::placeholder {
  color: var(--text-muted);
}

.transverse-comment-field:focus {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  border-color: var(--br-lie-de-vin);
  background-color: var(--bg-card);
  box-shadow: 0 0 0 2px rgba(var(--br-lie-de-vin-rgb), 0.14);
  outline: none;
  max-height: calc(6 * 1.35em + 10px);
}

.transverse-comment-field.is-saved {
  border-color: var(--br-sauge);
}




