/* ============================================================================
   CLICK SOFT — PAGES DOCUMENTS « ENCRE & PAPIER »
   Ventes (factures, devis, bons de commande, bons de livraison, bons de sortie, avoirs),
   achats (commandes fournisseur, achats, retours), produits (liste, fiche, création).

   - Actif uniquement sur <body class="cs-docs …"> (calculé dans layouts/app.blade.php) :
       cs-docs--list | cs-docs--form     cs-docs--sale | cs-docs--purchase | cs-docs--product
   - Aucune règle ne touche au comportement (DataTables, pos.js, offline-sync…) : présentation seule.
   - Couleurs = jetons de la charte (cs-theme.css) → le mode sombre suit automatiquement.
   - Les pages contiennent des styles en ligne et d'anciennes feuilles (window-overrides, product-form,
     doc-ui) : d'où la spécificité « html body.cs-docs » et !important là où l'ancien CSS l'impose.
   ============================================================================ */

body{
  --cp-radius:12px; --cp-radius-sm:8px;
  --cp-shadow:0 1px 2px rgba(14,42,92,.05);
  --cp-shadow-pop:0 12px 32px rgba(14,42,92,.14),0 2px 6px rgba(14,42,92,.06);
  --cp-head:#F7F9FC;            /* en-tête de tableau, barres */
  --cp-row-hover:#F3F7FE;
  --cp-ring:0 0 0 3px rgba(20,89,199,.16);
}
html[data-theme="dark"] body{
  --cp-head:#13264A; --cp-row-hover:rgba(91,155,255,.07);
  --cp-shadow:0 1px 2px rgba(0,0,0,.25); --cp-shadow-pop:0 16px 40px rgba(0,0,0,.5);
  --cp-ring:0 0 0 3px rgba(91,155,255,.25);
}
html body.cs-docs .content-wrapper,html body.cs-docs .content{font-family:var(--cs-font)!important;color:var(--cs-text)}

/* ═════════════════════════ 1. EN-TÊTE DE PAGE ═════════════════════════ */
html body.cs-forms .content-header{padding:22px 15px 6px!important;margin:0!important;background:transparent!important}
html body.cs-forms .content-header h1{
  font-family:var(--cs-font)!important;font-size:24px!important;font-weight:600!important;line-height:1.25!important;
  color:var(--cs-text)!important;letter-spacing:-.01em!important;margin:0!important;display:block}
html body.cs-forms .content-header h1::before{
  content:var(--cs-eyebrow,"");display:block;margin:0 0 6px;font-size:12.5px;font-weight:600;letter-spacing:.01em;
  color:var(--cs-brand);line-height:1}
html body.cs-forms .content-header h1 small{
  display:block!important;margin-top:6px!important;padding:0!important;font-size:14px!important;font-weight:400!important;
  color:var(--cs-muted)!important}
html body.cs-forms .content-header h1 i.fa-keyboard-o,html body.cs-forms .content-header h1 .hover-q{font-size:15px!important;color:var(--cs-faint)!important;vertical-align:middle}
html body.cs-forms .content-header .breadcrumb{display:none!important}
html body.cs-forms section.content{padding-top:14px!important}
@media (max-width:767px){
  html body.cs-forms .content-header{padding:16px 12px 4px!important}
  html body.cs-forms .content-header h1{font-size:20px!important}
}

/* ═════════════════════════ 2. CARTES (components.widget / components.filters / .box) ═════════════════════════ */
html body.cs-forms .content .tw-rounded-xl.tw-ring-1,
html body.cs-forms .content .box{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;
  box-shadow:var(--cp-shadow)!important;--tw-ring-shadow:0 0 #0000!important;--tw-ring-color:transparent!important}
html body.cs-forms .content .tw-rounded-xl.tw-ring-1:hover{box-shadow:var(--cp-shadow)!important}
html body.cs-forms .content .box-header{padding:6px 8px 10px!important;border:0!important;background:transparent!important;display:flex;align-items:center;flex-wrap:wrap;gap:10px}
html body.cs-forms .content .box-header.with-border{border-bottom:1px solid var(--cs-line)!important}
html body.cs-forms .content .box-header .box-title{
  font-family:var(--cs-font)!important;font-size:15.5px!important;font-weight:600!important;color:var(--cs-text)!important;margin:0!important;
  flex:1 1 auto;min-width:0}
html body.cs-forms .content .box-header .box-tools{position:static!important;margin-left:auto!important;float:none!important}
html body.cs-forms .content .box-header > br{display:none}
html body.cs-forms .content .box-header > small{flex-basis:100%;color:var(--cs-muted);font-size:12.5px}
html body.cs-forms .content .box-body{color:var(--cs-text)}

/* Filtres : barre repliable propre, chevron d'état */
html body.cs-forms .content #collapseFilter{border-top:1px solid var(--cs-line);margin-top:2px}
html body.cs-forms .content .box-header.with-border:has(a[href="#collapseFilter"]){border-bottom:0!important;padding:4px 6px!important}
html body.cs-forms .content .box-title a[href="#collapseFilter"]{
  display:flex;align-items:center;gap:10px;color:var(--cs-text)!important;text-decoration:none!important;font-size:14px;font-weight:600}
html body.cs-forms .content .box-title a[href="#collapseFilter"] > i{
  width:30px;height:30px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--cs-brand-soft);color:var(--cs-brand)!important;font-size:13px}
html body.cs-forms .content .box-title a[href="#collapseFilter"]::after{
  content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid var(--cs-faint);border-bottom:2px solid var(--cs-faint);
  transform:rotate(45deg) translate(-2px,-2px);transition:transform .18s}
html body.cs-forms .content .box-title a[href="#collapseFilter"][aria-expanded="true"]::after{transform:rotate(-135deg) translate(-2px,-2px)}
html body.cs-forms .content .box-title:has(a[href="#collapseFilter"]){width:100%;padding:4px 4px!important}

/* ═════════════════════════ 3. BARRE DE PÉRIODE (Mois / Année) — toutes les variantes pnf-xx ═════════════════════════ */
html body.cs-forms div[id^="pnf"]:has(> div[id$="-top"]){
  background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;
  box-shadow:var(--cp-shadow)!important;margin:0 0 16px!important}
html body.cs-forms div[id^="pnf"][id$="-top"]{background:transparent!important;border-bottom:1px solid var(--cs-line)!important;padding:10px 14px!important}
html body.cs-forms div[id^="pnf"][id$="-bar"]{background:var(--cp-head)!important;height:52px!important;padding:8px 10px!important}
html body.cs-forms [id^="pnf"][id$="-mode-label"],html body.cs-forms [id^="pnf"][id$="-period-val"]{color:var(--cs-text)!important;font-weight:600!important}
html body.cs-forms [id^="pnf"][id$="-range-txt"]{color:var(--cs-muted)!important;font-weight:500!important}
html body.cs-forms button[id^="pnf"][id$="-back-btn"]{color:var(--cs-brand)!important}
html body.cs-forms [id^="pnf"][id$="-sep"]{background:var(--cs-line)!important}
html body.cs-forms button[class^="pnf"][class$="-nav"],html body.cs-forms button[class^="pnf"][class$="-arrow"]{
  border:1px solid var(--cs-line)!important;color:var(--cs-muted)!important;background:var(--cs-surface)!important;border-radius:8px!important}
