/* CV Matching — couche mobile inspirée de la planche 390 × 844. */
@media (max-width: 760px) {
  :root { --mobile-orange: #fb5300; --mobile-bg: #f7f7f5; --mobile-ink: #1a1a1a; --mobile-muted: #737373; --mobile-line: #e8e8e5; --mobile-nav-h: 72px; --mobile-header-h: 60px; }
  html, body { background: var(--mobile-bg) !important; }
  body { padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)); }
  body::before { content: ''; display: block; height: var(--mobile-header-h); }

html[data-v3][data-ui] .v3-stats {
display: none;}
html[data-v3][data-ui] .directory-search {margin-bottom:2%}
.directory-toolbar-row{display:block!important}
  html[data-ui] .app-header,
  .app-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--mobile-header-h); width: 100%; background: rgba(255,255,255,.96) !important; border: 0 !important; border-bottom: 1px solid var(--mobile-line) !important; box-shadow: 0 4px 16px rgba(26,26,26,.05); backdrop-filter: blur(12px); }
  html[data-ui] .app-header .header-content,
  .app-header .header-content { height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 14px !important; }
  .app-header .brand { flex: 0 0 auto; padding: 0 !important; }
  .app-header .brand-logo-img { max-height: 34px !important; object-fit: contain; object-position: left center; }
  .app-header .header-nav { display: none !important; }
  .app-header .v3-workspace { display: none !important; }
  .app-header .v2-credits { display: inline-flex !important; order: 2; margin: 0 0 0 auto !important; padding: 5px 8px !important; min-width: 0 !important; width: auto !important; border: 0 !important; background: var(--mobile-bg) !important; border-radius: 999px !important; color: var(--mobile-orange) !important; gap: 4px !important; }
  .app-header .v2-credits__icon { width: 14px !important; height: 14px !important; }
  .app-header .v2-credits__label, .app-header .v2-credits__bar, .app-header .v3-credits__of, .app-header .v3-credits__cap, .app-header .v3-credits__link { display: none !important; }
  .app-header .v2-credits__value b { color: var(--mobile-orange) !important; font-size: 11px !important; }
  .app-header .v2-credits__unit { display: inline !important; font-size: 10px !important; color: var(--mobile-orange) !important; }
  .app-header .header-actions { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; order: 3; }
  .app-header .header-actions > .header-divider, .app-header .header-actions > [class*="admin-"] { display: none !important; }
  .app-header .user-menu-trigger { width: 32px; height: 32px; padding: 0 !important; border-radius: 10px !important; background: var(--mobile-ink) !important; color: white !important; justify-content: center; }
  .app-header .user-menu-trigger .v3-user__t, .app-header .user-menu-trigger > span:not(.v3-user__av):not(.v3-user__t) { display: none !important; }
  .app-header .v3-user__av { width: 32px !important; height: 32px !important; border: 0 !important; box-shadow: none !important; background: var(--mobile-ink) !important; color: #fff !important; }

  .mobile-bottom-nav { position: fixed; z-index: 110; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); min-height: var(--mobile-nav-h); padding: 7px 7px calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--mobile-line); box-shadow: 0 -8px 24px rgba(26,26,26,.07); backdrop-filter: blur(14px); }
  .mobile-bottom-nav a { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #999; text-decoration: none; font-size: 9px; font-weight: 500; line-height: 1; border-radius: 10px; }
  .mobile-bottom-nav a svg { width: 20px; height: 20px; stroke-width: 1.8; }
  .mobile-bottom-nav a.is-active { color: var(--mobile-orange); font-weight: 600; }
  .mobile-bottom-nav a.is-active svg { stroke-width: 2.2; }
  .mobile-bottom-nav a.mobile-more { color: #999; }
  .mobile-bottom-nav a.mobile-more::after { content: '•••'; letter-spacing: 2px; font-size: 15px; line-height: 10px; }
  .mobile-bottom-nav a.mobile-more svg { display: none; }

  .page-topbar { top: var(--mobile-header-h) !important; min-height: 42px !important; padding: 0 16px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  .page-topbar-crumbs { font-size: 11px !important; }
  .page-topbar-right { display: none !important; }
  .page-topbar-back { display: inline-flex !important; }

  main, .main-content, .page-content, .workspace-page, .directory-layout, .admin-main { width: 100% !important; max-width: 100% !important; }
  .directory-layout, .layout, .page-layout { display: block !important; padding: 12px 14px 20px !important; }
  .directory-sidebar { width: 100% !important; max-width: none !important; min-width: 0 !important; margin-bottom: 14px; }
  .directory-preview, .directory-main, .workspace, .card, .panel, .dv3-card { border-radius: 16px !important; box-shadow: 0 2px 10px rgba(26,26,26,.04) !important; }
  .directory-header h1, .workspace-header h1, .hub-intro h1, .dv3 h1 { font-size: 26px !important; letter-spacing: -.04em !important; }
  .subtitle, .module-purpose { font-size: 12px !important; line-height: 1.45 !important; }
  input, select, textarea, button { min-height: 44px; }
  .btn-analyze, .btn-primary, .primary-button, .hub-featured-action, .action-button { min-height: 48px !important; border-radius: 12px !important; background: var(--mobile-orange) !important; color: white !important; box-shadow: 0 7px 14px rgba(251,83,0,.20) !important; }
  .hub-grid, .cards-grid, .stats-grid, .form-grid, .drop-grid { grid-template-columns: 1fr !important; }
  .sticky-action, .floating-action { bottom: calc(var(--mobile-nav-h) + 12px + env(safe-area-inset-bottom)) !important; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (min-width: 761px) { .mobile-bottom-nav { display: none; } }

/* Vue tablette paysage : 761–1199 px, navigation latérale persistante et panneaux côte à côte. */
@media (min-width: 761px) and (max-width: 1199px) {
  :root { --tablet-sidebar-w: 224px; --tablet-topbar-h: 58px; }
  html[data-ui="v2"] body:has(.app-header) { padding-left: var(--tablet-sidebar-w) !important; }
  html[data-ui="v2"] .app-header { position: fixed !important; inset: 0 auto 0 0; width: var(--tablet-sidebar-w) !important; height: 100vh !important; height: 100dvh !important; z-index: 60; background: #fafafa !important; border: 0 !important; border-right: 1px solid #e8e8e5 !important; overflow-y: auto; overflow-x: hidden; }
  html[data-ui="v2"] .app-header .header-content { min-height: 100%; height: auto; padding: 18px 12px 12px !important; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
  html[data-ui="v2"] .app-header .brand { padding: 4px 9px 18px !important; justify-content: flex-start; }
  html[data-ui="v2"] .app-header .brand-logo-img { width: 145px !important; height: auto !important; max-width: 100% !important; max-height: 70px !important; }
  html[data-ui="v2"] .app-header .header-nav { display: flex !important; flex-direction: column; align-items: stretch; gap: 2px; overflow: visible; }
  html[data-ui="v2"] .app-header .header-nav-item { width: auto; padding: 8px 9px; gap: 9px; font-size: 11px; line-height: 1.25; white-space: normal; }
  html[data-ui="v2"] .app-header .header-nav-item svg { width: 15px; height: 15px; flex: none; }
  html[data-ui="v2"] .app-header .v3-nav-label { margin: 12px 9px 5px; font-size: 9px; }
  html[data-ui="v2"] .app-header .v3-workspace { margin: 0 0 14px; padding: 8px 9px; }
  html[data-ui="v2"] .app-header .v3-workspace__t b { font-size: 11px; }
  html[data-ui="v2"] .app-header .v3-workspace__t small { font-size: 9px; }
  html[data-ui="v2"] .app-header .header-actions { margin-top: auto; padding-top: 12px; flex-direction: column; align-items: stretch; gap: 5px; }
  html[data-ui="v2"] .app-header .v2-credits { margin-top: 12px !important; padding: 10px !important; display: grid !important; width: auto !important; border: 1px solid #e8e8e5 !important; border-radius: 9px !important; background: #fff !important; color: var(--mobile-ink) !important; }
  html[data-ui="v2"] .app-header .v2-credits__label, html[data-ui="v2"] .app-header .v2-credits__bar { display: block !important; }
  html[data-ui="v2"] .app-header .v2-credits__label { color: var(--mobile-ink) !important; }
  html[data-ui="v2"] .app-header .v2-credits__value b { color: var(--mobile-ink) !important; font-size: 13px !important; }
  html[data-ui="v2"] .app-header .v2-credits__unit { display: inline !important; color: var(--mobile-muted) !important; font-size: 9px !important; }
  html[data-ui="v2"] .app-header .user-menu-trigger { width: 100%; justify-content: space-between; padding: 7px 9px !important; border-color: transparent; }
  html[data-ui="v2"] .app-header .user-menu-trigger .status-text { display: block !important; flex: 1; text-align: left; font-size: 10px; }
  .mobile-bottom-nav { display: none !important; }
  body::before { display: none; }
  .page-topbar { min-height: var(--tablet-topbar-h) !important; padding: 0 22px !important; }
  .page-topbar-crumbs { font-size: 11px !important; }
  .directory-layout, .layout, .page-layout { display: grid !important; grid-template-columns: minmax(280px, .95fr) minmax(0, 1.45fr); gap: 16px !important; padding: 18px 20px 28px !important; align-items: start; }
  .directory-layout > .directory-sidebar { width: auto !important; min-width: 0 !important; margin: 0; }
  .directory-layout > .directory-preview-card, .directory-layout > .directory-preview { min-width: 0; width: auto !important; }
  body.page-annuaire .directory-layout { display: grid !important; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr); }
  body.page-annuaire .directory-preview-card { position: static !important; transform: none !important; visibility: visible !important; width: auto !important; max-width: none !important; max-height: none !important; border-radius: 14px !important; box-shadow: none !important; }
  body.page-annuaire .v3-backdrop, body.page-annuaire .v3-drawer-close { display: none !important; }
  body.page-analyse .content-area, body.page-matching-inverse .directory-layout, body.page-recherche-multi .directory-layout, body.page-lot .lot-shell { grid-template-columns: minmax(0, 1.3fr) minmax(250px, .8fr) !important; gap: 14px !important; }
  body.page-analyse .directory-preview-card, body.page-matching-inverse .directory-preview-card, body.page-recherche-multi .directory-preview-card { position: static !important; transform: none !important; visibility: visible !important; width: auto !important; max-width: none !important; }
  .directory-sidebar, .directory-preview-card, .directory-list-card, .workspace, .card, .panel, .dv3-card { border-radius: 12px !important; }
  .directory-header h1, .workspace-header h1, .hub-intro h1, .dv3 h1 { font-size: 25px !important; }
  html[data-v3][data-ui] .hub-main.dv3 { padding: 24px 24px 32px; max-width: none; }
  html[data-v3][data-ui] .dv3-topbar { min-height: var(--tablet-topbar-h); padding: 0 24px; }
  html[data-v3][data-ui] .dv3-search { min-width: 170px; }
  html[data-v3][data-ui] .dv3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  html[data-v3][data-ui] .dv3-grid { grid-template-columns: minmax(0, 1.25fr) minmax(220px, .85fr); gap: 14px; }
  html[data-v3][data-ui] .dv3-hero { min-height: 210px; padding: 26px 28px; gap: 12px; }
  html[data-v3][data-ui] .dv3-hero__art { height: 210px; margin: -26px -28px -26px 0; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  input, select, textarea, button { min-height: 38px; }
  .btn-analyze, .btn-primary, .primary-button, .hub-featured-action, .action-button { min-height: 42px !important; border-radius: 9px !important; }
}

/* Correctif tablette v2 : la V3 a une spécificité plus forte, donc ces règles
   reprennent explicitement son préfixe. Les tablettes étroites restent en une
   colonne pour éviter des panneaux illisibles. */
@media (min-width: 761px) and (max-width: 1199px) {
  html[data-v3][data-ui] { --v2-sidebar-w: 224px !important; --v2-header-h: 0px !important; }
  html[data-v3][data-ui] body:has(.app-header) { padding-left: 224px !important; padding-top: 0 !important; }
  html[data-v3][data-ui] .app-header { width: 224px !important; }
  html[data-v3][data-ui] .app-header .header-content { padding: 18px 12px 12px !important; }
  html[data-v3][data-ui] .app-header .brand { padding: 4px 9px 18px !important; }
  html[data-v3][data-ui] .app-header .brand-logo-img { width: 145px !important; max-width: 100% !important; height: auto !important; }
  html[data-v3][data-ui] .app-header .header-nav { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 2px !important; }
  html[data-v3][data-ui] .app-header .header-nav-item { width: auto !important; padding: 8px 9px !important; font-size: 11px !important; }
  html[data-v3][data-ui] .app-header .header-actions { margin-top: auto !important; padding-top: 12px !important; }
  html[data-v3][data-ui] .app-header .v2-credits { margin-top: 12px !important; }
  html[data-v3][data-ui] .page-topbar { margin-left: 0 !important; min-height: 58px !important; padding: 0 22px !important; }
  html[data-v3][data-ui] .directory-layout,
  html[data-v3][data-ui] .layout,
  html[data-v3][data-ui] .page-layout { width: auto !important; max-width: none !important; padding: 18px 20px 28px !important; gap: 16px !important; }
}

@media (min-width: 761px) and (max-width: 900px) {
  html[data-v3][data-ui] .directory-layout,
  html[data-v3][data-ui] .layout,
  html[data-v3][data-ui] .page-layout,
  html[data-v3][data-ui] body.page-analyse .content-area,
  html[data-v3][data-ui] body.page-matching-inverse .directory-layout,
  html[data-v3][data-ui] body.page-recherche-multi .directory-layout,
  html[data-v3][data-ui] body.page-lot .lot-shell { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; }
  html[data-v3][data-ui] body.page-annuaire .directory-layout { grid-template-columns: minmax(0, 1fr) !important; }
  html[data-v3][data-ui] body.page-annuaire .directory-preview-card,
  html[data-v3][data-ui] body.page-analyse .directory-preview-card,
  html[data-v3][data-ui] body.page-matching-inverse .directory-preview-card,
  html[data-v3][data-ui] body.page-recherche-multi .directory-preview-card { position: static !important; width: 100% !important; max-width: none !important; transform: none !important; visibility: visible !important; }
  html[data-v3][data-ui] .dv3-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html[data-v3][data-ui] .dv3-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (min-width: 901px) and (max-width: 1199px) {
  html[data-v3][data-ui] body.page-annuaire .directory-layout { display: grid !important; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .9fr) !important; }
  html[data-v3][data-ui] body.page-analyse .content-area,
  html[data-v3][data-ui] body.page-matching-inverse .directory-layout,
  html[data-v3][data-ui] body.page-recherche-multi .directory-layout,
  html[data-v3][data-ui] body.page-lot .lot-shell { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr) !important; }
  html[data-v3][data-ui] .dv3-grid { grid-template-columns: minmax(0, 1.25fr) minmax(220px, .85fr) !important; }
  html[data-v3][data-ui] .dv3-hero { grid-template-columns: minmax(0, 1.1fr) minmax(250px, .9fr) !important; }
}

/* Bas de sidebar tablette : le groupe crédits + ressources + compte est ancré
   en bas, comme dans la vue desktop. */
@media (min-width: 761px) and (max-width: 1199px) {
  html[data-v3][data-ui] .app-header .v2-credits { margin-top: auto !important; }
  html[data-v3][data-ui] .app-header .v3-footlinks { margin-top: 10px !important; flex: none !important; }
  html[data-v3][data-ui] .app-header .header-actions { margin-top: 0 !important; flex: none !important; min-height: 0 !important; }
  html[data-v3][data-ui] .app-header .v3-footlinks a { padding: 7px 9px !important; font-size: 11px !important; }
  html[data-v3][data-ui] .app-header .v3-footlinks a svg { width: 15px !important; height: 15px !important; }
  html[data-v3][data-ui] .app-header .user-menu-trigger { min-height: 38px !important; }
  html[data-v3][data-ui] .app-header .v3-user__av { width: 30px !important; height: 30px !important; }
  html[data-v3][data-ui] .app-header .v3-user__t b { font-size: 11px !important; }
  html[data-v3][data-ui] .app-header .v3-user__t small { font-size: 9px !important; }
}

/* Tablette = même sidebar fonctionnelle et visuelle que le bureau. Seule la
   largeur de la colonne change pour préserver l’espace du contenu. */
@media (min-width: 761px) and (max-width: 1199px) {
  html[data-ui="v2"] .app-header .v2-credits,
  html[data-v3][data-ui] .app-header .v2-credits {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: auto !important;
    padding: 14px !important;
    grid-template-columns: 1fr auto auto !important;
    gap: 4px 6px !important;
    border: 1px solid var(--v3-line, #e8e8e5) !important;
    border-radius: var(--v3-r-md, 10px) !important;
    background: #fff !important;
  }
  html[data-ui="v2"] .app-header .v2-credits__icon,
  html[data-v3][data-ui] .app-header .v2-credits__icon { display: block !important; grid-row: 1; grid-column: 1; width: 16px !important; height: 16px !important; }
  html[data-ui="v2"] .app-header .v2-credits__label,
  html[data-v3][data-ui] .app-header .v2-credits__label { display: block !important; grid-row: 1; grid-column: 1; margin-left: 22px !important; font-size: 12.5px !important; color: var(--v3-ink-2, #2b2b2b) !important; }
  html[data-ui="v2"] .app-header .v2-credits__value,
  html[data-v3][data-ui] .app-header .v2-credits__value { grid-row: 1; grid-column: 2 / 4; justify-self: end; align-self: baseline; color: var(--v3-ink, #1a1a1a) !important; }
  html[data-ui="v2"] .app-header .v2-credits__value b,
  html[data-v3][data-ui] .app-header .v2-credits__value b { font-size: 15.5px !important; color: var(--v3-ink, #1a1a1a) !important; }
  html[data-ui="v2"] .app-header .v2-credits__unit,
  html[data-v3][data-ui] .app-header .v2-credits__unit { display: none !important; }
  html[data-ui="v2"] .app-header .v2-credits__bar,
  html[data-v3][data-ui] .app-header .v2-credits__bar { display: block !important; grid-row: 2; grid-column: 1 / -1; height: 5px !important; margin-top: 4px !important; }

  html[data-ui="v2"] .app-header .v3-footlinks,
  html[data-v3][data-ui] .app-header .v3-footlinks { display: flex !important; flex-direction: column !important; gap: 2px !important; margin-top: 10px !important; }
  html[data-ui="v2"] .app-header .v3-footlinks a,
  html[data-v3][data-ui] .app-header .v3-footlinks a { display: flex !important; align-items: center; gap: 12px !important; padding: 9px 12px !important; font-size: 13.5px !important; font-weight: 500 !important; color: var(--v3-ink-2, #2b2b2b) !important; }
  html[data-ui="v2"] .app-header .v3-footlinks a svg,
  html[data-v3][data-ui] .app-header .v3-footlinks a svg { width: 18px !important; height: 18px !important; }

  html[data-ui="v2"] .app-header .header-actions,
  html[data-v3][data-ui] .app-header .header-actions { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important; margin-top: 12px !important; padding-top: 12px !important; border-top: 1px solid var(--v3-line, #e8e8e5) !important; }
  html[data-ui="v2"] .app-header .user-menu,
  html[data-v3][data-ui] .app-header .user-menu { width: 100% !important; }
  html[data-ui="v2"] .app-header .user-menu-trigger,
  html[data-v3][data-ui] .app-header .user-menu-trigger { display: flex !important; width: 100% !important; min-height: 44px !important; align-items: center !important; justify-content: flex-start !important; gap: 10px !important; padding: 6px 8px !important; border: 0 !important; background: transparent !important; color: var(--v3-ink, #1a1a1a) !important; }
  html[data-ui="v2"] .app-header .user-menu-trigger .v3-user__t,
  html[data-v3][data-ui] .app-header .user-menu-trigger .v3-user__t { display: flex !important; flex: 1 1 auto !important; min-width: 0 !important; flex-direction: column !important; text-align: left !important; }
  html[data-ui="v2"] .app-header .user-menu-trigger .v3-user__t b,
  html[data-v3][data-ui] .app-header .user-menu-trigger .v3-user__t b { display: block !important; font-size: 13.5px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html[data-ui="v2"] .app-header .user-menu-trigger .v3-user__t small,
  html[data-v3][data-ui] .app-header .user-menu-trigger .v3-user__t small { display: block !important; font-size: 11.5px !important; }
  html[data-ui="v2"] .app-header .v3-user__av,
  html[data-v3][data-ui] .app-header .v3-user__av { flex: none !important; width: 36px !important; height: 36px !important; border-radius: 50% !important; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--v3-peach-2, #fde6d5) !important; background: var(--v3-peach, #fff3ea) !important; color: var(--v3-orange-text, #fb5300) !important; }
  html[data-ui="v2"] .app-header .user-menu-chevron,
  html[data-v3][data-ui] .app-header .user-menu-chevron { display: block !important; margin-left: auto !important; }
}

@media (min-width: 761px) and (max-width: 1199px) {
  html[data-v3][data-ui] .app-header .v3-footlinks-heading {
    padding: 5px 12px 3px !important;
    color: var(--v3-muted, #666) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  html[data-v3][data-ui] .app-header .v3-footlinks .v3-tutorial-link { padding-top: 7px !important; padding-bottom: 7px !important; }
  .tuto-launcher--floating { display: none !important; }
}

/* Mobile : navigation complète dans un tiroir latéral, sans barre basse à icônes. */
@media (max-width: 760px) {
  :root { --mobile-nav-h: 0px; }
  body { padding-bottom: 0 !important; }
  .mobile-bottom-nav { display: none !important; }
  .mobile-menu-backdrop { position: fixed; inset: 0; z-index: 119; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(20,20,20,.34); backdrop-filter: blur(2px); }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 42px; height: 38px; padding: 0 7px; border: 1px solid var(--mobile-line); border-radius: 10px; background: #fff; color: var(--mobile-ink); cursor: pointer; }
  .mobile-menu-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mobile-menu-icon { width: 19px; height: 19px; }
  .mobile-menu-icon--close { display: none; }
  .app-header .user-menu { display: none !important; }
  html.mobile-menu-open { overflow: hidden; }
  html.mobile-menu-open .app-header { inset: 0 auto 0 0 !important; width: min(320px, 88vw) !important; height: 100dvh !important; min-height: 100dvh !important; overflow-y: auto !important; overflow-x: hidden !important; background: #fff !important; border-right: 1px solid var(--mobile-line) !important; border-bottom: 0 !important; box-shadow: 14px 0 42px rgba(20,20,20,.16); }
  html.mobile-menu-open .app-header .header-content { height: auto !important; min-height: 100% !important; padding: 18px 14px 14px !important; flex-direction: column !important; align-items: stretch !important; gap: 0 !important; }
  html.mobile-menu-open .app-header .brand { padding: 3px 8px 20px !important; }
  html.mobile-menu-open .app-header .brand-logo-img { width: 145px !important; max-width: 100% !important; max-height: 70px !important; }
  html.mobile-menu-open .app-header .v3-workspace { display: flex !important; margin: 0 0 14px !important; }
  html.mobile-menu-open .app-header .header-nav { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 2px !important; overflow: visible !important; }
  html.mobile-menu-open .app-header .header-nav-item { display: flex !important; width: auto !important; min-height: 42px; padding: 9px 10px !important; gap: 10px !important; font-size: 13px !important; white-space: normal !important; }
  html.mobile-menu-open .app-header .header-nav-item svg { width: 18px !important; height: 18px !important; flex: none !important; }
  html.mobile-menu-open .app-header .v3-nav-label { display: block !important; margin: 12px 10px 5px !important; font-size: 9px !important; }
  html.mobile-menu-open .app-header .v2-credits { display: grid !important; width: 100% !important; margin: auto 0 0 !important; padding: 12px !important; grid-template-columns: 1fr auto auto; border: 1px solid var(--mobile-line) !important; border-radius: 10px !important; background: #fff !important; }
  html.mobile-menu-open .app-header .v2-credits__label { display: block !important; margin-left: 21px !important; color: var(--mobile-ink) !important; font-size: 12px !important; }
  html.mobile-menu-open .app-header .v2-credits__value b { color: var(--mobile-ink) !important; font-size: 14px !important; }
  html.mobile-menu-open .app-header .v2-credits__unit { display: none !important; }
  html.mobile-menu-open .app-header .v2-credits__bar { display: block !important; grid-column: 1 / -1; height: 5px !important; margin-top: 5px !important; }
  html.mobile-menu-open .app-header .v3-footlinks { display: flex !important; flex-direction: column !important; gap: 2px !important; margin-top: 10px !important; }
  html.mobile-menu-open .app-header .v3-footlinks-heading { display: block !important; padding: 5px 10px 3px !important; color: var(--mobile-muted) !important; font-size: 10px !important; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; }
  html.mobile-menu-open .app-header .v3-footlinks a { display: flex !important; align-items: center; gap: 10px !important; min-height: 40px; padding: 8px 10px !important; font-size: 13px !important; }
  html.mobile-menu-open .app-header .header-actions { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important; margin-top: 12px !important; padding-top: 12px !important; border-top: 1px solid var(--mobile-line) !important; }
  html.mobile-menu-open .app-header .mobile-menu-toggle { display: none !important; }
  html.mobile-menu-open .app-header .user-menu { display: block !important; width: 100% !important; }
  html.mobile-menu-open .app-header .user-menu-trigger { display: flex !important; width: 100% !important; min-height: 44px !important; align-items: center !important; justify-content: flex-start !important; gap: 10px !important; padding: 6px 8px !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--mobile-ink) !important; }
  html.mobile-menu-open .app-header .user-menu-trigger .v3-user__t { display: flex !important; flex: 1; flex-direction: column; min-width: 0; text-align: left; }
  html.mobile-menu-open .app-header .user-menu-trigger .v3-user__t b { display: block !important; font-size: 13px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.mobile-menu-open .app-header .user-menu-trigger .v3-user__t small { display: block !important; font-size: 11px !important; }
  html.mobile-menu-open .app-header .v3-user__av { width: 36px !important; height: 36px !important; background: var(--mobile-ink) !important; color: #fff !important; box-shadow: none !important; }
  html.mobile-menu-open .app-header .user-menu-dropdown { position: absolute !important; left: 14px !important; right: 14px !important; bottom: 72px !important; top: auto !important; max-height: 50vh; overflow-y: auto; }
  html.mobile-menu-open .app-header .header-actions > .header-divider { display: none !important; }
  html.mobile-menu-open .mobile-menu-backdrop { display: block; }
  html:not(.mobile-menu-open) .mobile-menu-backdrop { display: none; }
}

/* Le voile doit rester derrière la sidebar ouverte, jamais au-dessus d’elle. */
@media (max-width: 760px) {
  .mobile-menu-backdrop { z-index: 119 !important; }
  html.mobile-menu-open .app-header { z-index: 120 !important; }
}
