/* =============================================================================
   FLEUVA DESIGN SYSTEM — THÈME "SOFTWARE"
   Direction : logiciel de gestion classique (Sage / SAP / Oracle Fusion).
   Plat, opaque, bordures fines plutôt qu'ombres, couleurs sémantiques
   uniques et non ambiguës pour info/warning/error/success.
   ========================================================================== */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f4;
  --border: #d9dfe4;
  --text: #16212b;
  --text-muted: #5b6b78;
  --text-faint: #8b9aa6;
  --primary: #002f45;
  --primary-hover: #064c6b;
  --brand: #b80b2c;
  --brand-hover: #93001f;


  --info: #2563eb;
  --info-bg: #eef4ff;
  --info-border: #bfd7fe;
  --warning: #b45309;
  --warning-bg: #fef7e6;
  --warning-border: #f6dfa8;
  --error: #dc2626;
  --error-bg: #fdeeee;
  --error-border: #f6c6c6;
  --success: #15803d;
  --success-bg: #eef8f0;
  --success-border: #bfe3c9;
  --other: #7125eb;
  --other-bg: #faeeff;
  --other-border: #eebffe;
  --teal: #0e7490;
  --teal-bg: #e6f6f9;
  --teal-border: #b3e0e9;

  --radius: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(7, 25, 35, .05);
  --font: 'Inter', -apple-system, sans-serif;

  /* Tokens d'espacement/transition utilisés par le système de modale
     (référencés plus bas mais non définis dans la feuille reçue — ajoutés
     ici pour que .modal-body/.modal-foot/.modal-overlay/.modal-close
     s'affichent correctement). */
  --fds-space-stack-lg: 20px;
  --fds-space-stack-md: 16px;
  --fds-space-stack-sm: 8px;
  --fds-space-gutter: 20px;
  --fds-transition-fast: 120ms ease;
  --fds-outline-variant: var(--border);
}

html[data-mode="dark"] {
  --bg: #10161c;
  --surface: #181f27;
  --surface-2: #1e2731;
  --surface-3: #263039;
  --border: #313d47;
  --text: #e7edf2;
  --text-muted: #9aacb8;
  --text-faint: #6b7d89;
  --primary: #d8e4ea;
  --brand: #e23b57;
  --brand-hover: #ef5a73;

  --info: #5b9bff;
  --info-bg: #142238;
  --info-border: #274470;
  --warning: #e0a230;
  --warning-bg: #2b2213;
  --warning-border: #4d3d1c;
  --error: #f0605a;
  --error-bg: #2e1717;
  --error-border: #522423;
  --success: #4ade80;
  --success-bg: #132a1a;
  --success-border: #234a30;
  --teal: #4cc3d9;
  --teal-bg: #0f2a31;
  --teal-border: #1f4f5c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

* {
  box-sizing: border-box;
}

h1 {
    display: block;
    font-size: 18px;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}


.gap-20 {
  gap: 20px;
}

.gap-18 {
  gap: 18px;
}

.gap-16 {
  gap: 16px;
}

.gap-14 {
  gap: 14px;
}

.gap-12 {
  gap: 12px;
}

.gap-10 {
  gap: 10px;
}

.gap-9 {
  gap: 9px;
}

.gap-8 {
  gap: 8px;
}
.gap-7 {
  gap: 7px;
}

.gap-6 {
  gap: 6px;
}

/* Ces noms existent aussi dans Bootstrap avec !important et une échelle en rem.
   Le thème Software utilise des pixels : garder ses valeurs prioritaires. */
.gap-5 {
  gap: 5px !important;
}

.gap-4 {
  gap: 4px !important;
}

.gap-3 {
  gap: 3px !important;
}




body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  transition: background .15s, color .15s;
}

.material-symbols-outlined {
  font-size: 20px;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

.text-primary {
  /* Bootstrap définit aussi cette utilité avec !important. */
  color: var(--primary) !important;
}

/* ---- Layout shell ---- */
.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand .sq {
  width: 20px;
  height: 20px;
  background: var(--brand);
  border-radius: 3px;
  display: inline-block;
}
.full-field input,
.full-field select {
  width: 100%;
  box-sizing: border-box;
}
.brand-context {
  color: var(--text-faint);
  font-weight: 500;
}

.brand-context b {
  color: var(--brand);
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav a {
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav a.active {
  background: var(--surface-3);
  color: var(--primary);
}

.nav a:hover {
  background: var(--surface-2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  width: 220px;
  color: var(--text-faint);
  font-size: 12.5px;
}

.search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text);
  width: 100%;
}

.search input::placeholder {
  color: var(--text-faint);
}

.icon-btn {
  --fds-btn-bg: transparent;
  --fds-btn-color: var(--text-muted);
  --fds-btn-border: transparent;
  --fds-btn-hover-bg: var(--surface-2);
  --fds-btn-hover-border: var(--border);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.icon-btn:hover:where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  background: var(--surface-2);
  border-color: var(--border);
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 8px;
  background: var(--surface-2);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Sub navigation (tabs bar under topbar) ---- */
.subnav {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.subnav a {
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.subnav a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.subnav a:hover:not(.active) {
  color: var(--primary);
}

.subnav > .dropdown {
  display: inline-flex;
  align-items: stretch;
  position: relative;
}

/* ---- Dropdown ---- */
.dropdown {
  position: relative;
}

/* FDS subnav toggle alignment */
.subnav > .dropdown > a.fds-subnav-link,
.subnav > .dropdown > .fds-subnav-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

/* Dropdown panel — Sage-like: flat border, tight radius, crisp shadow */
.dropdown-menu,
.fds-dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 210px;
  max-width: 250px;
  padding: 5px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.10), 0 6px 24px rgba(0,0,0,.06);
  z-index: 1050;
  animation: fds-dropdown-in .12s ease;
  /* Manquant dans la feuille reçue : sans ce display:none / .open, tous
     les menus déroulants du site (États, Fonctions, compte utilisateur…)
     resteraient en permanence visibles. Restauré pour rester compatible
     avec fds-dropdown.js, qui bascule la classe .open sur le parent. */
  display: none;
}

.dropdown.open .dropdown-menu,
.dropdown.open .fds-dropdown-menu {
  display: block;
}

.dropdown-menu-end {
  left: auto;
  right: 0;
}

/* Le menu utilisateur du topbar (avatar, à l'extrême droite) doit rester
   ancré à droite comme avant cette mise à jour du thème — sans quoi il
   s'ouvrirait hors écran sur les 85 pages existantes qui ne lui passent
   pas .dropdown-menu-end explicitement. */
.topbar-right .dropdown-menu {
  left: auto;
  right: 0;
}

@keyframes fds-dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Items */
.dropdown-item,
.fds-dropdown-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .1s, color .1s, border-color .1s;
}

.dropdown-item:hover,
.fds-dropdown-item:hover {
  background: var(--surface-2);
  color: var(--primary);
}

.dropdown-item.active,
.fds-dropdown-item.active {
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

/* Danger items */
.dropdown-item.danger,
.fds-dropdown-item.danger {
  color: var(--error);
  border-left-color: transparent;
}
.dropdown-item.danger:hover,
.fds-dropdown-item.danger:hover {
  background: color-mix(in srgb, var(--error) 8%, transparent);
  color: var(--error);
}

/* Icons inside items */
.dropdown-item .material-symbols-outlined,
.fds-dropdown-item .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
}
.dropdown-item.danger .material-symbols-outlined,
.fds-dropdown-item.danger .material-symbols-outlined {
  color: var(--error);
}
.dropdown-item.active .material-symbols-outlined,
.fds-dropdown-item.active .material-symbols-outlined {
  color: var(--primary);
}

/* Divider */
.dropdown-divider,
.fds-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Section label inside dropdown */
.dropdown-header {
  padding: 4px 14px 3px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
}

/* ---- Page shell ---- */
.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 19px;
  margin: 0 0 3px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -.01em;
}

.page-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .material-symbols-outlined {
  font-size: 14px;
}

.breadcrumb .current {
  color: var(--primary);
  font-weight: 600;
}

.btn {
  --fds-btn-bg: var(--surface);
  --fds-btn-color: var(--text);
  --fds-btn-border: var(--border);
  --fds-btn-hover-bg: var(--surface-2);
  --fds-btn-hover-border: color-mix(in srgb, var(--border), var(--primary) 25%);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn .material-symbols-outlined {
  font-size: 16px;
}

.btn-primary {
  --fds-btn-bg: var(--primary);
  --fds-btn-color: #fff;
  --fds-btn-border: var(--primary);
  --fds-btn-hover-bg: color-mix(in srgb, var(--primary), var(--surface) 14%);
  --fds-btn-hover-border: color-mix(in srgb, var(--primary), var(--surface) 25%);
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover:where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  background: var(--fds-btn-hover-bg);
  border-color: var(--fds-btn-hover-border);
}

.btn-brand {
  --fds-btn-bg: var(--brand);
  --fds-btn-color: #fff;
  --fds-btn-border: var(--brand);
  --fds-btn-hover-bg: color-mix(in srgb, var(--brand), var(--surface) 14%);
  --fds-btn-hover-border: color-mix(in srgb, var(--brand), var(--surface) 25%);
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-brand:hover:where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  background: var(--fds-btn-hover-bg);
  border-color: var(--fds-btn-hover-border);
}

.btn-navy {
  --fds-btn-bg: var(--primary);
  --fds-btn-color: #fff;
  --fds-btn-border: var(--primary);
  --fds-btn-hover-bg: color-mix(in srgb, var(--primary), var(--surface) 14%);
  --fds-btn-hover-border: color-mix(in srgb, var(--primary), var(--surface) 25%);
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-ghost {
  --fds-btn-bg: transparent;
  --fds-btn-color: var(--text-muted);
  --fds-btn-border: transparent;
  --fds-btn-hover-bg: var(--surface-2);
  --fds-btn-hover-border: transparent;
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  background: var(--surface-2);
}

.btn-danger {
  --fds-btn-bg: var(--error-bg);
  --fds-btn-color: var(--error);
  --fds-btn-border: var(--error-border);
  --fds-btn-hover-bg: color-mix(in srgb, var(--error-bg), var(--error) 6%);
  --fds-btn-hover-border: color-mix(in srgb, var(--error-border), var(--error) 25%);
  color: var(--error);
  border-color: var(--error-border);
  background: var(--error-bg);
}

.btn-success {
  --fds-btn-bg: var(--success);
  --fds-btn-color: #fff;
  --fds-btn-border: var(--success);
  --fds-btn-hover-bg: color-mix(in srgb, var(--success), var(--surface) 10%);
  --fds-btn-hover-border: color-mix(in srgb, var(--success), var(--surface) 25%);
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

/* Shared states: semantic colors remain attached to the button variant. */
:is(.btn, .icon-btn) {
  transition: background-color var(--fds-transition-fast), border-color var(--fds-transition-fast),
    box-shadow var(--fds-transition-fast), opacity var(--fds-transition-fast);
}

:is(.btn, .icon-btn):hover:where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  background: var(--fds-btn-hover-bg);
  border-color: var(--fds-btn-hover-border);
  color: var(--fds-btn-color);
}

:is(.btn, .icon-btn):is(:active, .active, [aria-pressed="true"], [aria-expanded="true"]):where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  background: var(--fds-btn-hover-bg);
  border-color: var(--fds-btn-hover-border);
  color: var(--fds-btn-color);
  box-shadow: inset 0 0 0 1px var(--fds-btn-hover-border);
}

:is(.btn, .icon-btn):focus-visible:where(:not(:disabled, .disabled, [disabled], [aria-disabled="true"])) {
  outline: 2px solid color-mix(in srgb, var(--primary), var(--surface) 35%);
  outline-offset: 2px;
}

:is(.btn, .icon-btn):is(:disabled, .disabled, [disabled], [aria-disabled="true"]) {
  background: var(--fds-btn-bg);
  border-color: var(--fds-btn-border);
  color: var(--fds-btn-color);
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
  outline: none;
}

a:is(.btn, .icon-btn):is(.disabled, [disabled], [aria-disabled="true"]) {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  :is(.btn, .icon-btn) { transition: none; }
}

.btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---- Semantic callouts ---- */
.callout {
  border: 1px solid;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.callout .material-symbols-outlined {
  font-size: 17px;
  margin-top: 1px;
}

.callout b {
  display: block;
  font-size: 12.5px;
  margin-bottom: 1px;
}

.callout.info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info);
}

.callout.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}

.callout.error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error);
}

.callout.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.callout.neutral {
  background: var(--surface-2);
  border-color: var(--surface-3);
  color: var(--text-muted);
}

.callout span.msg {
  color: var(--text);
}

/* ---- Module not-configured banner (Chantier 0, SETUP-18) ---- */
.fds-not-configured-banner {
  display: flex;
  gap: 12px;
  align-items: center;
}

.fds-not-configured-banner-content {
  flex: 1;
  min-width: 0;
}

.fds-not-configured-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.fds-not-configured-banner-message {
  font-size: 12px;
  color: var(--text-muted);
}

.fds-not-configured-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fds-not-configured-banner-full {
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.fds-not-configured-banner-full > .material-symbols-outlined {
  font-size: 20px;
  color: var(--brand);
  flex-shrink: 0;
}

.fds-not-configured-banner-field {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.fds-not-configured-banner-field > .material-symbols-outlined {
  font-size: 18px;
  color: var(--warning);
  flex-shrink: 0;
}

.fds-not-configured-banner-compact {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 3px;
  padding: 8px 10px;
}

.fds-not-configured-banner-compact > .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
}

.fds-not-configured-banner-compact .fds-not-configured-banner-title {
  font-size: 12px;
}

/* ---- Guardrail modal (Chantier 0, SETUP-18) ---- */
.fds-guardrail-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fds-guardrail-head .material-symbols-outlined {
  font-size: 19px;
  flex-shrink: 0;
}

.fds-guardrail-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.fds-guardrail-message {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.fds-guardrail-warning .fds-guardrail-head .material-symbols-outlined { color: var(--warning); }
.fds-guardrail-block .fds-guardrail-head .material-symbols-outlined { color: var(--error); }

.fds-guardrail-list {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-md);
}

.fds-guardrail-list-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.fds-guardrail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 12.5px;
}

.fds-guardrail-item .material-symbols-outlined {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--text-faint);
}

.fds-guardrail-item-label {
  flex: 1;
}

