/* Contactys CRM - Dark Mode — refonte v2 */
/* Activation : body.ctys-dark via css_inject.php */

body.ctys-dark {
  --ctys-primary:    #00d4ff;
  --ctys-dark:       #f0fbff;
  --ctys-light:      #0a1e2e;
  --ctys-th-bg:      #071520;
  --ctys-th-txt:     #7dd3e8;
  --ctys-row-odd:    #050d14;
  --ctys-row-even:   #091826;
  --ctys-hover:      #0e2540;
  --ctys-link:       #00d4ff;
  --ctys-bg-card:    #091826;
  --ctys-bg-section: #071520;
  --ctys-bg-accent:  #0e2540;
  --ctys-bg-err:     #2d0f0f;
  --ctys-text-main:  #f0fbff;
  --ctys-text-muted: #7dd3e8;
  --ctys-text-sub:   #b8e8f5;
  --ctys-text-mute2: #5cb8d0;
  --ctys-text-mute3: #3a9ab8;
  --ctys-text-link:  #00d4ff;
  --ctys-text-err:   #ff6b6b;
  --ctys-ok:         #4ade80;
  --ctys-border:     #1a4a60;
  --ctys-border-light: #0e2540;
  --ctys-bg-page:    #050d14;
  --ctys-bg-input:   #091826;
  --ctys-bg-odd:     #050d14;
  --ctys-bg-even:    #091826;
  --ctys-bg-hover:   #0e2540;
  --ctys-shadow:     0 2px 16px rgba(0,0,0,.7);
  background: #050d14;
  color: #f0fbff;
}

