/*
 * Jupiter Mobile Nav — styles actifs uniquement sous body.jmn-on (posé par le JS à ≤ breakpoint).
 * Desktop : aucune règle ne s'applique.
 */
:root {
    --jmn-top: 46px;
    --jmn-tabbar-base: 58px;
    --jmn-tabbar-h: calc(var(--jmn-tabbar-base) + env(safe-area-inset-bottom, 0px));
    --jmn-bg: var(--navbar-inverse-bg, #1f2a37);
    --jmn-bg-deep: rgba(0, 0, 0, 0.22);
    --jmn-row: rgba(255, 255, 255, 0.06);
    --jmn-text: #e6ebf1;
    --jmn-text-dim: #c3ccd7;
    --jmn-icon: #9fb0c3;
    --jmn-section: #7f91a6;
    --jmn-accent: var(--jupiter-accent, #2f6fed);
}

#jmn-tabbar {
    display: none;
}

/* ---------- En-tête ---------- */

body.jmn-on #navbar .navbar-header .navbar-toggle,
body.jmn-on #navbar .navbar-header .side-menu-button {
    display: none !important;
}

body.jmn-hide-welcome .top-nav-welcome-msg,
body.jmn-hide-welcome #navbar li.portal-welcome-li {
    display: none !important;
}

/* ---------- Tiroir ---------- */

body.jmn-on #navbar .navbar > .navbar-body.in {
    position: fixed !important;
    top: var(--jmn-top) !important;
    bottom: var(--jmn-tabbar-h) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 0 16px !important;
    display: flex !important;
    flex-direction: column;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--jmn-bg) !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 1029;
}

body.jmn-drawer-open {
    overflow: hidden !important;
}

body.jmn-on #navbar .navbar-body.in > .jmn-back { order: 0; }
body.jmn-on #navbar .navbar-body.in > .jupiter-space-switch { order: 1; }
body.jmn-on #navbar .navbar-body.in > .navbar-right-container { order: 2; }
body.jmn-on #navbar .navbar-body.in > .navbar-left-container { order: 3; }

body.jmn-on #navbar .navbar-body.in > .jupiter-space-switch {
    --jupiter-switch-inset: 14px;
    margin: 12px 14px 6px !important;
    width: auto !important;
    max-width: none !important;
    flex-shrink: 0;
}

body.jmn-on #navbar .navbar-body.in .jupiter-space-btn {
    min-height: 38px !important;
    padding: 6px 8px !important;
}

