/* Navigation mobile DxLean — barre basse, panneau menu, layout chrome partagé */

:root {
  --dx-mobile-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --dx-mobile-duration: 0.32s;
}

.dx-mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  margin: 0;
  padding: 0;
  min-height: 0;
  z-index: 10600;
}

.dx-module-switcher {
  display: none;
}

@media (max-width: 768px) {
  .app-header.standard-header,
  .footer-standard {
    transition: opacity var(--dx-mobile-duration) ease;
  }

  nav.dx-mobile-bottom-nav,
  .dx-mobile-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 10600;
    display: flex !important;
    align-items: center;
    justify-content: space-around;
    gap: 0;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 4px max(6px, env(safe-area-inset-left, 0)) calc(6px + env(safe-area-inset-bottom, 0)) max(6px, env(safe-area-inset-right, 0));
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    transition: transform var(--dx-mobile-duration) var(--dx-mobile-ease-out),
                opacity calc(var(--dx-mobile-duration) - 0.04s) ease;
    transform: translate3d(0, 0, 0);
    opacity: 1;
    box-sizing: border-box;
  }

  .footer-standard {
    margin-bottom: 0 !important;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)) !important;
  }

  .dx-mobile-bottom-nav.scroll-hide {
    transform: translate3d(0, 100%, 0);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .dx-mobile-bottom-nav.scroll-show {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition-duration: 0.18s;
  }

  body.sidebar-mobile-open .dx-mobile-bottom-nav {
    transform: translate3d(0, 110%, 0);
    opacity: 0;
    pointer-events: none;
  }

  body.dx-mobile-nav-fullscreen-hidden .dx-mobile-bottom-nav {
    display: none !important;
  }

  main.app-main.dx-mobile-nav-main {
    display: block !important;
    padding-top: 60px !important;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0)) !important;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
  }

  body.dx-mobile-nav-fullscreen-hidden main.app-main.dx-mobile-nav-main {
    padding-bottom: 0 !important;
  }

  /* Sidebar tactile */
  .app-sidebar .sidebar-nav {
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0));
  }

  .app-sidebar .sidebar-item {
    min-height: 44px;
  }

  /* Conteneurs : marges lisibles (annule hamburger + padding 0 de base_standard) */
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .container-fluid,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .container-fluid.px-4,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .container-fluid.px-xl-5,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .container,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .knode-page,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .knav-page {
    margin-top: 0 !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .container-fluid.dx-module-home,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .dx-module-home.container-fluid,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .app-content.dx-module-home,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .dx-module-home.app-content {
    padding-top: 0.75rem !important;
    padding-bottom: 1rem !important;
  }

  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .app-content.dx-module-home,
  main.app-main.dx-mobile-nav-main:has(.app-sidebar) .dx-module-home.app-content {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  main.app-main.dx-mobile-nav-main .container-fluid.py-4:not(.dx-module-home) {
    padding-top: 0.75rem !important;
    padding-bottom: 1rem !important;
  }

  main.app-main.dx-mobile-nav-main .row {
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
  }

  main.app-main.dx-mobile-nav-main .row > * {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  main.app-main.dx-mobile-nav-main .card,
  main.app-main.dx-mobile-nav-main .modern-card,
  main.app-main.dx-mobile-nav-main .form-section-card {
    border-radius: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  main.app-main.dx-mobile-nav-main .card-body {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Hero compact (accueils modules) */
  main.app-main.dx-mobile-nav-main .module-hero-eyebrow,
  main.app-main.dx-mobile-nav-main .module-hero-stat-strip,
  main.app-main.dx-mobile-nav-main .module-hero-list,
  main.app-main.dx-mobile-nav-main .module-hero-pill {
    display: none !important;
  }

  main.app-main.dx-mobile-nav-main .module-hero {
    flex-direction: column !important;
    gap: 0 !important;
    margin-bottom: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 1rem 1.1rem !important;
    border-radius: 14px !important;
    overflow: hidden;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  main.app-main.dx-mobile-nav-main .dx-module-home .dash-panel-stats {
    display: none !important;
  }

  main.app-main.dx-mobile-nav-main .dx-module-home .dx-module-home-body > .row.g-4 {
    --bs-gutter-y: 0.85rem;
  }

  main.app-main.dx-mobile-nav-main .module-hero-title {
    font-size: 1.3rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.35rem !important;
  }

  main.app-main.dx-mobile-nav-main .module-hero-title span {
    display: block;
    font-size: 1rem;
    margin-top: 0.1rem;
  }

  main.app-main.dx-mobile-nav-main .module-hero-desc {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    margin-top: 0.35rem !important;
    opacity: 0.92;
    max-width: none !important;
  }

  main.app-main.dx-mobile-nav-main .dx-module-home .dx-module-home-body {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
  }

  main.dx-mobile-nav-main .mobile-hamburger {
    display: none !important;
  }

  main.dx-mobile-nav-main .app-sidebar,
  main.dx-mobile-nav-main .sidebar-overlay {
    display: none !important;
  }
}

.dx-mobile-bottom-nav-item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px 2px;
  border: none;
  background: transparent;
  color: #64748b;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: rgba(var(--module-primary-rgb, 99, 102, 241), 0.14);
  transition: color 0.15s ease, background 0.12s ease;
  user-select: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  min-height: 0;
  max-height: 52px;
  line-height: 1.15;
  overflow: hidden;
  border-radius: 10px;
}

.dx-mobile-bottom-nav-item:focus,
.dx-mobile-bottom-nav-item:focus-visible {
  outline: none;
}

.dx-mobile-bottom-nav .dx-mobile-bottom-nav-item:hover:not(.dx-mobile-bottom-nav-item--center):not(.dx-mobile-bottom-nav-item--menu),
.dx-mobile-bottom-nav .dx-mobile-bottom-nav-item:active:not(.dx-mobile-bottom-nav-item--center) {
  color: var(--module-primary, #6366f1);
  background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.1);
  transform: none;
}

.dx-mobile-bottom-nav-item--menu {
  -webkit-tap-highlight-color: rgba(71, 85, 105, 0.12);
}

.dx-mobile-bottom-nav .dx-mobile-bottom-nav-item--menu:hover,
.dx-mobile-bottom-nav-item--menu:active {
  color: #475569;
  background: rgba(71, 85, 105, 0.08);
  transform: none;
}

.dx-mobile-bottom-nav-item:active .dx-mobile-bottom-nav-icon {
  opacity: 1;
}

.dx-mobile-bottom-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 1.05rem;
  line-height: 1;
  transition: opacity 0.12s ease;
}

.dx-mobile-bottom-nav-icon svg {
  display: block;
}

.dx-mobile-bottom-nav-label {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dx-mobile-bottom-nav-item.is-active {
  color: var(--module-primary, #6366f1);
}

.dx-mobile-bottom-nav-item.is-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--module-primary, #6366f1);
}

.dx-mobile-bottom-nav-item--menu.is-active {
  color: #475569;
}

.dx-mobile-bottom-nav-item--menu.is-active::before {
  background: #475569;
}

/* ── Action centrale (carte colorée module) ── */

@media (max-width: 768px) {
  .dx-mobile-bottom-nav-item--center {
    flex: 1 1 0;
    max-width: 88px;
    max-height: 52px;
    justify-content: center;
    padding: 4px 2px 2px;
    gap: 2px;
    color: #64748b;
    overflow: hidden;
  }

  .dx-mobile-bottom-nav-item--center::before,
  .dx-mobile-bottom-nav-item--center.is-active::before {
    display: none;
  }

  .dx-mobile-bottom-nav-center-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--module-primary, #6366f1) 0%, var(--module-primary-hover, #4f46e5) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--module-primary-rgb, 99, 102, 241), 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
  }

  .dx-mobile-bottom-nav-item--center:active .dx-mobile-bottom-nav-center-card {
    transform: scale(0.94);
    box-shadow: 0 1px 6px rgba(var(--module-primary-rgb, 99, 102, 241), 0.28);
  }

  .dx-mobile-bottom-nav-item--center.is-active .dx-mobile-bottom-nav-center-card {
    box-shadow: 0 3px 12px rgba(var(--module-primary-rgb, 99, 102, 241), 0.45);
  }

  .dx-mobile-bottom-nav-center-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .dx-mobile-bottom-nav-center-icon svg {
    display: block;
    width: 20px;
    height: 20px;
  }

  .dx-mobile-bottom-nav-item--center .dx-mobile-bottom-nav-label {
    color: inherit;
    font-weight: 600;
    font-size: 0.62rem;
  }

  .dx-mobile-bottom-nav-item--center.is-active {
    color: var(--module-primary, #6366f1);
  }

  .dx-mobile-bottom-nav-item--center.is-active .dx-mobile-bottom-nav-label {
    color: var(--module-primary, #6366f1);
    font-weight: 700;
  }
}

/* ── Panneau menu mobile ── */

.dx-mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .dx-mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10700;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear var(--dx-mobile-duration);
  }

  .dx-mobile-menu.is-open {
    pointer-events: auto;
    visibility: visible;
    transition: visibility 0s;
  }

  .dx-mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    transition: opacity var(--dx-mobile-duration) ease;
    will-change: opacity;
  }

  .dx-mobile-menu.is-open .dx-mobile-menu-overlay {
    opacity: 1;
  }

  .dx-mobile-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(92vh, 92dvh);
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
    transform: translate3d(0, 100%, 0);
    opacity: 0;
    transition: transform var(--dx-mobile-duration) var(--dx-mobile-ease-out),
                opacity var(--dx-mobile-duration) ease;
    padding-bottom: env(safe-area-inset-bottom, 0);
    will-change: transform, opacity;
  }

  .dx-mobile-menu.is-open .dx-mobile-menu-panel {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }

  body.dx-mobile-menu-open {
    overflow: hidden;
  }

  body.dx-mobile-menu-open .dx-mobile-bottom-nav {
    transform: translate3d(0, 110%, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dx-mobile-duration) var(--dx-mobile-ease-out),
                opacity calc(var(--dx-mobile-duration) - 0.04s) ease;
  }

  .dx-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
  }

  .dx-mobile-menu-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
  }

  .dx-mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
  }

  .dx-mobile-menu-close:active {
    background: #e2e8f0;
  }

  .dx-mobile-menu-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 8px;
  }

  .dx-mobile-menu-footer {
    flex-shrink: 0;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .dx-mobile-menu-section:last-child {
    margin-bottom: 0;
  }

  .dx-mobile-menu-section {
    margin-bottom: 16px;
  }

  .dx-mobile-menu-section-title {
    margin: 0 0 8px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
  }

  .dx-mobile-menu-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(var(--module-primary-rgb, 99, 102, 241), 0.22);
    border-radius: 12px;
    background: linear-gradient(
      135deg,
      #fff 0%,
      rgba(var(--module-primary-rgb, 99, 102, 241), 0.1) 100%
    );
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    min-height: 0;
    line-height: 1.2;
    overflow: hidden;
  }

  .dx-mobile-menu-switch:active {
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.14);
  }

  .dx-mobile-menu-switch-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(
      135deg,
      var(--module-primary, #6366f1) 0%,
      var(--module-primary-hover, var(--module-secondary, #4f46e5)) 100%
    );
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  .dx-mobile-menu-switch-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .dx-mobile-menu-switch-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
  }

  .dx-mobile-menu-switch-hint {
    font-size: 0.72rem;
    color: #64748b;
  }

  .dx-mobile-menu-footer .dx-mobile-menu-switch {
    margin: 0;
  }

  #dxMobileMenu .dx-mobile-menu-switch {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    padding: 12px 14px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(var(--module-primary-rgb, 99, 102, 241), 0.22) !important;
    background: linear-gradient(
      135deg,
      #fff 0%,
      rgba(var(--module-primary-rgb, 99, 102, 241), 0.1) 100%
    ) !important;
  }

  #dxMobileMenu .dx-mobile-menu-switch:active {
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.14) !important;
  }

  #dxMobileMenu .dx-mobile-menu-switch-icon {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    flex: 0 0 40px !important;
    background: linear-gradient(
      135deg,
      var(--module-primary, #6366f1) 0%,
      var(--module-primary-hover, var(--module-secondary, #4f46e5)) 100%
    ) !important;
    color: #fff !important;
  }

  #dxMobileMenu .dx-mobile-menu-switch-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .dx-mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
  }

  .dx-mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease, color 0.12s ease;
    -webkit-tap-highlight-color: rgba(var(--module-primary-rgb, 99, 102, 241), 0.12);
    border-radius: 0;
  }

  .dx-mobile-menu-link:last-child {
    border-bottom: none;
  }

  .dx-mobile-menu-link:active {
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.08);
    color: var(--module-primary, #6366f1);
  }

  .dx-mobile-menu-link:focus,
  .dx-mobile-menu-link:focus-visible {
    outline: none;
  }

  .dx-mobile-menu-link.is-active {
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.08);
    color: var(--module-primary, #6366f1);
  }

  .dx-mobile-menu-links > .dx-mobile-menu-link + .dx-mobile-menu-link {
    margin-left: 0 !important;
  }

  .dx-mobile-menu-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.95rem;
    flex-shrink: 0;
    line-height: 1;
  }

  .dx-mobile-menu-link-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .dx-mobile-menu-link-icon i {
    display: block;
    line-height: 1;
  }

  .dx-mobile-menu-link.is-active .dx-mobile-menu-link-icon {
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.12);
    color: var(--module-primary, #6366f1);
  }

  .dx-mobile-menu-link-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .dx-mobile-menu-link-arrow {
    color: #cbd5e1;
    font-size: 0.7rem;
  }

  /* ── Modal plein écran — changement de module ── */

  .dx-module-switcher {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10950;
    pointer-events: none;
    visibility: hidden;
    isolation: isolate;
  }

  .dx-module-switcher.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  /* Fermé : tout est hors écran, sans transition résiduelle */
  .dx-module-switcher:not(.is-open) .dx-module-switcher-backdrop {
    opacity: 0;
    transition: none;
  }

  .dx-module-switcher:not(.is-open) .dx-module-switcher-panel {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
    transition: none;
  }

  .dx-module-switcher-backdrop {
    position: absolute;
    inset: 0;
    background-color: #fff;
    background-image:
      radial-gradient(ellipse 110% 75% at 50% -5%, rgba(var(--module-primary-rgb, 99, 102, 241), 0.1) 0%, #fff 58%),
      radial-gradient(ellipse 85% 55% at 95% 95%, rgba(var(--module-primary-rgb, 99, 102, 241), 0.06) 0%, #fff 52%),
      linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    opacity: 0;
    transition: opacity var(--dx-mobile-duration) ease;
    will-change: opacity;
  }

  .dx-module-switcher.is-open .dx-module-switcher-backdrop {
    opacity: 1;
  }

  .dx-module-switcher-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    padding: max(16px, env(safe-area-inset-top, 0)) 16px 0;
    opacity: 0;
    transition: opacity var(--dx-mobile-duration) ease;
  }

  .dx-module-switcher.is-open .dx-module-switcher-panel {
    opacity: 1;
  }

  .dx-module-switcher.is-open.is-leaving:not(.is-over-menu) .dx-module-switcher-backdrop,
  .dx-module-switcher.is-open.is-leaving:not(.is-over-menu) .dx-module-switcher-panel {
    opacity: 0;
  }

  body.dx-module-switcher-open {
    overflow: hidden;
  }

  /* Switcher ouvert depuis le menu : le menu reste en place en dessous */
  body.dx-module-switcher-open.dx-mobile-menu-open .dx-mobile-menu.is-open {
    visibility: visible;
    pointer-events: none;
  }

  /* Depuis le menu : feuille pleine qui glisse par-dessus (pas de fondu sur le menu) */
  .dx-module-switcher.is-over-menu .dx-module-switcher-backdrop {
    display: none;
  }

  .dx-module-switcher.is-over-menu .dx-module-switcher-panel {
    opacity: 1;
    transform: translate3d(0, 100%, 0);
    transition-property: transform;
    transition-duration: var(--dx-mobile-duration);
    transition-timing-function: var(--dx-mobile-ease-out);
    will-change: transform;
    background-color: #fff;
    background-image:
      radial-gradient(ellipse 110% 75% at 50% -5%, rgba(var(--module-primary-rgb, 99, 102, 241), 0.1) 0%, #fff 58%),
      radial-gradient(ellipse 85% 55% at 95% 95%, rgba(var(--module-primary-rgb, 99, 102, 241), 0.06) 0%, #fff 52%),
      linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  }

  .dx-module-switcher.is-over-menu.is-open.is-panel-armed .dx-module-switcher-panel {
    transition: none !important;
    transform: translate3d(0, 100%, 0) !important;
  }

  .dx-module-switcher.is-over-menu.is-open:not(.is-leaving):not(.is-panel-armed) .dx-module-switcher-panel {
    transform: translate3d(0, 0, 0);
  }

  .dx-module-switcher.is-over-menu.is-open.is-leaving .dx-module-switcher-panel {
    transform: translate3d(0, 100%, 0);
  }

  body.dx-module-switcher-open:not(.dx-mobile-menu-open) .app-header.standard-header,
  body.dx-module-switcher-open:not(.dx-mobile-menu-open) .dx-mobile-bottom-nav,
  body.dx-module-switcher-open:not(.dx-mobile-menu-open) .footer-standard {
    opacity: 0;
    pointer-events: none !important;
    transition: transform var(--dx-mobile-duration) var(--dx-mobile-ease-out),
                opacity var(--dx-mobile-duration) ease;
  }

  body.dx-module-switcher-open:not(.dx-mobile-menu-open) .dx-mobile-bottom-nav {
    transform: translate3d(0, 110%, 0);
  }

  .dx-module-switcher-header {
    flex-shrink: 0;
    text-align: center;
    padding: 8px 8px 16px;
    background: transparent;
  }

  .dx-module-switcher-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    line-height: 1.2;
    overflow: hidden;
  }

  .dx-module-switcher-back i {
    font-size: 0.9rem;
    opacity: 0.85;
  }

  .dx-module-switcher-back:active {
    background: #e2e8f0;
    border-color: #cbd5e1;
  }

  .dx-module-switcher-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
  }

  .dx-module-switcher-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
  }

  .dx-module-switcher-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 6px 8px;
  }

  .dx-module-switcher-footer {
    flex-shrink: 0;
    padding: 12px 0 calc(14px + env(safe-area-inset-bottom, 0));
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.85) 24%, #fff 100%);
    border-top: 1px solid #f1f5f9;
  }

  .dx-module-switcher-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 40vh;
    color: #64748b;
    font-size: 0.9rem;
  }

  .dx-module-switcher-loading[hidden],
  .dx-module-switcher-grid[hidden],
  .dx-module-switcher-error[hidden] {
    display: none !important;
  }

  .dx-module-switcher-loading-orbit {
    position: relative;
    width: 56px;
    height: 56px;
  }

  .dx-module-switcher-loading-orbit span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--module-primary, #6366f1);
    animation: dx-module-orbit 1.1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  }

  .dx-module-switcher-loading-orbit span:nth-child(2) {
    inset: 8px;
    animation-delay: -0.25s;
    border-top-color: #cbd5e1;
  }

  .dx-module-switcher-loading-orbit span:nth-child(3) {
    inset: 16px;
    animation-delay: -0.5s;
    border-top-color: var(--module-primary, #6366f1);
    opacity: 0.6;
  }

  @keyframes dx-module-orbit {
    to { transform: rotate(360deg); }
  }

  .dx-module-switcher-error {
    text-align: center;
    padding: 32px 16px;
    color: #dc2626;
    font-size: 0.9rem;
  }

  .dx-module-switcher-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 6px 8px 16px;
  }

  .dx-module-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 8px 12px;
    border-radius: 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    text-decoration: none;
    color: #334155;
    position: relative;
    opacity: 1;
    transform: none;
    box-sizing: border-box;
    transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: rgba(var(--module-primary-rgb, 99, 102, 241), 0.12);
  }

  .dx-module-tile:focus,
  .dx-module-tile:focus-visible {
    outline: none;
  }

  .dx-module-switcher.is-entering .dx-module-tile {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    animation: dx-module-tile-in 0.38s var(--dx-mobile-ease-out) forwards;
    animation-delay: calc(var(--tile-index, 0) * 0.045s + 0.06s);
  }

  /* À la fermeture : contenu figé dans le panneau qui glisse */
  .dx-module-switcher.is-leaving .dx-module-switcher-grid,
  .dx-module-switcher.is-leaving .dx-module-switcher-header,
  .dx-module-switcher.is-leaving .dx-module-switcher-footer,
  .dx-module-switcher.is-leaving .dx-module-switcher-loading {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .dx-module-switcher.is-leaving .dx-module-tile {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  @keyframes dx-module-tile-in {
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }

  .dx-module-tile:active {
    opacity: 1;
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.1);
    border-color: rgba(var(--module-primary-rgb, 99, 102, 241), 0.5);
  }

  .dx-module-tile.is-current {
    background: rgba(var(--module-primary-rgb, 99, 102, 241), 0.08);
    border-color: rgba(var(--module-primary-rgb, 99, 102, 241), 0.55);
  }

  .dx-module-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: transparent;
    overflow: hidden;
    position: relative;
  }

  .dx-module-tile-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: none;
  }

  .dx-module-tile-icon i {
    font-size: 1.65rem;
    color: #334155;
    filter: none;
  }

  .dx-module-tile-icon .dx-module-fallback {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    text-shadow: none;
  }

  .dx-module-tile-name {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  @media (prefers-reduced-motion: reduce) {
    .dx-mobile-bottom-nav,
    .dx-mobile-menu-overlay,
    .dx-mobile-menu-panel,
    .dx-module-switcher-backdrop,
    .dx-module-switcher-panel {
      transition-duration: 0.01ms !important;
    }

    .dx-module-switcher.is-entering .dx-module-tile,
    .dx-module-switcher.is-leaving .dx-module-tile {
      animation: none !important;
      transition: none !important;
      opacity: 1 !important;
      transform: none !important;
    }

    .dx-module-switcher-loading-orbit span {
      animation: none !important;
    }
  }
}