body.ctys-dark #id-right,
body.ctys-dark #id-container,
body.ctys-dark .id-container-page,
body.ctys-dark .fiche,
body.ctys-dark .fichecenter,
body.ctys-dark .div-table-responsive,
body.ctys-dark .centpercent,
body.ctys-dark .tabBar,
body.ctys-dark .llxbackground { background: #050d14 !important; color: #f0fbff !important; }

body.ctys-dark .llxheader,
body.ctys-dark .llxheader > *,
body.ctys-dark .llxheader table,
body.ctys-dark .llxheader td,
body.ctys-dark .llxheader tr,
body.ctys-dark #topmenu-login-dropdown,
body.ctys-dark #topmenulogin,
body.ctys-dark .topmenuloginbuttonpicto,
body.ctys-dark .dropdown-menu { background: #030a10 !important; color: #f0fbff !important; }
body.ctys-dark .llxheader a,
body.ctys-dark .llxheader span { color: #7dd3e8 !important; }
body.ctys-dark .llxheader .login,
body.ctys-dark #topmenulogin .login,
body.ctys-dark .topmenuloginbuttonpicto span { color: #f0fbff !important; font-weight: 600 !important; }
body.ctys-dark .llxheader { overflow: visible !important; }
body.ctys-dark #topmenu-login-dropdown { overflow: visible !important; min-width: 0 !important; }

body.ctys-dark #id-left,
body.ctys-dark #id-left > div,
body.ctys-dark #id-left > ul,
body.ctys-dark .side-nav,
body.ctys-dark .blockvmenu,
body.ctys-dark .blockvmenupair,
body.ctys-dark .blockvmenuimpair,
body.ctys-dark .blockvmenulast,
body.ctys-dark .blockvmenufirst,
body.ctys-dark .blockvmenuend,
body.ctys-dark .menu_contenu,
body.ctys-dark .vmenu-wrapper,
body.ctys-dark div[id^="GEN-menu"] { background: #030a10 !important; border: none !important; }
body.ctys-dark #id-left { border-right: 1px solid #0a2030 !important; background: #030a10 !important; }
body.ctys-dark .menu_top, body.ctys-dark .menu_end { display: none !important; }
body.ctys-dark .menu_titre { background: #030a10 !important; border-bottom: 1px solid #0a2030 !important; }
body.ctys-dark .menu_contenu > div { background: #030a10 !important; }
body.ctys-dark #id-left *,
body.ctys-dark #id-left a,
body.ctys-dark #id-left span,
body.ctys-dark .menu_titre a,
body.ctys-dark .blockvmenu a,
body.ctys-dark a.vmenu { color: #7dd3e8 !important; }
body.ctys-dark #id-left a:hover { color: #f0fbff !important; background: #0a2030 !important; }
body.ctys-dark .vmenusel .menu_titre,
body.ctys-dark .vmenusel .menu_titre a { color: #00d4ff !important; background: #091826 !important; border-left: 3px solid #00d4ff !important; }

body.ctys-dark .liste_titre,
body.ctys-dark tr.liste_titre th { background: #071520 !important; color: #7dd3e8 !important; border-color: #0a2030 !important; }
body.ctys-dark tr.oddeven,
body.ctys-dark tr.pair,
body.ctys-dark tr.impair { background: #050d14 !important; color: #f0fbff !important; }
body.ctys-dark tr.oddeven:hover,
body.ctys-dark tr.pair:hover,
body.ctys-dark tr.impair:hover { background: #0e2540 !important; }
body.ctys-dark td, body.ctys-dark th { color: #f0fbff !important; border-color: #0a2030 !important; }
body.ctys-dark a { color: #00d4ff !important; }

body.ctys-dark input,
body.ctys-dark select,
body.ctys-dark textarea { background: #0d1e28 !important; color: #d0eef8 !important; border-color: #1e4a5a !important; }

body.ctys-dark h1, body.ctys-dark h2, body.ctys-dark h3,
body.ctys-dark h4, body.ctys-dark h5, body.ctys-dark h6 { color: #d0eef8 !important; }
body.ctys-dark strong, body.ctys-dark b { color: #d0eef8 !important; }
body.ctys-dark label { color: #5db8cc !important; }

body.ctys-dark [style*="background:#fff"],
body.ctys-dark [style*="background: #fff"],
body.ctys-dark [style*="background:#ffffff"] { background: #0d1e28 !important; color: #d0eef8 !important; }
body.ctys-dark [style*="background:#f0f9fb"],
body.ctys-dark [style*="background:#e6f4f7"],
body.ctys-dark [style*="background:#cfe9ee"],
body.ctys-dark [style*="background:#f3fafc"],
body.ctys-dark [style*="background:#f4f8f9"],
body.ctys-dark [style*="background:#e0f2f6"],
body.ctys-dark [style*="background-color:#cfe9ee"] { background: #0a1922 !important; color: #d0eef8 !important; }

body.ctys-dark [style*="color:#005f6e"],
body.ctys-dark [style*="color:#004f5a"],
body.ctys-dark [style*="color:#0a1f24"],
body.ctys-dark [style*="color:#222"],
body.ctys-dark [style*="color:#333"],
body.ctys-dark [style*="color:#000"] { color: #d0eef8 !important; }
body.ctys-dark [style*="color:#007c91"] { color: #00b4d8 !important; }
body.ctys-dark [style*="color:#3a6b76"],
body.ctys-dark [style*="color:#5a8a96"] { color: #5db8cc !important; }

/* ── FICHE D'APPEL ── */
body.ctys-dark .ctys-callbox { background: #0d1e28 !important; box-shadow: 0 0 0 1.5px #00b4d8, 0 8px 32px rgba(0,0,0,.5) !important; }
body.ctys-dark .ctys-callbox-header { background: #0a1922 !important; border-bottom: 3px solid #00b4d8 !important; }
body.ctys-dark .ctys-callbox-header::before { background: linear-gradient(180deg,#00b4d8,#007c91) !important; }
body.ctys-dark .ctys-callbox-header h2 { color: #f0faff !important; font-size: 2.4em !important; }
body.ctys-dark .ctys-header-location { color: #5db8cc !important; }
body.ctys-dark .ctys-callbox-body { background: #08121a !important; }
body.ctys-dark .ctys-badge-header { background: #00b4d8 !important; color: #08121a !important; }
body.ctys-dark .ctys-stat-chip { background: #0d1e28 !important; border-color: #1e4a5a !important; color: #5db8cc !important; }
body.ctys-dark .ctys-enrich-btn-pappers { background: #007c91 !important; color: #fff !important; }
body.ctys-dark .ctys-enrich-btn-pj { background: #0d1e28 !important; color: #00b4d8 !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-enrich-btn-fiche { background: #0d1e28 !important; color: #5db8cc !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-section-lbl { color: #00b4d8 !important; }
body.ctys-dark .ctys-section-lbl::after { background: #00b4d8 !important; opacity: .3 !important; }
body.ctys-dark .ctys-briefing { background: #0d1e28 !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-briefing-lbl { color: #00b4d8 !important; }
body.ctys-dark .ctys-contact-card { background: #0d1e28 !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-contact-card:hover { border-color: #00b4d8 !important; }
body.ctys-dark .ctys-contact-avatar { background: #007c91 !important; }
body.ctys-dark .ctys-contact-name { color: #f0faff !important; font-size: 1em !important; }
body.ctys-dark .ctys-contact-func { color: #5db8cc !important; }
body.ctys-dark .ctys-contact-mail { color: #4a9ab0 !important; }
body.ctys-dark .ctys-tel-btn { background: #007c91 !important; color: #fff !important; border: none !important; font-size: 1.3em !important; font-weight: 800 !important; }
body.ctys-dark .ctys-tel-btn:hover { background: #009ab5 !important; }
body.ctys-dark .ctys-naf-pill { background: #0d1e28 !important; border-color: #1e4a5a !important; color: #5db8cc !important; }
body.ctys-dark .ctys-history { background: #0d1e28 !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-hist-row { border-bottom-color: #1e4a5a !important; }
body.ctys-dark .ctys-hist-date { color: #d0eef8 !important; font-size: .92em !important; }
body.ctys-dark .ctys-comment-area { background: #0d1e28 !important; border-color: #1e4a5a !important; color: #d0eef8 !important; font-size: 1em !important; }
body.ctys-dark .ctys-comment-area:focus { border-color: #00b4d8 !important; box-shadow: 0 0 0 3px rgba(0,180,216,.15) !important; }
body.ctys-dark .ctys-result-sep { color: #5db8cc !important; }
body.ctys-dark .ctys-result-sep::before,
body.ctys-dark .ctys-result-sep::after { background: #1e4a5a !important; }
body.ctys-dark .ctys-btn-nrp { background: #2d0505 !important; color: #f87171 !important; }
body.ctys-dark .ctys-btn-secondary { background: #2d0505 !important; color: #f87171 !important; }
body.ctys-dark .butAction { background: #007c91 !important; color: #fff !important; }
body.ctys-dark #ctys-classer-menu { background: #0d1e28 !important; border-color: #1e4a5a !important; }
body.ctys-dark #ctys-classer-menu button { background: #0d1e28 !important; color: #d0eef8 !important; }
body.ctys-dark #ctys-classer-menu button:hover { background: #112233 !important; }
body.ctys-dark #ctys-contacts-mail-wrap { background: #0d1e28 !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-form-rdv { background: #0a1e2a !important; border-color: #007c91 !important; }
body.ctys-dark .ctys-form-rappel { background: #1a1200 !important; border-color: #d97706 !important; }
body.ctys-dark .ctys-fg label { color: #5db8cc !important; }
body.ctys-dark .ctys-fg input,
body.ctys-dark .ctys-fg select { background: #0d1e28 !important; border-color: #1e4a5a !important; color: #d0eef8 !important; }

/* Tables ctys */
body.ctys-dark .ctys-table thead th { background: #0a1e2a !important; color: #5db8cc !important; border-bottom-color: #0e2535 !important; }
body.ctys-dark .ctys-table tbody tr:nth-child(odd) { background: #08121a !important; }
body.ctys-dark .ctys-table tbody tr:nth-child(even) { background: #0d1e28 !important; }
body.ctys-dark .ctys-table tbody tr:hover { background: #112233 !important; }
body.ctys-dark .ctys-table td { border-bottom-color: #0e2535 !important; color: #d0eef8 !important; }
body.ctys-dark .ctys-table td a { color: #00b4d8 !important; }

/* Dashboard */
body.ctys-dark .ctys-section { background: #0d1e28 !important; border-color: #1e4a5a !important; }
body.ctys-dark .ctys-section h3 { color: #5db8cc !important; }
body.ctys-dark .ctys-teleop-nom { color: #d0eef8 !important; }
body.ctys-dark .ctys-teleop-row { border-bottom-color: #0e2535 !important; }
body.ctys-dark .ctys-bar-wrap { background: #0e2535 !important; }
body.ctys-dark .ctys-teleop-ca { color: #00b4d8 !important; }
body.ctys-dark .ctys-kpi { background: #0d1e28 !important; border-top-color: #007c91 !important; }
body.ctys-dark .ctys-kpi-n { color: #00b4d8 !important; }

/* Dashboard v4 - nouvelles classes */
body.ctys-dark .ctys-card { background: #091826 !important; border-color: #1a4a60 !important; }
body.ctys-dark .ctys-card-lbl { color: #7dd3e8 !important; }
body.ctys-dark .ctys-card-sub { color: #3a9ab8 !important; }
body.ctys-dark .ctys-section { background: #091826 !important; border-color: #1a4a60 !important; }
body.ctys-dark .ctys-section-hd { border-bottom-color: #1a4a60 !important; }
body.ctys-dark .ctys-section-title { color: #00d4ff !important; }
body.ctys-dark .ctys-section-sub { color: #5cb8d0 !important; }
body.ctys-dark .ctys-t thead th { background: #071520 !important; color: #7dd3e8 !important; border-bottom-color: #1a4a60 !important; }
body.ctys-dark .ctys-t tbody td { border-bottom-color: #0a2030 !important; color: #f0fbff !important; }
body.ctys-dark .ctys-t tbody tr:hover { background: #0e2540 !important; }
body.ctys-dark .ctys-t tbody tr.me { background: #071f30 !important; }
body.ctys-dark .ctys-t tfoot td { background: #071520 !important; border-top-color: #1a4a60 !important; color: #f0fbff !important; }
body.ctys-dark .ctys-op-name { color: #f0fbff !important; }
body.ctys-dark .ctys-camp-name a { color: #00d4ff !important; }
body.ctys-dark .ctys-ca { color: #00d4ff !important; }
body.ctys-dark .ctys-muted { color: #3a9ab8 !important; }
body.ctys-dark .ctys-nb-appels { color: #00d4ff !important; }
body.ctys-dark .ctys-taux-d-frac { color: #5cb8d0 !important; }
body.ctys-dark .ctys-taux-d-bar-wrap { background: #1a4a60 !important; }

/* Bannière dashboard */
body.ctys-dark .ctys-banner { background: linear-gradient(135deg,#000d14 0%,#002535 55%,#004055 100%) !important; }
body.ctys-dark .ctys-mois-sel { background: rgba(0,120,150,.35) !important; border-color: rgba(0,210,255,.25) !important; }

/* Campagnes */
body.ctys-dark .ctys-camp-card { background: linear-gradient(135deg,#005f6e,#007c91) !important; }
body.ctys-dark .ctys-camp-card:hover { background: linear-gradient(135deg,#004d5a,#006a7d) !important; }

body.ctys-dark .ctys-queue { background: #0a1e2a !important; border-color: #007c91 !important; color: #5db8cc !important; }
body.ctys-dark .ctys-dropzone { background: #0d1e28 !important; border-color: #007c91 !important; }
body.ctys-dark hr { border-color: #0e2535 !important; opacity: .5 !important; }

/* Menu haut Dolibarr - titres et prénom */
body.ctys-dark .tmenu,
body.ctys-dark .tmenubold,
body.ctys-dark .tmenusel,
body.ctys-dark td.tmenu,
body.ctys-dark td.tmenubold,
body.ctys-dark td.tmenusel { color: #b8e8f5 !important; background: #030a10 !important; }
body.ctys-dark td.tmenusel,
body.ctys-dark .tmenusel { color: #00d4ff !important; font-weight: 700 !important; }
body.ctys-dark .topmenu-login-picto,
body.ctys-dark .topmenu-login-picto *,
body.ctys-dark span.login { color: #f0fbff !important; white-space: nowrap !important; }
body.ctys-dark #topmenu-search-dropdown,
body.ctys-dark #topmenu-bookmark-dropdown { color: #7dd3e8 !important; }

/* Rappels - accordéons et cartes */
body.ctys-dark .ctys-acc-header,
body.ctys-dark .ctys-accordion-header,
body.ctys-dark [class*="ctys-acc"],
body.ctys-dark [class*="rappel-group"],
body.ctys-dark [class*="ctys-rappel"] { background: #091826 !important; color: #f0fbff !important; border-color: #1a4a60 !important; }
body.ctys-dark [style*="background:#fff"],
body.ctys-dark [style*="background: #fff"],
body.ctys-dark [style*="background: white"],
body.ctys-dark [style*="background:white"] { background: #091826 !important; color: #f0fbff !important; }
body.ctys-dark [style*="background:#f"] { background: #071520 !important; }
body.ctys-dark [style*="color:#1e293b"],
body.ctys-dark [style*="color:#333"],
body.ctys-dark [style*="color:#222"] { color: #f0fbff !important; }
body.ctys-dark [style*="border-color:#e"] { border-color: #1a4a60 !important; }
body.ctys-dark [style*="border: 1px solid #e"],
body.ctys-dark [style*="border:1px solid #e"] { border-color: #1a4a60 !important; }
/* ── Fix cartes rappels (next_call.php vue téléop) ────────── */
/* Cartes rappel inline background:#fff avec border #fca5a5 ou #e6f4f7 */
body.ctys-dark [style*="background:#fff"][style*="border-left:4px solid"] { background: #0d1e28 !important; color: #d0eef8 !important; }
body.ctys-dark [style*="background:#fff"][style*="border-radius:12px"] { background: #0d1e28 !important; color: #d0eef8 !important; }
/* Header accordéon ouvert (background:#fff via JS ligne 793) */
body.ctys-dark [style*="background: #fff"] { background: #0d1e28 !important; color: #d0eef8 !important; }

/* ── Fix cartes clôturés (clotures.php) ───────────────────── */
body.ctys-dark .ctys-clos-row { background: #0d1e28 !important; border-color: #1a4a60 !important; color: #d0eef8 !important; }
body.ctys-dark .ctys-clos-row:hover { background: #112233 !important; box-shadow: 0 4px 14px rgba(0,0,0,.4) !important; }
body.ctys-dark .ctys-btn-outline { background: #091826 !important; border-color: #1a4a60 !important; color: #00d4ff !important; }
body.ctys-dark .ctys-btn-outline:hover { background: #0d1e28 !important; }
/* Select et inputs dans clotures */
body.ctys-dark select, body.ctys-dark input[type=text] { background: #0d1e28 !important; border-color: #1a4a60 !important; color: #d0eef8 !important; }
/* Bandeau succès vert */
body.ctys-dark [style*="background:#dcfce7"] { background: #0a2a1a !important; color: #4ade80 !important; border-color: #166534 !important; }
/* Texte société/contact en clair dans les cartes */
body.ctys-dark .ctys-clos-row * { color: #d0eef8 !important; }
body.ctys-dark .ctys-clos-row a { color: #00d4ff !important; }