/* Recherche + avatar sur une ligne, sous l'espace */
body.jmn-on #navbar .navbar-body.in > .navbar-right-container {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 4px 14px 8px !important;
    padding: 0 !important;
    flex-shrink: 0;
    background: transparent !important;
    box-shadow: none !important;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container > ul.navbar-right {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    height: auto !important;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container > ul.navbar-right > li {
    float: none !important;
    margin: 0 !important;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container > ul.navbar-right > li.global-search-container {
    flex: 1 1 auto;
    min-width: 0;
    order: 0;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container > ul.navbar-right > li.menu-container {
    order: 1;
    flex: 0 0 auto;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container .global-search-container .navbar-form {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container .global-search-container .input-group {
    margin: 0 !important;
    width: 100%;
}

/* Menu avatar : panneau flottant sous l'avatar (sinon il pousse la recherche hors de la ligne) */
body.jmn-on #navbar .navbar-body.in > .navbar-right-container > ul.navbar-right > li.menu-container {
    position: relative !important;
}

body.jmn-on #navbar .navbar-body.in > .navbar-right-container > ul.navbar-right > li.menu-container > .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    float: none !important;
    min-width: 230px;
    max-width: calc(100vw - 28px);
    margin: 0 !important;
    padding: 6px 0 !important;
    background: var(--jmn-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    z-index: 5;
}

/* Liste des onglets : une colonne */
body.jmn-on #navbar .navbar-body.in > .navbar-left-container {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    float: none !important;
    flex-shrink: 0;
}

body.jmn-on #navbar .navbar-body.in > .navbar-left-container > a.minimizer {
    display: none !important;
}

body.jmn-on #navbar .navbar-body.in ul.nav.navbar-nav.tabs {
    display: block !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    position: relative;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.more {
    display: none !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li > a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    height: 46px !important;
    min-height: 46px;
    padding: 0 16px !important;
    color: var(--jmn-text) !important;
    border-left: 3px solid transparent !important;
    background: transparent !important;
    font-size: 14px;
}

body.jmn-on #navbar .navbar-body.in ul.tabs li > a > span.short-label {
    position: static !important;
    flex: 0 0 20px;
    width: 20px;
    margin: 0 !important;
    left: auto !important;
    text-align: center;
}

body.jmn-on #navbar .navbar-body.in ul.tabs li > a > span.short-label > span,
body.jmn-on #navbar .navbar-body.in ul.tabs li > a > span.short-label {
    color: var(--jmn-icon) !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs li > a > span.short-label .short-label-text {
    display: none;
}

body.jmn-on #navbar .navbar-body.in ul.tabs li > a > span.full-label {
    position: static !important;
    padding: 0 !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.active > a,
body.jmn-on #navbar .navbar-body.in ul.tabs li.in-group.active > a {
    background: var(--jmn-row) !important;
    border-left-color: var(--jmn-accent) !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.active > a > span.short-label > span,
body.jmn-on #navbar .navbar-body.in ul.tabs li.in-group.active > a > span.short-label > span {
    color: var(--jmn-accent) !important;
}

/* Titres de section */
body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-divider {
    display: block !important;
    height: auto !important;
    padding: 14px 16px 4px !important;
    margin: 0 !important;
    border: 0 !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-divider > div {
    padding: 0 !important;
    height: auto !important;
    border: 0 !important;
    line-height: 1.3;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-divider .label-text {
    display: inline !important;
    position: static !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jmn-section) !important;
    white-space: normal;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-divider.jmn-empty {
    display: none !important;
}

/* Groupes masqués sur mobile */
body.jmn-on:not(.jmn-show-all) #navbar .navbar-body.in ul.tabs > li.jmn-hidden {
    display: none !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.jmn-showall {
    padding: 14px 16px 4px;
}

body.jmn-on #navbar .navbar-body.in .jmn-showall-btn {
    width: 100%;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: transparent;
    color: var(--jmn-text-dim);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    text-align: left;
}

body.jmn-on #navbar .navbar-body.in .jmn-showall-btn .fas {
    margin-right: 8px;
    color: var(--jmn-icon);
}

/* Chevrons : accordéon ▾ / ▴, panneau › */
body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-group > a > .group-caret {
    position: static !important;
    margin-left: auto;
    color: var(--jmn-icon);
    transform: rotate(90deg) !important;
    transition: transform 0.15s ease;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-group.open > a > .group-caret {
    transform: rotate(-90deg) !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.jmn-drill-group > a > .group-caret {
    transform: none !important;
}

/* Accordéon : sous-menu en ligne */
body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-group.open:not(.jmn-drill-group) > a {
    background: var(--jmn-row) !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-group > ul.dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 2px 0 6px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-group > ul.dropdown-menu > li > a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    height: 40px !important;
    padding: 0 16px 0 48px !important;
    color: var(--jmn-text-dim) !important;
    background: transparent !important;
    border-left: 3px solid transparent !important;
    font-size: 13.5px;
    white-space: nowrap;
}

body.jmn-on #navbar .navbar-body.in ul.tabs > li.tab-group > ul.dropdown-menu > li.divider {
    margin: 6px 16px 6px 48px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Panneau (drill-down) */
body.jmn-on #navbar .navbar-body.in > .jmn-back {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 50px;
    padding: 0 8px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--jmn-text);
}

