/* MoveFleet 1.6.5.71 — Mode sombre global.
   Palette volontairement ardoise/bleu-noir : pas de noir pur sur les grandes surfaces. */
html.mf-dark-mode,
html.mf-tsingoni-ui-active.mf-dark-mode{
  background:#08111d!important;
  color-scheme:dark!important;
}
body.mf-tsingoni-ui.mf-dark-mode,
html.mf-dark-mode body.mf-tsingoni-ui{
  --mft-ink:#f4f7fb;
  --mft-text:#d7e0ec;
  --mft-muted:#94a5ba;
  --mft-line:#29384c;
  --mft-surface:#0d1725;
  --mft-surface-2:#121d2c;
  --mft-white:#111c2b;
  --mft-shadow:0 24px 70px rgba(0,0,0,.34);
  --mft-shadow-soft:0 12px 34px rgba(0,0,0,.24);
  --mft-dark-bg:#08111d;
  --mft-dark-surface:#101b2a;
  --mft-dark-surface-2:#152235;
  --mft-dark-surface-3:#1a293d;
  --mft-dark-border:#2a3b52;
  --mft-dark-text:#f3f6fa;
  --mft-dark-muted:#9dacc0;
  background:
    radial-gradient(circle at 8% 0%,rgba(7,91,181,.10),transparent 28%),
    radial-gradient(circle at 92% 4%,rgba(17,169,107,.07),transparent 25%),
    #08111d!important;
  color:var(--mft-dark-text)!important;
}
body.mf-tsingoni-ui.mf-dark-mode :where(.site,.site-content,.content-area,.site-main,.entry-content,.wp-site-blocks),
html.mf-dark-mode body.mf-tsingoni-ui :where(.site,.site-content,.content-area,.site-main,.entry-content,.wp-site-blocks){
  background:transparent!important;
  color:inherit!important;
}
body.mf-tsingoni-ui.mf-dark-mode :where(h1,h2,h3,h4,h5,h6){color:var(--mft-dark-text)!important}
body.mf-tsingoni-ui.mf-dark-mode :where(p,li,dt,dd,label,legend){border-color:var(--mft-dark-border)}
body.mf-tsingoni-ui.mf-dark-mode hr{border-color:var(--mft-dark-border)!important;background:var(--mft-dark-border)!important}

/* Surfaces détectées automatiquement dans les anciens modules. */
body.mf-dark-mode .mft-dark-auto-surface{background:var(--mft-dark-surface)!important;background-image:none!important;color:var(--mft-dark-text)!important;box-shadow:0 10px 30px rgba(0,0,0,.16)!important}
body.mf-dark-mode .mft-dark-auto-surface-soft{background:var(--mft-dark-surface-2)!important;background-image:none!important;color:var(--mft-dark-text)!important}
body.mf-dark-mode .mft-dark-auto-border{border-color:var(--mft-dark-border)!important}
body.mf-dark-mode .mft-dark-auto-text{color:var(--mft-dark-text)!important;-webkit-text-fill-color:var(--mft-dark-text)!important}
body.mf-dark-mode .mft-dark-auto-muted{color:var(--mft-dark-muted)!important;-webkit-text-fill-color:var(--mft-dark-muted)!important}

