/* =====================================================================
   Velora — refonte UX 07/11/2026 (chargé en dernier)
   Navigation à un seul niveau visible à la fois, composants de page communs (en-tête, tableaux, panneau latéral,
   listes de problèmes), Chatter IA, Assistant, Coach, Bibliothèque, Activité.
   Règles : 13–14 px, rayons 8/10/12, une seule bordure (--line), couleur d'accent réservée à l'action et à l'état actif.
   ===================================================================== */

/* ---------- menu : la section ouverte déroule ses pages sous elle ----------
   (07/11/2026, retour du dirigeant : « discret mais visible ») pas d'aplat violet. La section ouverte en texte fort ; ses
   pages en retrait le long d'un filet gris, avec leur icône ; la page ouverte sur un fond gris doux, le filet devient une
   courte barre de couleur à sa hauteur. La couleur ne marque que l'endroit où l'on est. */
html body .app .nav .nav-sub.sec-open:not([hidden]) { display: flex !important; }
html body .app .nav .nav-sec.sec-active { color: var(--fg) !important; font-weight: 650 !important; background: transparent !important; }
html body .app .nav .nav-sec.sec-active:hover { background: var(--surface-2) !important; }
html body .app .nav .nav-sec.sec-active svg { stroke: var(--fg) !important; }
html body .app .nav .nav-sec.sec-active .nav-dot { display: none; }
html body .app .nav .nav-sub.sec-open { width: auto !important; height: 32px !important; min-height: 32px !important; margin: 0 0 0 19px !important; padding: 0 10px 0 14px !important; gap: 9px !important; font-size: 13px !important; font-weight: 500 !important; color: var(--fg-2) !important; height: auto !important; padding-top: 7px !important; padding-bottom: 7px !important; line-height: 1.25 !important; white-space: normal; text-align: left; position: relative; border-radius: 0 8px 8px 0 !important; background: transparent !important; border-left: 1px solid var(--line) !important; animation: navIn .18s var(--ease, ease-out) both; }
html body .app .nav .nav-sub.sec-open svg { display: block; width: 15px !important; height: 15px !important; stroke: var(--muted-2) !important; }
html body .app .nav .nav-sub.sec-open:hover { color: var(--fg) !important; background: var(--surface-2) !important; }
html body .app .nav .nav-sub.sec-open:hover svg { stroke: var(--fg-2) !important; }
html body .app .nav .nav-sub.sec-open[aria-current="page"] { color: var(--fg) !important; font-weight: 600 !important; background: var(--surface-3) !important; }
html body .app .nav .nav-sub.sec-open[aria-current="page"] svg { stroke: var(--accent) !important; }
html body .app .side .nav .nav-sub.sec-open[aria-current="page"]::before { display: block !important; content: ""; position: absolute; left: -1.5px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--accent); }
html body .app .nav .nav-sub.sec-open:has(+ :not(.nav-sub.sec-open)), html body .app .nav .nav-sub.sec-open:last-child { margin-bottom: 6px !important; }
@keyframes navIn { from { opacity: 0; transform: translateY(-3px); } }
/* menu réduit (icônes) : pas de rubriques dépliées */
html body.side-mini .app .nav .nav-sub.sec-open { display: none !important; }
/* plus de barre d'onglets en haut des pages */
html body .app .secbar { display: none !important; }
@media (prefers-reduced-motion: reduce) { html body .app .nav .nav-sub.sec-open { animation: none; } }

/* ---------- badges : « bad » = danger ; « info » discret ---------- */
html body .app .ui-badge.bad, html body .ui-badge.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
html body .app .ui-badge.info, html body .ui-badge.info { background: var(--info-soft, var(--surface-2)); color: var(--info, var(--fg-2)); border-color: transparent; }
html body .ui-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg-2); white-space: nowrap; }

/* =====================================================================
   Chatter IA
   ===================================================================== */
html body .app .aic-page { gap: 14px !important; }
.aic-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.aic-bar .grow { flex: 1; }
.aic-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.aic-mchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg-2); font-size: 12.5px; font-weight: 500; }
.aic-mchip b { color: var(--fg); font-weight: 650; font-variant-numeric: tabular-nums; }
.aic-mchip i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.aic-mchip.m-auto i { background: var(--accent); } .aic-mchip.m-review i { background: var(--info, #3b82f6); } .aic-mchip.m-suggest i { background: var(--ok); }
.aic-mchip.zero { opacity: .55; }
.aic-ibtn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.aic-ibtn .i { width: 14px; height: 14px; }
.aic-ibtn .chev { transform: rotate(90deg); transition: transform .18s; opacity: .7; }
.aic-ibtn[aria-expanded="true"] .chev { transform: rotate(-90deg); }
.aic-ibtn.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: var(--danger-soft); }
.aic-ibtn.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }
.aic-ibtn.ok { color: var(--ok); }
.aic-ibtn.idle { cursor: default; color: var(--muted); }
.aic-ctx { margin: 0; font-size: 12.5px; color: var(--muted); }

/* tableaux de pilotage (Chatter IA, Activité, Scripts IA) */
.aic-tw { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow-x: auto; }
.aic-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aic-table th { height: 38px; padding: 0 14px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-2); }
.aic-table td { height: 54px; padding: 8px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--fg-2); }
.aic-table tbody tr:last-child td { border-bottom: 0; }
.aic-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aic-table td.num { color: var(--fg); font-weight: 600; }
.aic-table td small { display: block; font-size: 11.5px; font-weight: 500; }
.aic-table td.num small { display: inline; }
.aic-table tbody tr[data-aic-row] { cursor: pointer; transition: background .12s; }
.aic-table tbody tr[data-aic-row]:hover { background: var(--surface-2); }
.aic-table tbody tr.on { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.aic-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.aic-table tbody tr.off td { opacity: .6; }
.aic-go { width: 28px; color: var(--muted-2); } .aic-go .i { width: 16px; height: 16px; }
.aic-who { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.aic-who b { display: block; color: var(--fg); font-weight: 600; }
.aic-who small { color: var(--muted); }
.aic-av { width: 30px !important; height: 30px !important; font-size: 12px !important; background: hsl(var(--h) 45% 32%) !important; color: hsl(var(--h) 80% 92%) !important; }
:root[data-theme="light"] .aic-av { background: hsl(var(--h) 60% 88%) !important; color: hsl(var(--h) 55% 28%) !important; }
.aic-st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 550; color: var(--fg-2); white-space: nowrap; }
.aic-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; }
.aic-st.ok i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); animation: aicPulse 2.4s ease-in-out infinite; }
.aic-st.warn { color: var(--warn); } .aic-st.warn i { background: var(--warn); }
.aic-st.bad { color: var(--danger); } .aic-st.bad i { background: var(--danger); }
.aic-st.idle i { background: var(--info, #3b82f6); }
.aic-st.off { color: var(--muted); }
@keyframes aicPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 8%, transparent); } }
html body .app select.aic-msel { height: 30px !important; min-height: 30px !important; padding: 0 28px 0 10px !important; font-size: 12.5px !important; font-weight: 600 !important; border-radius: 8px !important; width: auto; min-width: 118px; }
html body .app select.aic-msel.m-auto { color: var(--accent) !important; }