body.jmn-on #navbar .navbar-body.in .jmn-back-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--jmn-text);
    font-size: 16px;
}

body.jmn-on #navbar .navbar-body.in .jmn-back-title {
    font-size: 15px;
    font-weight: 600;
}

body.jmn-on #navbar .navbar-body.in.jmn-drill-mode > .jupiter-space-switch,
body.jmn-on #navbar .navbar-body.in.jmn-drill-mode > .navbar-right-container,
body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li:not(.jmn-drilled),
body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li.jmn-drilled > a {
    display: none !important;
}

body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li.jmn-drilled > ul.dropdown-menu {
    display: block !important;
    padding-top: 6px !important;
}

body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li.jmn-drilled > ul.dropdown-menu > li > a {
    height: 46px !important;
    padding-left: 16px !important;
    font-size: 14px;
    color: var(--jmn-text) !important;
}

body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li.jmn-drilled > ul.dropdown-menu > li > a > span.short-label {
    display: inline-block !important;
}

body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li.jmn-drilled > ul.dropdown-menu > li.dropdown-header,
body.jmn-on #navbar .navbar-body.in.jmn-drill-mode ul.tabs > li.jmn-drilled > ul.dropdown-menu > li.divider {
    margin-left: 16px !important;
}

/* ---------- Barre d'onglets ---------- */

body.jmn-on #jmn-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    height: var(--jmn-tabbar-h);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--jmn-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

body.jmn-on #jmn-tabbar .jmn-tb-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    border: 0;
    background: transparent;
    color: var(--jmn-icon);
    text-decoration: none !important;
    font-size: 10.5px;
    line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body.jmn-on #jmn-tabbar .jmn-tb-icon {
    font-size: 18px;
    line-height: 1;
}

body.jmn-on #jmn-tabbar .jmn-tb-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.jmn-on #jmn-tabbar .jmn-tb-item.active {
    color: #fff;
}

body.jmn-on #jmn-tabbar .jmn-tb-item.active .jmn-tb-icon {
    color: var(--jmn-accent);
}

body.jmn-on #jmn-tabbar .jmn-tb-more.active .jmn-tb-icon {
    color: #fff;
}

/* Contenu : ne pas passer sous la barre */
body.jmn-on > .content,
body.jmn-on #content {
    padding-bottom: calc(var(--jmn-tabbar-h) + 12px) !important;
}

/* Widgets flottants : au-dessus de la barre, masqués quand le tiroir est ouvert */
body.jmn-on #support-bubble {
    bottom: calc(var(--jmn-tabbar-h) + 12px) !important;
}

body.jmn-on #support-bubble.sb-stacked {
    bottom: calc(var(--jmn-tabbar-h) + 80px) !important;
}

body.jmn-on .mypage-alo-phone {
    bottom: calc(var(--jmn-tabbar-h) + 30px) !important;
}

body.jmn-on #cvt-due-soon-container {
    bottom: calc(var(--jmn-tabbar-h) + 12px) !important;
}

/* Widget téléphonie Keyyo (injecté par script tiers) */
body.jmn-on #keyyo-phone-widget {
    bottom: calc(var(--jmn-tabbar-h) + 12px) !important;
    right: 14px !important;
}

/* Barre des fenêtres modales réduites (Espo) */
body.jmn-on .collapsed-modal-bar {
    bottom: var(--jmn-tabbar-h) !important;
}

body.jmn-drawer-open #keyyo-phone-widget,
body.jmn-drawer-open #support-bubble,
body.jmn-drawer-open .mypage-alo-phone,
body.jmn-drawer-open #cvt-due-soon-container,
body.jmn-drawer-open #jp-invite-popup {
    display: none !important;
}

@media print {
    #jmn-tabbar {
        display: none !important;
    }
}