/* Header global — structure inchangée, palette sombre seulement. */
body.mf-tsingoni-ui.mf-dark-mode .mft-global-header{background:#0c1624!important;border-bottom-color:#223248!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-global-header__inner{background:transparent!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-brand-symbol{filter:drop-shadow(0 7px 14px rgba(0,0,0,.30))!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-trigger{color:#e8eef6!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-trigger:hover,
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-group.is-open .mf-unique-trigger{background:#142237!important;color:#8fc5ff!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-dropdown{background:#101b2a!important;border-color:#2a3b52!important;border-top-color:var(--mft-action-solid,var(--mft-green))!important;box-shadow:0 24px 64px rgba(0,0,0,.44)!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-dropdown:before{background:#101b2a!important;border-color:#2a3b52!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-item{background:#101b2a!important;color:#e6edf6!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-item:hover,
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-item.is-current{background:#18283d!important;color:#fff!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-item-emoji{background:#16263a!important;border-color:#2c4059!important;box-shadow:none!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-item-meta{color:#91a3b9!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-mobilebar{background:#111d2d!important;border-color:#2b3d55!important;color:#f3f6fa!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-menu.is-open .mf-unique-desktop{background:#0e1928!important;border-color:#293a50!important;box-shadow:0 26px 70px rgba(0,0,0,.48)!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-menu.is-open .mf-unique-trigger{border-bottom-color:#25364c!important;color:#e7edf5!important}
body.mf-tsingoni-ui.mf-dark-mode .mf-unique-menu.is-open .mf-unique-dropdown{background:#111e2f!important;border-left-color:var(--mft-action-solid,var(--mft-green))!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-mobile-menu-backdrop{background:rgba(2,7,14,.72)!important;backdrop-filter:blur(3px)}
body.mf-tsingoni-ui.mf-dark-mode .mft-header-journey__road{background:repeating-linear-gradient(90deg,#435873 0 12px,transparent 12px 19px)!important;box-shadow:none!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-header-journey__road:before,
body.mf-tsingoni-ui.mf-dark-mode .mft-header-journey__road:after{background:#0c1624!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-header-journey__time{border-left-color:#314259!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-header-journey__time span{color:#90a0b4!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-header-journey__time strong{color:#edf3f9!important}

/* Bascule de thème intégrée au menu. */
body.mf-tsingoni-ui .mft-theme-menu-group{display:flex!important;align-items:stretch!important}
body.mf-tsingoni-ui .mft-theme-toggle{gap:7px!important;cursor:pointer!important}
body.mf-tsingoni-ui .mft-theme-toggle__icon{display:grid!important;place-items:center!important;width:25px!important;height:25px!important;border-radius:999px!important;background:#eef5fb!important;color:#075bb5!important;font-size:15px!important;line-height:1!important;transition:transform .2s ease,background .2s ease!important}
body.mf-tsingoni-ui.mf-dark-mode .mft-theme-toggle__icon{background:#1c2d43!important;color:#ffd04a!important}
body.mf-tsingoni-ui .mft-theme-toggle:hover .mft-theme-toggle__icon{transform:rotate(10deg)!important}
@media(max-width:1120px){
  body.mf-tsingoni-ui .mf-unique-menu.is-open .mft-theme-menu-group{display:block!important}
  body.mf-tsingoni-ui .mf-unique-menu.is-open .mft-theme-toggle{width:100%!important;min-height:48px!important;padding:0 10px!important;justify-content:flex-start!important;border-radius:12px!important}
  body.mf-tsingoni-ui .mf-unique-menu.is-open .mft-theme-toggle__icon{width:34px!important;height:34px!important;flex:0 0 34px!important}
}

/* Formulaires — compatible anciens et nouveaux modules. */
body.mf-tsingoni-ui.mf-dark-mode :where(
  input[type="text"],input[type="email"],input[type="password"],input[type="number"],input[type="search"],input[type="tel"],input[type="url"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"],input[type="week"],select,textarea
):not(.mft-pole-page-header *){
  background:#0e1928!important;
  color:#edf3f9!important;
  -webkit-text-fill-color:#edf3f9!important;
  border-color:#31445e!important;
  box-shadow:none!important;
}
body.mf-tsingoni-ui.mf-dark-mode :where(input,textarea)::placeholder{color:#71849d!important;-webkit-text-fill-color:#71849d!important}
body.mf-tsingoni-ui.mf-dark-mode :where(input,select,textarea):focus{border-color:var(--mft-action-solid,#4a94df)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--mft-action-solid,#4a94df) 22%,transparent)!important;outline:none!important}
body.mf-tsingoni-ui.mf-dark-mode select option{background:#101b2a!important;color:#edf3f9!important}
body.mf-tsingoni-ui.mf-dark-mode :where(input[type="checkbox"],input[type="radio"]){accent-color:var(--mft-action-solid,#2f86d8)}

/* Tables et listes de données. */
body.mf-tsingoni-ui.mf-dark-mode table:not(.mft-pole-page-header table){background:#101b2a!important;color:#e8eef6!important;border-color:#2a3b52!important}
body.mf-tsingoni-ui.mf-dark-mode :where(th,td):not(.mft-pole-page-header *){border-color:#293b52!important}
body.mf-tsingoni-ui.mf-dark-mode th:not(.mft-pole-page-header *){background:#162337!important;color:#f1f5f9!important}
body.mf-tsingoni-ui.mf-dark-mode tr:nth-child(even) td:not(.mft-pole-page-header *){background-color:rgba(255,255,255,.018)}
body.mf-tsingoni-ui.mf-dark-mode tr:hover td:not(.mft-pole-page-header *){background-color:rgba(86,157,225,.07)}

/* Boutons secondaires et historiques. Les actions principales continuent à
   utiliser les couleurs sûres définies par pôle depuis 1.6.5.64/69. */
body.mf-tsingoni-ui.mf-dark-mode :where(button,.button,a[class*="btn"],a[class*="button"],input[type="button"],input[type="reset"]):is(.secondary,.ghost,.soft,.outline),
body.mf-tsingoni-ui.mf-dark-mode :where(.mf-btn,.mf-button,.mf-rh-btn,.mfpay-btn,.mfmp-btn,.mfpi-btn,.mfpsc-btn,.mfr-btn,.mfbr-btn):is(.secondary,.ghost,.soft,.outline){
  background:#172539!important;background-image:none!important;color:#e8eef6!important;-webkit-text-fill-color:#e8eef6!important;border-color:#344861!important;box-shadow:none!important
}
body.mf-tsingoni-ui.mf-dark-mode :where(button,.button,a[class*="btn"],a[class*="button"]):is(.secondary,.ghost,.soft,.outline):hover{background:#1d3048!important;border-color:#46617f!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
body.mf-tsingoni-ui.mf-dark-mode :where(button,.button,a[class*="btn"],a[class*="button"]):is(.danger,.red){background:#35161d!important;color:#ffb4bd!important;-webkit-text-fill-color:#ffb4bd!important;border-color:#68303b!important}
body.mf-tsingoni-ui.mf-dark-mode :where(button,.button,input[type="submit"],a[class*="btn"]):disabled{opacity:.55!important;filter:none!important}

/* Modales / popups / accordéons / panneaux. */
body.mf-tsingoni-ui.mf-dark-mode :where(.modal,.mf-modal,.kmex-modal,[role="dialog"]){background:#101b2a!important;color:#eef3f8!important;border-color:#2d3e55!important;box-shadow:0 30px 90px rgba(0,0,0,.58)!important}
body.mf-tsingoni-ui.mf-dark-mode :where(.modal-backdrop,.mf-modal-backdrop,.kmex-modal-backdrop){background:rgba(2,7,14,.78)!important}
body.mf-tsingoni-ui.mf-dark-mode details:not(.mft-pole-page-header *){border-color:#293b52!important}
body.mf-tsingoni-ui.mf-dark-mode summary:not(.mft-pole-page-header *){color:#edf3f9}

/* Quelques familles importantes possèdent beaucoup de couleurs codées en dur. */
body.mf-tsingoni-ui.mf-dark-mode :where(.mfh-shell,.mfpi-wrap,.mfpsc-wrap,.mfmp,.mfr,.mfr-portal,.mfbr,.mfi-wrap,.mfic-wrap,.mfpay-wrap,.mf-rh-wrap,.mf165wrap,.mfv2-wrap,.movefleet-wrap,.kmex-wrap){color:#dbe4ef!important}
body.mf-tsingoni-ui.mf-dark-mode :where(.mfh-card,.mfh-service,.mfh-panel,.mfpi-card,.mfpi-panel,.mfpsc-card,.mfpsc-panel,.mfmp-card,.mfmp-section,.mfmp-create,.mfr-c,.mfr-portal-card,.mfbr-card,.mfi-card,.mfic-card,.mfpay-card,.mf-rh-card){border-color:#2a3b52!important}

/* MultiPôles : le hero coloré reste métier, tout le reste passe réellement sombre. */
body.mf-tsingoni-ui.mf-dark-mode .mfmp{--ink:#f2f6fb;--muted:#9aabc0;--line:#2b3d54}
body.mf-tsingoni-ui.mf-dark-mode .mfmp-create,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-card,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-section,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-scope{background:#101b2a!important;border-color:#2a3b52!important;color:#eef3f8!important;box-shadow:0 12px 34px rgba(0,0,0,.20)!important}
body.mf-tsingoni-ui.mf-dark-mode .mfmp-detail{background:#0e1928!important;border-color:#293b52!important}
body.mf-tsingoni-ui.mf-dark-mode .mfmp-mini,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-check,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-user{background:#142236!important;border-color:#2b3d54!important;color:#edf3f9!important}
body.mf-tsingoni-ui.mf-dark-mode .mfmp-field label,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-title p,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-card-meta,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-section p,
body.mf-tsingoni-ui.mf-dark-mode .mfmp-user small{color:#98a9be!important}
body.mf-tsingoni-ui.mf-dark-mode .mfmp-scope.active{background:linear-gradient(180deg,rgba(17,169,107,.11),#101b2a)!important}

/* Page de profil / accueils : les heroes blancs historiques ne doivent pas rester clairs. */
body.mf-tsingoni-ui.mf-dark-mode :where(.mfh-hero,.mfh-section,.mfh-card,.mf-profile-card,.mf-profile-panel,.mf-profile-section):not(.mft-pole-page-header){background-color:#101b2a!important;border-color:#2a3b52!important;color:#e8eef6!important}

/* Barre de scroll sombre, discrète. */
body.mf-tsingoni-ui.mf-dark-mode *{scrollbar-color:#40546e #0e1826}
body.mf-tsingoni-ui.mf-dark-mode *::-webkit-scrollbar{width:10px;height:10px}
body.mf-tsingoni-ui.mf-dark-mode *::-webkit-scrollbar-track{background:#0e1826}
body.mf-tsingoni-ui.mf-dark-mode *::-webkit-scrollbar-thumb{background:#40546e;border:2px solid #0e1826;border-radius:999px}

/* ---------------------------------------------------------
   Portail de connexion : le choix local reste disponible même déconnecté.
   --------------------------------------------------------- */
html.mf-dark-mode .movefleet-auth-body,
.movefleet-auth-body.mf-dark-mode{
  color-scheme:dark!important;
  background:radial-gradient(circle at 8% 6%,rgba(20,108,199,.13),transparent 27%),radial-gradient(circle at 92% 10%,rgba(18,164,111,.10),transparent 25%),#08111d!important;
  color:#e9eff7!important;
}
html.mf-dark-mode .movefleet-auth-card,
.movefleet-auth-body.mf-dark-mode .movefleet-auth-card{
  border-color:#25364b!important;
  background:linear-gradient(105deg,#075bb5 0%,#0b789e 29%,#0da078 48%,#101b2a 48.15%,#101b2a 100%)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.36)!important;
}
html.mf-dark-mode .movefleet-auth-brand strong,
html.mf-dark-mode .movefleet-auth-headline h1,
html.mf-dark-mode .movefleet-auth-form label span,
html.mf-dark-mode .movefleet-auth-connected strong{color:#f2f6fb!important}
html.mf-dark-mode .movefleet-auth-headline p,
html.mf-dark-mode .movefleet-auth-check,
html.mf-dark-mode .movefleet-auth-logout{color:#9bacc0!important}
html.mf-dark-mode .movefleet-auth-form input[type="text"],
html.mf-dark-mode .movefleet-auth-form input[type="password"]{background:#0b1522!important;border-color:#31445c!important;color:#edf3f9!important;-webkit-text-fill-color:#edf3f9!important}
html.mf-dark-mode .movefleet-auth-connected{background:#142033!important;border-color:#2b3d53!important}
.movefleet-auth-theme-toggle{
  position:absolute;z-index:20;right:clamp(20px,4vw,42px);top:clamp(18px,3vw,34px);display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border-radius:999px;border:1px solid #d9e2eb;background:rgba(255,255,255,.88);color:#173758;font:700 11px/1 Montserrat,system-ui,sans-serif;cursor:pointer;box-shadow:0 8px 24px rgba(17,43,82,.08);backdrop-filter:blur(10px)
}
html.mf-dark-mode .movefleet-auth-theme-toggle{background:rgba(16,27,42,.92);border-color:#31445c;color:#f0f4f9;box-shadow:0 10px 28px rgba(0,0,0,.24)}
.movefleet-auth-theme-toggle [data-mft-theme-icon]{font-size:15px;line-height:1}
@media(max-width:820px){
  html.mf-dark-mode .movefleet-auth-card{background:#101b2a!important;border-top-color:#0c8ab6!important}
  .movefleet-auth-theme-toggle{right:16px;top:14px;padding:8px 10px}
  .movefleet-auth-theme-toggle [data-mft-theme-label]{display:none}
}

@media(prefers-reduced-motion:reduce){
  body.mf-tsingoni-ui .mft-theme-toggle__icon{transition:none!important}
}
@media(min-width:1121px){
  /* Sur ordinateur, un pictogramme compact évite de modifier la géométrie
     du header validé tout en gardant la bascule immédiatement accessible. */
  body.mf-tsingoni-ui .mft-theme-menu-group .mf-unique-trigger-copy{display:none!important}
  body.mf-tsingoni-ui .mft-theme-menu-group .mft-theme-toggle{min-width:32px!important;padding:0 2px!important}
  body.mf-tsingoni-ui .mft-theme-menu-group .mft-theme-toggle__icon{width:28px!important;height:28px!important}
}