/* problèmes : un tableau compact */
.aic-issues { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; animation: uiPanelIn .18s var(--ease, ease-out) both; }
.aic-itable { width: 100%; border-collapse: collapse; font-size: 13px; }
.aic-itable th { height: 34px; padding: 0 14px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.aic-itable td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
.aic-itable td:first-child { width: 1%; white-space: nowrap; }
.aic-itable td:last-child { width: 1%; text-align: right; }
.aic-itable td small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.aic-iw { color: var(--fg) !important; font-weight: 600; width: 30%; }
.aic-ishort { display: block; color: var(--fg); font-weight: 600; }
.aic-ilinks { display: flex; flex-wrap: wrap; gap: 4px; }
.aic-ilink { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--fg-2); font: inherit; font-size: 12px; font-weight: 550; cursor: pointer; white-space: nowrap; }
button.aic-ilink:hover { border-color: var(--accent); color: var(--fg); }
.aic-inote { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; font-size: 12px; color: var(--muted); }
.aic-inote .i { width: 14px; height: 14px; color: var(--ok); }
@keyframes uiPanelIn { from { opacity: 0; transform: translateY(-4px); } }

/* limites de l'agence */
.aic-limits { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px; animation: uiPanelIn .18s var(--ease, ease-out) both; }
.aic-lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.aic-lgrid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 550; color: var(--fg-2); }
.aic-lgrid label small { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: -4px; }
.aic-lgrid .check { flex-direction: row; align-items: center; font-weight: 500; }
.aic-lwide { grid-column: 1 / -1; }
.aic-lfoot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.aic-lfoot small { flex: 1; }

