/* Connect IT+ — système de design.
   Principes : surfaces plates délimitées par des filets, une seule couleur d'action (vert-bleu « service »),
   couleurs sémantiques réservées aux états, typographie système dense et lisible, clair et sombre. */

:root {
  color-scheme: light;
  --canvas: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f4;
  --ink: #151b24;
  --ink-2: #3b4553;
  --ink-3: #5c6877;
  --ink-4: #8792a1;
  --line: #e3e6eb;
  --line-2: #cdd2da;
  --primary: #1d4294;
  --primary-hover: #15327a;
  --primary-ink: #ffffff;
  --primary-soft: #e8eefa;
  --accent: #e8591a; --accent-ink: #c2410c; --aqua: #1fb3d6;
  --ok: #157f3b;  --ok-soft: #e3f4e8;
  --warn: #9a5800; --warn-soft: #fdf0d9;
  --bad: #b42318; --bad-soft: #fde8e6;
  --info: #1f5bc4; --info-soft: #e7eefb;
  --violet: #5b3fc4; --violet-soft: #efebfb;
  --p1: #b42318; --p2: #c2410c; --p3: #1f5bc4; --p4: #5c6877;
  --series-1: #2a78d6; --series-2: #eb6834;
  --spectrum: linear-gradient(90deg, #1d4294 0%, #1fb3d6 70%, #e8591a 100%);
  --brand-panel: #13317a;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 16px 40px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .08);
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --side-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #0c1117; --surface: #131a22; --surface-2: #18212b; --surface-3: #1e2833;
    --ink: #e8edf3; --ink-2: #c3ccd7; --ink-3: #9aa6b4; --ink-4: #748190;
    --line: #26313d; --line-2: #34414f;
    --primary: #7aa7ff; --primary-hover: #9cbcff; --primary-ink: #081736; --primary-soft: #16244a; --accent: #f47a3e; --accent-ink: #f8935f;
    --ok: #4ccf7c; --ok-soft: #12301e; --warn: #f0b04a; --warn-soft: #33260e; --bad: #f2776b; --bad-soft: #3a1714;
    --info: #79a8f5; --info-soft: #15243d; --violet: #a993f5; --violet-soft: #241c42;
    --p1: #f2776b; --p2: #f39a5c; --p3: #79a8f5; --p4: #9aa6b4;
    --series-1: #3987e5; --series-2: #d95926;
    --brand-panel: #0c2157;
    --shadow-1: none;
    --shadow-pop: 0 16px 40px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0c1117; --surface: #131a22; --surface-2: #18212b; --surface-3: #1e2833;
  --ink: #e8edf3; --ink-2: #c3ccd7; --ink-3: #9aa6b4; --ink-4: #748190;
  --line: #26313d; --line-2: #34414f;
  --primary: #7aa7ff; --primary-hover: #9cbcff; --primary-ink: #081736; --primary-soft: #16244a; --accent: #f47a3e; --accent-ink: #f8935f;
  --ok: #4ccf7c; --ok-soft: #12301e; --warn: #f0b04a; --warn-soft: #33260e; --bad: #f2776b; --bad-soft: #3a1714;
  --info: #79a8f5; --info-soft: #15243d; --violet: #a993f5; --violet-soft: #241c42;
  --p1: #f2776b; --p2: #f39a5c; --p3: #79a8f5; --p4: #9aa6b4;
  --series-1: #3987e5; --series-2: #d95926;
  --brand-panel: #0c2157;
  --shadow-1: none;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .5);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 var(--font); font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -.01em; line-height: 1.25; color: var(--ink); }
h1 { font-size: 26px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.ic { flex: none; display: block; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; flex-wrap: nowrap !important; }
.center { text-align: center; }
.ok-text { color: var(--ok); } .warn-text { color: var(--warn); } .bad-text { color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -40px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: 8px; }

/* ---------- marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: inherit; letter-spacing: -.02em; }
.brand.sm { font-size: 17px; }
.brand-seal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px transparent; }
.brand.sm .brand-seal { width: 26px; height: 26px; font-size: 9.5px; }
:root[data-theme="dark"] .brand-seal { background: #fff; color: #13317a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-seal { background: #fff; color: #13317a; } }
.brand-link { color: var(--ink); text-decoration: none !important; }
.spectrum { height: 3px; background: var(--spectrum); }

/* ---------- boutons et contrôles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-4); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-ghost { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line-2)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.ghost-accent { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.ghost-accent:hover { border-color: var(--primary); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn.lg { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--ink-3) transparent var(--ink-3) transparent; animation: spin .8s linear infinite; }
.btn.primary.loading::after { border-color: var(--primary-ink) transparent var(--primary-ink) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 8px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.seg.sm button { padding: 3px 9px; font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span:first-child, .field > legend { font-weight: 600; font-size: 13.5px; color: var(--ink); padding: 0; }
.field.inline { display: inline-grid; }
.hint { font-size: 12.5px; color: var(--ink-3); }
.field-error { font-size: 12.5px; color: var(--bad); min-height: 0; }
.field-error:empty { display: none; }
input:not([type]), input[type=text], input[type=tel], input[type=month], input[type=time], input[type=datetime-local], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], input[type=email], select, textarea {
  width: 100%; min-height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 11px; background: var(--surface); color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s;
}
select { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
input[type=search]::-webkit-search-cancel-button { display: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
input[aria-invalid="true"] { border-color: var(--bad); }
::placeholder { color: var(--ink-4); }
.input-affix { position: relative; }
.input-affix input { padding-right: 44px; }
.input-affix .affix { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; border: 0; background: transparent; color: var(--ink-3); border-radius: 4px; cursor: pointer; display: grid; place-items: center; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.search-field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 10px; background: var(--surface); color: var(--ink-3); min-width: 220px; flex: 1; max-width: 340px; }
.search-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.search-field input { border: 0 !important; box-shadow: none !important; padding-left: 0; min-height: 36px; background: transparent; }
.search-field.xl { max-width: 640px; width: 100%; padding: 0 16px; border-radius: var(--radius); }
.search-field.xl input { min-height: 50px; font-size: 16px; }
kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-3); }

/* ---------- pastilles ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 4px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--ink-2); text-decoration: none !important; }
.tag.violet { background: var(--violet-soft); color: var(--violet); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.prio b { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 4px; font-size: 11.5px; color: #fff; background: var(--p4); }
.prio.p-critique b { background: var(--p1); } .prio.p-haute b { background: var(--p2); } .prio.p-normale b { background: var(--p3); }
:root[data-theme="dark"] .prio b { color: #0c1117; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prio b { color: #0c1117; } }
.count, .dot-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; }
.dot-count { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; font-size: 10px; border: 2px solid var(--surface); }
.count-inline { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--surface-3); font-size: 12px; color: var(--ink-2); vertical-align: 2px; }

/* ---------- connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--surface); }

/* Panneau produit, inspiré de l'univers du premier client : bleu roi profond, lumière « eau » (aqua),
   un seul trait orange comme signature. Hiérarchie des rayons : panneaux 20 px, contrôles 12 px, puces en pilule. */
.auth-brand {
  --ab-ink: #f1f5ff; --ab-mute: #b8c6e8; --ab-faint: #8ea0cc; --ab-line: rgba(241, 245, 255, .14); --ab-mint: #5fd8f2;
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(160deg, #1a3d8f 0%, #13317a 45%, #0e2663 100%); color: var(--ab-ink);
  padding: 36px clamp(28px, 5vw, 72px) 36px;
  display: flex; flex-direction: column; gap: 40px;
}
.auth-aurora { position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 40% at 82% 18%, rgba(31, 179, 214, .45), transparent 70%),
    radial-gradient(40% 40% at 10% 95%, rgba(80, 140, 255, .28), transparent 70%);
  filter: blur(24px); }
.auth-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 180' preserveAspectRatio='none'%3E%3Cpath d='M0 120 C 200 60 400 170 600 110 S 1000 50 1200 100' fill='none' stroke='%235fd8f2' stroke-opacity='.35' stroke-width='2'/%3E%3Cpath d='M0 150 C 250 100 450 190 700 140 S 1050 90 1200 135' fill='none' stroke='%235fd8f2' stroke-opacity='.18' stroke-width='2'/%3E%3C/svg%3E") no-repeat bottom / 100% 100%; }
.auth-brand .brand { color: #fff; }
.auth-brand .brand-seal { background: #fff; color: #13317a; box-shadow: none; }
.auth-inner { width: min(600px, 100%); margin: auto; display: grid; gap: 44px; }
.auth-pitch h1 { color: #fff; font-size: clamp(32px, 3.2vw, 48px); line-height: 1.06; font-weight: 650; letter-spacing: -.035em; text-wrap: balance; }
.auth-pitch p { margin-top: 22px; padding-left: 18px; border-left: 3px solid var(--accent); font-size: 16.5px; line-height: 1.6; color: var(--ab-mute); max-width: 52ch; }

/* visuel produit : carte ticket en verre dépoli + notification flottante */
.auth-visual { position: relative; padding: 0 28px 34px 0; }
.live-ticket { margin: 0; position: relative; background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 20px 22px 8px; backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 30px 80px -20px rgba(0, 0, 0, .6); }
.lt-head { display: flex; align-items: center; gap: 8px; }
.lt-ref { font: 600 12.5px/1 var(--mono); color: var(--ab-mute); }
.lt-prio { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 99px; padding: 3px 9px; }
.lt-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ab-mint); background: rgba(95, 216, 242, .12); border-radius: 99px; padding: 4px 10px; opacity: 0; animation: lt-fade .4s ease forwards; animation-delay: 3.3s; }
.lt-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--ab-mint); }
.lt-title { margin: 12px 0 16px; color: #fff; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.lt-sla-track { height: 6px; border-radius: 99px; background: rgba(238, 244, 248, .1); overflow: hidden; }
.lt-sla-fill { display: block; height: 100%; width: 20.4%; border-radius: inherit; background: linear-gradient(90deg, #8fe6f7, var(--ab-mint)); transform-origin: left; animation: lt-grow 3s cubic-bezier(.3, .7, .2, 1) .3s both; }
.lt-sla-legend { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--ab-faint); font-variant-numeric: tabular-nums; }
.lt-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.lt-steps li { display: grid; grid-template-columns: 40px 14px 1fr; gap: 10px; align-items: start; padding: 0 0 12px; position: relative; opacity: 0; animation: lt-fade .45s ease forwards; animation-delay: calc(.35s + var(--i) * .6s); }
.lt-steps li::before { content: ""; position: absolute; left: 56.5px; top: 14px; bottom: -2px; width: 1px; background: var(--ab-line); }
.lt-steps li:last-child::before { display: none; }
.lt-steps time { font: 12px/1.45 var(--mono); color: var(--ab-faint); font-variant-numeric: tabular-nums; }
.lt-dot { width: 9px; height: 9px; margin: 4px 0 0 2px; border-radius: 50%; border: 1.5px solid var(--ab-mute); background: #183a86; }
.lt-steps li:last-child .lt-dot { border-color: var(--ab-mint); background: var(--ab-mint); box-shadow: 0 0 0 4px rgba(95, 216, 242, .2); }
.lt-steps strong { display: block; color: var(--ab-ink); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.lt-steps div span { color: var(--ab-mute); font-size: 12.5px; }
.float-toast { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; max-width: 300px;
  background: #ffffff; color: #0f1b2a; border-radius: 16px; box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .12);
  opacity: 0; animation: lt-pop .5s cubic-bezier(.2, .9, .3, 1.2) 3.9s forwards; }
.float-toast > span:last-child { display: grid; }
.float-toast strong { font-size: 13.5px; }
.float-toast span span { font-size: 12.5px; color: #5c6877; }
.ft-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #dcfce7; color: #15803d; }
@keyframes lt-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes lt-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lt-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lt-steps li, .lt-state, .lt-sla-fill, .float-toast { animation: none; opacity: 1; transform: none; }
}

.auth-stack { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; font-size: 12.5px; color: var(--ab-faint); }
.auth-stack ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.auth-stack li { color: var(--ab-ink); background: #1b3d8c; border: 1px solid var(--ab-line); border-radius: 99px; padding: 5px 12px; font-weight: 500; }

/* colonne de connexion : surface blanche, formulaire sans cadre, contrôles 48 px, rayon 12 px */
.auth-main { display: flex; flex-direction: column; padding: 28px clamp(20px, 4vw, 48px); background: var(--surface); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-top .seg { border-radius: 99px; padding: 3px; }
.auth-top .seg button { border-radius: 99px; padding-inline: 14px; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px 5px 10px; }
.status-chip { min-width: 0; }
.auth-mobile-brand { display: none; }
.status-chip span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-chip i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.status-chip[data-state="ok"] i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-chip[data-state="down"] i { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.auth-card { width: min(400px, 100%); margin: auto; display: grid; gap: 22px; }
.auth-card h2 { font-size: 32px; font-weight: 650; letter-spacing: -.03em; }
.auth-card .muted { font-size: 15px; line-height: 1.55; }
.auth-card .field > span:first-child { font-weight: 600; font-size: 13.5px; }
.auth-card input { min-height: 48px; border-radius: 12px; font-size: 15px; padding-inline: 14px; }
.auth-card .input-affix input { padding-right: 48px; }
.auth-card .input-affix .affix { right: 7px; width: 36px; height: 36px; border-radius: 9px; }
.auth-card .input-affix .affix:hover { background: var(--surface-3); }
.auth-card .btn.lg { min-height: 48px; border-radius: 12px; font-size: 15px; }
.auth-card .btn.primary { box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 0 0 1px rgba(255,255,255,.08) inset; }
.workspace { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.ws-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--aqua), var(--primary)); color: #fff; font-weight: 700; box-shadow: 0 4px 10px -4px rgba(29, 66, 148, .5); }
.ws-body { display: grid; min-width: 0; }
.ws-body strong { font-size: 14px; }
.ws-body span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.accent { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); }
.pill.accent::before { background: var(--accent); }
.auth-help { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-3); text-align: center; }
.auth-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--ink-4); font-size: 12.5px; }
.auth-legal span { display: inline-flex; align-items: center; gap: 6px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-4); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.divider:empty { margin: 4px 0; }
.btn.sso { gap: 10px; background: var(--surface); }
.btn.sso:disabled { opacity: 1; color: var(--ink-3); cursor: default; }
.stack-sm { display: grid; gap: 6px; }

/* ---------- démonstration : langue et profil ---------- */
.landing { min-height: 100vh; background: var(--canvas); }
.land-top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 12px 32px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.land-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--spectrum); }
.land { max-width: 1120px; margin: 0 auto; padding: 40px 32px 140px; display: grid; gap: 36px; }
.land-head h1 { font-size: 32px; }
.land-head p { margin-top: 8px; color: var(--ink-3); font-size: 15px; max-width: 62ch; }
.land-block { display: grid; gap: 14px; }
.land-block > h2 { font-size: 15px; color: var(--ink-2); }
.lang-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 720px; }
.lang-card { text-align: left; display: grid; gap: 2px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.lang-card strong { font-size: 16px; }
.lang-card span { color: var(--ink-3); font-size: 13px; }
.lang-card[aria-checked="true"], .persona[aria-checked="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.persona-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.persona-group-head h3 { font-size: 14px; }
.persona-group-head p { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.persona { text-align: left; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .12s; }
.persona:hover, .lang-card:hover { border-color: var(--line-2); }
.persona-body { display: grid; gap: 1px; min-width: 0; }
.persona-name { font-weight: 650; }
.persona-role { font-size: 12.5px; font-weight: 600; color: var(--primary); }
.persona-title { font-size: 12.5px; color: var(--ink-3); }
.persona-shows { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); padding-top: 6px; border-top: 1px dashed var(--line); }
.land-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(16, 24, 40, .06); }
.land-bar-inner { max-width: 1120px; margin: 0 auto; padding: 14px 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; background: var(--primary-soft); color: var(--primary); }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.notice { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--info-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.notice > div { display: grid; flex: 1; }
.notice > div span { color: var(--ink-2); font-size: 13px; }
.notice > .ic { color: var(--info); }
.notice.compact { padding: 8px 12px; font-size: 13.5px; text-decoration: none !important; color: var(--ink); }
.notice.compact span { flex: 1; }
.notice.violet { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 22%, transparent); }
.notice.violet > .ic { color: var(--violet); }

/* ---------- coque ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.side::before { content: ""; display: block; height: 3px; background: var(--spectrum); flex: none; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; }
.nav { display: grid; gap: 14px; padding: 6px 10px 16px; }
.nav-group { display: grid; gap: 1px; }
.nav-title { font-size: 12px; font-weight: 600; color: var(--ink-4); padding: 6px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; text-decoration: none !important; }
.nav a .ic { color: var(--ink-3); }
.nav a span:first-of-type { flex: 1; }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
.nav a[aria-current="page"] .ic { color: var(--primary); }
.side-foot { margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.badge-env { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 24px; min-height: 60px; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { min-width: 0; }
.page-title { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger { margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(340px, 34vw); padding: 7px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-3); cursor: pointer; font-size: 13.5px; text-align: left; }
.search-trigger span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-trigger:hover { border-color: var(--ink-4); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 3px 8px 3px 3px; border-radius: 999px; cursor: pointer; text-align: left; }
.user-btn:hover { background: var(--surface-3); }
.user-btn > span:last-child { display: grid; line-height: 1.2; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 6px; z-index: 40; }
.menu-head { display: flex; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; text-align: left; color: var(--ink-2); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); color: var(--ink); }
.banner { display: flex; align-items: center; gap: 10px; padding: 8px 24px; background: var(--info-soft); color: var(--ink); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.banner span { flex: 1; }
.content { padding: 24px; width: 100%; max-width: 1360px; display: grid; gap: 20px; outline: none; }
.view-host { display: contents; }
.mobile-only { display: none !important; }
.scrim { display: none; }

/* ---------- mise en page ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; min-width: 0; box-shadow: var(--shadow-1); }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card.link { text-decoration: none !important; color: inherit; transition: border-color .12s; }
.card.link:hover { border-color: var(--line-2); }
.card > h3:first-child, .card > h2:first-child { margin-bottom: 12px; }
.card.stack > h3:first-child, .card.stack > h2:first-child { margin-bottom: 0; }
.kv.compact > div { grid-template-columns: minmax(0, 1fr) auto; }
.kv.compact dd { text-align: right; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head.pad { padding: 16px 20px 4px; margin: 0; }
.pad-top { padding-top: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.span2 { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.split.wide { grid-template-columns: minmax(0, 1fr) 360px; }
.sticky { position: sticky; top: 80px; }
.stack { display: grid; gap: 12px; align-content: start; }
.stack-lg { display: grid; gap: 20px; align-content: start; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.narrow { max-width: 860px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; }
.page-head p { margin-top: 4px; max-width: 72ch; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.toolbar select { width: auto; min-height: 34px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-weight: 600; font-size: 13.5px; width: fit-content; }
.footnote { font-size: 12px; color: var(--ink-3); }

/* ---------- tableaux et listes ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; position: relative; }   /* relative : les libellés pour lecteur d'écran (.sr-only, absolus) restent dans le défilement */
/* Une carte dans une grille ou une colonne flexible ne s'élargit jamais au contenu (tableaux larges : défilement interne). */
.card, .table-wrap { min-width: 0; }
/* Les blocs de page (enfants de la zone de contenu, y compris à travers .view-host en display: contents) restent à la
   largeur de l'écran : sans min-width: 0, un élément de grille s'élargit au contenu le plus large (téléphone). */
.content > *, .view-host > *, .stack > *, .stack-sm > *, .hx > *, .hx-news > *, .home-widgets > * { min-width: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--surface-2); }
td a.strong { color: var(--ink); }
td select { width: auto; max-width: 200px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
th.num, td.num { text-align: right; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > a, .list li > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; color: inherit; text-decoration: none !important; }
.list li > a > span:first-child, .list li > div > span:first-child { display: grid; min-width: 0; }
.list li > a:hover strong { color: var(--primary); }
.kv { display: grid; gap: 10px; margin: 0; }
.kv > div { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 10px; }
.kv dt { color: var(--ink-3); font-size: 13px; }
.kv dd { margin: 0; font-weight: 500; min-width: 0; }
.kv.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
.kv.cols > div { grid-template-columns: 1fr; gap: 2px; }
ul.tight, ol.tight { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* ---------- indicateurs ---------- */
.kpi { display: grid; gap: 4px; align-content: start; }
.kpi .l { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.kpi .v { font-family: var(--font-display); font-size: 28px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12.5px; color: var(--ink-3); }
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ink-3); }
.bar.ok > span { background: var(--ok); } .bar.warn > span { background: var(--warn); } .bar.bad > span { background: var(--bad); }
.sla { min-width: 108px; display: grid; gap: 4px; }
.sla .small { display: inline-flex; align-items: center; gap: 4px; }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty .ic { color: var(--ink-4); }
.empty strong { color: var(--ink-2); }
.empty .btn { margin-top: 8px; }
/* État vide explicatif (0.201.0, vague R5) : raison, action suivante, guide. */
.empty-x .empty-why { max-width: 52ch; }
.empty-x .empty-acts { justify-content: center; gap: 8px; }
.empty-x .empty-acts .btn { margin-top: 4px; }
.empty-x.compact { padding: 16px 12px; }
.skeleton { display: grid; gap: 14px; }
.skeleton span { height: 88px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton span:first-child { height: 44px; width: 40%; }
.skeleton-page { height: 100vh; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- accueil ---------- */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.welcome h2 { font-size: 24px; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: border-color .12s; }
.quick-card:hover { border-color: var(--primary); }
.quick-card .ic { color: var(--primary); width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--primary-soft); }
.quick-card > span { display: grid; }
.quick-card > span span { color: var(--ink-3); font-size: 13px; }
.major { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); color: var(--ink); }
.major > .ic { color: var(--bad); margin-top: 2px; }
.major > div { display: grid; gap: 2px; flex: 1; }
.major a { color: var(--ink); font-weight: 500; }
.kb-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kb-tile { display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none !important; }
.kb-tile:hover { border-color: var(--primary); }
.kb-tile .tag { width: fit-content; }

/* ---------- incidents ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); gap: 8px; }
.cat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font-weight: 500; text-align: left; color: var(--ink-2); }
.cat .ic { color: var(--ink-3); }
.cat[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--ink); }
.cat[aria-pressed="true"] .ic { color: var(--primary); }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.choice > span { display: grid; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); height: 100%; }
.choice > span span { color: var(--ink-3); font-size: 12.5px; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.prio-preview { display: grid; gap: 12px; margin-top: 12px; }
.prio-badge { display: flex; align-items: center; gap: 12px; }
.prio-badge b { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; font-family: var(--font-display); font-size: 18px; color: #fff; background: var(--p4); }
.p-critique .prio-badge b { background: var(--p1); } .p-haute .prio-badge b { background: var(--p2); } .p-normale .prio-badge b { background: var(--p3); }
.prio-badge span { font-size: 18px; font-weight: 650; }
.prio-preview dl { margin: 0; display: grid; gap: 6px; }
.prio-preview dl div { display: flex; justify-content: space-between; font-size: 13.5px; }
.prio-preview dt { color: var(--ink-3); }
.prio-preview dd { margin: 0; font-weight: 600; }
.suggest { border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); background: var(--primary-soft); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 6px; }
.suggest-head { display: flex; align-items: center; gap: 8px; color: var(--primary); }
.suggest-head strong { color: var(--ink); }
.suggest-item { background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.suggest-item summary { cursor: pointer; display: grid; padding: 8px 12px; list-style: none; }
.suggest-item summary::-webkit-details-marker { display: none; }
.suggest-body { padding: 0 12px 12px; display: grid; gap: 10px; }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ticket-head h2 { font-size: 20px; margin-top: 2px; }
.prose { line-height: 1.6; color: var(--ink-2); }
.prose p + p, .prose ol + p, .prose p + ol { margin-top: 10px; }
.prose ol { padding-left: 20px; margin: 0; display: grid; gap: 6px; }
.timeline { list-style: none; margin: 12px 0 16px; padding: 0; }
.tl { display: grid; grid-template-columns: 20px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); margin: 6px auto 0; box-shadow: 0 0 0 3px var(--surface); position: relative; z-index: 1; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: -4px; width: 2px; background: var(--line); }
.tl.creation .dot { background: var(--violet); } .tl.statut .dot { background: var(--ok); } .tl.affectation .dot { background: var(--info); }
.tl-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; border: 0; padding: 0; margin: 0; }
.stars legend { width: 100%; margin-bottom: 4px; }
.stars input { position: absolute; opacity: 0; width: 1px; }
.stars label { cursor: pointer; color: var(--line-2); padding: 2px; }
.stars label .ic { fill: currentColor; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #e0a100; }
.stars input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 4px; }
.stars-ro { display: inline-flex; gap: 1px; color: var(--line-2); vertical-align: -2px; }
.stars-ro .on { color: #e0a100; }
.stars-ro .ic { fill: currentColor; }
.decision { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); display: grid; gap: 12px; }
blockquote { margin: 4px 0 0; padding-left: 10px; border-left: 2px solid var(--line-2); color: var(--ink-2); }

/* ---------- demandes ---------- */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.catalog-item { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none !important; transition: border-color .12s; }
.catalog-item:hover { border-color: var(--primary); }
.catalog-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); flex: none; }
.catalog-body { display: grid; gap: 4px; }
.catalog-body strong { font-size: 15px; }
.catalog-body span { color: var(--ink-3); font-size: 13px; }
.catalog-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 10px; }
.steps { list-style: none; margin: 14px 0 0; padding: 0; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.step .ic, .step > .ic { width: 30px; height: 30px; }
.step > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 13px; background: var(--surface-3); color: var(--ink-3); border: 1.5px solid var(--line-2); }
.step > span:first-child .ic { width: 14px; height: 14px; }
.step.done > span:first-child { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.step.rejected > span:first-child { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.step.current > span:first-child { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.mini-steps { display: inline-flex; gap: 3px; }
.mini-steps i { width: 16px; height: 5px; border-radius: 3px; background: var(--line-2); display: block; }
.mini-steps i.done { background: var(--ok); } .mini-steps i.rejected { background: var(--bad); } .mini-steps i.current { background: var(--warn); }

/* ---------- base de connaissances ---------- */
.kb-hero { display: grid; justify-items: center; gap: 14px; padding: 28px 20px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.kb-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--spectrum); }
.kb-hero h2 { font-size: 24px; }
.kb-hero .chips { justify-content: center; }
.kb-list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.kb-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.kb-row:last-child { border-bottom: 0; }
.kb-row:hover { background: var(--surface-2); }
.kb-row-main { display: grid; gap: 4px; min-width: 0; }
.kb-row-main strong { font-size: 15px; }
.kb-row-meta { text-align: right; white-space: nowrap; }
.article h2 { font-size: 26px; margin: 10px 0 6px; }
.article .lead { font-size: 16px; color: var(--ink-2); margin-bottom: 18px; }
.article .prose { font-size: 15px; max-width: 72ch; }
.feedback { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); }

/* ---------- problèmes ---------- */
.flow { list-style: none; margin: 4px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; counter-reset: f; }
.flow li { position: relative; padding: 8px 10px 8px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-3); border-radius: 4px; }
.flow li.done { background: var(--ok-soft); color: var(--ok); }
.flow li.current { background: var(--primary); color: var(--primary-ink); }

