/* ============================================================================
   CLICK SOFT — THÈME « ENCRE & PAPIER »  (sidebar · header · tableau de bord · licence)
   Chargé dans <head> APRÈS les autres feuilles modern-ui (layouts/partials/css.blade.php) :
   le nouveau design est appliqué dès le premier rendu, sans flash de l'ancien style.
   Les styles en ligne de sidebar/header/home (plus bas dans le DOM) sont surpassés par la spécificité
   (html body #id …) et, là où l'ancien CSS impose !important, par !important.
   Même identité que Connexion / Inscription : encre #0E2A5C, bleu #1459C7, papier #F4F6FA, IBM Plex Sans.
   ============================================================================ */
:root{--cs-ink:#0E2A5C;--cs-ink-2:#12336D;--cs-ink-3:#183F82;--cs-brand:#1459C7;--cs-brand-hover:#0F4AA8;--cs-brand-soft:#EAF1FD;--cs-paper:#F4F6FA;--cs-surface:#FFFFFF;--cs-line:#E3E8F0;--cs-line-2:#CDD6E4;--cs-text:#14213D;--cs-muted:#5B6B82;--cs-faint:#8A97AB;--cs-ok:#0F8B6F;--cs-ok-soft:#E5F5EF;--cs-warn:#B26A00;--cs-warn-soft:#FFF4DF;--cs-err:#C62D3A;--cs-err-soft:#FDECEE;--cs-violet:#5B4CC4;--cs-violet-soft:#EFEDFB;--cs-font:"IBM Plex Sans","IBM Plex Sans Arabic",system-ui,-apple-system,"Segoe UI",sans-serif;--cs-shell-h:64px}

/* ═════════════════════════ SIDEBAR (encre, dans les deux thèmes) ═════════════════════════ */
html body #swv-sidebar.swv-sidebar{--swv-bg:var(--cs-ink)!important;--swv-border:rgba(255,255,255,.08)!important;--swv-accent:#7FB3FF!important;--swv-accent-raw:127,179,255!important;--swv-accent-dim:rgba(255,255,255,.07)!important;--swv-section:rgba(255,255,255,.46)!important;--swv-bullet:rgba(255,255,255,.22)!important;background:linear-gradient(180deg,var(--cs-ink) 0%,#0B2450 100%)!important;font-family:var(--cs-font)!important;border-right:0!important}
html body #swv-sidebar.swv-sidebar::after{display:none!important}
html body #swv-sidebar .swv-sidebar__logo-bar{background:transparent!important;border-bottom:1px solid rgba(255,255,255,.08)!important}
html body #swv-sidebar .swv-sidebar__logo{height:var(--cs-shell-h)!important;padding:0 16px!important;gap:12px!important}
html body #swv-sidebar .swv-sidebar__logo::before{display:none!important}
html body #swv-sidebar .swv-sidebar__logo:hover{background:rgba(255,255,255,.04)!important}
html body #swv-sidebar .swv-sidebar__logo-icon{width:36px!important;height:36px!important;border-radius:9px!important;box-shadow:0 0 0 1px rgba(255,255,255,.14)!important}
html body #swv-sidebar .swv-sidebar__logo-name{font-size:15px!important;font-weight:600!important;letter-spacing:0!important}
html body #swv-sidebar .swv-sidebar__logo-sub{font-size:12px!important;letter-spacing:0!important;text-transform:none!important;color:rgba(255,255,255,.5)!important;margin-top:1px!important}

/* Recherche */
html body #swv-sidebar .swv-search{margin:12px 12px 6px!important}
html body #swv-sidebar .swv-search__input{background:rgba(255,255,255,.07)!important;border:1px solid transparent!important;border-radius:8px!important;color:#fff!important;font-family:var(--cs-font)!important;font-size:13.5px!important;height:36px!important}
html body #swv-sidebar .swv-search__input::placeholder{color:rgba(255,255,255,.45)!important}
html body #swv-sidebar .swv-search__input:focus{border-color:rgba(127,179,255,.55)!important;background:rgba(255,255,255,.1)!important;box-shadow:none!important}
html body #swv-sidebar .swv-search__kbd{background:transparent!important;border:1px solid rgba(255,255,255,.2)!important;color:rgba(255,255,255,.55)!important;font-family:var(--cs-font)!important}

/* Sections : casse normale, lisibles, sans filet décoratif */
html body #swv-sidebar .swv-nav__section{padding:18px 22px 6px!important;font-size:12px!important;font-weight:500!important;letter-spacing:0!important;text-transform:none!important;color:rgba(255,255,255,.46)!important}
html body #swv-sidebar .swv-nav__section::after{display:none!important}
html body #swv-sidebar .swv-nav__section:first-child{padding-top:8px!important}

/* Liens */
html body #swv-sidebar .swv-nav__link,
html body #swv-sidebar .swv-nav__dropdown-toggle{gap:12px!important;padding:8px 12px!important;margin:1px 10px!important;border-radius:8px!important;font-size:14px!important;font-weight:400!important;color:rgba(255,255,255,.78)!important;letter-spacing:0!important}
html body #swv-sidebar .swv-nav__link svg,
html body #swv-sidebar .swv-nav__dropdown-toggle svg.icon{width:18px!important;height:18px!important;opacity:.72!important}
html body #swv-sidebar .swv-nav__link:hover,
html body #swv-sidebar .swv-nav__dropdown-toggle:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html body #swv-sidebar .swv-nav__link:hover svg,
html body #swv-sidebar .swv-nav__dropdown-toggle:hover svg.icon{opacity:1!important}
html body #swv-sidebar .swv-nav__link::before,
html body #swv-sidebar .swv-nav__dropdown-toggle::before{display:none!important}

/* L'élément actif = étiquette papier sur l'encre */
html body #swv-sidebar .swv-nav__link.active,
html body #swv-sidebar .swv-nav__link.active:hover{background:#fff!important;color:var(--cs-ink)!important;font-weight:600!important}
html body #swv-sidebar .swv-nav__link.active svg{opacity:1!important;color:var(--cs-brand)!important;stroke:var(--cs-brand)!important}
/* Parent d'un sous-menu actif : discret (l'étiquette va au sous-lien) */
html body #swv-sidebar .swv-nav__dropdown-toggle.has-active{background:transparent!important;color:#fff!important;font-weight:600!important}
html body #swv-sidebar .swv-nav__dropdown-toggle.has-active svg.icon{opacity:1!important;color:#fff!important}
html body #swv-sidebar .swv-nav__link,html body #swv-sidebar .swv-nav__dropdown-toggle,html body #swv-sidebar a.swv-nav__sublink{box-shadow:none!important;outline:0!important;min-height:0!important}
html body #swv-sidebar .swv-nav__link:focus-visible,html body #swv-sidebar .swv-nav__dropdown-toggle:focus-visible,html body #swv-sidebar a.swv-nav__sublink:focus-visible{box-shadow:0 0 0 2px #7FB3FF!important}
html body #swv-sidebar .swv-nav__chevron{opacity:.5!important;width:14px!important;height:14px!important}

/* Sous-menu : fil de guidage sous l'icône du parent + étiquette pour la page courante */
html body #swv-sidebar .swv-nav__submenu{margin:0 10px 4px 31px!important;border-left:1px solid rgba(255,255,255,.14)!important}
html body #swv-sidebar .swv-nav__submenu:not(.open){border-left-color:transparent!important}
html body #swv-sidebar a.swv-nav__sublink{margin:1px 0 1px 8px!important;padding:0 10px!important;height:32px!important;font-size:13.5px!important;color:rgba(255,255,255,.68)!important;border-radius:7px!important;letter-spacing:0!important}
html body #swv-sidebar a.swv-nav__sublink::before{display:none!important}
html body #swv-sidebar a.swv-nav__sublink:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html body #swv-sidebar a.swv-nav__sublink.active{background:#fff!important;color:var(--cs-ink)!important;font-weight:600!important}

/* Pied */
html body #swv-sidebar .swv-sidebar__footer{border-top:1px solid rgba(255,255,255,.08)!important;padding:10px 12px 12px!important;flex-direction:row!important}
html body #swv-sidebar .swv-foot-link{flex:1!important;justify-content:center!important;color:rgba(255,255,255,.7)!important;font-size:13px!important;font-family:var(--cs-font)!important;border:1px solid rgba(255,255,255,.12)!important;background:transparent!important;border-radius:8px!important}
html body #swv-sidebar .swv-foot-link:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}

/* Mode replié : l'étiquette reste lisible */
#swv-sidebar.swv-collapsed .swv-sidebar__logo{height:var(--cs-shell-h)!important}
body.sidebar-collapse .swv-nav__link,
body.sidebar-collapse .swv-nav__dropdown-toggle,
#swv-sidebar.swv-collapsed .swv-nav__link,
#swv-sidebar.swv-collapsed .swv-nav__dropdown-toggle{margin:2px 10px!important}
body.sidebar-collapse .swv-nav__dropdown-toggle.has-active,
#swv-sidebar.swv-collapsed .swv-nav__dropdown-toggle.has-active{background:#fff!important}
body.sidebar-collapse .swv-nav__dropdown-toggle.has-active svg.icon,
#swv-sidebar.swv-collapsed .swv-nav__dropdown-toggle.has-active svg.icon{color:var(--cs-brand)!important}

/* ═════════════════════════ HEADER (papier en thème clair) ═════════════════════════ */
html body #h5-header{height:var(--cs-shell-h)!important;font-family:var(--cs-font)!important;gap:8px!important;padding:0 20px!important}
html body #h5-header::after{display:none!important}

html body #h5-header{background:var(--cs-surface)!important;border-bottom:1px solid var(--cs-line)!important}
html body #h5-header .h5-menu,
html body #h5-header .h5-btn,
html body #h5-header .h5-btxt,
html body #h5-header .h5-btn-user{border:1px solid transparent!important;color:var(--cs-muted)!important;background:transparent!important;height:38px!important}
html body #h5-header .h5-menu,
html body #h5-header .h5-btn{width:38px!important}
html body #h5-header .h5-btxt{font-size:14px!important;font-weight:500!important;color:var(--cs-text)!important}
html body #h5-header .h5-menu:hover,
html body #h5-header .h5-btn:hover,
html body #h5-header .h5-btxt:hover,
html body #h5-header .h5-btn-user:hover,
html body #h5-header .h5-dd.open > .h5-btxt,
html body #h5-header .h5-dd.open > .h5-btn,
html body #h5-header .h5-dd.open > .h5-btn-user{background:var(--cs-paper)!important;border-color:var(--cs-line)!important;color:var(--cs-text)!important}
html body #h5-header .h5-caret{color:var(--cs-faint)!important}
html body #h5-header .h5-vl{background:var(--cs-line)!important;height:24px!important}
html body #h5-header .h5-date{font-family:var(--cs-font)!important;font-variant-numeric:tabular-nums!important;letter-spacing:0!important;font-size:13px!important;color:var(--cs-muted)!important;background:transparent!important;border:0!important;padding:0 6px!important}
html body #h5-header .h5-username{color:var(--cs-text)!important;font-size:14px!important;font-weight:500!important}
html body #h5-header .h5-back{background:var(--cs-err-soft)!important;color:var(--cs-err)!important;border-color:transparent!important}

/* Point de vente : l'action principale, pleine */
html body #h5-header .h5-pos{height:38px!important;padding:0 16px!important;border-radius:8px!important;border:0!important;background:var(--cs-brand)!important;color:#fff!important;font-size:14px!important;font-weight:600!important;letter-spacing:0!important;box-shadow:none!important}
html body #h5-header .h5-pos:hover{background:var(--cs-brand-hover)!important;box-shadow:none!important;color:#fff!important}
html body #h5-header .h5-pos:focus-visible{box-shadow:0 0 0 3px rgba(20,89,199,.35)!important}

/* Avatar et pastille de notification */
html body #h5-header .h5-avatar,
html body .h5-phead-av{background:var(--cs-ink)!important;border-radius:50%!important;box-shadow:none!important;font-weight:600!important}
html body #h5-header .h5-badge{background:var(--cs-err)!important;color:#fff!important;border:2px solid var(--cs-surface)!important;box-shadow:none!important;font-size:10px!important;min-width:18px!important;height:18px!important;border-radius:9px!important;top:3px!important;right:3px!important}

/* Menus déroulants clairs */
html body .h5-panel{background:var(--cs-surface)!important;border:1px solid var(--cs-line)!important;border-radius:12px!important;box-shadow:0 16px 40px rgba(14,42,92,.14),0 2px 6px rgba(14,42,92,.06)!important;font-family:var(--cs-font)!important}
html body .h5-phead{background:var(--cs-paper)!important;border-bottom:1px solid var(--cs-line)!important}
html body .h5-phead-sub{color:var(--cs-muted)!important;text-transform:none!important;letter-spacing:0!important;font-size:12px!important}
html body .h5-phead-name{color:var(--cs-text)!important;font-size:14px!important}
html body .h5-plabel{color:var(--cs-faint)!important;text-transform:none!important;letter-spacing:0!important;font-size:12px!important;font-weight:500!important}
html body .h5-pitem{color:var(--cs-text)!important;font-size:14px!important}
html body .h5-pitem svg{color:var(--cs-faint)!important}
html body .h5-pitem:hover,
html body .h5-pitem.active{background:var(--cs-brand-soft)!important;color:var(--cs-brand)!important}
html body .h5-pitem:hover svg{color:var(--cs-brand)!important}
html body .h5-pitem.danger{color:var(--cs-err)!important}
html body .h5-pitem.danger svg{color:var(--cs-err)!important}
html body .h5-pitem.danger:hover{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html body .h5-psep{background:var(--cs-line)!important}
html body #hrm-popup-error{color:var(--cs-err)!important}
html body .hrm-mini-track{background:var(--cs-line-2)!important;border-color:var(--cs-line-2)!important}
html body .hrm-mini-switch input:checked + .hrm-mini-track{background:var(--cs-brand)!important;border-color:var(--cs-brand)!important;box-shadow:none!important}
/* Le bouton « Données démo » garde son signal rouge, version claire */
html body #h5-header form .h5-btxt[style*="239,68,68"]{background:var(--cs-err-soft)!important;color:var(--cs-err)!important;border-color:transparent!important}

/* ═════════════════════════ TABLEAU DE BORD ═════════════════════════ */
html body{--dw-primary:var(--cs-brand)!important;--dw-primary-lt:var(--cs-brand-soft)!important;--dw-primary-dk:var(--cs-brand-hover)!important;--dw-accent:#0E7C9E!important;--dw-accent-lt:#E4F3F8!important;--dw-success:var(--cs-ok)!important;--dw-success-lt:var(--cs-ok-soft)!important;--dw-warning:var(--cs-warn)!important;--dw-warning-lt:var(--cs-warn-soft)!important;--dw-danger:var(--cs-err)!important;--dw-danger-lt:var(--cs-err-soft)!important;--dw-info:var(--cs-brand)!important;--dw-info-lt:var(--cs-brand-soft)!important;--dw-purple:var(--cs-violet)!important;--dw-purple-lt:var(--cs-violet-soft)!important;--dw-bg:var(--cs-paper)!important;--dw-border:var(--cs-line)!important;--dw-border2:var(--cs-line-2)!important;--dw-text:var(--cs-text)!important;--dw-text2:var(--cs-muted)!important;--dw-muted:var(--cs-muted)!important;--dw-placeholder:var(--cs-faint)!important;--dw-shadow-sm:none!important;--dw-shadow-md:none!important;--dw-shadow-hover:none!important;--dw-shadow-panel:none!important;--dw-radius:12px!important;--dw-gap:16px!important}
html body .content-wrapper,
html body #scrollable-container{background:var(--cs-paper)!important}
html body #erp-dash{--p-blue:var(--cs-brand)!important;--p-blue-lt:var(--cs-brand-soft)!important;--p-green:var(--cs-ok)!important;--p-green-lt:var(--cs-ok-soft)!important;--p-amber:var(--cs-warn)!important;--p-amber-lt:var(--cs-warn-soft)!important;--p-red:var(--cs-err)!important;--p-red-lt:var(--cs-err-soft)!important;--p-purple:var(--cs-violet)!important;--p-purple-lt:var(--cs-violet-soft)!important;--bg:var(--cs-paper)!important;--border:var(--cs-line)!important;--bord2:var(--cs-line-2)!important;--tx:var(--cs-text)!important;--tx2:var(--cs-muted)!important;--tx3:var(--cs-faint)!important;--sh:none!important;--sh2:none!important;--sh3:0 12px 32px rgba(14,42,92,.10)!important;--r:10px!important;--rg:12px!important;--g:16px!important;background:var(--cs-paper)!important}
html body #erp-dash{font-family:var(--cs-font)!important;font-size:14px!important;padding:28px 32px 56px!important;max-width:1600px!important;margin:0 auto!important}
html body #erp-dash .display_currency,
html body #erp-dash [class*="__value"],
html body #erp-dash [class*="__count"],
html body #erp-dash [class*="-val"]{font-variant-numeric:tabular-nums!important}

/* En-tête du tableau de bord */
html body #erp-dash .eh{border-bottom:0!important;padding-bottom:0!important;margin-bottom:24px!important;align-items:center!important}
html body #erp-dash .eh__left{display:flex!important;align-items:center!important;gap:0!important}
html body #erp-dash .eh__icon-wrap{display:none!important}
html body #erp-dash .eh__title{font-size:26px!important;font-weight:600!important;letter-spacing:-.01em!important;line-height:1.2!important;margin:0 0 4px!important}
html body #erp-dash .eh__date-pill{background:transparent!important;border:0!important;padding:0!important;color:var(--cs-muted)!important;font-size:14px!important;font-weight:400!important;letter-spacing:0!important;text-transform:none!important}
html body #erp-dash .eh__date-pill i{display:none!important}
html body #erp-dash .eh__update-pill{background:transparent!important;border:0!important;box-shadow:none!important;color:var(--cs-muted)!important;font-size:13px!important;padding:0!important}
html body #erp-dash .eh__update-pill .fa-sync-alt{color:var(--cs-ok)!important}

/* Cartes : filet fin, pas d'ombre, pas de lévitation */
html body #erp-dash .kpi-invoice,
html body #erp-dash .dw-kpi,
html body #erp-dash .dw-panel,
html body #erp-dash .ec,
html body #erp-dash .bidir-panel,
html body #erp-dash .ekpi,
html body #erp-dash .e-bank-card,
html body #erp-dash .dw-bank-card{border:1px solid var(--cs-line)!important;border-radius:12px!important;box-shadow:none!important;transform:none!important;background:var(--cs-surface)!important}
html body #erp-dash .kpi-invoice:hover,
html body #erp-dash .dw-kpi:hover,
html body #erp-dash .ec:hover,
html body #erp-dash .dw-panel:hover{border-color:var(--cs-line-2)!important}
html body #erp-dash .dw-kpi{border-left-width:1px!important}

/* Libellés : casse normale (fini les MAJUSCULES espacées) */
html body #erp-dash .kpi-invoice__label,
html body #erp-dash .dw-kpi__label,
html body #erp-dash .ekpi__label,
html body #erp-dash .e-slbl,
html body #erp-dash .dw-stat-item small,
html body #erp-dash .e-fin-lbl{text-transform:none!important;letter-spacing:0!important;font-size:13.5px!important;font-weight:500!important;color:var(--cs-muted)!important}

/* Factures : le chiffre domine, la somme suit */
html body #erp-dash .kpi-invoice{padding:20px 22px!important;gap:10px!important}
html body #erp-dash .kpi-invoice__menu{display:none!important}
html body #erp-dash .kpi-invoice__ico{width:36px!important;height:36px!important;border-radius:9px!important;font-size:15px!important}
html body #erp-dash .kpi-invoice__count{font-size:30px!important;font-weight:600!important;color:var(--cs-text)!important}
html body #erp-dash .kpi-invoice__sep{font-size:15px!important;color:var(--cs-muted)!important}
html body #erp-dash .kpi-invoice__bar{height:6px!important;border-radius:3px!important;background:var(--cs-paper)!important}
html body #erp-dash .kpi-invoice--amber{box-shadow:inset 0 3px 0 var(--cs-warn)!important}
html body #erp-dash .kpi-invoice--green{box-shadow:inset 0 3px 0 var(--cs-ok)!important}
html body #erp-dash .kpi-invoice--red{box-shadow:inset 0 3px 0 var(--cs-err)!important}
html body #erp-dash .kpi-invoice__ico--amber{background:var(--cs-warn-soft)!important;color:var(--cs-warn)!important}
html body #erp-dash .kpi-invoice__ico--green{background:var(--cs-ok-soft)!important;color:var(--cs-ok)!important}
html body #erp-dash .kpi-invoice__ico--red{background:var(--cs-err-soft)!important;color:var(--cs-err)!important}
html body #erp-dash .kpi-invoice__bar-fill--amber{background:var(--cs-warn)!important}
html body #erp-dash .kpi-invoice__bar-fill--green{background:var(--cs-ok)!important}
html body #erp-dash .kpi-invoice__bar-fill--red{background:var(--cs-err)!important}

/* KPI compacts */
html body #erp-dash .dw-kpi{padding:16px 18px!important;gap:6px!important;min-height:0!important}
html body #erp-dash .dw-kpi__menu{display:none!important}
html body #erp-dash .dw-kpi__icon,
html body #erp-dash .dw-kpi__icon-wrap{width:32px!important;height:32px!important;border-radius:8px!important;font-size:13px!important}
html body #erp-dash .dw-kpi__value{white-space:nowrap!important;font-size:clamp(17px,1.35vw,21px)!important;font-weight:600!important;color:var(--cs-text)!important;letter-spacing:-.01em!important}
html body #erp-dash .dw-kpi__sub,
html body #erp-dash .dw-kpi__sub small{font-size:12.5px!important;color:var(--cs-muted)!important;text-transform:none!important;letter-spacing:0!important}
html body #erp-dash .dw-kpi__delta{border-radius:6px!important;font-weight:600!important;font-size:12px!important}

/* Panneaux et titres de section */
html body #erp-dash .dw-panel__head,
html body #erp-dash .ec__hd,
html body #erp-dash .bidir-panel__head{padding:16px 20px!important;border-bottom:1px solid var(--cs-line)!important;background:transparent!important}
html body #erp-dash .dw-panel__title,
html body #erp-dash .ec__title,
html body #erp-dash .bidir-panel__title{font-size:16px!important;font-weight:600!important;color:var(--cs-text)!important;letter-spacing:0!important;text-transform:none!important}
html body #erp-dash .dw-panel__title::before{display:none!important}
html body #erp-dash .ec__sub{color:var(--cs-muted)!important;font-size:13px!important}
html body #erp-dash .ec__ico{border-radius:8px!important}

/* Boutons et sélecteurs de période */
html body #erp-dash .e-btn-date,
html body #erp-dash .block-daterange__btn,
html body #erp-dash .dw-period-select,
html body #erp-dash .dw-year-btn{box-shadow:none!important;border:1px solid var(--cs-line)!important;border-radius:8px!important;font-family:var(--cs-font)!important;font-size:13.5px!important;color:var(--cs-text)!important}
html body #erp-dash .e-btn-date:hover,
html body #erp-dash .block-daterange__btn:hover{border-color:var(--cs-brand)!important;color:var(--cs-brand)!important}
html body #erp-dash .select2-container--default .select2-selection--single{box-shadow:none!important;border-radius:8px!important;border-color:var(--cs-line)!important}

/* Tableaux du tableau de bord */
html body #erp-dash table.dataTable thead th,
html body #erp-dash table thead th{text-transform:none!important;letter-spacing:0!important;font-size:13px!important;font-weight:600!important;color:var(--cs-muted)!important;background:var(--cs-paper)!important;border-bottom:1px solid var(--cs-line)!important}
html body #erp-dash table tbody td{border-color:var(--cs-line)!important;font-size:13.5px!important}

/* Entrée de page : une seule séquence, discrète */
@media (prefers-reduced-motion:no-preference){
  html body #erp-dash .dw-section{animation:csRise .35s cubic-bezier(.2,.7,.2,1) both!important}
  html body #erp-dash .dw-section:nth-child(2){animation-delay:.05s!important}
  html body #erp-dash .dw-section:nth-child(3){animation-delay:.1s!important}
}
@keyframes csRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

@media (max-width:1200px){html body #erp-dash .dw-grid--5{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media (max-width:900px){
  html body #erp-dash{padding:20px 16px 48px!important}
  html body #erp-dash .dw-grid--3,html body #erp-dash .dw-grid--5{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:560px){
  html body #erp-dash .dw-grid--3,html body #erp-dash .dw-grid--5{grid-template-columns:1fr!important}
  html body #erp-dash .eh__title{font-size:22px!important}
}

/* ── Raffinements v6 ── */
/* Sidebar : bloc logo dans la continuité de l'encre (window-overrides.css le peignait en noir) */
html body #swv-sidebar .swv-sidebar__logo-bar,
html body #swv-sidebar .swv-sidebar__logo{background:transparent!important}
html body #swv-sidebar .swv-sidebar__logo:hover{background:rgba(255,255,255,.04)!important}
html body #swv-sidebar .swv-sidebar__logo-icon{background:rgba(255,255,255,.08)!important;border:0!important}

/* Header : titre de page à gauche */
html body #h5-header .h5-title{margin:0 0 0 4px!important;font-family:var(--cs-font)!important;font-size:16px!important;font-weight:600!important;letter-spacing:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:34vw!important;line-height:1!important}
html body #h5-header .h5-title{color:var(--cs-text)!important}
/* Date : même police que le reste (plus de chasse fixe) */
html body #h5-header .h5-date{font-family:var(--cs-font)!important;letter-spacing:0!important}
/* Cloche des notifications : bouton fantôme comme ses voisins (elle était en aplat teal) */
html body #h5-header .notifications-menu{list-style:none!important;position:relative!important;display:flex!important}
html body #h5-header .notifications-menu > a.dropdown-toggle{width:38px!important;height:38px!important;padding:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;--tw-ring-shadow:0 0 #0000!important;--tw-ring-color:transparent!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;position:relative!important}
html body #h5-header .notifications-menu > a.dropdown-toggle{color:var(--cs-muted)!important}
html body #h5-header .notifications-menu > a.dropdown-toggle:hover,
html body #h5-header .notifications-menu.open > a.dropdown-toggle{background:var(--cs-paper)!important;color:var(--cs-text)!important}
html body #h5-header .notifications-menu .notifications_count{position:absolute!important;top:3px!important;right:3px!important;min-width:17px!important;height:17px!important;padding:0 4px!important;border-radius:9px!important;background:var(--cs-err)!important;color:#fff!important;font:600 10px/17px var(--cs-font)!important;border:2px solid var(--cs-surface)!important;box-sizing:content-box!important}
html body #h5-header .notifications-menu .notifications_count:empty{display:none!important}
/* Icônes sans libellé : même gris, même taille */
html body #h5-header .h5-btn svg{width:19px!important;height:19px!important}

/* ═════════════════════════ MODE SOMBRE — même charte, encre profonde ═════════════════════════
   Les règles ci-dessus utilisent uniquement les jetons --cs-* : en sombre, seuls les jetons changent.
   Fond = encre très profonde (bleutée, pas noir neutre), surfaces = encre, filets bleus, textes papier. */
:root[data-theme="dark"]{
  --cs-ink:#0C1D42; --cs-ink-2:#10244F; --cs-ink-3:#163066;
  --cs-brand:#2F74E0; --cs-brand-hover:#3F84F0; --cs-brand-soft:rgba(91,155,255,.14);
  --cs-paper:#0A1631; --cs-surface:#10203F; --cs-line:#1F3561; --cs-line-2:#2A4475;
  --cs-text:#E7EDF8; --cs-muted:#A9B8D1; --cs-faint:#7487A6;
  --cs-ok:#34C59B; --cs-ok-soft:rgba(52,197,155,.14); --cs-warn:#F2B544; --cs-warn-soft:rgba(242,181,68,.14);
  --cs-err:#F06B77; --cs-err-soft:rgba(240,107,119,.14); --cs-violet:#A598F5; --cs-violet-soft:rgba(165,152,245,.15);
  /* jetons hérités (design-tokens.css / dark-theme.css) alignés sur la charte */
  --c-bg:#0A1631; --c-surface:#10203F; --c-surface-2:#16294D; --c-border:#1F3561; --c-border-strong:#2A4475;
  --c-text:#E7EDF8; --c-text-soft:#A9B8D1; --c-text-muted:#7487A6; --c-brand-500:#2F74E0; --c-brand-600:#7FB3FF;
  --dk-bg:#0A1631; --dk-surface:#10203F; --dk-surface-2:#16294D; --dk-surface-3:#1C335C;
  --dk-border:rgba(148,175,220,.14); --dk-border-2:rgba(148,175,220,.22);
  --dk-text:#E7EDF8; --dk-text-soft:#A9B8D1; --dk-text-mute:#7487A6; --dk-hover:rgba(91,155,255,.10); --dk-accent:#7FB3FF;
  --w-brand:#2F74E0; --w-brand-hover:#3F84F0; --w-brand-soft:rgba(91,155,255,.14);
}
/* Fond de page partout (plus de bande blanche sous la sidebar) */
html, html body{background:var(--cs-paper)!important}
html[data-theme="dark"] body, html[data-theme="dark"] body .content-wrapper, html[data-theme="dark"] body #scrollable-container,
html[data-theme="dark"] body main{background:var(--cs-paper)!important;color:var(--cs-text)!important}
/* Sidebar sombre : encre un ton plus dense que les cartes, filet de séparation */
html[data-theme="dark"] body #swv-sidebar.swv-sidebar{background:var(--cs-ink)!important;border-right:1px solid var(--cs-line)!important}
html[data-theme="dark"] body #swv-sidebar .swv-nav__link.active,
html[data-theme="dark"] body #swv-sidebar a.swv-nav__sublink.active{background:#E7EDF8!important;color:#0E2A5C!important}
/* Header sombre : surface d'encre, filet bleu */
html[data-theme="dark"] body #h5-header{background:var(--cs-ink)!important;border-bottom:1px solid var(--cs-line)!important}
html[data-theme="dark"] body #h5-header .h5-btxt,html[data-theme="dark"] body #h5-header .h5-btn,html[data-theme="dark"] body #h5-header .h5-menu,
html[data-theme="dark"] body #h5-header .h5-btn-user{background:transparent!important;border-color:transparent!important}
html[data-theme="dark"] body #h5-header .h5-btxt:hover,html[data-theme="dark"] body #h5-header .h5-btn:hover,html[data-theme="dark"] body #h5-header .h5-menu:hover,
html[data-theme="dark"] body #h5-header .h5-btn-user:hover,html[data-theme="dark"] body #h5-header .h5-dd.open > .h5-btxt,html[data-theme="dark"] body #h5-header .h5-dd.open > .h5-btn,html[data-theme="dark"] body #h5-header .h5-dd.open > .h5-btn-user{background:rgba(255,255,255,.06)!important;border-color:var(--cs-line)!important}
/* Menus déroulants du header (Actions rapides, Paramètres, profil) : fond plein, lisible, défilable */
html[data-theme="dark"] body #h5-header .h5-panel,html[data-theme="dark"] body .h5-panel{background:var(--cs-surface)!important;border:1px solid var(--cs-line-2)!important;color:var(--cs-text)!important;box-shadow:0 18px 44px rgba(0,0,0,.55)!important}
html[data-theme="dark"] body .h5-phead{background:var(--cs-ink-2)!important}
html[data-theme="dark"] body .h5-psep{background:var(--cs-line)!important}
html[data-theme="dark"] body .h5-pitem:hover,html[data-theme="dark"] body .h5-pitem.active{background:var(--cs-brand-soft)!important;color:#fff!important}
html[data-theme="dark"] body .h5-pitem:hover svg,html[data-theme="dark"] body .h5-pitem.active svg{color:var(--cs-brand-hover)!important}
html body .h5-panel{max-height:calc(100vh - 90px)!important;overflow-y:auto!important;overscroll-behavior:contain}
html body .h5-panel::-webkit-scrollbar{width:8px}
html body .h5-panel::-webkit-scrollbar-thumb{background:var(--cs-line-2);border-radius:8px}
html[data-theme="dark"] body #h5-header .h5-avatar,html[data-theme="dark"] body .h5-phead-av{background:#2F74E0!important}
/* Calculatrice et autres menus du header en sombre */
html[data-theme="dark"] body .dropdown-menu,html[data-theme="dark"] body .popover{background:var(--cs-surface)!important;border-color:var(--cs-line)!important;color:var(--cs-text)!important}

/* Tableau de bord : graphiques sur la surface de la carte (plus de boîte noire dans la carte) */
html body #erp-dash .highcharts-background{fill:transparent!important}
html body #erp-dash .highcharts-container,html body #erp-dash .e-chart-box{background:transparent!important}
html[data-theme="dark"] body #erp-dash .highcharts-axis-labels text,html[data-theme="dark"] body #erp-dash .highcharts-legend-item text{fill:var(--cs-muted)!important;color:var(--cs-muted)!important}
html[data-theme="dark"] body #erp-dash .highcharts-grid-line{stroke:var(--cs-line)!important}
/* Petits libellés : casse normale partout dans le tableau de bord */
html body #erp-dash [class*="__lbl"],html body #erp-dash [class*="__label"],html body #erp-dash .bidir-card__docs,
html body #erp-dash .dw-stat-item__lbl,html body #erp-dash .dues-stat__lbl,html body #erp-dash .e-bank-card__bal-lbl,
html body #erp-dash table thead th{text-transform:none!important;letter-spacing:0!important;font-size:12.5px!important;font-weight:500!important}
/* Sélecteurs et champs du tableau de bord en sombre */
html[data-theme="dark"] body #erp-dash select,html[data-theme="dark"] body #erp-dash .form-control,
html[data-theme="dark"] body #erp-dash .select2-container--default .select2-selection--single{background:var(--cs-surface)!important;color:var(--cs-text)!important;border-color:var(--cs-line-2)!important}
html[data-theme="dark"] body #erp-dash .dataTables_wrapper,html[data-theme="dark"] body #erp-dash table{background:transparent!important}
html[data-theme="dark"] body #erp-dash table thead th{background:rgba(255,255,255,.03)!important}