/* panneau latéral de réglages */
.aic-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(520px, 100vw); display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -18px 0 48px rgba(0, 0, 0, .35); transform: translateX(16px); opacity: 0; transition: transform .2s var(--ease, ease-out), opacity .2s; }
.aic-drawer.in { transform: none; opacity: 1; }
:root[data-theme="light"] .aic-drawer { box-shadow: -18px 0 48px rgba(0, 0, 0, .1); }
.aic-dh { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.aic-dh h2 { margin: 0; font-size: 15px; font-weight: 650; }
.aic-dh small { color: var(--muted); font-size: 12px; }
.aic-dh .grow { flex: 1; }
.aic-dh .aic-av { width: 36px !important; height: 36px !important; font-size: 14px !important; }
.aic-dsw button { height: 28px !important; }
.aic-dmode { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.aic-mseg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.aic-mseg button { height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.aic-mseg button:hover:not(:disabled) { color: var(--fg); }
.aic-mseg button[aria-checked="true"] { background: var(--surface-3); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.aic-mseg button.m-auto[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.aic-mseg button:disabled { opacity: .45; cursor: not-allowed; }
.aic-mhint { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.aic-mhint b { color: var(--fg-2); font-weight: 600; }
.aic-alert { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 12.5px; }
.aic-alert span { flex: 1; } .aic-alert .i { width: 15px; height: 15px; }
.aic-dbody { flex: 1; overflow-y: auto; padding: 4px 0 16px; overscroll-behavior: contain; }
.aic-sec { border-bottom: 1px solid var(--line); }
.aic-sec > summary { display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; list-style: none; user-select: none; }
.aic-sec > summary::-webkit-details-marker { display: none; }
.aic-sec > summary b { font-size: 13.5px; font-weight: 600; color: var(--fg); }
.aic-sec > summary span { flex: 1; text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.aic-sec > summary .i { width: 15px; height: 15px; color: var(--muted-2); transition: transform .18s; flex: none; }
.aic-sec[open] > summary .i { transform: rotate(90deg); }
.aic-sec > summary:hover { background: var(--surface); }
.aic-secb { padding: 2px 16px 16px; display: flex; flex-direction: column; gap: 12px; animation: uiPanelIn .16s var(--ease, ease-out) both; }
.aic-secb .ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.aic-secb .ai-grid > label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--fg-2); min-width: 0; }
.aic-secb .ai-grid > label small { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: -3px; }
.aic-secb .ai-grid > .wide, .aic-secb .ai-grid > p.wide, .aic-secb .ai-days { grid-column: 1 / -1; }
.aic-secb .ai-grid > label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; }
.aic-secb p.muted.small { margin: 0; font-size: 12px; line-height: 1.45; }
.aic-secb .ai-days { display: grid; gap: 6px; }
.aic-secb .ai-day { display: grid; grid-template-columns: 76px 1fr auto 1fr; align-items: center; gap: 8px; }
.aic-secb .ai-day span { color: var(--muted); }
.aic-prow { display: flex; align-items: center; gap: 12px; }
.aic-prow p { margin: 0; font-size: 12.5px; color: var(--fg-2); line-height: 1.45; }
.aic-score { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--surface-3) 0); position: relative; }
.aic-score::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg); }
.aic-score b { position: relative; font-size: 12px; font-weight: 700; }
.aic-slist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; }
.aic-slist li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.aic-slist li:last-child { border-bottom: 0; }
.aic-slist li > span { flex: 1; min-width: 0; } .aic-slist b { display: block; font-size: 13px; } .aic-slist small { color: var(--muted); font-size: 11.5px; }
.aic-slist .au-sw { margin: 0; flex: none; }
.aic-row { display: flex; align-items: center; gap: 12px; }
.aic-dfoot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg); }
.aic-dfoot .grow { flex: 1; }
.linkish.danger { color: var(--danger) !important; }
.aic-back { display: inline-block; margin: 12px 16px 0; font-size: 12.5px; }
.aic-iac { padding: 0 16px 16px; }
.aic-test { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.aic-test .ai-simchat { flex: 1; min-height: 280px; max-height: none; }
.aic-test p.muted.small { margin: 0; font-size: 12px; }
.aic-simbar { display: flex; align-items: flex-end; gap: 10px; }
.aic-simbar label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--fg-2); }
.aic-simbar .grow { flex: 1; }
@media (min-width: 1680px) { body.aic-open #view-aichat .aic-page { padding-right: 536px; transition: padding .2s; } }
@media (max-width: 760px) {
  .aic-drawer { width: 100vw; }
  .aic-mseg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aic-secb .ai-grid { grid-template-columns: 1fr; }
  .aic-lgrid { grid-template-columns: 1fr; }
  .aic-table th:nth-child(4), .aic-table td:nth-child(4), .aic-table th:nth-child(6), .aic-table td:nth-child(6) { display: none; }
  .aic-bar .aic-modes { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .aic-drawer, .aic-secb, .aic-issues, .aic-limits { transition: none; animation: none; } .aic-st.ok i { animation: none; } }

/* bandes de chiffres (Activité) */
.v-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.v-kpi { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-right: 1px solid var(--line); min-width: 0; }
.v-kpi:last-child { border-right: 0; }
.v-kpi small { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.v-kpi b { font-size: 20px; font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
.v-kpi b small { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; }

/* Activité (Velora IA) : résultats puis journal, sur une seule page */
.aia-sec { display: flex; flex-direction: column; gap: 10px; }
.aia-sec + .aia-sec { margin-top: 18px; }
.aia-h { display: flex; align-items: center; gap: 10px; }
.aia-h h2 { margin: 0; font-size: 14px; font-weight: 650; }
.aia-h .grow { flex: 1; }
html body .app .aia-h select { width: auto; min-width: 170px; height: 32px !important; min-height: 32px !important; font-size: 13px !important; }
.aia-res { display: flex; flex-direction: column; gap: 10px; }

/* =====================================================================
   Avatar Velora IA « Floraison » (public/vavatar.js) — refait le 07/11/2026
   Pétales en courbes qui changent de forme (propriété « d »), lumière qui glisse, halo qui respire, ondes du noyau.
   ===================================================================== */
:root, [data-theme="dark"] {
  --vav-a1: #494948; --vav-a2: #7b7b7a; --vav-a3: #d3d3d2;
  --vav-b1: #585857; --vav-b2: #9d9d9c; --vav-b3: #ebebea;
  --vav-l1: #b1b1b0; --vav-l2: #676766; --vav-l3: #3c3c3b;
  --vav-c1: #ffffff; --vav-c2: #f5f3ff; --vav-c3: #bfbfbe;
  --vav-h1: rgba(123, 123, 122, .55); --vav-h2: rgba(103, 103, 102, .16); --vav-h3: rgba(103, 103, 102, 0);
  --vav-ring: #bfbfbe; --vav-op: .9;
}
[data-theme="light"] {
  --vav-a1: #3c3c3b; --vav-a2: #676766; --vav-a3: #bfbfbe;
  --vav-b1: #494948; --vav-b2: #7b7b7a; --vav-b3: #dbdbda;
  --vav-l1: #9d9d9c; --vav-l2: #585857; --vav-l3: #272726;
  --vav-c1: #ffffff; --vav-c2: #faf7ff; --vav-c3: #dbdbda;
  --vav-h1: rgba(103, 103, 102, .28); --vav-h2: rgba(103, 103, 102, .08); --vav-h3: rgba(103, 103, 102, 0);
  --vav-ring: #676766; --vav-op: .94;
}
.vav { --vs: 32px; position: relative; display: inline-block; flex: none; width: var(--vs); height: var(--vs); line-height: 0; vertical-align: middle; }
.vav svg { width: 100%; height: 100%; overflow: visible; }
.vav-a1 { stop-color: var(--vav-a1); } .vav-a2 { stop-color: var(--vav-a2); } .vav-a3 { stop-color: var(--vav-a3); }
.vav-b1 { stop-color: var(--vav-b1); } .vav-b2 { stop-color: var(--vav-b2); } .vav-b3 { stop-color: var(--vav-b3); }
.vav-l1 { stop-color: var(--vav-l1); } .vav-l2 { stop-color: var(--vav-l2); } .vav-l3 { stop-color: var(--vav-l3); }
.vav-c1 { stop-color: var(--vav-c1); } .vav-c2 { stop-color: var(--vav-c2); } .vav-c3 { stop-color: var(--vav-c3); }
.vav-h1 { stop-color: var(--vav-h1); } .vav-h2 { stop-color: var(--vav-h2); } .vav-h3 { stop-color: var(--vav-h3); }
.vav-g, .vav-ps, .vav-p, .vav-core, .vav-ring, .vav-halo, .vav-spark { transform-box: view-box; transform-origin: 32px 35px; }
.vav-pp { opacity: var(--vav-op); transition: opacity .5s ease; }
:root:not([data-theme="light"]) .vav:not(.mono) .vav-ps { mix-blend-mode: screen; }
.vav-halo { opacity: .45; transition: opacity .6s ease; }
.vav-core { transition: transform .5s cubic-bezier(.3, .7, .3, 1), opacity .5s ease; }
.vav-spark { fill: #fff; opacity: .85; }
.vav-ring { stroke: var(--vav-ring); stroke-width: 1.3; opacity: 0; }
.vav-shine { opacity: 0; }
.vav.mono { color: currentColor; } .vav.mono .vav-pp { opacity: .5; } .vav.mono .vav-lo { opacity: .42; }
.vav { transition: filter .6s ease; }

/* idle : chaque pétale respire à son rythme, la lumière passe de temps en temps */
.vav[data-state="idle"] .vav-up { animation: vavMorphUp 7.5s ease-in-out infinite; }
.vav[data-state="idle"] .vav-p2 .vav-up { animation-delay: -2.6s; }
.vav[data-state="idle"] .vav-lo { animation: vavMorphLo 7.5s ease-in-out -4.8s infinite; }
.vav[data-state="idle"] .vav-p1 { animation: vavSway1 9s ease-in-out infinite; }
.vav[data-state="idle"] .vav-p2 { animation: vavSway2 10s ease-in-out infinite; }
.vav[data-state="idle"] .vav-halo { animation: vavHalo 6s ease-in-out infinite; }
.vav[data-state="idle"] .vav-core { animation: vavCoreSoft 5s ease-in-out infinite; }
.vav[data-state="idle"] .vav-shine { animation: vavShine 9s ease-in-out 1.5s infinite; }
@keyframes vavMorphUp { 0%, 100% { d: path("M32 39C22.5 34 22.5 17 32 9C41.5 17 41.5 34 32 39Z"); } 33% { d: path("M32 39C21 33.5 21.5 15.5 32 8C42.5 15.5 43 33.5 32 39Z"); } 66% { d: path("M32 39C21.5 35 23.5 16 31 8.5C41 17.5 41 33 32 39Z"); } }
@keyframes vavMorphLo { 0%, 100% { d: path("M32 27C23.5 32 23.5 48 32 56C40.5 48 40.5 32 32 27Z"); } 33% { d: path("M32 27C22.5 32 22.5 49 32 57.5C41.5 49 41.5 32 32 27Z"); } 66% { d: path("M32 27C24.5 33 22.5 47 31 56C40 49 40.5 32 32 27Z"); } }
@keyframes vavSway1 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2.2deg); } }
@keyframes vavSway2 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2deg); } }
@keyframes vavHalo { 0%, 100% { opacity: .35; transform: scale(.94); } 50% { opacity: .6; transform: scale(1.04); } }
@keyframes vavCoreSoft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes vavShine { 0%, 62% { opacity: 0; transform: translateX(0) rotate(24deg); } 66% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; transform: translateX(120px) rotate(24deg); } }