/* ── Bandeaux des pages « hub » (.sh-header) sur téléphone ──────────────────────────────
   Les boutons, chacun avec ses marges, s'éparpillaient sur 3 lignes et le bandeau prenait la
   moitié de l'écran. Sur téléphone : icône + titre sur une ligne (sous-titre masqué), action
   principale en pleine largeur, puis les autres boutons (libellés gardés) sur une ligne.
   Les groupes de boutons imbriqués (Cooptations, Présence…) suivent les mêmes règles.
   Ici (feuille toujours chargée) et pas dans jupiter.css : celle-ci ne l'est qu'avec le thème Jupiter. */
@media (max-width: 767px) {
    html #main .sh-header {
        padding: 14px 16px !important;
        gap: 10px 8px !important;
        align-items: center !important;
        min-height: 0 !important;
    }

    html #main .sh-header > .sh-header-icon {
        flex: none;
        width: 40px !important;
        min-width: 40px;
        height: 40px !important;
        margin: 0 !important;
        border-radius: 11px !important;
        font-size: 16px !important;
    }

    html #main .sh-header > .sh-header-icon + div {
        flex: 1 1 0;
        min-width: 0;
        margin: 0 !important;
    }

    html #main .sh-header .sh-crumb { margin: 0 !important; font-size: 11px !important; }
    html #main .sh-header .sh-title { margin: 0 !important; font-size: 20px !important; line-height: 1.2 !important; }
    html #main .sh-header .sh-subtitle { display: none !important; }

    html #main .sh-header > .sh-spacer {
        display: block !important;
        flex: 0 0 100% !important;
        width: auto !important;
        height: 0 !important;
        margin: 0 !important;
    }

    html #main .sh-header .sh-header-btn {
        height: 38px !important;
        min-height: 38px !important;
        margin: 0 !important;
    }

    /* Action principale (bouton plein) : sa propre ligne */
    html #main .sh-header > .sh-header-btn:not(.sh-icon-btn):not(.sh-btn-ghost) {
        flex: 1 0 100%;
        order: 1;
        justify-content: center;
    }

    html #main .sh-header > .sh-btn-ghost.sh-header-btn {
        order: 2;
        padding: 0 12px !important;
        font-size: 13px !important;
    }

    html #main .sh-header .sh-icon-btn.sh-header-btn {
        order: 3;
        width: 38px !important;
        min-width: 38px !important;
        padding: 0 !important;
        justify-content: center;
    }

    html #main .sh-header > .sh-tabs {
        flex: 1 1 100%;
        margin: 0 !important;
    }

    /* Groupes de boutons imbriqués */
    html #main .sh-header > div:has(> .sh-header-btn) {
        display: flex;
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
        margin: 0 !important;
    }

    html #main .sh-header > div:has(> .sh-header-btn):not(:has(> :not(.sh-header-btn))) > .sh-btn:not(.sh-icon-btn) {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0 12px !important;
        font-size: 13px !important;
    }

    html #main .sh-header div:has(> .sh-header-btn) > div:has(> .sh-header-btn) {
        gap: 6px;
        min-width: 0;
        margin: 0 !important;
    }

    /* Onglets sous le bandeau (Internes · S/T · Portage · Maroc) : une ligne qui défile */
    html #main .sh-hub > .mh-tabs {
        flex-wrap: nowrap !important;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    html #main .sh-hub > .mh-tabs::-webkit-scrollbar { display: none; }

    html #main .sh-hub > .mh-tabs > * {
        flex: 0 0 auto;
        padding-left: 12px !important;
        padding-right: 12px !important;
        white-space: nowrap;
    }
}

/* ── Autres bandeaux de pages sur téléphone ─────────────────────────────────────────────
   - Cartes .jp-hero des listes (Besoins, Réponses Consult-it, Préparation de paie) : les petits
     boutons icône remontent à côté du titre, les boutons texte se partagent les lignes, action
     principale en premier. Limité aux bandeaux de liste (.jp-page > div > .jp-hero, faits d'un
     titre + des actions) : les bandeaux des fiches (affaires, besoins avec parcours) ne changent pas.
   - .ch-header (Simulations CPS, Courriers) : action principale en pleine largeur, les autres côte à côte.
   - .bp-header (Bulletins de paie) : même mise en page que les bandeaux hub (.sh-header). */