/* ---------- changements ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-3); border-radius: var(--radius-lg); padding: 10px; display: grid; gap: 10px; align-content: start; min-height: 140px; }
.col h3 { display: flex; justify-content: space-between; padding: 2px 4px; font-size: 13px; color: var(--ink-2); }
.col h3 span { color: var(--ink-3); font-weight: 600; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; }
.kcard.emergency { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--bad); }
.summary-btn { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 6px; list-style: none; }
.summary-btn::-webkit-details-marker { display: none; }
details > summary { cursor: pointer; }

/* ---------- actifs et exploitation ---------- */
.cons { display: grid; }
.cons-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1fr) auto; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cons-row:last-child { border-bottom: 0; }
.cons-name { display: grid; }
.cons-bar { display: grid; gap: 4px; }
.runs { display: inline-flex; gap: 2px; }
.runs i { width: 7px; height: 18px; border-radius: 2px; background: var(--ok); display: block; opacity: .85; }
.runs i.echec { background: var(--bad); opacity: 1; }

/* ---------- tableau de bord ---------- */
.chart-box svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-box .grid { stroke: var(--line); stroke-width: 1; }
.chart-box .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart-box .s1 { fill: var(--series-1); }
.chart-box .s2 { fill: var(--series-2); }
.chart-box .hit { fill: transparent; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.s1 { background: var(--series-1); } .legend i.s2 { background: var(--series-2); }
.data-table { margin-top: 10px; font-size: 13px; }
.data-table summary { color: var(--ink-3); }
.data-table table { margin-top: 8px; }
.data-table td, .data-table th { padding: 6px 10px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.hbar strong { text-align: right; }
.prio-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; }
.prio-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; }
.prio-list li:last-child a { border-bottom: 0; }
.prio-list strong { font-size: 20px; font-family: var(--font-display); }
.tooltip { position: fixed; z-index: 60; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: var(--ink); color: var(--surface); font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-pop); }

/* ---------- intégrations ---------- */
.integ { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.integ-head { display: flex; gap: 12px; align-items: center; }
.integ-head > div { flex: 1; display: grid; }
.integ-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.integ details { border-top: 1px solid var(--line); padding-top: 10px; min-width: 0; }
.integ summary { font-weight: 600; font-size: 13.5px; }
.integ form, .integ .stack { grid-template-columns: minmax(0, 1fr); }
.code-wrap { position: relative; min-width: 0; }
.code { margin: 0; background: #0e141b; color: #dbe4ee; border-radius: var(--radius-sm); padding: 12px 14px; font: 12.5px/1.55 var(--mono); overflow-x: auto; white-space: pre; }
.code-wrap .copy { position: absolute; top: 6px; right: 6px; }
.keybox { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; }
.keybox[hidden] { display: none; }
.keybox .code { white-space: pre-wrap; word-break: break-all; padding-right: 96px; }

/* ---------- administration ---------- */
.script { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.script strong { color: var(--ink); }

/* ---------- surcouches ---------- */
dialog { color: var(--ink); }
.dialog { width: min(480px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; background: var(--surface); box-shadow: var(--shadow-pop); }
.dialog::backdrop, .palette::backdrop { background: rgba(10, 15, 22, .45); backdrop-filter: blur(2px); }
.palette { width: min(640px, calc(100vw - 32px)); margin-top: 12vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-pop); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 4px 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-input input { border: 0 !important; box-shadow: none !important; min-height: 50px; font-size: 16px; padding-left: 0; background: transparent; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.palette-group { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--ink-4); }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none !important; }
.palette-item .ic { color: var(--ink-3); }
.palette-item[aria-selected="true"], .palette-item:hover { background: var(--primary-soft); }
.pi-main { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pi-meta { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.palette-empty { padding: 24px; text-align: center; color: var(--ink-3); }
.palette-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); background: var(--surface-2); }
.notif-panel { position: fixed; top: 64px; right: 16px; width: min(400px, calc(100vw - 32px)); max-height: 72vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); z-index: 50; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.notif { display: grid; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; font-size: 13.5px; }
.notif span { color: var(--ink-2); }
.notif time { font-size: 12px; color: var(--ink-4); }
.notif:hover { background: var(--surface-2); }
.notif.unread { box-shadow: inset 3px 0 0 var(--primary); background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface)); }
.notif-empty { padding: 24px; text-align: center; color: var(--ink-3); }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--radius); background: var(--ink); color: var(--surface); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 80; max-width: calc(100vw - 32px); box-shadow: var(--shadow-pop); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--bad); color: #fff; }
/* Toast avec lien ou « Annuler » (0.201.0, vague R5) : cliquable, cibles de 44 px. */
#toast.show.act { pointer-events: auto; width: min(560px, calc(100vw - 32px)); }
#toast .toast-text { display: grid; gap: 2px; }
#toast .toast-instead { font-weight: 400; font-size: .86em; opacity: .9; }
#toast .toast-link, #toast .toast-undo { color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0 6px; min-height: 44px; min-width: 44px; cursor: pointer; white-space: nowrap; }
#toast .toast-undo:disabled { opacity: .6; cursor: default; }