html body.cs-forms button[class^="pnf"][class$="-nav"]:hover,html body.cs-forms button[class^="pnf"][class$="-arrow"]:hover{
  border-color:var(--cs-brand)!important;color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html body.cs-forms div[id^="pnf"][id$="-toggle"]{border:1px solid var(--cs-line)!important;background:var(--cp-head)!important;border-radius:8px!important;padding:2px!important}
html body.cs-forms button[class^="pnf"][class*="-tb"]{color:var(--cs-muted)!important;border-radius:6px!important;padding:4px 14px!important}
html body.cs-forms button[class^="pnf"][class*="-tb"].on{background:var(--cs-surface)!important;color:var(--cs-text)!important;box-shadow:0 1px 2px rgba(14,42,92,.12)!important}
html body.cs-forms button[class^="pnf"][class*="-tb"].on::after{display:none!important}
html body.cs-forms span[class^="pnf"][class*="year-sep"]{color:var(--cs-faint)!important}
html body.cs-forms span[class^="pnf"][class*="year-sep"][class*="yactive"]{color:var(--cs-brand)!important}
html body.cs-forms button[class^="pnf"][class*="item"]{
  color:var(--cs-muted)!important;background:transparent!important;border:1px solid transparent!important;border-radius:8px!important;font-weight:500!important}
html body.cs-forms button[class^="pnf"][class*="item"]:hover{color:var(--cs-text)!important;background:var(--cs-surface)!important;border-color:var(--cs-line)!important}
/* Période courante : simple repère (point), pas de couleur d'alerte */
html body.cs-forms button[class^="pnf"][class*="item"][class*="-cur"]{color:var(--cs-text)!important;font-weight:600!important}
html body.cs-forms button[class^="pnf"][class*="item"][class*="-cur"]::before{
  content:"";position:absolute;top:5px;right:6px;width:5px;height:5px;border-radius:50%;background:var(--cs-brand)}
/* Période sélectionnée : étiquette encre (même langage que la sidebar) */
html body.cs-forms button[class^="pnf"][class*="item"][class*="-sel"]{
  color:#fff!important;background:var(--cs-brand)!important;border-color:var(--cs-brand)!important;font-weight:600!important}
html body.cs-forms button[class^="pnf"][class*="item"][class*="-sel"]::after{display:none!important}
html body.cs-forms button[class^="pnf"][class*="item"][class*="-sel"]::before{background:#fff}

/* ═════════════════════════ 4. BOUTONS ═════════════════════════ */
html body.cs-forms .content .tw-dw-btn,html body.cs-forms .content-header .tw-dw-btn,html body.cs-forms .modal .tw-dw-btn{font-family:var(--cs-font)!important;border-radius:8px!important;font-weight:600!important;letter-spacing:0!important;text-transform:none!important}
/* Primaire : bleu de la charte (aussi les anciens boutons « dégradé indigo » des listes) */
html body.cs-forms .content .tw-dw-btn-primary,
html body.cs-forms .content-header .tw-dw-btn-primary,
html body.cs-forms .modal .tw-dw-btn-primary,
html body.cs-forms .content .tw-dw-btn.tw-bg-gradient-to-r,
html body.cs-forms .content a.cs-btn-add{
  background:var(--cs-brand)!important;background-image:none!important;border:1px solid var(--cs-brand)!important;color:#fff!important;
  border-radius:8px!important;box-shadow:0 1px 2px rgba(20,89,199,.25)!important;height:38px!important;min-height:38px!important;
  padding:0 16px!important;font-size:13.5px!important;display:inline-flex!important;align-items:center!important;gap:8px!important;text-decoration:none!important}
html body.cs-forms .content .tw-dw-btn-primary:hover,html body.cs-forms .content-header .tw-dw-btn-primary:hover,html body.cs-forms .modal .tw-dw-btn-primary:hover,
html body.cs-forms .content .tw-dw-btn.tw-bg-gradient-to-r:hover,html body.cs-forms .content a.cs-btn-add:hover{
  background:var(--cs-brand-hover)!important;border-color:var(--cs-brand-hover)!important;color:#fff!important}
html body.cs-forms .content .tw-dw-btn.tw-bg-gradient-to-r svg,html body.cs-forms .content a.cs-btn-add svg{width:16px!important;height:16px!important}
/* Secondaire : contour (anciens boutons « blanc + bordure indigo »).
   .btn-default : couleurs seulement — ne JAMAIS forcer display/hauteur (bootstrap-fileinput masque
   « Retirer » / « Annuler » quand aucun fichier n'est choisi). */
html body.cs-forms .content .tw-dw-btn.tw-border-indigo-500{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;border-radius:8px!important;height:38px!important;
  min-height:38px!important;padding:0 14px!important;display:inline-flex!important;align-items:center!important;gap:8px!important}
html body.cs-forms .content .btn-default{background-color:var(--cs-surface)!important;border-color:var(--cs-line-2)!important;color:var(--cs-text)!important}
html body.cs-forms .content .tw-dw-btn.tw-border-indigo-500:hover,html body.cs-forms .content .btn-default:hover{background-color:var(--cp-head)!important;border-color:var(--cs-brand)!important;color:var(--cs-brand)!important}
/* Les boutons d'en-tête de carte s'alignent à droite, avec espacement régulier */
html body.cs-forms .content .box-tools{display:flex!important;align-items:center;gap:8px;flex-wrap:wrap}
html body.cs-forms .content .box-tools .pull-right{float:none!important;margin:0!important}

/* Barres d'outils des listes (Envois, Remises, Import… / Import produits, Étiquettes…) : boutons sobres, icône bleue */
html body.cs-forms .content .cs-ib,html body.cs-forms .content .pqa-ib{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;
  height:36px!important;border-radius:8px!important;padding:0 12px!important;opacity:1!important;transform:none!important}
html body.cs-forms .content .cs-ib svg,html body.cs-forms .content .pqa-ib svg,html body.cs-forms .content .pqa-ib i{color:var(--cs-brand)!important}
html body.cs-forms .content .cs-ib span,html body.cs-forms .content .pqa-ib span{font-size:13px!important;font-weight:500!important}
html body.cs-forms .content .cs-ib:hover,html body.cs-forms .content .pqa-ib:hover{border-color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important;color:var(--cs-text)!important}
html body.cs-forms .content .cs-tip,html body.cs-forms .content .pqa-tip{display:none!important} /* le libellé est déjà visible */
html body.cs-forms .content .cs-tb-sep{background:var(--cs-line)!important;width:1px!important}
html body.cs-forms .content .cs-cta-btn{background:var(--cs-brand)!important;box-shadow:none!important;border-radius:8px!important}
html body.cs-forms .content .cs-cta-btn:hover{background:var(--cs-brand-hover)!important;transform:none!important}

/* ═════════════════════════ 5. TABLEAUX DE LISTE (DataTables) — TOUT LE PROJET ═════════════════════════ */
html:root body .dataTables_wrapper{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;
  box-shadow:none!important;font-family:var(--cs-font)!important;color:var(--cs-text)!important}
/* Dans une carte : pas de second cadre */
html:root body .content .tw-rounded-xl.tw-ring-1 .dataTables_wrapper,html:root[data-theme="dark"] body .content .tw-rounded-xl.tw-ring-1 .dataTables_wrapper{border:0!important;border-radius:0!important;background:transparent!important}
html:root body .content .tw-rounded-xl.tw-ring-1 .dataTables_wrapper > .row.margin-bottom-20{padding:4px 0 12px!important}
html:root body .content .tw-rounded-xl.tw-ring-1 .dataTables_wrapper .dataTables_info{padding-left:0!important}
html:root body .content .tw-rounded-xl.tw-ring-1 .dataTables_wrapper .dataTables_paginate{padding-right:0!important}
/* Barre du haut : [n lignes] [exports] [recherche] */
html:root body .dataTables_wrapper > .row.margin-bottom-20{
  display:flex!important;align-items:center;flex-wrap:wrap;gap:10px;margin:0!important;padding:10px 12px!important;
  border-bottom:1px solid var(--cs-line)!important;background:transparent!important;border-radius:var(--cp-radius) var(--cp-radius) 0 0}
html:root body .dataTables_wrapper > .row.margin-bottom-20 > [class*="col-sm-"]{float:none!important;width:auto!important;padding:0!important;text-align:left!important}
html:root body .dataTables_wrapper > .row.margin-bottom-20 > .col-sm-8{flex:1 1 auto;display:flex;justify-content:center}
html:root body .dataTables_wrapper > .row.margin-bottom-20 > .col-sm-3{margin-left:auto}
html:root body .dataTables_length label,html:root body .dataTables_filter label{margin:0!important;font-weight:500!important;color:var(--cs-muted)!important;font-size:13px!important}
html:root body .dataTables_length select{
  height:34px!important;border:1px solid var(--cs-line-2)!important;border-radius:8px!important;background-color:var(--cs-surface)!important;
  color:var(--cs-text)!important;padding:0 26px 0 10px!important;margin:0 6px!important}
html:root body .dataTables_filter input{
  height:36px!important;width:260px!important;max-width:100%;margin:0!important;border:1px solid var(--cs-line-2)!important;border-radius:8px!important;
  padding:0 12px 0 34px!important;font-size:13.5px!important;color:var(--cs-text)!important;
  background:var(--cs-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A97AB' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 11px center!important;
  box-shadow:none!important}
html:root body .dataTables_filter input:focus,html:root body .dataTables_length select:focus{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important;outline:0}
/* Classe répétée (.dt-buttons×3) : plus spécifique que window-overrides.css et son mode sombre (qui masquent les icônes). */
/* Exports (TOUS les DataTables du projet, pas seulement les pages documents) : une seule barre segmentée, icônes en couleur d'usage, libellé en infobulle (data-tip, dt-buttons-init.js) */
html:root body .dt-buttons.dt-buttons.dt-buttons{
  display:inline-flex!important;flex-wrap:nowrap!important;gap:0!important;margin:0!important;float:none!important;padding:0!important;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;border-radius:8px!important;overflow:visible!important;box-shadow:none!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > .tw-dw-btn,html:root body .dt-buttons.dt-buttons.dt-buttons > .dt-button,html:root body .dt-buttons.dt-buttons.dt-buttons > .btn,
html:root body .dt-buttons.dt-buttons.dt-buttons > a,html:root body .dt-buttons.dt-buttons.dt-buttons > button{
  position:relative!important;width:38px!important;min-width:38px!important;height:34px!important;min-height:34px!important;margin:0!important;padding:0!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:0!important;
  background:transparent!important;border:0!important;border-right:1px solid var(--cs-line)!important;border-radius:0!important;box-shadow:none!important;
  color:var(--cs-muted)!important;font-size:0!important;transform:none!important;flex:0 0 auto!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > :first-child{border-radius:7px 0 0 7px!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > :last-child{border-right:0!important;border-radius:0 7px 7px 0!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > * > span{font-size:0!important;color:transparent!important;display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;height:auto!important;gap:0}
html:root body .dt-buttons.dt-buttons.dt-buttons > * i,html:root body .dt-buttons.dt-buttons.dt-buttons > * svg{font-size:15px!important;width:auto!important;height:auto!important;color:var(--cs-muted)!important;transform:none!important;margin:0!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > .buttons-csv i{color:#0F8B6F!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > .buttons-excel i{color:#1D6F42!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > .buttons-pdf i{color:#C62D3A!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > *:hover{background:var(--cs-brand-soft)!important;transform:none!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > *:hover i{color:var(--cs-brand)!important;transform:none!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > *:focus-visible{outline:2px solid var(--cs-brand)!important;outline-offset:-2px;z-index:2}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > .buttons-csv i{color:#34C59B!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > .buttons-excel i{color:#4CC38A!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > .buttons-pdf i{color:#F06B77!important}
/* infobulle : encre de la charte */
html:root body .dt-buttons.dt-buttons.dt-buttons > [data-tip]::after{background:var(--cs-ink)!important;font-family:var(--cs-font)!important;font-size:12px!important;padding:6px 10px!important;border-radius:6px!important}
html:root body .dt-buttons.dt-buttons.dt-buttons > [data-tip]::before{border-bottom-color:var(--cs-ink)!important}

html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > *{background:transparent!important;border-color:var(--cs-line)!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > *:hover{background:rgba(91,155,255,.12)!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > * i{color:var(--cs-muted)!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > .buttons-csv i{color:#34C59B!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > .buttons-excel i{color:#4CC38A!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > .buttons-pdf i{color:#F06B77!important}
html:root[data-theme="dark"] body .dt-buttons.dt-buttons.dt-buttons > *:hover i{color:#CFE0FF!important}

/* Table */
html:root body .dataTables_wrapper table.dataTable,html:root body .content table.table.ajax_view{
  border:0!important;border-collapse:separate!important;border-spacing:0!important;margin:0!important;background:transparent!important}
html:root body .dataTables_wrapper table.dataTable thead th,html:root body .dataTables_wrapper table.dataTable thead td,
html:root body .dataTables_scrollHead table thead th{
  background:var(--cp-head)!important;color:var(--cs-muted)!important;font-family:var(--cs-font)!important;font-size:12.5px!important;
  font-weight:600!important;text-transform:none!important;letter-spacing:0!important;padding:10px 12px!important;white-space:nowrap;
  border:0!important;border-bottom:1px solid var(--cs-line)!important}
html:root body .dataTables_wrapper table.dataTable thead th.sorting_asc,html:root body .dataTables_wrapper table.dataTable thead th.sorting_desc{color:var(--cs-text)!important}
html:root body .dataTables_wrapper table.dataTable tbody td{
  font-size:13.5px!important;color:var(--cs-text)!important;padding:10px 12px!important;border:0!important;border-bottom:1px solid var(--cs-line)!important;
  background:transparent!important;vertical-align:middle!important}
html:root body .dataTables_wrapper table.dataTable tbody tr,
html:root body .dataTables_wrapper table.dataTable tbody tr:nth-child(even),
html:root body .dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-of-type(odd){background:transparent!important}
html:root body .dataTables_wrapper table.dataTable tbody tr:hover,
html:root body .dataTables_wrapper table.dataTable tbody tr:hover > td{background:var(--cp-row-hover)!important}
html:root body .dataTables_wrapper table.dataTable tbody tr.selected > td{background:var(--cs-brand-soft)!important}
html:root body .dataTables_wrapper table.dataTable tbody td a:not(.tw-dw-btn):not(.btn){color:var(--cs-brand);font-weight:500}
html:root body .dataTables_wrapper table.dataTable tbody td.dataTables_empty{padding:44px 12px!important;color:var(--cs-muted)!important;font-size:14px!important;text-align:center}
/* Totaux (pied de tableau) */
html:root body .dataTables_wrapper table.dataTable tfoot td,html:root body .dataTables_wrapper table.dataTable tfoot th,
html:root body .dataTables_scrollFoot table tfoot td{
  background:var(--cp-head)!important;color:var(--cs-text)!important;font-weight:600!important;font-size:13px!important;
  border:0!important;border-top:1px solid var(--cs-line-2)!important;padding:10px 12px!important}
html:root body .dataTables_wrapper tfoot tr.bg-gray,html:root body .dataTables_wrapper tfoot .bg-gray{background:var(--cp-head)!important;color:var(--cs-text)!important}
/* Pied : info + pagination */
html:root body .dataTables_wrapper .dataTables_info{color:var(--cs-muted)!important;font-size:13px!important;padding:12px 14px!important}
html:root body .dataTables_wrapper .dataTables_paginate{padding:8px 12px!important;background:transparent!important;border:0!important;box-shadow:none!important}
html:root body .dataTables_wrapper .dataTables_info{background:transparent!important;border:0!important}
html:root body .dataTables_wrapper .dataTables_paginate .pagination{margin:0!important;display:inline-flex!important;gap:4px}
html:root body .dataTables_wrapper .dataTables_paginate .pagination > li > a,
html:root body .dataTables_wrapper .dataTables_paginate .pagination > li > span,
html:root body .dataTables_wrapper .dataTables_paginate a.paginate_button{
  min-width:34px!important;height:34px!important;padding:0 10px!important;display:inline-flex!important;align-items:center;justify-content:center;
  border:1px solid var(--cs-line)!important;border-radius:8px!important;background:var(--cs-surface)!important;color:var(--cs-text)!important;
  font-size:13px!important;font-weight:500!important;box-shadow:none!important;margin:0!important}
html:root body .dataTables_wrapper .dataTables_paginate .pagination > li > a:hover{border-color:var(--cs-brand)!important;color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html:root body .dataTables_wrapper .dataTables_paginate .pagination > li.active > a,
html:root body .dataTables_wrapper .dataTables_paginate .pagination > li.active > a:hover{
  background:var(--cs-brand)!important;border-color:var(--cs-brand)!important;color:#fff!important;font-weight:600!important}
html:root body .dataTables_wrapper .dataTables_paginate .pagination > li.disabled > a{opacity:.45!important;background:var(--cs-surface)!important;color:var(--cs-faint)!important}
html:root body .dataTables_processing{
  background:var(--cs-surface)!important;color:var(--cs-text)!important;border:1px solid var(--cs-line)!important;border-radius:10px!important;
  box-shadow:var(--cp-shadow-pop)!important;font-weight:500!important}
/* Ascenseur horizontal des listes larges */
html:root body .content [style*="overflow-x"]::-webkit-scrollbar,html:root body .dataTables_scrollBody::-webkit-scrollbar{height:10px}
html:root body .content [style*="overflow-x"]::-webkit-scrollbar-thumb,html:root body .dataTables_scrollBody::-webkit-scrollbar-thumb{
  background:var(--cs-line-2);border-radius:10px;border:2px solid var(--cs-surface)}
html:root body #sell_table_scroll_wrap{border-radius:0!important}

/* Bouton « Actions » d'une ligne + menu */
html:root body table .btn-group > .dropdown-toggle.tw-dw-btn,
html:root body table .btn-group > .tw-dw-btn.dropdown-toggle{
  height:30px!important;min-height:30px!important;padding:0 10px!important;border-radius:8px!important;font-size:12.5px!important;font-weight:500!important;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;box-shadow:none!important}
html:root body table .btn-group > .dropdown-toggle.tw-dw-btn:hover,html:root body table .btn-group.open > .dropdown-toggle.tw-dw-btn{
  border-color:var(--cs-brand)!important;color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:10px!important;box-shadow:var(--cp-shadow-pop)!important;
  padding:6px!important;min-width:210px;font-family:var(--cs-font)!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a{
  display:flex!important;align-items:center;gap:10px;padding:8px 10px!important;border-radius:6px!important;font-size:13.5px!important;
  color:var(--cs-text)!important;white-space:nowrap}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a > i,html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a > .fa,html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a > .fas{
  width:16px;text-align:center;color:var(--cs-faint)!important;margin:0!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a:hover,html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a:focus{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li > a:hover > i{color:var(--cs-brand)!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu > li.divider,html:root body :is(table,.dataTables_wrapper) .dropdown-menu .divider{background:var(--cs-line)!important;margin:5px 4px!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu a[class*="delete"],html:root body :is(table,.dataTables_wrapper) .dropdown-menu a[class*="delete"] i{color:var(--cs-err)!important}
html:root body :is(table,.dataTables_wrapper) .dropdown-menu a[class*="delete"]:hover{background:var(--cs-err-soft)!important}

/* ═════════════════════════ 6. STATUTS (paiement, livraison, état du document…) ═════════════════════════ */
html body.cs-forms .content .label,html body.cs-forms .modal .label,html body.cs-forms .content .badge{
  display:inline-flex!important;align-items:center;gap:5px;padding:3px 9px!important;border-radius:999px!important;
  font-family:var(--cs-font)!important;font-size:12px!important;font-weight:600!important;line-height:1.35!important;letter-spacing:0!important;
  text-transform:none!important;white-space:nowrap;border:1px solid transparent;
  background:var(--cs-paper)!important;color:var(--cs-muted)!important;height:auto!important;min-height:0!important}
/* point de couleur devant le libellé */
html body.cs-forms .content table .label::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.85}
html body.cs-forms .content .label.bg-green,html body.cs-forms .content .label-success,html body.cs-forms .content .label.bg-light-green,
html body.cs-forms .modal .label.bg-green,html body.cs-forms .modal .label-success{background:var(--cs-ok-soft)!important;color:var(--cs-ok)!important}
html body.cs-forms .content .label.bg-yellow,html body.cs-forms .content .label-warning,html body.cs-forms .content .label.bg-orange,
html body.cs-forms .modal .label.bg-yellow,html body.cs-forms .modal .label-warning{background:var(--cs-warn-soft)!important;color:var(--cs-warn)!important}
html body.cs-forms .content .label.bg-red,html body.cs-forms .content .label-danger,html body.cs-forms .content .label.bg-maroon,
html body.cs-forms .modal .label.bg-red,html body.cs-forms .modal .label-danger{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html body.cs-forms .content .label.bg-info,html body.cs-forms .content .label-info,html body.cs-forms .content .label.bg-light-blue,
html body.cs-forms .content .label.bg-primary,html body.cs-forms .content .label-primary,html body.cs-forms .content .label.bg-aqua,
html body.cs-forms .modal .label.bg-info,html body.cs-forms .modal .label-info,html body.cs-forms .modal .label-primary{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important}
html body.cs-forms .content .label.bg-navy,html body.cs-forms .content .label.bg-purple{background:var(--cs-violet-soft)!important;color:var(--cs-violet)!important}
html body.cs-forms .content .label.bg-gray,html body.cs-forms .content .label-default{background:var(--cs-paper)!important;color:var(--cs-muted)!important;border-color:var(--cs-line)!important}
html body.cs-forms .content a:hover > .label{filter:brightness(.96)}

/* Statuts dans TOUS les tableaux du projet */
html:root body .dataTables_wrapper .label,html:root body .dataTables_wrapper .badge{
  display:inline-flex!important;align-items:center;gap:5px;padding:3px 9px!important;border-radius:999px!important;
  font-family:var(--cs-font)!important;font-size:12px!important;font-weight:600!important;line-height:1.35!important;letter-spacing:0!important;
  text-transform:none!important;white-space:nowrap;border:1px solid transparent;
  background:var(--cs-paper)!important;color:var(--cs-muted)!important;height:auto!important;min-height:0!important}
html:root body .dataTables_wrapper table .label::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.85}
html:root body .dataTables_wrapper .label.bg-green,html:root body .dataTables_wrapper .label-success,html:root body .dataTables_wrapper .label.bg-light-green{background:var(--cs-ok-soft)!important;color:var(--cs-ok)!important}
html:root body .dataTables_wrapper .label.bg-yellow,html:root body .dataTables_wrapper .label-warning,html:root body .dataTables_wrapper .label.bg-orange{background:var(--cs-warn-soft)!important;color:var(--cs-warn)!important}
html:root body .dataTables_wrapper .label.bg-red,html:root body .dataTables_wrapper .label-danger,html:root body .dataTables_wrapper .label.bg-maroon{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html:root body .dataTables_wrapper .label.bg-info,html:root body .dataTables_wrapper .label-info,html:root body .dataTables_wrapper .label.bg-light-blue,html:root body .dataTables_wrapper .label.bg-primary,html:root body .dataTables_wrapper .label-primary,html:root body .dataTables_wrapper .label.bg-aqua{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important}
html:root body .dataTables_wrapper .label.bg-navy,html:root body .dataTables_wrapper .label.bg-purple{background:var(--cs-violet-soft)!important;color:var(--cs-violet)!important}
html:root body .dataTables_wrapper .label.bg-gray,html:root body .dataTables_wrapper .label-default{background:var(--cs-paper)!important;color:var(--cs-muted)!important;border-color:var(--cs-line)!important}
html:root[data-theme="dark"] body .dataTables_wrapper .label.bg-gray,html:root[data-theme="dark"] body .dataTables_wrapper .label-default{background:rgba(148,175,220,.10)!important;border-color:transparent!important}
html:root body .dataTables_wrapper a:hover > .label{filter:brightness(.96)}

/* ═════════════════════════ 7. FORMULAIRES (créations / modifications) ═════════════════════════ */
html body.cs-forms .content label,html body.cs-forms .modal label{font-family:var(--cs-font)!important;font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important;margin-bottom:5px!important}
html body.cs-forms .content .checkbox label,html body.cs-forms .content .radio label{font-weight:400!important}
html body.cs-forms .content .form-group{margin-bottom:14px}
html body.cs-forms .content .form-control,html body.cs-forms .modal .form-control{
  height:38px;border:1px solid var(--cs-line-2)!important;border-radius:8px!important;background-color:var(--cs-surface)!important;
  color:var(--cs-text)!important;font-family:var(--cs-font)!important;font-size:13.5px!important;box-shadow:none!important;
  transition:border-color .15s,box-shadow .15s}
html body.cs-forms .content textarea.form-control,html body.cs-forms .modal textarea.form-control{height:auto;min-height:76px;padding-top:8px}
html body.cs-forms .content .form-control::placeholder,html body.cs-forms .modal .form-control::placeholder{color:var(--cs-faint)!important}
html body.cs-forms .content .form-control:focus,html body.cs-forms .modal .form-control:focus{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important}
/* readonly = souvent un sélecteur de date : il reste « actif » visuellement ; seul disabled est grisé */
html body.cs-forms .content .form-control[readonly]{background-color:var(--cs-surface)!important;cursor:pointer}
html body.cs-forms .content .form-control[disabled]{background-color:var(--cp-head)!important;color:var(--cs-muted)!important;cursor:not-allowed}
html body.cs-forms .content .help-block{font-size:12px!important;color:var(--cs-muted)!important;margin-top:4px}
html body.cs-forms .content label.error,html body.cs-forms .content .help-block.error{color:var(--cs-err)!important;font-size:12px!important;font-weight:500!important}
html body.cs-forms .content .form-control.error,html body.cs-forms .content .has-error .form-control{border-color:var(--cs-err)!important}
html body.cs-forms .content .text-danger{color:var(--cs-err)!important}
/* Groupe d'entrée : addon collé au champ, même rayon */
html body.cs-forms .content .input-group{width:100%}
html body.cs-forms .content .input-group-addon,html body.cs-forms .modal .input-group-addon{
  background:var(--cp-head)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-muted)!important;min-width:40px;font-size:13px}
html body.cs-forms .content .input-group-addon:first-child,html body.cs-forms .modal .input-group-addon:first-child{border-radius:8px 0 0 8px!important;border-right:0!important}
html body.cs-forms .content .input-group-addon:last-child,html body.cs-forms .modal .input-group-addon:last-child{border-radius:0 8px 8px 0!important;border-left:0!important}
html body.cs-forms .content .input-group .form-control:not(:first-child):not(:last-child),
html body.cs-forms .content .input-group .select2-container:not(:first-child):not(:last-child) .select2-selection{border-radius:0!important}
html body.cs-forms .content .input-group .form-control:first-child,html body.cs-forms .content .input-group > .select2-container:first-child .select2-selection{border-radius:8px 0 0 8px!important}
html body.cs-forms .content .input-group .form-control:last-child,html body.cs-forms .content .input-group > .select2-container:last-child .select2-selection{border-radius:0 8px 8px 0!important}
html body.cs-forms .content .input-group-addon .text-primary,html body.cs-forms .content .input-group-addon i.fa-plus-circle,
html body.cs-forms .content .input-group-btn .btn{color:var(--cs-brand)!important}
html body.cs-forms .content .input-group-btn > .btn{height:38px;border:1px solid var(--cs-line-2)!important;background:var(--cp-head)!important;border-radius:0 8px 8px 0!important;margin-left:-1px}
html body.cs-forms .content .input-group-btn > .btn:hover{background:var(--cs-brand-soft)!important}
/* Select2 */
html body.cs-forms .select2-container--default .select2-selection--single,
html body.cs-forms .select2-container--default .select2-selection--multiple{
  min-height:38px!important;border:1px solid var(--cs-line-2)!important;border-radius:8px!important;background:var(--cs-surface)!important}
html body.cs-forms .select2-container--default .select2-selection--single{height:38px!important}
html body.cs-forms .select2-container--default .select2-selection--single .select2-selection__rendered{line-height:36px!important;color:var(--cs-text)!important;padding-left:12px!important;font-size:13.5px}
html body.cs-forms .select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--cs-faint)!important}
html body.cs-forms .select2-container--default .select2-selection--single .select2-selection__arrow{height:36px!important}
html body.cs-forms .select2-container--default.select2-container--focus .select2-selection,
html body.cs-forms .select2-container--default.select2-container--open .select2-selection{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important}
html body.cs-forms .select2-container--default .select2-selection--multiple .select2-selection__choice{
  background:var(--cs-brand-soft)!important;border:0!important;color:var(--cs-brand)!important;border-radius:6px!important;font-size:12.5px;font-weight:500}
html body.cs-forms .select2-dropdown{border:1px solid var(--cs-line)!important;border-radius:10px!important;box-shadow:var(--cp-shadow-pop)!important;overflow:hidden;background:var(--cs-surface)!important}
html body.cs-forms .select2-container--default .select2-results__option{font-size:13.5px;padding:7px 10px;color:var(--cs-text)}
html body.cs-forms .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--cs-brand)!important;color:#fff!important}
html body.cs-forms .select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--cs-line-2)!important;border-radius:6px!important;height:34px}
/* Recherche de produit (ajout de lignes) : champ vedette */
html body.cs-forms .content #search_product,html body.cs-forms .content #search_product_for_srock_adjustment,
html body.cs-forms .content input[id^="search_product"]{height:44px!important;font-size:14.5px!important}
html body.cs-forms .content .input-group:has(#search_product) .input-group-addon,
html body.cs-forms .content .input-group:has(input[id^="search_product"]) .input-group-addon,
html body.cs-forms .content .input-group:has(#search_product) .input-group-btn > .btn{height:44px!important}
/* Cases à cocher iCheck : couleur de la charte */
html body.cs-forms .icheckbox_square-blue.checked,html body.cs-forms .iradio_square-blue.checked{filter:hue-rotate(0deg) saturate(1.1)}

/* Tableau de lignes du document (#pos_table, achats, retours) */
html body.cs-forms .content #pos_table,html body.cs-forms .content #purchase_entry_table,html body.cs-forms .content table.purchase_entry_table,
html body.cs-forms .content #purchase_return_product_table,html body.cs-forms .content #sell_return_table,html body.cs-forms .content .pos_product_div table{
  border:1px solid var(--cs-line)!important;border-radius:10px!important;border-collapse:separate!important;border-spacing:0!important;overflow:hidden;background:var(--cs-surface)!important}
html body.cs-forms .content #pos_table > thead > tr > th,html body.cs-forms .content #purchase_entry_table > thead > tr > th,
html body.cs-forms .content table.purchase_entry_table > thead > tr > th,html body.cs-forms .content #purchase_return_product_table > thead > tr > th,
html body.cs-forms .content #sell_return_table > thead > tr > th{
  background:var(--cp-head)!important;color:var(--cs-muted)!important;font-size:12.5px!important;font-weight:600!important;text-transform:none!important;
  border:0!important;border-bottom:1px solid var(--cs-line)!important;padding:9px 8px!important;letter-spacing:0!important}
html body.cs-forms .content #pos_table > tbody > tr > td,html body.cs-forms .content #purchase_entry_table > tbody > tr > td,
html body.cs-forms .content table.purchase_entry_table > tbody > tr > td,html body.cs-forms .content #purchase_return_product_table > tbody > tr > td,
html body.cs-forms .content #sell_return_table > tbody > tr > td{
  border:0!important;border-bottom:1px solid var(--cs-line)!important;background:transparent!important;color:var(--cs-text)!important;font-size:13.5px}
html body.cs-forms .content #pos_table > tbody > tr:last-child > td,html body.cs-forms .content #purchase_entry_table > tbody > tr:last-child > td{border-bottom:0!important}
html body.cs-forms .content #pos_table > tbody > tr:hover > td,html body.cs-forms .content #purchase_entry_table > tbody > tr:hover > td{background:var(--cp-row-hover)!important}
html body.cs-forms .content #pos_table .form-control,html body.cs-forms .content #purchase_entry_table .form-control,
html body.cs-forms .content table.purchase_entry_table .form-control{height:34px!important;font-size:13px!important}
html body.cs-forms .content #pos_table .input-number .btn,html body.cs-forms .content #pos_table .quantity-up,html body.cs-forms .content #pos_table .quantity-down{
  height:34px;border:1px solid var(--cs-line-2)!important;background:var(--cp-head)!important;color:var(--cs-muted)!important}
html body.cs-forms .content #pos_table .pos_remove_row,html body.cs-forms .content #pos_table .fa-times,html body.cs-forms .content .remove_purchase_entry_row{color:var(--cs-faint)!important;cursor:pointer}
html body.cs-forms .content #pos_table .pos_remove_row:hover,html body.cs-forms .content #pos_table .fa-times:hover,html body.cs-forms .content .remove_purchase_entry_row:hover{color:var(--cs-err)!important}
html body.cs-forms .content #pos_table .doc-note-toggle{color:var(--cs-brand)!important}

/* Zone des lignes : hauteur naturelle (plus de grand vide), défilement seulement au-delà de ~12 lignes */
html body.cs-docs.cs-docs--form .content .pos_product_div{height:auto!important;max-height:62vh;min-height:0!important;overflow-y:auto;border-radius:10px}
html body.cs-forms .content #pos_table > thead i,html body.cs-forms .content #pos_table > thead .fa{font-size:12px!important;color:var(--cs-faint)!important}
html body.cs-forms .content #pos_table > tbody > tr > td{padding:8px!important}
/* Récapitulatif / totaux */
html body.cs-forms .content #recap_taxes_table,html body.cs-forms .content table.table-condensed:not(#pos_table){border-color:var(--cs-line)!important}
html body.cs-forms .content #recap_taxes_table th{background:var(--cp-head)!important;color:var(--cs-muted)!important;font-weight:600!important;font-size:12.5px!important;border-color:var(--cs-line)!important}
html body.cs-forms .content #recap_taxes_table td{border-color:var(--cs-line)!important}
html body.cs-forms .content #summary_subtotal,html body.cs-forms .content #summary_discount,html body.cs-forms .content #summary_total_tax{font-variant-numeric:tabular-nums;font-weight:600}
html body.cs-forms .content #summary_total_payable,html body.cs-forms .content #total_payable,
html body.cs-forms .content #total_amount,html body.cs-forms .content .purchase_total,html body.cs-forms .content #grand_total{
  font-variant-numeric:tabular-nums;font-size:20px!important;font-weight:700!important;color:var(--cs-text)!important}
html body.cs-forms .content #total_payable{color:var(--cs-brand)!important}

/* Accordéons du formulaire de vente (Remise, Livraison, Paiement) */
html body.cs-forms .content .cs-acc-bar{background:var(--cp-head)!important;border:1px solid var(--cs-line)!important;border-radius:10px!important;padding:10px 14px!important;margin-bottom:8px!important}
html body.cs-forms .content .cs-acc-bar:hover{border-color:var(--cs-line-2)!important}
html body.cs-forms .content .cs-acc-bar .cs-accordion-title{color:var(--cs-text)!important;font-weight:600!important;font-size:14px!important}
html body.cs-forms .content .cs-acc-bar .cs-block-icon{color:var(--cs-brand)!important;opacity:1!important}
html body.cs-forms .content .cs-acc-bar .cs-acc-summary{color:var(--cs-muted)!important}
html body.cs-forms .content .cs-acc-bar .cs-acc-summary.has-value{color:var(--cs-ok)!important}
html body.cs-forms .content .cs-acc-bar.is-open{background:var(--cs-brand-soft)!important;border-color:transparent!important}
html body.cs-forms .content .cs-acc-bar.is-open .cs-accordion-toggle{color:var(--cs-brand)!important}

/* ═════════════════════════ 8. BARRE D'ACTION COLLANTE (Enregistrer toujours visible) ═════════════════════════ */
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit-sell),
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_purchase_form),
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_purchase_return_form),
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_sell_return_form),
html body.cs-docs.cs-docs--form .content .row:has(> .col-sm-12 > .text-center > .btn-group > .submit_product_form):not(.pf-actionbar){
  position:sticky;bottom:0;z-index:40;margin:16px 0 0!important;padding:10px 14px!important;
  background:color-mix(in srgb,var(--cs-surface) 92%,transparent)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;box-shadow:0 -6px 20px rgba(14,42,92,.08)!important}
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit-sell) > [class*="col-"],
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_purchase_form) > [class*="col-"],
html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_purchase_return_form) > [class*="col-"]{
  display:flex!important;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;margin:0!important;text-align:right!important;float:none!important;width:100%!important}
html body.cs-docs.cs-docs--form .content #submit-sell,html body.cs-docs.cs-docs--form .content #save-and-print,
html body.cs-docs.cs-docs--form .content #submit_purchase_form,html body.cs-docs.cs-docs--form .content #submit_purchase_return_form,
html body.cs-docs.cs-docs--form .content .submit_product_form{
  height:40px!important;min-height:40px!important;padding:0 18px!important;font-size:14px!important;margin:0!important;border-radius:8px!important}
/* « Enregistrer et imprimer » et autres variantes = secondaires ; « Enregistrer » = primaire, en dernier */
html body.cs-docs.cs-docs--form .content #save-and-print,
html body.cs-docs.cs-docs--form .content .submit_product_form:not(.tw-dw-btn-primary){
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;box-shadow:none!important}
html body.cs-docs.cs-docs--form .content #save-and-print:hover,
html body.cs-docs.cs-docs--form .content .submit_product_form:not(.tw-dw-btn-primary):hover{border-color:var(--cs-brand)!important;color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html body.cs-docs.cs-docs--form .content #submit-sell{order:2}
html body.cs-docs.cs-docs--form .content .submit_product_form:disabled{opacity:.5!important}
html body.cs-docs.cs-docs--form .content .btn-group:has(> .submit_product_form){display:inline-flex!important;flex-wrap:wrap;gap:8px;float:none!important}
html body.cs-docs.cs-docs--form .content .btn-group:has(> .submit_product_form) > .tw-dw-btn-primary{order:9}
@media (max-width:640px){
  html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit-sell) > [class*="col-"],
  html body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_purchase_form) > [class*="col-"]{justify-content:stretch}
  html body.cs-docs.cs-docs--form .content #submit-sell,html body.cs-docs.cs-docs--form .content #save-and-print,
  html body.cs-docs.cs-docs--form .content #submit_purchase_form{flex:1 1 0}
}

/* ═════════════════════════ 9. FICHE PRODUIT (création / modification : product-form.js) ═════════════════════════ */
html body.cs-docs--product{--pf-primary:var(--cs-brand);--pf-primary-soft:var(--cs-brand-soft);--pf-text:var(--cs-text);--pf-muted:var(--cs-muted);--pf-border:var(--cs-line);--pf-bg:var(--cp-head);--pf-danger:var(--cs-err)}
html body.cs-docs .pf-tabs{background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;box-shadow:var(--cp-shadow)!important;padding:6px!important;gap:4px!important}
html body.cs-docs .pf-tab{color:var(--cs-muted)!important;font-size:13.5px!important;font-weight:500!important;border-radius:8px!important;padding:9px 14px!important}
html body.cs-docs .pf-tab:hover{background:var(--cp-head)!important;color:var(--cs-text)!important}
html body.cs-docs .pf-tab .pf-tab-num{background:var(--cs-paper)!important;color:var(--cs-muted)!important;border:1px solid var(--cs-line)!important}
html body.cs-docs .pf-tab.is-active{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important;font-weight:600!important}
html body.cs-docs .pf-tab.is-active .pf-tab-num{background:var(--cs-brand)!important;border-color:var(--cs-brand)!important;color:#fff!important}
html body.cs-docs .pf-tab.has-error{color:var(--cs-err)!important}
html body.cs-docs form.pf-form label{font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important}
html body.cs-docs form.pf-form .form-control{height:38px;border-color:var(--cs-line-2)!important}
html body.cs-docs form.pf-form .pf-pane h4{color:var(--cs-text)!important;font-size:15px!important;font-weight:600!important}
html body.cs-docs form.pf-form .pf-actionbar{
  background:color-mix(in srgb,var(--cs-surface) 92%,transparent)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;
  box-shadow:0 -6px 20px rgba(14,42,92,.08)!important}
html body.cs-docs form.pf-form .pf-actionbar .btn-group > .tw-dw-btn:not(.tw-dw-btn-primary){
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;box-shadow:none!important}
html body.cs-docs form.pf-form .pf-actionbar .btn-group > .tw-dw-btn:not(.tw-dw-btn-primary):hover{border-color:var(--cs-brand)!important;color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html body.cs-docs .pf-nav .pf-prev,html body.cs-docs .pf-nav .pf-next{height:40px!important;border-radius:8px!important}
html body.cs-docs .pf-nav .pf-prev{background:var(--cs-surface)!important;border-color:var(--cs-line-2)!important;color:var(--cs-text)!important}
html body.cs-docs .pf-nav .pf-next{background:var(--cs-ink)!important;border-color:var(--cs-ink)!important;color:#fff!important}
/* Cartes de choix : Produit / Service, Simple / Variantes / Combo, HT / TTC */
html body.cs-docs .pn-card,html body.cs-docs .ps-card,html body.cs-docs .pt-pill,html body.cs-docs .pp-card{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;border-radius:10px!important;color:var(--cs-text)!important}
html body.cs-docs .pn-card:hover,html body.cs-docs .ps-card:hover,html body.cs-docs .pt-pill:hover{border-color:var(--cs-brand)!important}
html body.cs-docs .pn-card.is-active,html body.cs-docs .ps-card.is-active,html body.cs-docs .pt-pill.is-active{
  background:var(--cs-brand-soft)!important;border-color:var(--cs-brand)!important;box-shadow:inset 0 0 0 1px var(--cs-brand)!important;color:var(--cs-text)!important}
html body.cs-docs .pn-card .pn-check,html body.cs-docs .ps-card .ps-lock,html body.cs-docs .ps-card.is-active .ps-icon{color:var(--cs-brand)!important}
html body.cs-docs .ps-card .ps-icon{color:var(--cs-faint)!important}
html body.cs-docs .ps-card .ps-text small,html body.cs-docs .pt-pill .pt-amount,html body.cs-docs .pp-help,html body.cs-docs .pv-sub{color:var(--cs-muted)!important}
html body.cs-docs .pt-pill.is-active{color:var(--cs-brand)!important}
html body.cs-docs .pt-pill .pt-dot{border-color:var(--cs-line-2)!important;background:var(--cs-surface)!important}
html body.cs-docs .pt-pill.is-active .pt-dot{border-color:var(--cs-brand)!important}
html body.cs-docs .pp-card h5{color:var(--cs-text)!important;font-weight:600!important}
html body.cs-docs .pp-card.pp-sell{border-color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html body.cs-docs .pp-card label{color:var(--cs-muted)!important}
html body.cs-docs .pp-conv{color:var(--cs-brand)!important}
/* Variantes */
html body.cs-docs .pv-title{color:var(--cs-text)!important;font-weight:600!important}
html body.cs-docs .pv-title i{color:var(--cs-brand)!important}
html body.cs-docs .pv-btn-primary{background:var(--cs-brand)!important;border-radius:8px!important}
html body.cs-docs .pv-sku{background:var(--cp-head)!important;border-color:var(--cs-line)!important;border-radius:8px!important}
html body.cs-docs .pv-sku-label{color:var(--cs-text)!important}
html body.cs-docs .pv-radio{color:var(--cs-muted)!important}
html body.cs-docs .pv-table > tbody > tr.variation_row{background:var(--cs-surface)!important;border-color:var(--cs-line)!important;border-radius:10px!important}
html body.cs-docs .pv-values > thead > tr > th{background:var(--cp-head)!important;color:var(--cs-muted)!important;border-bottom-color:var(--cs-line)!important;text-transform:none!important;letter-spacing:0!important;font-size:12px!important}
html body.cs-docs .pv-values > tbody > tr > td{border-bottom-color:var(--cs-line)!important}
html body.cs-docs .pv-values > tbody > tr:hover > td{background:var(--cp-row-hover)!important}
html body.cs-docs .pv-table .open_variation_matrix,html body.cs-docs .pv-add-value{color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important;border-color:transparent!important;border-radius:6px!important}

/* ═════════════════════════ 10. ONGLETS — TOUT LE PROJET ═════════════════════════
   Onglets soulignés (comme la liste des produits) pour .nav-tabs-custom et toute .nav.nav-tabs.
   Préfixe « html:root body » : passe devant window-overrides.css et ses variantes sombres. */
html:root body .nav-tabs-custom{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;
  box-shadow:var(--cp-shadow)!important;overflow:visible;margin-bottom:16px!important}
html:root body .tw-ring-1 .nav-tabs-custom,html:root body .box .nav-tabs-custom,html:root body .modal .nav-tabs-custom{border:0!important;box-shadow:none!important;border-radius:0!important}
html:root body .nav-tabs-custom > .nav-tabs,html:root body .nav.nav-tabs{
  display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin:0!important;padding:0 10px!important;
  background:transparent!important;border:0!important;border-bottom:1px solid var(--cs-line)!important;border-radius:var(--cp-radius) var(--cp-radius) 0 0!important;box-shadow:none!important}
html:root body .nav.nav-tabs{padding:0 2px!important;border-radius:0!important;margin-bottom:12px!important}
html:root body .nav-tabs-custom > .nav-tabs > li,html:root body .nav.nav-tabs > li{margin:0!important;border:0!important;background:transparent!important;float:none!important}
html:root body .nav-tabs-custom > .nav-tabs > li > a,html:root body .nav.nav-tabs > li > a{
  display:inline-flex!important;align-items:center!important;gap:8px!important;margin:0 0 -1px!important;padding:13px 12px 11px!important;
  background:transparent!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;box-shadow:none!important;
  color:var(--cs-muted)!important;font-family:var(--cs-font)!important;font-size:14px!important;font-weight:500!important;text-decoration:none!important}
html:root body .nav-tabs-custom > .nav-tabs > li > a > i,html:root body .nav.nav-tabs > li > a > i{color:currentColor!important;font-size:14px!important;width:auto!important;height:auto!important}
html:root body .nav-tabs-custom > .nav-tabs > li:not(.active) > a:hover,html:root body .nav.nav-tabs > li:not(.active) > a:not(.active):hover{
  color:var(--cs-text)!important;background:transparent!important;border-bottom-color:var(--cs-line-2)!important}
html:root body .nav-tabs-custom > .nav-tabs > li.active > a,html:root body .nav-tabs-custom > .nav-tabs > li.active > a:hover,
html:root body .nav-tabs-custom > .nav-tabs > li.active > a:focus,html:root body .nav.nav-tabs > li.active > a,
html:root body .nav.nav-tabs > li.active > a:hover,html:root body .nav.nav-tabs > li.active > a:focus,html:root body .nav.nav-tabs > li > a.active{
  color:var(--cs-brand)!important;background:transparent!important;border:0!important;border-bottom:2px solid var(--cs-brand)!important;
  border-radius:0!important;box-shadow:none!important;font-weight:600!important}
html:root body .nav-tabs-custom > .nav-tabs > li.active,html:root body .nav.nav-tabs > li.active{border-top:0!important}
html:root body .nav.nav-tabs > li.disabled > a{color:var(--cs-faint)!important;opacity:.6!important}
html:root body .nav-tabs-custom > .nav-tabs > li.pull-right{margin-left:auto!important}
html:root body .nav-tabs-custom > .nav-tabs > li.header{color:var(--cs-text)!important;font-weight:600;padding:12px 6px!important}
html:root body .nav-tabs-custom > .tab-content{background:transparent!important;padding:14px!important;border:0!important}
html:root body .tw-ring-1 .nav-tabs-custom > .tab-content,html:root body .modal .nav-tabs-custom > .tab-content{padding:14px 0 0!important}
html:root body .nav-tabs-custom .dataTables_wrapper{border:0!important;box-shadow:none!important;background:transparent!important}
@media (max-width:640px){
  html:root body .nav-tabs-custom > .nav-tabs,html:root body .nav.nav-tabs{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none}
  html:root body .nav-tabs-custom > .nav-tabs > li > a,html:root body .nav.nav-tabs > li > a{white-space:nowrap;padding:12px 10px 10px!important}
}
/* Miniature produit dans la liste */
html body.cs-forms #product_table td img,html body.cs-forms #product_table td .product-thumbnail-small{width:38px!important;height:38px!important;object-fit:cover;border-radius:8px!important;border:1px solid var(--cs-line)}

/* ═════════════════════════ 11. MODALES (détail produit, paiement, statut…) ═════════════════════════ */
html body.cs-forms .modal-content{background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:14px!important;box-shadow:var(--cp-shadow-pop)!important;font-family:var(--cs-font)!important;color:var(--cs-text)!important;overflow:hidden}
html body.cs-forms .modal-header{padding:16px 20px!important;border-bottom:1px solid var(--cs-line)!important;background:transparent!important}
html body.cs-forms .modal-header .modal-title{font-size:17px!important;font-weight:600!important;color:var(--cs-text)!important}
html body.cs-forms .modal-header .close{opacity:1!important;color:var(--cs-faint)!important;text-shadow:none!important;font-size:24px;font-weight:400}
html body.cs-forms .modal-header .close:hover{color:var(--cs-text)!important}
html body.cs-forms .modal-body{padding:20px!important;color:var(--cs-text)}
html body.cs-forms .modal-footer{padding:12px 20px!important;border-top:1px solid var(--cs-line)!important;background:var(--cp-head)!important;display:flex;justify-content:flex-end;gap:8px}
html body.cs-forms .modal-footer .tw-dw-btn-primary{order:2}
html body.cs-forms .modal-footer .tw-dw-btn{height:38px!important;min-height:38px!important;margin:0!important;padding:0 16px!important}
html body.cs-forms .modal-footer .tw-dw-btn-neutral,html body.cs-forms .modal-footer .tw-dw-btn-default{
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important}
html body.cs-forms .modal .table > thead > tr > th,html body.cs-forms .modal .table tr.bg-green > th,html body.cs-forms .modal .table tr.bg-gray > th{
  background:var(--cp-head)!important;color:var(--cs-muted)!important;font-weight:600!important;font-size:12.5px!important;border-color:var(--cs-line)!important}
html body.cs-forms .modal .table.bg-gray,html body.cs-forms .modal table.bg-gray{background:transparent!important;color:var(--cs-text)!important}
html body.cs-forms .modal .table td{border-color:var(--cs-line)!important;color:var(--cs-text)!important}

/* Fiche produit (product/view-modal.blade.php) */
html body .cs-pv{font-family:var(--cs-font,"IBM Plex Sans",system-ui,sans-serif);color:var(--cs-text,#14213D)}
html body .cs-pv-hero{display:flex;gap:18px;align-items:flex-start;margin-bottom:18px}
html body .cs-pv-img{flex:0 0 112px;width:112px;height:112px;border-radius:12px;border:1px solid var(--cs-line,#E3E8F0);background:var(--cs-paper,#F4F6FA);overflow:hidden;display:flex;align-items:center;justify-content:center}
html body .cs-pv-img img{width:100%;height:100%;object-fit:cover}
html body .cs-pv-id{min-width:0;flex:1}
html body .cs-pv-eyebrow{font-size:12.5px;font-weight:600;color:var(--cs-brand,#1459C7);margin:2px 0 6px}
html body .cs-pv-name{font-size:21px;font-weight:600;line-height:1.25;margin:0 0 10px;color:var(--cs-text,#14213D);word-break:break-word}
html body .cs-pv-chips{display:flex;flex-wrap:wrap;gap:6px}
html body .cs-pv-chip{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;font-size:12.5px;font-weight:500;
  background:var(--cs-paper,#F4F6FA);color:var(--cs-muted,#5B6B82);border:1px solid var(--cs-line,#E3E8F0)}
html body .cs-pv-chip b{color:var(--cs-text,#14213D);font-weight:600}
html body .cs-pv-chip.is-ok{background:var(--cs-ok-soft,#E5F5EF);color:var(--cs-ok,#0F8B6F);border-color:transparent}
html body .cs-pv-chip.is-brand{background:var(--cs-brand-soft,#EAF1FD);color:var(--cs-brand,#1459C7);border-color:transparent}
html body .cs-pv-chip a{color:inherit}
html body .cs-pv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:0;border:1px solid var(--cs-line,#E3E8F0);border-radius:12px;overflow:hidden;margin-bottom:18px}
html body .cs-pv-cell{padding:11px 14px;border-bottom:1px solid var(--cs-line,#E3E8F0);border-right:1px solid var(--cs-line,#E3E8F0);margin:0 -1px -1px 0;min-width:0}
html body .cs-pv-cell dt{font-size:12px;font-weight:500;color:var(--cs-muted,#5B6B82);margin:0 0 3px}
html body .cs-pv-cell dd{font-size:14px;font-weight:500;color:var(--cs-text,#14213D);margin:0;word-break:break-word}
html body .cs-pv-desc{font-size:14px;line-height:1.6;color:var(--cs-text,#14213D);margin:0 0 18px;padding:12px 14px;background:var(--cs-paper,#F4F6FA);border-radius:10px}
html body .cs-pv-desc:empty{display:none}
html body .cs-pv-section{font-size:14.5px;font-weight:600;color:var(--cs-text,#14213D);margin:6px 0 10px}
@media (max-width:560px){html body .cs-pv-hero{flex-direction:column}html body .cs-pv-img{width:88px;height:88px;flex-basis:88px}}

/* Spécificité renforcée face à dark-theme.css / dark-pages.css (rayures, barre de période, recherche) */
html:root[data-theme="dark"] body .dataTables_wrapper table.dataTable tbody tr,
html:root[data-theme="dark"] body .dataTables_wrapper table.dataTable tbody tr:nth-child(even),
html:root[data-theme="dark"] body .dataTables_wrapper table.dataTable tbody tr.odd,
html:root[data-theme="dark"] body .dataTables_wrapper table.dataTable tbody tr.even,
html[data-theme="dark"] body.cs-forms .content .table-striped > tbody > tr:nth-of-type(odd){background:transparent!important}
html:root[data-theme="dark"] body .dataTables_wrapper table.dataTable tbody tr:hover,
html:root[data-theme="dark"] body .dataTables_wrapper table.dataTable tbody tr:hover > td{background:var(--cp-row-hover)!important}
html:root[data-theme="dark"] body .dataTables_wrapper .dataTables_filter input{
  background:#0D1B38 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237487A6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 11px center!important;
  padding-left:34px!important;color:var(--cs-text)!important}
html[data-theme="dark"] body.cs-forms div[id^="pnf"]:has(> div[id$="-top"]){background:var(--cs-surface)!important;border-color:var(--cs-line)!important}
html[data-theme="dark"] body.cs-forms div[id^="pnf"][id$="-bar"]{background:var(--cp-head)!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="item"]{color:var(--cs-muted)!important;background:transparent!important;border-color:transparent!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="item"]:hover{color:var(--cs-text)!important;background:var(--cs-surface)!important;border-color:var(--cs-line)!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="item"][class*="-cur"]{color:var(--cs-text)!important;background:transparent!important;border-color:transparent!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="item"][class*="-sel"]{color:#fff!important;background:var(--cs-brand)!important;border-color:var(--cs-brand)!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="-tb"]{color:var(--cs-muted)!important;background:transparent!important;border:0!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="-tb"].on{background:var(--cs-line)!important;color:var(--cs-text)!important}
html[data-theme="dark"] body.cs-forms div[id^="pnf"][id$="-toggle"]{background:#0D1B38!important;border-color:var(--cs-line)!important}


/* ═════════════════════════ 14. CHAMPS À ANGLES DROITS (y compris champs attachés) ═════════════════════════
   Demande : pas d'arrondi sur les champs — un groupe [addon | champ | bouton] forme un seul bloc net. */
html body.cs-forms .content .form-control,html body.cs-forms .modal .form-control,
html body.cs-forms .content .input-group .form-control,html body.cs-forms .content .input-group .form-control:first-child,
html body.cs-forms .content .input-group .form-control:last-child,html body.cs-forms .content .input-group .form-control:not(:first-child):not(:last-child),
html body.cs-forms .content .input-group-addon,html body.cs-forms .modal .input-group-addon,
html body.cs-forms .content .input-group-addon:first-child,html body.cs-forms .content .input-group-addon:last-child,
html body.cs-forms .modal .input-group-addon:first-child,html body.cs-forms .modal .input-group-addon:last-child,
html body.cs-forms .content .input-group-btn > .btn,html body.cs-forms .modal .input-group-btn > .btn,
html body.cs-forms .select2-container--default .select2-selection--single,html body.cs-forms .select2-container--default .select2-selection--multiple,
html body.cs-forms .content .input-group .select2-container .select2-selection,
html body.cs-forms .content .input-group > .select2-container:first-child .select2-selection,
html body.cs-forms .content .input-group > .select2-container:last-child .select2-selection,
html body.cs-forms .select2-dropdown,html body.cs-forms .select2-container--default .select2-search--dropdown .select2-search__field,
html:root body .dataTables_length select,html:root body .dataTables_filter input,
html body.cs-forms form.pf-form .form-control,html body.cs-forms .pv-values .form-control,
html body.cs-forms .pv-values .btn-group-xs,html body.cs-forms .pv-values .apply-all,
html body.cs-forms .content #pos_table .form-control,html body.cs-forms .content .file-input .file-caption,
html body.cs-forms .content .file-input .btn{border-radius:0!important}
/* Bordures partagées dans un groupe : jamais de double trait ni de trou */
html body.cs-forms .content .input-group{display:flex!important;align-items:stretch;flex-wrap:nowrap;width:100%}
html body.cs-forms .content .input-group > .form-control,html body.cs-forms .content .input-group > .select2-container{flex:1 1 auto;width:1%!important;min-width:0;float:none!important}
html body.cs-forms .content .input-group > .input-group-addon,html body.cs-forms .content .input-group > .input-group-btn{
  display:flex!important;align-items:stretch;width:auto!important;flex:0 0 auto;float:none!important}
html body.cs-forms .content .input-group > .input-group-addon{align-items:center;justify-content:center;min-height:38px;padding:0 12px!important;border:1px solid var(--cs-line-2)!important}
html body.cs-forms .content .input-group > :not(:first-child){margin-left:-1px!important}
html body.cs-forms .content .input-group > .input-group-btn > .btn{height:auto!important;min-height:38px;margin:0!important;border:1px solid var(--cs-line-2)!important;
  background:var(--cp-head)!important;display:inline-flex;align-items:center;justify-content:center;padding:0 12px!important;box-shadow:none!important}
html body.cs-forms .content .input-group > .input-group-btn > .btn + .btn{margin-left:-1px!important}
html body.cs-forms .content .input-group > .form-control:focus,html body.cs-forms .content .input-group > .select2-container--focus,
html body.cs-forms .content .input-group > .select2-container--open{position:relative;z-index:3}
/* deux champs dans un même groupe (ex. « Conditions de paiement » : nombre + unité) */
html body.cs-forms .content .input-group > .form-control + .form-control,html body.cs-forms .content .input-group > .form-control + select.form-control{flex:0 1 52%}
/* Les autres champs « hors groupe » restent identiques (38 px, angles droits) */
html body.cs-forms .content .help-block{line-height:1.45}

/* ═════════════════════════ 15. JOINDRE UN DOCUMENT (bootstrap-fileinput) ═════════════════════════ */
html body.cs-forms .content .file-input{width:100%}
html body.cs-forms .content .file-input .file-caption{
  height:38px!important;min-height:38px;display:flex!important;align-items:center;flex:1 1 auto;min-width:0;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;padding:0 12px!important;overflow:hidden}
html body.cs-forms .content .file-input .file-caption-name,html body.cs-forms .content .file-input .file-caption .file-caption-name{
  border:0!important;background:transparent!important;box-shadow:none!important;height:auto!important;padding:0!important;color:var(--cs-text)!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;font-size:13.5px}
html body.cs-forms .content .file-input .file-caption-name:empty::before,
html body.cs-forms .content .file-input .file-caption-name[placeholder]:placeholder-shown{color:var(--cs-faint)!important}
html body.cs-forms .content .file-input .input-group-btn > .btn{font-size:13px!important;font-weight:500!important;gap:6px;white-space:nowrap}
html body.cs-forms .content .file-input .input-group > .input-group-btn > .btn-file{background:var(--cs-brand)!important;border-color:var(--cs-brand)!important;color:#fff!important;position:relative;overflow:hidden}
html body.cs-forms .content .file-input .input-group > .input-group-btn > .btn-file:hover{background:var(--cs-brand-hover)!important;border-color:var(--cs-brand-hover)!important}
html body.cs-forms .content .file-input .input-group > .input-group-btn > .btn-file span{color:#fff!important}
html body.cs-forms .content .file-input .btn-file i,html body.cs-forms .content .file-input .btn-file .glyphicon{color:#fff!important}
html body.cs-forms .content .file-input .fileinput-remove-button i,html body.cs-forms .content .file-input .fileinput-remove-button .glyphicon{color:var(--cs-err)!important}
/* sans fichier choisi : seuls le champ et « Parcourir » sont visibles */
html body.cs-forms .content .file-input-new .fileinput-remove-button,html body.cs-forms .content .file-input-new .fileinput-cancel-button,
html body.cs-forms .content .file-input-new .fileinput-upload-button,html body.cs-forms .content .file-input-ajax-new .fileinput-remove-button,
html body.cs-forms .content .file-input .fileinput-cancel-button.hide,html body.cs-forms .content .file-input .fileinput-cancel.hide,
html body.cs-forms .content .file-input .kv-hidden,html body.cs-forms .content .file-input .hide{display:none!important}
html body.cs-forms .content .file-input .file-preview{border:1px solid var(--cs-line)!important;border-radius:0!important;background:var(--cp-head)!important;margin-bottom:8px}

/* ═════════════════════════ 16. MENU « ACTIONS » AU-DESSUS DU TABLEAU ═════════════════════════
   cs-pages.js le place en position fixe (il ne quitte pas le DOM : les actions continuent de fonctionner). */
.dropdown-menu.cs-dd-fixed{position:fixed!important;z-index:2050!important;margin:0!important;display:block!important;overflow-y:auto;transform:none!important}

@media print{html body .cs-pv-grid{grid-template-columns:repeat(3,1fr)}}

/* ═════════════════════════ 12. RESPONSIVE LISTES ═════════════════════════ */
@media (max-width:767px){
  html:root body .dataTables_wrapper > .row.margin-bottom-20{padding:10px!important}
  html:root body .dataTables_wrapper > .row.margin-bottom-20 > .col-sm-8{order:3;flex-basis:100%;justify-content:flex-start;overflow-x:auto}
  html:root body .dataTables_wrapper > .row.margin-bottom-20 > .col-sm-3{flex:1 1 auto}
  html:root body .dataTables_filter input{width:100%!important}
  html:root body .dataTables_filter,html:root body .dataTables_filter label{width:100%}
  html body.cs-forms .content .box-header{padding:4px 2px 10px!important}
  html body.cs-forms .content .box-tools{width:100%}
  /* barre de période : mois défilables plutôt qu'écrasés */
  html body.cs-forms div[id^="pnf"][id$="-items"]{overflow-x:auto!important;scrollbar-width:none}
  html body.cs-forms div[id^="pnf"][id$="-items"]::-webkit-scrollbar{display:none}
  html body.cs-forms button[class^="pnf"][class*="item"]{flex:0 0 auto!important;min-width:52px!important;padding:0 8px!important}
}

/* ═════════════════════════ 13. MODE SOMBRE : compléments ═════════════════════════ */
html[data-theme="dark"] body.cs-forms .content .tw-rounded-xl.tw-ring-1,html[data-theme="dark"] body.cs-forms .content .box{background:var(--cs-surface)!important}
html:root[data-theme="dark"] body .dataTables_length select,html:root[data-theme="dark"] body .dataTables_filter input,
html[data-theme="dark"] body.cs-forms .content .form-control,html[data-theme="dark"] body.cs-forms .modal .form-control,
html[data-theme="dark"] body.cs-forms .select2-container--default .select2-selection{background-color:#0D1B38!important;border-color:var(--cs-line-2)!important}
html[data-theme="dark"] body.cs-forms .content .form-control[disabled]{background-color:var(--cp-head)!important}
html:root[data-theme="dark"] body :is(table,.dataTables_wrapper) .dropdown-menu > li > a:hover{background:rgba(91,155,255,.12)!important;color:#CFE0FF!important}
html[data-theme="dark"] body.cs-forms .content .label.bg-gray,html[data-theme="dark"] body.cs-forms .content .label-default{background:rgba(148,175,220,.10)!important;color:var(--cs-muted)!important;border-color:transparent!important}
html[data-theme="dark"] body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit-sell),
html[data-theme="dark"] body.cs-docs.cs-docs--form .content .row:has(> [class*="col-"] > #submit_purchase_form),
html[data-theme="dark"] body.cs-forms form.pf-form .pf-actionbar{box-shadow:0 -8px 24px rgba(0,0,0,.35)!important}
html[data-theme="dark"] body.cs-forms .pf-nav .pf-next{background:var(--cs-brand)!important;border-color:var(--cs-brand)!important}
html[data-theme="dark"] body.cs-forms button[class^="pnf"][class*="-tb"].on{background:var(--cs-line)!important}


/* ═════════════════════════ 17. PIED DE PAGE (copyright) — TOUT LE PROJET ═════════════════════════ */
html:root body .cs-footer{margin:28px 24px 0;padding:14px 0 18px;border-top:1px solid var(--cs-line);font-family:var(--cs-font);font-size:12.5px;line-height:1.4;color:var(--cs-muted)}
html:root body .cs-footer__in{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px}
html:root body .cs-footer__brand{font-weight:600;color:var(--cs-text);display:inline-flex;align-items:center;gap:8px}
html:root body .cs-footer__brand::before{content:"";width:8px;height:8px;border-radius:2px;background:var(--cs-brand);box-shadow:3px 3px 0 var(--cs-ink-3)}
html:root body .cs-footer__copy{color:var(--cs-muted)}
html:root body .cs-footer__end{margin-inline-start:auto;display:inline-flex;align-items:center;gap:12px}
html:root body .cs-footer__link{color:var(--cs-muted)!important;text-decoration:none!important}
html:root body .cs-footer__link:hover{color:var(--cs-brand)!important}
html:root body .cs-footer__ver{display:inline-flex;align-items:center;height:22px;padding:0 8px;border:1px solid var(--cs-line);border-radius:999px;background:var(--cs-surface);
  font-family:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;font-weight:500;color:var(--cs-muted)}
@media (max-width:640px){html:root body .cs-footer{margin:24px 14px 0}html:root body .cs-footer__end{margin-inline-start:0;width:100%}}
@media print{html:root body .cs-footer{display:none}}


/* ═════════════════════════ 18. PARAMÈTRES DE L'ENTREPRISE (/business/settings) ═════════════════════════
   Menu de sections groupé à gauche, section active en carte, recherche dans l'en-tête, barre d'enregistrement collante.
   Les champs héritent des règles « formulaires » (sections 7 et 14) : même charte que les fiches de documents. */
html body.cs-docs--settings .cs-set-header{display:flex!important;align-items:flex-end;justify-content:space-between;gap:16px 24px;flex-wrap:wrap}
html body.cs-docs--settings .cs-set-header h1{flex:1 1 420px;min-width:0}
html body.cs-docs--settings .cs-set-header h1 small{max-width:640px}
html body.cs-docs--settings .cs-set-search{flex:0 1 420px;min-width:260px}
html body.cs-docs--settings .cs-set-search > .row{margin:0!important}
html body.cs-docs--settings .cs-set-search > .row > [class*="col-"]{width:100%!important;margin:0!important;padding:0!important;float:none!important}
html body.cs-docs--settings .cs-set-search .input-group-addon{background:var(--cs-surface)!important;color:var(--cs-faint)!important}
html body.cs-docs--settings .cs-set-search .select2-selection{height:40px!important;min-height:40px!important}
html body.cs-docs--settings .cs-set-search .select2-selection__rendered{line-height:38px!important}

html body.cs-docs--settings .cs-set-layout{display:grid;grid-template-columns:264px minmax(0,1fr);gap:20px;align-items:start}

/* Menu */
html body.cs-docs--settings .cs-set-nav{position:sticky;top:80px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius);box-shadow:var(--cp-shadow);overflow:hidden}
html body.cs-docs--settings .cs-set-nav__id{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid var(--cs-line)}
html body.cs-docs--settings .cs-set-nav__avatar{flex:0 0 38px;width:38px;height:38px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--cs-ink);color:#fff;font-weight:600;font-size:16px}
html body.cs-docs--settings .cs-set-nav__who{min-width:0;display:flex;flex-direction:column;gap:2px}
html body.cs-docs--settings .cs-set-nav__who strong{font-size:14px;font-weight:600;color:var(--cs-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.cs-docs--settings .cs-set-nav__who span{font-size:12px;color:var(--cs-muted);line-height:1.35}
html body.cs-docs--settings .cs-set-nav__list{padding:6px 8px 10px;max-height:calc(100vh - 220px);overflow-y:auto;scrollbar-width:thin}
html body.cs-docs--settings .cs-set-nav__group{padding:14px 10px 6px;font-size:12px;font-weight:600;color:var(--cs-faint);letter-spacing:.01em}
html body.cs-docs--settings .cs-set-nav__group:first-child{padding-top:8px}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn{
  display:flex!important;align-items:center;gap:10px;width:100%;height:36px;margin:1px 0;padding:0 10px!important;
  border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;
  color:var(--cs-text)!important;font-family:var(--cs-font);font-size:13.5px!important;font-weight:400!important;text-align:start;white-space:nowrap;
  position:relative;transition:background .12s,color .12s}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn svg{width:18px;height:18px;flex:0 0 18px;stroke-width:1.8;color:var(--cs-faint)}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn span{overflow:hidden;text-overflow:ellipsis}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn:hover{background:var(--cp-head)!important;color:var(--cs-text)!important}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn:hover svg{color:var(--cs-muted)}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn:focus-visible{outline:2px solid var(--cs-brand);outline-offset:-2px}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn.is-active{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important;font-weight:600!important}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn.is-active svg{color:var(--cs-brand)}
html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn.is-active::before{content:"";position:absolute;inset-inline-start:-8px;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--cs-brand)}
html body.cs-docs--settings .cs-set-nav__badge{margin-inline-start:auto;height:20px;padding:0 8px;border-radius:999px;display:inline-flex;align-items:center;
  font-size:11px;font-weight:600;background:var(--cs-ok-soft);color:var(--cs-ok)}

/* Contenu */
html body.cs-docs--settings .cs-set-body{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius);box-shadow:var(--cp-shadow);padding:22px 26px 26px;min-width:0}
html body.cs-docs--settings .cs-set-section__head{margin:0 0 20px;padding:0 0 16px;border-bottom:1px solid var(--cs-line)}
html body.cs-docs--settings .cs-set-section__head h2{margin:0;font-family:var(--cs-font);font-size:19px;font-weight:600;color:var(--cs-text);letter-spacing:-.005em}
html body.cs-docs--settings .cs-set-section__head p{margin:5px 0 0;font-size:13.5px;color:var(--cs-muted)}
html body.cs-docs--settings .cs-set-section__head p:empty{display:none}
html body.cs-docs--settings .cs-set-section > .pos-tab-content{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
html body.cs-docs--settings .cs-set-section .row{row-gap:2px}
/* Sous-titres internes (h4) : séparation nette entre les blocs */
html body.cs-docs--settings .cs-set-section h4{font-family:var(--cs-font)!important;font-size:14.5px!important;font-weight:600!important;color:var(--cs-text)!important;
  margin:22px 0 12px!important;padding-top:18px;border-top:1px solid var(--cs-line);display:block;width:100%}
html body.cs-docs--settings .cs-set-section .pos-tab-content > h4:first-child,html body.cs-docs--settings .cs-set-section .pos-tab-content > .row:first-child > h4:first-child,
html body.cs-docs--settings .cs-set-section .pos-tab-content > .row:first-child > [class*="col-"]:first-child > h4:first-child{margin-top:0!important;padding-top:0;border-top:0}
html body.cs-docs--settings .cs-set-section h4 small{color:var(--cs-muted)!important;font-weight:400}
html body.cs-docs--settings .cs-set-section hr{border:0;border-top:1px solid var(--cs-line);margin:18px 0}
html body.cs-docs--settings .cs-set-section .help-block{margin-top:5px}
/* Cases à cocher : chaque option devient une tuile lisible et cliquable */
html body.cs-docs--settings .cs-set-section .form-group > .checkbox{margin:0!important;min-height:48px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  padding:10px 12px;border:1px solid var(--cs-line);background:var(--cs-surface);transition:border-color .12s,background .12s}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox:hover{border-color:var(--cs-line-2);background:var(--cp-head)}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox:has(.checked),html body.cs-docs--settings .cs-set-section .form-group > .checkbox:has(input:checked){border-color:color-mix(in srgb,var(--cs-brand) 45%,var(--cs-line));background:var(--cs-brand-soft)}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox > br{display:none}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox label{display:inline-flex!important;align-items:center;gap:10px;margin:0!important;padding:0!important;
  font-size:13.5px!important;font-weight:500!important;color:var(--cs-text)!important;line-height:1.35;cursor:pointer;flex:1 1 auto;min-width:0}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox .fa-info-circle,html body.cs-docs--settings .cs-set-section .form-group > .checkbox i.fa-info{color:var(--cs-faint)!important}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox label input[type="checkbox"]{position:static!important;margin:0!important;flex:0 0 auto}
html body.cs-docs--settings .cs-set-section .form-group > .checkbox label .icheckbox_square-blue{flex:0 0 auto;margin:0!important}
/* Tableaux de réglages (raccourcis clavier, préfixes, champs personnalisés…) */
html body.cs-docs--settings .cs-set-section table.table{border:1px solid var(--cs-line)!important;border-collapse:separate!important;border-spacing:0;background:var(--cs-surface)!important;margin-bottom:16px}
html body.cs-docs--settings .cs-set-section table.table > tbody > tr > th,html body.cs-docs--settings .cs-set-section table.table > thead > tr > th{background:var(--cp-head)!important;color:var(--cs-muted)!important;
  font-size:12.5px!important;font-weight:600!important;text-transform:none!important;letter-spacing:0!important;border:0!important;border-bottom:1px solid var(--cs-line)!important;padding:9px 12px!important}
html body.cs-docs--settings .cs-set-section table.table > tbody > tr > td{border:0!important;border-bottom:1px solid var(--cs-line)!important;padding:8px 12px!important;color:var(--cs-text)!important;
  background:transparent!important;vertical-align:middle!important;font-size:13.5px}
html body.cs-docs--settings .cs-set-section table.table > tbody > tr:last-child > td{border-bottom:0!important}
html body.cs-docs--settings .cs-set-section table.table-striped > tbody > tr:nth-of-type(odd){background:transparent!important}
html body.cs-docs--settings .cs-set-section table.table .form-control{height:34px!important}
/* Résultat de recherche : repère temporaire */
html body.cs-docs--settings .cs-set-hit{animation:cs-set-hit 2.4s ease-out}
@keyframes cs-set-hit{0%,40%{box-shadow:0 0 0 3px var(--cs-brand),0 0 0 8px var(--cs-brand-soft);background:var(--cs-brand-soft)}100%{box-shadow:0 0 0 0 transparent}}

/* Barre d'enregistrement collante */
html body.cs-docs--settings .cs-set-actions{position:sticky;bottom:0;z-index:40;margin:16px 0 0;padding:10px 14px;display:flex;align-items:center;justify-content:flex-end;gap:14px;
  background:color-mix(in srgb,var(--cs-surface) 92%,transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border:1px solid var(--cs-line);border-radius:var(--cp-radius);box-shadow:0 -6px 20px rgba(14,42,92,.08)}
html body.cs-docs--settings .cs-set-actions__state{margin-inline-end:auto;display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--cs-muted)}
html body.cs-docs--settings .cs-set-actions__state::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--cs-ok)}
html body.cs-docs--settings .cs-set-actions__state.is-dirty{color:var(--cs-warn);font-weight:600}
html body.cs-docs--settings .cs-set-actions__state.is-dirty::before{background:var(--cs-warn)}
html body.cs-docs--settings .cs-set-actions #cs_set_submit{height:40px!important;min-height:40px!important;padding:0 20px!important;font-size:14px!important;margin:0!important}
html[data-theme="dark"] body.cs-docs--settings .cs-set-actions{box-shadow:0 -8px 24px rgba(0,0,0,.35)}
html[data-theme="dark"] body.cs-docs--settings .cs-set-nav__avatar{background:var(--cs-brand)}

/* Tablette / mobile : le menu devient une barre défilante au-dessus du contenu */
@media (max-width:991px){
  html body.cs-docs--settings .cs-set-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  html body.cs-docs--settings .cs-set-nav{position:static}
  html body.cs-docs--settings .cs-set-nav__id{display:none}
  html body.cs-docs--settings .cs-set-nav__list{display:flex;gap:4px;overflow-x:auto;max-height:none;padding:6px;scrollbar-width:none}
  html body.cs-docs--settings .cs-set-nav__list::-webkit-scrollbar{display:none}
  html body.cs-docs--settings .cs-set-nav__group{display:none}
  html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn{width:auto;flex:0 0 auto;margin:0}
  html body.cs-docs--settings .settings-nav-btn.cs-set-nav__btn.is-active::before{display:none}
  html body.cs-docs--settings .cs-set-body{padding:16px}
  html body.cs-docs--settings .cs-set-search{flex-basis:100%}
}
@media (max-width:640px){
  html body.cs-docs--settings .cs-set-actions{padding:10px}
  html body.cs-docs--settings .cs-set-actions__state{font-size:0;gap:0}
  html body.cs-docs--settings .cs-set-actions__state::before{width:10px;height:10px}
  html body.cs-docs--settings .cs-set-actions #cs_set_submit{flex:1 1 auto;justify-content:center}
}


/* ═════════════════════════ 19. COMPOSANTS PARTAGÉS : bandeaux (cs-callout) et étiquettes (cs-tag) ═════════════════════════ */
html:root body .cs-callout{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px;padding:12px 14px;border:1px solid var(--cs-line);border-inline-start:3px solid var(--cs-brand);
  background:var(--cs-surface);font-family:var(--cs-font);color:var(--cs-text);font-size:13.5px;line-height:1.5}
html:root body .cs-callout__icon{flex:0 0 30px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-brand-soft);color:var(--cs-brand);font-size:13px}
html:root body .cs-callout__text{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:2px;padding-top:4px}
html:root body .cs-callout__text strong{font-weight:600;color:var(--cs-text)}
html:root body .cs-callout__text > span{color:var(--cs-muted)}
html:root body .cs-callout__note{color:var(--cs-warn)!important;font-weight:500}
html:root body .cs-callout__hint{color:var(--cs-faint)!important;font-size:12.5px}
html:root body .cs-callout__act{display:flex;gap:8px;flex-wrap:wrap;align-items:center;align-self:center}
html:root body .cs-callout--wide{flex-wrap:wrap}
html:root body .cs-callout--warn{border-inline-start-color:var(--cs-warn);background:var(--cs-warn-soft);border-color:color-mix(in srgb,var(--cs-warn) 22%,var(--cs-line))}
html:root body .cs-callout--warn .cs-callout__icon{background:var(--cs-surface);color:var(--cs-warn)}
html:root body .cs-callout--ok{border-inline-start-color:var(--cs-ok)}
html:root body .cs-callout--ok .cs-callout__icon{background:var(--cs-ok-soft);color:var(--cs-ok)}
html:root body .cs-callout--err{border-inline-start-color:var(--cs-err);background:var(--cs-err-soft)}
html:root body .cs-callout--err .cs-callout__icon{background:var(--cs-surface);color:var(--cs-err)}
html:root body .cs-callout--neutral{border-inline-start-color:var(--cs-line-2)}
html:root body .cs-callout--neutral .cs-callout__icon{background:var(--cs-paper);color:var(--cs-muted)}
html:root body .cs-callout code{background:var(--cs-paper);border:1px solid var(--cs-line);color:var(--cs-text);padding:1px 6px}
html:root body .cs-tag{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;font-family:var(--cs-font);font-size:11.5px;font-weight:600;
  background:var(--cs-paper);color:var(--cs-muted);border:1px solid var(--cs-line);white-space:nowrap;line-height:1}
html:root body .cs-tag--ok{background:var(--cs-ok-soft);color:var(--cs-ok);border-color:transparent}
html:root body .cs-tag--brand{background:var(--cs-brand-soft);color:var(--cs-brand);border-color:transparent}
html:root body .cs-tag--warn{background:var(--cs-warn-soft);color:var(--cs-warn);border-color:transparent}
html:root body .cs-is-link{font-size:13px;color:var(--cs-muted)!important;text-decoration:underline!important;text-underline-offset:3px;text-decoration-color:var(--cs-line-2)!important}
html:root body .cs-is-link:hover{color:var(--cs-brand)!important}

/* ═════════════════════════ 20. PARAMÈTRES DE FACTURE · BIBLIOTHÈQUE · CONVERSION ═════════════════════════ */
/* En-tête d'onglet : titre + description à gauche, actions à droite */
html body.cs-docs--invoice .cs-is-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 20px;flex-wrap:wrap;margin:6px 0 18px}
html body.cs-docs--invoice .cs-is-title{margin:0!important;font-family:var(--cs-font);font-size:17px;font-weight:600;color:var(--cs-text)}
html body.cs-docs--invoice .cs-is-sub{margin:4px 0 0;font-size:13.5px;color:var(--cs-muted);max-width:720px}
html body.cs-docs--invoice .cs-is-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body.cs-docs--invoice .cs-is-actions .tw-dw-btn,html body.cs-docs--invoice .cs-tpl__actions .tw-dw-btn,html body.cs-docs--invoice .cs-lib-header__actions .tw-dw-btn,html body.cs-docs--invoice .cs-callout__act .tw-dw-btn,
html body.cs-docs--invoice .cs-conv-actions .tw-dw-btn,html body.cs-docs--invoice .cs-dlg__foot .tw-dw-btn{height:36px!important;min-height:36px!important;padding:0 14px!important;font-size:13px!important;gap:7px;display:inline-flex!important;align-items:center}
html body.cs-docs--invoice .tw-dw-btn.tw-dw-btn-outline{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;box-shadow:none!important}
html body.cs-docs--invoice .tw-dw-btn.tw-dw-btn-outline:hover{border-color:var(--cs-brand)!important;color:var(--cs-brand)!important;background:var(--cs-brand-soft)!important}
html body.cs-docs--invoice .tw-dw-btn.tw-dw-btn-outline i{color:inherit}

/* Grille de modèles (onglet + bibliothèque) */
html body.cs-docs--invoice .cs-tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:18px}
html body.cs-docs--invoice .cs-tpl{display:flex;flex-direction:column;min-width:0;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius);
  box-shadow:var(--cp-shadow);transition:border-color .15s,box-shadow .15s}
html body.cs-docs--invoice .cs-tpl:hover{border-color:var(--cs-line-2);box-shadow:0 8px 24px rgba(14,42,92,.10)}
html body.cs-docs--invoice .cs-tpl[hidden]{display:none!important}
html body.cs-docs--invoice .cs-tpl__thumb{position:relative;display:block;height:228px;overflow:hidden;border-radius:var(--cp-radius) var(--cp-radius) 0 0;border-bottom:1px solid var(--cs-line);
  background:var(--cs-paper);background-image:radial-gradient(circle at 1px 1px,var(--cs-line) 1px,transparent 0);background-size:16px 16px;text-decoration:none!important}
html body.cs-docs--invoice .cs-tpl__thumb iframe{position:absolute;top:16px;left:50%;width:794px;height:1123px;border:0;background:#fff;transform:translateX(-50%) scale(.22);transform-origin:top center;
  pointer-events:none;box-shadow:0 6px 24px rgba(14,42,92,.22)}
html body.cs-docs--invoice .cs-tpl__thumb::after{content:"";position:absolute;inset:0;background:rgba(20,89,199,0);transition:background .15s}
html body.cs-docs--invoice .cs-tpl__thumb:hover::after{background:rgba(20,89,199,.06)}
html body.cs-docs--invoice .cs-tpl__thumb.is-classic{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
html body.cs-docs--invoice .cs-tpl__paper{width:104px;height:140px;background:#fff;box-shadow:0 6px 18px rgba(14,42,92,.16);padding:16px 14px;display:flex;flex-direction:column;gap:8px;opacity:.9}
html body.cs-docs--invoice .cs-tpl__paper i{display:block;height:6px;background:#E3E8F0}
html body.cs-docs--invoice .cs-tpl__paper i:first-child{width:55%;height:9px;background:#C8D3E6}
html body.cs-docs--invoice .cs-tpl__paper i:nth-child(3){width:80%}
html body.cs-docs--invoice .cs-tpl__paper i:last-child{width:40%;margin-top:auto;margin-left:auto;background:#C8D3E6}
html body.cs-docs--invoice .cs-tpl__classic{font-size:12.5px;font-weight:500;color:var(--cs-muted);text-align:center;padding:0 16px}
html body.cs-docs--invoice .cs-tpl__body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
html body.cs-docs--invoice .cs-tpl__name{font-family:var(--cs-font);font-size:15px;font-weight:600;color:var(--cs-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body.cs-docs--invoice .cs-tpl__tags{display:flex;flex-wrap:wrap;gap:5px}
html body.cs-docs--invoice .cs-tpl__meta{display:flex;align-items:flex-start;gap:8px;font-size:12.5px;color:var(--cs-text);line-height:1.45}
html body.cs-docs--invoice .cs-tpl__meta > i{color:var(--cs-faint);width:14px;margin-top:2px;text-align:center}
html body.cs-docs--invoice .cs-tpl__meta-k{color:var(--cs-muted)}
html body.cs-docs--invoice .cs-tpl__muted{color:var(--cs-faint)}
html body.cs-docs--invoice .cs-tpl__desc{font-size:12.5px;color:var(--cs-muted);line-height:1.5}
html body.cs-docs--invoice .cs-tpl__actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:6px}
html body.cs-docs--invoice .cs-tpl__actions .cs-tpl__main{flex:1 1 100%;justify-content:center}
html body.cs-docs--invoice .cs-tpl__actions .tw-dw-btn{flex-wrap:nowrap!important;white-space:nowrap}
html body.cs-docs--invoice .cs-tpl__actions > .tw-dw-btn-outline{flex:1 1 0;justify-content:center;min-width:0;padding:0 8px!important;font-size:12.5px!important;overflow:hidden;text-overflow:ellipsis}
html body.cs-docs--invoice .cs-tpl__actions > .tw-dw-btn-outline > i{display:none}
html body.cs-docs--invoice .cs-is-actions .tw-dw-btn,html body.cs-docs--invoice .cs-lib-header__actions .tw-dw-btn,html body.cs-docs--invoice .cs-callout__act .tw-dw-btn,html body.cs-docs--invoice .cs-conv-actions .tw-dw-btn{flex-wrap:nowrap!important;white-space:nowrap}
html body.cs-docs--invoice .cs-tpl__more > .tw-dw-btn{width:36px;padding:0!important;justify-content:center}
html body.cs-docs--invoice .cs-tpl__more .dropdown-menu{min-width:190px}
html body.cs-docs--invoice .cs-danger-link,html body.cs-docs--invoice .cs-danger-link i{color:var(--cs-err)!important}
/* Carte « Nouveau modèle » */
html body.cs-docs--invoice .cs-tpl--new{align-items:center;justify-content:center;text-align:center;gap:6px;min-height:300px;padding:24px;border:1.5px dashed var(--cs-line-2);background:transparent;
  box-shadow:none;color:var(--cs-muted);text-decoration:none!important;cursor:pointer;font-family:var(--cs-font);font-size:13px}
html body.cs-docs--invoice .cs-tpl--new strong{font-size:15px;font-weight:600;color:var(--cs-text)}
html body.cs-docs--invoice .cs-tpl--new:hover{border-color:var(--cs-brand);background:var(--cs-brand-soft);color:var(--cs-muted);box-shadow:none}
html body.cs-docs--invoice .cs-tpl--new__plus{width:44px;height:44px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-brand);color:#fff;font-size:16px;margin-bottom:6px}

/* Bibliothèque : en-tête, filtres, sections */
html body.cs-docs--invoice .cs-lib-header{display:flex!important;align-items:flex-end;justify-content:space-between;gap:16px 24px;flex-wrap:wrap}
html body.cs-docs--invoice .cs-lib-header h1{flex:1 1 520px;min-width:0}
html body.cs-docs--invoice .cs-lib-header h1 small{max-width:780px;line-height:1.5}
html body.cs-docs--invoice .cs-lib-header__actions{display:flex;gap:8px;flex-wrap:wrap}
html body.cs-docs--invoice .cs-lib{max-width:none!important;font-family:var(--cs-font)!important;color:var(--cs-text)!important}
html body.cs-docs--invoice .cs-lib-bar{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;margin:0 0 16px;padding:10px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius)}
html body.cs-docs--invoice .cs-lib-search{position:relative;flex:1 1 260px;max-width:360px;margin:0!important}
html body.cs-docs--invoice .cs-lib-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--cs-faint);font-size:13px}
html body.cs-docs--invoice .cs-lib-search input{width:100%;height:36px;border:1px solid var(--cs-line-2);background:var(--cs-surface);color:var(--cs-text);padding:0 12px 0 34px;font-size:13.5px;font-family:var(--cs-font);outline:0}
html body.cs-docs--invoice .cs-lib-search input:focus{border-color:var(--cs-brand);box-shadow:var(--cp-ring)}
html body.cs-docs--invoice .cs-seg{display:inline-flex;padding:3px;gap:2px;background:var(--cp-head);border:1px solid var(--cs-line);border-radius:9px}
html body.cs-docs--invoice .cs-seg__btn{border:0;background:transparent;height:30px;padding:0 12px;border-radius:7px;font-family:var(--cs-font);font-size:13px;font-weight:500;color:var(--cs-muted);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
html body.cs-docs--invoice .cs-seg__btn span{font-size:11.5px;font-weight:600;color:var(--cs-faint)}
html body.cs-docs--invoice .cs-seg__btn:hover{color:var(--cs-text)}
html body.cs-docs--invoice .cs-seg__btn.is-on{background:var(--cs-surface);color:var(--cs-text);box-shadow:0 1px 2px rgba(14,42,92,.12)}
html body.cs-docs--invoice .cs-seg__btn.is-on span{color:var(--cs-brand)}
html body.cs-docs--invoice .cs-lib-jump{margin-inline-start:auto;font-size:13px;font-weight:500;color:var(--cs-brand)!important;display:inline-flex;align-items:center;gap:6px}
html body.cs-docs--invoice .cs-lib-none{grid-column:1/-1;padding:28px;text-align:center;color:var(--cs-muted);border:1px dashed var(--cs-line-2)}
html body.cs-docs--invoice .cs-lib-empty{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:8px;padding:48px 20px;text-align:center;border:1.5px dashed var(--cs-line-2);border-radius:var(--cp-radius);color:var(--cs-muted)}
html body.cs-docs--invoice .cs-lib-empty strong{color:var(--cs-text);font-size:16px;font-weight:600}
html body.cs-docs--invoice .cs-lib-empty__icon{width:52px;height:52px;border-radius:50%;background:var(--cs-brand-soft);color:var(--cs-brand);display:inline-flex;align-items:center;justify-content:center;font-size:20px;margin-bottom:4px}
html body.cs-docs--invoice .cs-lib-section{margin-top:36px;scroll-margin-top:90px}
html body.cs-docs--invoice .cs-lib-section__head{margin:0 0 14px;padding-top:20px;border-top:1px solid var(--cs-line)}
html body.cs-docs--invoice .cs-lib-section__head h2{margin:0;font-family:var(--cs-font);font-size:18px;font-weight:600;color:var(--cs-text)}
html body.cs-docs--invoice .cs-lib-section__head p{margin:4px 0 0;font-size:13.5px;color:var(--cs-muted);max-width:860px}

/* Fenêtres (nouveau modèle, renommer, supprimer) */
html body.cs-docs--invoice .cs-dlg.dd-modal{background:rgba(10,22,49,.55)!important;z-index:2100!important;padding:16px}
html body.cs-docs--invoice .cs-dlg .cs-dlg__box{width:min(500px,100%)!important;height:auto!important;max-height:90vh;background:var(--cs-surface)!important;border:1px solid var(--cs-line);border-radius:14px!important;
  box-shadow:var(--cp-shadow-pop);display:flex;flex-direction:column;overflow:hidden;font-family:var(--cs-font);color:var(--cs-text)}
html body.cs-docs--invoice .cs-dlg__head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--cs-line)}
html body.cs-docs--invoice .cs-dlg__head b{font-size:16px;font-weight:600}
html body.cs-docs--invoice .cs-dlg__x{border:0;background:none;font-size:24px;line-height:1;color:var(--cs-faint);cursor:pointer;padding:0 4px}
html body.cs-docs--invoice .cs-dlg__x:hover{color:var(--cs-text)}
html body.cs-docs--invoice .cs-dlg__body{padding:18px 20px;display:flex;flex-direction:column;gap:14px;overflow:auto}
html body.cs-docs--invoice .cs-dlg__field{display:flex!important;flex-direction:column;gap:6px;margin:0!important;font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important}
html body.cs-docs--invoice .cs-dlg__field[hidden]{display:none!important}
html body.cs-docs--invoice .cs-dlg__field small{font-weight:400;color:var(--cs-muted);font-size:12px}
html body.cs-docs--invoice .cs-dlg__field .form-control{height:38px;border:1px solid var(--cs-line-2)!important;border-radius:0!important;background:var(--cs-surface)!important;color:var(--cs-text)!important;box-shadow:none!important}
html body.cs-docs--invoice .cs-dlg__field .form-control:focus{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important}
html body.cs-docs--invoice .cs-dlg__text{margin:0;font-size:14px;color:var(--cs-text);line-height:1.5}
html body.cs-docs--invoice .cs-dlg__text[hidden]{display:none}
html body.cs-docs--invoice .cs-dlg__foot{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--cs-line);background:var(--cp-head)}
html body.cs-docs--invoice .cs-dlg .cs-btn-danger{background:var(--cs-err)!important;border-color:var(--cs-err)!important}

/* Conversion : étapes, aperçus avant / après, rapport, actions */
html body.cs-docs--invoice .cs-steps{display:flex;gap:6px;flex-wrap:wrap;list-style:none;margin:0 0 16px;padding:0;counter-reset:none}
html body.cs-docs--invoice .cs-steps li{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px 0 6px;border:1px solid var(--cs-line);background:var(--cs-surface);color:var(--cs-muted);font-size:13px;font-weight:500;border-radius:999px}
html body.cs-docs--invoice .cs-steps li span{width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-paper);color:var(--cs-muted);font-size:12px;font-weight:600}
html body.cs-docs--invoice .cs-steps li.is-on{border-color:var(--cs-brand);color:var(--cs-brand);background:var(--cs-brand-soft)}
html body.cs-docs--invoice .cs-steps li.is-on span{background:var(--cs-brand);color:#fff}
html body.cs-docs--invoice .cs-conv-bar{display:flex;align-items:center;gap:10px 14px;flex-wrap:wrap;margin:0 0 14px;padding:10px 14px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius)}
html body.cs-docs--invoice .cs-conv-bar label{margin:0!important;font-weight:600!important}
html body.cs-docs--invoice .cs-conv-bar .form-control{min-width:320px;max-width:100%;width:auto}
html body.cs-docs--invoice .cs-conv-hint{font-size:12.5px;color:var(--cs-muted)}
html body.cs-docs--invoice .cs-conv-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
html body.cs-docs--invoice .cs-conv-pane{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius);overflow:hidden;box-shadow:var(--cp-shadow)}
html body.cs-docs--invoice .cs-conv-pane.is-after{border-color:color-mix(in srgb,var(--cs-brand) 40%,var(--cs-line))}
html body.cs-docs--invoice .cs-conv-pane__head{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--cp-head);border-bottom:1px solid var(--cs-line);font-size:13.5px;font-weight:600;color:var(--cs-text)}
html body.cs-docs--invoice .cs-conv-pane iframe{display:block;width:100%;height:72vh;border:0;background:#fff}
html body.cs-docs--invoice .cs-conv-report{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
html body.cs-docs--invoice .cs-conv-box{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:var(--cp-radius);padding:14px 16px}
html body.cs-docs--invoice .cs-conv-box h4{margin:0 0 8px!important;font-size:14px!important;font-weight:600!important;display:flex;align-items:center;gap:8px}
html body.cs-docs--invoice .cs-conv-box.is-ok h4{color:var(--cs-ok)!important}
html body.cs-docs--invoice .cs-conv-box.is-warn h4{color:var(--cs-warn)!important}
html body.cs-docs--invoice .cs-conv-box ul{margin:0;padding-inline-start:18px;color:var(--cs-text);font-size:13.5px;list-style:disc}
html body.cs-docs--invoice .cs-conv-box li{margin:4px 0}
html body.cs-docs--invoice .cs-conv-actions{position:sticky;bottom:0;z-index:40;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 0;padding:10px 14px;
  background:color-mix(in srgb,var(--cs-surface) 92%,transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid var(--cs-line);border-radius:var(--cp-radius);box-shadow:0 -6px 20px rgba(14,42,92,.08)}
html body.cs-docs--invoice .cs-conv-actions__sp{flex:1}
@media (max-width:900px){ html body.cs-docs--invoice .cs-conv-grid,html body.cs-docs--invoice .cs-conv-report{grid-template-columns:1fr} html body.cs-docs--invoice .cs-conv-pane iframe{height:60vh} html body.cs-docs--invoice .cs-conv-bar .form-control{min-width:0;width:100%} }

/* Libellés et options (invoice-layouts create / edit) : blocs repliables, cases en tuiles, barre collante */
html body.cs-docs--invoice .dd-fold{margin-bottom:12px!important}
html body.cs-docs--invoice .dd-fold-head{display:flex!important;align-items:center;gap:12px;width:100%;padding:12px 16px!important;text-align:start;cursor:pointer;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;box-shadow:var(--cp-shadow);font-family:var(--cs-font);color:var(--cs-text)}
html body.cs-docs--invoice .dd-fold-head:hover{border-color:var(--cs-line-2)!important;background:var(--cp-head)!important}
html body.cs-docs--invoice .dd-fold-head .dd-fold-title{font-weight:600!important;font-size:14.5px;color:var(--cs-text)}
html body.cs-docs--invoice .dd-fold-head .dd-fold-help{color:var(--cs-muted)!important;font-size:13px;flex:1}
html body.cs-docs--invoice .dd-fold-head i,html body.cs-docs--invoice .dd-fold-head .fa{color:var(--cs-faint)}
html body.cs-docs--invoice .dd-fold-tools{font-size:13px;color:var(--cs-muted)}
html body.cs-docs--invoice .dd-fold-tools a{color:var(--cs-brand)}
html body.cs-docs--invoice .cs-il-designer-link{margin-top:8px}
html body.cs-docs--invoice.cs-docs--form .content .form-group > .checkbox,html body.cs-docs--invoice.cs-docs--form .content [class*="col-"] > .checkbox{
  margin:0 0 10px!important;min-height:44px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 12px;border:1px solid var(--cs-line);background:var(--cs-surface);transition:border-color .12s,background .12s}
html body.cs-docs--invoice.cs-docs--form .content .form-group > .checkbox:hover,html body.cs-docs--invoice.cs-docs--form .content [class*="col-"] > .checkbox:hover{border-color:var(--cs-line-2);background:var(--cp-head)}
html body.cs-docs--invoice.cs-docs--form .content .form-group > .checkbox:has(.checked),html body.cs-docs--invoice.cs-docs--form .content .form-group > .checkbox:has(input:checked),
html body.cs-docs--invoice.cs-docs--form .content [class*="col-"] > .checkbox:has(.checked),html body.cs-docs--invoice.cs-docs--form .content [class*="col-"] > .checkbox:has(input:checked){border-color:color-mix(in srgb,var(--cs-brand) 45%,var(--cs-line));background:var(--cs-brand-soft)}
html body.cs-docs--invoice.cs-docs--form .content .checkbox > br{display:none}
html body.cs-docs--invoice.cs-docs--form .content .checkbox label{display:inline-flex!important;align-items:center;gap:10px;margin:0!important;padding:0!important;font-weight:500!important;cursor:pointer;flex:1 1 auto;min-width:0;line-height:1.35}
html body.cs-docs--invoice.cs-docs--form .content .checkbox label input[type="checkbox"]{position:static!important;margin:0!important}
html body.cs-docs--invoice.cs-docs--form .content h4{font-family:var(--cs-font)!important;font-size:14.5px!important;font-weight:600!important;color:var(--cs-text)!important;margin:16px 0 10px!important}
html body.cs-docs--invoice.cs-docs--form .content .row:has(> .col-sm-12.text-center > button[type="submit"]){
  position:sticky;bottom:0;z-index:40;margin:16px 0 0!important;padding:10px 14px!important;
  background:color-mix(in srgb,var(--cs-surface) 92%,transparent)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border:1px solid var(--cs-line)!important;border-radius:var(--cp-radius)!important;box-shadow:0 -6px 20px rgba(14,42,92,.08)!important}
html body.cs-docs--invoice.cs-docs--form .content .row:has(> .col-sm-12.text-center > button[type="submit"]) > .col-sm-12{display:flex!important;justify-content:flex-end;float:none!important;width:100%!important;padding:0!important}
html body.cs-docs--invoice.cs-docs--form .content .row:has(> .col-sm-12.text-center > button[type="submit"]) button[type="submit"]{height:40px!important;min-height:40px!important;padding:0 20px!important;font-size:14px!important}

/* Onglet « Schémas » : la carte englobante ne double pas les cadres */
html body.cs-docs--invoice .content .tw-rounded-xl.tw-ring-1 > .tw-p-2{padding:8px 16px 18px!important}


/* ═════════════════════════ 21. NATURE (Produit / Service) ET STRUCTURE — liste et détail produit ═════════════════════════ */
html:root body .cs-nature-cell{display:inline-flex;flex-direction:column;align-items:flex-start;gap:4px;white-space:nowrap}
html:root body .cs-nature{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:999px;font-family:var(--cs-font);font-size:12px;font-weight:600;line-height:1}
html:root body .cs-nature i{font-size:10.5px}
html:root body .cs-nature--product{background:var(--cs-brand-soft);color:var(--cs-brand)}
html:root body .cs-nature--service{background:var(--cs-violet-soft);color:var(--cs-violet)}
html:root body .cs-structure{display:inline-flex;align-items:center;gap:6px;font-family:var(--cs-font);font-size:12.5px;color:var(--cs-muted)}
html:root body .cs-structure i{color:var(--cs-faint);font-size:11.5px;width:13px;text-align:center}
html:root body .cs-pv-eyebrow .cs-nature-cell{flex-direction:row;align-items:center;gap:10px}
/* Bascule Tous / Produits / Services (liste des produits) */
html:root body .cs-seg{display:inline-flex;padding:3px;gap:2px;background:var(--cp-head);border:1px solid var(--cs-line);border-radius:9px}
html:root body .cs-seg__btn{border:0;background:transparent;height:30px;padding:0 12px;border-radius:7px;font-family:var(--cs-font);font-size:13px;font-weight:500;color:var(--cs-muted);cursor:pointer;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
html:root body .cs-seg__btn i{font-size:11.5px;color:var(--cs-faint)}
html:root body .cs-seg__btn:hover{color:var(--cs-text)}
html:root body .cs-seg__btn.is-on{background:var(--cs-surface);color:var(--cs-text);box-shadow:0 1px 2px rgba(14,42,92,.12)}
html:root body .cs-seg__btn.is-on i{color:var(--cs-brand)}
html:root body .cs-prod-bar .cs-prod-nature{margin-inline-end:auto}
@media (max-width:640px){ html:root body .cs-prod-bar{flex-wrap:wrap} html:root body .cs-prod-bar .cs-prod-nature{width:100%;overflow-x:auto} }


/* ═════════════════════════ 22. FENÊTRE « DÉTAIL DE LA VENTE » (sale_pos/show — .csv-*) ═════════════════════════
   Portée globale (la fenêtre s'ouvre depuis toutes les listes) ; spécificité renforcée pour passer devant
   app.css (.modal-xl), dark-mode.css (.modal-*) et les règles .modal de la section 11. */
html:root body .modal .csv{background:var(--cs-paper)!important;border:1px solid var(--cs-line)!important;border-radius:14px!important;box-shadow:var(--cp-shadow-pop)!important;font-family:var(--cs-font)!important;color:var(--cs-text)!important;overflow:hidden}
/* En-tête clair */
html:root body .modal .csv > .csv-head{display:flex!important;align-items:flex-start;gap:14px;padding:18px 22px!important;background:var(--cs-surface)!important;background-image:none!important;border-bottom:1px solid var(--cs-line)!important;color:var(--cs-text)!important;border-radius:0!important}
html:root body .modal .csv > .csv-head::before,html:root body .modal .csv > .csv-head::after{content:none!important;display:none!important}
html:root body .csv-head__icon{flex:0 0 42px;width:42px;height:42px;border-radius:11px;background:var(--cs-brand-soft);color:var(--cs-brand);display:inline-flex;align-items:center;justify-content:center;font-size:17px}
html:root body .csv-head__id{flex:1;min-width:0}
html:root body .csv-head__line{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
html:root body .modal .csv .csv-head__title{margin:0!important;font-size:17px!important;font-weight:600!important;color:var(--cs-text)!important;line-height:1.3!important;float:none!important}
html:root body .csv-head__no{font-size:17px;font-weight:600;color:var(--cs-brand);font-variant-numeric:tabular-nums;letter-spacing:.01em}
html:root body .csv-head__meta{display:flex;flex-wrap:wrap;gap:4px 18px;margin-top:6px;font-size:12.5px;color:var(--cs-muted)}
html:root body .csv-head__meta i{color:var(--cs-faint);margin-inline-end:5px;font-size:11.5px}
html:root body .modal .csv .csv-head__x{float:none!important;margin:-4px -6px 0 0!important;width:34px;height:34px;border-radius:8px;opacity:1!important;color:var(--cs-faint)!important;text-shadow:none!important;font-size:24px!important;font-weight:400!important;line-height:1!important;background:transparent!important;display:inline-flex;align-items:center;justify-content:center}
html:root body .modal .csv .csv-head__x:hover{background:var(--cs-paper)!important;color:var(--cs-text)!important}
/* Pastilles */
html:root body .csv-chip{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:600;line-height:1;white-space:nowrap;background:var(--cs-brand-soft);color:var(--cs-brand)}
html:root body .csv-chip--ok{background:var(--cs-ok-soft);color:var(--cs-ok)}
html:root body .csv-chip--warn{background:var(--cs-warn-soft);color:var(--cs-warn)}
html:root body .csv-chip--err{background:var(--cs-err-soft);color:var(--cs-err)}
/* Corps */
html:root body .modal .csv > .csv-body{padding:18px 22px 22px!important;background:var(--cs-paper)!important;color:var(--cs-text)!important;display:flex;flex-direction:column;gap:14px}
html:root body .csv-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
html:root body .csv-kpi{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;padding:12px 16px;display:flex;flex-direction:column;gap:4px;border-inline-start:3px solid var(--cs-brand)}
html:root body .csv-kpi > span{font-size:12px;color:var(--cs-muted);font-weight:500}
html:root body .csv-kpi > strong{font-size:20px;font-weight:600;color:var(--cs-text);font-variant-numeric:tabular-nums;line-height:1.25;white-space:nowrap}
html:root body .csv-kpi--ok{border-inline-start-color:var(--cs-ok)} html:root body .csv-kpi--ok > strong{color:var(--cs-ok)}
html:root body .csv-kpi--err{border-inline-start-color:var(--cs-err)} html:root body .csv-kpi--err > strong{color:var(--cs-err)}
html:root body .csv-kpi--muted{border-inline-start-color:var(--cs-line-2)} html:root body .csv-kpi--muted > strong{color:var(--cs-muted)}
html:root body .csv-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
html:root body .csv-cards--2{grid-template-columns:repeat(2,minmax(0,1fr))}
html:root body .csv-card{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;padding:14px 16px;min-width:0;box-shadow:var(--cp-shadow)}
html:root body .csv-card--flush{padding:0;overflow:hidden}
html:root body .modal .csv .csv-card__title{margin:0 0 10px!important;font-size:11.5px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.05em;color:var(--cs-muted)!important;display:flex;align-items:center;gap:8px;line-height:1.4}
html:root body .csv-card__title i{color:var(--cs-brand);font-size:12px}
html:root body .modal .csv .csv-card__title--bar{margin:0!important;padding:11px 16px!important;border-bottom:1px solid var(--cs-line);background:var(--cp-head)}
html:root body .csv-count{margin-inline-start:auto;min-width:22px;height:20px;padding:0 7px;border-radius:999px;background:var(--cs-surface);border:1px solid var(--cs-line);color:var(--cs-muted);font-size:11px;display:inline-flex;align-items:center;justify-content:center;letter-spacing:0}
html:root body .csv-strong{font-weight:600;color:var(--cs-text)}
html:root body .csv-muted{color:var(--cs-muted)}
html:root body .csv-mono{font-variant-numeric:tabular-nums;font-weight:500;color:var(--cs-brand)}
html:root body .csv-k{color:var(--cs-muted)}
html:root body .csv-sub{margin-top:8px;font-size:11.5px;font-weight:600;color:var(--cs-muted);text-transform:uppercase;letter-spacing:.04em}
html:root body .csv-lines-txt{margin-top:6px;font-size:13px;line-height:1.6;color:var(--cs-text);word-break:break-word}
html:root body .csv-lines-txt i{width:14px;color:var(--cs-faint);font-size:11.5px}
html:root body .csv-empty{color:var(--cs-faint)}
html:root body .modal .csv a.csv-dl{margin-top:12px!important;display:inline-flex!important;align-items:center;gap:7px;height:32px!important;min-height:32px!important;padding:0 12px!important;border:1px solid var(--cs-line-2)!important;border-radius:8px!important;background:var(--cs-surface)!important;color:var(--cs-text)!important;font-size:12.5px!important;font-weight:600!important;text-decoration:none!important;text-transform:none!important;box-shadow:none!important;line-height:1!important}
html:root body .modal .csv a.csv-dl i{color:var(--cs-brand)}
html:root body .modal .csv a.csv-dl:hover{background:var(--cs-paper)!important;border-color:var(--cs-faint)!important}
html:root body .csv-none{padding:22px 16px;text-align:center;color:var(--cs-faint);font-size:13px}
html:root body .csv-none i{margin-inline-end:6px}
/* Tableau des articles (partial sale_line_details : 1re ligne tr.bg-green sans thead) */
html:root body .modal .csv .csv-lines{margin:0!important;border:0!important}
html:root body .modal .csv .csv-lines > table.table,html:root body .modal .csv table.csv-table{width:100%;margin:0!important;background:transparent!important;border:0!important;border-collapse:collapse!important;font-size:13px}
html:root body .modal .csv .csv-lines > table.table tr.bg-green,html:root body .modal .csv .csv-lines > table.table > tbody > tr:first-child:has(> th),
html:root body .modal .csv table.csv-table thead tr{background:var(--cp-head)!important;color:var(--cs-muted)!important}
html:root body .modal .csv .csv-lines > table.table th,html:root body .modal .csv table.csv-table th{background:transparent!important;color:var(--cs-muted)!important;font-size:11.5px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.04em;padding:9px 12px!important;border:0!important;border-bottom:1px solid var(--cs-line)!important;white-space:nowrap;vertical-align:middle!important}
html:root body .modal .csv .csv-lines > table.table td,html:root body .modal .csv table.csv-table td{background:transparent!important;color:var(--cs-text)!important;padding:10px 12px!important;border:0!important;border-top:1px solid var(--cs-line)!important;vertical-align:top!important;line-height:1.45}
html:root body .modal .csv .csv-lines > table.table tr:nth-child(2) > td,html:root body .modal .csv table.csv-table tbody tr:first-child td{border-top:0!important}
html:root body .modal .csv .csv-lines > table.table tr:hover > td,html:root body .modal .csv table.csv-table tbody tr:hover td{background:var(--cp-row-hover)!important}
html:root body .modal .csv .csv-lines > table.table td:nth-last-child(-n+5),html:root body .modal .csv .csv-lines > table.table th:nth-last-child(-n+5),
html:root body .modal .csv table.csv-table .is-num{text-align:end!important;white-space:nowrap;font-variant-numeric:tabular-nums}
html:root body .modal .csv .csv-lines > table.table td:first-child,html:root body .modal .csv .csv-lines > table.table th:first-child{width:40px;color:var(--cs-faint)!important}
html:root body .modal .csv .csv-lines > table.table td:last-child{font-weight:600}
html:root body .modal .csv .csv-lines > table.table td small,html:root body .modal .csv .csv-lines > table.table td .text-muted{color:var(--cs-muted)!important}
/* Paiements + totaux */
html:root body .csv-split{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr);gap:14px;align-items:start}
html:root body .csv-totals table{width:100%;border-collapse:collapse;font-size:13px}
html:root body .csv-totals td{padding:6px 0;color:var(--cs-muted);vertical-align:top;border:0}
html:root body .csv-totals td:last-child{text-align:end;color:var(--cs-text);font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums;padding-inline-start:12px}
html:root body .csv-totals td:last-child small{display:block;color:var(--cs-faint);font-size:11px;font-weight:400}
html:root body .csv-totals td.is-minus{color:var(--cs-err)}
html:root body .csv-totals .csv-inline{color:var(--cs-faint)}
html:root body .csv-totals tr.is-grand td{border-top:1px solid var(--cs-line);padding-top:11px;margin-top:4px;font-size:15px;font-weight:600;color:var(--cs-text)}
html:root body .csv-totals tr.is-grand td:last-child{font-size:17px;color:var(--cs-brand)}
html:root body .csv-totals tr.is-ok td:last-child{color:var(--cs-ok);font-weight:600}
html:root body .csv-totals tr.is-err td:last-child{color:var(--cs-err);font-weight:600}
html:root body .csv-totals tr.is-muted td:last-child{color:var(--cs-muted)}
html:root body .csv-note{font-size:13px;line-height:1.6;color:var(--cs-text);white-space:normal;word-break:break-word;min-height:20px}
/* Activités */
html:root body .csv-activity__body{padding:4px 0}
html:root body .modal .csv .csv-activity__body table{width:100%;margin:0!important;background:transparent!important;border:0!important;font-size:12.5px}
html:root body .modal .csv .csv-activity__body th{background:var(--cp-head)!important;color:var(--cs-muted)!important;font-size:11.5px!important;font-weight:600!important;padding:8px 12px!important;border:0!important;border-bottom:1px solid var(--cs-line)!important}
html:root body .modal .csv .csv-activity__body td{background:transparent!important;color:var(--cs-text)!important;padding:8px 12px!important;border:0!important;border-top:1px solid var(--cs-line)!important}
html:root body .modal .csv .csv-activity__body .box,html:root body .modal .csv .csv-activity__body .box-body{border:0!important;box-shadow:none!important;background:transparent!important;margin:0!important}
html:root body .modal .csv .csv-activity__body h4,html:root body .modal .csv .csv-activity__body .box-title{display:none}
/* Pied */
html:root body .modal .csv > .csv-foot{display:flex!important;align-items:center;gap:8px;padding:13px 22px!important;background:var(--cs-surface)!important;border-top:1px solid var(--cs-line)!important}
html:root body .modal .csv > .csv-foot::before,html:root body .modal .csv > .csv-foot::after{content:none!important}
html:root body .csv-foot__sp{flex:1}
html:root body .modal .csv > .csv-foot .tw-dw-btn,html:root body .modal .cs-mf-foot .tw-dw-btn,html:root body .cs-pl-modal .cs-pl-modal__foot .tw-dw-btn{height:38px!important;min-height:38px!important;padding:0 16px!important;border-radius:8px!important;font-family:var(--cs-font)!important;font-size:13.5px!important;font-weight:600!important;text-transform:none!important;display:inline-flex!important;align-items:center;gap:8px;margin:0!important;box-shadow:none!important}
html:root body .modal .csv > .csv-foot .tw-dw-btn-outline,html:root body .modal .cs-mf-foot .tw-dw-btn-outline,html:root body .cs-pl-modal .cs-pl-modal__foot .tw-dw-btn-outline{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important}
html:root body .modal .csv > .csv-foot .tw-dw-btn-outline:hover,html:root body .modal .cs-mf-foot .tw-dw-btn-outline:hover,html:root body .cs-pl-modal .cs-pl-modal__foot .tw-dw-btn-outline:hover{background:var(--cs-paper)!important;border-color:var(--cs-faint)!important}
html:root body .modal .csv > .csv-foot .tw-dw-btn-outline i{color:var(--cs-muted)}
html:root body .modal .csv > .csv-foot .tw-dw-btn-primary,html:root body .modal .cs-mf-foot .tw-dw-btn-primary{background:var(--cs-brand)!important;border:1px solid var(--cs-brand)!important;color:#fff!important}
html:root body .modal .csv > .csv-foot .tw-dw-btn-primary:hover,html:root body .modal .cs-mf-foot .tw-dw-btn-primary:hover{background:var(--cs-brand-hover)!important;border-color:var(--cs-brand-hover)!important}
@media (max-width:900px){
  html:root body .csv-split{grid-template-columns:1fr}
}
@media (max-width:640px){
  html:root body .modal .csv > .csv-head{padding:14px 16px!important}
  html:root body .modal .csv > .csv-body{padding:14px 12px!important}
  html:root body .csv-kpis{grid-template-columns:1fr}
  html:root body .csv-cards--2{grid-template-columns:1fr}
  html:root body .modal .csv > .csv-foot{flex-wrap:wrap;padding:12px 14px!important}
  html:root body .csv-foot__sp{display:none}
  html:root body .modal .csv > .csv-foot .tw-dw-btn{flex:1 1 auto;justify-content:center}
}

/* ═════════════════════════ 23. FENÊTRE « COMPTE BANCAIRE » (account/create & edit — .cs-mf-*) ═════════════════════════ */
html:root body .modal .cs-mf{background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:14px!important;box-shadow:var(--cp-shadow-pop)!important;font-family:var(--cs-font)!important;color:var(--cs-text)!important;overflow:hidden}
html:root body .modal .cs-mf .cs-mf-head{display:flex!important;align-items:flex-start;gap:14px;padding:18px 22px!important;background:var(--cs-surface)!important;background-image:none!important;border-bottom:1px solid var(--cs-line)!important;color:var(--cs-text)!important}
html:root body .modal .cs-mf .cs-mf-head::before,html:root body .modal .cs-mf .cs-mf-head::after{content:none!important;display:none!important}
html:root body .cs-mf-head__icon,html:root body .cs-pl-modal__icon{flex:0 0 42px;width:42px;height:42px;border-radius:11px;background:var(--cs-brand-soft);color:var(--cs-brand);display:inline-flex;align-items:center;justify-content:center;font-size:17px}
html:root body .cs-mf-head__txt,html:root body .cs-pl-modal__txt{flex:1;min-width:0}
html:root body .modal .cs-mf-head .modal-title,html:root body .cs-pl-modal .cs-pl-modal__head .modal-title{margin:0!important;font-size:17px!important;font-weight:600!important;color:var(--cs-text)!important;line-height:1.3!important;float:none!important}
html:root body .cs-mf-head__txt p,html:root body .cs-pl-modal__txt p{margin:3px 0 0;font-size:12.5px;color:var(--cs-muted)}
html:root body .cs-pl-modal__txt p i{color:var(--cs-faint);margin-inline-end:5px}
html:root body .modal .cs-mf-head .close,html:root body .cs-pl-modal .cs-pl-modal__head .close{float:none!important;order:3;margin:-4px -6px 0 0!important;width:34px;height:34px;border-radius:8px;opacity:1!important;color:var(--cs-faint)!important;text-shadow:none!important;font-size:24px!important;font-weight:400!important;line-height:1!important;background:transparent!important;display:inline-flex;align-items:center;justify-content:center}
html:root body .modal .cs-mf-head .close:hover,html:root body .cs-pl-modal .cs-pl-modal__head .close:hover{background:var(--cs-paper)!important;color:var(--cs-text)!important}
html:root body .modal .cs-mf .modal-body{padding:20px 22px 8px!important;background:var(--cs-surface)!important;color:var(--cs-text)!important}
html:root body .cs-mf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
html:root body .cs-mf-grid > .cs-mf-full{grid-column:1/-1}
html:root body .modal .cs-mf .form-group{margin-bottom:16px!important}
html:root body .modal .cs-mf label{display:block;font-family:var(--cs-font)!important;font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important;margin-bottom:6px!important}
html:root body .modal .cs-mf .form-control{height:38px!important;border:1px solid var(--cs-line-2)!important;border-radius:0!important;background:var(--cs-surface)!important;color:var(--cs-text)!important;font-family:var(--cs-font)!important;font-size:13.5px!important;box-shadow:none!important;padding:6px 11px!important;transition:border-color .15s,box-shadow .15s}
html:root body .modal .cs-mf textarea.form-control{height:auto!important;min-height:80px;resize:vertical}
html:root body .modal .cs-mf .form-control::placeholder{color:var(--cs-faint)!important}
html:root body .modal .cs-mf .form-control:focus{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important;outline:0}
html:root body .modal .cs-mf #iban_input_create,html:root body .modal .cs-mf [id^="iban_input"],html:root body .modal .cs-mf [id^="swift_input"]{font-variant-numeric:tabular-nums;letter-spacing:.06em;font-weight:500}
html:root body .modal .cs-mf .form-group small.text-muted{display:block;margin-top:5px;font-size:11.5px;color:var(--cs-faint)!important;line-height:1.45}
html:root body .cs-mf-check{display:none;margin-top:4px;font-size:11.5px;font-weight:600;line-height:1.4}
html:root body .cs-mf-check.is-ok{display:block;color:var(--cs-ok)!important}
html:root body .cs-mf-check.is-wait{display:block;color:var(--cs-warn)!important}
/* Sélecteur de banque (select2 avec logos) — remplace la hauteur 50px arrondie du style local */
html:root body .modal .cs-mf .bank-select-wrap{padding-bottom:16px;margin-bottom:18px!important;border-bottom:1px dashed var(--cs-line)}
html:root body .modal .cs-mf .bank-select-wrap .select2-container--default .select2-selection--single{height:48px!important;border:1px solid var(--cs-line-2)!important;border-radius:0!important;background:var(--cs-surface)!important;display:flex;align-items:center}
html:root body .modal .cs-mf .bank-select-wrap .select2-container--default.select2-container--open .select2-selection--single,
html:root body .modal .cs-mf .bank-select-wrap .select2-container--default.select2-container--focus .select2-selection--single{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important}
html:root body .modal .cs-mf .bank-select-wrap .select2-selection__rendered{color:var(--cs-text)!important;padding-inline-start:10px!important}
html:root body .modal .cs-mf .bank-select-wrap .select2-selection__placeholder{color:var(--cs-faint)!important}
html:root body .modal .cs-mf .bank-select-wrap .select2-selection__arrow{height:46px!important}
html:root body .modal .cs-mf .bank-select-wrap .select2-selection__clear{color:var(--cs-faint)!important;font-size:18px;margin-inline-end:6px}
html:root body .cs-mf .bank-sel img,html:root body .bank-opt img{border-radius:0!important;border-color:var(--cs-line)!important;background:#fff!important}
html:root body .cs-mf .bank-sel .bname,html:root body .bank-opt .bname{color:var(--cs-text)!important;font-family:var(--cs-font)}
html:root body .select2-results__option--highlighted .bank-opt .bname{color:#fff!important}
html:root body .modal .cs-mf .select2-dropdown{border:1px solid var(--cs-line-2)!important;border-radius:0!important;background:var(--cs-surface)!important;box-shadow:var(--cp-shadow-pop)}
html:root body .modal .cs-mf .select2-results__group{font-size:11px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.05em;color:var(--cs-muted)!important;padding:8px 10px 4px!important}
html:root body .modal .cs-mf .select2-results__option[aria-selected="true"]{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important}
html:root body .modal .cs-mf .select2-results__option--highlighted[aria-selected]{background:var(--cs-brand)!important;color:#fff!important}
html:root body .modal .cs-mf .select2-search__field{border:1px solid var(--cs-line-2)!important;border-radius:0!important;height:34px;background:var(--cs-surface)!important;color:var(--cs-text)!important}
html:root body .modal .cs-mf .cs-mf-foot{display:flex!important;justify-content:flex-end;align-items:center;gap:8px;padding:13px 22px!important;background:var(--cp-head)!important;border-top:1px solid var(--cs-line)!important}
html:root body .modal .cs-mf .cs-mf-foot::before,html:root body .modal .cs-mf .cs-mf-foot::after{content:none!important}
@media (max-width:640px){
  html:root body .cs-mf-grid{grid-template-columns:1fr}
  html:root body .modal .cs-mf .modal-body{padding:16px 16px 4px!important}
}

/* ═════════════════════════ 24. PROFIT / PERTE (« Le profit d'aujourd'hui » + rapport — .cs-pl-*) ═════════════════════════ */
html:root body .cs-pl-modal .modal-content{background:var(--cs-paper)!important;border:1px solid var(--cs-line)!important;border-radius:14px!important;box-shadow:var(--cp-shadow-pop)!important;font-family:var(--cs-font)!important;color:var(--cs-text)!important;overflow:hidden}
html:root body .cs-pl-modal .modal-dialog{width:min(980px,calc(100vw - 24px))!important;max-width:980px}
html:root body .cs-pl-modal .cs-pl-modal__head{display:flex!important;align-items:flex-start;gap:14px;padding:18px 22px!important;background:var(--cs-surface)!important;background-image:none!important;border-bottom:1px solid var(--cs-line)!important;color:var(--cs-text)!important}
html:root body .cs-pl-modal .cs-pl-modal__head::before,html:root body .cs-pl-modal .cs-pl-modal__head::after{content:none!important;display:none!important}
html:root body .cs-pl-modal__icon{background:var(--cs-ok-soft);color:var(--cs-ok)}
html:root body .cs-pl-modal .modal-body{padding:18px 22px 20px!important;background:var(--cs-paper)!important;color:var(--cs-text)!important}
html:root body .cs-pl-modal .modal-body > .row{margin:0}
html:root body .cs-pl-modal #todays_profit > .text-center{padding:48px 0;color:var(--cs-brand);font-size:22px}
html:root body .cs-pl-modal .cs-pl-modal__foot{display:flex!important;justify-content:flex-end;padding:13px 22px!important;background:var(--cs-surface)!important;border-top:1px solid var(--cs-line)!important}
html:root body .cs-pl-modal .cs-pl-modal__foot::before,html:root body .cs-pl-modal .cs-pl-modal__foot::after{content:none!important}
html:root body .cs-pl-modal .cs-pl{padding:0}
html:root body .cs-pl{font-family:var(--cs-font);color:var(--cs-text);display:flex;flex-direction:column;gap:14px;margin-bottom:6px}
html:root body .cs-pl-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
html:root body .cs-pl-kpi{display:flex;align-items:flex-start;gap:12px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;padding:14px 16px;min-width:0;box-shadow:var(--cp-shadow)}
html:root body .cs-pl-kpi > div{min-width:0;display:flex;flex-direction:column;gap:2px}
html:root body .cs-pl-kpi__ic{flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:var(--cs-brand-soft);color:var(--cs-brand);display:inline-flex;align-items:center;justify-content:center;font-size:14px}
html:root body .cs-pl-kpi.is-ok .cs-pl-kpi__ic{background:var(--cs-ok-soft);color:var(--cs-ok)}
html:root body .cs-pl-kpi.is-err .cs-pl-kpi__ic{background:var(--cs-err-soft);color:var(--cs-err)}
html:root body .cs-pl-kpi__k{font-size:12px;font-weight:500;color:var(--cs-muted)}
html:root body .cs-pl-kpi__v{font-size:20px;font-weight:600;line-height:1.25;color:var(--cs-text);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body .cs-pl-kpi.is-ok .cs-pl-kpi__v{color:var(--cs-ok)}
html:root body .cs-pl-kpi.is-err .cs-pl-kpi__v{color:var(--cs-err)}
html:root body .cs-pl-kpi__s{font-size:11.5px;color:var(--cs-faint)}
html:root body .cs-pl-kpi--main{border-color:var(--cs-ok);box-shadow:inset 0 0 0 1px var(--cs-ok)}
html:root body .cs-pl-kpi--main.is-err{border-color:var(--cs-err);box-shadow:inset 0 0 0 1px var(--cs-err)}
html:root body .cs-pl-kpi--main .cs-pl-kpi__v{font-size:22px}
html:root body .cs-pl-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
html:root body .cs-pl-card{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;overflow:hidden;min-width:0;box-shadow:var(--cp-shadow)}
html:root body .cs-pl-card__head{display:flex;align-items:center;gap:10px;padding:12px 16px;background:var(--cp-head);border-bottom:1px solid var(--cs-line)}
html:root body .cs-pl-card__head h5{margin:0;font-size:13.5px;font-weight:600;color:var(--cs-text);line-height:1.3}
html:root body .cs-pl-card__head small{display:block;font-size:11.5px;color:var(--cs-muted);margin-top:1px}
html:root body .cs-pl-card__ic{flex:0 0 26px;width:26px;height:26px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;font-size:11px}
html:root body .cs-pl-card--out .cs-pl-card__ic{background:var(--cs-err-soft);color:var(--cs-err)}
html:root body .cs-pl-card--in .cs-pl-card__ic{background:var(--cs-ok-soft);color:var(--cs-ok)}
html:root body .cs-pl-card table.table{width:100%;margin:0!important;background:transparent!important;border:0!important;border-collapse:collapse!important;font-size:13px}
html:root body .cs-pl-card table.table > tbody > tr > th,html:root body .cs-pl-card table.table > tbody > tr > td,
html:root body .cs-pl-card table.table > tr > th,html:root body .cs-pl-card table.table > tr > td{background:transparent!important;border:0!important;border-top:1px solid var(--cs-line)!important;padding:9px 16px!important;vertical-align:middle!important;line-height:1.4}
html:root body .cs-pl-card table.table tr:first-child > th,html:root body .cs-pl-card table.table tr:first-child > td{border-top:0!important}
html:root body .cs-pl-card table.table th{font-weight:500!important;color:var(--cs-text)!important;text-align:start}
html:root body .cs-pl-card table.table th small,html:root body .cs-pl-card table.table th .text-muted{display:inline-block;font-size:11.5px;font-weight:400;color:var(--cs-faint)!important;margin-top:1px}
html:root body .cs-pl-card table.table th br{display:block}
html:root body .cs-pl-card table.table td{text-align:end!important;white-space:nowrap;font-weight:600;color:var(--cs-text)!important;font-variant-numeric:tabular-nums}
html:root body .cs-pl-card table.table tr:nth-child(-n+2) > th{color:var(--cs-text)!important}
html:root body .cs-pl-card table.table tr:nth-child(-n+2) > td{color:var(--cs-brand)!important}
html:root body .cs-pl-card table.table tr:hover > th,html:root body .cs-pl-card table.table tr:hover > td{background:var(--cp-row-hover)!important}
html:root body .cs-pl-card table.table td .fa-spin{color:var(--cs-faint)}
html:root body .cs-pl-how{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;overflow:hidden}
html:root body .cs-pl-how > summary{cursor:pointer;list-style:none;padding:12px 16px;font-size:13px;font-weight:500;color:var(--cs-muted);display:flex;align-items:center;gap:8px;user-select:none}
html:root body .cs-pl-how > summary::-webkit-details-marker{display:none}
html:root body .cs-pl-how > summary::after{content:"";margin-inline-start:auto;width:7px;height:7px;border-right:2px solid var(--cs-faint);border-bottom:2px solid var(--cs-faint);transform:rotate(45deg);transition:transform .15s}
html:root body .cs-pl-how[open] > summary::after{transform:rotate(-135deg)}
html:root body .cs-pl-how > summary:hover{color:var(--cs-text)}
html:root body .cs-pl-how > summary i{color:var(--cs-brand)}
html:root body .cs-pl-formula{margin:0;padding:0 16px 6px;border-top:1px solid var(--cs-line)}
html:root body .cs-pl-formula__row{padding:12px 0;border-top:1px dashed var(--cs-line)}
html:root body .cs-pl-formula__row:first-child{border-top:0}
html:root body .cs-pl-formula dt{display:flex;justify-content:space-between;gap:12px;font-size:13px;font-weight:600;color:var(--cs-text)}
html:root body .cs-pl-formula dt .display_currency{font-variant-numeric:tabular-nums;white-space:nowrap}
html:root body .cs-pl-formula dd{margin:4px 0 0;font-size:12px;line-height:1.65;color:var(--cs-muted)}
html:root body .cs-pl-plus{color:var(--cs-ok);font-weight:700}
html:root body .cs-pl-minus{color:var(--cs-err);font-weight:700}
@media (max-width:860px){
  html:root body .cs-pl-kpis{grid-template-columns:1fr}
  html:root body .cs-pl-cols{grid-template-columns:1fr}
}
@media (max-width:640px){
  html:root body .cs-pl-modal .modal-body{padding:14px 12px!important}
  html:root body .cs-pl-modal .cs-pl-modal__head{padding:14px 16px!important}
}
@media print{
  html:root body .cs-pl-how{display:none}
  html:root body .cs-pl-kpi,html:root body .cs-pl-card{box-shadow:none;break-inside:avoid}
}


/* ═════════════════════════ 25. FORMULAIRES ET FENÊTRES — TOUT LE PROJET (body.cs-forms) ═════════════════════════
   body.cs-forms est posé par layouts/app.blade.php sur toutes les pages sauf la caisse (POS), l'éditeur de modèles
   et l'écran client. Les sections 1–4, 6, 7, 10–15 s'y appliquent ; ici, les compléments « fiche compte bancaire ». */
html body.cs-forms .content,html body.cs-forms .modal{font-family:var(--cs-font)}
/* Fenêtres : en-tête clair, titre puis croix à droite */
html body.cs-forms .modal-header{display:flex!important;align-items:center;gap:12px;background-image:none!important;color:var(--cs-text)!important;border-radius:0!important}
html body.cs-forms .modal-header::before,html body.cs-forms .modal-header::after{content:none!important;display:none!important}
html body.cs-forms .modal-header > *{order:1}
html body.cs-forms .modal-header > .modal-title{flex:1 1 auto;min-width:0;margin:0!important;line-height:1.35!important;font-family:var(--cs-font)!important}
html body.cs-forms .modal-header > .close{order:5;float:none!important;margin:-4px -6px -4px auto!important;width:34px;height:34px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:transparent!important;line-height:1!important;padding:0!important}
html body.cs-forms .modal-header > .close:hover{background:var(--cs-paper)!important}
html body.cs-forms .modal-header .modal-title small{display:block;margin-top:3px;font-size:12.5px;font-weight:400;color:var(--cs-muted)}
html body.cs-forms .modal-body{background:var(--cs-surface)!important;color:var(--cs-text)!important}
html body.cs-forms .modal-footer::before,html body.cs-forms .modal-footer::after{content:none!important}
html body.cs-forms .modal-footer{align-items:center;flex-wrap:wrap}
html body.cs-forms .modal-body h4,html body.cs-forms .modal-body h3.box-title,html body.cs-forms .content form h4{font-family:var(--cs-font)!important;font-size:14.5px!important;font-weight:600!important;color:var(--cs-text)!important;margin:6px 0 12px!important}
html body.cs-forms .modal-body hr,html body.cs-forms .content form hr{border:0!important;border-top:1px solid var(--cs-line)!important;margin:14px 0!important}
html body.cs-forms .modal-body .well,html body.cs-forms .content form .well{background:var(--cp-head)!important;border:1px solid var(--cs-line)!important;border-radius:10px!important;box-shadow:none!important;color:var(--cs-text)!important}
html body.cs-forms .modal-body .form-group{margin-bottom:16px}
html body.cs-forms .modal .form-group:has(> .checkbox),html body.cs-forms .modal .form-group:has(> label > .icheckbox_square-blue){margin-bottom:12px}
/* Champs : même rendu que la fiche compte bancaire */
html body.cs-forms .content .form-control,html body.cs-forms .modal .form-control{padding:6px 11px!important;height:38px}
html body.cs-forms .content select.form-control,html body.cs-forms .modal select.form-control{padding-inline-end:28px!important}
html body.cs-forms .content select[multiple].form-control,html body.cs-forms .modal select[multiple].form-control,
html body.cs-forms .content textarea.form-control,html body.cs-forms .modal textarea.form-control{height:auto!important;min-height:80px;resize:vertical}
html body.cs-forms .content select[multiple].form-control,html body.cs-forms .modal select[multiple].form-control{min-height:96px}
html body.cs-forms .content .input-sm.form-control,html body.cs-forms .modal .input-sm.form-control{height:32px!important;font-size:13px!important;padding:4px 9px!important}
html body.cs-forms .modal .form-control[readonly]{background-color:var(--cs-surface)!important}
html body.cs-forms .modal .form-control[disabled]{background-color:var(--cp-head)!important;color:var(--cs-muted)!important;cursor:not-allowed}
html body.cs-forms .modal label.error,html body.cs-forms .modal .help-block.error{color:var(--cs-err)!important;font-size:12px!important;font-weight:500!important;margin-top:4px!important}
html body.cs-forms .modal .form-control.error,html body.cs-forms .modal .has-error .form-control{border-color:var(--cs-err)!important}
html body.cs-forms .content .form-group > small.text-muted,html body.cs-forms .modal .form-group > small.text-muted,
html body.cs-forms .content .form-group > .help-block,html body.cs-forms .modal .form-group > .help-block,
html body.cs-forms .modal .help-block{display:block;margin-top:5px;font-size:11.5px!important;color:var(--cs-faint)!important;line-height:1.45}
html body.cs-forms .content .control-label,html body.cs-forms .modal .control-label{font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important}
html body.cs-forms .content .checkbox label,html body.cs-forms .content .radio label,html body.cs-forms .modal .checkbox label,html body.cs-forms .modal .radio label{font-weight:400!important;display:inline-flex;align-items:center;gap:8px}
html body.cs-forms .content input[type="checkbox"],html body.cs-forms .content input[type="radio"],
html body.cs-forms .modal input[type="checkbox"],html body.cs-forms .modal input[type="radio"]{accent-color:var(--cs-brand)}
html body.cs-forms .content fieldset,html body.cs-forms .modal fieldset{border:1px solid var(--cs-line)!important;border-radius:10px;padding:12px 14px 2px;margin-bottom:16px}
html body.cs-forms .content legend,html body.cs-forms .modal legend{width:auto;padding:0 6px;margin:0;border:0!important;font-size:12px;font-weight:600;color:var(--cs-muted);text-transform:uppercase;letter-spacing:.04em}
/* Groupes d'entrée dans les fenêtres : bloc net comme dans les pages */
html body.cs-forms .modal .input-group{display:flex!important;align-items:stretch;flex-wrap:nowrap;width:100%}
html body.cs-forms .modal .input-group > .form-control,html body.cs-forms .modal .input-group > .select2-container{flex:1 1 auto;width:1%!important;min-width:0;float:none!important}
html body.cs-forms .modal .input-group > .input-group-addon,html body.cs-forms .modal .input-group > .input-group-btn{display:flex!important;align-items:center;justify-content:center;width:auto!important;flex:0 0 auto;float:none!important}
html body.cs-forms .modal .input-group > .input-group-addon{min-height:38px;padding:0 12px!important;background:var(--cp-head)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-muted)!important}
html body.cs-forms .modal .input-group > :not(:first-child){margin-left:-1px!important}
html body.cs-forms .modal .input-group > .input-group-btn > .btn{min-height:38px;height:auto!important;margin:0!important;border:1px solid var(--cs-line-2)!important;background:var(--cp-head)!important;color:var(--cs-brand)!important;box-shadow:none!important;border-radius:0!important}
/* Boutons Bootstrap (btn-*) alignés sur la charte, dans les pages et les fenêtres */
html body.cs-forms .content .btn,html body.cs-forms .modal .btn{font-family:var(--cs-font)!important;font-weight:600;text-transform:none!important;letter-spacing:0;box-shadow:none!important;background-image:none!important}
html body.cs-forms .content .btn-primary,html body.cs-forms .modal .btn-primary{background-color:var(--cs-brand)!important;border-color:var(--cs-brand)!important;color:#fff!important}
html body.cs-forms .content .btn-primary:hover,html body.cs-forms .modal .btn-primary:hover{background-color:var(--cs-brand-hover)!important;border-color:var(--cs-brand-hover)!important}
html body.cs-forms .content .btn-success,html body.cs-forms .modal .btn-success{background-color:var(--cs-ok)!important;border-color:var(--cs-ok)!important;color:#fff!important}
html body.cs-forms .content .btn-danger,html body.cs-forms .modal .btn-danger{background-color:var(--cs-err)!important;border-color:var(--cs-err)!important;color:#fff!important}
html body.cs-forms .content .btn-warning,html body.cs-forms .modal .btn-warning{background-color:var(--cs-warn)!important;border-color:var(--cs-warn)!important;color:#fff!important}
html body.cs-forms .content .btn-info,html body.cs-forms .modal .btn-info{background-color:var(--cs-brand-soft)!important;border-color:transparent!important;color:var(--cs-brand)!important}
html body.cs-forms .modal .btn-default{background-color:var(--cs-surface)!important;border-color:var(--cs-line-2)!important;color:var(--cs-text)!important}
html body.cs-forms .modal .btn-default:hover{background-color:var(--cp-head)!important;border-color:var(--cs-brand)!important;color:var(--cs-brand)!important}
html body.cs-forms .modal-footer .btn:not(.btn-xs):not(.btn-sm){height:38px;padding:0 16px;border-radius:8px!important;font-size:13.5px;display:inline-flex;align-items:center;gap:8px;margin:0!important}
html body.cs-forms .modal-footer .btn-primary,html body.cs-forms .modal-footer .btn-success{order:2}
html body.cs-forms .modal-footer .tw-dw-btn-neutral:hover,html body.cs-forms .modal-footer .tw-dw-btn-default:hover{background:var(--cs-paper)!important;border-color:var(--cs-faint)!important;color:var(--cs-text)!important}
html body.cs-forms .modal-footer .tw-dw-btn-outline{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important}
html body.cs-forms .modal-footer .tw-dw-btn-error,html body.cs-forms .modal-footer .tw-dw-btn-danger{background:var(--cs-err)!important;border-color:var(--cs-err)!important;color:#fff!important}
/* Boutons d'enregistrement en bas des pages de formulaire */
html body.cs-forms .content form .tw-dw-btn-primary,html body.cs-forms .content form .tw-dw-btn-success{height:40px!important;min-height:40px!important;padding:0 20px!important;font-size:14px!important}
html body.cs-forms .content form .tw-dw-btn-success{background:var(--cs-ok)!important;border:1px solid var(--cs-ok)!important;color:#fff!important;border-radius:8px!important;font-family:var(--cs-font)!important;font-weight:600!important}
/* Mode sombre */
html[data-theme="dark"] body.cs-forms .modal .input-group > .input-group-addon,html[data-theme="dark"] body.cs-forms .modal .input-group > .input-group-btn > .btn{background:var(--cp-head)!important}
html[data-theme="dark"] body.cs-forms .modal-body{background:var(--cs-surface)!important}
html[data-theme="dark"] body.cs-forms .modal-content{background:var(--cs-surface)!important}
html[data-theme="dark"] body.cs-forms .modal small.text-muted,html[data-theme="dark"] body.cs-forms .content .form-group > small.text-muted{color:var(--cs-faint)!important}
@media (max-width:640px){
  html body.cs-forms .modal-footer{padding:12px 14px!important}
  html body.cs-forms .modal-footer .tw-dw-btn,html body.cs-forms .modal-footer .btn{flex:1 1 auto;justify-content:center}
}

/* Quantité dans les lignes de document : champ et boutons − / + à la même hauteur */
html body.cs-forms .content #pos_table .input-group > .input-group-btn > .btn,html body.cs-forms .content #pos_table .input-group > .input-group-addon,
html body.cs-forms .content #purchase_entry_table .input-group > .input-group-btn > .btn,html body.cs-forms .content #purchase_entry_table .input-group > .input-group-addon{min-height:34px!important;height:34px!important}
html body.cs-forms .content #pos_table .input-group > .form-control,html body.cs-forms .content #purchase_entry_table .input-group > .form-control{height:34px!important;align-self:stretch}


/* ═════════════════════════ 26. FICHE PRODUIT · FISCALITÉ (TVA + FODEC — .cs-tax) ═════════════════════════
   product/create, product/edit, fenêtre d'ajout rapide. Les champs d'origine (radios tva_base_radio, case fodec_id,
   select#tax) restent en place : seule la présentation change. */
html:root body .cs-tax{margin:0 0 18px!important;font-family:var(--cs-font)}
html:root body .cs-tax .tva-section,html:root body .cs-tax .fodec-section{margin:0 0 16px!important}
html:root body .cs-tax .fodec-control{margin:0!important}
html:root body .cs-tax-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:0 0 7px}
html:root body .cs-tax .section-label{display:inline!important;margin:0!important;font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important}
html:root body .cs-tax-head small{font-size:12px;color:var(--cs-faint)}
/* Taux de TVA : tuiles de choix (même langage que HT / TTC) */
html:root body .cs-tax .tva-segmented{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px!important;margin:0!important}
html:root body .cs-tax .tva-segmented input[type="radio"]{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none;display:block!important}
html:root body .cs-tax .tva-segmented label{position:relative;display:flex!important;align-items:center;justify-content:center;gap:6px;min-width:0!important;height:44px;margin:0!important;padding:0 12px!important;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;border-radius:10px!important;box-shadow:none!important;cursor:pointer;
  color:var(--cs-text)!important;font-family:var(--cs-font)!important;font-weight:600!important;transition:border-color .15s,background-color .15s,box-shadow .15s}
html:root body .cs-tax .tva-segmented label .cs-tax-v{font-size:16px;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
html:root body .cs-tax .tva-segmented label .cs-tax-u{font-size:13px;color:var(--cs-muted);font-weight:500}
html:root body .cs-tax .tva-segmented label small{font-size:11px;font-weight:500;color:var(--cs-faint);margin-inline-start:2px}
html:root body .cs-tax .tva-segmented label:hover{border-color:var(--cs-brand)!important;background:var(--cs-surface)!important}
html:root body .cs-tax .tva-segmented input[type="radio"]:checked + label{background:var(--cs-brand-soft)!important;border-color:var(--cs-brand)!important;
  box-shadow:inset 0 0 0 1px var(--cs-brand)!important;color:var(--cs-brand)!important}
html:root body .cs-tax .tva-segmented input[type="radio"]:checked + label .cs-tax-u,html:root body .cs-tax .tva-segmented input[type="radio"]:checked + label small{color:var(--cs-brand)}
html:root body .cs-tax .tva-segmented input[type="radio"]:checked + label::after{content:"";position:absolute;top:6px;right:7px;width:14px;height:14px;border-radius:50%;
  background:var(--cs-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.5'/%3E%3C/svg%3E") center/10px no-repeat}
html:root body .cs-tax .tva-segmented input[type="radio"]:focus-visible + label{box-shadow:var(--cp-ring)!important;border-color:var(--cs-brand)!important}
/* Taxe supplémentaire (FODEC) : ligne avec interrupteur */
html:root body .cs-tax .fodec-control,html:root body .cs-tax-opt{position:relative;display:block!important;width:100%!important;float:none!important}
html:root body .cs-tax-opt > input[type="checkbox"]{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important;pointer-events:none;margin:0!important}
html:root body .cs-tax-opt > label{display:flex!important;align-items:center;gap:12px;margin:0!important;padding:11px 14px!important;cursor:pointer;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;border-radius:10px!important;color:var(--cs-text)!important;font-weight:400!important;
  transition:border-color .15s,background-color .15s,box-shadow .15s}
html:root body .cs-tax-opt > label:hover{border-color:var(--cs-brand)!important}
/* le thème dessine une case à cocher en ::before des libellés : inutile ici (interrupteur) */
html:root body .cs-tax-opt > label::before,html:root body .cs-tax-opt > label::after,html:root body .cs-tax .tva-segmented label::before{content:none!important;display:none!important}
html:root body .cs-tax-switch{flex:0 0 34px;width:34px;height:20px;border-radius:999px;background:var(--cs-line-2);position:relative;transition:background-color .18s}
html:root body .cs-tax-switch::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(14,42,92,.25);transition:transform .18s}
html:root body .cs-tax-opt__txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;line-height:1.35}
html:root body .cs-tax-opt__txt b{font-size:13.5px;font-weight:600;color:var(--cs-text)}
html:root body .cs-tax-opt__txt small{font-size:12px;color:var(--cs-muted)}
html:root body .cs-tax-opt__rate{flex:0 0 auto;height:26px;padding:0 10px;border-radius:999px;background:var(--cp-head);border:1px solid var(--cs-line);display:inline-flex;align-items:center;
  font-size:13px;font-weight:600;color:var(--cs-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
html:root body .cs-tax-opt > input:checked + label{background:var(--cs-brand-soft)!important;border-color:var(--cs-brand)!important;box-shadow:inset 0 0 0 1px var(--cs-brand)!important}
html:root body .cs-tax-opt > input:checked + label .cs-tax-switch{background:var(--cs-brand)}
html:root body .cs-tax-opt > input:checked + label .cs-tax-switch::after{transform:translateX(14px)}
html:root body .cs-tax-opt > input:checked + label .cs-tax-opt__rate{background:var(--cs-brand);border-color:var(--cs-brand);color:#fff}
html:root body .cs-tax-opt > input:focus-visible + label{box-shadow:var(--cp-ring)!important}
/* Récapitulatif du taux appliqué */
html:root body .cs-tax-sum{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;margin-top:10px;font-size:12.5px;color:var(--cs-muted)}
html:root body .cs-tax-sum:empty{display:none}
html:root body .cs-tax-sum b{color:var(--cs-text);font-weight:600;font-variant-numeric:tabular-nums}
html:root body .cs-tax-sum .cs-tax-eff{margin-inline-start:auto;display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:var(--cs-ok-soft);color:var(--cs-ok);font-weight:600;font-variant-numeric:tabular-nums}
html:root body .cs-tax .alert{border-radius:10px!important}
html[data-theme="dark"] body .cs-tax-switch::after{background:#E8EEF8}
@media (max-width:640px){
  html:root body .cs-tax .tva-segmented{grid-template-columns:repeat(2,minmax(0,1fr))}
  html:root body .cs-tax-opt__txt small{display:none}
  html:root body .cs-tax-sum .cs-tax-eff{margin-inline-start:0}
}


/* ═════════════════════════ 27. FICHE RÔLE (role/create, role/edit — cs-role.js) ═════════════════════════ */
html:root body .cs-role-form{font-family:var(--cs-font);color:var(--cs-text)}
html:root body .cs-role-form .cs-role-id .form-control{max-width:520px}
html:root body .cs-role-form .cs-role-hr,html:root body .cs-role-form .cs-perm__hr{display:none!important}
/* Barre d'outils */
html:root body .cs-role-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px 16px;margin:4px 0 16px;padding-top:16px;border-top:1px solid var(--cs-line)}
html:root body .cs-role-tools__title{flex:1 1 320px;min-width:0}
html:root body .cs-role-tools__title h4{margin:0 0 3px!important;font-size:16px!important;font-weight:600!important;color:var(--cs-text)!important}
html:root body .cs-role-tools__title small{display:block;font-size:12.5px;color:var(--cs-muted);line-height:1.45}
html:root body .cs-role-search{position:relative;flex:0 1 320px;min-width:220px}
html:root body .cs-role-search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--cs-faint);font-size:13px;pointer-events:none}
html:root body .cs-role-form .cs-role-search .form-control{padding-left:34px!important;height:38px}
html:root body .cs-role-total{display:inline-flex;align-items:center;gap:4px;height:30px;padding:0 12px;border-radius:999px;background:var(--cs-brand-soft);color:var(--cs-brand);font-size:12.5px;font-weight:500;white-space:nowrap;font-variant-numeric:tabular-nums}
html:root body .cs-role-total:empty{display:none}
html:root body .cs-role-total b{font-weight:700}
/* Sommaire + modules */
html:root body .cs-role-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}
html:root body .cs-role-nav{position:sticky;top:16px;max-height:calc(100vh - 190px);overflow:auto;border:1px solid var(--cs-line);border-radius:12px;background:var(--cs-surface);padding:8px;scrollbar-width:thin}
html:root body .cs-role-nav__head{padding:6px 10px 8px;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--cs-faint)}
html:root body .cs-role-nav ul{list-style:none;margin:0;padding:0}
html:root body .cs-role-nav a{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:8px;font-size:13px;color:var(--cs-text)!important;text-decoration:none!important;line-height:1.3}
html:root body .cs-role-nav a::before{content:"";flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:var(--cs-line-2)}
html:root body .cs-role-nav li.is-partial a::before{background:var(--cs-brand)}
html:root body .cs-role-nav li.is-full a::before{background:var(--cs-ok)}
html:root body .cs-role-nav a:hover{background:var(--cp-head)}
html:root body .cs-role-nav li.is-current a{background:var(--cs-brand-soft);color:var(--cs-brand)!important;font-weight:500}
html:root body .cs-role-nav__t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html:root body .cs-role-nav__n{font-size:11.5px;color:var(--cs-muted);font-variant-numeric:tabular-nums}
html:root body .cs-role-groups{display:flex;flex-direction:column;gap:12px;min-width:0}
/* Carte de module */
html:root body .cs-role-form .row.cs-perm{margin:0!important;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;overflow:hidden;scroll-margin-top:90px;transition:box-shadow .3s,border-color .3s}
html:root body .cs-role-form .row.cs-perm::before,html:root body .cs-role-form .row.cs-perm::after{content:none!important}
html:root body .cs-role-form .row.cs-perm.is-flash{border-color:var(--cs-brand);box-shadow:var(--cp-ring)}
html:root body .cs-perm__head{display:flex;align-items:center;gap:10px;padding:11px 16px;background:var(--cp-head);border-bottom:1px solid var(--cs-line)}
html:root body .cs-role-form .cs-perm__title{flex:1 1 auto;min-width:0;margin:0!important;font-size:14.5px!important;font-weight:600!important;color:var(--cs-text)!important;line-height:1.35!important}
html:root body .cs-perm__title i{font-size:12px;color:var(--cs-faint);margin-inline-start:4px}
html:root body .cs-perm__count{flex:0 0 auto;height:22px;padding:0 9px;border-radius:999px;display:inline-flex;align-items:center;background:var(--cs-surface);border:1px solid var(--cs-line);font-size:11.5px;font-weight:600;color:var(--cs-muted);font-variant-numeric:tabular-nums}
html:root body .cs-perm.is-partial .cs-perm__count{background:var(--cs-brand-soft);border-color:transparent;color:var(--cs-brand)}
html:root body .cs-perm.is-full .cs-perm__count{background:var(--cs-ok-soft);border-color:transparent;color:var(--cs-ok)}
html:root body .cs-role-form label.cs-perm__all{flex:0 0 auto;display:inline-flex!important;align-items:center;gap:7px;margin:0!important;padding:4px 10px 4px 6px;border:1px solid var(--cs-line-2);border-radius:8px;background:var(--cs-surface);cursor:pointer;font-size:12.5px!important;font-weight:500!important;color:var(--cs-text)!important;white-space:nowrap}
html:root body .cs-role-form label.cs-perm__all:hover{border-color:var(--cs-brand)}
html:root body .cs-role-form .cs-perm__body{float:none!important;width:auto!important;padding:10px 12px 12px!important;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:4px 8px}
html:root body .cs-role-form .cs-perm__body .radio-group{display:contents}
html:root body .cs-role-form .cs-perm__item{float:none!important;width:auto!important;padding:0!important;margin:0!important;min-width:0}
html:root body .cs-role-form .cs-perm__item .checkbox,html:root body .cs-role-form .cs-perm__item .radio{margin:0!important;display:flex;align-items:center;gap:4px}
html:root body .cs-role-form .cs-perm__item label{display:flex!important;align-items:flex-start;gap:10px;width:100%;margin:0!important;padding:8px 10px!important;border:1px solid transparent;border-radius:8px;cursor:pointer;
  font-size:13px!important;font-weight:400!important;line-height:1.4!important;color:var(--cs-text)!important;transition:background-color .12s,border-color .12s}
html:root body .cs-role-form .cs-perm__item label > div[class^="icheckbox"],html:root body .cs-role-form .cs-perm__item label > div[class^="iradio"]{flex:0 0 auto;margin-top:-1px}
html:root body .cs-role-form .cs-perm__item label:hover{background:var(--cp-head)}
html:root body .cs-role-form .cs-perm__item.is-on label{background:var(--cs-brand-soft);border-color:transparent}
html:root body .cs-role-form .cs-perm__item .checkbox > i,html:root body .cs-role-form .cs-perm__item .checkbox > span[data-toggle]{color:var(--cs-faint);font-size:12px}
/* Choix exclusifs (boutons radio) */
html:root body .cs-perm__choice{grid-column:1/-1;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:4px 8px;padding:6px 6px 6px;margin:2px 0 4px;border:1px dashed var(--cs-line-2);border-radius:10px;background:transparent}
html:root body .cs-perm__choice-k{grid-column:1/-1;padding:2px 6px 0;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--cs-faint)}
html:root body .cs-role-form .cs-perm__sub{grid-column:1/-1;float:none!important;width:auto!important;padding:8px 10px 2px!important;margin:4px 0 0!important;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--cs-muted)}
html:root body .cs-role-form .cs-perm__sub p,html:root body .cs-role-form .cs-perm__sub b{margin:0!important;color:inherit!important;font-weight:inherit}
/* Recherche */
html:root body .cs-role-form .is-filtered{display:none!important}
html:root body .cs-role-empty{padding:36px 16px;text-align:center;color:var(--cs-faint);font-size:13.5px;border:1px dashed var(--cs-line-2);border-radius:12px}
html:root body .cs-role-empty i{margin-inline-end:6px}
/* Barre d'enregistrement collante */
html:root body .cs-role-actions{position:sticky;bottom:0;z-index:20;display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:18px -12px -12px;padding:12px 16px;background:var(--cs-surface);border-top:1px solid var(--cs-line);box-shadow:0 -8px 20px rgba(14,42,92,.06);border-radius:0 0 12px 12px}
html:root body .cs-role-actions__sum{margin-inline-end:auto;font-size:13px;color:var(--cs-muted)}
html:root body .cs-role-actions__sum b{color:var(--cs-text);font-weight:600}
html:root body .cs-role-actions .tw-dw-btn{height:40px!important;min-height:40px!important;padding:0 18px!important;border-radius:8px!important;font-family:var(--cs-font)!important;font-weight:600!important;display:inline-flex!important;align-items:center;gap:8px;text-transform:none!important}
html:root body .cs-role-actions .tw-dw-btn-outline{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important}
html:root body .cs-role-actions .tw-dw-btn-outline:hover{background:var(--cs-paper)!important}
html:root body .cs-role-actions .tw-dw-btn-primary{background:var(--cs-brand)!important;border:1px solid var(--cs-brand)!important;color:#fff!important}
html:root body .cs-role-actions .tw-dw-btn-primary:hover{background:var(--cs-brand-hover)!important}
html[data-theme="dark"] body .cs-role-actions{box-shadow:0 -8px 24px rgba(0,0,0,.35)}
@media (max-width:991px){
  html:root body .cs-role-layout{grid-template-columns:1fr}
  html:root body .cs-role-nav{position:sticky;top:0;z-index:15;max-height:none;padding:6px}
  html:root body .cs-role-nav__head{display:none}
  html:root body .cs-role-nav ul{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
  html:root body .cs-role-nav li{flex:0 0 auto}
  html:root body .cs-role-nav__t{white-space:nowrap}
}
@media (max-width:640px){
  html:root body .cs-perm__head{flex-wrap:wrap}
  html:root body .cs-role-form .cs-perm__body,html:root body .cs-perm__choice{grid-template-columns:1fr}
  html:root body .cs-role-actions{flex-wrap:wrap}
  html:root body .cs-role-actions__sum{flex-basis:100%;margin:0 0 2px}
  html:root body .cs-role-actions .tw-dw-btn{white-space:nowrap}
  html:root body .cs-role-actions .tw-dw-btn{flex:1;justify-content:center}
}


/* ═════════════════════════ 28. FICHE UTILISATEUR (manage_user/show + user/show_details — .cs-usr-*) ═════════════════════════ */
html:root body .cs-usr-header{display:flex!important;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:12px 20px}
html:root body .cs-usr-switch{flex:0 1 340px;min-width:240px}
html:root body .cs-usr{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start;font-family:var(--cs-font);color:var(--cs-text)}
/* Carte profil */
html:root body .cs-usr-card{position:sticky;top:16px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:14px;padding:24px 20px 20px;box-shadow:var(--cp-shadow);text-align:center}
html:root body .cs-usr-avatar{position:relative;width:88px;height:88px;margin:0 auto 14px;border-radius:50%;background:var(--cs-brand-soft);color:var(--cs-brand);display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:600;letter-spacing:.02em;box-shadow:0 0 0 4px var(--cs-surface),0 0 0 5px var(--cs-line);overflow:hidden}
html:root body .cs-usr-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html:root body .cs-usr-name{margin:0 0 8px!important;font-size:19px!important;font-weight:600!important;color:var(--cs-text)!important;line-height:1.3!important;word-break:break-word}
html:root body .cs-usr-chips{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin-bottom:18px}
html:root body .cs-usr-chip{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--cs-brand-soft);color:var(--cs-brand)}
html:root body .cs-usr-chip i{font-size:10px}
html:root body .cs-usr-chip.is-ok{background:var(--cs-ok-soft);color:var(--cs-ok)} html:root body .cs-usr-chip.is-ok i{font-size:7px}
html:root body .cs-usr-chip.is-err{background:var(--cs-err-soft);color:var(--cs-err)} html:root body .cs-usr-chip.is-err i{font-size:7px}
html:root body .cs-usr-facts{margin:0 0 18px;text-align:start;border-top:1px solid var(--cs-line)}
html:root body .cs-usr-facts > div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 0;border-bottom:1px solid var(--cs-line)}
html:root body .cs-usr-facts dt{font-size:12.5px;font-weight:500;color:var(--cs-muted);flex:0 0 auto;max-width:48%}
html:root body .cs-usr-facts dd{margin:0;font-size:13px;font-weight:500;color:var(--cs-text);text-align:end;min-width:0;word-break:break-word}
html:root body .cs-usr-facts dd a{color:var(--cs-brand)}
html:root body .cs-usr-mono{font-variant-numeric:tabular-nums;letter-spacing:.01em}
html:root body .cs-usr .cs-usr-edit{width:100%;justify-content:center;height:40px!important;min-height:40px!important;border-radius:8px!important;display:inline-flex!important;align-items:center;gap:8px;font-weight:600!important;background:var(--cs-brand)!important;border:1px solid var(--cs-brand)!important}
html:root body .cs-usr .cs-usr-edit:hover{background:var(--cs-brand-hover)!important}
/* Onglets */
html:root body .cs-usr-main .nav-tabs-custom{background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:14px!important;box-shadow:var(--cp-shadow)!important;margin:0!important;overflow:hidden}
html:root body .cs-usr-main .nav-tabs-custom > .nav-tabs{padding:0 12px!important}
html:root body .cs-usr-main .nav-tabs-custom > .tab-content{padding:18px!important;background:transparent!important}
/* Sections de détails */
html:root body .cs-usr-secs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
html:root body .cs-usr-sec{border:1px solid var(--cs-line);border-radius:12px;background:var(--cs-surface);overflow:hidden;min-width:0}
html:root body .cs-usr-sec--wide{grid-column:1/-1}
html:root body .cs-usr-sec > header{display:flex;align-items:center;gap:9px;padding:10px 14px;background:var(--cp-head);border-bottom:1px solid var(--cs-line);font-size:13px;font-weight:600;color:var(--cs-text)}
html:root body .cs-usr-sec > header i{color:var(--cs-brand);font-size:12.5px;width:14px;text-align:center}
html:root body .cs-usr-sec__n{margin-inline-start:auto;font-size:11.5px;font-weight:600;color:var(--cs-faint);font-variant-numeric:tabular-nums}
html:root body .cs-usr-sec dl{margin:0;padding:4px 14px}
html:root body .cs-usr-sec dl > div{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:8px 0;border-bottom:1px dashed var(--cs-line)}
html:root body .cs-usr-sec dl > div:last-child{border-bottom:0}
html:root body .cs-usr-sec dt{font-size:12.5px;font-weight:500;color:var(--cs-muted);flex:0 0 auto;max-width:55%}
html:root body .cs-usr-sec dd{margin:0;font-size:13px;font-weight:500;color:var(--cs-text);text-align:end;min-width:0;word-break:break-word}
html:root body .cs-usr-sec dd.is-empty{color:var(--cs-faint);font-weight:400}
html:root body .cs-usr-sec dd a{color:var(--cs-brand)}
html:root body .cs-usr-sec .cs-usr-dl2,html:root body .cs-usr-sec .cs-usr-dl3{display:grid;gap:0 24px;padding:6px 14px 10px}
html:root body .cs-usr-sec .cs-usr-dl2{grid-template-columns:repeat(2,minmax(0,1fr))}
html:root body .cs-usr-sec .cs-usr-dl3{grid-template-columns:repeat(3,minmax(0,1fr))}
html:root body .cs-usr-sec .cs-usr-dl2 > div,html:root body .cs-usr-sec .cs-usr-dl3 > div{display:block;border-bottom:0;padding:8px 0}
html:root body .cs-usr-sec .cs-usr-dl2 dt,html:root body .cs-usr-sec .cs-usr-dl3 dt{max-width:none;margin-bottom:3px}
html:root body .cs-usr-sec .cs-usr-dl2 dd,html:root body .cs-usr-sec .cs-usr-dl3 dd{text-align:start;line-height:1.5}
html:root body .cs-usr-partials{padding:14px}
@media (max-width:1199px){ html:root body .cs-usr{grid-template-columns:280px minmax(0,1fr)} html:root body .cs-usr-secs{grid-template-columns:1fr} }
@media (max-width:860px){
  html:root body .cs-usr{grid-template-columns:1fr}
  html:root body .cs-usr-card{position:static}
  html:root body .cs-usr-sec .cs-usr-dl3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){ html:root body .cs-usr-sec .cs-usr-dl2,html:root body .cs-usr-sec .cs-usr-dl3{grid-template-columns:1fr} }

/* ═════════════════════════ 29. MODÈLES DE NOTIFICATION (notification_template — .cs-nt-*) ═════════════════════════ */
html:root body .cs-nt{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start;font-family:var(--cs-font);color:var(--cs-text)}
html:root body .cs-nt-nav{position:sticky;top:16px;max-height:calc(100vh - 170px);overflow:auto;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:14px;padding:10px;box-shadow:var(--cp-shadow);scrollbar-width:thin}
html:root body .cs-nt-search{position:relative;margin-bottom:6px}
html:root body .cs-nt-search i{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--cs-faint);font-size:12.5px;pointer-events:none}
html:root body .cs-nt-form .cs-nt-search .form-control{padding-left:32px!important;height:36px}
html:root body .cs-nt-nav__g{display:flex;align-items:center;gap:7px;padding:12px 8px 6px;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--cs-faint)}
html:root body .cs-nt-nav__g i{font-size:11px}
html:root body .cs-nt-nav ul{list-style:none;margin:0;padding:0}
html:root body .cs-nt-nav a{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;font-size:13px;color:var(--cs-text)!important;text-decoration:none!important;line-height:1.3}
html:root body .cs-nt-nav a:hover{background:var(--cp-head)}
html:root body .cs-nt-nav a.is-on{background:var(--cs-brand-soft);color:var(--cs-brand)!important;font-weight:500}
html:root body .cs-nt-nav__t{flex:1;min-width:0}
html:root body .cs-nt-nav__auto{font-size:11px;color:var(--cs-warn)}
html:root body .cs-nt-main{min-width:0}
html:root body .cs-nt-pane{display:none;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:14px;box-shadow:var(--cp-shadow);overflow:hidden}
html:root body .cs-nt-pane.is-open{display:block}
html:root body .cs-nt-pane__head{display:flex;align-items:flex-start;gap:14px;padding:18px 20px 14px;border-bottom:1px solid var(--cs-line)}
html:root body .cs-nt-pane__id{flex:1;min-width:0}
html:root body .cs-nt-pane__group{display:block;font-size:12px;font-weight:600;color:var(--cs-brand);margin-bottom:4px}
html:root body .cs-nt-pane__id h3{margin:0!important;font-size:18px!important;font-weight:600!important;color:var(--cs-text)!important;line-height:1.3!important}
html:root body .cs-nt-pane__id p{margin:4px 0 0;font-size:12.5px;color:var(--cs-muted)}
/* Envoi automatique */
html:root body .cs-nt-auto{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;margin:14px 20px 0;padding:10px 12px;border:1px solid var(--cs-line);border-radius:10px;background:var(--cp-head)}
html:root body .cs-nt-auto__k{font-size:12.5px;font-weight:600;color:var(--cs-text);margin-inline-end:4px}
html:root body .cs-nt-auto__k i{color:var(--cs-warn);margin-inline-end:4px}
html:root body .cs-nt-form label.cs-nt-auto__opt{display:inline-flex!important;align-items:center;gap:7px;margin:0!important;padding:4px 10px 4px 6px;border:1px solid var(--cs-line-2);border-radius:8px;background:var(--cs-surface);cursor:pointer;font-size:12.5px!important;font-weight:500!important;color:var(--cs-text)!important}
html:root body .cs-nt-auto__opt i{color:var(--cs-muted);margin-inline-end:2px}
html:root body .cs-nt-auto__opt:has(.checked){border-color:var(--cs-brand);background:var(--cs-brand-soft)}
html:root body .cs-nt-auto__help{flex-basis:100%;font-size:11.5px;color:var(--cs-muted);line-height:1.45}
/* Canaux */
html:root body .cs-nt-ch{margin:14px 20px 0}
html:root body .cs-nt-ch .cs-seg__btn{height:32px;padding:0 14px}
html:root body .cs-nt-ch .cs-seg__btn .fa-whatsapp{color:#25D366}
html:root body .cs-nt-body{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px;padding:14px 20px 20px;align-items:start}
html:root body .cs-nt-chp{display:none}
html:root body .cs-nt-chp.is-on{display:block}
html:root body .cs-nt-form .cs-nt-chp .form-group:last-child{margin-bottom:0}
html:root body .cs-nt-cc{margin:-4px 0 14px}
html:root body .cs-nt-cc > summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;color:var(--cs-brand);user-select:none}
html:root body .cs-nt-cc > summary::-webkit-details-marker{display:none}
html:root body .cs-nt-cc > summary::before{content:"+";display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:4px;background:var(--cs-brand-soft);font-weight:700}
html:root body .cs-nt-cc[open] > summary::before{content:"−"}
html:root body .cs-nt-cc__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;margin-top:10px}
html:root body .cs-nt-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px;font-size:11.5px;color:var(--cs-faint)}
html:root body .cs-nt-meta i{margin-inline-end:4px}
html:root body .cs-nt-counter{font-variant-numeric:tabular-nums;font-weight:500;color:var(--cs-muted)}
html:root body .cs-nt-form .tox-tinymce{border:1px solid var(--cs-line-2)!important;border-radius:0!important}
/* Variables */
html:root body .cs-nt-tags{position:sticky;top:16px;border:1px solid var(--cs-line);border-radius:12px;background:var(--cp-head);padding:12px;max-height:calc(100vh - 200px);overflow:auto;scrollbar-width:thin}
html:root body .cs-nt-tags__head{margin-bottom:8px}
html:root body .cs-nt-tags__head b{display:block;font-size:12.5px;font-weight:600;color:var(--cs-text)}
html:root body .cs-nt-tags__head small{font-size:11.5px;color:var(--cs-muted)}
html:root body .cs-nt-tags__grp{display:flex;flex-wrap:wrap;gap:4px;padding:8px 0;border-top:1px dashed var(--cs-line)}
html:root body .cs-nt-tag{border:1px solid var(--cs-line-2);background:var(--cs-surface);color:var(--cs-text);border-radius:6px;height:24px;padding:0 7px;font-size:11.5px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;cursor:pointer;line-height:1;transition:background-color .12s,border-color .12s,color .12s}
html:root body .cs-nt-tag:hover{border-color:var(--cs-brand);color:var(--cs-brand)}
html:root body .cs-nt-tag.is-done{background:var(--cs-ok-soft);border-color:var(--cs-ok);color:var(--cs-ok)}
/* Enregistrer */
html:root body .cs-nt-actions{position:sticky;bottom:0;z-index:20;display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:16px;padding:12px 16px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;box-shadow:0 -8px 20px rgba(14,42,92,.06)}
html:root body .cs-nt-actions__hint{margin-inline-end:auto;font-size:12.5px;color:var(--cs-muted)}
html:root body .cs-nt-actions__hint i{margin-inline-end:5px}
html:root body .cs-nt-actions .tw-dw-btn{height:40px!important;min-height:40px!important;padding:0 20px!important;border-radius:8px!important;font-weight:600!important;display:inline-flex!important;align-items:center;gap:8px;background:var(--cs-brand)!important;border:1px solid var(--cs-brand)!important}
html:root body .cs-nt-actions .tw-dw-btn:hover{background:var(--cs-brand-hover)!important}
html[data-theme="dark"] body .cs-nt-actions{box-shadow:0 -8px 24px rgba(0,0,0,.35)}
@media (max-width:1199px){ html:root body .cs-nt-body{grid-template-columns:1fr} html:root body .cs-nt-tags{position:static;max-height:none} }
@media (max-width:860px){
  html:root body .cs-nt{grid-template-columns:1fr}
  html:root body .cs-nt-nav{position:static;max-height:260px}
  html:root body .cs-nt-cc__grid{grid-template-columns:1fr}
  html:root body .cs-nt-actions__hint{display:none}
}


/* ═════════════════════════ 30. FICHE UTILISATEUR — FORMULAIRE (manage_user/create|edit, user/form — .cs-uf / .cs-acc) ═════════════════════════ */
html:root body .cs-uf{max-width:1120px;display:flex;flex-direction:column;gap:14px;font-family:var(--cs-font);color:var(--cs-text)}
html:root body .cs-uf-card{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:14px;padding:18px 20px 16px;box-shadow:var(--cp-shadow)}
html:root body .cs-uf-card__head{display:flex;align-items:flex-start;gap:12px;margin:0 0 16px}
html:root body .cs-uf-card__ic{flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:var(--cs-brand-soft);color:var(--cs-brand);display:inline-flex;align-items:center;justify-content:center;font-size:14px}
html:root body .cs-uf-card__head h3{margin:1px 0 2px!important;font-size:15.5px!important;font-weight:600!important;color:var(--cs-text)!important;line-height:1.3!important}
html:root body .cs-uf-card__head p{margin:0;font-size:12.5px;color:var(--cs-muted)}
html:root body .cs-uf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
html:root body .cs-uf-grid--name{grid-template-columns:minmax(110px,.55fr) 1fr 1fr}
html:root body .cs-uf-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
html:root body .cs-uf-grid.hide{display:none!important}
html:root body .cs-uf-form .cs-uf-grid > .form-group,html:root body .cs-uf-form .cs-acc__body > .form-group{float:none!important;width:auto!important;padding:0!important;min-width:0}
html:root body .cs-uf-static{display:flex;align-items:center;gap:8px;height:38px;padding:0 12px;background:var(--cp-head);border:1px solid var(--cs-line);font-size:13.5px;font-weight:500;color:var(--cs-text)}
html:root body .cs-uf-static i{color:var(--cs-faint)}
/* Options (case + titre + explication) */
html:root body .cs-uf-form label.cs-uf-opt{display:flex!important;align-items:flex-start;gap:12px;margin:2px 0 14px!important;padding:11px 14px!important;border:1px solid var(--cs-line-2);border-radius:10px;background:var(--cs-surface);cursor:pointer;font-weight:400!important;transition:border-color .15s,background-color .15s}
html:root body .cs-uf-form label.cs-uf-opt:hover{border-color:var(--cs-brand)}
html:root body .cs-uf-form label.cs-uf-opt:has(.checked),html:root body .cs-uf-form label.cs-uf-opt:has(input:checked){border-color:var(--cs-brand);background:var(--cs-brand-soft)}
html:root body .cs-uf-opt > div[class^="icheckbox"]{flex:0 0 auto;margin-top:1px}
html:root body .cs-uf-opt__t{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.4}
html:root body .cs-uf-opt__t b{font-size:13.5px;font-weight:600;color:var(--cs-text)}
html:root body .cs-uf-opt__t small{font-size:12px;color:var(--cs-muted)}
/* Emplacements */
html:root body .cs-uf-loc{border-top:1px solid var(--cs-line);padding-top:14px}
html:root body .cs-uf-loc__head{font-size:13px;font-weight:500;margin-bottom:8px;color:var(--cs-text)}
html:root body .cs-uf-loc__head i{color:var(--cs-faint);font-size:12px}
html:root body .cs-uf-loc__list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:4px 8px}
html:root body .cs-uf-loc:has(.cs-uf-opt--all .checked) .cs-uf-loc__list{opacity:.45;pointer-events:none}
html:root body .cs-uf-form label.cs-uf-chk{display:flex!important;align-items:center;gap:10px;margin:0!important;padding:8px 10px!important;border-radius:8px;cursor:pointer;font-size:13px!important;font-weight:400!important}
html:root body .cs-uf-form label.cs-uf-chk:hover{background:var(--cp-head)}
html:root body .cs-uf-form label.cs-uf-chk:has(.checked){background:var(--cs-brand-soft)}
html:root body .cs-uf-chk small{color:var(--cs-faint)}
/* Séparateur de groupe */
html:root body .cs-uf-sep{display:flex;align-items:center;gap:12px;margin:10px 0 -2px;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cs-faint)}
html:root body .cs-uf-sep::after{content:"";flex:1;height:1px;background:var(--cs-line)}
/* Volets repliables (aussi utilisés par le profil) */
html:root body .cs-acc-list{display:flex;flex-direction:column;gap:10px}
html:root body .cs-acc{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;overflow:hidden;font-family:var(--cs-font)}
html:root body .cs-acc > summary{display:flex;align-items:center;gap:12px;padding:13px 16px;cursor:pointer;list-style:none;user-select:none}
html:root body .cs-acc > summary::-webkit-details-marker{display:none}
html:root body .cs-acc > summary > i{flex:0 0 30px;width:30px;height:30px;border-radius:8px;background:var(--cp-head);color:var(--cs-muted);display:inline-flex;align-items:center;justify-content:center;font-size:12.5px}
html:root body .cs-acc[open] > summary > i{background:var(--cs-brand-soft);color:var(--cs-brand)}
html:root body .cs-acc__t{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;font-size:14px;font-weight:600;color:var(--cs-text);line-height:1.35}
html:root body .cs-acc__t small{font-size:12px;font-weight:400;color:var(--cs-muted)}
html:root body .cs-acc__n{flex:0 0 auto;height:22px;padding:0 9px;border-radius:999px;background:var(--cs-ok-soft);color:var(--cs-ok);font-size:11.5px;font-weight:600;display:inline-flex;align-items:center;font-variant-numeric:tabular-nums}
html:root body .cs-acc > summary::after{content:"";flex:0 0 auto;width:8px;height:8px;border-right:2px solid var(--cs-faint);border-bottom:2px solid var(--cs-faint);transform:rotate(45deg);margin:-4px 4px 0 2px;transition:transform .15s}
html:root body .cs-acc[open] > summary::after{transform:rotate(-135deg);margin-top:4px}
html:root body .cs-acc > summary:hover{background:var(--cp-head)}
html:root body .cs-acc[open] > summary{border-bottom:1px solid var(--cs-line)}
html:root body .cs-acc__body{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:0 16px;padding:16px 16px 4px}
html:root body .cs-acc__body--2{grid-template-columns:repeat(2,minmax(0,1fr))}
html:root body .cs-acc__body--3{grid-template-columns:repeat(3,minmax(0,1fr))}
html:root body .cs-acc__body > .form-group{float:none!important;width:auto!important;padding:0!important;min-width:0}
html:root body .cs-acc__full{grid-column:1/-1}
html:root body .cs-acc__full .selected_contacts_div{max-width:560px}
/* Barre d'enregistrement */
html:root body .cs-uf-actions{position:sticky;bottom:0;z-index:20;display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:6px;padding:12px 16px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;box-shadow:0 -8px 20px rgba(14,42,92,.06)}
html:root body .cs-uf-actions__hint{margin-inline-end:auto;font-size:12.5px;color:var(--cs-muted)}
html:root body .cs-uf-actions__hint i{font-size:9px;color:var(--cs-err);margin-inline-end:6px;vertical-align:2px}
html:root body .cs-uf-actions .tw-dw-btn{height:40px!important;min-height:40px!important;padding:0 18px!important;border-radius:8px!important;font-weight:600!important;display:inline-flex!important;align-items:center;gap:8px;text-transform:none!important}
html:root body .cs-uf-actions .tw-dw-btn-outline{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important}
html:root body .cs-uf-actions .tw-dw-btn-primary{background:var(--cs-brand)!important;border:1px solid var(--cs-brand)!important;color:#fff!important}
html:root body .cs-uf-actions .tw-dw-btn-primary:hover{background:var(--cs-brand-hover)!important}
html[data-theme="dark"] body .cs-uf-actions{box-shadow:0 -8px 24px rgba(0,0,0,.35)}
@media (max-width:860px){
  html:root body .cs-uf-grid,html:root body .cs-uf-grid--3,html:root body .cs-acc__body--3{grid-template-columns:1fr 1fr}
  html:root body .cs-uf-grid--name{grid-template-columns:1fr 1fr}
  html:root body .cs-uf-grid--name > .form-group:first-child{grid-column:1/-1;max-width:200px}
}
@media (max-width:560px){
  html:root body .cs-uf-grid,html:root body .cs-uf-grid--3,html:root body .cs-uf-grid--name,html:root body .cs-acc__body--2,html:root body .cs-acc__body--3{grid-template-columns:1fr}
  html:root body .cs-uf-actions__hint{display:none}
  html:root body .cs-uf-actions .tw-dw-btn{flex:1;justify-content:center}
}

/* Modèles de notification : modèle français par défaut */
html:root body .cs-nt-reset{flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border:1px solid var(--cs-line-2);border-radius:8px;background:var(--cs-surface);color:var(--cs-text);font-family:var(--cs-font);font-size:12.5px;font-weight:500;cursor:pointer;white-space:nowrap}
html:root body .cs-nt-reset i{color:var(--cs-brand);font-size:11.5px}
html:root body .cs-nt-reset:hover{border-color:var(--cs-brand);background:var(--cs-brand-soft)}
html:root body .cs-nt-pane.is-flash{box-shadow:var(--cp-ring);border-color:var(--cs-brand);transition:box-shadow .3s}
html:root body .cs-nt-actions .tw-dw-btn.cs-nt-reset-all{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important}
html:root body .cs-nt-actions .tw-dw-btn.cs-nt-reset-all i{color:var(--cs-brand)}
html:root body .cs-nt-actions .tw-dw-btn.cs-nt-reset-all:hover{background:var(--cs-paper)!important}
@media (max-width:640px){ html:root body .cs-nt-pane__head{flex-wrap:wrap} html:root body .cs-nt-actions{flex-wrap:wrap} }


/* ═════════════════════════ 31. BOUTONS D'ACTION DES LIGNES DE TABLEAU — même taille partout ═════════════════════════
   Les boutons « Modifier / Supprimer / Voir… » des listes (tw-dw-btn-xs, btn-xs) ont tous la taille du bouton « Actions » :
   30 px, contour, couleur selon l'action. Corrige le bouton « Modifier » agrandi et rempli par les règles de formulaire. */
html:root body table td .tw-dw-btn.tw-dw-btn-xs:not(.dropdown-toggle),
html:root body table td .tw-dw-btn.tw-dw-btn-sm:not(.dropdown-toggle),
html:root body table td .btn.btn-xs:not(.dropdown-toggle),
html:root body table td .btn.btn-sm:not(.dropdown-toggle),
html:root body.cs-forms .content table td .tw-dw-btn.tw-dw-btn-xs:not(.dropdown-toggle),
html:root body.cs-forms .content table td .tw-dw-btn.tw-dw-btn-primary.tw-dw-btn-xs:not(.dropdown-toggle){
  display:inline-flex!important;align-items:center!important;justify-content:center;gap:6px!important;vertical-align:middle;
  height:30px!important;min-height:30px!important;padding:0 10px!important;margin:2px 4px 2px 0!important;
  border-radius:8px!important;border:1px solid var(--cs-line-2)!important;background:var(--cs-surface)!important;background-image:none!important;
  color:var(--cs-text)!important;font-family:var(--cs-font)!important;font-size:12.5px!important;font-weight:500!important;line-height:1!important;
  text-transform:none!important;letter-spacing:0!important;box-shadow:none!important;white-space:nowrap;width:auto!important;text-decoration:none!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs:not(.dropdown-toggle) i,html:root body table td .tw-dw-btn.tw-dw-btn-xs:not(.dropdown-toggle) svg,
html:root body table td .btn.btn-xs:not(.dropdown-toggle) i{font-size:12px!important;width:auto!important;height:auto;margin:0!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs svg{width:14px!important;height:14px!important}
/* couleurs par action */
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-primary:not(.dropdown-toggle),html:root body table td .btn.btn-xs.btn-primary{color:var(--cs-brand)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-info:not(.dropdown-toggle),html:root body table td .btn.btn-xs.btn-info{color:var(--cs-brand)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-error:not(.dropdown-toggle),html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-danger,html:root body table td .btn.btn-xs.btn-danger{color:var(--cs-err)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-accent:not(.dropdown-toggle),html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-success,html:root body table td .btn.btn-xs.btn-success{color:var(--cs-ok)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-warning,html:root body table td .btn.btn-xs.btn-warning{color:var(--cs-warn)!important}
/* survol */
html:root body table td .tw-dw-btn.tw-dw-btn-xs:not(.dropdown-toggle):not([disabled]):hover,html:root body table td .btn.btn-xs:not(.dropdown-toggle):not([disabled]):hover{border-color:currentColor!important;background:var(--cs-brand-soft)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-error:not([disabled]):hover,html:root body table td .btn.btn-xs.btn-danger:not([disabled]):hover{background:var(--cs-err-soft)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-accent:not([disabled]):hover,html:root body table td .btn.btn-xs.btn-success:not([disabled]):hover{background:var(--cs-ok-soft)!important}
html:root body table td .tw-dw-btn.tw-dw-btn-xs[disabled],html:root body table td .btn.btn-xs[disabled]{opacity:.5!important;cursor:not-allowed}
html:root body table td .tw-dw-btn.tw-dw-btn-xs + br,html:root body table td .btn.btn-xs + br{display:none}

/* ═════════════════════════ 32. FICHE EMPLACEMENT / ENTREPÔT (business_location — .cs-bl) ═════════════════════════ */
html:root body .modal .cs-mf .modal-body.cs-bl{padding:18px 22px 8px!important;max-height:calc(100vh - 210px);overflow-y:auto}
html:root body .cs-bl-sec{padding:0 0 6px;margin:0 0 14px;border-bottom:1px dashed var(--cs-line)}
html:root body .cs-bl-sec__t{display:flex;align-items:center;gap:9px;margin:0 0 12px!important;font-size:13.5px!important;font-weight:600!important;color:var(--cs-text)!important}
html:root body .cs-bl-sec__t > span{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--cs-brand-soft);color:var(--cs-brand);font-size:11.5px;font-weight:700}
html:root body .cs-bl-sec__t small{font-size:11.5px;font-weight:500;color:var(--cs-faint)}
html:root body .cs-mf .cs-bl-grid4{grid-template-columns:repeat(4,minmax(0,1fr))}
html:root body .cs-bl-docs{display:grid;grid-template-columns:150px minmax(0,1fr) minmax(0,1fr);gap:0 14px;align-items:center;margin-bottom:6px}
html:root body .cs-bl-docs__h{font-size:12px;font-weight:600;color:var(--cs-muted);padding-bottom:6px}
html:root body .cs-bl-docs__h i{color:var(--cs-brand);margin-inline-end:5px}
html:root body .cs-bl-docs__k{font-size:13px;font-weight:500;color:var(--cs-text);padding-bottom:16px}
html:root body .cs-bl-docs__k i{color:var(--cs-faint);font-size:12px}
html:root body .modal .cs-mf .cs-bl-docs .form-group{margin-bottom:12px!important}
html:root body .cs-bl-more{margin:4px 0 14px}
html:root body .cs-acc__body--flush{display:block;padding:0}
html:root body .cs-bl-pay{margin:0!important;width:100%;font-size:13px}
html:root body .cs-bl-pay th{background:var(--cp-head)!important;color:var(--cs-muted)!important;font-size:11.5px!important;font-weight:600!important;text-transform:uppercase;letter-spacing:.04em;padding:8px 14px!important;border:0!important;border-bottom:1px solid var(--cs-line)!important}
html:root body .cs-bl-pay td{padding:7px 14px!important;border:0!important;border-top:1px solid var(--cs-line)!important;vertical-align:middle!important;color:var(--cs-text)!important;background:transparent!important}
html:root body .cs-bl-pay input[type="checkbox"]{width:16px;height:16px;accent-color:var(--cs-brand);margin:0}
html:root body .modal .cs-mf .cs-bl-pay .form-control.input-sm{height:32px!important;font-size:12.5px!important}
@media (max-width:767px){
  html:root body .cs-mf .cs-bl-grid4{grid-template-columns:1fr 1fr}
  html:root body .cs-bl-docs{grid-template-columns:1fr 1fr}
  html:root body .cs-bl-docs > .cs-bl-docs__h:first-child{display:none}
  html:root body .cs-bl-docs__k{grid-column:1/-1;padding-bottom:6px}
}

/* Bouton « Ajouter les préréglages » (étiquettes, groupes de clients, groupes de prix) */
html:root body .content .box-tools .tw-dw-btn.cs-preset-btn{height:38px!important;min-height:38px!important;padding:0 14px!important;border-radius:8px!important;display:inline-flex!important;align-items:center;gap:8px;
  background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;font-family:var(--cs-font)!important;font-weight:500!important;font-size:13.5px!important;text-transform:none!important;box-shadow:none!important}
html:root body .content .box-tools .tw-dw-btn.cs-preset-btn i{color:var(--cs-violet)}
html:root body .content .box-tools .tw-dw-btn.cs-preset-btn:hover{border-color:var(--cs-violet)!important;background:var(--cs-violet-soft)!important}

/* couleurs des boutons de ligne (spécificité supérieure aux règles de formulaire) */
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-primary:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-info:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .btn.btn-xs.btn-primary:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .btn.btn-xs.btn-info:not(.dropdown-toggle):not(.cs-x){color:var(--cs-brand)!important;background:var(--cs-surface)!important;border-color:var(--cs-line-2)!important}
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-error:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-danger:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .btn.btn-xs.btn-danger:not(.dropdown-toggle):not(.cs-x){color:var(--cs-err)!important;background:var(--cs-surface)!important;border-color:var(--cs-line-2)!important}
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-accent:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-success:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .btn.btn-xs.btn-success:not(.dropdown-toggle):not(.cs-x){color:var(--cs-ok)!important;background:var(--cs-surface)!important;border-color:var(--cs-line-2)!important}
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-warning:not(.dropdown-toggle):not(.cs-x),html:root body :is(.content,.modal) table td .btn.btn-xs.btn-warning:not(.dropdown-toggle):not(.cs-x){color:var(--cs-warn)!important;background:var(--cs-surface)!important;border-color:var(--cs-line-2)!important}
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs:not(.dropdown-toggle):not(.cs-x):not([disabled]):hover,html:root body :is(.content,.modal) table td .btn.btn-xs:not(.dropdown-toggle):not(.cs-x):not([disabled]):hover{border-color:currentColor!important;background:var(--cs-brand-soft)!important}
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-error:not(.dropdown-toggle):not(.cs-x):not([disabled]):hover,html:root body :is(.content,.modal) table td .btn.btn-xs.btn-danger:not(.dropdown-toggle):not(.cs-x):not([disabled]):hover{background:var(--cs-err-soft)!important}
html:root body :is(.content,.modal) table td .tw-dw-btn.tw-dw-btn-xs.tw-dw-btn-accent:not(.dropdown-toggle):not(.cs-x):not([disabled]):hover,html:root body :is(.content,.modal) table td .btn.btn-xs.btn-success:not(.dropdown-toggle):not(.cs-x):not([disabled]):hover{background:var(--cs-ok-soft)!important}

/* Sélection multiple select2 dans les fenêtres (ex. « Produits vedettes » de la fiche entrepôt) */
html:root body .modal .select2-container{max-width:100%}
html:root body .modal .select2-container--default .select2-selection--multiple{
  min-height:40px!important;height:auto!important;padding:4px 8px!important;border:1px solid var(--cs-line-2)!important;border-radius:0!important;
  background:var(--cs-surface)!important;display:flex;align-items:center;cursor:text}
html:root body .modal .select2-container--default .select2-selection--multiple .select2-selection__rendered{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px;padding:0!important;margin:0!important;width:100%;list-style:none}
html:root body .modal .select2-container--default .select2-selection--multiple .select2-selection__choice{
  display:inline-flex;align-items:center;gap:6px;margin:0!important;padding:3px 8px!important;border:0!important;border-radius:6px!important;
  background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important;font-size:12.5px!important;font-weight:500;line-height:1.3!important}
html:root body .modal .select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--cs-brand)!important;margin:0!important;border:0!important;background:transparent!important;font-weight:700;order:2;position:static!important;padding:0!important}
html:root body .modal .select2-container--default .select2-search--inline{flex:1 1 160px;min-width:160px;margin:0!important}
html:root body .modal .select2-container--default .select2-search--inline .select2-search__field{
  width:100%!important;min-width:160px;height:28px!important;margin:0!important;padding:0 4px!important;border:0!important;box-shadow:none!important;outline:0!important;
  background:transparent!important;color:var(--cs-text)!important;font-family:var(--cs-font)!important;font-size:13.5px!important}
html:root body .modal .select2-container--default.select2-container--focus .select2-selection--multiple,
html:root body .modal .select2-container--default.select2-container--open .select2-selection--multiple{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring)!important}
html:root body .modal .select2-container--default .select2-selection--multiple .select2-selection__clear{order:9;margin:0 4px 0 auto!important;color:var(--cs-faint)!important;float:none!important}


/* ═════════════════════════ 34. MENUS « ACTIONS » DES TABLEAUX — style raffiné (.cs-dd, préparé par cs-pages.js) ═════════════════════════ */
@keyframes cs-dd-in{from{opacity:0;transform:translateY(-4px) scale(.985)}to{opacity:1;transform:none}}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd{
  min-width:250px!important;padding:6px!important;border:1px solid var(--cs-line)!important;border-radius:12px!important;background:var(--cs-surface)!important;
  box-shadow:0 18px 44px rgba(14,42,92,.16),0 3px 8px rgba(14,42,92,.06)!important;font-family:var(--cs-font)!important;
  animation:cs-dd-in .14s ease-out;transform-origin:top left}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a{
  --t:var(--cs-brand);--ts:var(--cs-brand-soft);
  display:flex!important;align-items:center;gap:11px;min-height:38px;padding:5px 12px 5px 5px!important;margin:1px 0;border-radius:9px!important;
  font-size:13.5px!important;font-weight:500!important;line-height:1.3!important;color:var(--cs-text)!important;background:transparent!important;
  white-space:nowrap;text-decoration:none!important;transition:background-color .12s,color .12s}
html:root body .dropdown-menu.cs-dd > li > a[data-cs-tone="err"]{--t:var(--cs-err);--ts:var(--cs-err-soft)}
html:root body .dropdown-menu.cs-dd > li > a[data-cs-tone="violet"]{--t:var(--cs-violet);--ts:var(--cs-violet-soft)}
html:root body .dropdown-menu.cs-dd > li > a[data-cs-tone="warn"]{--t:var(--cs-warn);--ts:var(--cs-warn-soft)}
html:root body .dropdown-menu.cs-dd > li > a[data-cs-tone="ok"]{--t:var(--cs-ok);--ts:var(--cs-ok-soft)}
html:root body .dropdown-menu.cs-dd > li > a[data-cs-tone="muted"]{--t:var(--cs-muted);--ts:var(--cp-head)}
/* pastille d'icône */
html:root body .dropdown-menu.cs-dd .cs-dd-ic{flex:0 0 28px;width:28px;height:28px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--ts);color:var(--t);transition:background-color .12s,color .12s}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd .cs-dd-ic > i,
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd .cs-dd-ic > .fa,
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd .cs-dd-ic > .fas,
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd .cs-dd-ic > .glyphicon{
  width:auto!important;margin:0!important;font-size:12.5px!important;color:inherit!important;line-height:1!important;top:0}
html:root body .dropdown-menu.cs-dd .cs-dd-ic > svg{width:15px!important;height:15px!important;color:inherit!important;stroke:currentColor}
html:root body .dropdown-menu.cs-dd .cs-dd-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
/* survol / clavier */
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a:hover,
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a:focus-visible{background:var(--cp-head)!important;color:var(--cs-text)!important;outline:0}
html:root body .dropdown-menu.cs-dd > li > a:hover .cs-dd-ic,html:root body .dropdown-menu.cs-dd > li > a:focus-visible .cs-dd-ic{background:var(--t);color:#fff}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a[data-cs-tone="err"]{color:var(--cs-err)!important}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a[data-cs-tone="err"]:hover{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd a[class*="delete"] i{color:inherit!important}
/* séparateurs, éléments désactivés, en-têtes */
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li.divider{height:1px!important;margin:6px 8px!important;background:var(--cs-line)!important;padding:0!important}
html:root body .dropdown-menu.cs-dd > li.disabled > a,html:root body .dropdown-menu.cs-dd > li > a[disabled]{opacity:.45;pointer-events:none}
html:root body .dropdown-menu.cs-dd > li.dropdown-header{padding:8px 12px 4px!important;font-size:11px!important;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cs-faint)!important}
/* bouton « Actions » : flèche qui pivote, état ouvert */
html:root body table .btn-group > .dropdown-toggle .caret{transition:transform .15s;margin-inline-start:2px}
html:root body table .btn-group.open > .dropdown-toggle .caret{transform:rotate(180deg)}
html:root body table .btn-group.open > .dropdown-toggle.tw-dw-btn{box-shadow:var(--cp-ring)!important}
/* mode sombre */
html:root[data-theme="dark"] body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd{box-shadow:0 20px 48px rgba(0,0,0,.55),0 2px 8px rgba(0,0,0,.35)!important}
html:root[data-theme="dark"] body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a:hover{background:rgba(148,175,220,.08)!important;color:var(--cs-text)!important}
html:root[data-theme="dark"] body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a[data-cs-tone="err"]:hover{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a:focus:not(:focus-visible){outline:0!important;box-shadow:none!important;border-color:transparent!important}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a:focus:not(:focus-visible):not(:hover){background:transparent!important}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a:focus-visible{box-shadow:inset 0 0 0 2px var(--t)!important}
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li > a,
html:root body :is(table,.dataTables_wrapper,.table-responsive) .dropdown-menu.cs-dd > li:first-child > a{border:1px solid transparent!important}
@media (prefers-reduced-motion:reduce){ html:root body .dropdown-menu.cs-dd{animation:none} }

/* ═════════════════════════ 35. SUPPRESSION DES DONNÉES DE DÉMONSTRATION (layouts/partials/demo_purge_modal — .cs-demo-*) ═════════════════════════ */
html body .cs-demo-modal .modal-dialog{max-width:620px;width:calc(100% - 24px)}
html body .cs-demo-modal .cs-demo-ic{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html body .cs-demo-modal .cs-demo-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
html body .cs-demo-modal .cs-demo-box{border:1px solid var(--cs-line);border-radius:10px;padding:14px 14px 10px;background:var(--cs-surface)}
html body .cs-demo-modal .cs-demo-box > b{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:600;margin-bottom:8px}
html body .cs-demo-modal .cs-demo-box--del{border-color:#F4C7CC;background:var(--cs-err-soft)}
html body .cs-demo-modal .cs-demo-box--del > b{color:var(--cs-err)}
html body .cs-demo-modal .cs-demo-box--keep{border-color:#B9E4D5;background:var(--cs-ok-soft)}
html body .cs-demo-modal .cs-demo-box--keep > b{color:var(--cs-ok)}
html body .cs-demo-modal .cs-demo-box ul{list-style:none;margin:0;padding:0}
html body .cs-demo-modal .cs-demo-box li{display:flex;justify-content:space-between;gap:8px;padding:5px 0;font-size:13px;color:var(--cs-text);border-top:1px dashed rgba(0,0,0,.08)}
html body .cs-demo-modal .cs-demo-box li:first-child{border-top:0}
html body .cs-demo-modal .cs-demo-box li span{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cs-err)}
html body .cs-demo-modal #cs_demo_confirm{font-weight:600;letter-spacing:.06em}
html body .cs-demo-modal .cs-demo-go{background:var(--cs-err)!important;border-color:var(--cs-err)!important;color:#fff!important}
html body .cs-demo-modal .cs-demo-go[disabled]{opacity:.45;cursor:not-allowed}
html.dark-mode body .cs-demo-modal .cs-demo-box--del,html[data-theme="dark"] body .cs-demo-modal .cs-demo-box--del{background:rgba(198,45,58,.12);border-color:rgba(198,45,58,.35)}
html.dark-mode body .cs-demo-modal .cs-demo-box--keep,html[data-theme="dark"] body .cs-demo-modal .cs-demo-box--keep{background:rgba(15,139,111,.12);border-color:rgba(15,139,111,.35)}
@media (max-width:600px){html body .cs-demo-modal .cs-demo-cols{grid-template-columns:1fr}}

@media print{
  html body.cs-docs .content .row:has(> [class*="col-"] > #submit-sell),html body.cs-docs .content .row:has(> [class*="col-"] > #submit_purchase_form){position:static!important}
  html body.cs-docs .content-header h1::before{content:none}
}

/* ═════════════════════════ PARAMÈTRES › ÉTIQUETTES PERSONNALISÉES (.cs-cl) ═════════════════════════
   Vue : resources/views/business/partials/settings_custom_labels.blade.php
   Champs regroupés par secteur ; seuls les champs nommés sont « Affichés » dans les modules. */
html body .cs-cl{--cl-gap:14px;font-family:var(--cs-font)}
html body .cs-cl *,html body .cs-cl *::before,html body .cs-cl *::after{box-sizing:border-box}
html body .cs-cl .hide{display:none!important}

/* Bandeau de principe */
html body .cs-cl .cs-cl-intro{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;margin:0 0 16px;border:1px solid color-mix(in srgb,var(--cs-brand) 22%,var(--cs-line));
  background:var(--cs-brand-soft);border-radius:var(--cp-radius)}
html body .cs-cl .cs-cl-intro__icon{flex:0 0 34px;width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-surface);color:var(--cs-brand)}
html body .cs-cl .cs-cl-intro__icon svg{width:18px;height:18px}
html body .cs-cl .cs-cl-intro__txt{flex:1 1 auto;min-width:0}
html body .cs-cl .cs-cl-intro__txt strong{display:block;font-size:14px;font-weight:600;color:var(--cs-text);margin:1px 0 3px}
html body .cs-cl .cs-cl-intro__txt p{margin:0;font-size:13px;line-height:1.5;color:var(--cs-muted)}
html body .cs-cl .cs-cl-intro__stat{flex:0 0 auto;align-self:center;text-align:end;white-space:nowrap;padding-inline-start:14px;border-inline-start:1px solid color-mix(in srgb,var(--cs-brand) 22%,var(--cs-line))}
html body .cs-cl .cs-cl-intro__stat b{display:block;font-size:22px;line-height:1.1;font-weight:600;color:var(--cs-brand);font-variant-numeric:tabular-nums}
html body .cs-cl .cs-cl-intro__stat span{font-size:12px;color:var(--cs-muted)}

/* Onglets de secteur */
html body .cs-cl .cs-cl-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px;padding:4px;background:var(--cp-head);border:1px solid var(--cs-line);border-radius:10px;width:max-content;max-width:100%}
html body .cs-cl .cs-cl-tab{appearance:none;border:0;background:transparent;height:32px;padding:0 12px;border-radius:7px;display:inline-flex;align-items:center;gap:8px;
  font-size:13px;font-weight:500;color:var(--cs-muted);cursor:pointer;transition:background .12s,color .12s}
html body .cs-cl .cs-cl-tab:hover{color:var(--cs-text)}
html body .cs-cl .cs-cl-tab:focus-visible{outline:2px solid var(--cs-brand);outline-offset:1px}
html body .cs-cl .cs-cl-tab.is-active{background:var(--cs-surface);color:var(--cs-text);font-weight:600;box-shadow:0 1px 2px rgba(14,42,92,.08),0 0 0 1px var(--cs-line)}
html body .cs-cl .cs-cl-tab__n{min-width:20px;height:18px;padding:0 6px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:600;
  background:var(--cs-line);color:var(--cs-muted);font-variant-numeric:tabular-nums}
html body .cs-cl .cs-cl-tab.is-active .cs-cl-tab__n{background:var(--cs-brand);color:#fff}

/* Secteurs */
html body .cs-cl .cs-cl-sector{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--cl-gap);margin:0 0 26px}
html body .cs-cl .cs-cl-sector:last-child{margin-bottom:0}
html body .cs-cl .cs-cl-sector__title{font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--cs-faint);margin:0 0 -4px}
html body .cs-cl.is-filtered .cs-cl-sector__title{display:none}

/* Carte d'un groupe */
html body .cs-cl .cs-cl-card{border:1px solid var(--cs-line);border-radius:var(--cp-radius);background:var(--cs-surface);overflow:hidden}
html body .cs-cl .cs-cl-card__head{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--cp-head);border-bottom:1px solid var(--cs-line)}
html body .cs-cl .cs-cl-card__icon{flex:0 0 32px;width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-surface);
  border:1px solid var(--cs-line);color:var(--cs-muted)}
html body .cs-cl .cs-cl-card__icon svg{width:17px;height:17px}
html body .cs-cl .cs-cl-card__txt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
html body .cs-set-section .cs-cl h4.cs-cl-card__title{margin:0!important;padding:0!important;border:0!important;font-size:14px!important;font-weight:600!important;line-height:1.3;color:var(--cs-text)!important}
html body .cs-cl .cs-cl-card__where{font-size:12.5px;color:var(--cs-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .cs-cl .cs-cl-card__badge{flex:0 0 auto;height:24px;padding:0 10px;border-radius:999px;display:inline-flex;align-items:center;gap:1px;font-size:12px;color:var(--cs-faint);
  background:var(--cs-surface);border:1px solid var(--cs-line);font-variant-numeric:tabular-nums}
html body .cs-cl .cs-cl-card__badge b{font-weight:600;color:var(--cs-muted)}
html body .cs-cl .cs-cl-card__badge.is-on{background:var(--cs-ok-soft);border-color:color-mix(in srgb,var(--cs-ok) 30%,transparent);color:var(--cs-ok)}
html body .cs-cl .cs-cl-card__badge.is-on b{color:var(--cs-ok)}
html body .cs-cl .cs-cl-card__body{padding:6px 16px 12px}
html body .cs-cl .cs-cl-empty{margin:8px 0 4px;font-size:13px;color:var(--cs-faint)}

/* Ligne de champ */
html body .cs-cl .cs-cl-rows{overflow:hidden}
html body .cs-cl .cs-cl-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:start;gap:4px 12px;padding:10px 0;margin-top:-1px;border-top:1px dashed var(--cs-line)}
html body .cs-cl .cs-cl-row.is-collapsed{display:none}
html body .cs-cl .cs-cl-row.is-new{animation:cs-cl-in .25s ease-out}
@keyframes cs-cl-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
html body .cs-cl .cs-cl-row__n{width:26px;height:26px;margin-top:7px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;
  color:var(--cs-faint);background:var(--cp-head);border:1px solid var(--cs-line);font-variant-numeric:tabular-nums}
html body .cs-cl .cs-cl-row.is-on .cs-cl-row__n{color:var(--cs-brand);background:var(--cs-brand-soft);border-color:color-mix(in srgb,var(--cs-brand) 25%,transparent)}
html body .cs-cl .cs-cl-row__main{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
html body .cs-cl .cs-cl-field{position:relative;flex:1 1 260px;min-width:0}
html body .cs-set-section .cs-cl .cs-cl-field .form-control.cs-cl-input{width:100%!important;height:40px!important;padding-inline-end:36px!important;font-weight:500}
html body .cs-cl .cs-cl-row.is-off .cs-cl-input:not(:focus){background:var(--cp-head)!important}
html body .cs-cl .cs-cl-clear{position:absolute;top:50%;inset-inline-end:6px;transform:translateY(-50%);width:26px;height:26px;border:0;border-radius:6px;background:transparent;
  color:var(--cs-faint);display:none;align-items:center;justify-content:center;cursor:pointer}
html body .cs-cl .cs-cl-clear svg{width:14px;height:14px}
html body .cs-cl .cs-cl-clear:hover{background:var(--cs-err-soft);color:var(--cs-err)}
html body .cs-cl .cs-cl-row.is-on .cs-cl-clear{display:inline-flex}
html body .cs-set-section .cs-cl .form-control.cs-cl-type{flex:0 0 130px;width:130px;height:40px!important}
html body .cs-cl .cs-cl-row.is-off .cs-cl-type,html body .cs-cl .cs-cl-row.is-off .cs-cl-opts,html body .cs-cl .cs-cl-row.is-off .cs-cl-row__extra{opacity:.45;pointer-events:none}
html body .cs-cl .cs-cl-row__extra{grid-column:2 / -1}
html body .cs-set-section .cs-cl .cs-cl-row__extra textarea.form-control{width:100%!important;min-height:68px;resize:vertical;font-size:13px}
html body .cs-cl .cs-cl-pill{margin-top:9px;height:22px;padding:0 9px;border-radius:999px;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;white-space:nowrap;
  color:var(--cs-faint);background:var(--cp-head);border:1px solid var(--cs-line)}
html body .cs-cl .cs-cl-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}
html body .cs-cl .cs-cl-row.is-on .cs-cl-pill{color:var(--cs-ok);background:var(--cs-ok-soft);border-color:transparent}

/* Options (interrupteurs) */
html body .cs-cl .cs-cl-opts{display:flex;align-items:center;gap:6px 16px;flex-wrap:wrap}
html body .cs-cl label.cs-cl-switch{display:inline-flex!important;align-items:center;gap:8px;margin:0!important;font-size:13px!important;font-weight:500!important;color:var(--cs-muted)!important;cursor:pointer;user-select:none;white-space:nowrap}
html body .cs-cl .cs-cl-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
html body .cs-cl .cs-cl-switch__ui{position:relative;width:32px;height:18px;border-radius:999px;background:var(--cs-line-2);transition:background .15s;flex:0 0 32px}
html body .cs-cl .cs-cl-switch__ui::after{content:"";position:absolute;top:2px;inset-inline-start:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .15s}
html body .cs-cl .cs-cl-switch input:checked + .cs-cl-switch__ui{background:var(--cs-brand)}
html body .cs-cl .cs-cl-switch input:checked + .cs-cl-switch__ui::after{transform:translateX(14px)}
html[dir="rtl"] body .cs-cl .cs-cl-switch input:checked + .cs-cl-switch__ui::after{transform:translateX(-14px)}
html body .cs-cl .cs-cl-switch input:checked ~ *{color:var(--cs-text)}
html body .cs-cl .cs-cl-switch input:focus-visible + .cs-cl-switch__ui{box-shadow:var(--cp-ring)}

/* Ajouter un champ */
html body .cs-cl .cs-cl-add{appearance:none;margin:10px 0 0;height:34px;padding:0 12px;border:1px dashed var(--cs-line-2);border-radius:8px;background:transparent;
  display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--cs-brand);cursor:pointer;transition:background .12s,border-color .12s}
html body .cs-cl .cs-cl-add:hover{background:var(--cs-brand-soft);border-color:var(--cs-brand)}
html body .cs-cl .cs-cl-add:focus-visible{outline:2px solid var(--cs-brand);outline-offset:2px}
html body .cs-cl .cs-cl-add svg{width:15px;height:15px}
html body .cs-cl .cs-cl-add__left{font-weight:400;color:var(--cs-faint)}
html body .cs-cl .cs-cl-add__left b{font-weight:500}

html[data-theme="dark"] body .cs-cl .cs-cl-tab.is-active{box-shadow:0 0 0 1px var(--cs-line-2)}

@media (max-width:767px){
  html body .cs-cl .cs-cl-intro{flex-wrap:wrap}
  html body .cs-cl .cs-cl-intro__stat{border:0;padding:0;text-align:start;display:flex;align-items:baseline;gap:6px}
  html body .cs-cl .cs-cl-tabs{width:100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  html body .cs-cl .cs-cl-tab{flex:0 0 auto}
  html body .cs-cl .cs-cl-card__head{padding:12px}
  html body .cs-cl .cs-cl-card__where{white-space:normal}
  html body .cs-cl .cs-cl-card__body{padding:4px 12px 12px}
  html body .cs-cl .cs-cl-row{grid-template-columns:24px minmax(0,1fr);gap:8px 10px}
  html body .cs-cl .cs-cl-pill{display:none}
  html body .cs-set-section .cs-cl .form-control.cs-cl-type{flex:1 1 100%;width:100%}
}

/* ═════════════════════════ DOCUMENTS SOURCE DANS LE BLOC « LIGNES » (.erp-src) ═════════════════════════
   Vue : layouts/partials/doc_source.blade.php — Script : public/js/doc-source.js
   Commande client (ventes) · Bon de commande (achats) · Demande d'achat (commandes fournisseur) */
html body .erp-src{display:block;padding:12px 16px 14px;border-bottom:1px solid var(--cs-line);background:var(--cp-head,#F7F9FC);font-family:var(--cs-font)}
html body .erp-src__head{display:flex;align-items:center;gap:12px;margin:0 0 10px}
html body .erp-src__icon{flex:0 0 30px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-surface);border:1px solid var(--cs-line);color:var(--cs-brand)}
html body .erp-src__icon svg{width:16px;height:16px}
html body .erp-src__txt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
html body .erp-src__txt label{margin:0!important;font-size:13.5px!important;font-weight:600!important;color:var(--cs-text)!important}
html body .erp-src__txt small{font-size:12.5px;color:var(--cs-muted);line-height:1.4}
html body .erp-src__count{flex:0 0 auto;height:24px;padding:0 10px;display:inline-flex;align-items:center;font-size:12.5px;font-weight:500;color:var(--cs-faint);
  background:var(--cs-surface);border:1px solid var(--cs-line);white-space:nowrap;font-variant-numeric:tabular-nums}
html body .erp-src__count.is-on{color:var(--cs-brand);background:var(--cs-brand-soft);border-color:color-mix(in srgb,var(--cs-brand) 30%,transparent);font-weight:600}
/* Zone de sélection : pleine largeur, étiquettes lisibles qui passent à la ligne */
html body .erp-src .select2-container{width:100%!important;display:block}
html body .erp-src .select2-container .select2-selection--multiple{min-height:42px!important;height:auto!important;padding:4px 6px!important;background:var(--cs-surface)!important;
  border:1px solid var(--cs-line-2)!important;cursor:text}
html body .erp-src .select2-container--focus .select2-selection--multiple,html body .erp-src .select2-container--open .select2-selection--multiple{border-color:var(--cs-brand)!important;box-shadow:var(--cp-ring,0 0 0 3px rgba(20,89,199,.16))!important}
html body .erp-src .select2-selection__rendered{display:flex!important;flex-wrap:wrap;gap:6px;padding:0!important;margin:0!important;line-height:normal!important}
html body .erp-src .select2-selection__rendered > li{margin:0!important;float:none!important}
html body .erp-src .select2-selection__choice{display:inline-flex!important;align-items:center;gap:6px;height:30px;margin:0!important;padding:0 10px 0 6px!important;
  background:var(--cs-brand-soft)!important;border:1px solid color-mix(in srgb,var(--cs-brand) 30%,transparent)!important;color:var(--cs-text)!important;font-size:13px;font-weight:500;max-width:100%}
html body .erp-src .select2-selection__choice__remove{position:static!important;order:-1;display:inline-flex!important;align-items:center;justify-content:center;width:20px;height:20px;margin:0!important;padding:0!important;
  border:0!important;background:transparent!important;color:var(--cs-muted)!important;font-size:16px!important;font-weight:400!important;line-height:1!important}
html body .erp-src .select2-selection__choice__remove:hover{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html body .erp-src .select2-selection__choice__display{padding:0!important}
html body .erp-src .erp-src-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
html body .erp-src .select2-search--inline{flex:1 1 220px;min-width:180px}
html body .erp-src .select2-search--inline .select2-search__field{width:100%!important;height:30px!important;margin:0!important;padding:0 6px!important;font-size:13.5px!important;border:0!important;box-shadow:none!important}
/* Liste déroulante : 2 lignes par document */
.select2-results .erp-src-opt{display:flex;flex-direction:column;gap:2px;padding:2px 0}
.select2-results .erp-src-opt__l1{display:flex;align-items:center;gap:8px;font-size:13.5px}
.select2-results .erp-src-opt__l1 b{font-weight:600;font-variant-numeric:tabular-nums}
.select2-results .erp-src-opt__l2{font-size:12.5px;opacity:.75;font-variant-numeric:tabular-nums}
.select2-results .erp-src-st{display:inline-flex;align-items:center;height:18px;padding:0 7px;font-size:11.5px;font-weight:600;background:var(--cs-warn-soft,#FFF4DF);color:var(--cs-warn,#B26A00)}
.select2-results .erp-src-st--ordered{background:var(--cs-brand-soft,#EAF1FD);color:var(--cs-brand,#1459C7)}
.select2-results__option[aria-selected="true"] .erp-src-opt__l1 b::after{content:"  ✓";color:var(--cs-ok,#0F8B6F)}
@media (max-width:767px){
  html body .erp-src{padding:12px}
  html body .erp-src__txt small{display:none}
}

/* ═════════════════════════ PAGES D'IMPORTATION (.imp-*) ═════════════════════════
   Vues : layouts/partials/import/{head,upload}.blade.php + contact/import, import_sales, import_products, expense/import
   Script : public/js/import-ui.js */
html body .imp-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px 20px;flex-wrap:wrap;font-family:var(--cs-font)}
html body .imp-head__eyebrow{display:block;margin:0 0 6px;font-size:12.5px;font-weight:600;color:var(--cs-brand)}
html body .imp-head h1{margin:0!important;font-size:24px!important;font-weight:600!important;color:var(--cs-text)!important;letter-spacing:-.01em;display:block!important}
html body .imp-head p{margin:6px 0 0;font-size:14px;color:var(--cs-muted);max-width:76ch}
html body .imp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;padding:0 16px;font:inherit;font-family:var(--cs-font);font-size:13.5px;font-weight:600;border:1px solid transparent;border-radius:8px;cursor:pointer;text-decoration:none!important;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}
html body .imp-btn svg{width:15px;height:15px}
html body .imp-btn--primary{background:var(--cs-brand);color:#fff!important}
html body .imp-btn--primary:hover:not(:disabled){background:var(--cs-brand-hover)}
html body .imp-btn--primary:disabled{opacity:.5;cursor:not-allowed}
html body .imp-btn--ghost{background:var(--cs-surface);border-color:var(--cs-line-2);color:var(--cs-text)!important}
html body .imp-btn--ghost:hover{border-color:var(--cs-brand);color:var(--cs-brand)!important}
html body .imp-btn--danger{background:var(--cs-surface);border-color:color-mix(in srgb,var(--cs-err) 35%,var(--cs-line));color:var(--cs-err)!important;height:30px;padding:0 10px;font-size:12.5px;font-weight:500}
html body .imp-btn--danger:hover{background:var(--cs-err-soft)}
html body .imp-link{font-size:13px;font-weight:600;color:var(--cs-brand)!important;white-space:nowrap}
html body .imp-spin{display:none;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:imp-spin .7s linear infinite}
html body .imp-submit.is-busy .imp-spin{display:inline-block}
@keyframes imp-spin{to{transform:rotate(360deg)}}

html body .imp-alert{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px;padding:13px 16px;border:1px solid var(--cs-line);border-inline-start-width:3px;background:var(--cs-surface);font-family:var(--cs-font);font-size:13.5px;color:var(--cs-text);line-height:1.5}
html body .imp-alert svg{width:18px;height:18px;flex:0 0 18px;margin-top:1px}
html body .imp-alert > div{flex:1;display:flex;flex-direction:column;gap:2px}
html body .imp-alert small{color:var(--cs-muted);font-size:12.5px}
html body .imp-alert--err{border-inline-start-color:var(--cs-err);background:var(--cs-err-soft)}.imp-alert--err svg{color:var(--cs-err)}
html body .imp-alert--ok{border-inline-start-color:var(--cs-ok);background:var(--cs-ok-soft)}.imp-alert--ok svg{color:var(--cs-ok)}
html body .imp-alert__close{border:0;background:transparent;font-size:20px;line-height:1;color:var(--cs-muted);cursor:pointer;padding:0 2px}

html body .imp-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:18px;margin:0 0 18px;align-items:start;font-family:var(--cs-font)}
html body .imp-card{background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;font-family:var(--cs-font);color:var(--cs-text)}
html body .imp-steps__list{list-style:none;margin:0;padding:6px 20px}
html body .imp-step{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 14px;align-items:center;padding:16px 0;border-top:1px solid var(--cs-line)}
html body .imp-step:first-child{border-top:0}
html body .imp-step--drop{align-items:start}
html body .imp-step--drop .imp-step__body{grid-column:2/-1}
html body .imp-step__n{width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--cs-brand-soft);color:var(--cs-brand);font-size:13px;font-weight:600}
html body .imp-step__body b{display:block;font-size:14.5px;font-weight:600;color:var(--cs-text)}
html body .imp-step__body p{margin:2px 0 0;font-size:13px;color:var(--cs-muted);line-height:1.5}
html body .imp-form{margin-top:12px;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
html body .imp-drop{position:relative;display:flex!important;align-items:center;gap:14px;width:100%;margin:0!important;padding:20px;border:1.5px dashed var(--cs-line-2);background:var(--cp-head,#F7F9FC);cursor:pointer;transition:border-color .15s,background .15s;font-weight:400!important}
html body .imp-drop:hover,html body .imp-drop.is-over{border-color:var(--cs-brand);background:var(--cs-brand-soft)}
html body .imp-drop.has-file{border-style:solid;border-color:var(--cs-ok);background:var(--cs-ok-soft)}
html body .imp-drop.is-bad{border-color:var(--cs-err);background:var(--cs-err-soft)}
html body .imp-drop__input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
html body .imp-drop__ico{flex:0 0 44px;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;background:var(--cs-surface);border:1px solid var(--cs-line);color:var(--cs-brand)}
html body .imp-drop.has-file .imp-drop__ico{color:var(--cs-ok)}
html body .imp-drop__ico svg{width:22px;height:22px}
html body .imp-drop__empty,html body .imp-drop__file{display:flex;flex-direction:column;gap:3px;font-size:14px;color:var(--cs-text);min-width:0}
html body .imp-drop__empty u,html body .imp-drop__file u{color:var(--cs-brand);text-decoration:none;font-weight:600}
html body .imp-drop__empty small,html body .imp-drop__file small{font-size:12.5px;color:var(--cs-muted)}
html body .imp-drop__file{flex-direction:row;align-items:baseline;gap:10px;flex-wrap:wrap}
html body .imp-drop__name{font-weight:600;overflow-wrap:anywhere}
html body .imp-drop__file[hidden],html body .imp-drop__empty[hidden],html body .imp-drop__err[hidden],html body .imp-cols__empty[hidden]{display:none!important}
html body .imp-drop__err{margin:-4px 0 0;font-size:13px;color:var(--cs-err)}
html body .imp-form .form-group{width:100%;margin:0}

html body .imp-tips{padding:18px 20px}
html body .imp-tips h2{margin:0 0 10px;font-size:15px;font-weight:600;color:var(--cs-text)}
html body .imp-tips ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
html body .imp-tips li{position:relative;padding-left:22px;font-size:13px;line-height:1.5;color:var(--cs-muted)}
html body .imp-tips li::before{content:"";position:absolute;left:3px;top:7px;width:9px;height:5px;border-left:2px solid var(--cs-ok);border-bottom:2px solid var(--cs-ok);transform:rotate(-45deg)}
html body .imp-tips li b{color:var(--cs-text);font-weight:600}

html body .imp-cols{margin:0 0 18px;overflow:hidden}
html body .imp-cols__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--cs-line)}
html body .imp-cols__head h2{margin:0;font-size:16px;font-weight:600;color:var(--cs-text)}
html body .imp-cols__head h2 small{display:block;margin-top:2px;font-size:12.5px;font-weight:400;color:var(--cs-muted)}
html body .imp-cols__tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
html body .imp-cols__find{height:34px;width:220px;padding:0 10px;border:1px solid var(--cs-line-2);background:var(--cs-surface);color:var(--cs-text);font:inherit;font-size:13.5px}
html body .imp-cols__find:focus{outline:0;border-color:var(--cs-brand);box-shadow:0 0 0 3px rgba(20,89,199,.14)}
html body label.imp-cols__toggle{display:inline-flex!important;align-items:center;gap:8px;margin:0!important;font-size:13px!important;font-weight:500!important;color:var(--cs-muted)!important;cursor:pointer}
html body .imp-cols__intro{margin:0;padding:12px 18px;font-size:13px;color:var(--cs-muted);background:var(--cp-head,#F7F9FC);border-bottom:1px solid var(--cs-line)}
html body .imp-cols__intro strong{color:var(--cs-text)}
html body .imp-cols__body{overflow-x:auto}
html body table.imp-table{width:100%!important;max-width:none!important;margin:0!important;border:0!important;border-collapse:collapse;background:transparent!important;font-size:13.5px}
html body table.imp-table tr{background:transparent!important}
html body table.imp-table th{padding:10px 18px!important;background:var(--cp-head,#F7F9FC)!important;border:0!important;border-bottom:1px solid var(--cs-line)!important;font-size:12.5px;font-weight:600;color:var(--cs-muted);text-align:left;white-space:nowrap}
html body table.imp-table td{padding:11px 18px!important;border:0!important;border-bottom:1px solid var(--cs-line)!important;vertical-align:top;color:var(--cs-text);line-height:1.5}
html body table.imp-table tr:last-child td{border-bottom:0!important}
html body table.imp-table tr:hover td{background:var(--cp-row-hover,#F3F7FE)}
html body table.imp-table td.imp-table__n{width:56px;font-variant-numeric:tabular-nums;color:var(--cs-faint);font-weight:600}
html body table.imp-table td small{color:var(--cs-muted)}
html body .imp-pill{display:inline-flex;align-items:center;height:20px;margin-left:8px;padding:0 8px;border-radius:999px;font-size:11.5px;font-weight:600;vertical-align:1px;white-space:nowrap}
html body .imp-pill--req{background:var(--cs-err-soft);color:var(--cs-err)}
html body .imp-pill--opt{background:var(--cs-paper);color:var(--cs-muted);border:1px solid var(--cs-line)}
html body .imp-cols__empty{padding:28px;text-align:center;color:var(--cs-muted);font-size:13.5px}

html body .imp-history{margin:0 0 18px;overflow:hidden}
html body .imp-history table{width:100%;border-collapse:collapse;font-size:13.5px}
html body .imp-history th{padding:10px 18px;background:var(--cp-head,#F7F9FC);border-bottom:1px solid var(--cs-line);font-size:12.5px;font-weight:600;color:var(--cs-muted);text-align:left}
html body .imp-history td{padding:11px 18px;border-bottom:1px solid var(--cs-line);vertical-align:top}
html body .imp-history tr:last-child td{border-bottom:0}
html body .imp-history .imp-inv{display:flex;flex-wrap:wrap;gap:4px}
html body .imp-history .imp-inv span{display:inline-flex;height:22px;padding:0 7px;align-items:center;background:var(--cs-paper);border:1px solid var(--cs-line);font-size:12px;font-variant-numeric:tabular-nums}

@media (max-width:1100px){html body .imp-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:640px){html body .imp-step{grid-template-columns:30px minmax(0,1fr)}html body .imp-step > .imp-btn,html body .imp-step > .imp-link{grid-column:2}html body .imp-cols__find{width:100%}html body .imp-cols__tools{width:100%}html body .imp-submit{width:100%}}
/* Aperçu de l'import des ventes */
html body .imp-prev-set__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;padding:16px 18px 4px}
html body .imp-prev-set label{font-size:13px!important;font-weight:500!important;color:var(--cs-text)!important;margin-bottom:6px!important}
html body .imp-help{display:block;margin-top:5px;font-size:12px;color:var(--cs-faint)}
html body .imp-check li{color:var(--cs-muted)}
html body .imp-check li::before{border-color:var(--cs-line-2)!important}
html body .imp-check li.is-ok{color:var(--cs-text)}
html body .imp-check li.is-ok::before{border-color:var(--cs-ok)!important}
html body .imp-check li.is-ko{color:var(--cs-err)}
html body .imp-check li.is-ko::before{content:"!";left:4px;top:0;width:auto;height:auto;border:0!important;transform:none;font-weight:700;color:var(--cs-err)}
html body .imp-prev{max-height:520px;overflow:auto}
html body .imp-prev table.imp-table th,html body .imp-prev table.imp-table td{white-space:nowrap}
html body .imp-prev thead th{position:sticky;top:0;z-index:2}
html body .imp-prev thead tr.imp-prev__map th{top:39px;background:var(--cs-surface)!important;min-width:170px;padding:8px 10px!important}
html body .imp-prev thead tr.imp-prev__map th.is-mapped{background:var(--cs-brand-soft)!important}
html body .imp-prev .imp-prev__n{width:48px;min-width:48px!important;color:var(--cs-faint);font-variant-numeric:tabular-nums}
html body .imp-bar{position:sticky;bottom:0;z-index:30;display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:0 0 8px;padding:10px 14px;background:var(--cs-surface);border:1px solid var(--cs-line);border-radius:12px;box-shadow:0 -6px 18px rgba(14,42,92,.06);font-family:var(--cs-font)}
html body .imp-bar__state{margin-inline-end:auto;font-size:13px;font-weight:600;color:var(--cs-err)}
html body .imp-bar__state.is-ok{color:var(--cs-ok)}
@media (max-width:640px){html body .imp-prev-set__grid{grid-template-columns:minmax(0,1fr)}html body .imp-bar{flex-wrap:wrap}html body .imp-bar__state{width:100%}}