@media (max-width: 767px) {
    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) {
        gap: 10px 8px !important;
        padding: 14px 16px !important;
        align-items: center !important;
    }

    /* Le titre garde la ligne, sauf la place de deux ou trois boutons icône */
    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) > .jp-hero-brand {
        flex: 1 1 0 !important;
        min-width: calc(100% - 140px);
        margin: 0 !important;
    }

    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) > .jp-hero-actions {
        display: contents !important;
    }

    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) > .jp-hero-actions > .jp-btn {
        height: 36px !important;
        margin: 0 !important;
    }

    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) > .jp-hero-actions > .jp-btn-icon {
        order: 1;
        flex: none;
        width: 36px !important;
    }

    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) > .jp-hero-actions > .jp-btn:not(.jp-btn-icon) {
        order: 3;
        flex: 1 1 auto;
        justify-content: center;
        padding: 0 10px !important;
        font-size: 13px !important;
    }

    html #main .jp-page > div > .jp-hero:not(.jp-aff-hero):has(> .jp-hero-brand:first-child + .jp-hero-actions:last-child) > .jp-hero-actions > .jp-btn-primary:not(.jp-btn-icon) {
        order: 2;
    }

    /* Simulations CPS, Courriers */
    html #main .ch-header {
        gap: 8px !important;
        padding: 16px !important;
        align-items: center !important;
    }

    html #main .ch-header > .ch-title {
        flex: 1 0 100%;
        margin: 0 0 2px !important;
        font-size: 24px !important;
    }

    html #main .ch-header > .ch-spacer { display: none !important; }

    html #main .ch-header > .ch-btn {
        order: 2;
        flex: 1 1 auto;
        justify-content: center;
        height: 36px !important;
        margin: 0 !important;
    }

    html #main .ch-header > .ch-btn-primary {
        order: 1;
        flex-basis: 100%;
    }

    /* Bulletins de paie */
    html #main .bp-header {
        padding: 14px 16px !important;
        gap: 10px 8px !important;
        align-items: center !important;
        min-height: 0 !important;
    }

    html #main .bp-header > .bp-header-icon {
        flex: none;
        width: 40px !important;
        min-width: 40px;
        height: 40px !important;
        margin: 0 !important;
        border-radius: 11px !important;
        font-size: 16px !important;
    }

    html #main .bp-header > .bp-header-icon + div {
        flex: 1 1 0;
        min-width: 0;
        margin: 0 !important;
    }

    html #main .bp-header .bp-crumb { margin: 0 !important; font-size: 11px !important; }
    html #main .bp-header .bp-title { margin: 0 !important; font-size: 20px !important; line-height: 1.2 !important; }
    html #main .bp-header .bp-subtitle { display: none !important; }

    html #main .bp-header > .bp-spacer {
        display: block !important;
        flex: 0 0 100% !important;
        width: auto !important;
        height: 0 !important;
        margin: 0 !important;
    }

    html #main .bp-header > .bp-tabs {
        order: 1;
        flex: 1 1 auto;
        margin: 0 !important;
    }

    html #main .bp-header > .bp-btn {
        order: 3;
        flex: 1 1 auto;
        justify-content: center;
        height: 38px !important;
        min-height: 38px !important;
        margin: 0 !important;
    }

    /* Le bouton juste après les onglets (Entity Manager) reste sur leur ligne */
    html #main .bp-header > .bp-tabs + .bp-btn {
        order: 1;
        flex: none;
    }

    html #main .bp-header > .bp-btn-primary {
        order: 2;
        flex-basis: 100%;
    }
}