/* listening : les pétales s'ouvrent, le halo s'éclaire, une onde à l'arrivée du message */
.vav[data-state="listening"] .vav-up { d: path("M32 39C22 33 22 14 32 6C42 14 42 33 32 39Z"); transition: d .45s ease; }
.vav[data-state="listening"] .vav-p1 { transform: translate(-1.6px, -1.3px); transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
.vav[data-state="listening"] .vav-p2 { transform: translate(1.6px, -1.3px); transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
.vav[data-state="listening"] .vav-p3 { transform: translateY(1.6px); transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
.vav[data-state="listening"] .vav-halo { opacity: .8; animation: vavHalo 2.4s ease-in-out infinite; }
.vav[data-state="listening"] .vav-core { transform: scale(1.1); }
.vav[data-state="listening"].vav-once .vav-ring { animation: vavRing 1s ease-out; }

/* thinking : les pétales s'affinent l'un après l'autre et tournent en spirale lente, la lumière balaie */
.vav[data-state="thinking"] .vav-ps { animation: vavSpin 9s cubic-bezier(.45, .05, .55, .95) infinite; }
.vav[data-state="thinking"] .vav-up { animation: vavSlimUp 1.8s ease-in-out infinite; }
.vav[data-state="thinking"] .vav-p2 .vav-up { animation-delay: -.6s; }
.vav[data-state="thinking"] .vav-lo { animation: vavSlimLo 1.8s ease-in-out -1.2s infinite; }
.vav[data-state="thinking"] .vav-core { animation: vavCoreThink 1.5s ease-in-out infinite; }
.vav[data-state="thinking"] .vav-halo { opacity: .65; animation: vavHalo 3s ease-in-out infinite; }
.vav[data-state="thinking"] .vav-shine { animation: vavShine 2.6s ease-in-out infinite; }
@keyframes vavSpin { 0% { transform: rotate(0); } 50% { transform: rotate(200deg); } 100% { transform: rotate(360deg); } }
@keyframes vavSlimUp { 0%, 100% { d: path("M32 39C22.5 34 22.5 17 32 9C41.5 17 41.5 34 32 39Z"); } 50% { d: path("M32 39C25.5 33 25 15 32 7C39 15 38.5 33 32 39Z"); } }
@keyframes vavSlimLo { 0%, 100% { d: path("M32 27C23.5 32 23.5 48 32 56C40.5 48 40.5 32 32 27Z"); } 50% { d: path("M32 27C26 32 26 49 32 58C38 49 38 32 32 27Z"); } }
@keyframes vavCoreThink { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.06); } }

/* generating : une vague de pulsations d'un pétale à l'autre, des ondes partent du noyau */
.vav[data-state="generating"] .vav-p { animation: vavWave 1.2s ease-in-out infinite; }
.vav[data-state="generating"] .vav-p2 { animation-delay: .2s; } .vav[data-state="generating"] .vav-p3 { animation-delay: .4s; }
.vav[data-state="generating"] .vav-up { animation: vavMorphUp 2.4s ease-in-out infinite; }
.vav[data-state="generating"] .vav-lo { animation: vavMorphLo 2.4s ease-in-out -1.2s infinite; }
.vav[data-state="generating"] .vav-core { transform: scale(1.08); }
.vav[data-state="generating"] .vav-halo { opacity: .75; animation: vavHalo 1.6s ease-in-out infinite; }
.vav[data-state="generating"] .vav-ring { animation: vavRing 1.6s ease-out infinite; }
.vav[data-state="generating"] .vav-ring2 { animation-delay: .8s; }
@keyframes vavWave { 0%, 100% { transform: scale(.95); } 40% { transform: scale(1.07); } }
@keyframes vavRing { 0% { opacity: .8; transform: scale(.75); } 100% { opacity: 0; transform: scale(1.9); } }

/* ready : net et stable */
.vav[data-state="ready"] .vav-core { transform: scale(1.1); }
.vav[data-state="ready"] .vav-halo { opacity: .55; }

/* success : les pétales se referment puis s'épanouissent, un anneau s'ouvre */
.vav[data-state="success"].vav-once .vav-ps { animation: vavBloom .8s cubic-bezier(.3, .7, .2, 1.25); }
.vav[data-state="success"].vav-once .vav-ring { animation: vavRing .9s ease-out; }
.vav[data-state="success"].vav-once .vav-halo { animation: vavFlash .9s ease-out; }
@keyframes vavBloom { 0% { transform: scale(1); } 30% { transform: scale(.84) rotate(-6deg); } 70% { transform: scale(1.09) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes vavFlash { 0% { opacity: .45; } 35% { opacity: .95; } 100% { opacity: .45; } }

/* error : couleurs pâles, les pétales retombent un instant, un léger flottement */
.vav[data-state="error"] { filter: saturate(.3) brightness(.92); }
.vav[data-state="error"] .vav-p1 { transform: rotate(-7deg) translateY(.8px); transition: transform .5s ease; }
.vav[data-state="error"] .vav-p2 { transform: rotate(7deg) translateY(.8px); transition: transform .5s ease; }
.vav[data-state="error"] .vav-core { transform: scale(.84); opacity: .75; }
.vav[data-state="error"] .vav-halo { opacity: .15; }
.vav[data-state="error"].vav-once .vav-g { animation: vavWobble .7s ease-in-out; }
@keyframes vavWobble { 25% { transform: rotate(-5deg); } 60% { transform: rotate(4deg); } 100% { transform: rotate(0); } }

/* petites tailles : pas de lumière ni d'ondes (illisibles), halo discret */
.vav.vav-xs .vav-shine-w, .vav.vav-xs .vav-ring, .vav.vav-xs .vav-spark { display: none; }
.vav.vav-xs .vav-halo { opacity: .25 !important; }
.vav.vav-lg .vav-ring { stroke-width: .9; }
@media (prefers-reduced-motion: reduce) { .vav, .vav * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Assistant : espace de travail (historique à gauche, conversation au centre)
   ===================================================================== */
#view-chat .as-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.as-rail { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; }
.as-new { width: 100%; justify-content: center; gap: 7px; display: inline-flex; align-items: center; }
.as-new .i { width: 15px; height: 15px; }
.as-rsec { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.as-rsec > small { padding: 0 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.as-convs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.as-convs li { position: relative; display: flex; }
.as-convs li.as-cg { padding: 10px 8px 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.as-convs li.as-cg:first-child { padding-top: 0; }
.as-cempty { padding: 4px 8px; font-size: 12.5px; color: var(--muted); }
.as-conv { flex: 1; min-width: 0; height: 32px; padding: 0 28px 0 9px; border: 0; border-radius: 7px; background: none; color: var(--fg-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.as-conv span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-conv:hover { background: var(--surface-2); color: var(--fg); }
.as-conv.on { background: var(--surface-3); color: var(--fg); font-weight: 600; }
.as-cdel { position: absolute; right: 4px; top: 6px; width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; opacity: 0; }
.as-cdel .i { width: 12px; height: 12px; }
.as-convs li:hover .as-cdel, .as-cdel:focus-visible { opacity: 1; }
.as-cdel:hover { background: var(--surface-3); color: var(--danger); }
.as-tools { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.as-tools button { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 9px; border: 0; border-radius: 7px; background: none; color: var(--fg-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.as-tools button .i { width: 15px; height: 15px; color: var(--muted); }
.as-tools button:hover { background: var(--surface-2); color: var(--fg); }
.as-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
html body .app #view-chat .as-top { padding: 12px 24px !important; min-height: 56px; justify-content: flex-start !important; gap: 10px; border-bottom: 1px solid var(--line); }
html body .app #view-chat .as-top h1 { font-size: 15px !important; font-weight: 650; font-family: inherit; letter-spacing: 0; }
html body .app #view-chat .as-top p:empty { display: none; }
.as-rail-btn { display: none !important; }
/* accueil */
#thread.as-empty { min-height: 100%; justify-content: center; }
.as-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 4vh 0 2vh; animation: asIn .35s var(--ease, ease-out) both; }
.as-welcome.out { animation: asOut .17s ease-in both; }
.as-wav { margin-bottom: 6px; }
.as-welcome h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.01em; color: var(--fg); }
.as-welcome p { margin: 0; max-width: 30rem; font-size: 14px; color: var(--muted); }
.as-sugg { width: 100%; max-width: 34rem; margin-top: 18px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.as-sugg button { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg-2); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; transition: background .12s, color .12s; }
.as-sugg button:last-child { border-bottom: 0; }
.as-sugg button > .i:first-child { width: 16px; height: 16px; color: var(--accent); flex: none; }
.as-sugg button span { flex: 1; }
.as-sugg .as-go { width: 14px; height: 14px; color: var(--muted-2); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.as-sugg button:hover { background: var(--surface-2); color: var(--fg); }
.as-sugg button:hover .as-go { opacity: 1; transform: none; }
@keyframes asIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes asOut { to { opacity: 0; transform: translateY(-6px) scale(.99); } }
/* messages : la réponse comme un document, la question en bulle discrète */
#view-chat #thread .msg { animation: asMsg .22s var(--ease, ease-out) both; }
@keyframes asMsg { from { opacity: 0; transform: translateY(4px); } }
#view-chat #thread .msg.ai > .vav { --vs: 26px; }
html body .app #view-chat .msg.user .bubble { background: var(--surface-3) !important; border: 1px solid var(--line) !important; color: var(--fg) !important; border-radius: 14px 14px 4px 14px !important; padding: 10px 14px !important; font-size: 14px; }
/* barre de saisie */
html body .app #view-chat .composer.cbox { border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); background: var(--surface); }
:root[data-theme="light"] html body .app #view-chat .composer.cbox { box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }
html body .app #view-chat .as-send { height: 34px; min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 9px; }
html body .app #view-chat .as-send .i { width: 15px; height: 15px; }
html body .app #view-chat .as-send.busy { background: var(--surface-3) !important; color: var(--fg) !important; }
html body .app #view-chat .composer-zone .hint { text-align: center; font-size: 11.5px; color: var(--muted-2); }
@media (max-width: 1100px) { #view-chat .as-layout { grid-template-columns: 210px minmax(0, 1fr); } }
@media (max-width: 860px) {
  #view-chat .as-layout { grid-template-columns: minmax(0, 1fr); }
  .as-rail { position: fixed; z-index: 55; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s var(--ease, ease-out); box-shadow: 18px 0 48px rgba(0, 0, 0, .35); }
  .as-rail.open { transform: none; }
  .as-rail-btn { display: inline-grid !important; }
  html body .app #view-chat .as-top { padding: 10px 12px !important; }
  html body .app #view-chat .as-send span { display: none; }
  .as-welcome h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .as-welcome, .as-welcome.out, #view-chat #thread .msg, .as-rail { animation: none; transition: none; } }

/* =====================================================================
   Coach : en-tête personnel, vues en sélecteur compact, la semaine en deux colonnes
   ===================================================================== */
html body .app #view-coach .co-head { justify-content: flex-start !important; gap: 12px; padding: 14px 28px !important; }
html body .app #view-coach .co-head > div:not(.viewbar-tools) { flex: 1; min-width: 0; }
html body .app #view-coach .co-head h1 { font-size: 17px !important; font-weight: 650; font-family: inherit; letter-spacing: 0; }
html body .app #view-coach .co-head p { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-hav { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.co-more { position: relative; }
.co-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); animation: uiPanelIn .14s var(--ease, ease-out) both; }
.co-menu[hidden] { display: none; }
.co-mi { display: flex; align-items: center; gap: 9px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--fg-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.co-mi .i { width: 15px; height: 15px; color: var(--muted); }
.co-mi:hover { background: var(--surface-2); color: var(--fg); }
.co-mi[hidden] { display: none; }
/* sélecteur de vues (Plan, Conversation, Créatrices, Analyse, Revue, Diagnostic) */
html body .app #view-coach .co-tabbar { padding: 10px 28px 0; border: 0; background: none; }
html body .app #view-coach .co-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); width: auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
html body .app #view-coach .co-tabs button { height: 30px; padding: 0 13px; border: 0 !important; border-radius: 7px; background: none !important; color: var(--muted) !important; font-size: 13px; font-weight: 550; box-shadow: none !important; white-space: nowrap; }
html body .app #view-coach .co-tabs button::after { display: none !important; }
html body .app #view-coach .co-tabs button svg { display: none; }
html body .app #view-coach .co-tabs button[aria-selected="true"] { background: var(--surface-3) !important; color: var(--fg) !important; font-weight: 600; }
/* la semaine : plan d'action à gauche, recommandations et suivi à droite */
#view-coach .co-grid:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 14px; align-items: start; }
#view-coach .co-colL, #view-coach .co-colR { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#view-coach .co-colR .card { position: sticky; top: 0; }
#view-coach .co-colR .card + .card { position: static; }
@media (max-width: 1100px) { #view-coach .co-grid:not([hidden]) { grid-template-columns: minmax(0, 1fr); } #view-coach .co-colR .card { position: static; } }
/* cartes du coach : sobres */
html body .app #view-coach .card { border-radius: 12px; }
html body .app #view-coach .card-head h2 { font-size: 14px; font-weight: 650; }
html body .app #view-coach .card-head h2 .hi { display: none; }
html body .app #view-coach .co-focus { font-size: 14px; color: var(--fg-2); }
/* diagnostic de départ */
html body .app #view-coach #co-onboard { max-width: 860px; margin: 0 auto; width: 100%; }
#view-coach .co-intro { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
#view-coach .co-intro h2 { margin: 0; font-size: 18px; font-weight: 650; }
#view-coach .co-intro p { margin: 3px 0 0; font-size: 13px; }
.co-iav { flex: none; }
@media (max-width: 760px) { html body .app #view-coach .co-head { padding: 10px 12px !important; } html body .app #view-coach .co-tabbar { padding: 8px 12px 0; } html body .app #view-coach .co-tabs { width: 100%; } }

/* Coach, colonne de droite : diagnostic, objectifs, chiffres suivis */
.co-sum { display: flex; flex-direction: column; gap: 10px; }
.co-sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.co-sh h2 { margin: 0; font-size: 12px !important; font-weight: 650 !important; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.co-sh + * { margin-top: -2px; }
.co-sum .co-sh:not(:first-child) { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.co-diagtxt { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); }
.co-objs, .co-kpil { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.co-objs li { display: flex; align-items: flex-start; gap: 10px; }
.co-objs li .ui-badge { flex: none; margin-top: 1px; }
.co-objs b { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg); }
.co-objs small { color: var(--muted); font-size: 12.5px; }
.co-kpil li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--fg-2); }
.co-kpil b { font-variant-numeric: tabular-nums; color: var(--fg); }
.co-hint { margin: 0; font-size: 12px; }
.co-talk { align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; gap: 7px; }
.co-talk .i { width: 14px; height: 14px; }
/* Coach : les tâches en liste compacte (une ligne par tâche, séparées par un filet) */
html body .app #view-coach #co-tasks { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; gap: 0; }
html body .app #view-coach #co-tasks .task { margin: 0 !important; padding: 11px 12px !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; gap: 10px; }
html body .app #view-coach #co-tasks .task:last-child { border-bottom: 0 !important; }
html body .app #view-coach #co-tasks .task:hover { background: var(--surface-2) !important; }
html body .app #view-coach #co-tasks .task-txt > span { font-size: 13.5px; font-weight: 600; }
html body .app #view-coach #co-tasks .task-txt small { font-size: 12px; }
html body .app #view-coach #co-tasks .how summary { font-size: 12px; }
html body .app #view-coach #co-tasks .task.done .task-txt > span { color: var(--muted); text-decoration: line-through; }

/* =====================================================================
   Bibliothèque (Velora IA) : rail de sections, liste + éditeur d'étapes
   ===================================================================== */
#view-scripts .bl-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.bl-rail { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; }
.bl-rail button { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--fg-2); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.bl-rail button .i { width: 15px; height: 15px; color: var(--muted); flex: none; }
.bl-rail button:hover { background: var(--surface-2); color: var(--fg); }
.bl-rail button[aria-current="true"] { background: var(--surface-3); color: var(--fg); font-weight: 600; }
.bl-rail button[aria-current="true"] .i { color: var(--accent); }
.bl-n { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bl-main { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.bl-pad { flex: 1; overflow-y: auto; padding: 20px 28px 40px; }
.bl-pad > .wrap { max-width: none; padding: 0; }
.lib-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.lib-head h2 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.lib-head p { margin: 0; max-width: 46rem; }
.bl-labo .s-libcard { border: 0 !important; background: none !important; padding: 0 !important; box-shadow: none !important; }
.bl-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
.bl-list { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.bl-tools { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); }
.bl-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.bl-search:focus-within { border-color: var(--accent); }
.bl-search .i { width: 15px; height: 15px; color: var(--muted); flex: none; }
html body .app #view-scripts .bl-search input { flex: 1; min-width: 0; height: 34px !important; min-height: 34px !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; }
.bl-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
html body .app .bl-filters select { height: 32px !important; min-height: 32px !important; font-size: 12.5px !important; }
.bl-items { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.bl-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 9px; background: none; color: var(--fg-2); font: inherit; text-align: left; cursor: pointer; }
.bl-item:hover { background: var(--surface-2); }
.bl-item.on { background: var(--surface-3); box-shadow: inset 2px 0 0 var(--accent); }
.bl-it { flex: 1; min-width: 0; }
.bl-it b { display: block; font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-it small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-none { padding: 18px 10px; font-size: 13px; color: var(--muted); text-align: center; }
.bl-ed { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 26px 40px; }
.bl-eempty { margin-top: 8vh; }
.bl-eav { margin-bottom: 8px; }
.bl-erow { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.bl-erow .btn-main, .bl-erow .btn-ghost { display: inline-flex; align-items: center; gap: 7px; }
.bl-erow .i { width: 14px; height: 14px; }
.bl-edh { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
html body .app #view-scripts input.bl-title { flex: 1; min-width: 0; height: 40px !important; padding: 0 10px !important; border: 1px solid transparent !important; background: transparent !important; font-size: 19px !important; font-weight: 650 !important; color: var(--fg); border-radius: 8px !important; }
html body .app #view-scripts input.bl-title:hover { border-color: var(--line) !important; }
html body .app #view-scripts input.bl-title:focus { border-color: var(--accent) !important; background: var(--surface) !important; }
.bl-edacts { display: flex; align-items: center; gap: 8px; }
.co-mi.danger { color: var(--danger); } .co-mi.danger .i { color: var(--danger); }
.bl-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 12px; }
.bl-meta label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bl-meta label span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
html body .app .bl-meta select, html body .app .bl-meta input { height: 32px !important; min-height: 32px !important; font-size: 13px !important; }
.bl-pf { display: flex; align-items: center; height: 32px; font-size: 13px; font-weight: 600; }
.bl-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.bl-stat small { font-size: 12px; color: var(--muted); }
.bl-aibar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 5%, transparent); margin-bottom: 14px; }
.bl-aibar b { font-size: 13px; font-weight: 650; }
html body .app .bl-aibar select { width: auto; height: 30px !important; min-height: 30px !important; font-size: 12.5px !important; }
.bl-aibar small { font-size: 12px; }
.bl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bl-step { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.bl-step:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bl-step.bad { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.bl-step.flash { animation: blFlash 1.4s ease-out; }
@keyframes blFlash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); } 100% { box-shadow: none; } }
.bl-sh { display: flex; align-items: center; gap: 8px; }
.bl-sn { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--fg-2); }
html body .app #view-scripts input.bl-sname { flex: 1; min-width: 0; height: 30px !important; min-height: 30px !important; border-color: transparent !important; background: transparent !important; font-weight: 600 !important; font-size: 13.5px !important; padding: 0 6px !important; }
html body .app #view-scripts input.bl-sname:hover, html body .app #view-scripts input.bl-sname:focus { border-color: var(--line) !important; background: var(--bg) !important; }
.bl-price { display: inline-flex; align-items: center; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding-right: 8px; }
.bl-price.on { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--bg)); }
html body .app #view-scripts .bl-price input { width: 86px; height: 28px !important; min-height: 28px !important; border: 0 !important; background: transparent !important; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 4px 0 8px !important; }
.bl-price span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.bl-sacts { display: inline-flex; gap: 2px; }
.bl-sacts .icon-btn { width: 28px; height: 28px; min-height: 28px; font-size: 13px; }
.bl-sacts .icon-btn .i { width: 14px; height: 14px; }
.bl-sacts [data-bl-regen] .i { color: var(--accent); }
html body .app .bl-step textarea { min-height: 54px; font-size: 14px !important; line-height: 1.5; resize: vertical; }
.bl-media { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.bl-mrow { display: grid; grid-template-columns: 16px 104px minmax(0, 1fr) 64px 28px; align-items: center; gap: 6px; width: 100%; }
.bl-mrow > .i { width: 15px; height: 15px; color: var(--muted); }
html body .app .bl-mrow select, html body .app .bl-mrow input { height: 30px !important; min-height: 30px !important; font-size: 12.5px !important; }
.bl-media .linkish { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.bl-media .linkish .i { width: 13px; height: 13px; }
.bl-brief { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; color: var(--muted); }
.bl-brief .i { width: 14px; height: 14px; flex: none; }
html body .app #view-scripts input.bl-note { height: 30px !important; min-height: 30px !important; font-size: 12.5px !important; border-style: dashed !important; background: transparent !important; }
.bl-iss { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; font-weight: 550; }
.bl-iss .i { width: 14px; height: 14px; flex: none; }
.bl-iss.bad { color: var(--danger); } .bl-iss.warn { color: var(--warn); }
.bl-add { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.bl-add .i { width: 14px; height: 14px; }
/* aperçu : la conversation telle que le fan la reçoit */
.bl-prev { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.bl-pv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.bl-pvn { display: flex; flex-direction: column; gap: 2px; font-size: 18px; font-weight: 700; color: var(--muted-2); }
.bl-pvn small { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.bl-pvb { justify-self: start; max-width: 100%; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--surface-3); border: 1px solid var(--line); }
.bl-pvb p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--fg); }
.bl-pvm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bl-pvm span, .bl-pvm b { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; color: var(--fg-2); }
.bl-pvm b { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.bl-pvm .i { width: 13px; height: 13px; }
/* la fenêtre « Générer avec Velora AI » (le formulaire du générateur) */
.bl-genmodal[hidden] { display: none !important; }
.bl-gcard { width: min(760px, calc(100vw - 32px)) !important; max-height: calc(100vh - 48px); overflow-y: auto; padding: 0 !important; }
.bl-gh { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.bl-gh h2 { margin: 0; font-size: 16px; font-weight: 650; }
.bl-gh p { margin: 2px 0 0; }
.bl-gh .co-x { position: static; margin-left: auto; }
.bl-gbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
html body .app .bl-gbody .s-form, .bl-gbody .s-form { display: flex; flex-direction: column; }
.bl-gbody .s-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.bl-gbody .s-col:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bl-gbody .s-col > .grid { grid-template-columns: 1fr 1fr !important; }
.bl-gbody .s-col > .grid > .span2 { grid-column: 1 / -1; }
.bl-gbody .actions, .bl-gbody .s-form > :last-child { position: sticky; bottom: -18px; z-index: 2; padding: 12px 0 0; background: var(--surface); }
.bl-gbody .s-result { margin: 0; }
@media (max-width: 1100px) { #view-scripts .bl-layout { grid-template-columns: 170px minmax(0, 1fr); } .bl-split { grid-template-columns: 260px minmax(0, 1fr); } }
@media (max-width: 860px) {
  #view-scripts .bl-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .bl-rail { flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .bl-rail button { flex: none; }
  .bl-split { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .bl-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .bl-ed { overflow: visible; padding: 14px 12px 40px; }
  .bl-pad { padding: 14px 12px 40px; }
  .bl-mrow { grid-template-columns: 16px 90px minmax(0, 1fr) 54px 28px; }
  .bl-gbody .s-form { grid-template-columns: 1fr; }
  .bl-pv { grid-template-columns: 1fr; gap: 4px; }
  .bl-pvn { flex-direction: row; align-items: baseline; gap: 8px; font-size: 14px; }
}

@media (max-width: 1180px) { .bl-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bl-sum { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px 10px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .bl-gbody .s-cols { grid-template-columns: 1fr; } .bl-gbody .s-col > .grid { grid-template-columns: 1fr !important; } }

/* champs « nus » de la Bibliothèque (ui-bare : hors du style commun des champs) */
#view-scripts input.ui-bare { font: inherit; color: var(--fg); outline: none; }
#view-scripts input.ui-bare::placeholder { color: var(--muted-2); }

/* Bibliothèque › Modes de réponse : lien vers les messages associés */
.iac-assoc { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.iac-assoc b { display: block; font-size: 13.5px; } .iac-assoc small { font-size: 12.5px; }
.iac-back { display: inline-block; margin-bottom: 10px; font-size: 12.5px; }
#view-chat .as-tools button.locked { opacity: .55; }

/* Chatter IA sur téléphone : une carte par créatrice (nom et état à gauche, mode à droite, ce qui est à traiter dessous) */
@media (max-width: 760px) {
  #view-aichat .aic-table thead { display: none; }
  #view-aichat .aic-table, #view-aichat .aic-table tbody { display: block; }
  #view-aichat .aic-table tr[data-aic-row] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  #view-aichat .aic-table tr[data-aic-row]:last-child { border-bottom: 0; }
  #view-aichat .aic-table tr[data-aic-row] td { display: none; height: auto; padding: 0; border: 0; }
  #view-aichat .aic-table tr[data-aic-row] td:nth-child(1) { display: block; grid-column: 1; grid-row: 1; }
  #view-aichat .aic-table tr[data-aic-row] td:nth-child(3) { display: block; grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  #view-aichat .aic-table tr[data-aic-row] td:nth-child(2) { display: block; grid-column: 1; grid-row: 2; padding-left: 40px; }
  #view-aichat .aic-table tr[data-aic-row] td:nth-child(7):not(:has(.muted:only-child)) { display: flex; flex-wrap: wrap; gap: 4px; grid-column: 1 / -1; padding-left: 40px; }
  #view-aichat .aic-ibtn { order: 3; }
  html body .app select.aic-msel { min-width: 0; height: 36px !important; }
}
@media (max-width: 860px) { .bl-ed:has(.bl-eempty) { display: none; } }
.bl-eempty { align-items: center; text-align: center; }
/* l'éditeur de persona dans le panneau du Chatter IA : une colonne, les sections en pastilles qui défilent */
.aic-iac .iac-ed { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.aic-iac .iac-ednav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
.aic-iac .iac-ednav button { flex: none; }
.aic-iac .iac-ednav > :not(button) { display: none; }
.aic-iac [data-iac-back] { display: none !important; }
/* téléphone : le choix du mode passe à la ligne au lieu d'être coupé (Vue d'ensemble), les noms de créatrices se réduisent */
@media (max-width: 760px) {
  html body .app .vai-panel .vai-seg { flex-wrap: wrap; height: auto; }
  html body .app .vai-panel .vai-seg button { flex: 1 1 42%; }
  #view-aichat .aic-who { min-width: 0; }
  #view-aichat .aic-who > span { min-width: 0; }
  #view-aichat .aic-who b, #view-aichat .aic-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* en-tête de page : les actions toujours alignées à droite (même quand le titre est caché, dans l'appli Velora) */
html body .app .view > .viewbar > .viewbar-tools { margin-left: auto; justify-content: flex-end; }

/* =====================================================================
   Graphiques (public/vchart.js) : courbe 2 px + voile léger, ou barres fines ; repères fins ; survol précis
   ===================================================================== */
.vch { --vch-c: var(--accent); --vch-p: color-mix(in srgb, var(--muted) 75%, transparent); position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: var(--vch-h, 200px) auto auto; column-gap: 8px; margin-top: 14px; user-select: none; }
.vch-empty { display: block; padding: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }
.vch-y { position: relative; grid-row: 1; grid-column: 1; }
.vch-y span { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); line-height: 1; white-space: nowrap; }
.vch-plot { position: relative; grid-row: 1; grid-column: 2; }
.vch-grid i { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.vch-grid i:first-child { border-top-color: var(--line); }
.vch-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vch-g1 { stop-color: var(--vch-c); stop-opacity: .22; }
.vch-g2 { stop-color: var(--vch-c); stop-opacity: 0; }
:root[data-theme="light"] .vch-g1 { stop-opacity: .14; }
.vch-line { fill: none; stroke: var(--vch-c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vch-prev { fill: none; stroke: var(--vch-p); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: round; }
.vch-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.vch-bars > span { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 0 2px; }
.vch-bars i { display: block; width: min(48px, 62%); min-height: 2px; border-radius: 4px 4px 0 0; transition: background .15s; }
.vch-bars i.vch-bar { background: color-mix(in srgb, var(--vch-c) 70%, var(--surface)); animation: vchUp .45s var(--ease, ease-out) both; transform-origin: bottom; }
.vch-bars i.vch-bar.best, .vch-bars i.vch-bar.on { background: var(--vch-c); }
.vch-bars i.vch-pbar { width: min(20px, 24%); background: color-mix(in srgb, var(--muted) 22%, transparent); }
@keyframes vchUp { from { transform: scaleY(0); } }
.vch-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed color-mix(in srgb, var(--fg-2) 35%, transparent); pointer-events: none; }
.vch-avg em { position: absolute; left: 4px; bottom: 3px; padding: 0 4px; font-size: 11px; font-style: normal; color: var(--muted); background: var(--surface); border-radius: 4px; }
.vch-peak { position: absolute; transform: translate(-50%, -6px); margin-bottom: 4px; font-size: 11px; font-weight: 650; color: var(--fg-2); font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.vch-peak::before { content: ""; position: absolute; left: 50%; bottom: -10px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--vch-c); box-shadow: 0 0 0 2px var(--surface); }
.vch-k-bar .vch-peak::before { display: none; }
.vch-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); pointer-events: none; }
.vch-dot { position: absolute; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%; background: var(--vch-c); box-shadow: 0 0 0 2px var(--surface), 0 0 0 6px color-mix(in srgb, var(--vch-c) 22%, transparent); pointer-events: none; }
.vch-tip { position: absolute; top: 0; z-index: 5; min-width: 140px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
:root[data-theme="light"] .vch-tip { box-shadow: 0 10px 28px rgba(0, 0, 0, .1); }
.vch-tip small { font-size: 11.5px; color: var(--muted); }
.vch-tip b { font-size: 15px; font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
.vch-tip span { font-size: 12px; color: var(--fg-2); display: flex; align-items: center; gap: 6px; }
.vch-tip .vch-tp i { width: 10px; height: 0; border-top: 1.5px dashed var(--vch-p); }
.vch-tip em { font-style: normal; font-weight: 600; } .vch-tip em.up { color: var(--ok); } .vch-tip em.down { color: var(--danger); }
.vch-x { position: relative; grid-row: 2; grid-column: 2; height: 22px; }
.vch-x span { position: absolute; top: 7px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.vch-k-area .vch-x span:first-child { transform: none; } .vch-k-area .vch-x span:last-child { transform: translateX(-100%); }
.vch-legend { grid-row: 3; grid-column: 2; display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: var(--fg-2); }
.vch-legend span { display: inline-flex; align-items: center; gap: 7px; }
.vch-legend i { width: 14px; height: 0; border-top: 2px solid var(--vch-c); }
.vch-legend i.p { border-top: 1.5px dashed var(--vch-p); }
.vch-k-area .vch-plot svg { animation: vchIn .5s var(--ease, ease-out) both; }
@keyframes vchIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .vch-k-area .vch-plot svg, .vch-bars i.vch-bar { animation: none; } }
@media (max-width: 760px) { .vch { grid-template-columns: 34px minmax(0, 1fr); column-gap: 6px; } .vch-avg em { display: none; } }
/* les anciens graphiques remplacés : plus de trace */
.dbx3-chart.evo .evo-plot, .dbx3-chart.evo .evo-x { display: none; }
/* Statistiques : le choix de la mesure en sélecteur compact */
html body .app #an-metric { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
html body .app #an-metric button { height: 28px; padding: 0 11px; border: 0 !important; border-radius: 7px; background: transparent !important; color: var(--muted) !important; font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; box-shadow: none !important; }
html body .app #an-metric button[aria-selected="true"] { background: var(--surface-3) !important; color: var(--fg) !important; font-weight: 600; }

/* =====================================================================
   (08/11/2026) DESIGN SYSTEM — les couleurs de toute l'appli, à un seul endroit (chargé en dernier)
   Sombre : anthracite profond, menu un ton plus sombre, panneaux gris discrets, bordures fines, texte blanc cassé.
   Le violet ne marque que les actions importantes et les états actifs. Pas de dégradé, pas de halo, ombres sobres.
   ===================================================================== */
:root:root:root:not([data-theme="light"]), :root:root:root.studio-ui.studio-ui:not([data-theme="light"]) {
  --bg: #121316; --bg-2: #15161a; --side-bg: #0e0f11;
  --surface: #17181c; --surface-2: #1d1e23; --surface-3: #25262c;
  --line: #25262b; --line-2: #2f3036;
  --fg: #ececea; --fg-2: #c3c4ca; --muted: #8b8d96; --muted-2: #61636b;
  --ctl-bg: #141519; --ctl-line: #2b2c32;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow-md: 0 6px 18px rgba(0, 0, 0, .32); --shadow-lg: 0 14px 34px rgba(0, 0, 0, .4);
}
:root:root:root[data-theme="light"], :root:root:root.studio-ui.studio-ui[data-theme="light"] {
  --bg: #f7f7f8; --bg-2: #f2f2f4; --side-bg: #f0f0f2;
  --surface: #ffffff; --surface-2: #f4f4f6; --surface-3: #ebebee;
  --line: #e3e3e8; --line-2: #d6d6dc;
  --fg: #111214; --fg-2: #3d3f46; --muted: #6c6e77; --muted-2: #9a9ca4;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .06); --shadow-md: 0 6px 18px rgba(16, 16, 24, .08); --shadow-lg: 0 14px 34px rgba(16, 16, 24, .12);
}
:root:root:root { --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --ease: cubic-bezier(.2, .7, .3, 1); --dur: .16s; }
/* le menu : un ton plus sombre que la page (clair : un ton plus gris) */
html body .app .side, html body .side { background: var(--side-bg) !important; border-right-color: var(--line) !important; }
html body .app .main { background: var(--bg); }
/* plus de halos : menus, fenêtres et barre de saisie avec des ombres sobres */
html body .app :is(.crx-menu-pop, .au-tpl, .co-menu, .um-pop, .ctx-pop, [role="menu"]):not([hidden]) { box-shadow: var(--shadow-md) !important; }
html body .app .composer.cbox, html body .app #view-chat .composer.cbox { box-shadow: var(--shadow-sm) !important; }
html body .app .composer-zone { background: transparent !important; }
html body .app .vai-av.iac-logo { box-shadow: none !important; }
html body .co-modal > .co-card, html body .co-card { box-shadow: var(--shadow-lg) !important; }
html body .aic-drawer { box-shadow: var(--shadow-lg) !important; }
/* cartes et panneaux : un seul fond, une bordure fine */
html body .app :is(.card, .dbx-card, .vai-panel, .aic-tw, .v-kpis, .aic-issues, .aic-limits, .bl-step, .bl-meta, .gr-card) { background: var(--surface) !important; border-color: var(--line) !important; box-shadow: none !important; }

/* Tableau de bord : les cartes d'analyse en une grille régulière (2 à 4 colonnes selon la largeur) */
html body .app #view-accueil .dbx-grid.dbx-extra { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; gap: 14px !important; align-items: start; }
html body .app #view-accueil .dbx-grid.dbx-extra > * { min-width: 0; margin: 0 !important; }
/* cartes étroites : le titre, puis sa précision sur la ligne suivante (plus de titres coupés en deux) */
html body .app #view-accueil .dbx-extra .dbx-card > header { flex-wrap: wrap; row-gap: 2px; }
html body .app #view-accueil .dbx-extra .dbx-card > header > h3 { white-space: nowrap; }
html body .app #view-accueil .dbx-extra .dbx-card > header > small { order: 3; flex-basis: 100%; margin: 0; }

/* Revenus : le choix fin d'un onglet regroupé (Transactions, Répartition) */
html body .app .fx-subseg { display: inline-flex !important; width: fit-content !important; max-width: 100%; margin-bottom: 12px; }
/* en-tête de page (grand écran) : le titre à gauche, les outils sur la même ligne à droite (ils ne passent plus sous le titre) */
@media (min-width: 1100px) {
  html body .app .view > .viewbar { flex-wrap: nowrap !important; align-items: center; }
  html body .app .view > .viewbar > div:first-child:not(.viewbar-tools) { flex: 0 1 auto; min-width: 220px; }
  html body .app .view > .viewbar > .viewbar-tools { flex: 1 1 auto; min-width: 0; }
}
/* (08/11/2026) Chatter IA mis en réserve (lib/features.js) : ses éléments ne s'affichent nulle part */
html.chatter-reserved [data-chatter], html.chatter-reserved #view-aichat { display: none !important; }