.fds-guardrail-item-value {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.fds-guardrail-confirm {
  margin-top: 14px;
}

.fds-guardrail-confirm-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.fds-guardrail-note {
  flex: 1;
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ---- KPI cards ---- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.kpi .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
  font-weight: 600;
}

.kpi .val {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin: 5px 0 3px;
}

.kpi .trend {
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.kpi .trend.up {
  color: var(--success);
}

.kpi .trend.down {
  color: var(--error);
}

.kpi .trend.neutral {
  color: var(--text-faint);
}

.kpi .trend .material-symbols-outlined {
  font-size: 14px;
}

.kpi .icon-chip {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.kpi .icon-chip .material-symbols-outlined {
  font-size: 18px;
}

/* ---- Generic panel/card ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  gap: 10px;
  flex-wrap: wrap;
}

.panel-head h2 {
  font-size: 13.5px;
  margin: 0;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head h2 .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-muted);
}

.panel-body {
  padding: 16px;
}

.card {
  /* Les cartes Software sont des conteneurs simples ; les cartes horizontales
     définissent leur propre display:flex, sans hériter de la colonne Bootstrap. */
  display: block;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* ---- Table ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th {
  text-align: left;
  padding: 8px 16px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--surface-2);
}

.mono {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.cell-strong {
  font-weight: 700;
  color: var(--primary);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.table-scroll {
  overflow-x: auto;
}

/* ---- Badges & status ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.badge.info {
  background: var(--info-bg);
  color: var(--info);
}

.badge.other {
  background: var(--other-bg);
  color: var(--other);
}

.badge.teal {
  background: var(--teal-bg);
  color: var(--teal);
}

.badge.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge.error {
  background: var(--error-bg);
  color: var(--error);
}

.badge.success {
  background: var(--success-bg);
  color: var(--success);
}

.badge.neutral {
  background: var(--surface-3);
  color: var(--text-muted);
}

.badge.brand {
  background: var(--brand);
  color: #fff;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.success {
  background: var(--success);
}

.status-dot.error {
  background: var(--error);
}

.status-dot.warning {
  background: var(--warning);
}

.status-dot.neutral {
  background: var(--text-faint);
}

/* ---- Forms ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
}

.field input:where(:not([type="search"])),
.field select,
.field textarea,
input:where(:not([type="search"], [type="checkbox"], [type="radio"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="range"], [type="color"], [type="file"])),
:is(input, select, textarea).form-control:where(:not([type="search"], [type="checkbox"], [type="radio"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="range"], [type="color"], [type="file"])),
select,
textarea {
  font-family: var(--font);
  font-size: 12.5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.field input:where(:not([type="search"])):focus,
.field select:focus,
.field textarea:focus,
input:where(:not([type="search"], [type="checkbox"], [type="radio"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="range"], [type="color"], [type="file"])):focus,
:is(input, select, textarea).form-control:where(:not([type="search"], [type="checkbox"], [type="radio"], [type="hidden"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="range"], [type="color"], [type="file"])):focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-3);
  font-size: 12.5px;
}

.kv-row:last-child {
  border-bottom: none;
}

.kv-row .k {
  color: var(--text-muted);
  font-weight: 500;
}

.kv-row .v {
  color: var(--primary);
  font-weight: 700;
}

/* ---- Progress / gauge ---- */
.progress {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress>div {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

.progress.brand>div {
  background: var(--brand);
}

.gauge-ring {
  transition: stroke-dashoffset .5s ease;
}

/* ---- Tabs (in-page) ---- */
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tabs button,
.tabs > a {
  background: none;
  border: none;
  font-family: var(--font);
  padding: 10px 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.tabs button.active,
.tabs > a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.tabs button:hover:not(.active),
.tabs > a:hover:not(.active) {
  color: var(--primary);
}

.tabs button .material-symbols-outlined {
  font-size: 16px;
}

/* ---- Segmented control ---- */
.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  background: var(--surface-2);
}

.segmented .seg-item {
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.segmented .seg-item.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ---- Promo / dark banner ---- */
.banner-dark {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

html[data-mode="dark"] .banner-dark {
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.banner-dark h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.banner-dark p {
  margin: 0;
  font-size: 12px;
  opacity: .75;
}

/* ---- Sidebar (widget library / detail sidebars) ---- */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar-section {
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section h3 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  font-weight: 700;
  margin: 0 0 10px;
}

.widget-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: grab;
  margin-bottom: 6px;
}

.widget-item:hover {
  border-color: var(--brand);
}

.widget-item .material-symbols-outlined {
  color: var(--brand);
}

.widget-item p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.widget-item small {
  color: var(--text-faint);
  font-size: 10.5px;
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -23px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--surface);
}

.timeline-item .ts {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  top: calc(var(--topbar-h, 52px) + 12px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(calc(-100% - 100px));
  background: var(--surface);
  border: 1px solid var(--success-border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  z-index: 1000;
  transition: transform .3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast .material-symbols-outlined {
  color: var(--success);
}

/* Lien d'action facultatif dans le toast (ex. « Annuler ») — voir fds-toast.js */
.toast .toast-action {
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.toast .toast-action[hidden] {
  display: none;
}

/* ---- Tableau kanban (colonnes de cartes) ----
   Structure : .board > .board-col > .board-col-head + .board-card* */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.board-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 300px;
  padding: 8px;
  background: var(--surface-3);
  border-radius: var(--radius-md);
}

.board-col-head {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
}

.board-col-head .count {
  color: var(--text-faint);
}

.board-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
}

.board-card:hover {
  border-color: var(--brand);
}

/* ---- Barre d'actions fixe en bas de formulaire (Annuler / Brouillon / Soumettre) ----
   Prévoir un padding-bottom d'au moins 90px sur .page pour ne pas masquer le contenu. */
.form-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1010;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.form-footer .btn[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

/* ---- Champ à suggestions (recherche catalogue, ajout de ligne) ----
   Structure : .autocomplete > input + .autocomplete-menu > .autocomplete-item* */
.autocomplete {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(13, 27, 41, .12);
}

.autocomplete-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--surface-3);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--surface-2);
}

/* ---- Menu latéral de sections (pages de paramétrage à plusieurs volets) ----
   Structure : nav.fds-sidenav > a(.active) > icône + libellé */
.fds-sidenav {
  padding: 6px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.fds-sidenav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-left: 3px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.fds-sidenav a .material-symbols-outlined {
  font-size: 18px;
}

.fds-sidenav a:hover:not(.active) {
  background: var(--surface-2);
}

.fds-sidenav a.active {
  color: var(--brand);
  background: var(--error-bg);
  border-left-color: var(--brand);
}

/* ---- Tiroir latéral (aperçu rapide, saisie contextuelle) ----
   S'utilise dans un .modal-overlay.drawer-overlay (même ouverture / fermeture
   que les modales : fds-modal.js, [data-fds-modal-dismiss], Échap).
   Structure : .drawer > .drawer-head + .drawer-body + .drawer-foot */
.modal-overlay.drawer-overlay {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(13, 27, 41, .25);
}

.drawer {
  width: min(520px, 100%);
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(13, 27, 41, .12);
}

.drawer.drawer-lg {
  width: min(680px, 100%);
}

#commonOffCanvas .purchase-document-drawer { width:100%; height:100%; min-height:0; box-shadow:none; }
.purchase-document-drawer .drawer-head, .purchase-document-drawer .drawer-foot { flex-shrink:0; }
.purchase-document-drawer .drawer-body { min-height:0; }
.receipt-preview-line { display:grid; grid-template-columns:minmax(180px,1fr) 70px 70px 70px; gap:10px; padding:10px 12px; border-bottom:1px solid var(--surface-3); font-size:12px; min-width:450px; }
.receipt-preview-line > :not(:first-child) { text-align:right; }
.return-preview-line { display:grid; grid-template-columns:minmax(160px,1fr) 100px 150px; gap:10px; padding:10px 12px; border-bottom:1px solid var(--surface-3); font-size:12px; min-width:450px; }
.return-create-line { display:grid; grid-template-columns:minmax(180px,1fr) 60px 90px 140px; gap:10px; padding:8px 12px; align-items:center; border-bottom:1px solid var(--surface-3); font-size:12px; min-width:530px; }
.return-create-line input, .return-create-line select { min-width:0; width:100%; background:#fff; }
.return-create-line[hidden] { display:none; }
.purchase-bid-form .bid-lines-grid { display:grid; grid-template-columns:minmax(360px,1fr) 180px 150px 160px 30px; gap:14px; align-items:start; }
.purchase-bid-form .bid-lines-grid input, .purchase-bid-form .bid-lines-grid textarea { min-width:0; width:100%; background:#fff; }
.purchase-bid-form .bid-lines-grid input[type=search] { background:#fff; }
.purchase-bid-form .bid-lines-grid textarea { resize:vertical; }
@media (max-width:640px) { .purchase-bid-form .cols-2 { grid-template-columns:minmax(0,1fr); } }
.return-source-choice { display:flex; flex-direction:column; gap:5px; align-items:center; text-align:center; padding:12px 6px; border:1px solid var(--border); border-radius:4px; text-decoration:none; color:var(--text-muted); font-size:11px; }
.return-source-choice strong { font-size:12px; }
.return-source-choice.active { border-color:var(--primary); background:var(--info-bg); color:var(--primary); }
.purchase-return-create-page .purchase-document-drawer { width:min(720px,100%); height:auto; margin:auto; border:1px solid var(--border); border-radius:4px; box-shadow:none; }

.drawer-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.drawer-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

/* ---- Dropzone ---- */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  gap: 6px;
}

.dropzone .material-symbols-outlined {
  font-size: 32px;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 20px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--text-muted);
  font-size: 11.5px;
}

.footer a:hover {
  color: var(--brand);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer small {
  color: var(--text-faint);
  font-size: 11px;
}

.theme-tag {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius);
  letter-spacing: .02em;
  z-index: 500;
}

/* ---- Grid helpers ---- */
.grid {
  display: grid;
  gap: 10px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.flex {
  display: flex;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.w-full {
  width: 100%;
}

@media (max-width: 900px) {

  .kpi-row,
  .semantic-row,
  .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .kpi-row,
  .semantic-row,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .topbar .nav,
  .topbar .search {
    display: none;
  }
}


/* ==========================================================================
   FDS Callouts (Component: x-fleuva-callout)
   Variants: error, warning, info, success
   ========================================================================== */
.callout,
.fds-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius, 3px);
  border: 1px solid var(--border, #d9dfe4);
  background: var(--surface-2, #f8fafc);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.callout:last-child,
.fds-callout:last-child {
  margin-bottom: 0;
}

.callout .material-symbols-outlined,
.fds-callout .material-symbols-outlined {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.callout b,
.fds-callout b {
  display: block;
  font-weight: 700;
  color: var(--primary, #071923);
  margin-bottom: 2px;
}

.callout .msg,
.fds-callout .msg {
  display: block;
  color: var(--text-muted, #64748b);
  font-size: 11.5px;
}

.callout.error,
.fds-callout-error {
  background: var(--danger-subtle-bg, #fef2f2);
  border-color: var(--danger-border, #fecaca);
}

.callout.error .material-symbols-outlined,
.fds-callout-error .material-symbols-outlined {
  color: var(--danger, #dc2626);
}

.callout.warning,
.fds-callout-warning {
  background: var(--warning-subtle-bg, #fffbeb);
  border-color: var(--warning-border, #fef3c7);
}

.callout.warning .material-symbols-outlined,
.fds-callout-warning .material-symbols-outlined {
  color: var(--warning, #b45309);
}

.callout.info,
.fds-callout-info {
  background: var(--info-subtle-bg, #eff6ff);
  border-color: var(--info-border, #bfdbfe);
}

.callout.info .material-symbols-outlined,
.fds-callout-info .material-symbols-outlined {
  color: var(--info, #1d4ed8);
}

.callout.success,
.fds-callout-success {
  background: var(--success-subtle-bg, #f0fdf4);
  border-color: var(--success-border, #bbf7d0);
}

.callout.success .material-symbols-outlined,
.fds-callout-success .material-symbols-outlined {
  color: var(--success, #15803d);
}

/* ==========================================================================
   FDS — MODULE ÉTATS FINANCIERS / ACCOUNTING
   (Journal, Brouillard, Grand Livre, Grand Livre Tiers, Balance,
   Balance Âgée Tiers, Bilan, Compte de Résultat)
   Composé à partir des primitives existantes : .card, .panel, .field,
   .search, .grid.cols-*, .dropdown, .subnav, .banner-dark, .btn.
   ========================================================================== */

/* ---- États dropdown (menu de rapports, ancré dans le fil d'Ariane) ---- */
.report-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.report-crumb .current {
  color: var(--brand);
  font-weight: 600;
}

.etats-trigger {
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.etats-trigger:hover {
  background: var(--surface-2);
}

.etats-trigger .material-symbols-outlined {
  font-size: 16px;
}

/* ---- Barre de filtres (période, classe, recherche…) ---- */
.filters-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.filters-bar .field {
  min-width: 0;
}

.filters-bar .field input:where(:not([type="search"])),
.filters-bar .field select {
  width: 100%;
}

.filters-bar .search {
  width: auto;
  flex: 1;
  min-width: 180px;
}

.filters-bar .checkbox-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  padding-bottom: 7px;
  white-space: nowrap;
}

/* ---- Stat trio (Total débit/crédit/écart, Total Actif/Passif…) ----
   Réutilise .grid.cols-3 + .card ; ajoute juste le label/valeur. */
.stat-card .stat-lbl {
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 6px;
}

.stat-card .stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-val.positive {
  color: var(--success);
}

.stat-card .stat-val.negative {
  color: var(--error);
}

/* ---- Interrupteur (toggle switch) — Marchés Publics et ailleurs (circuits de
   validation, phases GED, etc.). Remplace les styles inline dupliqués. ---- */
.fds-toggle {
  width: 34px;
  height: 19px;
  border-radius: 10px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
  border: none;
  padding: 0;
}

.fds-toggle .fds-toggle-knob {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 2px rgba(13, 27, 41, .3);
  transition: left .15s;
}

.fds-toggle.on {
  background: var(--brand);
}

.fds-toggle.on .fds-toggle-knob {
  left: 17px;
}

.fds-toggle.on.success {
  background: var(--success);
}

/* ---- Stepper horizontal (assistants de configuration, workflows à étapes) ---- */
.fds-stepper {
  display: flex;
  align-items: center;
}

.fds-stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.fds-stepper-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-faint);
}

.fds-stepper-circle.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.fds-stepper-circle.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.fds-stepper-label {
  min-width: 0;
}

.fds-stepper-label .title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  white-space: nowrap;
}

.fds-stepper-label .title.active {
  color: var(--brand);
}

.fds-stepper-label .title.done {
  color: var(--text);
}

.fds-stepper-label .hint {
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
}

.fds-stepper-bar {
  flex: 1;
  height: 2px;
  background: var(--surface-3);
  margin: 0 10px;
  min-width: 12px;
}

.fds-stepper-bar.done {
  background: var(--success);
}

/* ---- Pipeline de workflow (fiche document : cartes d'étapes reliées) ----
   Chaque étape est une carte (icône, titre, sous-titre) ; l'étape en cours peut
   porter un menu d'actions (.dropdown). Trois états : .done, .current, (sans classe = à venir).
   Structure : .fds-flow > .fds-flow-item(.done|.current) > .fds-flow-card + .fds-flow-link */
.fds-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
}

.fds-flow-item {
  display: flex;
  align-items: center;
  flex: 1 1 0;
  min-width: 182px;
}

.fds-flow-item:last-child {
  min-width: 150px;
}

.fds-flow-card {
  flex: 1;
  min-width: 150px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.fds-flow-item.done .fds-flow-card {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.fds-flow-item.current .fds-flow-card {
  background: var(--error-bg);
  border-color: var(--error-border);
}

.fds-flow-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-faint);
}

.fds-flow-icon .material-symbols-outlined {
  font-size: 15px;
}

.fds-flow-item.done .fds-flow-icon {
  background: var(--success);
  color: #fff;
}

.fds-flow-item.current .fds-flow-icon {
  background: var(--brand);
  color: #fff;
}

.fds-flow-text {
  min-width: 0;
  flex: 1;
}

.fds-flow-title,
.fds-flow-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fds-flow-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
}

.fds-flow-item.done .fds-flow-title {
  color: var(--text);
}

.fds-flow-item.current .fds-flow-title {
  color: var(--brand);
}

.fds-flow-sub {
  font-size: 10.5px;
  color: var(--text-faint);
}

.fds-flow-link {
  position: relative;
  width: 32px;
  height: 2px;
  flex-shrink: 0;
  background: var(--border);
}

.fds-flow-link::before,
.fds-flow-link::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: inherit;
}

.fds-flow-link::before {
  left: -1px;
}

.fds-flow-link::after {
  right: -1px;
}

.fds-flow-item.done .fds-flow-link {
  background: var(--success);
}

/* ---- Étapes d'assistant en cartes numérotées (saisie tactile : réception, inventaire…) ----
   Les étapes passées (.done) sont cliquables (.clickable) pour revenir en arrière.
   Structure : .fds-wizard-steps > .fds-wizard-step(.done|.current) > .fds-wizard-num + (label, sub) */
.fds-wizard-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}

.fds-wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
}

.fds-wizard-step.clickable {
  cursor: pointer;
}

.fds-wizard-step.current {
  border-color: var(--brand);
}

.fds-wizard-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.fds-wizard-step.done .fds-wizard-num {
  background: var(--success);
  color: #fff;
}

.fds-wizard-step.current .fds-wizard-num {
  background: var(--brand);
  color: #fff;
}

.fds-wizard-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}

.fds-wizard-sub {
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Suivi par segments (statut d'un document : demande, commande, réception…) ----
   Variante compacte du stepper : un segment fin par étape + son libellé dessous.
   Structure : .fds-steps > .fds-step(.done|.current|.rejected) > .fds-step-bar + .fds-step-label
   À privilégier dans les listes et tableaux de bord ; le stepper à pastilles
   (.fds-stepper) reste réservé aux assistants et aux fiches. */
.fds-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
}

.fds-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fds-step-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}

.fds-step-label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fds-step.done .fds-step-bar,
.fds-step.current .fds-step-bar {
  background: var(--primary);
}

.fds-step.done .fds-step-label,
.fds-step.current .fds-step-label {
  color: var(--primary);
}

.fds-step.current .fds-step-label {
  font-weight: 700;
}

.fds-step.rejected .fds-step-bar {
  background: var(--error);
}

.fds-step.rejected .fds-step-label {
  color: var(--error);
  font-weight: 700;
}

/* Variante « chaîne documentaire » (fiche demande, commande…) : icône + libellé + n° du document lié.
   .next = prochaine étape à franchir (segment en couleur d'accent). */
.fds-step.next .fds-step-bar {
  background: var(--brand);
}

.fds-step-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  min-width: 0;
}

.fds-step-title .material-symbols-outlined {
  font-size: 15px;
  color: #9fb0bf;
  flex-shrink: 0;
}

.fds-step.done .fds-step-title,
.fds-step.current .fds-step-title,
.fds-step.next .fds-step-title {
  color: var(--primary);
}

.fds-step.done .fds-step-title .material-symbols-outlined {
  color: var(--success);
}

.fds-step.next .fds-step-title .material-symbols-outlined {
  color: var(--brand);
}

.fds-step.rejected .fds-step-title,
.fds-step.rejected .fds-step-title .material-symbols-outlined {
  color: var(--error);
}

.fds-step-doc {
  font-size: 11px;
  color: var(--brand);
  text-decoration: none;
}

.fds-step-doc.empty {
  color: #9fb0bf;
}

/* ---- Arborescence accessible (rôle ARIA tree/treeitem) — espaces documentaires,
   plans de classement, et toute structure hiérarchique navigable au clavier
   (flèches + Entrée). Composant absent de la feuille reçue : la source GED
   signale elle-même ce pattern comme non couvert par le thème existant. ---- */
.fds-tree {
  outline: none;
}

.fds-tree-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 6px;
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
}

.fds-tree-item:focus {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.fds-tree-item.selected {
  background: var(--error-bg);
}

.fds-tree-item.focused {
  background: var(--surface-2);
}

.fds-tree-item.child {
  padding-left: 30px;
}

.fds-tree-hint {
  padding: 8px 6px 2px;
  font-size: 10px;
  color: var(--text-faint);
}

/* ---- Zone d'aperçu de document (placeholder visuel) — fiche document,
   bannette de validation. Dupliquée à l'identique dans plusieurs écrans GED. ---- */
.fds-doc-preview {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--text-faint);
  flex-direction: column;
  gap: 8px;
}

/* ---- Puce à bascule multi-sélection (chip toggle) — types d'activité,
   services proposés, sources d'acquisition. Revient à l'identique dans
   plusieurs écrans CRM ; formalisée ici plutôt que redupliquée en inline. ---- */
.fds-chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}

.fds-chip-toggle.on {
  border-color: var(--brand);
  background: var(--error-bg);
  color: var(--brand);
}

.fds-chip-toggle.on.info {
  border-color: var(--info);
  background: #eef4ff;
  color: var(--info);
}

/* ---- Sélecteur d'intensité à points (niveau d'intérêt, priorité, etc.) ---- */
.fds-rating {
  display: flex;
  gap: 6px;
}

.fds-rating-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
}

.fds-rating-dot.on {
  background: var(--brand);
  border-color: var(--brand);
}

/* ---- Tableau de rapport financier ----
   Structure : .report-table > table > thead / tbody / tfoot
   Groupes de comptes, sous-totaux et total général. */
.report-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.report-table .table-scroll {
  overflow-x: auto;
}

.report-table table {
  min-width: 100%;
}

.report-table th {
  white-space: nowrap;
}

.report-table td {
  white-space: nowrap;
  font-size: 12.5px;
}

.report-table td.wrap {
  white-space: normal;
}

.report-table td.acc-code {
  font-family: ui-monospace, 'SF Mono', monospace;
  color: var(--text-muted);
  font-weight: 500;
}

/* Ligne d'en-tête de groupe (ex : "Classe 4 — Comptes de tiers") */
.report-table tr.rt-group td {
  background: var(--surface-3);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom: none;
}

/* Ligne de sous-total de groupe */
.report-table tr.rt-subtotal td {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Pied de tableau : total général */
.report-table tfoot tr {
  background: var(--surface-2);
  border-top: 2px solid var(--border);
}

.report-table tfoot td {
  font-weight: 700;
  color: var(--primary);
  border-bottom: none;
  padding-top: 10px;
  padding-bottom: 10px;
}

.report-table tfoot td.grand-val {
  font-size: 13px;
}

.report-table .table-caption {
  font-size: 11.5px;
  color: var(--text-faint);
  margin: 10px 2px 0;
}

/* ---- États financiers deux colonnes (Bilan : Actif / Passif) ---- */
.statement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .statement-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Bandeau résultat (Résultat net de l'exercice) ----
   Extension de .banner-dark pour afficher label + montant. */
.banner-dark.result-banner {
  padding: 14px 16px;
}

.result-banner .result-label {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.result-banner .result-value {
  font-size: 18px;
  font-weight: 700;
}

.result-banner .result-value.positive {
  color: #7fd99a;
}

.result-banner .result-value.negative {
  color: #f6a3a3;
}

/* ---- Ligne d'écriture (Journal / Brouillard / Nouvelle Saisie) ---- */
.entry-row td.debit,
.entry-row td.credit {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.entry-row td.debit:not(:empty) {
  color: var(--text);
}

.entry-row td.credit:not(:empty) {
  color: var(--text);
}

/* ---- Statut de lettrage / validation ---- */
.badge-lettrage {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
}

/* ==========================================================================
   FDS — SAISIE D'ÉCRITURES (Nouvelle Saisie) & MODALES GÉNÉRIQUES
   ========================================================================== */

/* ---- Bandeau de saisie type tableur (une ligne de champs compacts) ---- */
.entry-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.line-input {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  flex-shrink: 0;
}

.line-input:focus {
  outline: none;
  border-color: var(--primary);
}

.line-input.mono {
  font-family: ui-monospace, 'SF Mono', monospace;
  color: var(--text);
}

.line-input.grow {
  flex: 1;
  min-width: 160px;
}

.line-input.align-right {
  text-align: right;
}

/* ---- Barre d'outils de la grille (Nouveau / Supprimer / Enregistrer) ---- */
.entry-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

/* ---- Ligne enregistrée (validée), surlignée en vert clair ---- */
tr.saved-row {
  cursor: pointer;
  border-bottom: 1px solid var(--success-border);
}

tr.saved-row td {
  color: var(--success);
  border-bottom: 1px solid var(--success-border);
}

tr.saved-row td.label-cell {
  color: var(--text);
}

tr.saved-row td.amount-cell {
  color: var(--primary);
  font-weight: 600;
}

tr.saved-row a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

tr.saved-row.selected {
  background: var(--surface-3);
}

/* ---- Résumé de solde (footer fixe type wizard-footer) ---- */
.balance-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1020;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-top: 1px solid var(--border);
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  background: var(--surface);
  box-shadow: 0 -4px 16px rgba(7, 25, 35, 0.08);
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 16px;
}

.balance-summary.balanced {
  border-top-color: var(--success-border);
  background: var(--success-bg);
}

.balance-summary.unbalanced {
  border-top-color: var(--error-border);
  background: var(--error-bg);
}

.balance-summary .bs-lbl {
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.balance-summary .bs-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.balance-summary .bs-group {
  display: flex;
  gap: 24px;
  align-items: center;
}

.balance-summary .bs-group>div {
  text-align: right;
}

.balance-summary .bs-group .bs-val {
  font-size: 14px;
}

/* ==========================================================================
   FDS — MODALES GÉNÉRIQUES (impression, aperçu, confirmation…)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--primary) 45%, transparent);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--fds-space-stack-lg);
}

.modal-overlay.preview {
  background: color-mix(in srgb, var(--primary) 55%, transparent);
  z-index: 1300;
}

/* Classe de base manquante dans la feuille reçue : .modal.modal-lg l'étend
   mais elle n'était pas définie elle-même. Restaurée ici avec les valeurs
   historiques du design system. */
.modal {
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal.modal-lg {
  max-width: 900px;
  height: 85vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 10px !important;
  background: #071923 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0;
  box-sizing: border-box !important;
}

.modal-head .modal-title {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #ffffff !important;
  margin: 0 !important;
}

.modal-head .modal-subtitle {
  font-size: 10.5px !important;
  line-height: 1 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin: 0 0 0 8px !important;
  display: inline-block !important;
}

.modal-close {
  border: none;
  background: transparent;
  color: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0.85;
  transition: opacity var(--fds-transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover {
  opacity: 1;
}

.modal-close .material-symbols-outlined {
  font-size: 16px !important;
  color: #ffffff !important;
}

.modal-body {
  padding: var(--fds-space-stack-md) var(--fds-space-gutter);
  display: flex;
  flex-direction: column;
  gap: var(--fds-space-stack-md);
}

.modal-body.no-gap {
  padding: 0;
  flex: 1;
  overflow: hidden;
}

.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.modal-foot {
  padding: var(--fds-space-stack-md) var(--fds-space-gutter);
  border-top: 1px solid var(--border, var(--fds-outline-variant));
  display: flex;
  justify-content: flex-end;
  gap: var(--fds-space-stack-sm);
  flex-shrink: 0;
}

/* ---- Bouton destination (grille dans la modale d'impression) ---- */
.dest-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.dest-option .material-symbols-outlined {
  font-size: 19px;
  color: var(--text-muted);
}

.dest-option.selected {
  border-color: var(--brand);
  background: var(--error-bg);
  color: var(--brand);
}

.dest-option.selected .material-symbols-outlined {
  color: var(--brand);
}

/* ---- Barre d'outils de l'aperçu (zoom, pagination, export) ---- */
.preview-toolbar {
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.preview-toolbar .zoom-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-toolbar .zoom-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  width: 44px;
  text-align: center;
}

.preview-toolbar .page-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.preview-canvas {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 24px;
  background: var(--surface-3);
}

.preview-sheet {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  max-width: 800px;
  min-width: 400px;
  padding: 32px;
  flex-shrink: 0;
  color: #0d1b29;
}

/* ---- Tom Select Styling (matching .field input:where(:not([type="search"])), .field select, .field textarea) ---- */
select.fds-select,
select.form-control-underline,
.fds-select .ts-control,
.ts-wrapper .ts-control,
.ts-control {
  font-family: var(--font) !important;
  font-size: 12.5px !important;
  padding: 7px 2.25rem 7px 10px !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  min-height: 35px !important;
  display: flex !important;
  align-items: center !important;
  text-transform: none;
}

.ts-wrapper.focus .ts-control,
.ts-control:focus,
.ts-wrapper.input-active .ts-control {
  outline: 2px solid var(--brand) !important;
  outline-offset: -1px !important;
  border-color: var(--brand) !important;
  box-shadow: none !important;
}

.ts-wrapper .ts-control > input {
  font-family: var(--font) !important;
  font-size: 12.5px !important;
  color: var(--text) !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
}

.ts-wrapper.has-items .ts-control > input::placeholder,
.fds-select.has-items .ts-control > input::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

.ts-wrapper .ts-control .item,
.fds-select .ts-control .item {
  font-family: var(--font) !important;
  font-size: 12.5px !important;
  color: var(--text) !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.ts-dropdown {
  z-index: 2147483647 !important;
  font-family: var(--font) !important;
  font-size: 12.5px !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  margin-top: 4px !important;
  padding: 4px 0 !important;
}

.ts-dropdown .option {
  font-family: var(--font) !important;
  font-size: 12.5px !important;
  padding: 6px 10px !important;
  color: var(--text) !important;
}

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
  background: var(--surface-3) !important;
  color: var(--brand) !important;
}



/* Annulation des styles par défaut du navigateur pour les boutons segmentés */
.segmented button.seg-item {
    border: none;
    font-family: inherit;
    padding: 5px 10px;
    margin: 0;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Conserver l'effet au survol et l'état actif */
.segmented button.seg-item:focus {
    outline: none;
}

.segmented button.seg-item:not(.active) {
    background: transparent;
    box-shadow: none;
}

/* Purchase order lines: keep controls within their aligned grid columns. */
.purchase-order-create .po-lines-grid > * { min-width:0; }
.purchase-order-create .po-lines-grid input:not([type="hidden"]),
.purchase-order-create .po-lines-grid select { width:100%; max-width:100%; box-sizing:border-box; }
.purchase-order-create .po-lines-grid [data-line-total] { white-space:nowrap; font-variant-numeric:tabular-nums; }
.purchase-order-create .po-lines-grid .autocomplete .search,
.purchase-order-create .po-lines-grid input[data-article],
.purchase-order-create .po-lines-grid input[name$="[name]"] {
  background:#fff;
  color:#16212b;
}
.purchase-order-create .po-lines-grid .autocomplete .search { width:100%; min-width:0; }
.purchase-order-create .po-lines-grid input[data-article] { flex:1; min-width:0; }

/* Opt-in Choices.js fields: data-fds-choices="true". */
.fds-choices { position:relative; min-width:0; width:100%; font-family:var(--font); font-size:12.5px; }
.fds-choices .choices__inner { padding:7px 10px; min-height:35px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); }
.fds-choices.is-focused .choices__inner { outline:2px solid var(--brand); outline-offset:-1px; }
.fds-choices .choices__list--multiple { display:inline-flex; flex-wrap:wrap; gap:4px; }
.fds-choices .choices__list--multiple .choices__item { display:inline-flex; align-items:center; gap:6px; padding:2px 6px; border-radius:3px; background:var(--surface-2); color:var(--primary); }
.fds-choices .choices__button { border:0; border-left:1px solid var(--border); padding:0 0 0 5px; background:transparent; color:inherit; cursor:pointer; font-size:0; }
.fds-choices .choices__button::after { content:'×'; font-size:15px; }
.fds-choices .choices__input--cloned { padding:3px; border:0; background:transparent; color:var(--text); font:inherit; min-width:90px; max-width:100%; }
.fds-choices .choices__list--dropdown { display:none; position:absolute; left:0; right:0; top:100%; z-index:1060; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); box-shadow:0 8px 20px rgba(13,27,41,.12); }
.fds-choices .choices__list--dropdown.is-active { display:block; }
.fds-choices.is-flipped .choices__list--dropdown { top:auto; bottom:100%; }
.fds-choices .choices__list--dropdown .choices__list { max-height:260px; overflow-y:auto; }
.fds-choices .choices__list--dropdown .choices__item { padding:8px 10px; }
.fds-choices .choices__item--selectable { cursor:pointer; }
.fds-choices .choices__item--selectable.is-highlighted { background:var(--surface-2); }
.fds-choices.is-disabled { opacity:.6; }
.fds-choices [hidden] { display:none !important; }
/* Order details follow the purchase mockup; the QR stays beside the metadata. */
.purchase-order-details { padding:16px; display:grid; grid-template-columns:minmax(0,1fr) 120px; gap:14px 18px; border-bottom:1px solid var(--surface-3); font-size:12px; align-items:start; }
.purchase-order-details-heading { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline; min-width:0; }
.purchase-order-details-info { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px 18px; min-width:0; overflow-wrap:anywhere; }
.purchase-order-details-qr { grid-column:2; grid-row:1 / span 2; display:flex; flex-direction:column; align-items:center; gap:4px; }
.invoice-document-details { padding:16px; display:grid; grid-template-columns:minmax(0,1fr) 120px; gap:14px 18px; border-bottom:1px solid var(--surface-3); font-size:12px; align-items:start; }
.invoice-document-details-heading { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline; min-width:0; }
.invoice-document-details-info { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px 18px; min-width:0; overflow-wrap:anywhere; }
.invoice-document-details-qr { grid-column:2; grid-row:1 / span 2; display:flex; flex-direction:column; align-items:center; gap:4px; }
.invoice-document-details-qr [data-fds-qrcode] > svg { width:96px; height:96px; display:block; }
[data-sales-delivery-wizard] [hidden] { display:none !important; }
@media (max-width:600px) {
    .invoice-document-details { grid-template-columns:minmax(0,1fr); }
    .invoice-document-details-qr { grid-column:1; grid-row:auto; }
    .invoice-document-details-info { grid-row:2; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); }
}
@media (max-width:600px) {
    .purchase-order-details { grid-template-columns:minmax(0,1fr); }
    .purchase-order-details-qr { grid-column:1; grid-row:auto; }
    .purchase-order-details-info { grid-row:2; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); }
}
.purchase-request-create .pr-lines-grid { grid-template-columns:minmax(300px,2fr) 150px minmax(130px,1fr) minmax(140px,1fr) 30px; }
.purchase-request-create .pr-lines-grid > * { min-width:0; }
.purchase-request-create .pr-lines-grid input:not([type="hidden"]),
.purchase-request-create .pr-lines-grid select { width:100%; max-width:100%; box-sizing:border-box; }
.purchase-request-create .pr-lines-grid .search { width:100%; min-width:0; background:var(--surface); }
.purchase-request-create .pr-lines-grid input[data-article] { flex:1; min-width:0; background:var(--surface); color:var(--text); }
.purchase-request-create .pr-lines-grid [data-line-total] { white-space:nowrap; }
.purchase-reception-create .rc-lines-grid { grid-template-columns:minmax(300px,2fr) minmax(180px,1fr) 30px; }
.purchase-reception-create .rc-lines-grid.linked { grid-template-columns:minmax(280px,2fr) 80px 80px 180px 130px 30px; }
.purchase-reception-create .rc-lines-grid > * { min-width:0; }
.purchase-reception-create .rc-lines-grid input:not([type="hidden"]),
.purchase-reception-create .rc-lines-grid select { width:100%; max-width:100%; box-sizing:border-box; }
.purchase-reception-create .rc-lines-grid .search { width:100%; min-width:0; background:var(--surface); }
.purchase-reception-create .rc-lines-grid input[data-article] { flex:1; min-width:0; background:var(--surface); color:var(--text); }


/* >>> RH-MODULE (généré) */
/* ---------------------------------------------------------------------------
   Module RH — chrome : topbar (recherche, notifications, utilisateur) et
   sous-navigation à menus déroulants (équivalent du composant HRNav).
   Markup : .subnav.subnav-wrap > a | .dropdown[data-dropdown] > a.fds-subnav-link[data-dropdown-toggle] + .dropdown-menu
   --------------------------------------------------------------------------- */
/* L'attribut hidden doit toujours l'emporter sur les display définis par les classes */
[hidden] { display: none !important; }
.topbar-sep { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }
.topbar-right { gap: 2px; }
.topbar-right .topbar-sep { margin: 0 8px; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-user .who { text-align: right; line-height: 1.2; }
.topbar-user .name { font-size: 12px; font-weight: 600; color: var(--text); }
.topbar-user .role { font-size: 10.5px; color: var(--text-faint); }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.icon-btn.bordered { border-color: var(--border); }
.icon-btn.bordered:hover { background: var(--surface-2); }
.icon-btn .material-symbols-outlined { font-size: 19px; }

.subnav.subnav-wrap { flex-wrap: wrap; overflow: visible; position: relative; z-index: 40; }
.subnav.subnav-wrap > a, .subnav .fds-subnav-link { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.subnav .fds-subnav-link { padding: 10px 8px 10px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.subnav .fds-subnav-link.active { color: var(--brand); border-bottom-color: var(--brand); }
.subnav .fds-subnav-link:hover:not(.active) { color: var(--primary); }
.subnav > .dropdown.open > .fds-subnav-link { background: var(--surface-2); }
.subnav a .material-symbols-outlined, .subnav .fds-subnav-link > .material-symbols-outlined { font-size: 17px; }
.subnav .fds-subnav-link .caret { color: var(--text-faint); }
.subnav .dropdown-menu { min-width: 250px; max-width: 330px; padding: 6px; margin-top: -1px; }
.subnav .dropdown-menu .dropdown-header { padding: 6px 10px 8px; }
.subnav .dropdown-menu .dropdown-header-sep { margin: 6px 4px 2px; padding: 8px 6px 4px; border-top: 1px solid var(--surface-3); font-size: 10px; }
.subnav .dropdown-menu .dropdown-item { padding: 7px 10px; gap: 10px; border-bottom: none; border-left: none; border-radius: var(--radius); font-size: 12.5px; font-weight: 500; color: var(--text); }
.subnav .dropdown-menu .dropdown-item:hover { background: var(--surface-2); color: var(--primary); }
.subnav .dropdown-menu .dropdown-item.active { background: var(--surface-2); color: var(--primary); font-weight: 700; border-bottom: none; }
.subnav .dropdown-menu .dropdown-item .material-symbols-outlined { font-size: 17px; }
.subnav .dropdown-menu .dropdown-item .tag { margin-left: auto; padding-left: 12px; font-size: 10.5px; color: var(--text-faint); }

/* Modales : la feuille de base ne donne ni fond ni ombre à .modal (le tiroir .drawer en a un).
   Sans cela le contenu de la page transparaît à travers la fenêtre. */
.modal { background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(7, 25, 35, .28); }
/* Bootstrap : .modal est le conteneur plein écran (.modal.fade.show) ; seule la fenêtre .modal-content a un fond. */
.modal:has(> .modal-dialog) { background: transparent; box-shadow: none; }
.modal > .modal-dialog > .modal-content { background: var(--surface); color: var(--text); }

/* ---------------------------------------------------------------------------
   Module RH — collections (liste / grille / panneau latéral).
   Utilisé par js/fds-collection.js : KPI filtrants, cellules typées
   (personne, badge, progression, étoiles), cartes d'entité, panneau de détail.
   --------------------------------------------------------------------------- */
/* Teintes sémantiques : --tone alimente valeur, icône et état actif d'un KPI */
.tone-success { --tone: var(--success); }
.tone-warning { --tone: var(--warning); }
.tone-info { --tone: var(--info); }
.tone-error { --tone: var(--error); }
.tone-other { --tone: var(--other); }
.tone-neutral { --tone: var(--text-muted); }
.tone-teal { --tone: var(--teal); }

.kpi-row.auto { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 14px; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi-head .material-symbols-outlined { font-size: 17px; color: var(--tone, var(--text-faint)); }
.kpi-head + .val { margin-top: 3px; }
.kpi .val { color: var(--tone, var(--primary)); }
.kpi .sub { font-size: 11px; color: var(--text-faint); }
.kpi.clickable:hover { border-color: var(--text-faint); }
.kpi.clickable:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.kpi.is-active, .kpi.is-active:hover { border-color: var(--tone, var(--primary)); box-shadow: 0 0 0 1px var(--tone, var(--primary)); }

.filters-bar .count { margin-left: auto; font-size: 12px; color: var(--text-faint); align-self: center; }
.filters-bar .field.grow { flex: 1; min-width: 200px; max-width: 340px; }
.filters-bar .link { font-size: 12px; font-weight: 600; cursor: pointer; color: var(--brand); align-self: center; }

.avatar.soft { background: var(--surface-3); color: var(--primary); font-size: 10.5px; }
.avatar.sq { border-radius: var(--radius-md); }
.avatar.lg { width: 32px; height: 32px; font-size: 11px; }

.fds-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-sub { font-size: 10.5px; color: var(--text-faint); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-main { font-weight: 500; }
.cell-main.cell-strong { font-weight: 700; }
.fds-stars { color: #d9a400; letter-spacing: 1px; white-space: nowrap; }
.fds-stars + .mono { font-size: 11px; margin-left: 4px; }
.fds-progress-cell { display: flex; flex-direction: column; gap: 3px; min-width: 110px; }
.fds-progress-cell .cell-sub { color: var(--text-muted); }
.progress.success > div { background: var(--success); }
.progress.warning > div { background: var(--warning); }
.progress.error > div { background: var(--error); }
.progress.info > div { background: var(--info); }
.progress.thin { height: 5px; border-radius: 2px; }
.report-table td.actions { text-align: right; width: 1%; }
.report-table td.actions .icon-btn { width: 28px; height: 28px; display: inline-flex; vertical-align: middle; }
.report-table td.actions .icon-btn .material-symbols-outlined { font-size: 16px; }
.report-table tr.row-link { cursor: pointer; }
.report-table tr.row-link:hover td { background: var(--surface-2); }
.fds-empty { padding: 30px; text-align: center; color: var(--text-faint); }

/* Grille de cartes d'entité */
.fds-entity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fds-entity-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.fds-entity-card:hover { border-color: var(--text-faint); }
.fds-entity-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.fds-entity-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fds-entity-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fds-entity-id > div { min-width: 0; }
.fds-entity-title { font-weight: 700; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-entity-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
.fds-entity-fields .k { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
.fds-entity-fields .v { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Panneau latéral : consultation / création */
.drawer-kicker { font-size: 10.5px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.drawer-title { font-size: 15px; font-weight: 700; color: var(--primary); }
.drawer-foot.end { justify-content: flex-end; }
.fds-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; }
.fds-detail-grid .k { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-faint); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .03em; }
.fds-detail-grid .v { font-size: 13px; font-weight: 600; color: var(--text); }
.fds-note { font-size: 12.5px; color: var(--text); background: var(--bg); border-radius: var(--radius); padding: 10px 12px; text-wrap: pretty; }
.drawer-actions { display: flex; flex-direction: column; gap: 6px; }
.drawer-actions .btn { justify-content: flex-start; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.drawer-actions .btn.danger { color: var(--brand); }
.drawer-form { display: flex; flex-direction: column; gap: 12px; }
.field label .req { color: var(--brand); }
.field textarea { resize: vertical; }

.page.wide { max-width: 1400px; }
.page.xl { max-width: 1440px; }
.page.narrow { max-width: 1000px; }
.page.w-900 { max-width: 900px; }
.page.w-960 { max-width: 960px; }
.page.w-980 { max-width: 980px; }
.page.w-1000 { max-width: 1000px; }
.page.w-1100 { max-width: 1100px; }
.page.w-1200 { max-width: 1200px; }
.tone-text { color: var(--tone, inherit); }
.fds-result { text-align: center; padding: 36px 20px; }
.fds-result > .material-symbols-outlined { font-size: 44px; color: var(--tone, var(--success)); }
.fds-result h2 { margin: 6px 0 4px; font-size: 17px; color: var(--primary); }
.fds-result p { margin: 0 0 16px; font-size: 12.5px; color: var(--text-muted); }
.wizard-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.wizard-nav .note { flex: 1; font-size: 12px; color: var(--text-faint); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------------------
   Module RH — formulaires : validation, zones de dépôt compactes, pied de page fixe.
   --------------------------------------------------------------------------- */
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); background: var(--error-bg); }
.field.invalid label { color: var(--error); }
.dropzone.compact { padding: 16px; text-align: center; background: var(--surface-2); cursor: pointer; font-size: 12px; }
.dropzone.compact .cell-strong { color: var(--text); font-weight: 600; }
.dropzone.compact:hover { border-color: var(--text-faint); }
.form-stack { display: flex; flex-direction: column; gap: 14px; padding-bottom: 70px; }
.form-stack .panel { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) { .form-grid, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); } .form-grid .span-2 { grid-column: auto; } }
.actions-cell { display: inline-flex; gap: 2px; justify-content: center; }
.actions-cell .icon-btn { width: 26px; height: 26px; }
.actions-cell .icon-btn .material-symbols-outlined { font-size: 17px; }
.filters-bar .grow { flex: 1; min-width: 200px; }

/* ---------------------------------------------------------------------------
   Module RH — fiche profil (employé, candidat) : bandeau d'identité, onglets en
   pastilles, statistiques, grilles clé/valeur, calendrier, historique, compétences.
   --------------------------------------------------------------------------- */
.tabs.pills { gap: 4px; border-bottom: none; margin-bottom: 0; padding: 12px 0; }
.tabs.pills button, .tabs.pills > a { padding: 7px 12px; border-radius: var(--radius); border-bottom: none; }
.tabs.pills button.active, .tabs.pills > a.active { background: var(--brand); color: #fff; }
.tabs.pills button:hover:not(.active), .tabs.pills > a:hover:not(.active) { background: var(--surface-2); }

.fds-profile-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.fds-profile-head .inner { max-width: 1400px; margin: 0 auto; padding: 16px 20px 0; }
.fds-profile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.fds-profile-id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.fds-avatar-xl { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex-shrink: 0; }
.fds-avatar-xl .presence { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
.fds-profile-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fds-profile-name h1 { margin: 0; font-size: 21px; font-weight: 700; color: var(--primary); letter-spacing: -.01em; }
.fds-profile-title { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.fds-profile-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-faint); }
.fds-profile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fds-profile-meta .material-symbols-outlined { font-size: 15px; }
.fds-profile-actions { display: flex; gap: 8px; align-items: center; position: relative; }
.fds-profile-actions .btn.icon-only { width: 36px; padding: 8px 0; display: inline-flex; justify-content: center; }

.fds-stat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-stat > .material-symbols-outlined { font-size: 22px; color: var(--tone, var(--text-faint)); }
.fds-stat .lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; color: var(--text-faint); }
.fds-stat .val { font-size: 16px; font-weight: 700; color: var(--primary); }
.fds-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }

.fds-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.fds-split > div { min-width: 0; }
@media (max-width: 960px) { .fds-split { grid-template-columns: minmax(0, 1fr); } }
.fds-split .panel { margin-bottom: 14px; }
.panel-head.is-dark { background: var(--primary); color: #fff; border-bottom: none; }
.panel-head.is-dark h2, .panel-head.is-dark .sub { color: #fff; }
.panel-head.is-dark .sub { font-size: 11px; opacity: .75; font-weight: 400; }
.panel-head a.link { font-size: 12px; font-weight: 600; color: var(--brand); }

.fds-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--min, 200px), 1fr)); gap: 14px 16px; }
.fds-kv-grid .k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); margin-bottom: 2px; }
.fds-kv-grid .v { font-size: 13px; font-weight: 500; color: var(--text); }
.fds-kv-grid .v.strong { font-weight: 700; }
.fds-kv-grid .n { font-size: 11px; color: var(--tone, var(--text-faint)); }
.fds-kv-box { background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); padding: 10px 12px; }

.fds-rows > * { display: grid; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--surface-3); font-size: 12.5px; }
.fds-rows > *:last-child { border-bottom: none; }
.fds-rows > a { color: var(--text); }
.fds-rows > a:hover { background: var(--surface-2); }
.fds-rows .total { background: var(--surface-2); font-weight: 700; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.fds-rows .sub { font-size: 10.5px; color: var(--text-faint); }
.fds-rows .m { color: var(--text-muted); }

/* Calendrier mensuel */
.fds-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fds-cal .dow { font-size: 10.5px; font-weight: 700; color: var(--text-faint); text-align: center; }
.fds-cal .day { height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 12px; font-weight: 600; background: var(--surface); color: var(--text-faint); }
.fds-cal .day.pre { background: var(--success-bg); color: var(--success); }
.fds-cal .day.ret { background: var(--warning-bg); color: var(--warning); }
.fds-cal .day.abs { background: var(--error-bg); color: var(--error); }
.fds-cal .day.mis { background: var(--info-bg); color: var(--info); }
.fds-cal .day.cng { background: var(--other-bg); color: var(--other); }
.fds-cal .day.we { background: var(--bg); color: #c3ccd4; }
.fds-cal .day.today { outline: 2px solid var(--primary); outline-offset: -2px; }
.fds-cal.solid .day.pre { background: var(--success); color: #fff; }
.fds-cal.solid .day.ret { background: #d9a400; color: #fff; }
.fds-cal.solid .day.abs { background: var(--error); color: #fff; }
.fds-cal.solid .day.mis { background: var(--other); color: #fff; }
.fds-cal.solid .day.cng { background: var(--info); color: #fff; }
.fds-cal.solid .day.we { background: var(--bg); color: #c3ccd4; }
.fds-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--text-muted); }
.fds-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.fds-legend .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--bg); }
.fds-legend .sw.pre { background: var(--success-bg); border: 1px solid var(--success); }
.fds-legend .sw.ret { background: var(--warning-bg); border: 1px solid var(--warning); }
.fds-legend .sw.abs { background: var(--error-bg); border: 1px solid var(--error); }
.fds-legend .sw.mis { background: var(--info-bg); border: 1px solid var(--info); }
.fds-legend .sw.cng { background: var(--other-bg); border: 1px solid var(--other); }
.fds-legend .sw.we { background: var(--bg); border: 1px solid var(--border); }
.fds-legend .sw.today { background: var(--surface); border: 2px solid var(--primary); }

/* Parcours / historique */
.fds-hist-row { display: grid; grid-template-columns: 90px 28px minmax(0, 1fr); gap: 10px; }
.fds-hist-row .d { font-size: 11.5px; color: var(--text-faint); padding-top: 3px; }
.fds-hist-row .rail { display: flex; flex-direction: column; align-items: center; }
.fds-hist-row .ico { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tone-bg, var(--surface-3)); color: var(--tone, var(--text-muted)); }
.fds-hist-row .ico .material-symbols-outlined { font-size: 14px; }
.fds-hist-row .line { flex: 1; width: 1px; background: var(--border); margin-top: 2px; }
.fds-hist-row:last-child .line { display: none; }
.fds-hist-row .t { font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-hist-row .x { font-size: 12px; color: var(--text-muted); padding-bottom: 14px; }
.tone-success { --tone-bg: var(--success-bg); }
.tone-info { --tone-bg: var(--info-bg); }
.tone-error { --tone-bg: var(--error-bg); }
.tone-warning { --tone-bg: var(--warning-bg); }
.tone-brand { --tone: var(--brand); --tone-bg: var(--error-bg); }

/* Compétences : niveau en 5 segments */
.fds-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 5px; }
.fds-bars > span { height: 5px; border-radius: 2px; background: var(--surface-3); }
.fds-bars > span.on { background: var(--brand); }
.fds-skill .top { display: flex; justify-content: space-between; font-size: 12.5px; }
.fds-skill .top .lv { color: var(--text-faint); font-size: 11.5px; }

.fds-contact { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 12.5px; }
.fds-contact > .material-symbols-outlined { font-size: 18px; color: var(--text-faint); }
.fds-contact .k { font-size: 10.5px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; }
.fds-contact .v { word-break: break-word; }
.fds-urgent { background: var(--bg); border-radius: var(--radius-md); padding: 10px 12px; margin-top: 8px; }
.fds-urgent .h { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--brand); margin-bottom: 3px; }
.fds-urgent .h .material-symbols-outlined { font-size: 16px; }
.fds-linkrow { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--surface-3); color: var(--text); font-size: 12.5px; }
.fds-linkrow:last-child { border-bottom: none; }
.fds-linkrow > span { display: inline-flex; align-items: center; gap: 8px; }
.fds-linkrow .material-symbols-outlined { font-size: 17px; color: var(--text-faint); }
.fds-linkrow:hover { color: var(--primary); }
.fds-foot-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0 0; margin-top: 4px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-faint); }

/* ---------------------------------------------------------------------------
   Module RH — présence : horloge de pointage, listes de pointages, mini-statistiques,
   barres de répartition, cartes-filtres d'équipe.
   --------------------------------------------------------------------------- */
.fds-clock-date { font-size: 12.5px; color: var(--text-muted); }
.fds-clock { font-size: 44px; font-weight: 700; color: var(--primary); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0 8px; }
.fds-punch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.fds-punch-grid .btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 10px; font-size: 13px; font-weight: 700; }
.fds-punch-grid .btn .material-symbols-outlined { font-size: 18px; }
.btn-outline-brand { color: var(--brand); }
.fds-card-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); margin-bottom: 6px; display: block; }
.fds-list > * { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--surface-3); }
.fds-list > *:last-child { border-bottom: none; }
.fds-list .grow { flex: 1; min-width: 0; }
.fds-list .t { font-size: 12.5px; font-weight: 600; color: var(--text); }
.fds-list .s { font-size: 11px; color: var(--text-faint); }
.fds-mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.fds-mini-stat { background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 12px; }
.fds-mini-stat .lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; color: var(--text-faint); }
.fds-mini-stat .val { font-size: 17px; font-weight: 700; color: var(--tone, var(--primary)); }
.fds-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.fds-two > .card, .fds-two > .panel { margin-bottom: 0; }
.fds-card-title { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.fds-sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1010; background: var(--surface); border-top: 1px solid var(--border); }
.fds-sticky-bar .inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Maître / détail (profils horaires) */
.fds-masterdetail { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .fds-masterdetail { grid-template-columns: minmax(0, 1fr); } }
.fds-master-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.fds-master-item { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: none; border-bottom: 1px solid var(--surface-3); border-left: 3px solid transparent; padding: 12px 14px; cursor: pointer; }
.fds-master-item:last-child { border-bottom: none; }
.fds-master-item:hover { background: var(--surface-2); }
.fds-master-item.is-active { background: var(--surface-2); border-left-color: var(--brand); }
.fds-master-item .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 3px; }
.fds-master-item .name { font-weight: 700; color: var(--primary); }
.fds-master-item .meta { font-size: 12px; color: var(--text-muted); }
.fds-master-item .sub { font-size: 11px; color: var(--text-faint); }
.fds-detail-stack > .panel { margin-bottom: 14px; }
.fds-day-toggles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fds-day-toggle { width: 44px; height: 36px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text-faint); font-family: var(--font); font-size: 12px; font-weight: 700; cursor: pointer; }
.fds-day-toggle.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.fds-static-value { font-size: 15px; font-weight: 700; color: var(--primary); padding: 7px 0; }
.fds-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--min, 150px), 1fr)); gap: 14px; margin-bottom: 14px; }
.panel-head .title { font-size: 13.5px; font-weight: 700; color: var(--primary); }

/* Onglets dans un panneau / cartes de catégorie / rapports */
.tabs.in-panel { margin: 0; padding: 0 14px; background: var(--surface); }
.tabs.in-panel button { padding: 12px 2px; }
.fds-cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fds-cat-card { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; cursor: pointer; }
.fds-cat-card:hover { border-color: var(--text-faint); }
.fds-cat-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.fds-cat-card .lbl { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.fds-cat-card .val { font-size: 19px; font-weight: 700; color: var(--primary); margin-top: 3px; }
.fds-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--tone, var(--text-faint)); }
.fds-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fds-report-card { display: flex; flex-direction: column; gap: 10px; }
.fds-report-card .t { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary); }
.fds-report-card .t .material-symbols-outlined { color: var(--text-faint); }
.fds-report-card p { margin: 0; flex: 1; color: var(--text-muted); font-size: 12.5px; }
.fds-report-card .btn { align-self: flex-start; }
.fds-date-tile { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--surface-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fds-date-tile .material-symbols-outlined { color: var(--brand); font-size: 20px; }
.fds-upcoming { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fds-upcoming .card { display: flex; align-items: center; gap: 12px; }

/* Circuit de validation */
.fds-circuit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fds-circuit-step { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.fds-circuit-step .n { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fds-circuit-step .t { font-size: 12.5px; font-weight: 700; color: var(--primary); }
.fds-circuit-step .s { font-size: 11px; color: var(--text-faint); }
.fds-circuit > .material-symbols-outlined { font-size: 18px; color: var(--text-faint); }
.btn.dashed { border-style: dashed; color: var(--text-muted); background: var(--surface); }
.fds-dots { display: flex; gap: 3px; margin-bottom: 3px; }
.fds-dots > span { width: 22px; height: 4px; border-radius: 2px; background: var(--border); }
.fds-dots > span.done { background: var(--success); }
.fds-dots > span.cur { background: var(--warning); }
.fds-dots > span.rej { background: var(--error); }

/* ---------------------------------------------------------------------------
   Module RH — tableaux de bord : barres de répartition, carte thermique,
   calendrier mensuel plein, actions rapides, listes de suivi.
   --------------------------------------------------------------------------- */
.filters-bar .spacer { flex: 1; }
.progress.soft-success > div { background: #5cb87f; }
.progress.amber > div { background: #d9a400; }

.fds-bar-rows { display: flex; flex-direction: column; gap: 10px; }
.fds-bar-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 4px; }
.fds-bar-row .top b { font-weight: 600; color: var(--text); }
.fds-bar-row .top span { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.fds-heat-wrap { overflow-x: auto; }
.fds-heat { display: grid; grid-template-columns: 170px repeat(4, minmax(60px, 1fr)); gap: 4px; min-width: 440px; align-items: center; }
.fds-heat .wk { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-faint); }
.fds-heat .rowlbl { font-size: 12px; font-weight: 600; color: var(--text); }
.fds-heat .cell { height: 26px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fds-heat .h1 { background: #f6c9c9; color: var(--text); }
.fds-heat .h2 { background: #a8d9b8; color: var(--text); }
.fds-heat .h3 { background: #5cb87f; color: #fff; }
.fds-heat .h4 { background: var(--success); color: #fff; }
.fds-heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-faint); }
.fds-heat-legend .sw { width: 12px; height: 12px; border-radius: 2px; }
.fds-heat-legend .h1 { background: #f6c9c9; }
.fds-heat-legend .h2 { background: #a8d9b8; }
.fds-heat-legend .h3 { background: #5cb87f; }
.fds-heat-legend .h4 { background: var(--success); }

.fds-cal .day.pad { background: transparent; }
.fds-cal .day.free { background: var(--surface); border: 1px solid var(--surface-3); color: var(--text-muted); }
.fds-cal .day.free.today { border-color: var(--primary); }
.fds-cal.solid .day.today { outline: 2px solid var(--primary); outline-offset: 1px; }
.fds-legend.solid .sw { border: none; }
.fds-legend.solid .sw.pre { background: var(--success); }
.fds-legend.solid .sw.ret { background: #d9a400; }
.fds-legend.solid .sw.cng { background: var(--info); }
.fds-legend.solid .sw.mis { background: var(--other); }
.fds-legend.solid .sw.abs { background: var(--error); }

.fds-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.fds-quick .btn { justify-content: center; text-align: center; padding: 10px; }
.fds-list .ic { font-size: 18px; color: var(--tone, var(--text-faint)); flex: none; }
.panel-head .link { font-size: 12px; font-weight: 600; }
.kpi-row.dense { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 14px; }
.fds-detail-stack > .card { margin-bottom: 14px; }
.fds-detail-stack > :last-child { margin-bottom: 0; }

/* Teintes : fond associé (puces d'icône, pastilles) */
.tone-success { --tone-bg: var(--success-bg); }
.tone-warning { --tone-bg: var(--warning-bg); }
.tone-info { --tone-bg: var(--info-bg); }
.tone-error { --tone-bg: var(--error-bg); }
.tone-other { --tone-bg: var(--other-bg); }
.tone-brand { --tone: var(--brand); --tone-bg: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
a.kpi { display: block; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--text-faint); }
.fds-icon-chip { width: 30px; height: 30px; border-radius: var(--radius); background: var(--tone-bg, var(--surface-3)); color: var(--tone, var(--primary)); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fds-icon-chip .material-symbols-outlined { font-size: 17px; }
.fds-icon-chip.lg { width: 32px; height: 32px; }
.fds-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.fds-card-head .fds-card-title { margin: 0; }
.fds-card-head .meta { font-size: 11.5px; color: var(--text-faint); }
.fds-card-head a { font-size: 12px; font-weight: 600; }
a.fds-row-link { color: var(--text); text-decoration: none; }
a.fds-row-link:hover { background: var(--surface-2); }
.fds-list .count { font-weight: 700; color: var(--tone, var(--primary)); }
.fds-list .chev { font-size: 18px; color: #b4bfc8; }
.fds-stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--surface-3); margin-top: 14px; padding-top: 12px; }
.fds-stat-strip .lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.fds-stat-strip .val { font-size: 15px; font-weight: 700; color: var(--text); }
.fds-agenda-row .date { width: 42px; text-align: center; flex: none; }
.fds-agenda-row .date .dow { font-size: 10px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; }
.fds-agenda-row .date .day { font-size: 16px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.fds-agenda-row .bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--tone, var(--primary)); flex: none; }
.fds-news-item { display: block !important; }
.fds-news-item .tx { font-size: 12px; color: var(--text-muted); margin: 1px 0; }

/* Mon espace */
.fds-hello { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.fds-hello .avatar-lg { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: none; }
.fds-hello .body { flex: 1; min-width: 200px; }
.fds-hello .hi { font-size: 12px; color: var(--text-muted); }
.fds-hello h1 { font-size: 19px; margin: 0; color: var(--primary); }
.fds-hello .role { font-size: 12.5px; color: var(--text-muted); }
.fds-hello .kvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 12px 0; }
.fds-hello .kvs .k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.fds-hello .kvs .v { font-size: 12.5px; font-weight: 600; }
.fds-hello .more { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.fds-hello .more .material-symbols-outlined { font-size: 16px; }
.fds-day { display: flex; flex-direction: column; height: 100%; }
.fds-day-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.fds-day-grid .k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.fds-day-grid .v { font-size: 17px; font-weight: 700; color: var(--tone, var(--primary)); }
.fds-day-grid .s { font-size: 11px; color: var(--text-faint); }
.fds-day-status { display: flex; align-items: center; gap: 6px; background: var(--success-bg); color: var(--success); border-radius: var(--radius); padding: 8px 10px; font-size: 12.5px; font-weight: 600; margin-bottom: 14px; }
.fds-day-status .material-symbols-outlined { font-size: 17px; }
.fds-day .btn-brand { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: auto; padding: 10px; font-weight: 700; }
.fds-day .foot { font-size: 11px; color: var(--text-faint); text-align: center; margin-top: 8px; }
.fds-quick-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fds-quick-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; font: inherit; font-weight: 700; font-size: 12.5px; color: var(--text); text-align: left; cursor: pointer; }
.fds-quick-card:hover { border-color: var(--text-faint); }
.fds-quick-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.fds-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.fds-grid-3 > .card { margin-bottom: 0; }
.fds-pdf-btns { display: flex; gap: 4px; }
.fds-pdf-btns .btn { padding: 4px 8px; font-size: 11px; font-weight: 700; }

/* Heatmap — variante à 6 colonnes (jours de la semaine) et niveau le plus faible */
.fds-heat.cols-6 { grid-template-columns: 130px repeat(6, minmax(44px, 1fr)); min-width: 460px; }
.fds-heat .h0 { background: #fde3e3; color: var(--text); }
.fds-heat-legend .h0 { background: #fde3e3; }

/* ---------------------------------------------------------------------------
   Module RH — agenda mensuel et pages de paramétrage (menu latéral + volet).
   --------------------------------------------------------------------------- */
/* Agenda */
.fds-agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .fds-agenda-layout { grid-template-columns: minmax(0, 1fr); } }
.fds-cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fds-cal-toolbar .month { min-width: 120px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.fds-cal-toolbar .spacer { flex: 1; }
.fds-type-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fds-type-toggle .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--tone, var(--primary)); }
.fds-type-toggle[aria-pressed="false"] { opacity: .4; }
.fds-type-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.fds-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--surface-3); border-left: 1px solid var(--surface-3); }
.fds-month .dow { padding: 6px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); border-right: 1px solid var(--surface-3); border-bottom: 1px solid var(--surface-3); background: var(--surface-2); }
.fds-month .cell { min-height: 92px; padding: 4px; border-right: 1px solid var(--surface-3); border-bottom: 1px solid var(--surface-3); background: var(--surface); min-width: 0; }
.fds-month .cell.off { background: var(--surface-2); }
.fds-month .cell .num { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; font-size: 11.5px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.fds-month .cell.off .num { color: var(--text-faint); }
.fds-month .cell.today .num { background: var(--brand); color: #fff; }
.fds-month .cell .evs { display: flex; flex-direction: column; gap: 2px; }
.fds-month .ev { padding: 1px 5px; border-radius: 2px; font-size: 10.5px; font-weight: 600; line-height: 1.5; background: var(--tone-bg, var(--surface-3)); color: var(--tone, var(--primary)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { .fds-month .cell { min-height: 64px; } .fds-month .ev { font-size: 9.5px; } }

/* Menu latéral de paramétrage */
.fds-side-layout { display: grid; grid-template-columns: var(--side, 240px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .fds-side-layout { grid-template-columns: minmax(0, 1fr); } }
.fds-side-menu { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px; }
.fds-side-menu .grp { padding: 10px 8px 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.fds-side-menu .grp:first-child { padding-top: 4px; }
.fds-side-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer; }
.fds-side-item:hover { background: var(--surface-2); }
.fds-side-item .lbl { flex: 1; min-width: 0; }
.fds-side-item .n { font-size: 11px; color: var(--text-faint); }
.fds-side-item.is-active { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--brand); font-weight: 700; }
.fds-side-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.fds-side-pane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); min-width: 0; }
.fds-side-pane > .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.fds-side-pane > .head .grow { flex: 1; min-width: 200px; }
.fds-side-pane > .head .ttl { font-size: 14px; font-weight: 700; color: var(--primary); }
.fds-side-pane > .head .hint { font-size: 12px; color: var(--text-muted); }
.fds-side-pane > .head .perm { font-size: 11px; color: var(--text-faint); font-family: ui-monospace, monospace; }
.fds-side-pane > .foot { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
.fds-side-pane > .foot input { flex: 1; min-width: 200px; }
.fds-side-pane .table-scroll table th { background: var(--surface-2); }
.fds-side-pane .pad { padding: 16px; }
.fds-install { max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.fds-install .status { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.fds-install .status .material-symbols-outlined { color: var(--success); }
.fds-side-layout.w-220 { --side: 220px; }
.fds-side-item .material-symbols-outlined { font-size: 17px; }
.fds-side-item .lbl { font-weight: 600; }
.fds-side-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.fds-side-section-head .ttl { font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-side-section-head .hint { font-size: 12px; color: var(--text-muted); }
.fds-inline-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; color: var(--text-muted); }
.fds-inline-bar select { width: auto; }
.badge.gain { background: var(--success-bg); color: var(--success); }
.badge.ret { background: var(--error-bg); color: var(--error); }

/* ---------------------------------------------------------------------------
   Module RH — paie : champs d'en-tête, barre de sélection, cartes de bulletin,
   graphique à venir, lignes récapitulatives.
   --------------------------------------------------------------------------- */
.fds-head-field { display: inline-flex; align-items: center; gap: 6px; }
.fds-head-field > label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.fds-head-field > select, .fds-head-field > input { width: auto; }
.fds-chart-ph { height: 160px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-faint); background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--bg) 10px, var(--bg) 20px); }
.fds-selbar { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--primary); }
.report-table tr.is-selected td { background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.report-table td .cb, .report-table th .cb { width: 16px; height: 16px; margin: 0; vertical-align: middle; accent-color: var(--brand); cursor: pointer; }
.btn.danger-soft { background: var(--error-bg); color: var(--error); border-color: var(--error-border, transparent); }
.fds-slip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fds-slip-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.fds-slip-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.fds-slip-card .top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.fds-slip-card .top label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.fds-slip-card .name { font-weight: 700; color: var(--primary); }
.fds-slip-card .net { display: flex; align-items: baseline; justify-content: space-between; }
.fds-slip-card .acts { display: flex; gap: 6px; margin-top: 4px; }
.fds-slip-card .acts .btn { flex: 1; justify-content: center; font-size: 12px; padding: 5px 6px; }
.fds-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.modal.w-460 { max-width: 460px; }
.modal.w-920 { max-width: 920px; }
.modal.w-640 { max-width: 640px; }
.fds-modal-stat { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0; font-size: 12.5px; color: var(--text-muted); }
.fds-modal-stat b { color: var(--primary); font-size: 14px; }
.fds-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--surface-3); border: 1px solid var(--surface-3); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.fds-meta-grid > div { background: var(--surface); padding: 8px 12px; }
.fds-meta-grid .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
.fds-meta-grid .v { font-size: 12.5px; font-weight: 700; }
.fds-inline-table input, .fds-inline-table select { min-width: 0; width: 100%; }
.fds-inline-add { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 90px minmax(0, 1.5fr) auto; gap: 10px; align-items: end; margin-top: 10px; }
@media (max-width: 760px) { .fds-inline-add { grid-template-columns: minmax(0, 1fr); } }
.btn.link-btn { border: none; background: transparent; color: var(--text-muted); font-weight: 600; padding-left: 0; }

/* Bulletin de paie : document imprimable */
.fds-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fds-toolbar .spacer { flex: 1; }
.fds-toolbar .back { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.fds-toolbar .back .material-symbols-outlined { font-size: 17px; }
.fds-toolbar .arrow { color: var(--text-faint); }
.fds-toolbar select { width: auto; }
.fds-doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.fds-doc-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fds-doc-head .co { display: flex; gap: 12px; align-items: flex-start; }
.fds-doc-head .logo { width: 52px; height: 52px; flex: none; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-faint); background: repeating-linear-gradient(45deg, var(--surface-3) 0 6px, var(--surface-2) 6px 12px); }
.fds-doc-head .name { font-size: 14px; font-weight: 700; color: var(--primary); }
.fds-doc-head .lines { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.fds-doc-head .when { text-align: right; font-size: 12px; color: var(--text-muted); }
.fds-doc h2.fds-doc-title { text-align: center; font-size: 15px; margin: 4px 0 14px; color: var(--primary); }
.fds-id-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; font-size: 11.5px; }
.fds-id-grid > div { padding: 6px 8px; text-align: center; border-right: 1px solid var(--border); }
.fds-id-grid > div:nth-child(6n) { border-right: none; }
.fds-id-grid .h { background: var(--bg); font-weight: 700; border-bottom: 1px solid var(--border); }
.fds-id-grid .v { font-weight: 600; }
@media (max-width: 760px) { .fds-id-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fds-id-grid > div:nth-child(6n) { border-right: 1px solid var(--border); } .fds-id-grid > div:nth-child(3n) { border-right: none; } }
.fds-doc-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.fds-doc-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 12px; }
.fds-doc-table th { background: var(--bg); font-weight: 700; text-align: center; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.fds-doc-table td { padding: 5px 8px; border-bottom: 1px solid var(--surface-3); }
.fds-doc-table td.code { color: var(--text-muted); width: 130px; font-family: ui-monospace, monospace; font-size: 11px; }
.fds-doc-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fds-doc-table td.muted { color: var(--text-muted); }
.fds-doc-table tr.sub td { background: var(--surface-2); font-weight: 700; text-align: center; text-transform: uppercase; font-size: 11px; letter-spacing: .02em; }
.fds-doc-table tr.sub td.num { text-align: right; }
.fds-doc-table tr.sub.gross td { background: var(--success-bg); }
.fds-doc-table tr.tot td { background: var(--surface-3); font-weight: 700; }
.fds-doc-net { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--primary); color: #fff; font-weight: 700; padding: 10px 12px; font-size: 12.5px; border-radius: 0 0 var(--radius) var(--radius); }
.fds-doc-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; font-size: 11.5px; color: var(--text-muted); }
.fds-doc-foot .sig { height: 50px; }
.fds-doc-foot b { color: var(--text); }
@media print { .topbar, .subnav, .fds-toolbar, .toast { display: none !important; } .fds-doc { border: none; padding: 0; } }

/* Livre de paie : matrice composant × salarié */
.fds-matrix { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 12px; }
.fds-matrix tr { --row-bg: var(--surface); --row-fg: var(--text); }
.fds-matrix th, .fds-matrix td { background: var(--row-bg); color: var(--row-fg); padding: 8px 12px; border-bottom: 1px solid var(--surface-3); }
.fds-matrix thead th { --row-bg: var(--surface-2); text-align: right; min-width: 118px; vertical-align: bottom; white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.fds-matrix thead th.sticky { text-align: left; min-width: 220px; z-index: 3; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.fds-matrix thead th { text-transform: none; letter-spacing: 0; font-size: 12px; }
.fds-matrix thead th .mat { color: var(--primary); font-weight: 700; }
.fds-matrix thead th .nm { color: var(--text); font-weight: 600; }
.fds-matrix thead th .cat { color: var(--text-faint); font-weight: 500; font-size: 11px; }
.fds-matrix thead th.total, .fds-matrix td.total { min-width: 130px; background: color-mix(in srgb, var(--row-bg) 80%, var(--surface-3)); font-weight: 700; }
.fds-matrix .sticky { position: sticky; left: 0; z-index: 1; }
.fds-matrix td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fds-matrix tr.sec { --row-bg: var(--surface-3); --row-fg: var(--text-muted); }
.fds-matrix tr.sec td { padding: 6px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fds-matrix tr.faint { --row-fg: var(--text-faint); }
.fds-matrix tr.faint td { font-size: 11.5px; }
.fds-matrix tr.gross { --row-bg: var(--success-bg); --row-fg: var(--success); font-weight: 700; }
.fds-matrix tr.dedtot { --row-bg: var(--error-bg); --row-fg: var(--error); font-weight: 700; }
.fds-matrix tr.net { --row-bg: var(--primary); --row-fg: #fff; font-weight: 700; }
.fds-matrix tr.cost { --row-bg: var(--warning-bg); --row-fg: var(--warning); font-weight: 700; }
.fds-switch-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer; padding-bottom: 7px; }
.fds-netbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.fds-netbar .net { background: var(--success); }
.fds-netbar .ded { background: var(--error); }
a.fds-slip-card { color: inherit; text-decoration: none; }
a.fds-slip-card:hover { border-color: var(--text-faint); }
.fds-slip-card .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.fds-slip-card .pair .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
.fds-slip-card .pair .v { font-size: 12.5px; font-weight: 600; }
.fds-slip-card .who { display: flex; align-items: center; gap: 10px; }

/* Lignes de synthèse dans les tableaux d'états */
.report-table tr.row-total td { background: var(--error-bg); color: var(--brand); font-weight: 700; }
.report-table tr.row-sep td { background: var(--bg); padding: 3px 14px; }
.report-table tr.row-grand td { background: var(--primary); color: #fff; font-weight: 700; }
.report-table td.neg { color: var(--brand); }
.report-table td.muted { color: var(--text-muted); }
.fds-check-list > div { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--surface-3); }
.fds-check-list > div:last-child { border-bottom: none; }
.fds-check-list .ic { font-size: 18px; color: var(--tone, var(--text-faint)); flex: none; }
.fds-month-bars > div { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 11.5px; }
.fds-month-bars .m { width: 34px; color: var(--text-faint); }
.fds-month-bars .progress { flex: 1; }
.fds-month-bars .v { width: 56px; text-align: right; font-variant-numeric: tabular-nums; }

/* Matrices : variantes de lignes et d'en-tête */
.fds-matrix tr.mid { --row-bg: var(--surface-2); font-weight: 700; }
.fds-matrix tr.good { --row-bg: var(--success-bg); font-weight: 700; }
.fds-matrix tr.sum { --row-bg: var(--surface-3); font-weight: 700; }
.fds-matrix tr.erdim { --row-bg: var(--surface-2); --row-fg: var(--text-muted); font-weight: 700; }
.fds-matrix td.dim { color: var(--text-faint); opacity: .7; }
.fds-matrix td.l, .fds-matrix thead th.l { text-align: left; }
.fds-matrix td.neg { color: var(--error); }
.fds-matrix.dark-first thead th.sticky { --row-bg: var(--primary); --row-fg: #fff; color: #fff; }
.fds-matrix.plain thead th { min-width: 78px; }
.fds-matrix.plain thead th.l { min-width: 100px; }
.fds-sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px; }
.fds-sheet .fds-meta-grid { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; margin-bottom: 0; }
.fds-sheet .signs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 14px 16px; font-size: 11.5px; color: var(--text-muted); }
.fds-sheet .signs b { display: block; margin-bottom: 4px; }
.fds-sheet .signs .sig { height: 56px; }
.fds-meta-grid.auto { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.filters-bar .field.grow-260 { flex: 1 1 260px; }

/* Composants de paie : groupes, étiquettes et éditeur */
.fds-group { margin-bottom: 18px; }
.fds-group-head { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 8px; }
.fds-group-head .ttl { font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-group-head .n { font-size: 11.5px; color: var(--text-faint); }
.fds-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.fds-tag { font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: var(--surface-3); padding: 1px 6px; border-radius: 2px; }
.fds-yn { font-size: 17px; color: var(--text-faint); opacity: .6; }
.fds-yn.on { color: var(--success); opacity: 1; }
.fds-lock { font-size: 14px; color: var(--text-faint); vertical-align: middle; margin-left: 4px; }
.report-table tr.is-inactive td { color: var(--text-faint); }
.report-table td .linklike { font-weight: 600; color: var(--primary); cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }
.report-table td .linklike:hover { color: var(--brand); text-decoration: underline; }
.modal.w-1040 { max-width: 1040px; }
.fds-ed { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; }
@media (max-width: 860px) { .fds-ed { grid-template-columns: minmax(0, 1fr); } }
.fds-ed-sec { margin-bottom: 18px; }
.fds-ed-sec > .ttl { font-size: 12.5px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.fds-ed-sec > .ttl.faint { color: var(--text-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.cols-id { grid-template-columns: 120px minmax(0, 1fr) 80px 200px; }
@media (max-width: 720px) { .form-grid.cols-4, .form-grid.cols-id { grid-template-columns: minmax(0, 1fr); } }
.form-grid .span-all { grid-column: 1 / -1; }
.fds-prot-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); background: var(--bg); padding: 4px 8px; border-radius: var(--radius); }
.fds-prot-note .material-symbols-outlined { font-size: 15px; }
.fds-vars { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; font-size: 11px; color: var(--text-faint); }
.fds-vars code { background: var(--bg); padding: 1px 5px; border-radius: 2px; font-size: 10.5px; color: var(--text); }
.fds-brackets { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.fds-brackets .row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 34px; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--surface-3); align-items: center; }
.fds-brackets .row.head { background: var(--surface-2); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); border-top: 0; }
.fds-brackets input { min-width: 0; width: 100%; }
.fds-flag { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.fds-flag .t { font-size: 12.5px; font-weight: 600; }
.fds-flag .s { font-size: 11px; color: var(--text-faint); }
.fds-flag .fds-toggle { margin-top: 2px; }
.fds-info-box { display: flex; gap: 8px; align-items: flex-start; background: var(--bg); color: var(--text-muted); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; }
.fds-info-box .material-symbols-outlined { font-size: 17px; flex: none; }
.modal-foot .note { flex: 1; align-self: center; font-size: 11.5px; color: var(--text-faint); text-align: left; }

/* Composants : police mono, tableau à colonnes fixes et cartes de la vue grille */
.fds-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-mono.sm { font-size: 11.5px; }
input.fds-mono, textarea.fds-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-fixed-table { table-layout: fixed; }
.fds-fixed-table th, .fds-fixed-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-fixed-table .t-center { text-align: center; }
.fds-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
button.fds-tile, a.fds-tile { text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
button.fds-tile:hover, a.fds-tile:hover { border-color: var(--text-faint); }
.fds-tile .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.fds-tile .name { font-weight: 700; color: var(--primary); }
.fds-tile .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; color: var(--text-faint); }
.fds-tile .meta b { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-tile.is-inactive { color: var(--text-faint); }
.fds-tile.is-inactive .name { color: var(--text-faint); }
.fds-fixed-table td:last-child { overflow: visible; }
.fds-ed-hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.fds-ed-sec .fds-ed-sec { margin: 12px 0 0; }
.field input[readonly], .field textarea[readonly] { background: var(--bg); color: var(--text-muted); }
.fds-tile.is-default { border-color: #d9a400; }
.fds-tile .trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fds-tile .trio .k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
.fds-tile .trio .v { font-size: 12.5px; font-weight: 600; }
.fds-tile .range { font-size: 11.5px; color: var(--text-muted); }
.fds-star { font-size: 19px; color: var(--text-faint); opacity: .55; }
.fds-star.on { color: #d9a400; opacity: 1; font-variation-settings: 'FILL' 1; }
.modal.w-560 { max-width: 560px; }

/* Grille salariale : domaines, paramètres et matrice catégories × échelons */
.fds-side-layout.w-250 { --side: 250px; }
.fds-own-card { background: #071923; color: #fff; border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.fds-own-card .kick { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #b7c9d7; }
.fds-own-card .name { font-size: 14px; font-weight: 700; }
.fds-own-card .dom { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #d3e5f3; }
.fds-own-card .dom b { color: #fff; }
.fds-own-card .dom .material-symbols-outlined { font-size: 16px; }
.fds-own-card .meta { font-size: 11px; color: #b7c9d7; margin-top: 2px; }
.fds-domains { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.fds-domains .head { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--border); }
.fds-domains .head .ttl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.fds-domain-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--surface-3); border-left: 3px solid transparent; background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.fds-domain-item:last-child { border-bottom: 0; }
.fds-domain-item:hover { background: var(--surface-2); }
.fds-domain-item.is-active { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); border-left-color: var(--brand); }
.fds-domain-item .grow { flex: 1; min-width: 0; }
.fds-domain-item .nm { font-size: 12.5px; font-weight: 600; }
.fds-domain-item .mt { font-size: 10.5px; color: var(--text-faint); }
.fds-own-tag { font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 2px; background: var(--error-bg); color: var(--brand); }
.fds-params { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: start; }
.fds-params .lbl { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--text-faint); margin-bottom: 4px; }
.fds-params .hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.fds-inline { display: flex; gap: 8px; align-items: center; }
.fds-addon { display: flex; }
.fds-addon > input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fds-addon > .suf { display: inline-flex; align-items: center; padding: 0 8px; font-size: 12px; color: var(--text-faint); background: var(--surface-2); border: 1px solid var(--border); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; }
.fds-addon.w-90 { width: 90px; }
.fds-addon.w-110 { width: 110px; }
.segmented.block { display: flex; }
.segmented.block .seg-item { flex: 1; justify-content: center; text-align: center; }
.fds-sgrid-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); min-width: 0; overflow: hidden; }
.fds-sgrid-panel > .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.fds-sgrid-panel > .head .ttl { flex: 1; min-width: 200px; font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-sgrid-panel > .head .ttl span { font-weight: 500; color: var(--text-faint); }
.fds-sgrid-scroll { overflow: auto; max-height: 70vh; }
.fds-sgrid { --n: 6; display: grid; grid-template-columns: 240px repeat(var(--n), minmax(104px, 1fr)); min-width: calc(240px + var(--n) * 104px); }
.fds-sgrid > div { border-right: 1px solid var(--surface-3); border-bottom: 1px solid var(--surface-3); min-width: 0; }
.fds-sgrid .corner, .fds-sgrid .rowh { position: sticky; left: 0; z-index: 1; }
.fds-sgrid .corner { top: 0; z-index: 3; background: var(--surface-2); display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
.fds-sgrid .colh { position: sticky; top: 0; z-index: 2; background: var(--surface-2); padding: 6px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fds-sgrid .colh input { text-align: center; font-weight: 700; background: transparent; border-color: transparent; }
.fds-sgrid .colh .mini { display: flex; gap: 4px; }
.fds-mini-btn { width: 22px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); cursor: pointer; }
.fds-mini-btn.danger { color: var(--brand); }
.fds-mini-btn:hover { border-color: var(--text-faint); }
.fds-mini-btn .material-symbols-outlined { font-size: 14px; }
.fds-sgrid .rowh { background: var(--surface); display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.fds-sgrid .rowh .key { min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); border-radius: var(--radius); font-weight: 700; font-size: 11px; }
.fds-sgrid .rowh input { flex: 1; min-width: 0; font-weight: 600; background: transparent; border-color: transparent; }
.fds-sgrid .cell { padding: 4px 6px; }
.fds-sgrid .cell.alt { background: color-mix(in srgb, var(--bg) 45%, var(--surface)); }
.fds-sgrid .cell input { width: 100%; text-align: right; background: transparent; border-color: transparent; font-variant-numeric: tabular-nums; }
.fds-sgrid .cell .calc { text-align: right; font-size: 10.5px; color: var(--text-faint); padding-right: 9px; }
.fds-sgrid input:hover { border-color: var(--border); }
.fds-sgrid input:focus { background: var(--surface); }
.fds-sgrid-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
.fds-sgrid-foot .grow { flex: 1; font-size: 12px; color: var(--text-faint); }
.fds-sgrid-foot .grow.dirty { color: var(--warning); font-weight: 600; }
.fds-err { font-size: 11.5px; color: var(--error); }
.fds-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.fds-check input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.form-grid.cols-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 720px) { .form-grid.cols-21 { grid-template-columns: minmax(0, 1fr); } }
.fds-subbox { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 12px; }

/* Calculatrice de test : barre de saisie et états de lignes du récapitulatif */
.fds-calc-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; padding: 14px; }
.fds-calc-bar .field.f-220 { flex: 0 1 220px; }
.fds-calc-bar .field.f-280 { flex: 1 1 280px; }
.fds-calc-bar .presets { display: flex; flex-wrap: wrap; gap: 6px; }
.fds-calc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.fds-calc-head .ttl { font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-calc-head .note { margin-left: auto; font-size: 11.5px; color: var(--text-faint); }
.report-table td.err { color: var(--error); }
.report-table tr.row-head td { background: var(--surface-3); color: var(--text-muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 6px 14px; }
.report-table tr.row-sub td { background: var(--surface-2); color: var(--text-muted); font-size: 11.5px; font-weight: 600; padding: 7px 14px; }
.report-table tr.row-sub td.err { color: var(--error); }
.report-table tr.row-gain td { background: var(--success-bg); color: var(--success); font-weight: 700; }
.report-table tr.row-ded td { background: var(--error-bg); color: var(--error); font-weight: 700; }
.report-table tr.row-cost td { background: var(--warning-bg); color: var(--warning); font-weight: 700; }
.fds-calc-bar .field { min-width: 0; }
.fds-calc-bar .field select, .fds-calc-bar .field input { width: 100%; min-width: 0; }

/* Simulateur de calcul : paramètres + résultat (bandeau sombre) */
.fds-sim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.fds-sim .panel { margin-bottom: 0; }
.fds-sim-form { display: flex; flex-direction: column; gap: 12px; }
.fds-sim-result { display: block; padding: 18px 20px; }
.fds-sim-result .ttl { font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.fds-sim-result .row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.fds-sim-result .row .k { opacity: .7; }
.fds-sim-result .net { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .15); font-weight: 700; }
.fds-sim-result .net .v { font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .fds-sim { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------------------
   Module RH — recrutement : kanban des candidatures, fiche candidature,
   page carrière publique.
   --------------------------------------------------------------------------- */
.board.stages .board-col { background: var(--surface-2); transition: outline-color .12s; outline: 2px dashed transparent; outline-offset: -2px; }
.board.stages .board-col.is-final { background: var(--surface-3); }
.board.stages .board-col.is-over { outline-color: var(--brand); }
.board-col-head { align-items: center; gap: 8px; }
.board-col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--text-faint)); flex: none; }
.board-col-head .lbl { flex: 1; min-width: 0; }
.board-col-head .count { background: var(--surface); padding: 0 7px; border-radius: 10px; font-weight: 700; color: var(--text-muted); }
.board-col .cards { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.board-col .none { text-align: center; font-size: 11.5px; color: var(--text-faint); padding: 14px 0; }
.board-card[draggable="true"] { cursor: grab; }
.board-card.is-dragging { opacity: .45; }
.board-card .who { display: flex; align-items: center; gap: 8px; }
.board-card .who a { flex: 1; min-width: 0; font-weight: 700; color: var(--primary); }
.board-card .who a:hover { color: var(--brand); text-decoration: underline; }
.board-card .job { font-size: 11.5px; color: var(--text-muted); }
.board-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-faint); }
.avatar.w-48 { width: 48px; height: 48px; font-size: 16px; }
.fds-cols-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.fds-cand-head { margin-bottom: 14px; }
.fds-cand-head .top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fds-cand-head .top .grow { flex: 1; min-width: 200px; }
.fds-cand-head h1 { font-size: 18px; font-weight: 700; color: var(--primary); margin: 0; }
.fds-cand-head .sub { font-size: 12.5px; color: var(--text-muted); }
.fds-qa > div { padding: 8px 0; border-bottom: 1px solid var(--surface-3); }
.fds-qa > div:last-child { border-bottom: none; }
.fds-qa .k { font-size: 11.5px; color: var(--text-faint); }
.fds-qa .v { font-size: 13px; font-weight: 600; }
.fds-rate { display: flex; gap: 2px; }
.fds-star-btn { background: transparent; border: 0; padding: 0 2px; font-size: 26px; line-height: 1; color: var(--border); cursor: pointer; }
.fds-star-btn.on { color: #d9a400; }
.fds-star-btn:hover { color: #d9a400; }
.fds-star-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-radius: 2px; }
.fds-add-row { display: flex; gap: 8px; margin-top: 10px; }
.fds-add-row input { flex: 1; min-width: 0; }
.fds-notes > div { padding: 10px 0; border-top: 1px solid var(--surface-3); font-size: 12.5px; }
.fds-notes .meta { display: flex; justify-content: space-between; margin-bottom: 3px; font-size: 11.5px; color: var(--text-faint); }
.fds-notes .meta b { color: var(--text); }
.fds-event-row { display: flex; align-items: center; gap: 10px; }
.fds-event-row .grow { flex: 1; min-width: 0; }
.fds-event-row .t { font-weight: 600; }
.fds-event-row .s { font-size: 11.5px; color: var(--text-faint); }
.fds-detail-stack .card > textarea { width: 100%; }

/* Page carrière (publique, sans barre ERP) */
.pub-page { min-height: 100vh; background: var(--surface); color: var(--text); }
.pub-bar { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.pub-bar .logo { width: 30px; height: 30px; border-radius: var(--radius); background: #071923; color: #fff; font-size: 9.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pub-bar .brand { font-weight: 700; color: var(--primary); }
.pub-bar .grow { flex: 1; }
.pub-wrap { max-width: 960px; margin: 0 auto; }
.pub-hero { background: #071923; color: #fff; padding: 56px 24px; }
.pub-hero .kick { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #b4bfc8; margin-bottom: 10px; }
.pub-hero h1 { font-size: 34px; line-height: 1.2; font-weight: 700; max-width: 640px; margin: 0 0 12px; color: #fff; }
.pub-hero p { font-size: 15px; color: #d9dfe4; max-width: 560px; margin: 0; }
.pub-sec { padding: 32px 24px 56px; }
.pub-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pub-sec-head h2 { font-size: 20px; font-weight: 700; color: var(--primary); margin: 0; }
.pub-sec-head span { font-size: 13px; color: var(--text-muted); }
.pub-jobs { border-top: 1px solid var(--border); }
.pub-job { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; width: 100%; padding: 16px 6px; border: 0; border-bottom: 1px solid var(--border); background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pub-job:hover { background: var(--surface-2); }
.pub-job .grow { flex: 1; min-width: 220px; }
.pub-job .t { font-size: 15px; font-weight: 700; color: var(--primary); }
.pub-job .s, .pub-job .u { font-size: 12.5px; color: var(--text-muted); }
.pub-job .material-symbols-outlined { color: var(--brand); }
.pub-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; padding: 0; border: 0; background: transparent; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; }
.pub-detail h1 { font-size: 26px; font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.pub-detail .meta { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.pub-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; align-items: start; }
.pub-cols h3 { font-size: 14px; font-weight: 700; color: var(--primary); margin: 18px 0 6px; }
.pub-cols h3:first-child { margin-top: 0; }
.pub-cols p, .pub-cols li { font-size: 13.5px; line-height: 1.55; }
.pub-cols ul { margin: 0; padding-left: 18px; }
.pub-form { display: flex; flex-direction: column; gap: 12px; }
.pub-robot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; cursor: pointer; }
.pub-robot input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.pub-robot .grow { flex: 1; }
.pub-robot .material-symbols-outlined { color: var(--text-faint); }
.pub-sent { text-align: center; padding: 20px 0; }
.pub-sent .material-symbols-outlined { font-size: 48px; color: var(--success); }
.pub-sent h3 { margin: 6px 0; font-size: 18px; }
.pub-sent p { color: var(--text-muted); margin: 0; }

/* ---------------------------------------------------------------------------
   Module RH — relations sociales : plaintes (revue, escalade, historique).
   --------------------------------------------------------------------------- */
.fds-pl-ref { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.fds-pl-title { font-size: 16px; font-weight: 700; color: var(--primary); margin: 2px 0 0; }
.fds-pl-desc { font-size: 13px; line-height: 1.55; margin: 14px 0; }
.fds-pl-form { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.fds-pl-form .ttl { font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-pl-form select, .fds-pl-form textarea { width: 100%; }
.fds-pl-form .btn-row { justify-content: flex-end; }
.fds-log { display: flex; flex-direction: column; margin-top: 8px; }
.fds-log > div { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--surface-3); }
.fds-log .material-symbols-outlined { font-size: 18px; color: var(--text-faint); flex: none; }
.fds-log .what { font-size: 12.5px; }
.fds-log .what b { font-weight: 600; }
.fds-log .when { font-size: 11px; color: var(--text-faint); }
.fds-pl-sec { font-size: 13px; font-weight: 700; color: var(--primary); margin-top: 18px; }
.fds-master-item .badge { white-space: nowrap; flex: none; }

/* ---------------------------------------------------------------------------
   Module RH — rapports transverses : grille de présences mensuelles.
   --------------------------------------------------------------------------- */
.fds-att { display: grid; grid-template-columns: 180px repeat(30, minmax(22px, 1fr)) 54px; min-width: 1000px; align-items: center; }
.fds-att > div { padding: 5px 2px; border-bottom: 1px solid var(--surface-3); display: flex; justify-content: center; }
.fds-att > .h { font-size: 10.5px; font-weight: 700; color: var(--text-faint); background: var(--surface-2); padding: 8px 2px; }
.fds-att > .h.we { color: var(--border); }
.fds-att > .h.l, .fds-att > .nm { justify-content: flex-start; padding-left: 14px; }
.fds-att > .h.r, .fds-att > .tot { justify-content: flex-end; padding-right: 14px; }
.fds-att > .nm { font-size: 12px; font-weight: 600; }
.fds-att > .tot { font-size: 12px; font-weight: 700; }
.fds-att-chip { width: 18px; height: 18px; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--tone-bg, var(--surface-2)); color: var(--tone, var(--text-faint)); }
.fds-att-chip.we { background: var(--bg); }
.fds-att-chip.sm { width: 14px; height: 14px; font-size: 9px; }
.fds-att-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 16px; font-size: 11.5px; color: var(--text-muted); border-top: 1px solid var(--border); }
.fds-att-legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------------------
   Module RH — assistant de configuration initiale (6 étapes).
   Chrome dédié (pas de sous-navigation), cartes d'étape, lignes à bascule,
   jours ouvrés, options de schéma, récapitulatif.
   --------------------------------------------------------------------------- */
.topbar .fds-setup-title { color: var(--text); font-weight: 600; }
.topbar-left { min-width: 0; }
.topbar .brand-context { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 720px) { .topbar .fds-setup-sub { display: none; } }
.fds-autosave { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.fds-autosave .material-symbols-outlined { font-size: 17px; color: var(--success); }
@media (max-width: 720px) { .fds-autosave span:not(.material-symbols-outlined) { display: none; } }

.fds-setup-steps { margin-bottom: 14px; overflow-x: auto; }
.fds-setup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.fds-setup-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-setup-head h1 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--primary); margin: 0 0 3px; }
.fds-setup-head p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.fds-setup-hero { padding: 36px 40px 32px; border-bottom: 1px solid var(--surface-3); }
.fds-setup-hero h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; color: var(--primary); margin: 0 0 8px; }
.fds-setup-hero p { margin: 0; font-size: 13.5px; color: var(--text-muted); max-width: 640px; text-wrap: pretty; }
.fds-setup-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; margin-bottom: 14px; background: var(--error-bg); border: 1px solid var(--error-border); border-radius: var(--radius); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); }
.fds-setup-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--surface-3); }
.fds-setup-tile { display: flex; align-items: flex-start; gap: 12px; padding: 16px 40px; background: var(--surface); }
.fds-setup-tile > .material-symbols-outlined { font-size: 22px; color: var(--brand); flex: none; }
.fds-setup-tile .t { font-size: 13px; font-weight: 700; color: var(--text); }
.fds-setup-tile .d { font-size: 12px; color: var(--text-muted); text-wrap: pretty; }
.fds-setup-note { display: flex; align-items: flex-start; gap: 8px; padding: 14px 24px; background: var(--surface-2); border-top: 1px solid var(--surface-3); font-size: 12px; color: var(--text-muted); text-wrap: pretty; }
.fds-setup-note > .material-symbols-outlined { font-size: 18px; color: var(--text-faint); flex: none; }
.fds-setup-hero + .fds-setup-tiles + .fds-setup-note { padding-left: 40px; padding-right: 40px; }

.fds-setup-body { padding: 18px 24px 24px; }
.fds-setup-body + .fds-setup-body { padding-top: 0; }
.fds-setup-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.fds-setup-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 8px; }
.fds-setup-field-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 6px; }
.fds-setup-list { display: flex; flex-direction: column; gap: 8px; }
.fds-setup-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--surface-3); border-radius: var(--radius-md); background: var(--surface); }
.fds-setup-row.is-off { background: var(--surface-2); }
.fds-setup-row > .material-symbols-outlined { font-size: 19px; color: var(--text-faint); flex: none; }
.fds-setup-row .name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.fds-setup-row.is-off .name { color: var(--text-muted); }
.fds-setup-list .btn.dashed { justify-content: center; }

.fds-days { display: flex; flex-wrap: wrap; gap: 6px; }
.fds-day { width: 52px; padding: 8px 0; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text-faint); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.fds-day:hover { border-color: var(--text-faint); }
.fds-day.on { border-color: var(--brand); background: var(--error-bg); color: var(--brand); }
.fds-day:focus-visible, .fds-setup-opt:focus-visible, .fds-setup-comp:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.fds-setup-leaves { display: flex; flex-direction: column; gap: 8px; }
.fds-setup-leave { display: flex; align-items: center; gap: 10px; }
.fds-setup-leave .name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.fds-setup-leave input { width: 64px; text-align: center; }
.fds-setup-leave .unit { width: 56px; font-size: 12px; color: var(--text-muted); }

.fds-setup-opts { display: flex; flex-direction: column; gap: 8px; }
.fds-setup-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; font: inherit; color: inherit; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.fds-setup-opt:hover { border-color: var(--text-faint); }
.fds-setup-opt .radio { width: 16px; height: 16px; margin-top: 1px; border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.fds-setup-opt .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.fds-setup-opt .t { font-size: 13px; font-weight: 700; color: var(--text); }
.fds-setup-opt .d { font-size: 12px; color: var(--text-muted); }
.fds-setup-opt.selected { border-color: var(--brand); background: var(--error-bg); }
.fds-setup-opt.selected .radio { border-color: var(--brand); }
.fds-setup-opt.selected .radio::after { background: var(--brand); }

.fds-setup-stages { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fds-setup-stage { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text); }
.fds-setup-stage .n { color: var(--text-faint); font-weight: 700; }

.fds-setup-comps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fds-setup-comp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; font: inherit; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.fds-setup-comp > .material-symbols-outlined { font-size: 19px; color: var(--text-faint); flex: none; }
.fds-setup-comp .name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.fds-setup-comp .box { width: 16px; height: 16px; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); display: flex; align-items: center; justify-content: center; flex: none; }
.fds-setup-comp .box .material-symbols-outlined { font-size: 14px; color: #fff; display: none; }
.fds-setup-comp.on { border-color: var(--brand); background: var(--error-bg); color: var(--text); }
.fds-setup-comp.on > .material-symbols-outlined { color: var(--brand); }
.fds-setup-comp.on .box { background: var(--brand); border-color: var(--brand); }
.fds-setup-comp.on .box .material-symbols-outlined { display: block; }

.fds-setup-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--surface-3); }
.fds-setup-sum > div { background: var(--surface); padding: 16px 24px; min-width: 0; }
.fds-setup-sum .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fds-setup-sum .head .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.fds-setup-sum .head button { background: none; border: none; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--brand); cursor: pointer; }
.fds-setup-sum .head button:hover { text-decoration: underline; }
.fds-setup-sum .line { font-size: 12.5px; font-weight: 600; color: var(--text); padding: 2px 0; }
.fds-setup-sum .line.sub { font-weight: 500; color: var(--text-muted); }

@media (max-width: 760px) {
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav .note { flex-basis: 100%; order: 3; }
  .fds-setup-cols, .fds-setup-tiles, .fds-setup-comps, .fds-setup-sum { grid-template-columns: minmax(0, 1fr); }
  .fds-setup-hero, .fds-setup-tile { padding-left: 20px; padding-right: 20px; }
  .fds-setup-hero + .fds-setup-tiles + .fds-setup-note { padding-left: 20px; padding-right: 20px; }
}

/* ---------------------------------------------------------------------------
   Paramètres d'un module (Courriers, Marchés publics…) : navigation latérale
   des réglages + cartes de réglages (statut, circuit de validation, champs).
   --------------------------------------------------------------------------- */
.topbar-crumbs .cur.plain { color: var(--text); }
.fds-mset { display: flex; max-width: 1180px; margin: 0 auto; min-height: calc(100vh - 56px); }
.fds-mset-nav { width: 230px; flex-shrink: 0; padding: 20px 12px; border-right: 1px solid var(--surface-3); }
.fds-mset-nav .grp { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding: 0 10px; margin-bottom: 8px; }
.fds-mset-nav .grp.sp { margin-top: 18px; }
.fds-mset-nav a, .fds-mset-nav .cur { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 1px; border-radius: 4px; font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.fds-mset-nav a:hover { background: var(--surface-2); color: var(--text); }
.fds-mset-nav .material-symbols-outlined { font-size: 18px; }
.fds-mset-nav .cur { background: var(--error-bg); color: var(--brand); }
.fds-mset-main { flex: 1; min-width: 0; padding: 24px 28px 60px; }
.fds-mset-title { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.fds-mset-title > .material-symbols-outlined { font-size: 22px; color: var(--brand); }
.fds-mset-title h1 { font-size: 18px; margin: 0; white-space: nowrap; }
.fds-mset-lead { margin: 0 0 20px; font-size: 12.5px; color: var(--text-muted); text-wrap: pretty; }
.fds-mset-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 16px; }
.fds-mset-card.flush { padding: 0; }
.fds-mset-card:last-child { margin-bottom: 0; }
.fds-mset-card-head { padding: 14px 20px; border-bottom: 1px solid var(--surface-3); }
.fds-mset-card-body { padding: 14px 20px; display: flex; flex-direction: column; gap: 8px; }
.fds-mset-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.fds-mset-card-head .fds-mset-label { margin: 0; }
.fds-mset-label.sm { margin-bottom: 8px; }
.fds-mset-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fds-mset-row .when { font-size: 11.5px; color: var(--text-faint); }
.fds-status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; background: var(--tone-bg, var(--surface-3)); border: 1px solid var(--border); color: var(--tone, var(--text-muted)); }
.fds-status-pill.tone-success { border-color: var(--success-border); }
.fds-status-pill .material-symbols-outlined { font-size: 13px; }
.fds-mset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .fds-mset-grid { grid-template-columns: minmax(0, 1fr); } }
.fds-mset-card .field label { text-transform: none; letter-spacing: 0; }
.fds-mset-card .field .fds-jb, .fds-mset-card input.fds-jb { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-sla-row { display: flex; align-items: center; gap: 12px; }
.fds-sla-row .l { flex: 1; font-size: 12.5px; color: var(--text); }
.fds-sla-row input { width: 64px; text-align: center; padding: 6px 8px; }
.fds-sla-row .u { font-size: 12px; color: var(--text-muted); width: 34px; }
.fds-inline-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); flex-wrap: wrap; }
.fds-inline-opt label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.fds-inline-opt input { width: 70px; padding: 6px 8px; }
.fds-inline-opt .u { font-size: 12.5px; color: var(--text-muted); }
.fds-inline-opt .hint { flex: 1; text-align: right; font-size: 11px; color: var(--text-faint); min-width: 160px; }
.fds-circ { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--surface-3); border-radius: var(--radius-md); background: var(--surface); }
.fds-circ.is-off { background: var(--surface-2); }
.fds-circ.is-over { border-color: var(--brand); border-style: dashed; }
.fds-circ.is-drag { opacity: .45; }
.fds-circ .grip { font-size: 18px; color: var(--border); cursor: grab; }
.fds-circ .n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.fds-circ .t { flex: 1; min-width: 0; }
.fds-circ .t b { display: block; font-size: 12.5px; color: var(--text); }
.fds-circ .t small { font-size: 11.5px; color: var(--text-faint); }
.fds-dashed-btn { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: transparent; color: var(--text-muted); font: 600 12.5px var(--font); cursor: pointer; }
.fds-dashed-btn:hover { border-color: var(--text-faint); color: var(--text); }
.fds-dashed-btn .material-symbols-outlined { font-size: 18px; }
.fds-addform { display: flex; align-items: flex-end; gap: 10px; padding: 14px; border: 1px solid var(--surface-3); border-radius: var(--radius-md); background: var(--surface-2); flex-wrap: wrap; }
.fds-addform .field { flex: 1; min-width: 180px; }
.fds-addform .field label { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--text-muted); }
.fds-mset-card .fds-addform .field label { text-transform: uppercase; letter-spacing: .04em; }
.fds-ged-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-ged-row > .material-symbols-outlined { font-size: 20px; color: var(--text-faint); flex-shrink: 0; }
.fds-ged-row.on > .material-symbols-outlined { color: var(--brand); }
.fds-ged-row b { flex: 1; font-size: 12.5px; color: var(--text); }
.fds-codefmt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fds-codefmt input { width: 280px; max-width: 100%; }
.fds-codefmt .prev { font-size: 11.5px; color: var(--text-faint); }
@media (max-width: 860px) { .fds-mset { flex-direction: column; } .fds-mset-nav { width: auto; border-right: none; border-bottom: 1px solid var(--surface-3); padding: 12px; } .fds-mset-main { padding: 18px 16px 48px; } }
.fds-circ .fds-grip { border: none; background: transparent; padding: 0; width: auto; height: auto; cursor: grab; }
.fds-circ .fds-grip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.fds-mset-stack { display: flex; flex-direction: column; gap: 8px; }
.fds-mset-stack.sm { gap: 6px; }
.fds-mset-row.mb { margin-bottom: 14px; }
.fds-mset-grid.mb { margin-bottom: 12px; }
.fds-mset-card .field.mb { margin-bottom: 14px; }
.fds-mset-row .when a { color: var(--brand); }
.fds-mset-row .when a:hover { color: var(--brand-dark, var(--brand)); text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Setup / Paramètres — fil d'Ariane de la barre du haut, pastilles d'état,
   Centre d'intégrations (cartes de service, journal), pages d'intégration.
   --------------------------------------------------------------------------- */
.tone-other { --tone-bg: var(--other-bg); }
.tone-teal { --tone-bg: var(--teal-bg); }
.tone-neutral { --tone-bg: var(--surface-3); }
.topbar-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.topbar-crumbs a { font-weight: 600; color: var(--text); }
.topbar-crumbs a:hover { color: var(--brand); }
.topbar-crumbs .sep { color: var(--text-faint); }
.topbar-crumbs .cur { color: var(--brand); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fds-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 700; white-space: nowrap; background: var(--tone-bg, var(--surface-3)); color: var(--tone, var(--text-muted)); }
.fds-pill .material-symbols-outlined { font-size: 13px; }

/* catalogue de services */
.fds-int-group { margin-bottom: 22px; }
.fds-int-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.fds-int-group-head b { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.fds-int-group-head span { font-size: 11.5px; color: var(--text-faint); }
.fds-int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.fds-int-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-int-card .body { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.fds-int-tile { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-lg); background: var(--tone-bg, var(--surface-3)); color: var(--tone, var(--text-muted)); }
.fds-int-tile .material-symbols-outlined { font-size: 22px; }
.fds-int-card .info { flex: 1; min-width: 0; }
.fds-int-card .name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fds-int-card .name b { font-size: 14px; color: var(--primary); }
.fds-int-card .prov { font-size: 11.5px; color: var(--text-faint); }
.fds-int-card .desc { font-size: 12px; color: var(--text-muted); margin: 6px 0 0; text-wrap: pretty; }
.fds-int-card .metrics { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--surface-3); font-size: 11.5px; }
.fds-int-card .metrics > div { padding: 9px 16px; }
.fds-int-card .metrics > div + div { border-left: 1px solid var(--surface-3); }
.fds-int-card .metrics .l { display: block; color: var(--text-faint); font-size: 10.5px; }
.fds-int-card .metrics b { font-weight: 600; color: var(--tone, var(--text)); }
.fds-int-card .foot { display: flex; gap: 6px; padding: 10px 16px; margin-top: auto; border-top: 1px solid var(--surface-3); background: var(--surface-2); }
.fds-int-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); }
.fds-int-note .material-symbols-outlined { font-size: 16px; }
.fds-log-svc { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fds-log-svc .material-symbols-outlined { font-size: 16px; color: var(--tone, var(--text-muted)); }
.fds-log-table td.src { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--text-muted); }
.fds-log-table td .ev { font-weight: 600; color: var(--primary); }
.fds-log-table td .sub { display: block; font-size: 10.5px; color: var(--text-faint); max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
.fds-log-table td.at { color: var(--text-muted); }
.fds-toolbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.fds-toolbar select { padding: 7px 10px; }
.tabs.fds-tabs-gap { gap: 2px; }
.tabs.fds-tabs-gap button { padding: 9px 12px; }

/* pages d'intégration (en-tête, panneaux, lignes d'options, bascules, choix) */
.page.w-1320 { max-width: 1320px; }
.fds-int-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.fds-int-title h1 { margin: 0; }
.fds-int-title p { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.fds-int-title .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fds-int-title .sub { font-size: 12px; color: var(--text-faint); }
.tabs.fds-tabs-gap { overflow-y: hidden; padding-bottom: 1px; }
.tabs .fds-count { padding: 0 6px; border-radius: 9px; font-size: 10.5px; font-weight: 700; background: var(--warning-bg); color: var(--warning); }
.fds-int-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.fds-int-panel.flush { padding: 0; overflow-x: auto; }
.fds-int-panel-head { padding: 12px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-int-panel-head b { display: block; font-size: 13px; color: var(--primary); }
.fds-int-panel-head span { font-size: 12px; color: var(--text-muted); }
.fds-int-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 8px; }
.fds-int-label.lg { margin-bottom: 12px; }
.fds-int-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 12px; align-items: start; }
.fds-int-stack { display: flex; flex-direction: column; gap: 12px; }
.fds-int-hint { padding: 12px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); font-size: 12px; color: var(--text-muted); }
.fds-int-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--text-faint); }
.fds-int-foot .material-symbols-outlined { font-size: 15px; }
.fds-hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.fds-optrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--surface-2); cursor: pointer; }
.fds-optrow:last-child { border-bottom: none; }
.fds-optrow input { width: 15px; height: 15px; accent-color: var(--brand); flex: none; }
.fds-optrow .t { flex: 1; min-width: 0; }
.fds-optrow .t b { color: var(--primary); font-weight: 600; }
.fds-optrow .t small { font-size: 11px; color: var(--text-faint); }
.fds-optrow .ex { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--text-muted); }
.fds-switch-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--surface-2); }
.fds-switch-row:last-child { border-bottom: none; }
.fds-switch-row .t { flex: 1; min-width: 0; }
.fds-switch-row .t b { display: block; font-weight: 600; color: var(--primary); }
.fds-switch-row .t small { display: block; font-size: 11px; color: var(--text-faint); }
.fds-range { width: 100%; accent-color: var(--brand); }
.fds-int-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fds-int-grid2 .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fds-int-grid2 { grid-template-columns: minmax(0, 1fr); } }
.fds-jb, .fds-int-grid2 input.fds-jb, .field input.fds-jb { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-choice-list { display: flex; flex-direction: column; gap: 6px; }
.fds-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; text-align: left; color: var(--text); font-family: var(--font); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; }
.fds-choice.selected { border-color: var(--primary); background: var(--surface-2); }
.fds-choice > .material-symbols-outlined { font-size: 19px; color: var(--text-faint); flex: none; }
.fds-choice.selected > .material-symbols-outlined { color: var(--primary); }
.fds-choice .t { display: block; font-size: 12.5px; font-weight: 700; color: var(--primary); }
.fds-choice .d { display: block; font-size: 11px; color: var(--text-muted); }
.fds-cell2 b { display: block; font-weight: 600; color: var(--primary); }
.fds-cell2 small { display: block; font-size: 10.5px; color: var(--text-faint); }
.fds-dev-cell { display: flex; align-items: center; gap: 9px; }
.fds-dev-cell > .material-symbols-outlined { font-size: 20px; color: var(--text-muted); }
.report-table tr.is-dim td { opacity: .55; }
.report-table td.sel-cell select { width: 100%; max-width: 300px; padding: 6px 8px; font-size: 12px; border-color: #f59e0b; }
.fds-scan { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.fds-scan > .main { flex: 1 1 520px; min-width: 0; }
.fds-scan > .side { flex: 1 1 340px; min-width: 0; padding: 0; }
.fds-scan-input { width: 100%; box-sizing: border-box; padding: 14px; font-size: 18px; font-family: 'JetBrains Mono', ui-monospace, monospace; text-align: center; background: var(--surface-2); border: 2px dashed var(--border); border-radius: var(--radius-lg); color: var(--text); }
.fds-scan-input.ok { border-color: var(--success); }
.fds-scan-input:focus { outline: none; border-color: var(--brand); }
.fds-scan-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--text-faint); flex-wrap: wrap; }
.fds-scan-foot a { font-weight: 600; cursor: pointer; }
.fds-result { padding: 10px 16px; border-bottom: 1px solid var(--surface-2); }
.fds-result .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fds-result .code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 700; }
.fds-result .kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 11.5px; margin-top: 4px; }
.fds-result .kv .k { color: var(--text-faint); }
.fds-result .kv .v.warn { color: var(--warning); font-weight: 600; }
.fds-result .kv .v.ok { color: var(--primary); font-weight: 600; }
.fds-empty { padding: 24px 16px; text-align: center; color: var(--text-faint); font-size: 12px; }
.fds-link-btn { border: none; background: none; padding: 0; font: 600 11.5px var(--font); color: var(--brand); cursor: pointer; }
.drawer .field { margin: 0; }
.drawer .field label { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--text); }
.drawer-foot.end { justify-content: flex-end; }
.btn.btn-brand[disabled] { opacity: .5; cursor: not-allowed; }