/* ---------- adaptatif ---------- */
@media (max-width: 1180px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4, .kb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.wide, .g2-1 { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
}
@media (max-width: 980px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-main { order: -1; padding: 16px 20px 32px; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-top .status-chip { display: none; }
  .auth-brand { padding: 36px 20px 32px; gap: 28px; }
  .auth-inner { gap: 32px; }
  .auth-pitch h1 { font-size: 30px; }
  .auth-visual { padding: 0 0 40px; }
  .float-toast { right: 8px; left: 8px; max-width: none; }
  .auth-card { margin: 32px auto 36px; }
  .auth-card h2 { font-size: 28px; }
  .auth-legal { justify-content: center; text-align: center; }
  .persona-group { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-pop); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 15, 22, .4); z-index: 45; }
  .mobile-only { display: inline-grid !important; }
  .topbar { padding: 8px 12px; gap: 6px; }
  .search-trigger { width: 40px; padding: 8px; justify-content: center; margin-left: auto; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .page-title { font-size: 15px; }
  #top-lang { display: none; }
  .content { padding: 16px; }
  .g2, .g3, .quick, .choices, .kv.cols, .lang-cards { grid-template-columns: 1fr; }
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-tiles { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .land { padding: 24px 16px 140px; }
  .land-top { padding: 10px 16px; }
  .land-bar-inner { padding: 12px 16px; }
  .land-head h1 { font-size: 26px; }
  .hbar { grid-template-columns: 110px 1fr 28px; }
  .cons-row { grid-template-columns: 1fr; gap: 8px; }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kb-row { flex-direction: column; align-items: flex-start; }
  .kb-row-meta { text-align: left; }
  .toolbar .search-field { max-width: none; }
  td, th { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .side, .topbar, .no-print, #toast, .banner, .skip, details.data-table summary { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
  .content { padding: 0; }
}

/* ---------- audit et contrôle, fiches de processus ---------- */
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.notice.warn > .ic { color: var(--warn); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
.notice.bad > .ic { color: var(--bad); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.split.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.right { text-align: right; }
.pre { white-space: pre-line; }
.row.wrap { flex-wrap: wrap; }
.row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.row-tags:empty { display: none; }
.tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; }
.tabs a { padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-decoration: none !important; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px 14px; align-items: end; }
.filters .filters-actions { grid-column: 1 / -1; }
.audit-doc { display: grid; gap: 10px; }
.audit-section { margin-top: 14px; padding: 7px 12px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); font-size: 14px; }
.audit-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.audit-kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.audit-kv > div { display: grid; grid-template-columns: minmax(160px, 34%) minmax(0, 1fr); border-top: 1px solid var(--line); }
.audit-kv > div:first-child { border-top: 0; }
.audit-kv dt { padding: 8px 12px; background: var(--surface-2); color: var(--ink-3); font-size: 13px; }
.audit-kv dd { margin: 0; padding: 8px 12px; font-size: 13.5px; overflow-wrap: anywhere; }
.audit-table { font-size: 12.5px; }
.audit-table th { white-space: normal; }
.audit-table td { vertical-align: top; overflow-wrap: anywhere; }
tr.row-bad td { background: var(--bad-soft); }
tr.row-muted td { background: var(--surface-2); color: var(--ink-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.form-grid .catalog-item { min-height: 0; }
.sheet-links { margin-top: 6px; gap: 4px; }
.sheet-links .tag { display: inline-flex; align-items: center; gap: 4px; text-decoration: none !important; font-family: var(--mono); font-size: 11px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task { padding: 12px 16px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.task.past { opacity: .62; }
.task-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-head strong { flex: 1; min-width: 0; }
.task blockquote { margin: 2px 0; }
.rows-edit input { width: 100%; min-width: 90px; }
.rows-edit td { padding: 4px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 16px; margin: 0; }
legend { padding: 0 6px; font-weight: 650; color: var(--ink-2); }
.field.full { grid-column: 1 / -1; }
.occ-head { margin: 10px 0 4px; color: var(--ink-2); }
.steps.past { opacity: .6; }
@media (max-width: 860px) {
  .grid-2, .split.wide-left { grid-template-columns: minmax(0, 1fr); }
  .audit-kv > div { grid-template-columns: minmax(0, 1fr); }
  .audit-kv dt { padding-bottom: 2px; }
  .page-head .tabs { margin-top: 8px; }
}
.more-filters { grid-column: 1 / -1; }
.more-filters > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--primary); padding: 4px 0; }
.more-filters > .filters { margin-top: 10px; padding: 0; }

/* ---------- espaces, identités, centre d'apprentissage ---------- */
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.eyebrow { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.section-title { font-size: 15px; margin: 6px 0 -4px; }
.ok-text { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 13px; font-weight: 600; }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.notice.warn > .ic { color: var(--warn); }
.dialog.wide { width: min(680px, calc(100vw - 32px)); }
.ws-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.ws-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; color: var(--ink); }
.ws-card .ws-body { display: grid; gap: 2px; min-width: 0; }
.ws-card .ws-body span { color: var(--ink-3); font-size: 12.5px; }
.ws-card[aria-checked="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.ws-card.loading { opacity: .6; pointer-events: none; }
.ws-mark.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; flex: none; }
.badge-env span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress.sm { height: 5px; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--spectrum); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plain-list li { display: flex; gap: 10px; align-items: flex-start; }
.conflicts { list-style: none; margin: 0; padding: 0 18px 14px; display: grid; gap: 0; }
.conflicts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.conflicts li:first-child { border-top: 0; }
.conflicts li > .ic { color: var(--warn); margin-top: 2px; flex: none; }
.sod { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.role-stack { display: grid; gap: 8px; }
.role-tier { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.role-tier > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.role-tier p { margin: 0; }
.role-tier.tier-0 { margin-inline: 0; border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.role-tier.tier-1 { margin-inline: 14px; border-color: color-mix(in srgb, var(--violet) 30%, var(--line)); }
.role-tier.tier-2 { margin-inline: 28px; border-color: color-mix(in srgb, var(--info) 30%, var(--line)); }
.role-tier.base { margin-inline: 42px; }
.role-tier.tier-side { border-style: dashed; margin-top: 6px; }
.role-tier.base > div, .role-tier.tier-side > div { justify-content: flex-start; }
.matrix th { vertical-align: bottom; }
.matrix th .vert { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 12px; }
.matrix td.center { text-align: center; }
.matrix .yes { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); }
.matrix .no { color: var(--ink-4); }
.wizard { max-width: 860px; display: grid; gap: 22px; padding: 26px; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); padding-bottom: 10px; border-bottom: 3px solid var(--line); }
.stepper .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-size: 12px; flex: none; }
.stepper li.on { color: var(--ink); border-color: var(--primary); }
.stepper li.on .n { background: var(--primary); color: var(--primary-ink); }
.stepper li.done { color: var(--ink-2); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.stepper li.done .n { background: var(--primary-soft); color: var(--primary); }
.wizard-body { min-height: 220px; }
.wizard-body fieldset { border: 0; padding: 0; margin: 0; }
.wizard-body legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.wizard-foot { padding-top: 16px; border-top: 1px solid var(--line); }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 8px; }
.check.module { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.check.module > span { display: grid; gap: 2px; }
.check.module input { margin-top: 2px; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.review-grid > div { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); }
.review-grid span { font-size: 12px; color: var(--ink-3); }
.review-grid strong { font-size: 14px; overflow-wrap: anywhere; }
.done-card { justify-items: center; text-align: center; margin-inline: auto; }
.done-card .review-grid { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: left; }
.done-mark { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.learn-card { display: grid; gap: 8px; align-content: start; color: inherit; text-decoration: none !important; }
.learn-card h3 { font-size: 15.5px; margin: 4px 0 0; }
.learn-card p { margin: 0; }
.learn-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.learn-meta { display: grid; justify-items: end; gap: 6px; }
.learn-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.learn-step { display: grid; gap: 14px; }
.learn-step-head { display: flex; align-items: center; gap: 12px; }
.learn-step-head h3 { flex: 1; font-size: 15.5px; margin: 0; }
.step-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); font-weight: 700; font-size: 13px; flex: none; }
.step-n.ok { background: var(--ok-soft); color: var(--ok); }
.step-n.bad { background: var(--bad-soft); color: var(--bad); }
.step-n.warn { background: var(--warn-soft); color: var(--warn); }
.learn-step-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.learn-step-body p { margin: 0; }
.expect { padding: 10px 12px; border-left: 3px solid var(--aqua); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.verdict { display: grid; gap: 8px; justify-items: start; }
.verdict .comment { width: 100%; }
.shot { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-1); }
.shot img { display: block; width: 100%; height: auto; }
.shot:hover { border-color: var(--primary); }
@media (max-width: 860px) {
  .learn-step-body, .review-grid, .done-card .review-grid { grid-template-columns: minmax(0, 1fr); }
  .stepper { grid-template-columns: repeat(4, auto); overflow-x: auto; }
  .stepper li > span:last-child { display: none; }
  .stepper li.on > span:last-child { display: inline; }
  .role-tier, .role-tier.tier-1, .role-tier.tier-2, .role-tier.base { margin-inline: 0; }
  .wizard { padding: 18px; }
}
[hidden] { display: none !important; }
.page-head .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.page-head .tabs a { white-space: nowrap; }
.iam-users td:first-child { min-width: 220px; }
.page-head { min-width: 0; max-width: 100%; }
.page-head > * { min-width: 0; max-width: 100%; }
/* ---------- identité visuelle du client ---------- */
.client-logo { display: inline-flex; align-items: center; justify-content: center; max-width: 180px; height: 40px; padding: 4px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.client-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.client-logo.lg { max-width: 100%; height: 120px; padding: 10px 16px; }
.powered { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-4); }
.powered strong { color: var(--ink-3); }
.logo-drop { display: grid; place-items: center; min-height: 148px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--surface-2); padding: 12px; }
.logo-empty { display: grid; justify-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; text-align: center; }
.pdf-head { display: grid; grid-template-columns: 30% 40% 30%; border: 1px solid #9aa6b4; background: #fff; color: #151b24; font-family: Helvetica, Arial, sans-serif; min-height: 92px; }
.ph-cell { border-right: 1px solid #9aa6b4; padding: 8px; display: grid; align-content: start; gap: 4px; min-width: 0; }
.ph-cell:last-child { border-right: 0; }
.ph-brand img { max-width: 100%; max-height: 52px; object-fit: contain; justify-self: center; }
.ph-org { font-size: 10px; font-weight: 700; color: #1d4294; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-org-lg { font-size: 13px; color: #1d4294; }
.ph-cit { font-size: 10px; font-weight: 700; color: #1fb3d6; margin-top: auto; }
.ph-title { text-align: center; }
.ph-title span { font-size: 9.5px; color: #5c6877; }
.ph-title strong { font-size: 12px; }
.ph-box span { font-size: 9.5px; overflow-wrap: anywhere; }
.pdf-head { grid-template-columns: 32% 40% 28%; }
.console-preview { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }

/* Manuel du fournisseur SaaS */
.hb { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.hb-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.hb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hb-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.hb-item:hover { background: var(--surface-2); }
.hb-item.active { background: var(--primary-soft); }
.hb-item.active .hb-title { color: var(--primary); }
.hb-num { font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.hb-text { display: flex; flex-direction: column; min-width: 0; }
.hb-title { font-weight: 600; font-size: 14px; }
.hb-lang { font-size: 11px; font-weight: 600; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; margin-top: 2px; }
.hb-reader { padding: 24px 28px; min-width: 0; }
.hb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hb-toc { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 10px 12px; margin: 8px 0 4px; background: var(--surface-2); border-radius: var(--radius-sm); }
.hb-toc .link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; text-align: left; }
.hb-toc .link-btn:hover { text-decoration: underline; }
.hb-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.hb-pager .btn { min-width: 0; max-width: 100%; white-space: normal; text-align: left; height: auto; }
.card.kpi > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.card.kpi .pill { white-space: normal; max-width: 100%; }
.md { line-height: 1.6; font-size: 15px; max-width: 920px; }
.md h2 { font-size: 26px; margin: 18px 0 8px; }
.md h3 { font-size: 19px; margin: 28px 0 8px; scroll-margin-top: 80px; }
.md h4 { font-size: 16px; margin: 20px 0 6px; scroll-margin-top: 80px; }
.md h5 { font-size: 14px; margin: 16px 0 4px; }
.md p, .md ul, .md ol, .md blockquote { margin: 0 0 12px; }
.md ul, .md ol { padding-left: 22px; }
.md li { margin: 3px 0; }
.md li.md-sub { margin-left: 18px; list-style-type: circle; }
.md code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); border-radius: 4px; padding: 1px 4px; }
.md .md-code { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; margin: 0 0 14px; }
.md .md-code code { background: none; padding: 0; font-size: 13px; }
.md blockquote { border-left: 3px solid var(--line-2); padding: 4px 12px; color: var(--ink-3); }
.md .md-table { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.md .md-table table { font-size: 14px; }
.md .md-table td, .md .md-table th { vertical-align: top; }
.md-fig { margin: 8px 0 20px; }
.md-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.md-fig figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.md a { color: var(--primary); }
@media (max-width: 980px) {
  .hb { grid-template-columns: minmax(0, 1fr); }
  .hb-nav { position: static; }
  .hb-reader { padding: 16px; }
}
.md-fig a { display: block; cursor: zoom-in; }
.md-diagram img { width: 100%; }

/* CafonApp : marque, sélecteur de langue, code d'erreur */
.brand-mark { color: #00968F; flex: none; }
.brand-app { background: linear-gradient(95deg, #00968F, #1FB3D6); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .brand-mark { color: #2CC5BD; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { color: #2CC5BD; } }
.auth-brand .brand-mark { color: #fff; }
.toast-code { display: block; font-family: var(--mono); font-size: 11.5px; opacity: .8; margin-top: 2px; }
.lang-picker { position: relative; display: inline-flex; align-items: center; }
.lang-picker select { appearance: none; -webkit-appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); padding: 6px 28px 6px 30px; font: inherit; font-size: 13px; font-weight: 600; min-height: 34px; cursor: pointer; }
.lang-picker .ic { position: absolute; inset-inline-start: 9px; pointer-events: none; color: var(--ink-3); }
.lang-picker::after { content: ''; position: absolute; inset-inline-end: 11px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.auth-panel .lang-picker select, .auth .lang-picker select { min-height: 36px; }
.sim-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7c3d0a; background: var(--warn-soft, #fdf3e4); border: 1px solid #e6b56f; border-radius: 999px; padding: 1px 8px; }

/* ================================================================ CafonApp — espaces Docs, Guide, Assistance, État, Command Center */
.grow { flex: 1 1 auto; min-width: 0; }
.block { display: block; }
.auth-brand-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.docs-search { max-width: 560px; }
.docs-grid { margin-top: 4px; }
.doc-card { display: grid; gap: 8px; align-content: start; color: var(--ink); text-decoration: none !important; transition: border-color .12s, box-shadow .12s, transform .12s; }
.doc-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: 0 4px 14px rgb(16 24 40 / 8%); }
.doc-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.doc-card p { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; margin: 0; }
.doc-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.search-results > li { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-results > li:last-child { border-bottom: 0; }
.search-results a { font-weight: 600; }
.search-results mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.bullets { display: grid; gap: 6px; padding-inline-start: 0; }
.bullets > li { position: relative; padding-inline-start: 18px; line-height: 1.5; color: var(--ink-2); }
.bullets > li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.guide-reader { max-width: 860px; }
.guide-reader img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.guide-reader table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.guide-reader th, .guide-reader td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-reader code { overflow-wrap: anywhere; }
.sla-table { border-collapse: collapse; width: 100%; max-width: 480px; }
.sla-table th, .sla-table td { text-align: start; padding: 6px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sla-table th { color: var(--ink-3); font-weight: 600; }
.status-list > li { padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 12px; align-items: center; }
.status-list > li:last-child { border-bottom: 0; }
.status-overall { padding: 16px 18px; }
.status-overall strong { font-size: 16px; }
.status-overall.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.status-overall.ok > .ic { color: var(--ok); }
.notice.info > .ic { color: var(--info); }
.incident { border-inline-start: 4px solid var(--info); }
.incident.incident { border-inline-start-color: var(--bad); }
.incident h3 { font-size: 16px; margin: 0; }
.incident p { margin: 0; color: var(--ink-2); }
.inc-update { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: 4px; }
.cap-kpi { min-width: 128px; flex: 1 1 128px; color: var(--ink); text-decoration: none !important; }
.cap-kpi.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.tl.internal > div { background: var(--warn-soft); border-radius: var(--radius-sm); padding: 6px 10px; }
.tl.internal .dot { background: var(--warn); }
.tl.escalation .dot { background: var(--bad); } .tl.reply .dot { background: var(--info); } .tl.status .dot { background: var(--ok); }
.prod-gate { grid-template-columns: minmax(0, 1fr); background: var(--canvas); }
.prod-gate .auth-main { width: min(720px, 100%); margin: 0 auto; background: transparent; }
.prod-gate .auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: 0 8px 30px rgb(16 24 40 / 8%); }
#pg-status { display: flex; gap: 8px; align-items: center; }
.sim-chip { white-space: nowrap; }
@media (max-width: 640px) {
  .status-list > li { flex-wrap: wrap; }
  .sla-table { max-width: none; }
  .cap-kpi { flex-basis: calc(50% - 8px); min-width: 0; }
}
.doc-card .pill { white-space: normal; max-width: 100%; }
.doc-card strong { overflow-wrap: anywhere; }
.cap-table td.mono { overflow-wrap: anywhere; min-width: 140px; }
@media (max-width: 640px) {
  /* Téléphone : chaque capacité devient une fiche (nom, statut, preuve) au lieu d'un tableau à défiler. */
  .cap-table thead { display: none; }
  .cap-table, .cap-table tbody, .cap-table tr, .cap-table td { display: block; width: 100%; }
  .cap-table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .cap-table td { padding: 2px 0 !important; border: 0 !important; }
  .cap-table td[data-label] { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
  .cap-table td[data-label]::before { content: attr(data-label); color: var(--ink-3); font-family: var(--font-body, inherit); font-size: 12px; flex: none; min-width: 64px; }
  .topbar .lang-picker select { max-width: 112px; }
}
.split > * { min-width: 0; }
.sla-table .pill { white-space: normal; }
.sla-table td, .sla-table th { overflow-wrap: anywhere; }
.sla-table { table-layout: fixed; }
.sla-table th:first-child, .sla-table td:first-child { width: 46%; }
/* Textes longs : les pistes de grille ne s'élargissent pas au-delà de la carte. */
.stack > *, .stack-sm > *, .stack-lg > * { min-width: 0; }
.split > aside, .doc-card, .incident, .status-list { overflow-wrap: anywhere; }
.sla-table th { white-space: normal; }

/* ================================================================ Workforce : personnes et organigramme */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.person-card { display: flex; gap: 12px; align-items: center; color: var(--ink); text-decoration: none !important; min-width: 0; overflow-wrap: anywhere; }
.person-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.person-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.person-card.me { box-shadow: 0 0 0 1px var(--primary) inset; }
.profile-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; overflow-wrap: anywhere; }
.profile-head h2 { font-size: 22px; margin: 0; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px 18px; }
.kv { display: grid; gap: 2px; min-width: 0; }
.span-all { grid-column: 1 / -1; display: grid; gap: 8px; justify-items: start; }
.chain { display: grid; gap: 6px; }
.chain .ic { transform: rotate(-90deg); color: var(--ink-4); }
.org-card { overflow-x: auto; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { padding-inline-start: 28px; border-inline-start: 1px dashed var(--line-2); margin-inline-start: 14px; }
.org-tree li { margin: 6px 0; }
.org-node { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; max-width: 720px; }
.org-node.vacant { border-style: dashed; background: var(--surface-2); }
.org-node.me { box-shadow: 0 0 0 2px var(--primary) inset; }
.org-node.hit { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: var(--accent); }
.org-tree li.focus > .org-node { box-shadow: 0 0 0 2px var(--accent) inset; }
.org-text { min-width: 0; overflow-wrap: anywhere; }
.org-toggle .ic { transition: transform .15s; }
/* L'icône chevron pointe vers la droite ; ouverte, elle pointe vers le bas. */
.org-tree li[aria-expanded="true"] > .org-node .org-toggle .ic { transform: rotate(90deg); }
.org-toggle-spacer { width: 32px; flex: none; }
.vacant-avatar { background: var(--surface-3); color: var(--ink-3); }
.perm-table th[scope="col"] { white-space: normal; vertical-align: bottom; min-width: 86px; }
.perm-th { display: block; font-size: 12px; line-height: 1.25; }
.perm-table td.center, .center { text-align: center; }
.perm-table input[type="checkbox"] { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .org-tree ul { padding-inline-start: 14px; margin-inline-start: 8px; }
  .org-node { flex-wrap: wrap; }
  .people-grid { grid-template-columns: 1fr; }
}
/* Un menu déroulant ne dépasse jamais son conteneur, même avec de longues options. */
.field { min-width: 0; }
.field select, .field input, .field textarea { max-width: 100%; min-width: 0; }
h3 > .ic, h4 > .ic { display: inline-block; vertical-align: -2px; margin-inline-end: 4px; }
.card, .hint, .field > span { overflow-wrap: break-word; }
.meta > * { display: inline-flex; align-items: center; gap: 5px; }

/* ================================================================ Workforce : congés */
.leave-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.estimate { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 4px; background: var(--surface-2); }
.estimate.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.estimate.has-problem { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); }
.bad-text { color: var(--bad); }
.bad-text .ic, .estimate .ic { display: inline-block; vertical-align: -2px; }
.flip { display: inline-block; transform: scaleX(-1); }
.leave-cal { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.leave-cal th, .leave-cal td { padding: 0; border-bottom: 1px solid var(--line); text-align: center; }
.leave-cal thead th { padding: 6px 0; min-width: 26px; font-weight: 600; }
.leave-cal tbody th { text-align: start; padding: 6px 12px; font-weight: 500; position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; min-width: 160px; }
.leave-cal td { height: 30px; min-width: 26px; }
.leave-cal .we { background: var(--surface-3); }
.leave-cal .today { box-shadow: inset 0 0 0 2px var(--primary); }
.leave-cal td.abs.approved, .legend.abs.approved { background: color-mix(in srgb, var(--ok) 55%, var(--surface)); }
.leave-cal td.abs.pending, .legend.abs.pending { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--warn) 45%, var(--surface)) 0 4px, var(--surface) 4px 8px); }
.leave-cal td.abs.half { background-size: 50% 100%; background-repeat: no-repeat; }
.leave-cal tr.peers td { color: var(--ink-3); font-size: 12px; }
.legend { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line-2); vertical-align: -2px; }
.legend.we { background: var(--surface-3); }
.estimate > * { min-width: 0; overflow-wrap: anywhere; }

/* ================================================================ Workforce : temps */
.day-list { display: grid; gap: 8px; margin: 0; padding: 0; }
.day { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); min-width: 0; }
.day.today { border-color: color-mix(in srgb, var(--accent, var(--ok)) 55%, var(--line)); box-shadow: inset 3px 0 0 var(--accent, var(--ok)); }
.day-head { gap: 8px; align-items: center; min-width: 0; }
.day-head > * { min-width: 0; overflow-wrap: anywhere; }
.entry { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; border-top: 1px dashed var(--line); min-width: 0; }
.entry > * { min-width: 0; overflow-wrap: anywhere; }
.entry .mono { white-space: nowrap; }
.day-list { padding: 0 12px 12px; }
.plain-list li.day { display: block; }
.day .plain-list { gap: 0; margin-top: 4px; }
.entry .grow { flex: 1 1 200px; }

/* ================================================================ Workforce : paie */
.run-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0; }
.run-steps li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface); min-width: 0; overflow-wrap: anywhere; }
.run-steps li.done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); }
.notice.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.notice.ok > .ic { color: var(--ok); }
.data-table.compact th, .data-table.compact td { padding-block: 6px; }
.data-table.compact th[scope="row"] { font-weight: 600; text-align: start; width: 38%; }
.payslip tfoot th, .payslip tfoot td { border-top: 2px solid var(--line-2); }
@media print {
  .side, .topbar, .back, #print, .tabs, .scrim { display: none !important; }
  .payslip { box-shadow: none; border: 0; }
}

/* ================================================================ Workforce : documents RH */
.hr-doc { max-width: 760px; padding: 32px 36px; display: grid; gap: 14px; line-height: 1.6; }
.hr-doc h2 { text-align: center; text-transform: uppercase; letter-spacing: .04em; font-size: 18px; margin: 12px 0; }
.hr-doc header { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.hr-doc .doc-place { margin-top: 18px; }
.hr-doc .doc-sign { text-align: end; }
.hr-doc footer { border-top: 1px solid var(--line); padding-top: 10px; }
.break { overflow-wrap: anywhere; }
.verify-page { min-height: 100vh; display: grid; place-items: start center; background: var(--canvas); padding: 40px 16px; }
.verify-wrap { width: min(560px, 100%); display: grid; gap: 12px; }
.verify-brand { font-size: 18px; }
.verify-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.verify-facts dt { color: var(--ink-3); }
.verify-facts dd { margin: 0; overflow-wrap: anywhere; }
@media print { .hr-doc { box-shadow: none; border: 0; padding: 0; max-width: none; } }

/* ================================================================ Workforce : recrutement et intégration */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pipe-col { min-width: 0; align-content: start; }
.pipe-col h3 { font-size: 14px; }
.cand-list { gap: 8px; }
.plain-list li.cand { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--surface-2); min-width: 0; }
.plain-list li.stacked { display: grid; gap: 4px; min-width: 0; }
.stars { color: var(--warn); letter-spacing: 1px; margin-inline-start: 6px; font-size: 12px; }
.hire-form { border-top: 1px dashed var(--line); padding-top: 8px; }
.entry.late .grow { color: var(--bad); }
@media (max-width: 900px) { .pipeline { grid-template-columns: repeat(5, 220px); } }

/* ================================================================ Workforce : performance et commissions */
.quote { border-inline-start: 3px solid var(--line-2); padding-inline-start: 10px; }
.quote p { margin: 4px 0 0; }
.team-review { border-top: 1px solid var(--line); padding-top: 8px; }
.team-review > summary { cursor: pointer; }
.dist { display: grid; gap: 4px; }
.dist-row { display: grid; grid-template-columns: 16px 1fr 24px; gap: 8px; align-items: center; }
.dist-bar { display: block; block-size: 10px; border-radius: 99px; background: var(--primary); min-inline-size: 2px; }
input.num { inline-size: 70px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; }
.plan { border-top: 1px solid var(--line); padding-top: 8px; }

/* ================================================================ Workforce : indicateurs (palette validée clair et sombre) */
:root { --series-1: #2a78d6; --series-2: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series-1: #3987e5; --series-2: #d95926; } }
:root[data-theme="dark"] { --series-1: #3987e5; --series-2: #d95926; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.kpi4 { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.chart { inline-size: 100%; block-size: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 11px; }
.chart .bar.s1, .chart .dot.s1 { fill: var(--series-1); }
.chart .bar.s2 { fill: var(--series-2); }
.chart .line.s1 { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .mark:hover .bar, .chart .mark:focus .bar { opacity: .8; }
.chart .mark:focus { outline: none; }
.chart .mark:focus .hit { stroke: var(--primary); stroke-width: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-2); }
.sw { inline-size: 10px; block-size: 10px; border-radius: 3px; display: inline-block; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); }
.hbars { gap: 6px; }
.plain-list li.mark { display: grid; grid-template-columns: minmax(80px, 38%) 1fr 48px; gap: 8px; align-items: center; }
.hb-label { font-size: 13px; overflow-wrap: anywhere; }
.hb-track { block-size: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hb-bar { display: block; block-size: 100%; background: var(--series-1); border-radius: 99px; }
.hb-bar.masked { background: repeating-linear-gradient(45deg, var(--ink-4) 0 3px, transparent 3px 6px); }
.hb-value { font-size: 12.5px; color: var(--ink-2); text-align: end; }
.table-view summary { cursor: pointer; color: var(--ink-3); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }

/* ================================================================ Workforce : signature électronique */
.signer-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 4px 12px; max-block-size: 220px; overflow: auto; }
.evidence { gap: 8px; }
.evidence li { border-inline-start: 2px solid var(--line-2); padding-inline-start: 10px; }
.plain-list.evidence li { display: block; min-width: 0; }
.evidence .mono { overflow-wrap: anywhere; }

/* Modules de l'espace (incrément 12) */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.module-card { display: flex; flex-direction: column; gap: 8px; }
.module-card > div:last-child { margin-block-start: auto; }
.module-card.on { border-color: var(--line-2); }

/* Sécurité (incrément 13) */
.sec-card { max-inline-size: 720px; }
.sec-key { font-size: 1.15rem; letter-spacing: .06em; padding: 8px 12px; background: var(--bg-2, var(--line)); border-radius: 8px; display: inline-block; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(120px, 100%), 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.recovery-box { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.recovery-box p { margin: 0; }
.sec-pad { padding: 0 20px 14px; }

/* Organigramme centré (fusion des comportements v212, design Connect IT+) */
.seg-btn { display: inline-flex; align-items: center; border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; text-decoration: none; min-height: 32px; }
.seg-btn[aria-current="page"], .seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.link-btn { border: 0; background: transparent; padding: 6px 4px; color: var(--primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 32px; }
.link-btn:hover { text-decoration: underline; }
.org-explorer { padding: 16px 20px 20px; }
.org-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px; padding-block-end: 10px; border-block-end: 1px solid var(--line); font-size: 13px; }
.org-crumb span { color: var(--ink-4, var(--ink-3)); }
.org-crumb [aria-current="page"] { color: var(--ink); background: var(--surface-3); border-radius: 6px; padding-inline: 8px; }
.org-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.org-nav p { margin: 0; text-align: end; }
.org-layer { padding: 10px 0; }
.org-layer > h3, .org-team-head h3 { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 0 0 8px; }
.org-up > h3, .org-centre > h3 { text-align: center; }
.org-solo { display: flex; justify-content: center; }
.org-solo .org-tile { width: min(100%, 340px); }
.org-centre .org-solo .org-tile { width: min(100%, 360px); }
.org-note { text-align: center; color: var(--ink-3); font-size: 13px; margin: 6px 0 0; }
.org-link { width: 1px; height: 18px; margin: 0 auto; background: var(--line-2); }
.org-more-up { margin: 8px 0; }
.org-more-up > summary { width: fit-content; margin: 0 auto 8px; cursor: pointer; font-size: 13px; color: var(--ink-3); padding: 6px 10px; border-radius: 8px; }
.org-more-up > summary:hover { background: var(--surface-3); }
.org-team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block-start: 10px; border-block-start: 1px solid var(--line); }
.org-team-head h3 { font-size: 15px; color: var(--ink); }
.org-team { --org-gap: 12px; min-width: 0; }
.org-team.linked { border-inline-start: 1px solid var(--line-2); padding-inline-start: 14px; }
.org-rank { margin: 0 0 14px; }
.org-rank h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: none; }
.org-row { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--org-gap); margin: 0 0 var(--org-gap); }
.org-row > div { flex: 0 0 calc((100% - (var(--org-columns) - 1) * var(--org-gap)) / var(--org-columns)); min-width: 0; display: flex; }
.org-tile { display: flex; flex-direction: column; width: 100%; border: 1px solid var(--line); border-block-start: 3px solid var(--line-2); border-radius: 12px; background: var(--surface); min-width: 0; transition: border-color .15s, box-shadow .15s; }
.org-tile:hover { border-color: var(--line-2); box-shadow: 0 6px 16px -12px rgba(16, 24, 40, .35); }
.org-tile.is-focused { border-color: var(--primary); border-block-start-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent); }
.org-tile.me:not(.is-focused) { border-block-start-color: var(--primary); }
.org-tile.vacant { border-style: dashed; background: var(--surface-2); }
.org-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 6px 12px; }
.org-tile:not(.is-focused) { cursor: pointer; }
.org-name { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; width: fit-content; cursor: pointer; }
a.org-name:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a.org-name:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.org-centre-btn { margin-inline-start: auto; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); }
.org-centre-btn:hover { background: var(--surface-3); color: var(--primary); }
.org-count { padding: 6px 4px; }
.org-identity { display: grid; gap: 2px; min-width: 0; flex: 1; }
.org-identity span { font-size: 13px; color: var(--ink-2, var(--ink)); overflow-wrap: anywhere; }
.org-identity small { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.org-meta { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; }
.org-tile footer { display: flex; align-items: center; gap: 4px; margin-block-start: auto; padding: 2px 8px; border-block-start: 1px solid var(--line); }
.org-pager { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-block-start: 8px; }
.org-pager span { font-size: 13px; color: var(--ink-3); }
.org-empty { padding: 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 12px; }
.org-explorer :is(button, a, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 900px) { .org-nav p { flex-basis: 100%; text-align: start; } }
@media (prefers-reduced-motion: reduce) { .org-tile { transition: none; } }

/* ================================================================ Clients et revenus */
.grid.tight { gap: 10px; }
.kv.pairs { grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 8px 12px; }
.pipeline-board { grid-template-columns: repeat(4, minmax(230px, 1fr)); }
.pipeline-board .kcard select { width: 100%; }
.quote-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; justify-self: end; width: min(420px, 100%); margin: 0; }
.quote-totals dt { color: var(--ink-3); font-size: 13px; }
.quote-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.quote-totals .strong { color: var(--ink); font-weight: 650; }
.bill-doc .data-table td.num, .bill-doc .data-table th.num { white-space: nowrap; }
.rev-kpis .kpi .v { font-size: clamp(17px, 1.65vw, 22px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.data-table a.mono { white-space: nowrap; }
.hbars.aging .hbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "t t"; gap: 4px 10px; }
.hbars.aging .hbar > span:first-child { grid-area: l; } .hbars.aging .hbar .track { grid-area: t; } .hbars.aging .hbar strong { grid-area: v; white-space: nowrap; }
#quote-form .rows-edit td:nth-child(2) input { min-width: 220px; }
#quote-form .rows-edit select { max-width: 230px; }
#quote-form .rows-edit td:nth-child(3) input, #quote-form .rows-edit td:nth-child(5) input { min-width: 70px; width: 80px; }
@media (max-width: 720px) { .grid.g2.tight { grid-template-columns: 1fr; } .pipeline-board { grid-template-columns: minmax(0, 1fr); overflow-x: visible; } }
@media print {
  .split:has(.bill-doc) { display: block; }
  .bill-doc { border: 0; box-shadow: none; padding: 0; }
}

/* ================================================================ Coffre de fichiers */
.files-list .entry { align-items: center; gap: 10px; }
.file-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); flex: none; }
.drop-zone { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; color: var(--ink-2); transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.over, .drop-zone:focus-within { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.drop-zone:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
@media print { .files-card .drop-zone, .files-card .icon-btn { display: none !important; } }

/* ================================================================ Partenaires */
.partner-card { gap: 14px; align-items: center; }
.partner-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--partner, var(--primary)); color: #fff; font-weight: 700; font-size: 18px; flex: none; }
.partner-badge { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.card.flush > .pad:not(.card-head) { padding: 14px 20px 18px; margin: 0; }
.consent-list { margin: 0; }
.plain-list li.consent-item { display: grid; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.consent-item p { margin: 0; }

/* ================================================================ Navigation par modules et accueil global (0.26.0) */
.nav .nav-home { font-weight: 600; }
.nav-chev { display: inline-flex; color: var(--ink-4); transition: transform .15s; }
.crumb-trail { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.crumb-trail a { color: var(--ink-3); }
.crumb-trail a:hover { color: var(--primary); }
.crumbs .crumb-trail + .page-title { font-size: 15px; line-height: 1.2; }
.home-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 9%, var(--surface)) 0%, var(--surface) 60%); }
.home-hero h2 { font-size: 24px; margin: 0; }
.home-hero p { margin: 2px 0 0; }
.home-prio { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.home-prio .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; cursor: default; }
.home-prio a.chip { cursor: pointer; }
.home-prio .chip.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); color: var(--ink); }
.home-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.home-quick { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.qa-editor { display: grid; gap: 14px; }
.qa-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.qa-list li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.qa-list li .grow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.mod-tile { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding-right: 6px; }
.mod-tile:hover { border-color: var(--primary); }
.mod-tile > a { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 12px 14px; color: var(--ink); text-decoration: none !important; }
.mod-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); flex: none; }
.star[aria-pressed="true"] { color: var(--warn); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.all-mods summary { padding: 4px 0; }
.home-widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.hw h4 { margin: 0; font-size: 14px; }
.hw-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); }
.hw-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-stat { display: grid; gap: 2px; flex: 1 1 90px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2, var(--surface-3)); color: var(--ink); text-decoration: none !important; min-width: 0; }
.hw-stat .v { font-family: var(--font-display); font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hw-stat .l { font-size: 12px; color: var(--ink-3); }
.hw-stat.warn .v { color: var(--warn); } .hw-stat.bad .v { color: var(--bad); } .hw-stat.ok .v { color: var(--ok); }
.hw-list { list-style: none; margin: 0; padding: 0; display: grid; }
.hw-list a { display: flex; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--line); color: var(--ink); text-decoration: none !important; min-width: 0; }
.hw-list strong { font-weight: 550; overflow-wrap: anywhere; }
@media (max-width: 720px) { .home-hero { padding: 16px; } .home-hero h2 { font-size: 20px; } .home-cta { width: 100%; } }
/* CX — parcours commercial, grilles de cartes, colonnes mensuelles (une série : --series-1) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.grid-cards.wide { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.grid-cards > * { min-width: 0; }
.cx-flow { padding: 8px 10px; }
.cx-flow ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cx-flow li { display: flex; align-items: center; }
.cx-flow li + li::before { content: "›"; color: var(--ink-3); margin: 0 4px; }
.cx-flow a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none !important; font-size: 13.5px; }
.cx-flow a:hover { background: var(--primary-soft); color: var(--primary); }
.vcols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-items: end; height: 150px; padding-top: 6px; }
.vcol { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 4px; min-width: 0; }
.vcol .bar { align-self: end; display: block; min-height: 2px; background: var(--series-1); border-radius: 4px 4px 0 0; }
.vcol .lbl { font-size: 10.5px; color: var(--ink-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip; }
@media (max-width: 720px) { .grid-cards.wide { grid-template-columns: 1fr; } .vcol .lbl { font-size: 9px; } }
.seg.wrap { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.grid-cards > .card { align-content: start; }
.w-num { width: 5.5em; }
/* Place de marché publique (marketplace.html) */
.mk-page { background: var(--canvas); min-height: 100vh; }
.mk-top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mk-brand { color: var(--ink); text-decoration: none !important; font-size: 18px; }
.mk-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1; }
.mk-nav a { color: var(--ink-2); font-size: 14px; }
.mk-tools { display: flex; gap: 8px; align-items: center; }
.mk-main { width: min(1180px, 100%); margin: 0 auto; padding: 24px 24px 48px; display: grid; gap: 40px; }
.mk-main > section { scroll-margin-top: 70px; }
.mk-hero { padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 10%, var(--surface)) 0%, var(--surface) 65%); display: grid; gap: 12px; }
.mk-hero h1 { margin: 0; font-size: 30px; line-height: 1.15; }
.mk-hero p { margin: 0; max-width: 70ch; }
.mk-head h2 { margin: 0 0 4px; }
.mk-head p { margin: 0; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; }
.mk-grid > * { min-width: 0; align-content: start; }
.mk-grid.plans { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.mk-product h3, .mk-plan h3 { margin: 0 0 4px; }
.mk-price { font-family: var(--font-display); font-size: 26px; font-weight: 650; margin: 0; }
.mk-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field.inline { display: inline-grid; }
.mk-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding: 16px; color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 720px) { .mk-top { padding: 10px 16px; } .mk-main { padding: 16px; gap: 28px; } .mk-hero { padding: 18px; } .mk-hero h1 { font-size: 23px; } .mk-grid, .mk-grid.plans { grid-template-columns: 1fr; } }
/* Assistant en étapes (création guidée) */
.wz { display: grid; gap: 14px; }
.wz-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: wz; }
.wz-steps li { flex: 1 1 160px; }
.wz-steps button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-3); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.wz-steps button:disabled { cursor: default; opacity: .7; }
.wz-steps li.on button { border-color: var(--primary); color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }
.wz-steps li.ok button { color: var(--ink-2); }
.wz-steps button:not(:disabled):hover { border-color: var(--primary); }
.wz-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-weight: 700; font-size: 12px; flex: none; }
.wz-steps li.on .wz-n { background: var(--primary); color: #fff; }
.wz-steps li.ok .wz-n { background: var(--ok-soft, var(--primary-soft)); color: var(--ok, var(--primary)); }
.wz-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.wz-body > * { min-width: 0; }
.wz-form h3 { margin: 2px 0 0; }
.wz-h:focus { outline: none; }
.wz-aside { display: grid; gap: 12px; position: sticky; top: 76px; }
.wz-aside h4 { margin: 0; font-size: 14px; }
.wz-nav { border-top: 1px solid var(--line); padding-top: 12px; }
.wz-value { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-3); }
.wz-value strong { font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 8px; }
.opt-card { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.opt-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.opt-card:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.opt-card:hover { border-color: var(--primary); }
.choice-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); flex: none; }
.opt-card:has(input:checked) .choice-ic { background: var(--primary); color: #fff; }
.choice-list { display: grid; gap: 6px; max-height: 330px; overflow: auto; padding: 2px; margin: 6px 0; }
.row-choice { align-items: center; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; gap: 8px; align-items: center; }
.checklist .ic { color: var(--ok, var(--primary)); }
@media (max-width: 900px) { .wz-body { grid-template-columns: 1fr; } .wz-aside { position: static; } .wz-steps li { flex: 1 1 calc(50% - 6px); } }
.banner.trial { background: color-mix(in srgb, var(--primary) 10%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.choice-grid.plans { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.plan-card .mk-price { font-size: 22px; }
/* Accueil global (0.31.0) : bandeau de marque pleine largeur, actions rapides en icônes, priorités, cartes contextuelles,
   onglets de modules, « À la une ». Le bandeau garde ses couleurs dans les deux thèmes (texte clair sur fond foncé). */
.content:has(> .view-host > .hx) { max-width: 1680px; }
.hx { display: grid; gap: 24px; }
.hx-band { --band: color-mix(in srgb, var(--primary) 62%, #0b1220); border-radius: var(--radius-lg); padding: 22px 24px 24px; color: #f4f6fb;
  background: radial-gradient(1200px 260px at 90% -40%, color-mix(in srgb, var(--primary) 55%, transparent), transparent 60%), linear-gradient(135deg, var(--band), color-mix(in srgb, var(--band) 80%, #000)); display: grid; gap: 18px; }
.hx-band .eyebrow { color: color-mix(in srgb, #fff 70%, transparent); }
.hx-head { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.hx-head h2 { margin: 2px 0 0; font-size: 26px; color: #fff; }
.hx-head p { margin: 2px 0 0; color: color-mix(in srgb, #fff 78%, transparent); }
.hx-band .home-cta .btn:not(.primary) { background: transparent; color: #fff; border-color: color-mix(in srgb, #fff 45%, transparent); }
.hx-band .home-cta .btn.primary { background: #fff; color: var(--band); border-color: #fff; }
.hx-top { display: grid; grid-template-columns: minmax(280px, 1.15fr) minmax(240px, 1fr) minmax(320px, 1.35fr); gap: 14px; align-items: stretch; }
.hx-qa { background: color-mix(in srgb, #fff 9%, transparent); border: 1px solid color-mix(in srgb, #fff 16%, transparent); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 10px; align-content: start; }
.hx-qa h3, .hx-prio h3 { margin: 0; font-size: 16px; }
.hx-qa h3 { color: #fff; }
.hx-edit { color: #fff; }
.hx-edit:hover, .hx-edit[aria-expanded="true"] { background: color-mix(in srgb, #fff 18%, transparent); }
.qa-icons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(82px, 100%), 1fr)); gap: 4px; }
.qa-icons a { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: var(--radius); color: #fff; text-decoration: none !important; text-align: center; font-size: 12.5px; line-height: 1.25; }
.qa-icons a:hover, .qa-icons a:focus-visible { background: color-mix(in srgb, #fff 14%, transparent); outline: none; }
.qa-icons a:focus-visible { box-shadow: 0 0 0 2px #fff; }
.qa-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--band); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.hx-qa .qa-editor { color: var(--ink); }
.hx-qa > p { color: color-mix(in srgb, #fff 80%, transparent); }
.hx-prio { background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 10px; align-content: start; }
.hx-prio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hx-prio-list a, .hx-prio-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none !important; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.hx-prio-list span { flex: 1; }
.hx-prio-list li.warn a, .hx-prio-list li.warn button { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-soft); }
.hx-prio-list a:hover, .hx-prio-list button:hover { border-color: var(--primary); }
.hx-clear { display: flex; gap: 8px; align-items: center; color: var(--ink-2); margin: 0; }
.hx-clear .ic { color: var(--ok, var(--primary)); }
.hx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hx-tile { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: var(--radius-lg); color: #fff; text-decoration: none !important; min-height: 118px; font-size: 13px; position: relative; overflow: hidden; }
.hx-tile strong { font-size: 14.5px; }
.hx-tile span:not(.hx-tile-ic):not(.hx-tile-cta) { color: color-mix(in srgb, #fff 82%, transparent); }
.hx-tile-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, #fff 20%, transparent); margin-bottom: 4px; }
.hx-tile-cta { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding-top: 6px; border-top: 2px solid color-mix(in srgb, #fff 55%, transparent); width: fit-content; }
.hx-tile:hover { filter: brightness(1.08); }
.hx-tile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hx-tile.t1 { background: #8a6d2c; } .hx-tile.t2 { background: #2f5d55; } .hx-tile.t3 { background: #3c4b5c; } .hx-tile.t4 { background: #7a4b33; }
.hx-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.hx-card { background: var(--surface); border: 1px solid var(--line); border-bottom: 3px solid var(--line-2); border-radius: var(--radius-lg); padding: 16px; display: grid; gap: 6px; align-content: start; }
.hx-card h4 { margin: 0; font-size: 15.5px; }
.hx-card p { margin: 0; }
.hx-card a { margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; }
.hx-card-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); }
.hx-card.ok { border-bottom-color: var(--ok, #2f7d4f); } .hx-card.ok .hx-card-ic { color: var(--ok, #2f7d4f); }
.hx-card.bad { border-bottom-color: var(--bad); } .hx-card.bad .hx-card-ic { color: var(--bad); }
.hx-card.warn { border-bottom-color: var(--warn); } .hx-card.warn .hx-card-ic { color: var(--warn); }
.hx-card.info { border-bottom-color: var(--primary); } .hx-card.info .hx-card-ic { color: var(--primary); }
.hx-card.violet { border-bottom-color: #6d4fb3; } .hx-card.violet .hx-card-ic { color: #6d4fb3; }
#mod-tabs [role="tab"] { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
#mod-tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
#mod-tabs [role="tab"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.home-widgets { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
@media (max-width: 1180px) { .hx-top { grid-template-columns: 1fr 1fr; } .hx-tiles { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hx-band { padding: 16px; } .hx-top { grid-template-columns: 1fr; } .hx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hx-head h2 { font-size: 21px; } .hx-tile { min-height: 104px; } }
.hx-qa.editing { grid-column: 1 / -1; }
.mod-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.mod-tile .small.muted.block { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-tile .eyebrow { font-size: 10.5px; margin: 0 0 1px; }
.hw-stat .v { font-size: 18px; }
.hw { align-content: start; }
.hw-stat { flex: 1 1 118px; }
.hw-stat .v { white-space: nowrap; font-size: clamp(15px, 1.25vw, 18px); overflow-wrap: normal; }
/* CX — concepteur de tableaux de bord (0.33.0) */
.content:has(> .view-host > .dash-layout), .content:has(.dash-layout) { max-width: 1680px; }
.dash-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 14px; }
.dash-bar .field.inline { display: grid; gap: 2px; font-size: 12.5px; }
.dash-bar select { max-width: 200px; }
.dash-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.dash-layout.editing { grid-template-columns: 230px minmax(0, 1fr) 290px; }
.dash-palette, .dash-config { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; }
.dash-palette h4, .dash-config h4 { margin: 4px 0 0; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; color: var(--ink); cursor: grab; }
.pchip.dim { border-style: dashed; }
.pchip.vis { background: var(--surface-3); }
.pchip:hover, .pchip:focus-visible { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px var(--primary-soft); }
.pchip:disabled { opacity: .55; cursor: not-allowed; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(128px, auto); grid-auto-flow: dense; gap: 12px; }
.dash-w { display: flex; flex-direction: column; gap: 8px; padding: 14px; min-width: 0; overflow: hidden; }
.dash-w.selected { outline: 2px solid var(--primary); outline-offset: 1px; }
.dash-w.drop { outline: 2px dashed var(--primary); background: var(--primary-soft); }
.dash-layout.editing .dash-w { cursor: grab; }
.w-head { display: flex; gap: 8px; align-items: flex-start; }
.w-head h4 { margin: 0; font-size: 13.5px; flex: 1; min-width: 0; }
.w-tools { display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
.w-tools .icon-btn { width: 26px; height: 26px; font-size: 13px; }
.w-body { flex: 1; min-height: 0; overflow: auto; }
.w-foot { margin: 0; border-top: 1px dashed var(--line); padding-top: 6px; }
.kpi-big { all: unset; cursor: pointer; display: block; font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 30px); font-weight: 650; font-variant-numeric: tabular-nums; }
.kpi-big:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.link-btn { all: unset; cursor: pointer; color: var(--primary); }
.link-btn:hover { text-decoration: underline; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok, #2f7d4f); } .delta.down { color: var(--bad); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-list li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.rank-list .rk { min-width: 28px; height: 24px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--surface-3); font-weight: 700; font-size: 12px; }
.rank-list .rk.tied { background: var(--warn-soft); }
.rank-list .grow { min-width: 0; display: grid; gap: 3px; }
.rank-list .bar { height: 6px; background: var(--surface-3); border-radius: 0 3px 3px 0; overflow: hidden; }
.rank-list .bar span { display: block; height: 100%; background: var(--series-1); border-radius: 0 3px 3px 0; }
.rank-list .num { text-align: right; white-space: nowrap; }
.dash-line { width: 100%; height: auto; max-height: 220px; }
.dash-line polyline { fill: none; stroke: var(--series-1); stroke-width: 2; }
.dash-line circle { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.dash-line .axis { stroke: var(--line-2); }
.dash-line text { font-size: 10px; fill: var(--ink-3); }
.dash-locked { display: flex; gap: 8px; align-items: center; color: var(--ink-3); }
.dash-card .mod-ic { width: 32px; height: 32px; }
dialog.drill { width: min(820px, 96vw); }
@media (max-width: 1280px) { .dash-layout.editing { grid-template-columns: 210px minmax(0, 1fr); } .dash-layout.editing .dash-config { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 900px) { .dash-layout.editing { grid-template-columns: 1fr; } .dash-palette { position: static; max-height: none; } .dash-grid { grid-template-columns: 1fr; } .dash-w { grid-column: auto !important; grid-row: auto !important; } }

/* Volet de création (0.34.0) : formulaire ouvert à la demande, ancré à droite (plein écran sur téléphone). */
dialog.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); max-width: 100vw; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-pop); overflow-y: auto; }
dialog.sheet::backdrop { background: rgb(15 23 42 / 0.35); }
dialog.sheet[open] { animation: sheet-in .18s ease-out; }
@keyframes sheet-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation: none; } }
dialog.sheet > form, dialog.sheet > .card { border: 0; box-shadow: none; border-radius: 0; padding: 24px 24px 32px; margin: 0; min-height: 100%; background: transparent; }
dialog.sheet > form { align-content: start; }
dialog.sheet > form > h3:first-child, dialog.sheet > form > :first-child h3 { padding-right: 40px; font-size: 1.15rem; }
dialog.sheet .sheet-x { position: absolute; top: 14px; right: 14px; z-index: 1; }
dialog.sheet .narrow { max-width: none; }

/* Constructeur (0.36.0) : en modification, palette et réglages partagent une colonne latérale, la grille garde la
   largeur ; l'en-tête d'un widget passe ses outils à la ligne plutôt que d'écraser le titre. */
.dash-layout.editing { grid-template-columns: 270px minmax(0, 1fr); }
.dash-layout.editing .dash-palette { grid-column: 1; grid-row: 1; position: static; max-height: none; }
.dash-layout.editing .dash-config { grid-column: 1; grid-row: 2; position: static; max-height: none; }
.dash-layout.editing .dash-grid { grid-column: 2; grid-row: 1 / span 2; }
.w-head { flex-wrap: wrap; }
.w-head h4 { flex: 1 1 140px; overflow-wrap: anywhere; }
.w-tools { flex-wrap: wrap; }
@media (max-width: 1280px) { .dash-layout.editing { grid-template-columns: 240px minmax(0, 1fr); } .dash-layout.editing .dash-config { grid-column: 1; } }
@media (max-width: 900px) { .dash-layout.editing { grid-template-columns: 1fr; } .dash-layout.editing .dash-config, .dash-layout.editing .dash-palette, .dash-layout.editing .dash-grid { grid-column: 1; grid-row: auto; } }
.dash-w { container-type: inline-size; }
.dash-w .kpi-big { font-size: clamp(18px, 12.5cqi, 34px); white-space: nowrap; }
.kpi .v.small-v { font-size: 1.05rem; line-height: 1.3; }

/* 0.41.0 — suivi commercial : icônes dans le texte, onglets en liens, panneau de suivi. */
.ic-inline { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ic-inline > .ic { flex: none; }
.seg a { padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.seg a.on, .seg a[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.engage .entry .row { gap: 6px; }
.seg { max-width: 100%; flex-wrap: wrap; }

/* Tableaux de données (0.44.0) : barre d'outils, menus, filtres, sélection, pagination. */
.dt { min-width: 0; }
.dt-bar { gap: 8px; align-items: center; }
.dt-bar .search-field { min-width: min(220px, 100%); }
.dt-menu { position: relative; }
.dt-menu > summary { list-style: none; }
.dt-menu > summary::-webkit-details-marker { display: none; }
.dt-pop { position: absolute; z-index: 20; right: 0; top: calc(100% + 4px); min-width: 220px; max-width: min(320px, 90vw); max-height: 60vh; overflow: auto; padding: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.dt-pop .btn { justify-content: flex-start; width: 100%; }
.dt-filters { padding: 10px 0 0; border-top: 1px solid var(--line); }
.dt-fset { border: 0; padding: 0; margin: 0; min-width: 0; }
.dt-fset legend { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.dt-bulk { gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.dt-sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font: inherit; color: inherit; }
.dt-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
.dt-check { width: 32px; }
.dt-actions { white-space: nowrap; }
/* Listes (0.168.0, demande du propriétaire) : les actions d'une ligne restent sur une seule ligne horizontale, alignées
   à droite et centrées verticalement ; sur petit écran le tableau défile horizontalement (.table-wrap) au lieu
   d'empiler les boutons. Les pages qui portent un tableau utilisent toute la largeur disponible. */
.dt-actions .row, .table-wrap td:last-child > .row { flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
.dt-actions .row > select { width: auto; min-width: 0; }
.content:has(.dt-table, .table-wrap > table) { max-width: none; }
.dt-pager { gap: 8px; align-items: center; border-top: 1px solid var(--line); }
.dt-pager .field.row { gap: 6px; align-items: center; }
@media (max-width: 640px) { .dt-pop { right: auto; left: 0; } }
.dt-table .mono { white-space: nowrap; }

/* Encaissements (0.46.0) : étapes preuve → fonds confirmés → affecté → comptabilisé. */
.cash-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 8px; }
.cash-steps li { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cash-steps li.done { border-color: var(--primary); background: var(--surface-2); }
.cash-steps li[aria-current="step"] { box-shadow: inset 3px 0 0 var(--primary); }
.cash-steps li.off { opacity: .5; }
.strike { text-decoration: line-through; }

/* Espaces de travail par rôle et assistants à règles (0.49.0) */
a.chip { text-decoration: none; }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.ws-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin-bottom: 16px; min-width: 0; }
.ws-tiles .kpi .v { font-size: clamp(20px, 2vw, 26px); }
.assist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.assist-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; min-width: 0; background: var(--surface); }
.assist-subject { font-weight: 600; overflow-wrap: anywhere; }
.assist-evidence { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.assist-evidence li { display: flex; gap: 6px; align-items: flex-start; }
.assist-evidence li svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.assist-proposal { margin: 0; font-size: 13.5px; }
.assist-meter { display: inline-block; width: 72px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; vertical-align: middle; }
.assist-meter-bar { display: block; height: 100%; border-radius: 999px; background: var(--ink-3); }
.assist-meter-bar.hi { background: var(--ok); }
.assist-meter-bar.mid { background: var(--warn); }
.assist-meter-bar.lo { background: var(--ink-3); }
.assist-draft summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.assist-draft textarea { width: 100%; margin-top: 6px; font-size: 13px; }

/* État de préparation et avancement (0.50.0) */
.ready-kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); margin-bottom: 16px; min-width: 0; }
.ready-kpis .kpi { color: var(--ink); text-decoration: none; }
.ready-kpis .kpi.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.ready-kpis .kpi .v { font-size: clamp(20px, 2vw, 26px); }
.ready-table td { vertical-align: top; }
.ready-table .pill { white-space: normal; }
.public-page > main { margin: 32px auto; padding: 0 16px; }

/* 0.58.0 : versions de la politique de valorisation des temps */
.tp-item + .tp-item { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }

/* 0.61.0 : carte de visite numérique */
.bcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2, transparent); }
.card-public h1 { margin: 0; }
.card-public .lead { font-size: 17px; margin: 0; }

/* 0.62.0 : codes QR (toujours noir sur blanc, lisibles en thème sombre) */
.qr-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.qr-box svg { background: #fff; border-radius: 8px; padding: 4px; flex: none; max-width: 100%; height: auto; }

/* Mention du fournisseur (mission v3) : toujours visible, sobre, sur le portail et les écrans de connexion. */
.provided-by { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12px; color: var(--ink-4); min-width: 0; }
.provided-by strong { font-weight: 600; color: var(--ink-3); }
.provided-by a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.provided-by a:hover { color: var(--ink-2); }
.shell-foot { padding: 12px 24px 20px; max-width: 1360px; width: 100%; }
.auth-legal .provided-by { flex-basis: 100%; }
@media (max-width: 720px) { .shell-foot { padding: 12px 16px 20px; } .provided-by { justify-content: center; } }
.prov-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.prov-steps li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.prov-setup { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.prov-setup li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; min-width: 0; }
/* Pastilles à texte long (raison d'un réglage manquant) : elles reviennent à la ligne sur téléphone (0.199.1). */
.prov-setup li .pill { white-space: normal; max-width: 100%; min-width: 0; text-align: start; }
.prov-setup li .pill::before { flex: none; }

/* Entonnoir de la place de marché (0.99.0) : barres proportionnelles à la première étape, histogramme des visites. */
.fn-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fn-stage { display: grid; gap: 4px; min-width: 0; }
.fn-n { font-weight: 600; min-width: 4ch; text-align: right; }
.fn-bar.meter { display: block; width: 100%; height: .6rem; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 16px; }
.fn-days { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-top: 8px; }
.fn-days span { flex: 1 1 0; min-width: 2px; background: var(--series-1, #2563eb); border-radius: 2px 2px 0 0; }
.fn-grid { align-items: start; }
.fn-days span { max-width: 28px; }

/* ---------- Hire : tableau du pipeline (0.108.0) ---------- */
.hr-board { grid-template-columns: repeat(6, minmax(200px, 1fr)); }
.hr-col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hr-bcard[draggable="true"] { cursor: grab; }
.hr-bcard.dragging { opacity: .55; }
.hr-col.drop-ok { outline: 2px dashed var(--primary); outline-offset: -4px; }

/* ---------- Command Center : audience et recherche (0.112.0) ---------- */
.au-chart { margin: 0; display: grid; gap: 8px; }
.au-chart svg { width: 100%; height: 180px; display: block; }
.au-axis { stroke: var(--line); stroke-width: 1; }
.au-tick { fill: var(--ink-3); font-size: 11px; }
.au-l1, .au-l2 { fill: none; stroke-width: 2.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.au-l1 { stroke: var(--series-1); } .au-l2 { stroke: var(--series-2); }
.au-d1 { fill: var(--series-1); } .au-d2 { fill: var(--series-2); }
.au-key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin: 0 6px 0 12px; vertical-align: middle; }
.au-key:first-child { margin-left: 0; }
.au-k1 { background: var(--series-1); } .au-k2 { background: var(--series-2); }
.au-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.au-bars li { display: grid; gap: 4px; min-width: 0; }
.au-bars .grow { min-width: 0; overflow-wrap: anywhere; }
.au-share { min-width: 4.5em; text-align: right; }
.au-bars .meter { display: block; width: 100%; height: .5rem; margin: 0; }
.au-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* Hire — page carrières de l'employeur (0.118.0) : aperçu du logo et de la couleur d'accent dans la console. */
.hr-brand-prev { align-items: center; gap: 10px; }
.hr-brand-logo { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; box-sizing: border-box; }
.hr-swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; background: var(--sw); border: 1px solid var(--line); }
.hr-brand-about { white-space: pre-line; max-width: 72ch; }

/* CX 0.144.0 : texte saisi avec retours à la ligne (conditions, scripts, courriels). */
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* CX 0.145.0 : progression des objectifs et pastilles des types d'activité. */
.goal-bar { display: block; width: 100%; min-width: 6rem; height: 0.55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.goal-bar > i { display: block; height: 100%; background: var(--info); }
.goal-bar.reached > i { background: var(--ok); }
.goal-bar.behind > i { background: var(--warn); }
.dot-blue { color: var(--info); } .dot-green { color: var(--ok); } .dot-amber { color: var(--warn); } .dot-red { color: var(--bad); }
.dot-violet { color: #7c3aed; } .dot-teal { color: #0f766e; } .dot-grey { color: var(--line-2); }
@media (forced-colors: active) { .goal-bar > i { background: Highlight; } }

/* CX 0.146.0 : opportunités par date de clôture, segments en liens. */
.seg a { padding: 5px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-decoration: none; }
.seg a[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.closing-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 12px; align-items: start; }
.closing-col { min-width: 0; }
.closing-col.overdue { border-color: var(--bad); }
.closing-col.none { border-style: dashed; }
/* CX 0.147.0 : cases à cocher en ligne des formulaires de rédaction et de modèles. */
label.check { display: flex; gap: 0.5rem; align-items: center; font-size: 0.9rem; }
.tpl-body { white-space: pre-line; max-height: 6.5em; overflow: hidden; }
/* Reprise noCRM (0.149.0) : bilan à blanc. */
.nc-stats .stat { display: grid; gap: 0.15rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.nc-stats .stat strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- référentiels CafonApp (0.160.0) : base, toutes interfaces */
.fw-trame { --fw: #3f4fd8; --fw-g: linear-gradient(100deg, #3149d8, #6d5cf6 52%, #b4400c); }
.fw-chaine { --fw: #0b7f8f; --fw-g: linear-gradient(100deg, #0b7f8f, #b4400c 52%, #8a5a12); }
.fw-metier { --fw: #0b7a60; --fw-g: linear-gradient(100deg, #6d5cf6, #0b7a60 52%, #8a5a12); }
.fw-patron { --fw: #8a5a12; --fw-g: linear-gradient(100deg, #3149d8, #0b7a60 52%, #8a5a12); }
.fw-navette { --fw: #b0386e; --fw-g: linear-gradient(100deg, #6d5cf6, #b4400c 52%, #b0386e); }
.fw-lisiere { --fw: #6d5cf6; --fw-g: linear-gradient(100deg, #3149d8, #0b7a60 52%, #b0386e); }
.nav a.nav-fw, .nav-fw { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px 4px; text-decoration: none; }
.nav-fw-name { font-weight: 800; letter-spacing: .04em; color: var(--fw, var(--ink-2)); }
.nav-fw-span { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.crumb-fw { font-weight: 700; color: var(--fw, var(--ink-3)) !important; }
/* Tableau des référentiels : colonnes à hauteur libre (chaque panneau prend la hauteur de ses modules, le suivant se place
   dessous), dans l'ordre TRAME, CHAÎNE, MÉTIER, PATRON, NAVETTE, LISIÈRE. */
.fw-board { display: grid; grid-template-columns: repeat(var(--fw-cols, 1), minmax(0, 1fr)); gap: 16px; align-items: start; }
.fw-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 80px; border-radius: 16px; }
.fw-board.dragging .fw-col { outline: 1px dashed var(--line-2); outline-offset: 4px; }
.fw-board.dragging .fw-col.over { outline-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, transparent); }
.fw-panel-top { display: flex; align-items: flex-start; gap: 8px; }
.fw-panel-top .fw-panel-head { flex: 1; min-width: 0; }
.fw-grip { flex: none; cursor: grab; touch-action: none; user-select: none; color: var(--ink-3); border-radius: 8px; }
.fw-grip:hover { color: var(--ink); background: var(--surface-3); }
.fw-panel.lifted { position: fixed !important; z-index: 60; margin: 0; pointer-events: none; box-shadow: var(--shadow-pop); transform: rotate(.6deg); opacity: .96; }
.fw-ghost { border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--line)); border-radius: 16px; background: color-mix(in srgb, var(--primary) 5%, transparent); }
.fw-board-tools { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -4px 0 8px; }
body.fw-dragging { cursor: grabbing; user-select: none; }
@media (prefers-reduced-motion: reduce) { .fw-panel.lifted { transform: none; } }
.fw-panel { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.fw-panel:not(.fw-other) { background: color-mix(in srgb, var(--fw) 5%, var(--surface)); border-color: color-mix(in srgb, var(--fw) 22%, var(--line)); }
/* Menu : chaque référentiel est un bloc teinté de sa couleur. */
.nav-group.fw { margin: 6px 0; padding: 4px 4px 6px; border-radius: 12px; background: color-mix(in srgb, var(--fw) 7%, transparent); border: 1px solid color-mix(in srgb, var(--fw) 14%, transparent); }
.fw-panel.fw-other { margin-top: 16px; }
.fw-panel-head { display: flex; flex-direction: column; gap: 2px; }
.fw-panel-name { font-size: 18px; font-weight: 800; letter-spacing: .02em; color: var(--fw, var(--ink)); text-decoration: none; width: fit-content; }
.fw-panel-span { font-weight: 600; color: var(--ink); }
.doc-view-toggle { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.doc-view-toggle .seg { display: inline-flex; }
.doc-view-toggle .seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.doc-table { margin-bottom: 16px; }
.doc-table .grid-table { font-size: 13.5px; }
.doc-table .grid-table th, .doc-table .grid-table td { white-space: nowrap; padding: 8px 10px; }
.doc-table .grid-table td:nth-child(9) { white-space: normal; min-width: 120px; }
.doc-table .grid-table tfoot th { text-align: left; background: transparent; }
.doc-table .grid-table td:nth-child(2) { white-space: normal; min-width: 200px; }
.doc-table .grid-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2, var(--surface)); }
.doc-table .grid-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2, #f6f7f9) 60%, transparent); }
.doc-table .grid-table tfoot th, .doc-table .grid-table tfoot td { border-top: 2px solid var(--line-2, var(--line)); font-weight: 700; }
.doc-table-foot { padding: 10px 14px; border-top: 1px solid var(--line); }
@media print { .doc-view-toggle { display: none; } }

/* 0.162.0 — apparence : ambiance (sept choix) et police d'écran */
.menu.appear { width: 340px; padding: 12px; }
.appear-h { margin: 4px 4px 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.appear-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.appear-theme { all: unset; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 12px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; }
.appear-theme:hover { background: var(--surface-3); }
.appear-theme[aria-checked="true"] { background: var(--primary-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--primary); }
.appear-theme:focus-visible, .appear-font:focus-visible { outline: var(--focus); outline-offset: 2px; }
.appear-sw { position: relative; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); display: block; }
.appear-sw i, .appear-sw b { position: absolute; left: 0; right: 0; display: block; }
.appear-sw i { top: 0; height: 55%; }
.appear-sw b { bottom: 0; height: 45%; }
.appear-sw::after { content: ""; position: absolute; left: 50%; top: 34%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--sw-dot); }
.sw-auto i { background: linear-gradient(90deg, #f6f5f1 50%, #1d1d1b 50%); } .sw-auto b { background: linear-gradient(90deg, #fdfcfa 50%, #32312e 50%); } .sw-auto { --sw-dot: #0f6e68; }
.sw-light i { background: #f1efe9; } .sw-light b { background: #fdfcfa; } .sw-light { --sw-dot: #0f6e68; }
.sw-dark i { background: #1d1d1b; } .sw-dark b { background: #32312e; } .sw-dark { --sw-dot: #5fc2b6; }
.sw-indigo i { background: #f6f7fb; } .sw-indigo b { background: #fff; } .sw-indigo { --sw-dot: #3149d8; }
.sw-indigo_nuit i { background: #0b0e16; } .sw-indigo_nuit b { background: #1d2336; } .sw-indigo_nuit { --sw-dot: #8fa0ff; }
.sw-papier i { background: #f4f1ea; } .sw-papier b { background: #fdfbf7; } .sw-papier { --sw-dot: #c98a1b; }
.sw-brume i { background: #e8ecf2; } .sw-brume b { background: #fbfcfd; } .sw-brume { --sw-dot: #1f5fbf; }
.sw-sauge i { background: #ebe8e0; } .sw-sauge b { background: #fcfbf8; } .sw-sauge { --sw-dot: #39594d; }
.sw-ardoise i { background: #1c2128; } .sw-ardoise b { background: #2d333b; } .sw-ardoise { --sw-dot: #adbac7; }
.sw-marine i { background: #0a1628; } .sw-marine b { background: #182c4a; } .sw-marine { --sw-dot: #7cb2ff; }
.sw-visio i { background: #eef0f4; } .sw-visio b { background: #ffffff; } .sw-visio { --sw-dot: #0e4fd8; }
.sw-visio_nuit i { background: #1a1a1a; } .sw-visio_nuit b { background: #2b2b2b; } .sw-visio_nuit { --sw-dot: #4d8dff; }
.sw-ivoire i { background: #f0eee7; } .sw-ivoire b { background: #fbfaf7; } .sw-ivoire { --sw-dot: #a34e30; }
.sw-ivoire_nuit i { background: #262624; } .sw-ivoire_nuit b { background: #3a3936; } .sw-ivoire_nuit { --sw-dot: #d98a66; }
.sw-lancement i { background: #f6f3f0; } .sw-lancement b { background: #ffffff; } .sw-lancement { --sw-dot: #b9460c; }
.sw-lancement_nuit i { background: #120d0b; } .sw-lancement_nuit b { background: #241a16; } .sw-lancement_nuit { --sw-dot: #ff6a40; }
.appear-fonts { display: grid; gap: 4px; }
.appear-font { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.appear-font:hover { background: var(--surface-3); }
.appear-font[aria-checked="true"] { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.appear-aa { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 18px; font-weight: 600; }
.ff-inter { font-family: "CA Inter", sans-serif; } .ff-plex { font-family: "CA Text", sans-serif; } .ff-atkinson { font-family: "CA Hyperlegible", sans-serif; }
@media (max-width: 480px) { .menu.appear { position: fixed; left: 8px; right: 8px; top: 60px; width: auto; } }
@media (forced-colors: active) { .appear-theme[aria-checked="true"], .appear-font[aria-checked="true"] { outline: 2px solid Highlight; } }

/* Cafona Academy dans CafonApp (0.164.0, #/academie) : lecteur guidé des administrateurs d'un espace. */
.acad-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
.acad-side { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 76px; min-width: 0; }
.acad-side progress, .acad-timer progress { width: 100%; height: 8px; accent-color: var(--primary); }
.acad-award { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.acad-main { min-width: 0; }
.acad-hero h2, .acad-reader h2 { margin: 4px 0 10px; }
.acad-mods { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 8px; }
.acad-mod { display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 56px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.acad-mod:hover { border-color: var(--primary); }
.acad-mod.ok { border-color: #bbf7d0; }
.acad-mod strong, .acad-mod small { display: block; }
.acad-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.acad-mod.ok .acad-dot { background: var(--ok, #16a34a); border-color: var(--ok, #16a34a); }
.acad-text { max-width: 70ch; font-size: 17px; line-height: 1.75; }
.acad-text p { margin: 0; }
.acad-check { margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--surface-2, #f8fafc); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.acad-check fieldset, .acad-q { border: 0; margin: 0; padding: 0; }
.acad-check legend, .acad-q legend { font-weight: 700; margin-bottom: 6px; }
.acad-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; min-height: 44px; cursor: pointer; }
.acad-opt:hover { background: var(--surface, #fff); }
.acad-opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.acad-timer { display: flex; align-items: center; gap: 12px; }
.acad-timer small { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .acad-layout { grid-template-columns: minmax(0, 1fr); } .acad-side { position: static; order: 1; } }
/* Livre du cours (0.173.0) : sommaire et pages ; blocs communs (.mka-*) rendus par public/js/lib/academy-book.mjs. */
.acad-bookgrid { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; margin-top: 8px; }
.acad-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.acad-toc button { display: flex; gap: 10px; align-items: flex-start; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.acad-toc button:hover { background: var(--surface-2, #f1f5f9); }
.acad-toc li.on button { background: var(--primary-soft, #eef4ff); font-weight: 700; }
.acad-num { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3, #e2e8f0); font-size: 11.5px; font-weight: 700; }
.acad-toc li.ok .acad-num { background: #dcfce7; color: #166534; }
.acad-page { max-width: 760px; }
.acad-page > * + * { margin-top: 14px; }
.acad-ok { margin-top: 18px; padding: 10px 14px; border-radius: 10px; background: #f0fdf4; color: #166534; font-weight: 600; }
.acad-turn { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.mka-h { margin: 18px 0 0; font-size: 16px; }
.mka-ul, .mka-ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.mka-fig { margin: 16px 0; }
.mka-fig a { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.mka-fig img { display: block; width: 100%; height: auto; }
.mka-fig figcaption { margin-top: 6px; font-size: 13px; color: var(--ink-3, #64748b); }
.mka-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2, #f8fafc); }
.mka-link span { flex: 1 1 100%; font-weight: 700; }
.mka-link code { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mka-copy { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, #fff); color: var(--primary); font: inherit; font-size: 13px; cursor: pointer; }
.mka-tip, .mka-warn { padding: 10px 14px; border-radius: 10px; }
.mka-tip { background: #f0fdf4; border-left: 4px solid #16a34a; }
.mka-warn { background: #fff7ed; border-left: 4px solid #ea580c; }
.mka-kv { width: 100%; border-collapse: collapse; }
.mka-kv th, .mka-kv td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mka-kv th { width: 34%; }
:root[data-theme="dark"] .mka-tip, :root[data-theme="dark"] .acad-ok { background: rgba(22, 163, 74, .14); color: inherit; }
:root[data-theme="dark"] .mka-warn { background: rgba(234, 88, 12, .14); }
:root[data-theme="dark"] .acad-toc li.ok .acad-num { background: rgba(22, 163, 74, .3); color: inherit; }
@media (max-width: 860px) { .acad-bookgrid { grid-template-columns: minmax(0, 1fr); } .acad-toc ol { flex-direction: row; overflow-x: auto; } .acad-toc li { flex: none; } .acad-toc button > span:last-child { display: none; } }

/* Devis intelligent (0.169.0) : composeur à deux colonnes (lignes, résumé collant), cartes de ligne par nature,
   sections avec sous-total, choix de la TVA en segments. Sur petit écran le résumé passe sous les lignes. */
.qc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 20px; align-items: start; }
.qc-main, .qc-aside { min-width: 0; }
.qc-aside { position: sticky; top: 76px; }
.qc-sum .btn.primary { width: 100%; justify-content: center; min-height: 44px; }
.qc-next { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qc-add .btn { min-height: 36px; }
.qc-section { display: grid; gap: 10px; }
.qc-section > header h4 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.ql-card { border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--surface); padding: 12px 14px; display: grid; gap: 10px; min-width: 0; }
.ql-card[data-kind="hardware"] { border-left: 3px solid #3d5afe; } .ql-card[data-kind="software"] { border-left: 3px solid #7c4dff; }
.ql-card[data-kind="licence"] { border-left: 3px solid #b5651d; } .ql-card[data-kind="saas"] { border-left: 3px solid #0b7a75; }
.ql-card[data-kind="service"] { border-left: 3px solid #2e7d32; } .ql-card[data-kind="training"] { border-left: 3px solid #ad1457; }
.ql-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ql-kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.ql-kind-sel { width: auto; max-width: 160px; min-height: 32px; font-size: 13px; }
.ql-total { font-size: 15px; }
.ql-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px 10px; }
.ql-grid .ql-wide { grid-column: span 2; }
@media (max-width: 520px) { .ql-grid .ql-wide { grid-column: auto; } }
.ql-details { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px 10px; margin: 0; min-width: 0; }
.ql-details legend { font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 0 4px; }
.ql-desc summary { cursor: pointer; font-size: 13px; color: var(--ink-3); min-height: 32px; display: flex; align-items: center; }
.ql-desc textarea { width: 100%; }
#qc-tax .seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; min-height: 36px; }
#qc-tax .seg-opt input { margin: 0; }
#qc-tax .seg-opt:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
#qc-tax .seg-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.qc-rec { border-top: 1px solid var(--line); padding-top: 8px; }
.doc-section { display: grid; gap: 6px; }
.doc-section h4 { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 1100px) { .qc { grid-template-columns: minmax(0, 1fr); } .qc-aside { position: static; } }

/* Espace du dossier et bande de chaîne (0.186.0) : cinq étapes, anneau d'avancement, défilement sur téléphone. */
.deal-chain { margin: 0 0 16px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.dc-steps { list-style: none; margin: 0; padding: 4px 2px; display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 8px; min-width: min-content; }
.dc-step { position: relative; min-width: 0; scroll-snap-align: center; }
.dc-step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -8px; width: 8px; height: 2px; background: var(--line-2); }
.dc-step.is-done:not(:last-child)::after { background: var(--ok); }
.dc-link { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.dc-link:hover { border-color: var(--line-2); }
a.dc-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.dc-step.is-todo .dc-link { background: transparent; border-style: dashed; color: var(--ink-3); }
.dc-step.is-current .dc-link { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.dc-step.is-open .dc-link { background: var(--primary-soft); }
.dc-step.is-stopped .dc-link { border-color: var(--bad); }
.dc-ring { position: relative; flex: none; width: 40px; height: 40px; }
.dc-ring svg { display: block; }
.dc-track { fill: none; stroke: var(--line); stroke-width: 3; }
.dc-fill { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .4s ease; }
.dc-step.is-done .dc-fill { stroke: var(--ok); }
.dc-step.is-stopped .dc-fill { stroke: var(--bad); }
.dc-ic { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); }
.dc-step.is-done .dc-ic { color: var(--ok); }
.dc-text { display: grid; gap: 1px; min-width: 0; line-height: 1.25; }
.dc-name { font-weight: 700; font-size: 13px; }
.dc-ref { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-meta, .dc-more { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.deal-piece { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2, var(--surface)); min-width: 0; }
@media (max-width: 720px) { .dc-steps { grid-template-columns: repeat(5, 72%); } .deal-piece { padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .dc-fill { transition: none; } }
@media (forced-colors: active) { .dc-step.is-current .dc-link { outline: 2px solid CanvasText; } .dc-fill { stroke: Highlight; } }

/* Barre d'étapes de TRAME et de CHAÎNE (D45) : un sous-module par tuile, flèche vers le suivant, couleur du référentiel
   (--fw), état par compteur (attention, retard), tuile grisée sans droit ; liste verticale sur téléphone. */
.flow-host { margin: 0 0 18px; min-width: 0; }
.flow-host[aria-busy="true"] { min-height: 96px; }
.flow-bar { border: 1px solid var(--line); border-top: 3px solid var(--fw, var(--primary)); border-radius: 14px; background: var(--surface); padding: 10px 12px 12px; min-width: 0; }
.fb-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin: 0 2px 8px; }
.fb-title { font-weight: 700; font-size: 13px; color: var(--fw, var(--primary)); text-decoration: none; }
.fb-exit { font-size: 12px; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.fb-title:hover, .fb-exit:hover { text-decoration: underline; }
.fb-steps { list-style: none; margin: 0; padding: 2px; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.fb-step { position: relative; display: flex; align-items: stretch; flex: 1 1 0; min-width: 132px; scroll-snap-align: center; }
/* Tuile : icône et numéro sur la première ligne, puis le nom et les compteurs sur toute la largeur (pas de mot coupé). */
.fb-link { flex: 1; display: grid; grid-template-columns: auto 1fr; align-content: start; align-items: center; column-gap: 8px; row-gap: 3px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, var(--surface)); color: var(--ink); text-decoration: none; }
.fb-text { display: contents; }
.fb-text > .fb-name, .fb-text > .fb-counts { grid-column: 1 / -1; }
a.fb-link:hover { border-color: var(--fw, var(--line-2)); }
a.fb-link:focus-visible { outline: 3px solid var(--fw, var(--primary)); outline-offset: 2px; }
.fb-arrow { flex: none; align-self: center; display: grid; place-items: center; width: 18px; color: var(--ink-3); }
.fb-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface); color: var(--fw, var(--primary)); border: 1px solid var(--line); }
.fb-link { line-height: 1.25; }
.fb-n { font: 600 10px/1 var(--mono, ui-monospace, monospace); letter-spacing: .04em; color: var(--ink-3); }
.fb-name { font-weight: 700; font-size: 13px; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.fb-counts { display: grid; gap: 1px; }
.fb-c { font-size: 12px; color: var(--ink-2); overflow-wrap: break-word; hyphens: auto; }
.fb-c.tone-warn { color: var(--warn); font-weight: 600; }
.fb-c.tone-bad { color: var(--bad, #b42318); font-weight: 600; }
.fb-c.tone-ok { color: var(--ink-3); }
.fb-amt { font-weight: 400; color: var(--ink-3); }
.fb-step.is-warn .fb-link { border-color: color-mix(in srgb, var(--warn, #b7791f) 45%, var(--line)); }
.fb-step.is-bad .fb-link { border-color: color-mix(in srgb, var(--bad, #b42318) 55%, var(--line)); }
.fb-step.is-current .fb-link { border-color: var(--fw, var(--primary)); box-shadow: 0 0 0 1px var(--fw, var(--primary)); }
.fb-step.is-muted .fb-link { background: transparent; border-style: dashed; color: var(--ink-3); }
.fb-step.is-muted .fb-ic { color: var(--ink-3); }
.flow-next { white-space: normal; }
@media (max-width: 720px) {
  .fb-steps { flex-direction: column; overflow: visible; gap: 0; }
  .fb-step { flex-direction: column; min-width: 0; }
  .fb-arrow { transform: rotate(90deg); height: 16px; width: auto; }
}
@media (forced-colors: active) { .fb-step.is-current .fb-link { outline: 2px solid CanvasText; } }
/* Score des leads (vague 3 de D45) : explication critère par critère, éditeur des règles. */
.ls-parts { display: grid; gap: 4px; }
.ls-parts > .ls-part { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 6px; align-items: baseline; color: var(--ink-3); padding: 0; border: 0; }
.ls-parts > .ls-part.is-met { color: var(--ink); }
.ls-parts .ls-ic { align-self: center; display: inline-grid; }
.ls-parts strong { justify-self: end; font-variant-numeric: tabular-nums; }
.lead-top li { align-items: baseline; }
.ls-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.ls-row .field { flex: 1 1 130px; min-width: 0; margin: 0; }
/* Barre d'étapes d'une affaire (vague 3 de D45) : T4 → T8 sur la fiche de l'opportunité. */
.deal-flow { margin: 0 0 14px; padding: 8px 10px 10px; }
.deal-flow .fb-step { min-width: 124px; }
.deal-flow .fb-link { padding: 6px 8px; }
.fb-step.is-deal-done .fb-ic { color: var(--ok, #157f3b); border-color: color-mix(in srgb, var(--ok, #157f3b) 40%, var(--line)); }
.fb-step.is-deal-skipped .fb-link, .fb-step.is-deal-stopped .fb-link { background: transparent; border-style: dashed; color: var(--ink-3); }
.fb-step.is-deal-skipped .fb-ic, .fb-step.is-deal-stopped .fb-ic { color: var(--ink-3); }
@media (max-width: 720px) {
  .deal-flow .fb-steps { flex-direction: row; overflow-x: auto; }
  .deal-flow .fb-step { flex-direction: row; min-width: 148px; }
  .deal-flow .fb-arrow { transform: none; height: auto; width: 14px; }
}

/* Éditeur de devis en vue scindée (0.186.0) : garde-fous et aperçu vivant de la page. */
.qc-aside { display: grid; gap: 14px; max-height: calc(100vh - 92px); overflow: auto; }
.qc-guard { display: grid; gap: 6px; padding: 12px 14px; }
.qc-guard-row { gap: 8px; align-items: center; }
.qc-guard-h { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 0 0; font-size: 14px; }
.qc-gchip { display: inline-flex; align-items: flex-start; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 13px; background: var(--surface-3); color: var(--ink-2); }
.qc-gchip.ok { background: var(--ok-soft); color: var(--ok); }
.qc-gchip.bad { background: var(--bad-soft); color: var(--bad); }
.qc-gchip.warn { background: var(--warn-soft); color: var(--warn); }
.qc-gchip.info { background: var(--info-soft); color: var(--info); }
.qc-guard-note { margin: 0; color: var(--ink-3); }
.qc-guard-note.is-warn { color: var(--warn); font-weight: 600; }
.qc-preview > summary { display: flex; gap: 8px; align-items: baseline; cursor: pointer; font-weight: 700; padding: 4px 2px 8px; list-style: none; }
.qc-preview > summary::-webkit-details-marker { display: none; }
.qc-paper-wrap { padding: 4px; }
.qc-paper { background: #fff; color: #1b2430; border: 1px solid var(--line); border-radius: 6px; padding: 18px 18px 14px; font-size: 11.5px; line-height: 1.45; box-shadow: 0 10px 28px rgba(15, 23, 42, .12); aspect-ratio: auto; min-height: 380px; }
.qp-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 3px solid #1d4294; }
.qp-issuer { font-size: 12.5px; }
.qp-title { display: grid; justify-items: end; text-align: right; }
.qp-title > span:first-child { font-size: 16px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #1d4294; }
.qp-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.qp-k { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: #5c6877; }
.qp-sec h5 { margin: 8px 0 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #1d4294; }
.qp-sec table { width: 100%; border-collapse: collapse; }
.qp-sec td { padding: 4px 0; border-bottom: 1px solid #e3e6eb; vertical-align: top; }
.qp-sec td.num { text-align: right; white-space: nowrap; padding-left: 8px; }
.qp-sub { display: block; color: #5c6877; font-size: 10.5px; }
.qp-tot { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 10px 0 0 30%; }
.qp-tot dd { margin: 0; text-align: right; white-space: nowrap; }
.qp-grand { font-weight: 800; font-size: 13px; border-top: 2px solid #1b2430; padding-top: 4px; }
.qp-words { margin: 10px 0 0; padding: 8px; background: #f3f5f8; border-radius: 4px; }
.qp-cond { margin: 8px 0 0; color: #5c6877; font-size: 10px; white-space: pre-line; }
.qp-empty { color: #5c6877; }
.qc-keys { display: block; }
@media (max-width: 1100px) { .qc-aside { max-height: none; overflow: visible; } }
@media (forced-colors: active) { .qc-paper { background: Canvas; color: CanvasText; } }

/* Studio des pièces (0.186.0) : réglages à gauche, page d'exemple dessinée à droite. */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 520px); gap: 20px; align-items: start; }
.studio-settings { min-width: 0; }
.studio-preview { position: sticky; top: 76px; display: grid; gap: 8px; min-width: 0; max-height: calc(100vh - 92px); overflow-y: auto; overflow-x: hidden; }
.studio-preview > * { min-width: 0; }
.st-controls { gap: 8px; align-items: center; }
.st-controls h3 { margin: 0; }
.st-controls select { min-height: 36px; width: auto; max-width: 100%; }
.st-stage { padding: 4px; }
.st-sheet { background: #fff; color: #172338; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgba(15, 23, 42, .12); min-height: 420px; overflow: hidden; }
.st-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.st-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-height: 44px; }
.st-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.st-swatch:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.st-swatch:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.st-chip { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); flex: none; }
/* Page dessinée à partir du modèle du PDF v4 (ui/doc-sheet.js, design de Cafona CPQ). */
.ds { --ink: var(--ds-ink, #1F1E1C); --a: var(--ds-accent, #1d4294); width: 760px; font-size: 10.5px; line-height: 1.38; padding: 22px 26px 16px; color: #1F1E1C; background: var(--ds-paper, #fff); }
.ds .mono { font-family: var(--f-mono, ui-monospace, Menlo, monospace); }
.ds-lab { display: block; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #8A867D; }
.ds-k { color: #8A867D; margin-right: 6px; }
.ds-muted { display: block; color: #6E6A62; font-size: 9.5px; }
.ds-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.ds-logo img { max-width: 260px; max-height: 70px; display: block; }
.ds-logo strong { font-size: 21px; color: var(--ink); }
.ds-title { display: grid; justify-items: end; text-align: right; gap: 3px; }
.ds-title h4 { margin: 0; font-size: 25px; color: var(--ink); line-height: 1.1; }
.ds-no { background: #F3F2EE; border-left: 3px solid var(--a); padding: 2px 8px; font-size: 11px; }
.ds-hero { font-size: 17px; color: var(--ink); }
.ds-banner { margin: 12px 0 0; padding: 6px 10px; border-left: 3px solid var(--a); background: color-mix(in srgb, var(--a) 10%, #fff); font-weight: 600; }
.ds-banner.bad { border-left-color: #b42318; background: #fdecea; color: #7a1a12; }
.ds-cards { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); border: 1px solid #D9D6CE; border-radius: 7px; margin-top: 14px; }
.ds-card { padding: 12px; display: grid; gap: 1px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.ds-card + .ds-card { border-left: 1px solid #D9D6CE; }
.ds-card > .ds-lab { color: var(--ink); margin-bottom: 6px; } .ds-card > .ds-lab::before { content: ""; display: inline-block; width: 10px; height: 2px; background: var(--a); margin-right: 6px; vertical-align: middle; }
.ds-name { font-size: 12px; } .ds-id { color: #8A867D; font-size: 9px; }
.ds-block + .ds-block { border-top: 1px dashed #D9D6CE; margin-top: 6px; padding-top: 6px; } .ds-block { display: grid; }
.ds-meta { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); background: #F6F5F1; border-radius: 5px; margin: 12px 0 0; padding: 8px 0; }
.ds-meta > div { padding: 0 11px; min-width: 0; } .ds-meta > div + div { border-left: 1px solid #E8E6E0; }
.ds-meta dt { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #8A867D; } .ds-meta dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.ds-trail { display: flex; list-style: none; margin: 16px 0 0; padding: 0; }
.ds-trail li { flex: 1; display: grid; justify-items: center; text-align: center; gap: 1px; position: relative; min-width: 0; }
.ds-trail li::before { content: ""; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: #E3E1DB; } .ds-trail li:first-child::before { display: none; }
.ds-trail li.done::before, .ds-trail li.current::before { background: var(--a); }
.ds-trail i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #CFCBC2; background: #fff; position: relative; z-index: 1; box-sizing: border-box; }
.ds-trail li.done i { background: var(--a); border-color: var(--a); } .ds-trail li.current i { border: 3px solid var(--ink); box-shadow: 0 0 0 3px #F3F2EE; }
.ds-trail li.todo .mono, .ds-trail li.todo .ds-muted { color: #B5B1A8; }
.ds-lines { width: 100%; border-collapse: collapse; margin-top: 16px; table-layout: fixed; }
.ds-lines th { background: var(--ink); color: #fff; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; padding: 7px 6px; text-align: left; }
.ds-lines td { padding: 7px 6px; border-bottom: 1px solid #E8E6E0; vertical-align: top; overflow-wrap: anywhere; }
.ds-lines .num { text-align: right; } .ds-lines .c { text-align: center; } .ds-lines td.mono { color: #6E6A62; font-size: 9px; } .ds-lines .b { font-weight: 700; }
.ds-lines td strong { display: block; } .ds-tag { display: block; color: var(--a); font-size: 8.5px; font-weight: 700; }
.ds-sec td { background: #F3F2EE; color: var(--ink); font-weight: 700; font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; padding: 5px 6px; }
.ds-box { display: inline-block; width: 10px; height: 10px; border: 1px solid #8A867D; border-radius: 2px; }
.ds-rec { display: grid; grid-auto-flow: column; border: 1px solid #E8E6E0; border-left: 3px solid var(--a); border-radius: 5px; margin: 14px 0 0; padding: 8px 12px; gap: 12px; } .ds-rec dt { font-size: 8px; text-transform: uppercase; letter-spacing: .09em; color: #8A867D; font-weight: 700; } .ds-rec dd { margin: 0; font-weight: 700; }
.ds-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; margin-top: 16px; }
.ds-words { margin: 0 0 10px; padding-left: 10px; border-left: 3px solid var(--a); font-weight: 500; }
.ds-boxp { background: #F6F5F1; border-radius: 5px; padding: 9px 11px; margin-bottom: 8px; } .ds-boxp p { margin: 2px 0 0; } .ds-boxp .b { font-weight: 700; }
.ds-totals { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 0; } .ds-totals dd { margin: 0; text-align: right; white-space: nowrap; }
.ds-totals dt.b { border-top: 1px solid #1F1E1C; padding-top: 4px; } .ds-totals dd.b { border-top: 1px solid #1F1E1C; padding-top: 4px; } .ds-totals .b { font-weight: 700; }
.ds-due { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 0; padding: 9px 12px; border-radius: 5px; background: var(--ink); color: #fff; }
.ds-due span { font-size: 8px; text-transform: uppercase; letter-spacing: .09em; opacity: .8; font-weight: 700; } .ds-due strong { font-size: 17px; white-space: nowrap; }
.ds-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.ds-sig { border: 1px solid #D9D6CE; border-radius: 5px; padding: 10px; display: grid; gap: 4px; min-height: 96px; align-content: start; } .ds-sig > .ds-lab { color: var(--ink); }
.ds-sig em { font-style: normal; font-size: 19px; color: var(--ink); } .ds-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.ds-fields span { border-bottom: 1px solid #8A867D; padding-top: 10px; font-size: 8px; color: #8A867D; } .ds-fields span:last-child { grid-column: 1 / -1; }
.ds-terms { margin-top: 14px; } .ds-terms p { margin: 2px 0 0; white-space: pre-line; color: #6E6A62; font-size: 9.5px; }
.ds-foot { display: grid; gap: 2px; margin-top: 18px; padding-top: 8px; border-top: 1px solid #E8E6E0; font-size: 9.5px; }
@media (max-width: 1100px) { .studio { grid-template-columns: minmax(0, 1fr); } .studio-preview { position: static; max-height: none; } }
@media (forced-colors: active) { .st-sheet, .ds { background: Canvas; color: CanvasText; } .ds-due, .ds-lines th, .ds-trail i { forced-color-adjust: none; } }

/* Achats (0.193.0) : comparaison des demandes de prix — en-têtes de fournisseurs sur plusieurs lignes, colonnes lisibles. */
.data-table.pur-cmp th { white-space: normal; vertical-align: bottom; min-width: 8.5rem; }
.data-table.pur-cmp th:first-child, .data-table.pur-cmp td:first-child { min-width: 13rem; }
.data-table.pur-cmp td:first-child .block { margin-top: .35rem; }
.data-table.pur-cmp td:first-child { white-space: normal; max-width: 18rem; }
.data-table.pur-cmp td:first-child .pill { white-space: normal; height: auto; }
@media (max-width: 640px) { .data-table.pur-cmp th:first-child, .data-table.pur-cmp td:first-child { min-width: 8.5rem; max-width: 10rem; } .data-table.pur-cmp th { min-width: 6.5rem; } }
/* Économie du dossier (0.196.0) : groupes recettes / coûts / marges en lignes libellé–montant qui se replient. */
.eco { padding: 0 16px 8px; }
.eco .eco-group { margin: 14px 0 4px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.eco dl { margin: 0; }
.eco-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 7px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.eco-row dt { flex: 1 1 11rem; min-width: 0; font-size: .875rem; }
.eco-row dd { margin: 0; flex: none; margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eco-margin.bad dd { color: var(--bad); }
/* Règles de prix (0.197.0) : une règle par bloc, conditions en pastilles, actions du vendeur sous la bande. */
.plain-list > li.prule-row.entry, :root[data-ui] .plain-list > li.prule-row.entry { display: block; padding: 10px 0; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.prule-row > * + * { margin-top: 6px; }
.prule-row.is-off { opacity: .7; }
.prule-c { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--surface-2, rgba(0,0,0,.05)); margin: 2px 0; }
.prule-cond { align-items: flex-end; }
.qc-rule-acts { gap: 8px; margin-top: 8px; }
.qc-rule-acts .btn { white-space: normal; text-align: left; max-width: 100%; height: auto; min-height: 44px; }

/* 0.198.0 — graphiques à l'échelle de l'écran : un SVG étiré sur toute la largeur grossissait ses textes à faible zoom
   (25 %) ou sur grand écran ; la hauteur est bornée (le dessin reste centré), les textes gardent la taille de l'interface. */
.bud-chart, .chart, .chart-box svg, .dash-line { max-block-size: 380px; margin-inline: auto; }

/* Argent fluide (vague 4 de D45) : position de trésorerie et bureau des commandes. Barre de tendance en couleur de
   série validée (--series-1), jamais une nouvelle couleur. */
.cashpos-cur { font-size: 1.1rem; margin: .5rem 0 0; }
.cashpos-barcell { width: 28%; min-width: 80px; }
.cashpos-bar { display: block; height: .6rem; width: var(--w, 0%); min-width: 2px; border-radius: 3px; background: var(--series-1, #3149d8); }
.desk-grid { align-items: start; margin-bottom: var(--gap, 1rem); }
@media (min-width: 1100px) { .desk-grid.grid.g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.desk-grid > section { min-width: 0; }
@media (forced-colors: active) { .cashpos-bar { background: CanvasText; } }

/* ---------------------------------------------------------------- Cafona Plus (D46) : assistant, réunions */
.asst-open { gap: 6px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.asst-open:hover { border-color: var(--primary); color: var(--primary); }
.asst-mark { display: inline-grid; place-items: center; color: var(--primary); font-size: 15px; line-height: 1; }
.asst-mark.lg { inline-size: 36px; block-size: 36px; border-radius: 12px; background: var(--primary-soft); font-size: 20px; flex: none; }
dialog.sheet.asst { inline-size: min(560px, 100vw); display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 24px; }
dialog.sheet.asst > * { flex-shrink: 0; }
dialog.sheet.asst > form { min-height: 0; padding: 0; }
dialog.sheet.asst:not([open]) { display: none; }
.asst-head { display: flex; align-items: center; gap: 12px; padding-inline-end: 40px; }
.asst-head h3 { margin: 0; }
.asst-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asst-chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; min-block-size: 32px; }
.asst-chips .chip:hover, .asst-chips .chip:focus-visible { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.asst-actions { align-items: center; }
.asst-mic { touch-action: none; user-select: none; }
.asst-mic.rec { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.asst-mic.rec .ic { animation: asst-pulse 1s ease-in-out infinite; }
@keyframes asst-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .asst-mic.rec .ic { animation: none; } }
.asst-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; background: var(--surface); min-width: 0; }
.asst-card.editing { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.asst-card.done { border-color: var(--ok); }
.asst-card h4 { margin: 0; }
.asst-kind { display: inline-grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); flex: none; }
.asst-kind.ok { background: var(--ok-soft); color: var(--ok); }
.asst-todo > span:first-child { color: var(--warn); }
.asst-todo input, .asst-todo select, .asst-todo textarea, .asst-todo-input { border-color: var(--warn) !important; }
.asst-card input[readonly], .asst-card textarea[readonly], .asst-card select:disabled { background: var(--surface-2); color: var(--ink-2); }
.asst-line { display: flex; align-items: flex-start; gap: 6px; }
.asst-line .ic { flex: none; margin-block-start: 2px; }
/* Lignes du devis : une carte par ligne (produit sur toute la largeur, puis quantité, prix, montant). */
.asst-lines colgroup, .asst-lines thead { display: none; }
.asst-lines, .asst-lines tbody { display: block; inline-size: 100%; }
.asst-lines tr { display: grid; grid-template-columns: 72px 1fr 1fr 36px; gap: 6px; align-items: center; padding: 8px 0; border-block-end: 1px solid var(--line); }
.asst-lines td { display: block; padding: 0 !important; border: 0; min-width: 0; text-align: start; }
.asst-lines td.num { text-align: end; }
.asst-lines td:first-child { grid-column: 1 / -1; }
.asst-lines tr > td:first-child select { inline-size: 100% !important; max-inline-size: none; }
.asst-lines select { inline-size: 100%; }
.asst-lines input[type="number"] { inline-size: 100%; text-align: end; padding-inline: 8px; }
.asst-card-actions { border-block-start: 1px solid var(--line); padding-block-start: 10px; }
.asst-wait { display: flex; align-items: center; gap: 6px; }
.asst-wait .ic { animation: asst-pulse 1.2s ease-in-out infinite; }
.asst-foot { margin-block-start: auto; }
.asst-conn { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plus-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; background: linear-gradient(135deg, var(--primary-soft), var(--surface) 60%); }
.plus-card.on { border-color: var(--primary); }
.plus-caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.plus-caps li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.plus-caps .ic { color: var(--primary); flex: none; margin-block-start: 2px; }
@media (max-width: 640px) {
  dialog.sheet.asst { inline-size: 100vw; max-inline-size: 100vw; }
  .asst-open .hide-sm { display: none; }
}
/* ---------------------------------------------------------------- menu à deux niveaux (0.201.0) : section → entrées ;
   en-tête de section (lien du référentiel, bouton de repli), entrées en liste, onglets avec menu « Plus ». */
.nav-sec-head { display: flex; align-items: flex-start; gap: 2px; min-width: 0; }
.nav-sec-head > .nav-title { flex: 1 1 auto; min-width: 0; }
.nav-sec-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 6px; margin-top: 2px; border: 0; background: transparent; border-radius: 6px; color: var(--ink-3); cursor: pointer; justify-content: center; }
.nav-sec-btn:hover { background: var(--surface-3); color: var(--ink); }
.nav-sec-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.nav-sec-btn .nav-chev .ic { transition: transform .15s ease; }
.nav-sec.open > .nav-sec-head .nav-sec-btn .nav-chev .ic { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .nav-sec-btn .nav-chev .ic { transition: none; } }
.nav-entries { display: grid; gap: 1px; }
.nav-fw-name { display: inline-flex; align-items: center; gap: 4px; }
.nav-fw-go { display: inline-flex; color: var(--fw, var(--ink-3)); opacity: .75; }
.nav-fw-go .ic { width: 12px; height: 12px; }
a.nav-fw:hover .nav-fw-span { text-decoration: underline; }
.ui-tabs { align-items: stretch; }
.ui-tabs-more { position: relative; display: inline-flex; margin-left: auto; }
.ui-tabs-more > .ui-tabs-more-btn { width: auto; }
.ui-tabs-more-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 13.5px; cursor: pointer; border-radius: 6px; }
.ui-tabs-more-btn:hover { color: var(--ink); background: var(--surface-3); }
.ui-tabs-more-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.ui-tabs-more .ui-more-menu { position: fixed; right: auto; min-width: 220px; z-index: 60; }
/* ---------------------------------------------------------------- accueil « Ma journée » (0.201.0) */
.day-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; }
.day-head h2 { margin: 2px 0 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; }
.day-head .day-date { margin: 4px 0 0; color: var(--ink-3); }
.day-head .day-date::first-letter { text-transform: uppercase; }
.day-tabs { flex: none; }
.day-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.my-day { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.day-sum { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink-2); }
.day-sum.bad { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.day-sum.bad .ic { color: var(--bad); }
.day-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.day-flow:empty { display: none; }
.flow-compact { min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--fw) 22%, var(--line)); background: color-mix(in srgb, var(--fw) 5%, var(--surface)); }
.fc-title { flex: none; font-weight: 800; letter-spacing: .04em; color: var(--fw); text-decoration: none; min-width: 92px; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.fc-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; min-height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 13px; }
.fc-chip:hover { border-color: var(--fw); color: var(--ink); }
.fc-chip .fc-name { font-weight: 650; color: var(--ink); }
.fc-chip.tone-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.fc-chip.tone-bad .fc-count { color: var(--bad); }
.fc-chip.tone-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.fc-none { color: var(--ink-3); font-size: 13px; }
/* 0.201.0 (R3) : compteurs des référentiels repliables, sous les blocs personnels de « Ma journée » */
.day-flow-fold { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.day-flow-fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; padding: 8px 14px; cursor: pointer; list-style: none; border-radius: inherit; }
.day-flow-fold > summary::-webkit-details-marker { display: none; }
.day-flow-fold > summary:hover { background: var(--surface-2); }
.day-flow-fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.day-flow-title { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.day-flow-title .ic { color: var(--ink-3); transition: transform .18s ease; }
.day-flow-fold[open] .day-flow-title .ic { transform: rotate(90deg); }
.day-flow-fold > .day-flow { padding: 0 12px 12px; }
.day-skel { display: grid; gap: 10px; }
@media (pointer: coarse) { .fc-chip { min-height: 44px; align-items: center; } }
@media (prefers-reduced-motion: reduce) { .day-flow-title .ic { transition: none; } }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }
.day-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.day-block-head { display: flex; align-items: center; gap: 10px; }
.day-block-head h3 { margin: 0; font-size: 16px; }
.day-block-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); flex: none; }
.day-count { min-width: 28px; text-align: center; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-weight: 700; font-size: 13px; }
.day-count.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.day-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.day-item a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.day-item a:hover { background: var(--surface-2); }
.day-item a:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.day-item.is-bad a { border-left-color: var(--bad); }
.day-item.is-warn a { border-left-color: var(--warn); }
.day-item.is-info a { border-left-color: var(--info, var(--primary)); }
.day-verb { flex: none; min-width: 92px; font-weight: 700; color: var(--primary); font-size: 13.5px; }
.day-what { flex: 1; min-width: 0; }
.day-what strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.day-what .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-urg { flex: none; }
.day-item a > .ic:last-child { flex: none; color: var(--ink-4); }
.day-none { display: block; margin: 0; padding: 0; color: var(--ink-3); }
.day-none .empty { padding: 6px 4px; }
.day-none .empty-x { grid-template-columns: auto 1fr; justify-items: start; text-align: left; gap: 2px 10px; }
.day-none .empty-x > :not(.ic) { grid-column: 2; }
.day-none .empty-x > .ic { grid-row: 1 / span 3; color: var(--ok); }
.day-none .empty-x .empty-acts { justify-content: flex-start; }
.day-none .ic { color: var(--ok); }
.day-all { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; font-size: 13.5px; }
.day-calm { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 36px 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); grid-column: 1 / -1; }
.day-calm h3 { margin: 0; font-size: 20px; }
.day-calm p { margin: 0; max-width: 52ch; color: var(--ink-3); }
.day-calm-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); }
.day-calm-next { display: grid; gap: 8px; justify-items: center; margin-top: 8px; }
@media (max-width: 560px) {
  .day-verb { min-width: 0; }
  .day-item a { flex-wrap: wrap; row-gap: 2px; }
  .day-what { flex-basis: 100%; order: 2; }
  .day-urg { margin-left: auto; }
  .day-item a > .ic:last-child { display: none; }
  .fc-title { min-width: 0; }
}
@media (max-width: 720px) {
  .flow-compact { flex-wrap: nowrap; padding: 8px 10px; }
  .fc-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .fc-chips::-webkit-scrollbar { display: none; }
  .fc-chip { flex: none; white-space: nowrap; }
}

/* ================================================================ Tableau du pipeline compact (0.201.0, vague R4)
   Colonnes de largeur fixe qui défilent à l'horizontale ; chaque colonne défile à la verticale dans la hauteur de
   l'écran ; cartes compactes (titre, client en texte courant, montant, clôture, responsable). */
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.pb-toggle button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.pb-bar { align-items: center; gap: 8px 18px; margin: 0 0 10px; }
.pb-bar .field { margin: 0; }
.pb-weighted { margin: 0; }
.pb-hint { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.kanban.pipeline-board.pboard { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(250px, 1fr); gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 8px; align-items: stretch; }
.pboard .pb-col { display: flex; flex-direction: column; gap: 6px; min-height: 0; max-height: max(380px, calc(100vh - 290px)); padding: 8px; scroll-snap-align: start;
  background: var(--surface-3); border-radius: var(--radius-lg); border: 1px solid transparent; transition: border-color .12s, background-color .12s; }
.pboard .pb-col.is-target { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface-3)); }
.pboard .pb-head { padding: 2px 4px 4px; display: grid; gap: 2px; }
.pboard .pb-head h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; font-size: 13.5px; color: var(--ink); }
.pboard .pb-head .pb-n { font: 600 12px/1.2 var(--font, inherit); color: var(--ink-3); background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.pboard .pb-sum { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pboard .pb-rules { margin: 0; display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pboard .pb-list { display: grid; gap: 6px; align-content: start; overflow-y: auto; min-height: 60px; padding: 2px; }
.pboard .pb-card { gap: 3px; padding: 8px 10px; border-radius: 10px; cursor: grab; position: relative; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.pboard .pb-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pboard .pb-card.is-late { box-shadow: inset 3px 0 0 var(--warn); }
.pboard .pb-card.is-dragging { opacity: .45; }
.pboard .pb-card.is-picked { outline: 2px dashed var(--primary); outline-offset: 2px; }
.pboard .pb-top { display: flex; align-items: flex-start; gap: 4px; }
.pboard .pb-title { flex: 1; min-width: 0; color: var(--ink); font-weight: 650; font-size: 13.5px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.pboard .pb-title:hover { color: var(--primary); text-decoration: underline; }
.pboard .pb-grip { color: var(--ink-3); cursor: grab; touch-action: none; display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; }
.pboard .pb-menu { flex: none; }
.pboard .pb-menu > summary { min-height: 26px; min-width: 26px; padding: 2px; list-style: none; }
.pboard .pb-menu > summary::-webkit-details-marker { display: none; }
.pboard .pb-menu .dt-pop { min-width: 200px; z-index: 30; }
.pboard .pb-menu .dt-pop .btn { justify-content: flex-start; width: 100%; }
.pboard .pb-client { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pboard .pb-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-top: 2px; }
.pboard .pb-amount { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.pboard .pb-date { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); white-space: nowrap; }
.pboard .pb-cue { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; }
.pboard .pb-cue.warn { color: var(--warn); } .pboard .pb-cue.info { color: var(--info, var(--primary)); }
.pboard .pb-owner { margin-inline-start: auto; }
.pboard .pb-owner .avatar { width: 24px; height: 24px; font-size: 10.5px; }
.pb-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: .95; box-shadow: 0 10px 28px rgba(16, 24, 40, .22); transform-origin: 0 0; }
.pb-closed > summary { list-style: none; display: flex; gap: 8px; align-items: center; }
.pb-closed > summary::-webkit-details-marker { display: none; }
@media (max-width: 720px) {
  .kanban.pipeline-board.pboard { grid-auto-columns: minmax(78vw, 1fr); overflow-x: auto; }
  .pboard .pb-col { max-height: max(360px, calc(100vh - 240px)); }
  .pb-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pboard .pb-col { transition: none; } }

/* Bande unique du parcours de l'opportunité (0.201.0, vague R4) : étapes de vente et documents sur une rangée. */
.deal-journey .dc-steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr); }
.deal-journey .dc-link { min-height: 58px; padding: 8px 10px; gap: 8px; }
.deal-journey .dc-step.is-skipped .dc-link { background: transparent; border-style: dotted; color: var(--ink-3); opacity: .75; }
.deal-journey .dc-step.is-partial .dc-fill { stroke: var(--primary); }
@media (max-width: 720px) { .deal-journey .dc-steps { grid-auto-columns: 46%; } }
.eco-fold > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.eco-fold > summary::-webkit-details-marker { display: none; }

/* Espace Paramètres (0.201.0, vague R4) : sections par processus, cartes « valeur actuelle + Modifier ». */
a.menu-item { text-decoration: none; }
.set-section { margin: 0 0 22px; }
.set-section > header { margin: 0 0 8px; }
.set-section > header h3 { margin: 0; font-size: 16px; }
.set-section > header p { margin: 2px 0 0; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.set-card { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 12px 14px; min-width: 0; }
.set-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.set-top h4 { margin: 0; font-size: 14px; flex: 1; min-width: 0; }
.set-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); flex: none; }
.set-fact { margin: 0; font-size: 13px; color: var(--ink-2); }
.set-act { display: flex; justify-content: flex-end; }
.set-top h4 { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.set-fact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pb-closed > summary { padding: 12px 16px; }
.pb-bar { align-items: flex-end; }
.deal-journey .dc-steps { grid-auto-columns: minmax(140px, 1fr); }
.deal-journey .dc-ring { width: 30px; height: 30px; }
.deal-journey .dc-ring svg { width: 30px; height: 30px; }
.deal-journey .dc-text { min-width: 0; }
.deal-journey .dc-ref, .deal-journey .dc-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Accompagnement (0.201.0, vague R5) */
/* Mise en route : une carte par processus, barre d'avancement, étapes avec « Faire maintenant ». */
.setup-guide { display: grid; gap: 10px; margin: 0 0 16px; }
.setup-guide .sg-top h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.setup-guide .sg-top p { margin: 2px 0 0; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 10px; align-items: start; }
.sg-proc { display: grid; gap: 8px; padding: 12px 14px; min-width: 0; align-content: start; }
.sg-day .sg-proc { padding: 10px 12px; gap: 6px; }
.sg-rest { justify-self: start; }
.sg-head h4 { margin: 0; font-size: 1rem; }
.sg-bar { height: 6px; border-radius: 99px; background: var(--line, #e4e6ec); overflow: hidden; }
.sg-bar i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.sg-steps { display: grid; gap: 6px; margin: 0; }
.sg-step { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line, #e4e6ec); min-width: 0; }
.sg-step:first-child { border-top: 0; }
.sg-step .sg-tick { color: var(--ink-3); display: inline-flex; }
.sg-step.is-done .sg-tick { color: var(--ok, #1a7f4b); }
.sg-step.is-done strong { color: var(--ink-3); font-weight: 600; }
.sg-step .btn { min-height: 36px; white-space: nowrap; }
@media (max-width: 520px) { .sg-step { grid-template-columns: auto 1fr; } .sg-step > .btn, .sg-step > .sg-done { grid-column: 2; justify-self: start; } }
/* Approbations : qui décide, pourquoi, ensuite. */
details.why { margin-top: 4px; }
details.why summary { cursor: pointer; color: var(--primary); list-style: none; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
details.why summary::-webkit-details-marker { display: none; }
.why-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 10px; margin: 6px 0 0; }
.why-list > div { display: contents; }
.why-list dt { font-weight: 600; color: var(--ink-2); font-size: .86rem; }
.why-list dd { margin: 0; font-size: .86rem; }
.why-card { align-items: flex-start; }
/* Historique : phrases courtes, plus récent d'abord. */
.hist-panel ol { margin: 0; }
.hist-panel h3 { display: flex; align-items: center; gap: 6px; }
.hist-panel .tl-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; }
.hist-panel .tl-meta > .ic { margin-top: 3px; }
.hist-panel .tl-meta > :not(.ic) { grid-column: 2; }
.hist-panel .tl-meta strong { font-weight: 600; }
.hist-panel .hist-more { margin-top: 6px; }
.day-none .empty-x strong { font-family: inherit; font-size: .95rem; font-weight: 600; }