/* SMTP : serveur, diagnostic, DNS */
@keyframes fdsSpin { to { transform: rotate(360deg); } }
.fds-spin { display: inline-block; animation: fdsSpin 1s linear infinite; }
.fds-int-split { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.fds-int-split > .main { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fds-int-split > .side { flex: 1 1 320px; min-width: 0; }
.fds-int-grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .fds-int-grid3 { grid-template-columns: minmax(0, 1fr); } }
.fds-inline { display: flex; gap: 6px; }
.fds-inline input { flex: 1; min-width: 0; }
.fds-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.fds-presets .btn { flex-shrink: 0; white-space: nowrap; }
.fds-err-text { font-size: 11.5px; color: var(--error); margin-top: 6px; }
.fds-dirty { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 12px; background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius); font-size: 12px; color: var(--warning); }
.fds-dirty > .material-symbols-outlined { font-size: 16px; }
.fds-dirty > span:not(.material-symbols-outlined) { flex: 1; }
.fds-diag-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-diag-head b { display: block; font-size: 13px; color: var(--primary); }
.fds-diag-head small { font-size: 11px; color: var(--text-faint); }
.fds-diag-row { display: grid; grid-template-columns: 20px 1fr auto; gap: 9px; padding: 9px 16px; border-bottom: 1px solid var(--surface-2); align-items: center; font-size: 12px; }
.fds-diag-row .ic { display: flex; justify-content: center; }
.fds-diag-row .ic .material-symbols-outlined { font-size: 16px; color: var(--tone, var(--border)); }
.fds-diag-row .l { font-weight: 600; }
.fds-diag-row .r { font-weight: 600; text-align: right; color: var(--tone, var(--text-faint)); }
.fds-diag-row.tone-neutral .r { color: var(--text-faint); }
.fds-diag-row.is-ok .r { color: var(--text); }
.fds-diag-foot { padding: 10px 16px; font-size: 11px; color: var(--text-faint); }
.fds-dns { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-dns-item { padding: 14px 18px; border-bottom: 1px solid var(--surface-3); }
.fds-dns-item .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fds-dns-item .top b { font-size: 13px; color: var(--primary); width: 70px; }
.fds-dns-item .top span.d { font-size: 12px; color: var(--text-muted); flex: 1; min-width: 200px; }
.fds-dns-item .kv { display: grid; grid-template-columns: 70px 1fr auto; gap: 6px 10px; align-items: center; font-size: 11.5px; }
.fds-dns-item .kv .k { color: var(--text-faint); }
.fds-dns-item .kv .m { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-dns-item .kv .m.val { padding: 6px 8px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius); word-break: break-all; }
.fds-dns-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: var(--surface-2); font-size: 11.5px; color: var(--text-faint); }
.fds-log-table td.mono-j { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; }
.fds-log-table td .err { display: block; font-size: 10.5px; color: var(--error); margin-top: 2px; }
.fds-log-table td.trunc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.fds-toolbar .count { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.fds-subject { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); font-size: 12px; color: var(--text-muted); }
.fds-subject b { color: var(--text); }

/* WhatsApp Business */
.fds-pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.btn.btn-meta { background: #1877f2; border-color: #1877f2; color: #fff; font-weight: 700; }
.btn.btn-meta:hover { background: #1469d6; border-color: #1469d6; }
.fds-int-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--surface-3); flex-wrap: wrap; }
.fds-int-card-head .id { display: flex; align-items: center; gap: 10px; }
.fds-int-card-head .id > .material-symbols-outlined { font-size: 22px; color: var(--success); }
.fds-int-card-head b { display: block; font-size: 13.5px; color: var(--primary); }
.fds-int-card-head small { font-size: 11.5px; color: var(--text-faint); }
.fds-int-card-foot { display: flex; gap: 6px; padding: 10px 18px; border-top: 1px solid var(--surface-3); background: var(--surface-2); flex-wrap: wrap; }
.fds-int-card-foot .btn.end { margin-left: auto; color: var(--error); }
.fds-int-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 28px; padding: 6px 18px 12px; }
.fds-int-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--surface-2); font-size: 12.5px; }
.fds-int-rows .k { color: var(--text-faint); }
.fds-int-rows .v { font-weight: 600; text-align: right; color: var(--tone, var(--text)); }
.fds-int-rows .v.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-mod-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--surface-2); }
.fds-mod-row > .material-symbols-outlined { font-size: 18px; color: var(--text-muted); }
.fds-mod-row .t { flex: 1; min-width: 0; }
.fds-mod-row .t b { display: block; font-weight: 600; color: var(--primary); }
.fds-mod-row .t small { font-size: 11px; color: var(--text-faint); }
.fds-int-aside { display: flex; gap: 8px; padding: 12px 18px; font-size: 11.5px; color: var(--text-muted); }
.fds-int-aside .material-symbols-outlined { font-size: 16px; color: var(--info); flex: none; }
.fds-empty-big { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 40px 20px; text-align: center; }
.fds-empty-big .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.fds-empty-big .ico .material-symbols-outlined { font-size: 26px; }
.fds-empty-big h2 { font-size: 15px; font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.fds-empty-big p { font-size: 12.5px; color: var(--text-muted); max-width: 460px; margin: 0 auto 16px; }
.fds-int-cols.w420 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.fds-copy { display: flex; gap: 6px; }
.fds-copy .box { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--surface-3); background: var(--surface-2); border-radius: var(--radius); font-size: 11.5px; font-family: 'JetBrains Mono', ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-lbl { display: block; font-size: 11px; font-weight: 600; color: var(--text-faint); margin-bottom: 4px; }
.fds-labels-plain .field label { text-transform: none; letter-spacing: 0; }
.fds-checklist { display: flex; flex-direction: column; gap: 12px; }
.fds-checklist > div { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.fds-checklist .material-symbols-outlined { font-size: 16px; color: var(--tone, var(--text-faint)); }
.fds-checklist .grow { flex: 1; }
.fds-checklist small { color: var(--text-faint); font-size: 11.5px; }
.fds-quota .bar { height: 6px; background: var(--surface-3); border-radius: 3px; }
.fds-quota .bar > div { height: 100%; background: var(--success); border-radius: 3px; }
.fds-quota .cap { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.fds-int-note2 { font-size: 11.5px; color: var(--text-muted); margin-top: 12px; padding: 10px; background: var(--surface-2); border-radius: var(--radius); }
.fds-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fds-chip-mono { padding: 3px 9px; border: 1px solid var(--border); border-radius: 12px; font-size: 11.5px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 600; background: var(--surface-2); }
.fds-int-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 8px 0; border-top: 1px solid var(--surface-2); }
.fds-int-line .k { color: var(--text-faint); }
.fds-int-line .v { font-weight: 600; text-align: right; }
.fds-int-p { font-size: 12px; color: var(--text-muted); margin: 0 0 10px; }
.callout.fds-gavel { margin-bottom: 10px; }
.fds-split { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.fds-split > .a { flex: 1 1 620px; min-width: 0; }
.fds-split > .b { flex: 1 1 340px; min-width: 0; }
.fds-cond { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--surface-3); border-radius: var(--radius); background: var(--surface-2); font-size: 12px; }
.fds-cond .material-symbols-outlined { font-size: 15px; color: var(--text-muted); }
.fds-int-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.fds-int-form .field label { font-size: 11px; }
.fds-int-form .field select { width: 100%; }
.fds-runs > div { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--surface-2); font-size: 11.5px; }
.fds-runs .at { color: var(--text-faint); }
.fds-runs .res { font-weight: 700; color: var(--tone, var(--text)); }
.fds-tpl-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--surface-3); cursor: pointer; }
.fds-tpl-row:hover { background: var(--surface-2); }
.fds-tpl-row.is-selected { background: var(--error-bg); box-shadow: inset 3px 0 0 var(--brand); }
.fds-tpl-row .n { flex: 1; min-width: 0; }
.fds-tpl-row .n b { display: block; font-weight: 600; color: var(--primary); }
.fds-tpl-row .n small { font-size: 10.5px; color: var(--text-faint); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-tpl-row .cat { font-size: 11px; color: var(--text-muted); }
.fds-tpl-add { display: flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--brand); border: none; background: none; width: 100%; cursor: pointer; font-family: var(--font); }
.fds-tpl-add .material-symbols-outlined { font-size: 16px; }
.fds-tpl-body { width: 100%; box-sizing: border-box; min-height: 110px; padding: 8px 10px; font-size: 12px; font-family: 'JetBrains Mono', ui-monospace, monospace; resize: vertical; background: var(--surface-2); }
.fds-tpl-vars > div { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--surface-2); font-size: 12px; align-items: center; }
.fds-tpl-vars .n { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 600; color: var(--info); }
.fds-tpl-vars .s { color: var(--text-faint); }
.fds-wa-prev { flex: 0 1 300px; min-width: 260px; }
.fds-wa-bg { background: #e7ddd3; border-radius: 10px; padding: 16px 14px; min-height: 260px; }
.fds-wa-bubble { background: #fff; border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); max-width: 250px; color: #111b21; }
.fds-wa-bubble .doc { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f3f5f7; border-radius: 5px; margin-bottom: 8px; font-size: 11.5px; }
.fds-wa-bubble .doc .material-symbols-outlined { font-size: 20px; color: #b91c1c; }
.fds-wa-bubble .txt { font-size: 12.5px; white-space: pre-wrap; text-wrap: pretty; }
.fds-wa-bubble .time { text-align: right; font-size: 10px; color: #8b9aa6; margin-top: 4px; }
.fds-wa-note { font-size: 11px; color: var(--text-faint); margin-top: 6px; }
.fds-dir { font-size: 16px; color: var(--tone, var(--text-muted)); }
.fds-sign { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.fds-sign .h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fds-sign .h .material-symbols-outlined { font-size: 18px; color: var(--success); }
.fds-sign .h b { color: var(--primary); }
.fds-sign p { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
.fds-sign .st { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; color: var(--tone, var(--text-faint)); }
.fds-sign .st .material-symbols-outlined { font-size: 16px; width: 18px; text-align: center; color: var(--tone, var(--border)); }
.fds-sign .st.is-ok { color: var(--text); }
.fds-sign .st.is-run { color: var(--text); }
.fds-sign .done { margin-top: 8px; padding: 10px; border-radius: var(--radius); background: var(--success-bg); border: 1px solid var(--success-border); font-size: 12px; color: var(--success); }
.fds-adv { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.fds-adv > p { font-size: 11.5px; color: var(--text-muted); margin: 0; }
.fds-choice.is-disabled { opacity: .5; cursor: not-allowed; }
.drawer-foot .grp { display: flex; gap: 6px; }
.fds-bubble-test { padding: 10px 12px; background: var(--success-bg); border: 1px solid var(--success-border); border-radius: var(--radius-lg); font-size: 12.5px; color: var(--success); }
.fds-confirm { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; cursor: pointer; }
.fds-confirm input { margin-top: 2px; accent-color: var(--brand); }
.fds-int-panel-head.flex { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fds-int-panel-head.flex b { display: inline; }
.fds-split.acc > .a { flex-basis: 560px; }
.fds-split.acc > .b { flex-basis: 320px; }
.fds-split.tpl > .a { flex-basis: 380px; }
.fds-split.tpl > .b { flex-basis: 360px; }
.fds-col-toggle { width: 44px; }
.fds-tpl-note { font-size: 11px; margin-top: 4px; color: var(--warning); }
.fds-tpl-line { display: flex; justify-content: space-between; font-size: 12.5px; }
.fds-tpl-line .k { color: var(--text-faint); }
.fds-tpl-line .v { font-weight: 600; }
.fds-tpl-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fds-tpl-cell code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-tpl-cell .material-symbols-outlined { font-size: 15px; color: var(--warning); }
.fds-runs-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 4px; }
.fds-cond-list { display: flex; flex-direction: column; gap: 5px; }
.fds-int-form .sub-lbl { display: block; font-size: 11px; font-weight: 600; color: var(--text-faint); margin-bottom: 6px; }
.sr-only { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ZKTeco : terminaux de pointage */
.fds-tt { color: var(--tone, inherit); }
.fds-cell2 small.fds-tt { color: var(--tone, var(--text-faint)); }
.fds-toolbar .search { min-width: 220px; flex: 0 1 300px; }
.fds-toolbar .search input { width: 100%; }
.fds-dev-table tbody tr { user-select: none; }
.fds-bignum { font-size: 22px; font-weight: 700; color: var(--tone, var(--primary)); }
.fds-stack10 { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.fds-stack10 p { margin: 0; font-size: 12px; color: var(--text-muted); }
.fds-infocard { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 12px; color: var(--text-muted); }
.fds-infocard .material-symbols-outlined { font-size: 17px; color: var(--info); flex: none; }
.fds-tag { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 10px; font-weight: 700; background: var(--tone-bg, var(--surface-3)); color: var(--tone, var(--text)); }
.fds-log-table .fds-tag, .fds-tag.lg { padding: 1px 7px; font-size: 10.5px; }
.fds-emp-cell { min-width: 0; }
.fds-emp-cell .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fds-emp-cell b { font-weight: 600; color: var(--primary); }
.fds-emp-cell .prop { font-weight: 600; color: var(--info); }
.fds-emp-cell small { display: block; font-size: 10.5px; color: var(--text-faint); }
.fds-emp-cell small.warn { color: var(--warning); margin-top: 3px; }
.fds-row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.fds-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--surface-3); background: var(--surface-2); }
.fds-bars button { display: flex; flex-direction: column; gap: 5px; padding: 0; border: none; background: none; text-align: left; cursor: pointer; font-family: var(--font); }
.fds-bars button[aria-disabled="true"] { cursor: not-allowed; }
.fds-bars .bar { height: 3px; border-radius: 2px; background: var(--border); }
.fds-bars .lbl { font-size: 10.5px; font-weight: 700; color: var(--text-faint); }
.fds-bars button.done .bar, .fds-bars button.current .bar { background: var(--brand); }
.fds-bars button.done .lbl { color: var(--text); }
.fds-bars button.current .lbl { color: var(--brand); }
.drawer.w-620 { width: min(620px, 100%); }
.drawer-body.flush-steps { padding: 18px 20px; }
.fds-static { padding: 8px 10px; border: 1px solid var(--surface-3); background: var(--surface-2); border-radius: var(--radius); font-size: 12.5px; color: var(--text-muted); }
.fds-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
@media (max-width: 560px) { .fds-choice-grid { grid-template-columns: minmax(0, 1fr); } }
.fds-choice.radio > .material-symbols-outlined { font-size: 18px; }
.fds-choice.radio.selected > .material-symbols-outlined { color: var(--brand); }
.fds-choice.radio .t { font-weight: 600; color: var(--text); font-size: 13px; }
.fds-kvbox { padding: 12px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); font-size: 12px; }
.fds-kvbox > b { display: block; margin-bottom: 6px; }
.fds-kvbox .kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.fds-kvbox .kv .k { color: var(--text-faint); }
.fds-req { margin-left: 6px; font-size: 10px; font-weight: 400; color: var(--text-faint); }
.fds-diag-row .l .fds-req { font-weight: 400; }
.fds-diag-row .r.fds-jb { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-diag-box { border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-diag-box .fds-diag-row:last-child { border-bottom: none; }
.fds-diag-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.fds-diag-top b { display: block; color: var(--primary); }
.fds-diag-top small { font-size: 11.5px; color: var(--text-faint); }
.callout.fds-after { margin-top: 12px; }
.fds-sync-opt { opacity: var(--op, 1); }
.fds-sync-opt .fds-toggle[aria-disabled="true"] { cursor: not-allowed; }
.fds-foot-note { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 11.5px; color: var(--text-faint); }
.fds-foot-note .material-symbols-outlined { font-size: 15px; }
/* fiche appareil (fenêtre) */
.modal-overlay.fds-win-overlay { align-items: flex-start; overflow: auto; padding: 40px 20px; background: rgba(13, 27, 41, .25); }
.modal.fds-win { max-width: 1000px; max-height: none; overflow: visible; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.fds-win-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.fds-win-bar > .material-symbols-outlined { font-size: 16px; color: var(--brand); }
.fds-win-bar .t { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--primary); }
.fds-win-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--surface-3); flex-wrap: wrap; }
.fds-win-head .id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fds-win-head .id span.m { font-size: 11.5px; color: var(--text-faint); }
.fds-win-head .acts { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.fds-win-head .acts .btn { padding: 5px 9px; font-size: 11.5px; white-space: nowrap; }
.fds-win-head .acts .btn .material-symbols-outlined { font-size: 15px; }
.dropdown-menu.fds-more { width: 250px; max-width: 250px; padding: 4px; }
.fds-more .dropdown-item { align-items: flex-start; border-left: none; border-radius: var(--radius); font-size: 12px; white-space: normal; }
.fds-more .dropdown-item b { display: block; font-weight: 600; }
.fds-more .dropdown-item small { display: block; font-size: 10.5px; color: var(--text-faint); font-weight: 400; }
.tabs.fds-win-tabs { padding: 0 16px; margin-bottom: 0; overflow-x: auto; overflow-y: hidden; }
.tabs.fds-win-tabs button { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.fds-win-body { padding: 16px; min-height: 300px; }
.fds-import { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-md); }
.fds-import .field { width: auto; }
.fds-import .note { flex: 1; min-width: 200px; font-size: 11.5px; color: var(--text-muted); }
.fds-int-rows.flat { padding: 0; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; }
.fds-hist { margin: 0; }
.fds-hist > div { display: grid; grid-template-columns: 110px 1fr 120px; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--surface-2); font-size: 12px; align-items: center; }
.fds-hist .at { color: var(--text-muted); }
.fds-hist .res { text-align: right; font-weight: 700; color: var(--tone, var(--text)); }
.fds-hist.logs > div { grid-template-columns: 110px 90px 1fr 110px; padding: 8px 0; }
.fds-hist.logs .by { color: var(--text-muted); }
.fds-hist.maps > div { grid-template-columns: 80px 140px 1fr 110px; padding: 8px 0; }
.fds-hist .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-hist .mono.b { font-weight: 600; }
.fds-runs-title.sp { margin: 16px 0 6px; }
.fds-locked { display: flex; gap: 10px; align-items: center; padding: 20px; border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-muted); }
.fds-locked .material-symbols-outlined { font-size: 22px; }
.fds-adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.fds-link-a { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.fds-hint.sp { margin-top: 8px; }
.fds-int-grid2.w21 { grid-template-columns: 2fr 1fr; }
@media (max-width: 560px) { .fds-int-grid2.w21 { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------------------
   Accounting — Banque & Caisse : encaissements / décaissements (liste + saisie).
   Menu « États » (en-têtes de groupe), boutons contour succès/alerte, bandeau
   des comptes, tableau des mouvements + volet détail, formulaire d'opération.
   --------------------------------------------------------------------------- */
.page.w-1180 { max-width: 1180px; }
.page.w-1440 { max-width: 1440px; }
.fds-menu-etats { left: 0; right: auto; min-width: 250px; max-height: 75vh; overflow-y: auto; }
.fds-menu-etats .dropdown-header { padding: 8px 10px 3px; font-size: 9.5px; letter-spacing: .04em; }
.btn.btn-outline-success { color: var(--success); border-color: var(--success); background: var(--surface); font-weight: 700; }
.btn.btn-outline-success:hover { background: var(--success-bg); }
.btn.btn-outline-warning { color: var(--warning); border-color: var(--warning); background: var(--surface); font-weight: 700; }
.btn.btn-outline-warning:hover { background: var(--warning-bg); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }
.page-head .fds-head-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-head .fds-head-tools select { padding: 7px 10px; font-weight: 600; }
.kpi-row.mono-vals .val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; letter-spacing: -.02em; }
.kpi.static { cursor: default; }

/* bandeau des comptes (filtre par compte) */
.fds-bq-accts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 14px; overflow-x: auto; }
.fds-bq-accts-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); min-width: 900px; }
.fds-bq-acct { display: flex; flex-direction: column; gap: 4px; padding: 11px 14px; text-align: left; font-family: var(--font); color: var(--text); background: var(--surface); border: none; border-right: 1px solid var(--surface-3); border-bottom: 2px solid transparent; cursor: pointer; }
.fds-bq-acct:last-child { border-right: none; }
.fds-bq-acct:hover { background: var(--surface-2); }
.fds-bq-acct.is-active { background: var(--error-bg); border-bottom-color: var(--brand); }
.fds-bq-acct .top { display: flex; align-items: center; gap: 6px; }
.fds-bq-acct .top .material-symbols-outlined { font-size: 16px; color: var(--text-muted); }
.fds-bq-acct .top b { font-size: 12px; color: var(--primary); }
.fds-bq-acct .top .code { margin-left: auto; font-size: 10.5px; color: var(--text-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-acct .flow, .fds-bq-acct .bal { display: flex; justify-content: space-between; gap: 8px; }
.fds-bq-acct .flow { font-size: 11.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-acct .flow .in { color: var(--success); }
.fds-bq-acct .flow .out { color: var(--warning); }
.fds-bq-acct .bal { font-size: 11px; color: var(--text-faint); }
.fds-bq-acct .bal .flag { font-weight: 600; color: var(--tone, var(--success)); }

/* liste + volet détail */
.fds-bq-split { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.fds-bq-split > .main { flex: 1 1 760px; min-width: 0; }
.fds-bq-split > .side { flex: 0 1 340px; min-width: 280px; }
.fds-bq-table td { vertical-align: middle; }
.fds-bq-table td .sub { display: block; font-size: 10.5px; color: var(--text-faint); }
.fds-bq-table td .strong { font-weight: 600; color: var(--primary); }
.fds-bq-table .dir { display: inline-flex; align-items: center; gap: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.fds-bq-table .dir .material-symbols-outlined { font-size: 15px; color: var(--tone, var(--text-faint)); }
.fds-bq-table .op { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.fds-bq-table .op .strong, .fds-bq-table .op .sub { overflow: hidden; text-overflow: ellipsis; }
.fds-bq-table .issue { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 10.5px; font-weight: 600; color: var(--error); }
.fds-bq-table .issue .material-symbols-outlined { font-size: 13px; }
.fds-bq-table tbody tr.row-link { cursor: pointer; }
.fds-bq-table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.fds-bq-amt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; text-align: right; white-space: nowrap; color: var(--tone, var(--text)); }
.fds-bq-amt.void { color: var(--text-faint); text-decoration: line-through; }
.fds-bq-recon { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--tone, var(--text-faint)); }
.fds-bq-recon .material-symbols-outlined { font-size: 15px; }
.fds-bq-tot { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700; }
.fds-bq-tot .in { color: var(--success); }
.fds-bq-tot .out { color: var(--warning); }
.fds-bq-tot .net { color: var(--primary); border-top: 1px solid var(--border); padding-top: 2px; }
.fds-bq-empty { padding: 30px; text-align: center; color: var(--text-faint); }

.fds-bq-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-bq-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-bq-detail-head .id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.fds-bq-detail-head .who { font-size: 14px; font-weight: 700; color: var(--primary); }
.fds-bq-detail-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.fds-bq-big { font-size: 22px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.02em; color: var(--tone, var(--primary)); }
.fds-bq-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.fds-bq-kv { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.fds-bq-kv > div { display: flex; justify-content: space-between; gap: 10px; }
.fds-bq-kv .k { color: var(--text-faint); }
.fds-bq-kv .v { font-weight: 600; text-align: right; }
.fds-bq-kv .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.fds-bq-sec { padding-top: 12px; border-top: 1px solid var(--surface-3); }
.fds-bq-sec-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.fds-bq-origin { display: flex; align-items: center; gap: 8px; }
.fds-bq-origin .ref { font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.fds-bq-origin + .note { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.fds-bq-lines > div { display: grid; grid-template-columns: 1fr 80px 80px; gap: 6px; font-size: 11.5px; padding: 4px 0; border-bottom: 1px solid var(--surface-2); }
.fds-bq-lines .c { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.fds-bq-lines .n { color: var(--text-faint); }
.fds-bq-lines .a { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* formulaire d'opération */
.fds-bq-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.fds-bq-bar .lhs { display: flex; align-items: center; gap: 8px; }
.fds-bq-bar .ttl { font-size: 13.5px; font-weight: 700; color: var(--primary); }
.fds-bq-bar .st { font-size: 11px; color: var(--text-faint); }
.fds-bq-bar .rhs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fds-bq-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.fds-bq-form > .main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fds-bq-form > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.fds-bq-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.fds-bq-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); margin-bottom: 12px; }
.fds-bq-card .fds-bq-label.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fds-bq-card .fds-bq-label.row .segmented { text-transform: none; letter-spacing: 0; }
.fds-bq-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fds-bq-type { display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; font-family: var(--font); color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: pointer; }
.fds-bq-type .ico { width: 36px; height: 36px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-faint); }
.fds-bq-type .t { display: block; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.fds-bq-type .d { display: block; font-size: 11.5px; color: var(--text-muted); }
.fds-bq-type.enc.selected { border-color: var(--success); background: var(--success-bg); }
.fds-bq-type.enc.selected .ico { background: var(--success); color: #fff; }
.fds-bq-type.dec.selected { border-color: var(--warning); background: var(--warning-bg); }
.fds-bq-type.dec.selected .ico { background: var(--warning); color: #fff; }
.fds-bq-card .field { margin-bottom: 0; }
.fds-bq-card .field .hint { font-size: 10.5px; color: var(--text-faint); margin-top: 4px; }
.fds-bq-card .field .hint.err { color: var(--error); }
.fds-bq-card .field label { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--text); }
.fds-bq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fds-bq-grid + .fds-bq-sub, .fds-bq-grid + .fds-bq-modes-row { margin-top: 12px; }
.fds-bq-sub { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.fds-bq-modes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fds-bq-ro { padding: 8px 10px; border: 1px solid var(--surface-3); background: var(--surface-2); border-radius: var(--radius); font-size: 12.5px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-card input.mono-in { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-docs { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.fds-bq-docs table { width: 100%; min-width: 540px; border-collapse: collapse; }
.fds-bq-docs th { text-align: left; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); }
.fds-bq-docs th.r, .fds-bq-docs td.r { text-align: right; }
.fds-bq-docs td { padding: 8px 10px; border-bottom: 1px solid var(--surface-3); font-size: 12.5px; }
.fds-bq-docs tr:last-child td { border-bottom: none; }
.fds-bq-docs tr.is-on td { background: var(--surface-2); }
.fds-bq-docs .id { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-docs .d { font-size: 11px; color: var(--text-faint); }
.fds-bq-docs .due.late { color: var(--error); }
.fds-bq-docs .num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.fds-bq-docs input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.fds-bq-docs input.alloc { width: 100%; box-sizing: border-box; padding: 6px 8px; text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.fds-bq-docs input.alloc:disabled { background: var(--surface-2); }
.fds-bq-docs input.alloc.over { border-color: var(--error); }
.fds-bq-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--text-faint); flex-wrap: wrap; }
.fds-bq-foot button { border: none; background: none; padding: 0; color: var(--brand); font: 600 11.5px var(--font); cursor: pointer; }
.fds-bq-note { padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.fds-bq-note .material-symbols-outlined { font-size: 18px; color: var(--text-faint); }
.fds-bq-card input.fds-bq-amount { text-align: right; font-size: 15px; font-weight: 700; color: var(--primary); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-card input.fds-bq-amount[readonly] { background: var(--surface-2); }
.fds-bq-card input.fds-bq-amount.invalid { border-color: var(--error); }
.fds-bq-attach { width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px; text-align: left; font-family: var(--font); color: var(--text); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); cursor: pointer; }
.fds-bq-attach > .material-symbols-outlined { font-size: 22px; color: var(--text-faint); }
.fds-bq-attach .txt { flex: 1; }
.fds-bq-attach .t { display: block; font-size: 12.5px; font-weight: 600; }
.fds-bq-attach .s { display: block; font-size: 11px; color: var(--text-faint); }
.fds-bq-attach .a { font-size: 11.5px; font-weight: 600; color: var(--brand); }
.fds-bq-attach.is-required { border-color: #f59e0b; }
.fds-bq-attach.is-ok { border-color: var(--success-border); background: var(--success-bg); }
.fds-bq-attach.is-ok > .material-symbols-outlined { color: var(--success); }
.fds-bq-sum .tags { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.fds-bq-sum .tags small { font-size: 11px; color: var(--text-faint); }
.fds-bq-sum .big { font-size: 24px; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.02em; margin-bottom: 12px; color: var(--tone, var(--primary)); }
.fds-bq-sum .kv { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; padding-top: 12px; border-top: 1px solid var(--surface-3); }
.fds-bq-sum .kv > div { display: flex; justify-content: space-between; gap: 10px; }
.fds-bq-sum .kv .k { color: var(--text-faint); }
.fds-bq-sum .kv .v { font-weight: 600; text-align: right; color: var(--primary); }
.fds-bq-sum .kv .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 400; color: var(--text); }
.fds-bq-sum .kv .v.after { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-sum .kv .v.neg { color: var(--error); }
.fds-bq-ecr table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.fds-bq-ecr th { text-align: left; padding: 5px 0; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.fds-bq-ecr th.r, .fds-bq-ecr td.r { text-align: right; }
.fds-bq-ecr td { padding: 7px 0; border-bottom: 1px solid var(--surface-3); vertical-align: top; }
.fds-bq-ecr td.r { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.fds-bq-ecr .c { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.fds-bq-ecr .n { font-size: 10.5px; color: var(--text-faint); }
.fds-bq-ecr .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fds-bq-ecr .head .fds-bq-label { margin: 0; }
.fds-bq-ecr .head .j { font-size: 11px; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-checks { display: flex; flex-direction: column; gap: 7px; }
.fds-bq-checks > div { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--tone, var(--text-muted)); }
.fds-bq-checks .material-symbols-outlined { font-size: 16px; margin-top: 1px; }
.fds-bq-done { max-width: 560px; margin: 40px auto; padding: 0 20px; }
.fds-bq-done .box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; text-align: center; }
.fds-bq-done .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--tone-bg, var(--success-bg)); color: var(--tone, var(--success)); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.fds-bq-done .ico .material-symbols-outlined { font-size: 26px; }
.fds-bq-done h2 { font-size: 17px; font-weight: 700; color: var(--primary); margin: 0 0 4px; }
.fds-bq-done p { font-size: 12.5px; color: var(--text-muted); margin: 0 0 18px; }
.fds-bq-done .recap { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; text-align: left; padding: 14px; background: var(--surface-2); border-radius: var(--radius); margin-bottom: 18px; }
.fds-bq-done .recap > div { display: flex; justify-content: space-between; gap: 10px; }
.fds-bq-done .recap .k { color: var(--text-faint); }
.fds-bq-done .recap .v { font-weight: 700; color: var(--primary); text-align: right; }
.fds-bq-done .recap .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.fds-bq-done .btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.fds-bq-done .more { display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 600; }
@media (max-width: 760px) { .fds-bq-bar { padding: 10px 14px; } .fds-bq-split > .side { flex-basis: 100%; } }

.filters-bar .segmented { max-width: 100%; overflow-x: auto; }

/* ---------------------------------------------------------------------------
   Intelligence artificielle — hub « règles communes » et pages fournisseur
   (Claude, ChatGPT) : teintes fournisseur, cartes, jauge de budget, barre
   d'enregistrement, liste d'impact des confirmations.
   --------------------------------------------------------------------------- */
.tone-claude { --tone: #9a4a1c; --tone-bg: #fbeee6; }
.tone-openai { --tone: #0f6b55; --tone-bg: #e6f2ef; }
.page.w-1180 { max-width: 1180px; }
.fds-int-tile.solid { background: var(--primary); color: #fff; }
.fds-int-title.back { gap: 12px; }
.fds-pill.solid { background: var(--primary); color: #fff; }
.fds-pill.outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.fds-pill.lg { padding: 3px 10px; font-size: 11.5px; }
.fds-int-card-head .id > .material-symbols-outlined.fds-tt { color: var(--tone, var(--success)); }
.fds-empty-big .ico[class*="tone-"] { background: var(--tone-bg); color: var(--tone); }
.fds-int-cols.w300 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.fds-split.mdl > .a { flex-basis: 640px; }
.fds-split.mdl > .b { flex-basis: 320px; }
.fds-split.ai > .a { flex-basis: 560px; }
.fds-split.ai > .b { flex-basis: 320px; }

/* boutons pleins (confirmations) et contour sombre */
.btn.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; font-weight: 700; }
.btn.btn-warning:hover:not([disabled]) { background: color-mix(in srgb, var(--warning), #000 10%); border-color: color-mix(in srgb, var(--warning), #000 10%); }
.btn.btn-solid-danger { background: var(--error); border-color: var(--error); color: #fff; font-weight: 700; }
.btn.btn-solid-danger:hover:not([disabled]) { background: color-mix(in srgb, var(--error), #000 10%); border-color: color-mix(in srgb, var(--error), #000 10%); }
.btn.btn-outline-primary { background: var(--surface); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.btn.btn-outline-primary:hover:not([disabled]) { background: var(--surface-2); }
.btn.btn-success[disabled], .btn.btn-primary[disabled], .btn.btn-warning[disabled], .btn.btn-solid-danger[disabled] { opacity: .5; cursor: not-allowed; }

/* bascules verrouillées (imposées par Fleuva) */
.fds-toggle[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.fds-lock { font-size: 15px; color: var(--text-faint); }
.fds-switch-row .t b .fds-lock { vertical-align: -3px; margin-left: 6px; }
.fds-checklist .fds-lock { margin-left: auto; }

/* barre « modifications non enregistrées » */
.page.has-savebar { padding-bottom: 90px; }
.fds-savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--primary); color: #fff; }
.fds-savebar[hidden] { display: none; }
.fds-savebar > .material-symbols-outlined { font-size: 18px; color: #fbbf24; }
.fds-savebar > b { font-size: 12.5px; font-weight: 600; }
.fds-savebar .grp { display: flex; gap: 8px; margin-left: auto; }
.fds-savebar .btn:not(.btn-brand) { background: transparent; border-color: rgba(255, 255, 255, .28); color: #fff; font-weight: 600; }
.fds-savebar .btn:not(.btn-brand):hover { background: rgba(255, 255, 255, .08); }
body.fds-has-savebar .toast { bottom: auto; }

/* budget : jauge et seuil d'alerte */
.fds-budget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 12px; }
.fds-budget-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fds-budget-head .m { font-size: 13px; font-weight: 700; color: var(--primary); }
.fds-budget-head .v { font-size: 20px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.fds-budget-head .of { font-size: 12px; color: var(--text-muted); }
.fds-budget-head .split { margin-left: auto; font-size: 12px; color: var(--text-muted); }
.fds-meter { position: relative; height: 8px; background: var(--surface-3); border-radius: 4px; }
.fds-meter .fill { height: 100%; background: var(--tone, var(--primary)); border-radius: 4px; }
.fds-meter .mark { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--warning); }
.fds-meter.sm { height: 4px; border-radius: 2px; }
.fds-meter.sm .fill { border-radius: 2px; }
.fds-meter-cap { display: flex; font-size: 11px; color: var(--text-faint); margin-top: 5px; }
.fds-meter-cap .al { margin-left: auto; color: var(--warning); }
.fds-unit { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.fds-unit:focus-within { outline: 2px solid var(--brand); outline-offset: -1px; }
.fds-unit input { flex: 1; min-width: 0; border: none !important; outline: none !important; font-variant-numeric: tabular-nums; }
.fds-unit .u { padding: 0 9px; font-size: 11.5px; font-weight: 500; color: var(--text-faint); }
.fds-use-list > div { padding: 10px 18px; border-bottom: 1px solid var(--surface-2); display: flex; flex-direction: column; gap: 5px; }
.fds-use-list > div:last-child { border-bottom: none; }
.fds-use-list .top { display: flex; font-size: 12.5px; }
.fds-use-list .top b { font-weight: 600; }
.fds-use-list .top span { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.fds-use-list small { font-size: 11px; color: var(--text-faint); }
.fds-int-label.pad { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--surface-3); }
.fds-int-note3 { font-size: 11.5px; color: var(--text-muted); padding: 10px; background: var(--surface-2); border-radius: var(--radius); }
.fds-choice.brand.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.fds-choice.brand.selected > .material-symbols-outlined { color: var(--brand); }
.fds-choice.brand .t { font-weight: 600; color: var(--text); }
.fds-role-row { display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 12px; color: var(--text-muted); }
.fds-panel-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 12px; color: var(--text-muted); background: var(--surface-2); }
.fds-panel-foot .material-symbols-outlined { font-size: 17px; color: var(--success); }
.fds-int-panel-head.plain { border-bottom: none; padding-bottom: 0; }

/* tableaux de réglages (usages, modèles) */
.report-table td .fds-cell-select { width: 100%; min-width: 180px; padding: 6px 8px; font-size: 12px; }
.report-table td .fds-cell-input { width: 100%; min-width: 70px; padding: 6px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.report-table td.fds-mono, .report-table td .fds-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--text-muted); }
.report-table td.num, .report-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table th.fds-col-use { width: 120px; }

/* cartes fournisseur (hub) */
.fds-ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.fds-ai-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-ai-card .head { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-bottom: 1px solid var(--surface-3); }
.fds-ai-card .head .info { flex: 1; min-width: 0; }
.fds-ai-card .head .name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fds-ai-card .head .name b { font-size: 14px; color: var(--primary); }
.fds-ai-card .head .prov { font-size: 11.5px; color: var(--text-faint); }
.fds-ai-card .body { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.fds-ai-card .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; margin-top: auto; border-top: 1px solid var(--surface-3); background: var(--surface-2); }
.fds-ai-card .foot .chk { font-size: 11.5px; color: var(--text-muted); }
.fds-ai-card .foot .go { font-size: 12px; font-weight: 600; }
.fds-ai-card .foot .btn { margin-left: auto; }
.fds-ai-card .field input[readonly] { background: var(--surface-2); }
.fds-ai-route { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 14px; }
.fds-ai-route .row1 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fds-ai-route .row1 .t { flex: 1; min-width: 220px; }
.fds-ai-route .row1 .t b { display: block; font-size: 13px; color: var(--primary); }
.fds-ai-route .row1 .t small { font-size: 12px; color: var(--text-muted); }
.fds-ai-route .fds-switch-row { border-bottom: none; border-top: 1px solid var(--surface-3); padding: 12px 0 0; }
.fds-ai-route .fds-switch-row:last-child { padding-bottom: 0; }
.fds-ai-hint { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); }
.fds-ai-hint .material-symbols-outlined { font-size: 16px; }
.fds-ai-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }

/* confirmations : liste d'impact */
.fds-impact { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.fds-impact .h { padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.fds-impact .r { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--surface-3); font-size: 12.5px; }
.fds-impact .r:last-child { border-bottom: none; }
.fds-impact .r > .material-symbols-outlined { font-size: 16px; color: var(--tone, var(--text-muted)); }
.fds-impact .r .l { flex: 1; }
.fds-impact .r .v { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--text-muted); }
.fds-impact-wrap { display: flex; flex-direction: column; gap: 14px; }
.fds-impact-wrap > p { margin: 0; font-size: 12.5px; color: var(--text-muted); text-wrap: pretty; }
.report-table table.fds-minw-720 { min-width: 720px; }
.report-table table.fds-minw-860 { min-width: 860px; }
.report-table table.fds-minw-900 { min-width: 900px; }
.report-table table.fds-minw-940 { min-width: 940px; }
.fds-impact-test { margin-top: 2px; }
.fds-drawer-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--primary); }
.callout.fds-ia-warn { margin-bottom: 12px; }
.report-table td.fds-modcell { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* ---------------------------------------------------------------------------
   Smart Capture — centre de capture (lots, tableau de documents, validation
   groupée) et revue d'un document (file d'attente, original, inspecteur,
   plan d'actions).
   --------------------------------------------------------------------------- */
.tone-primary { --tone: var(--primary); --tone-bg: var(--surface-3); }
.fds-minw-1120 { min-width: 1120px; }
.report-table table.fds-minw-1120 { min-width: 1120px; }
.btn.fds-danger-text { color: var(--error); }
.fds-chip-toggle .cnt { font-size: 11px; font-weight: 700; opacity: .75; }
.fds-chip-toggle.dark.on { border-color: var(--primary); background: var(--primary); color: #fff; }
.fds-chip-toggle.dark.on .cnt { opacity: .85; }
.fds-count.error { background: var(--error); color: #fff; }
.fds-count.warning { background: var(--warning); color: #fff; }

/* centre de capture */
.page.fds-fsc { max-width: 1400px; display: flex; flex-direction: column; gap: 16px; padding-bottom: 60px; }
.fds-fsc-head h1 { margin: 0 0 3px; }
.fds-fsc-head p { margin: 0; font-size: 12.5px; color: var(--text-muted); text-wrap: pretty; }
.fds-fsc-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .fds-fsc-top { grid-template-columns: minmax(0, 1fr); } }
.fds-fsc-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.fds-fsc-card.tight { gap: 10px; }
.fds-fsc-card > .ttl { font-size: 11.5px; font-weight: 700; color: var(--primary); }
.dropzone.fsc { border-width: 1.5px; background: var(--surface-2); padding: 26px 16px; text-align: center; cursor: pointer; }
.dropzone.fsc > .material-symbols-outlined { font-size: 30px; color: var(--brand); }
.dropzone.fsc .t { font-size: 13.5px; font-weight: 600; color: var(--primary); }
.dropzone.fsc .t u { color: var(--brand); }
.dropzone.fsc .h { font-size: 11.5px; color: var(--text-faint); }
.dropzone.fsc.is-over, .dropzone.fsc:focus-visible { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); outline: none; }
.dropzone.fsc:hover { border-color: var(--text-faint); }
.fds-fsc-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .fds-fsc-opts { grid-template-columns: minmax(0, 1fr); } }
.fds-check-field { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text); }
.fds-check-field input { accent-color: var(--brand); margin: 0; }
.fds-check-field .sub { margin-left: auto; font-size: 11px; color: var(--text-faint); }
.fds-lot { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px; border: 1px solid var(--surface-3); background: var(--surface); border-radius: var(--radius-md); }
.fds-lot.is-current { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.fds-lot .row { display: flex; align-items: center; gap: 8px; }
.fds-lot .id { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; font-weight: 500; color: var(--primary); }
.fds-lot .st { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--tone, var(--text-muted)); }
.fds-lot .meta { font-size: 11px; color: var(--text-faint); }
.fds-meter.md { height: 5px; border-radius: 3px; }
.fds-meter.md .fill { border-radius: 3px; }
.fds-fsc-lot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.fds-fsc-lothead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-fsc-lothead .id { display: flex; align-items: center; gap: 8px; }
.fds-fsc-lothead .id b { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; font-weight: 500; color: var(--primary); }
.fds-fsc-lothead .sub { font-size: 11.5px; color: var(--text-faint); }
.fds-fsc-prog { flex: 1; min-width: 180px; max-width: 360px; display: flex; flex-direction: column; gap: 4px; }
.fds-fsc-prog .row { display: flex; font-size: 11px; color: var(--text-muted); }
.fds-fsc-prog .row b { margin-left: auto; color: var(--text); }
.fds-fsc-lothead .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fds-fsc-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-fsc-filters .search { margin-left: auto; min-width: 220px; }
.fds-bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px; border-bottom: 1px solid var(--surface-3); }
.fds-bulkbar.is-active { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.fds-bulkbar .lbl { font-size: 12px; font-weight: 600; color: var(--text); }
.fds-bulkbar .grp { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fds-fsc-lot .report-table { border: none; border-radius: 0; }
.fds-fsc-table td.fds-col-check, .fds-fsc-table th.fds-col-check { width: 36px; }
.fds-fsc-table td.fds-col-check input { accent-color: var(--brand); margin: 0; }
.fds-fsc-table td.fds-ref { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; white-space: nowrap; }
.fds-fsc-table td.fds-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fds-fsc-table th.fds-amt { text-align: right; }
.fds-fsc-table td.fds-src { font-size: 11.5px; color: var(--text-muted); }
.fds-fsc-table td.fds-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.fds-cell2 a { color: inherit; text-decoration: none; }
.fds-cell2 a:hover { color: var(--brand); }
.fds-cell2 .main { display: block; font-weight: 400; color: var(--text); }
.fds-tiers { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fds-tiers .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-conf { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--tone, var(--text-faint)); }
.fds-conf::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fds-fsc-issues { font-size: 12px; font-weight: 600; color: var(--tone, var(--text-faint)); }
.fds-fsc-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--surface-3); }
.fds-fsc-foot .grp { margin-left: auto; display: flex; gap: 4px; }
.fds-recap { padding: 4px 0; }
.fds-recap .r { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--surface-2); font-size: 12.5px; }
.fds-recap .r:last-child { border-bottom: none; }
.fds-recap .r > .material-symbols-outlined { font-size: 18px; color: var(--tone, var(--text)); }
.fds-recap .r .v { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--tone, var(--text)); font-variant-numeric: tabular-nums; }
.fds-recap-note { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); font-size: 12px; color: var(--text-muted); text-wrap: pretty; }
.fds-motif { margin-top: 2px; }

/* revue d'un document */
.fds-rev-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.fds-rev-bar .lot { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--text-muted); }
.fds-rev-bar .lot:hover { color: var(--brand); }
.fds-rev-bar .sep { font-size: 16px; color: var(--text-faint); }
.fds-rev-bar .file { font-weight: 700; font-size: 14px; color: var(--primary); }
.fds-rev-bar .sub { font-size: 11.5px; color: var(--text-faint); }
.fds-rev-bar .nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fds-rev-bar .nav .cnt { font-size: 11.5px; color: var(--text-muted); }
.fds-rev { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(380px, 460px); grid-template-rows: minmax(0, 1fr); min-height: 640px; height: calc(100vh - 152px); }
@media (max-width: 1279px) { .fds-rev { grid-template-columns: minmax(0, 1fr) minmax(360px, 420px); } .fds-rev-queue { display: none; } }
@media (max-width: 900px) { .fds-rev { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; height: auto; min-height: 0; } .fds-rev-viewer { min-height: 460px; max-height: 70vh; } .fds-rev-insp { border-left: none; border-top: 1px solid var(--border); } }
.fds-rev-queue { background: var(--surface); border-right: 1px solid var(--border); overflow: auto; min-height: 0; }
.fds-rev-queue .h { padding: 10px 12px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); border-bottom: 1px solid var(--surface-3); }
.fds-rev-queue .item { display: block; width: 100%; text-align: left; font-family: var(--font); background: var(--surface); border: none; border-bottom: 1px solid var(--surface-2); border-left: 3px solid transparent; padding: 9px 12px; cursor: pointer; }
.fds-rev-queue .item:hover { background: var(--surface-2); }
.fds-rev-queue .item.is-current { border-left-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.fds-rev-queue .item .t { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text); }
.fds-rev-queue .item .t span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-rev-queue .item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--text-faint)); flex: none; }
.fds-rev-queue .item .m { display: block; padding-left: 13px; font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-rev-viewer { display: flex; flex-direction: column; min-height: 0; overflow: auto; background: var(--surface-3); }
.fds-rev-tools { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 7px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.fds-rev-tools b { font-weight: 600; color: var(--text); }
.fds-rev-tools .r { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.fds-rev-tools .r .material-symbols-outlined { font-size: 15px; }
.fds-rev-tools .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.fds-rev-sheet { padding: 24px; display: flex; }
.fds-paper { margin: 0 auto; width: 100%; max-width: 640px; min-width: 520px; box-sizing: border-box; padding: 36px 40px; background: #fff; box-shadow: 0 1px 3px rgba(13, 27, 41, .15); font-family: Georgia, 'Times New Roman', serif; color: #222; font-size: 12px; line-height: 1.45; }
.fds-paper .hd { display: flex; justify-content: space-between; gap: 20px; }
.fds-paper .col { display: flex; flex-direction: column; gap: 2px; }
.fds-paper .col.r { text-align: right; align-items: flex-end; }
.fds-paper .name { font-size: 16px; font-weight: 700; letter-spacing: .02em; align-self: flex-start; }
.fds-paper .title { font-size: 22px; font-weight: 700; letter-spacing: .08em; }
.fds-paper .self { align-self: flex-start; }
.fds-paper .it { color: #555; font-style: italic; }
.fds-paper .bill { margin: 22px 0 16px; padding: 10px 12px; border: 1px solid #ddd; max-width: 260px; }
.fds-paper .bill .k { font-size: 10.5px; text-transform: uppercase; color: #777; }
.fds-paper .bill b { display: block; }
.fds-paper .ln { display: grid; grid-template-columns: minmax(0, 3fr) 1fr 1fr 1.2fr; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #e5e5e5; }
.fds-paper .ln.head { border-top: 1.5px solid #222; border-bottom: 1px solid #222; font-weight: 700; font-size: 11px; }
.fds-paper .ln span:not(:first-child) { text-align: right; }
.fds-paper .tot { margin-top: 14px; margin-left: auto; width: 260px; max-width: 100%; display: flex; flex-direction: column; gap: 3px; }
.fds-paper .tot .row { display: flex; }
.fds-paper .tot .row span:last-child { margin-left: auto; }
.fds-paper .tot .row.net { font-weight: 700; font-size: 13.5px; border-top: 1.5px solid #222; padding-top: 4px; margin-top: 2px; }
.fds-paper .words { margin-top: 26px; font-style: italic; font-size: 11px; color: #555; }
.fds-paper .pay { margin-top: 6px; font-size: 11px; color: #555; }
.fds-zone { display: block; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; border-radius: 1px; }
span.fds-zone { display: inline-block; }
.fds-zone:hover { outline-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.fds-zone:focus-visible { outline-color: var(--info); }
.fds-zone.is-sel { outline-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.fds-rev-insp { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border-left: 1px solid var(--border); }
.tabs.fds-rev-tabs { flex-shrink: 0; flex-wrap: wrap; gap: 0; margin: 0; padding: 0 6px; overflow: visible; }
.tabs.fds-rev-tabs button { padding: 10px 7px 8px; font-size: 12px; gap: 5px; }
.fds-rev-body { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.fds-rev-list { display: flex; flex-direction: column; gap: 6px; }
.fds-rev-list.g8 { gap: 8px; }
.fds-rev-field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--surface-3); background: var(--surface); border-radius: var(--radius-md); cursor: pointer; }
.fds-rev-field.is-sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.fds-rev-field .lbl { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; color: var(--text-faint); }
.fds-rev-field .meta { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-muted); }
.fds-rev-field .meta::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--text-faint)); flex: none; }
.fds-rev-field input { font-weight: 600; padding: 5px 7px; min-width: 0; }
.fds-rev-box { border: 1px solid var(--surface-3); border-radius: var(--radius-md); }
.fds-rev-box > .h { padding: 8px 10px; font-size: 11.5px; font-weight: 700; color: var(--primary); border-bottom: 1px solid var(--surface-3); }
.fds-rev-box .r { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--surface-2); font-size: 12px; }
.fds-rev-box .r:last-child { border-bottom: none; }
.fds-rev-box .r > .material-symbols-outlined { font-size: 17px; color: var(--tone, var(--text-muted)); }
.fds-rev-box .r .v { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tone, var(--text)); }
.fds-rev-box .kvr { display: flex; padding: 8px 10px; border-bottom: 1px solid var(--surface-2); font-size: 12px; }
.fds-rev-box .kvr:last-child { border-bottom: none; }
.fds-rev-box .kvr .k { color: var(--text-muted); }
.fds-rev-box .kvr .v { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tone, var(--text)); }
.fds-rev-note { margin: 0; font-size: 11.5px; color: var(--text-muted); text-wrap: pretty; }
.fds-rev-note.faint { color: var(--text-faint); }
.fds-rev-info { display: flex; gap: 8px; padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--surface-3); border-radius: var(--radius-md); font-size: 12px; color: var(--text-muted); text-wrap: pretty; }
.fds-rev-info .material-symbols-outlined { font-size: 18px; color: var(--info); flex: none; }
.fds-choice.brand .tag { display: block; font-size: 11px; font-weight: 600; color: var(--tone, var(--text-faint)); }
.fds-choice.brand.compact { align-items: center; padding: 7px 9px; font-size: 12px; border-width: 1px; border-radius: var(--radius); }
.fds-art { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--surface-3); border-radius: var(--radius-md); }
.fds-art.is-warn { border-color: color-mix(in srgb, var(--warning) 40%, var(--surface)); }
.fds-art .top { display: flex; align-items: center; gap: 8px; }
.fds-art .top b { font-size: 12.5px; color: var(--text); }
.fds-art .top .fds-tag { margin-left: auto; white-space: nowrap; }
.fds-art .m { font-size: 11.5px; color: var(--text-muted); }
.fds-art .conv { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: var(--tone-bg); border-radius: var(--radius); font-size: 12px; }
.fds-art .conv > .material-symbols-outlined { font-size: 17px; color: var(--tone); }
.fds-art .conv .btn { margin-left: auto; }
.fds-art-opts { display: flex; flex-direction: column; gap: 5px; }
.fds-rev-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .fds-rev-meta { grid-template-columns: minmax(0, 1fr); } }
.fds-rev-meta > div { padding: 7px 9px; border: 1px solid var(--surface-3); border-radius: var(--radius-md); }
.fds-rev-meta .k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; color: var(--text-faint); }
.fds-rev-meta .v { font-size: 12.5px; font-weight: 600; }
.fds-rev-tbl { border: 1px solid var(--surface-3); border-radius: var(--radius-md); overflow-x: auto; }
.fds-rev-tbl .row { display: grid; grid-template-columns: var(--cols); gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--surface-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.fds-rev-tbl .row.head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--surface-3); }
.fds-rev-tbl .row.sum { padding: 8px 10px; font-weight: 700; background: var(--surface-2); border-bottom: none; }
.fds-rev-tbl .row .rt { text-align: right; }
.fds-rev-tbl .row .acc { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; }
.fds-rev-tbl .row .ok { display: flex; align-items: center; gap: 4px; color: var(--success); }
.fds-rev-tbl .row .ok .material-symbols-outlined { font-size: 16px; }
.fds-rev-tbl .row .tt { font-weight: 600; color: var(--tone, var(--text)); }
.fds-rev-tbl.cols-stock { --cols: minmax(0, 2fr) 1fr 1fr 1fr; }
.fds-rev-tbl.cols-ecr { --cols: 52px minmax(0, 1fr) 84px 84px; }
.fds-rev-issue { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--surface-3); border-radius: var(--radius-md); }
.fds-rev-issue.is-done { opacity: .6; }
.fds-rev-issue > .material-symbols-outlined { font-size: 18px; color: var(--tone, var(--text-muted)); }
.fds-rev-issue .t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.fds-rev-issue .t b { font-weight: 600; font-size: 12.5px; color: var(--text); }
.fds-rev-issue .t small { font-size: 11.5px; color: var(--text-muted); }
.fds-rev-issue .btn { align-self: center; }
.fds-rev-field-sel { margin-top: 0; }
.fds-rev-foot { display: flex; flex-direction: column; flex-shrink: 0; border-top: 1px solid var(--border); background: var(--surface-2); }
.fds-rev-plan { max-height: 190px; overflow: auto; padding: 10px 16px 4px; display: flex; flex-direction: column; gap: 5px; }
.fds-rev-plan .ttl { font-size: 11.5px; font-weight: 700; color: var(--primary); }
.fds-rev-plan .it { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.fds-rev-plan .it .n { flex: none; width: 14px; padding-top: 1px; text-align: right; font-size: 10.5px; font-weight: 700; color: var(--text-faint); }
.fds-rev-plan .it .b { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fds-rev-plan .it .b code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-rev-plan .it .st { font-size: 10.5px; font-weight: 600; white-space: nowrap; color: var(--tone, var(--text-faint)); }
.fds-rev-notice { padding: 8px 16px 0; font-size: 11.5px; font-weight: 600; color: var(--warning); }
.fds-rev-result { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 12px; border-top: 1px solid var(--surface-3); }
.fds-rev-result .ok { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--success); }
.fds-rev-result .ok .material-symbols-outlined { font-size: 17px; }
.fds-rev-result .res { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--surface-3); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 12px; text-decoration: none; }
.fds-rev-result .res:hover { border-color: var(--brand); }
.fds-rev-result .res .material-symbols-outlined { font-size: 17px; color: var(--text-muted); }
.fds-rev-result .res .ref { margin-left: auto; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; color: var(--brand); }
.fds-rev-result .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.fds-rev-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px 12px; }
.fds-rev-actions .ver { font-size: 11.5px; color: var(--tone, var(--text-faint)); }
.fds-rev-actions .grp { margin-left: auto; display: flex; gap: 6px; }
.fds-rev-bar .nav .btn.icon-only { padding: 3px 5px; }

body.fds-rev-page .toast { bottom: auto; }
.fds-rev-body .field.fds-labels-plain label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
/* <<< RH-MODULE */
