:root {
    --home-background: linear-gradient(rgba(12, 132, 217, 0.2), rgba(10, 33, 64, 0.56)), url("../../img/maison-tresor.jpeg") center center / cover fixed no-repeat;
    --home-foreground: 211 56% 18%;
    --home-card: 0 0% 100%;
    --home-primary: 204 87% 45%;
    --home-primary-strong: #0a72bc;
    --home-primary-soft: #edf6ff;
    --home-secondary: 205 88% 66%;
    --home-secondary-strong: #469de8;
    --home-secondary-soft: #e9f4ff;
    --home-muted: 206 44% 96%;
    --home-muted-foreground: 210 24% 44%;
    --home-border: 210 42% 86%;
    --home-filter-gradient: linear-gradient(135deg, rgba(237, 246, 255, 0.78) 0%, rgba(255, 255, 255, 0.97) 52%, rgba(244, 248, 255, 0.94) 100%);
    --home-filter-border: rgba(12, 132, 217, 0.18);
    --home-menu-gradient: linear-gradient(135deg, rgba(12, 132, 217, 0.92), rgba(10, 114, 188, 0.84));
    --home-primary-gradient: linear-gradient(135deg, #13a7ea 0%, #0a72bc 100%);
    --home-primary-gradient-hover: linear-gradient(135deg, #109de3 0%, #095f9f 100%);
    --home-soft-gradient: linear-gradient(135deg, #ffffff 0%, #edf6ff 100%);
    --home-soft-gradient-hover: linear-gradient(135deg, #f8fbff 0%, #e2efff 100%);
    --home-danger-gradient: linear-gradient(135deg, #e65266 0%, #c92f45 100%);
    --home-danger-gradient-hover: linear-gradient(135deg, #d7465b 0%, #b9273c 100%);
    --home-warning-gradient: linear-gradient(135deg, #ffd47a 0%, #f2b64b 100%);
    --home-success-gradient: linear-gradient(135deg, #43c98c 0%, #239f6c 100%);
    --home-radius: 8px;
    --home-font: "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    --home-page-width: min(1580px, calc(100% - 24px));
}

html.modern-home-page,
body.modern-home-page {
    background: var(--home-background) !important;
    color: hsl(var(--home-foreground));
    min-height: 100vh;
    overflow-x: hidden;
}

body.modern-home-page {
    -webkit-font-smoothing: antialiased;
    font-family: var(--home-font);
    font-size: 15px;
    text-rendering: optimizeLegibility;
}

/* Notifications toast ($.Notify, reimplemente dans modal-modern.js) : conteneur fixe
   en haut a droite, au-dessus de tout (overlays/dialogs modernes jusqu'a 99999),
   pour ne plus jamais se retrouver cache ou perdu en bas de page. */
.modern-notify-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 100000;
}

.modern-notify {
    align-items: flex-start;
    background: #ffffff;
    border-left: 4px solid #59cde2;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(10, 33, 64, 0.22);
    color: #17364f;
    display: flex;
    flex-direction: column;
    font-family: var(--home-font, sans-serif);
    gap: 2px;
    opacity: 0;
    padding: 12px 34px 12px 14px;
    position: relative;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.modern-notify.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.modern-notify-title {
    font-size: 13px;
    font-weight: 800;
}

.modern-notify-text {
    font-size: 13px;
    line-height: 1.4;
}

.modern-notify-close {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.5;
    padding: 4px;
    position: absolute;
    right: 6px;
    top: 6px;
}

.modern-notify-close:hover {
    opacity: 1;
}

.modern-notify--success {
    border-left-color: #388e3c;
}

.modern-notify--alert {
    border-left-color: #c62828;
}

.modern-notify--warning {
    border-left-color: #e08e00;
}

.modern-notify--info {
    border-left-color: #59cde2;
}

@media (max-width: 560px) {
    .modern-notify-container {
        left: 12px;
        right: 12px;
        max-width: none;
    }
}

body.modern-home-page #header {
    height: 92px;
    min-width: 0;
    width: var(--home-page-width) !important;
}

body.modern-home-page #header table {
    height: 92px;
}

body.modern-home-page #header img {
    height: 86px;
    max-height: 86px;
    max-width: 98px;
    object-fit: contain;
    width: auto;
}

body.modern-home-page #header a {
    left: 0 !important;
    top: 4px !important;
}

body.modern-home-page #header td:first-child > div {
    color: #ffffff !important;
    font-size: 20px !important;
    line-height: 1.15;
    padding-left: 110px !important;
    padding-top: 28px !important;
}

body.modern-home-page #header td:first-child > div > div {
    font-size: 12px !important;
    margin-bottom: 2px;
}

body.modern-home-page #info_connex {
    align-items: flex-end;
    display: flex;
    font-size: 14px !important;
    justify-content: flex-end;
    min-width: 0;
    width: 100%;
}

body.modern-home-page .modern-header-userbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 0 10px;
    width: 100%;
}

body.modern-home-page .modern-header-user-chip,
body.modern-home-page .modern-header-logout {
    align-items: center;
    backdrop-filter: blur(8px);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(10, 41, 78, 0.18);
    display: inline-flex;
    gap: 10px;
    max-width: 100%;
}

body.modern-home-page .modern-header-user-chip {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    min-height: 42px;
    padding: 0 14px;
}

body.modern-home-page .modern-header-user-chip .icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 18px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

body.modern-home-page .modern-header-user-name {
    color: #ffffff;
    display: block;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    max-width: min(28vw, 280px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.modern-home-page .modern-header-logout {
    background: var(--home-danger-gradient);
    border: 1px solid rgba(255, 180, 188, 0.42);
    color: #fff9fa;
    cursor: pointer;
    font-family: var(--home-font);
    font-size: 15px;
    font-weight: 850;
    min-height: 46px;
    padding: 0 18px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

body.modern-home-page .modern-header-logout .icon {
    color: #ffccd1;
    font-size: 20px;
}

body.modern-home-page .modern-header-logout:hover,
body.modern-home-page .modern-header-logout:focus {
    background: var(--home-danger-gradient-hover);
    border-color: rgba(255, 176, 184, 0.52);
    outline: none;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    body.modern-home-page .modern-header-userbar {
        gap: 8px;
        padding-bottom: 6px;
    }

    body.modern-home-page .modern-header-user-name {
        font-size: 14px;
        max-width: 180px;
    }

    body.modern-home-page .modern-header-logout {
        min-height: 42px;
        padding: 0 14px;
    }
}

@media (max-width: 640px) {
    body.modern-home-page #info_connex,
    body.modern-home-page .modern-header-userbar {
        justify-content: center;
    }

    body.modern-home-page .modern-header-user-name {
        max-width: 150px;
    }
}

body.modern-home-page #content {
    background: transparent !important;
    background-image: none !important;
    box-sizing: border-box;
    margin-top: 6px;
    min-height: 0;
    min-width: 0;
    padding: 0 !important;
    width: var(--home-page-width) !important;
}

body.modern-home-page #content > div > table,
body.modern-home-page #content > div > table > tbody,
body.modern-home-page #content > div > table > tbody > tr,
body.modern-home-page #content > div > table > tbody > tr > td {
    display: block;
    width: 100%;
}

body.modern-home-page #content > div > table > tbody > tr > td {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    vertical-align: top !important;
}

body.modern-home-page #content td[style*="sary_tresor_small"],
body.modern-home-page #content td[style*="logofarany"] {
    background-image: none !important;
    height: auto !important;
    padding: 0 !important;
}

#modern-home-root {
    box-sizing: border-box;
    margin: 0 auto;
    width: 100%;
}

#modern-home-root,
#modern-home-root * {
    box-sizing: border-box;
}

body.modern-home-page #content_div,
body.modern-home-page #home_div {
    width: 100%;
}

body.modern-home-page #content_div.modern-menu-workspace-active {
    min-height: 0;
}

body.modern-home-page .modern-info-menu .modern-menu-link-with-badge {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

body.modern-home-page .modern-info-menu .modern-menu-link-label {
    min-width: 0;
}

body.modern-home-page .modern-info-menu .modern-menu-badge {
    align-items: center;
    background: linear-gradient(135deg, #e04558 0%, #cf3044 100%);
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(207, 48, 68, 0.18);
    color: #ffffff;
    display: inline-flex;
    font-family: var(--home-font);
    font-size: 11px;
    font-weight: 900;
    height: 22px;
    justify-content: center;
    line-height: 1;
    min-width: 22px;
    padding: 0 7px;
}

body.modern-home-page .modern-info-menu .modern-menu-badge--group {
    background: #cf3044;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    color: #ffffff;
    font-size: 10px;
    height: 18px;
    line-height: 1;
    min-width: 18px;
    padding: 0 4px;
    position: absolute;
    right: -8px;
    top: -6px;
}

/* L'icone doit etre son propre repere de positionnement pour que le badge de
   groupe s'accroche a son coin, plutot que de se disputer l'espace avec le
   texte "Onglets" (pseudo-element ::after sur ce meme lien) qui l'ecrasait. */
body.modern-home-page #menu_div .h-menu .d-menu .modern-menu-icon-wrap {
    display: inline-flex;
    flex: 0 0 auto;
    position: relative;
}

/* Rouge = nouvelles donnees depuis la derniere visite, orange = deja consulte.
   Le badge reste toujours visible tant qu'il y a des donnees ce mois-ci. */
body.modern-home-page .modern-info-menu .modern-menu-badge--seen {
    background: linear-gradient(135deg, #f5a623 0%, #e08e00 100%);
    box-shadow: 0 10px 20px rgba(224, 142, 0, 0.18);
}

body.modern-home-page .modern-info-menu .modern-menu-badge--group.modern-menu-badge--seen {
    background: #e08e00;
    border-color: #ffffff;
    color: #ffffff;
}

/* Badge total sur l'item de menu principal (ex: SITUATION) : pastille collee
   au coin de l'icone, comme une notification sur une cloche d'application. */
body.modern-home-page .modern-info-menu .modern-menu-badge--top {
    border: 2px solid rgba(0, 117, 115, 0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    font-size: 10px;
    height: 17px;
    line-height: 1;
    min-width: 17px;
    padding: 0 4px;
    position: absolute;
    right: -8px;
    top: -4px;
}

body.modern-home-page .modern-situation-alert {
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(12, 132, 217, 0.1), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(12, 132, 217, 0.18);
    border-radius: var(--home-radius);
    box-shadow: 0 14px 32px rgba(10, 41, 78, 0.08);
    color: hsl(var(--home-foreground));
    display: grid;
    gap: 4px;
    margin: 0 0 16px;
    padding: 14px 16px;
}

body.modern-home-page .modern-situation-alert strong {
    color: hsl(var(--home-primary));
    font-size: 14px;
    font-weight: 850;
}

body.modern-home-page .modern-situation-alert span {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
    line-height: 1.55;
}

.modern-load-error,
body.modern-home-page .modern-load-error {
    background: hsl(var(--home-card));
    border: 1px solid hsl(var(--home-border));
    border-left: 4px solid var(--home-primary-strong);
    border-radius: var(--home-radius);
    box-shadow: 0 16px 42px rgba(12, 48, 88, 0.14);
    color: hsl(var(--home-foreground));
    margin: 18px 0;
    max-width: 720px;
    padding: 22px;
}

.modern-load-error--root,
body.modern-home-page .modern-load-error--root {
    margin: 80px auto;
}

.modern-load-error strong,
body.modern-home-page .modern-load-error strong {
    color: var(--home-primary-strong);
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.modern-load-error p,
body.modern-home-page .modern-load-error p {
    color: hsl(var(--home-muted-foreground));
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 16px;
}

.modern-load-error button,
body.modern-home-page .modern-load-error button {
    background: var(--home-primary-gradient);
    border: 1px solid transparent;
    border-radius: var(--home-radius);
    color: #ffffff;
    cursor: pointer;
    font-family: var(--home-font);
    font-size: 15px;
    font-weight: 750;
    min-height: 42px;
    padding: 0 18px;
}

.modern-load-error button:hover,
body.modern-home-page .modern-load-error button:hover {
    background: var(--home-primary-gradient-hover);
}

body.modern-home-page #menu_div {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
    min-height: 0;
    overflow: visible;
    padding: 0 16px;
    position: relative;
    z-index: 30;
}

body.modern-home-page #menu_div.modern-menu-page-active {
    position: relative;
    top: 0;
    z-index: 80;
}

body.modern-home-page #menu_div .h-menu {
    align-items: stretch;
    background: var(--home-menu-gradient);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-shadow: 0 18px 34px rgba(10, 25, 20, 0.22), 0 4px 0 rgba(217, 169, 54, 0.62);
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: center;
    margin: 0 !important;
    min-height: 88px;
    overflow: visible;
    padding: 0;
    width: 100%;
}

body.modern-home-page #menu_div .h-menu > li {
    display: block;
    flex: 1 1 155px;
    float: none;
    min-width: 0;
    position: relative;
}

body.modern-home-page #menu_div .h-menu > li:first-child {
    flex: 1 1 155px;
}

body.modern-home-page #menu_div .h-menu > li + li::before {
    background: rgba(255, 247, 224, 0.42);
    bottom: 16px;
    content: "";
    left: 0;
    position: absolute;
    top: 16px;
    width: 2px;
}

body.modern-home-page #menu_div .h-menu > li > a {
    align-items: center;
    border-radius: 0;
    box-sizing: border-box;
    color: #f8fffe !important;
    display: flex;
    flex-direction: column;
    font-size: 11px;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1.15;
    min-height: 88px;
    padding: 12px 18px 16px !important;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    white-space: normal;
    width: 100%;
}

body.modern-home-page #menu_div .h-menu > li > a > .icon,
body.modern-home-page #menu_div .h-menu > li > a > [class*="mif-"],
body.modern-home-page #menu_div .h-menu > li > a > .modern-menu-icon-wrap > .icon,
body.modern-home-page #menu_div .h-menu > li > a > .modern-menu-icon-wrap > [class*="mif-"] {
    color: #ffffff;
    flex: 0 0 auto;
    font-size: 34px;
    line-height: 1;
    margin: 0 !important;
    opacity: 0.96;
    position: static !important;
    width: auto;
}

body.modern-home-page #menu_div .h-menu > li > a > span:not(.icon):not([class*="mif-"]) {
    display: block;
}

body.modern-home-page #menu_div .h-menu > li > a > .modern-menu-icon-wrap {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    position: relative;
}

body.modern-home-page #menu_div .h-menu > li > a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
}

body.modern-home-page #menu_div .dropdown-toggle::before {
    display: none !important;
}

body.modern-home-page #menu_div .h-menu > li > a.dropdown-toggle::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    flex: 0 0 auto;
    height: 6px;
    margin: 0;
    opacity: 0.72;
    position: absolute;
    right: 14px;
    top: 14px;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    width: 6px;
}

body.modern-home-page #menu_div .h-menu > li > a.dropdown-toggle.active-toggle::after {
    transform: rotate(225deg);
}

body.modern-home-page #menu_div .h-menu .d-menu {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 18px 48px rgba(12, 28, 20, 0.18);
    left: 0 !important;
    max-width: min(420px, calc(100vw - 28px));
    min-width: 290px;
    overflow: visible;
    padding: 8px 0;
    top: calc(100% + 6px) !important;
    z-index: 2000;
}

body.modern-home-page #menu_div .h-menu .d-menu .d-menu {
    left: 100% !important;
    margin-left: 6px;
    top: 0 !important;
}

body.modern-home-page #menu_div .h-menu .d-menu li {
    min-width: 0;
    position: relative;
}

body.modern-home-page #menu_div .h-menu .d-menu li a {
    align-items: center;
    color: hsl(var(--home-foreground)) !important;
    display: flex;
    font-size: 15px;
    font-weight: 650;
    gap: 10px;
    line-height: 1.25;
    min-height: 44px;
    overflow-wrap: anywhere;
    padding: 10px 16px !important;
    text-decoration: none;
    white-space: normal;
}

body.modern-home-page #menu_div .h-menu .d-menu li a:hover {
    background: var(--home-primary-soft);
    color: hsl(var(--home-primary)) !important;
}

body.modern-home-page #menu_div .h-menu .d-menu .icon,
body.modern-home-page #menu_div .h-menu .d-menu [class*="mif-"] {
    flex: 0 0 auto;
    font-size: 18px;
    left: auto !important;
    margin: 0 !important;
    position: static !important;
    top: auto !important;
    width: 22px;
}

body.modern-home-page #menu_div .h-menu .d-menu .menu-title {
    color: hsl(var(--home-muted-foreground));
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    padding: 10px 16px 6px;
}

body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-has-children:not(.modern-menu-terminal) > a.dropdown-toggle::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: "";
    flex: 0 0 auto;
    height: 7px;
    margin-left: auto;
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
    width: 7px;
}

body.modern-home-page #menu_div .modern-menu-tabs-page {
    display: none;
}

body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-terminal > .d-menu {
    display: none !important;
}

body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-terminal > a.dropdown-toggle::after {
    color: hsl(var(--home-primary));
    content: "Onglets";
    font-size: 12px;
    font-weight: 850;
    margin-left: auto;
}

body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-source-active > a {
    background: var(--home-primary-soft);
    box-shadow: inset 3px 0 0 hsl(var(--home-primary));
    color: hsl(var(--home-primary)) !important;
}

.modern-menu-window {
    display: none;
    margin-top: 6px;
    width: 100%;
    z-index: 35;
}

.modern-menu-window.is-open {
    display: block;
}

.modern-menu-window-card {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 12px 30px rgba(12, 28, 20, 0.13);
    max-height: none;
    overflow: visible;
    padding: 10px 12px 12px;
    pointer-events: auto;
    position: relative;
    width: 100%;
}

.modern-menu-window-head {
    align-items: center;
    border-bottom: 1px solid hsl(var(--home-border));
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.modern-menu-window-kicker {
    color: hsl(var(--home-muted-foreground));
    display: block;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.modern-menu-window-head strong {
    color: hsl(var(--home-primary));
    display: block;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.2;
}

.modern-menu-window-close {
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-foreground));
    cursor: pointer;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 850;
    min-height: 34px;
    padding: 0 12px;
}

.modern-menu-window-close:hover {
    background: var(--home-primary-soft);
    color: hsl(var(--home-primary));
}

.modern-menu-window-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 8px;
    position: relative;
    scrollbar-width: thin;
}

.modern-menu-window-tabs[hidden] {
    display: none !important;
}

.modern-menu-window-tabs::after {
    background: hsl(var(--home-border));
    bottom: 7px;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
}

.modern-menu-window-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: hsl(var(--home-foreground));
    cursor: pointer;
    display: inline-flex;
    flex: 1 0 118px;
    font-family: var(--home-font);
    font-size: 13px;
    font-weight: 850;
    justify-content: center;
    min-height: 36px;
    overflow-wrap: anywhere;
    padding: 7px 10px;
    position: relative;
    text-align: center;
    text-transform: uppercase;
    z-index: 1;
}

.modern-menu-window-tab.is-active {
    border-bottom-color: hsl(var(--home-primary));
    color: hsl(var(--home-primary));
}

.modern-menu-window-tab-label {
    overflow-wrap: anywhere;
}

.modern-menu-window-tab-badge {
    align-items: center;
    background: linear-gradient(135deg, #e04558 0%, #cf3044 100%);
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 900;
    height: 18px;
    justify-content: center;
    line-height: 1;
    margin-left: 8px;
    min-width: 18px;
    padding: 0 5px;
    text-transform: none;
}

.modern-menu-window-tab-badge.modern-menu-badge--seen {
    background: linear-gradient(135deg, #f5a623 0%, #e08e00 100%);
}

.modern-menu-window-tab:hover {
    background: var(--home-primary-soft);
    color: hsl(var(--home-primary));
}

.modern-menu-window-panels {
    max-height: none;
    overflow: visible;
    padding-top: 4px;
}

.modern-menu-window-panel {
    display: none;
}

.modern-menu-window-panel.is-active {
    display: block;
}

.modern-menu-window-actions {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 7px;
    position: relative;
    scrollbar-width: thin;
}

.modern-menu-window-actions::after {
    background: hsl(var(--home-border));
    bottom: 6px;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
}

.modern-menu-window-action {
    align-items: center;
    background: transparent !important;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: hsl(var(--home-foreground)) !important;
    display: inline-flex;
    flex: 1 0 178px;
    font-size: 13px;
    font-weight: 850;
    justify-content: center;
    min-height: 38px;
    overflow-wrap: anywhere;
    padding: 7px 12px;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    z-index: 1;
}

.modern-menu-window-action:hover {
    background: var(--home-primary-soft) !important;
    color: hsl(var(--home-primary)) !important;
}

.modern-menu-window-action.is-active {
    background: transparent !important;
    border-bottom-color: hsl(var(--home-primary));
    box-shadow: none;
    color: hsl(var(--home-primary)) !important;
}

.modern-menu-window-empty {
    color: hsl(var(--home-muted-foreground));
    font-size: 14px;
    font-weight: 750;
    padding: 10px 4px;
}

.modern-home-page-card {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 18px 56px rgba(12, 48, 88, 0.13);
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.modern-home-page-card::before {
    background: linear-gradient(90deg, hsl(var(--home-primary)) 0%, rgba(70, 157, 232, 0.42) 56%, transparent 100%);
    content: "";
    height: 5px;
    inset: 0 0 auto;
    position: absolute;
    z-index: 1;
}

.modern-home-hero {
    align-items: stretch;
    background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 18px 56px rgba(12, 48, 88, 0.13);
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    margin-bottom: 14px;
    min-height: 240px;
    overflow: hidden;
    padding: 28px 34px;
    position: relative;
}

.modern-home-page-card .modern-home-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
    border: 0;
    border-bottom: 1px solid hsl(var(--home-border));
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    min-height: 220px;
    padding: 28px 34px 24px;
}

.modern-home-hero::before {
    background: linear-gradient(90deg, hsl(var(--home-primary)) 0%, rgba(70, 157, 232, 0.42) 56%, transparent 100%);
    content: "";
    height: 5px;
    inset: 0 0 auto;
    position: absolute;
}

.modern-home-page-card .modern-home-hero::before {
    content: none;
    display: none;
}

.modern-home-copy {
    min-width: 0;
    padding-top: 6px;
}

.modern-home-kicker {
    color: hsl(var(--home-primary));
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 10px;
}

.modern-home-title {
    color: hsl(var(--home-foreground));
    font-size: 38px;
    font-weight: 750;
    line-height: 1.18;
    margin: 0;
    max-width: 760px;
    overflow-wrap: anywhere;
}

.modern-home-subtitle {
    color: hsl(var(--home-muted-foreground));
    font-size: 17px;
    line-height: 1.55;
    margin: 12px 0 0;
    max-width: 860px;
}

.modern-home-password {
    background: #fff8e6;
    border: 1px solid #efd89a;
    border-radius: var(--home-radius);
    color: #7a4a00;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 15px;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 12px;
}

.modern-home-password a {
    color: #0a6ea8;
    font-weight: 800;
    text-decoration: none;
}

.modern-home-password br {
    display: none;
}

.modern-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.modern-home-button {
    align-items: center;
    border-radius: var(--home-radius);
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    min-height: 42px;
    padding: 0 18px;
    text-decoration: none;
}

.modern-home-button.primary {
    background: hsl(var(--home-primary));
    color: #fffaf0 !important;
}

.modern-home-button.primary:hover {
    background: var(--home-primary-strong);
    color: #fffaf0 !important;
}

.modern-home-button.secondary {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    color: hsl(var(--home-foreground)) !important;
}

.modern-home-button.secondary:hover {
    border-color: hsl(var(--home-primary));
    color: hsl(var(--home-primary)) !important;
}

.modern-home-visual {
    align-items: center;
    border-left: 1px solid hsl(var(--home-border));
    display: flex;
    gap: 16px;
    justify-content: center;
    min-width: 0;
    padding-left: 24px;
}

.modern-home-visual img {
    filter: drop-shadow(0 16px 22px rgba(12, 28, 20, 0.2));
    height: 160px;
    object-fit: contain;
    width: auto;
}

.modern-home-status {
    display: grid;
    gap: 10px;
    min-width: 142px;
}

.modern-home-pill {
    background: hsl(var(--home-muted));
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    padding: 12px 14px;
}

.modern-home-pill span {
    color: hsl(var(--home-muted-foreground));
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.modern-home-pill strong {
    color: hsl(var(--home-primary));
    display: block;
    font-size: 16px;
    margin-top: 3px;
}

.modern-home-pill--valide strong {
    color: #388e3c;
}

.modern-home-sections {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: 12px;
    overflow: visible;
}

.modern-home-page-card .modern-home-sections {
    display: block;
    padding: 0 24px 24px;
}

body.modern-home-page #home_div .modern-home-page-card .accordion {
    gap: 0;
}

body.modern-home-page #home_div .modern-home-page-card .accordion .frame,
body.modern-home-page #home_div .modern-home-page-card .modern-page-section {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid hsl(var(--home-border)) !important;
    border-radius: 0;
    box-shadow: none !important;
    margin: 0 !important;
    overflow: visible;
}

body.modern-home-page #home_div .modern-home-page-card .accordion .frame:first-child,
body.modern-home-page #home_div .modern-home-page-card .modern-page-section:first-child {
    border-top: 0 !important;
}

body.modern-home-page #home_div .modern-home-page-card .modern-page-heading,
body.modern-home-page #home_div .modern-home-page-card .accordion .heading {
    background: transparent !important;
    border: 0 !important;
    min-height: 42px;
    padding: 16px 6px 10px !important;
}

body.modern-home-page #home_div .modern-home-page-card .modern-page-heading .icon {
    height: 26px;
    width: 26px;
}

body.modern-home-page #home_div .modern-home-page-card .modern-page-heading .title,
body.modern-home-page #home_div .modern-home-page-card .accordion .heading .title {
    color: hsl(var(--home-foreground)) !important;
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-home-page-card .modern-page-body,
body.modern-home-page #home_div .modern-home-page-card .accordion .content {
    background: transparent !important;
    padding: 8px 6px 18px !important;
}

body.modern-home-page #home_div .accordion {
    display: grid;
    gap: 12px;
    margin: 0;
    width: 100%;
}

body.modern-home-page #home_div .accordion .frame {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius);
    box-shadow: 0 10px 28px rgba(12, 28, 20, 0.06) !important;
    margin: 0 !important;
    overflow: hidden;
}

body.modern-home-page #home_div .accordion .frame:last-child {
    border-bottom: 1px solid hsl(var(--home-border)) !important;
}

body.modern-home-page #home_div .accordion .heading {
    align-items: center;
    background: #fbfdfc !important;
    border: 0 !important;
    border-bottom: 1px solid hsl(var(--home-border)) !important;
    color: hsl(var(--home-foreground));
    cursor: default !important;
    display: flex;
    gap: 10px;
    min-height: 44px;
    padding: 11px 16px !important;
}

body.modern-home-page #home_div .accordion .heading .title {
    color: hsl(var(--home-foreground));
    font-size: 14.5px;
    font-weight: 850;
    letter-spacing: 0;
}

body.modern-home-page #home_div .accordion .content {
    background: #ffffff !important;
    border-top: 0;
    color: hsl(var(--home-foreground));
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px !important;
}

body.modern-home-page #home_div table {
    border-collapse: collapse;
    width: 100%;
}

body.modern-home-page #home_div td {
    border-bottom: 1px solid hsl(var(--home-border));
    color: hsl(var(--home-foreground));
    font-size: 15px;
    line-height: 1.45;
    padding: 10px 10px;
    vertical-align: top;
}

body.modern-home-page #home_div td:first-child {
    color: hsl(var(--home-muted-foreground));
    font-weight: 800;
    width: 230px;
}

body.modern-home-page #home_div td a {
    color: #0a6ea8;
    font-weight: 800;
    text-decoration: none;
}

body.modern-home-page #home_div .modern-home-page-card .accordion .heading::before,
body.modern-home-page #home_div .modern-home-page-card .accordion .heading::after {
    content: none !important;
    display: none !important;
}

body.modern-home-page #home_div .modern-profile-table {
    border-collapse: separate;
    display: block;
    width: 100%;
}

body.modern-home-page #home_div .modern-profile-table tbody {
    display: grid;
    gap: 10px 14px;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    width: 100%;
}

body.modern-home-page #home_div .modern-profile-row {
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: 6px;
    display: grid;
    grid-template-columns: minmax(108px, 34%) minmax(0, 1fr);
    min-height: 48px;
    overflow: hidden;
}

body.modern-home-page #home_div .modern-profile-row td {
    align-items: center;
    border-bottom: 0 !important;
    display: flex;
    min-width: 0;
    padding: 10px 12px !important;
    width: auto !important;
}

body.modern-home-page #home_div .modern-profile-row td:first-child {
    background: #f1f7f4;
    border-right: 1px solid hsl(var(--home-border));
    color: hsl(var(--home-muted-foreground));
    font-size: 12.5px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-profile-row td:last-child {
    color: hsl(var(--home-foreground));
    font-size: 14.5px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

body.modern-home-page #home_div .modern-profile-row td:last-child > span[id^="display_edit_prof_"] {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.modern-home-page #home_div .modern-profile-row td span[style*="padding-left"] {
    display: none !important;
}

body.modern-home-page #home_div .modern-profile-row td a {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: 999px;
    color: hsl(var(--home-primary)) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    margin-left: 10px;
    padding: 3px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

body.modern-home-page #home_div .modern-profile-status-row,
body.modern-home-page #home_div .modern-profile-warning-row {
    display: block;
    grid-column: 1 / -1;
}

body.modern-home-page #home_div .modern-profile-status-row td,
body.modern-home-page #home_div .modern-profile-warning-row td {
    border-bottom: 0 !important;
    display: block;
    padding: 0 !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-profile-status-row td:first-child,
body.modern-home-page #home_div .modern-profile-warning-row td:first-child {
    display: none;
}

body.modern-home-page #home_div .modern-profile-status-row label {
    display: inline-flex;
    max-width: 100%;
}

body.modern-home-page #home_div .modern-profile-status-row .button {
    align-items: center;
    background: var(--home-warning-gradient) !important;
    border-color: transparent !important;
    color: #7a4c00 !important;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 38px;
    white-space: normal;
}

body.modern-home-page #home_div .modern-profile-status-row .button.bd-darkRed {
    background: var(--home-danger-gradient) !important;
    border-color: transparent !important;
    color: #fff7f8 !important;
}

body.modern-home-page #home_div .modern-profile-status-row .button.bd-amber {
    background: var(--home-warning-gradient) !important;
    border-color: transparent !important;
    color: #7a4c00 !important;
}

body.modern-home-page #home_div .modern-profile-status-row .button.bd-emerald {
    background: var(--home-success-gradient) !important;
    border-color: transparent !important;
    color: #f5fffb !important;
}

body.modern-home-page #home_div .modern-profile-warning {
    background: #fff5f5;
    border: 1px solid #f0c5c5;
    border-radius: 6px;
    color: #b91c1c !important;
    display: block;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    padding: 10px 12px;
    white-space: normal;
}

body.modern-home-page #home_div .modern-locality-form {
    display: grid;
    gap: 12px 16px;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    max-width: 1100px;
}

body.modern-home-page #home_div .modern-current-locality {
    align-items: center;
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    grid-column: 1 / -1;
    padding: 10px 12px;
}

body.modern-home-page #home_div .modern-current-locality span {
    color: hsl(var(--home-muted-foreground));
    font-size: 12.5px;
    font-weight: 850;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-current-locality strong {
    color: hsl(var(--home-foreground));
    font-size: 14.5px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

body.modern-home-page #home_div .modern-locality-section .input-control.full-size,
body.modern-home-page #home_div .modern-locality-section .input-control.full-size select,
body.modern-home-page #home_div .modern-locality-section .select2-container {
    display: block;
    width: 100% !important;
}

/* Navigation: l'ancien bouton "Menu" reste dans le code pour compatibilite,
   mais il ne doit plus etre visible dans la navigation principale. */
body.modern-home-page #menu_div .modern-legacy-menu-hidden {
    display: none !important;
}

/* Mobile: rendre les cartes de tableaux pleine largeur.
   Certains tableaux legacy ne calculent pas correctement la largeur des tbody/tr.
   S'applique a #home_div (accueil) et #content_div (pages chargees via le menu). */
@media (max-width: 1024px) {
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody {
        display: block !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody tr,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody tr,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody tr,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody tr {
        box-sizing: border-box !important;
        display: block !important;
        margin: 0 0 10px !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td {
        box-sizing: border-box !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 560px) {
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td {
        grid-template-columns: 1fr !important;
        text-align: left !important;
    }
}

@media (min-width: 561px) and (max-width: 1024px) {
    body.modern-home-page #header,
    body.modern-home-page #content {
        width: min(860px, calc(100% - 40px)) !important;
    }
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"],
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: 0 8px 20px rgba(4, 24, 22, 0.04);
    min-height: 48px;
    overflow: hidden;
    position: relative;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"]::before,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"]::before {
    color: hsl(var(--home-primary));
    content: attr(data-placeholder);
    font-family: var(--home-font);
    font-size: 11px;
    font-weight: 850;
    left: 14px;
    letter-spacing: 0;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    text-transform: uppercase;
    top: 8px;
    z-index: 1;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"]::after,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"]::after {
    border-bottom: 2px solid hsl(var(--home-primary));
    border-right: 2px solid hsl(var(--home-primary));
    content: "";
    height: 8px;
    pointer-events: none;
    position: absolute;
    right: 16px;
    top: 18px;
    transform: rotate(45deg);
    width: 8px;
    z-index: 1;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"]:focus-within,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"]:focus-within {
    border-color: hsl(var(--home-primary)) !important;
    box-shadow: 0 0 0 3px rgba(12, 132, 217, 0.15), 0 10px 22px rgba(10, 41, 78, 0.08);
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"] select.filter_additional,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] select.filter_additional {
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    color: hsl(var(--home-foreground));
    cursor: pointer;
    font-family: var(--home-font);
    font-size: 15px;
    font-weight: 650;
    height: 48px !important;
    line-height: 1.2;
    min-height: 48px !important;
    padding: 20px 44px 6px 14px !important;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"] select.filter_additional:disabled,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] select.filter_additional:disabled {
    color: hsl(var(--home-muted-foreground));
    cursor: not-allowed;
    opacity: 0.72;
}

body.modern-home-page #home_div .modern-locality-action {
    grid-column: 1 / -1;
    justify-self: start;
}

body.modern-home-page #home_div .modern-locality-action .button {
    align-items: center;
    background: var(--home-primary-gradient) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    display: inline-flex;
    gap: 8px;
}

body.modern-home-page #home_div .modern-return-section .content,
body.modern-home-page #home_div .modern-return-section .modern-page-body {
    background: #f8fbf9 !important;
    border: 1px solid hsl(var(--home-border));
    border-radius: 6px;
    margin-top: 6px;
    padding: 12px !important;
}

body.modern-home-page #home_div .modern-return-section label {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin-top: 8px;
}

body.modern-home-page #home_div .button,
body.modern-home-page input[type="button"],
body.modern-home-page input[type="submit"],
body.modern-home-page input[type="reset"] {
    background: var(--home-primary-gradient) !important;
    border: 1px solid transparent !important;
    box-shadow: 0 12px 26px rgba(12, 132, 217, 0.18);
    color: #ffffff !important;
    border-radius: var(--home-radius) !important;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 800;
    min-height: 36px;
    padding: 0 14px !important;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body.modern-home-page #home_div .button:hover,
body.modern-home-page input[type="button"]:hover,
body.modern-home-page input[type="submit"]:hover,
body.modern-home-page input[type="reset"]:hover {
    background: var(--home-primary-gradient-hover) !important;
    box-shadow: 0 16px 30px rgba(10, 114, 188, 0.22);
    transform: translateY(-1px);
}

body.modern-home-page #home_div .panel:not(.modern-modal-form),
body.modern-home-page #home_div .modern-page-shell,
body.modern-home-page #home_div .modern-page-section {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius);
    box-shadow: 0 10px 28px rgba(12, 28, 20, 0.06) !important;
    margin: 0 0 12px;
    overflow: hidden;
}

body.modern-home-page #home_div .modern-page-stack .modern-page-section {
    margin: 0;
}

body.modern-home-page #home_div .panel:not(.modern-modal-form) .modern-page-heading,
body.modern-home-page #home_div .modern-page-heading {
    align-items: center;
    background: #fbfdfc !important;
    border: 0 !important;
    border-bottom: 1px solid hsl(var(--home-border)) !important;
    color: hsl(var(--home-foreground)) !important;
    cursor: default !important;
    display: flex !important;
    gap: 10px;
    min-height: 44px;
    padding: 11px 16px !important;
}

body.modern-home-page #home_div .modern-page-heading .icon {
    align-items: center;
    background: hsl(var(--home-primary)) !important;
    border-radius: 6px;
    color: #ffffff !important;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 17px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

body.modern-home-page #home_div .modern-page-heading .title {
    color: hsl(var(--home-foreground)) !important;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.25;
}

body.modern-home-page #home_div .modern-page-heading::after,
body.modern-home-page #home_div .modern-page-heading > .mif-minus,
body.modern-home-page #home_div .modern-page-heading > .mif-plus,
body.modern-home-page #home_div .modern-page-heading > .place-right,
body.modern-home-page #home_div .modern-page-heading > [class*="collapse"] {
    content: none !important;
    display: none !important;
}

body.modern-home-page #home_div .panel:not(.modern-modal-form) .modern-page-body,
body.modern-home-page #home_div .modern-page-body {
    background: #ffffff !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px !important;
}

body.modern-home-page #home_div .dataTables_wrapper {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 14px 42px rgba(12, 28, 20, 0.08);
    box-sizing: border-box;
    margin-top: 14px;
    max-width: 100%;
    overflow-x: auto;
    padding: 14px;
    width: 100%;
}

body.modern-home-page #home_div .modern-filter-panel {
    background: var(--home-filter-gradient);
    border: 1px solid var(--home-filter-border);
    border-radius: 6px;
    box-shadow: 0 14px 32px rgba(12, 28, 20, 0.06);
    margin: 0 0 12px;
    overflow: hidden;
    padding: 14px;
    position: relative;
}

body.modern-home-page #home_div .modern-filter-panel::before {
    background: radial-gradient(circle at top right, rgba(12, 132, 217, 0.16), transparent 34%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

body.modern-home-page #home_div .modern-filter-title {
    color: hsl(var(--home-primary));
    font-family: var(--home-font);
    font-size: 16px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0 0 10px;
}

body.modern-home-page #home_div .modern-filter-title::after {
    color: hsl(var(--home-muted-foreground));
    content: "Criteres de recherche";
    display: block;
    font-size: 12.5px;
    font-weight: 650;
    margin-top: 3px;
}

body.modern-home-page #home_div .modern-filter-form {
    margin: 0;
}

body.modern-home-page #home_div .modern-filter-form + .modern-filter-form {
    border-top: 1px solid rgba(12, 132, 217, 0.16);
    margin-top: 12px;
    padding-top: 12px;
}

body.modern-home-page #home_div .modern-filter-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-left: 0;
}

body.modern-home-page #home_div .modern-filter-group {
    min-width: 0;
}

body.modern-home-page #home_div .modern-filter-label {
    color: hsl(var(--home-muted-foreground));
    display: block;
    font-size: 12.5px;
    font-weight: 850;
    margin: 0 0 5px;
}

body.modern-home-page #home_div .modern-filter-field {
    min-width: 0;
}

body.modern-home-page #home_div .modern-filter-field input[type="text"],
body.modern-home-page #home_div .modern-filter-field input[type="number"],
body.modern-home-page #home_div .modern-filter-field input[type="search"],
body.modern-home-page #home_div .modern-filter-field input[type="date"],
body.modern-home-page #home_div .modern-filter-field select,
body.modern-home-page #home_div .modern-filter-field textarea {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: none !important;
    color: hsl(var(--home-foreground));
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 650;
    min-height: 36px;
    padding: 5px 9px;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-filter-field input:focus,
body.modern-home-page #home_div .modern-filter-field select:focus,
body.modern-home-page #home_div .modern-filter-field textarea:focus {
    border-color: hsl(var(--home-primary)) !important;
    box-shadow: 0 0 0 3px rgba(26, 92, 61, 0.12) !important;
    outline: none;
}

body.modern-home-page #home_div .modern-filter-field [data-role="calendar"] {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 12px 30px rgba(12, 28, 20, 0.1);
    max-width: 100%;
    overflow: hidden;
}

body.modern-home-page #home_div .modern-filter-field .text-accent {
    color: hsl(var(--home-primary)) !important;
    display: inline-flex;
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 6px;
}

body.modern-home-page #home_div .modern-filter-field > .text-accent:first-child {
    display: none;
}

body.modern-home-page #home_div .modern-filter-field span[id*="date_label"] {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-primary)) !important;
    display: inline-flex;
    font-weight: 850;
    margin-bottom: 6px;
    min-height: 36px;
    padding: 7px 9px;
}

body.modern-home-page #home_div .modern-filter-actions {
    align-items: end;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
}

body.modern-home-page #home_div .modern-filter-submit {
    background: hsl(var(--home-primary)) !important;
    border: 1px solid hsl(var(--home-primary)) !important;
    border-radius: var(--home-radius) !important;
    color: #ffffff !important;
    cursor: pointer;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 850;
    min-height: 36px;
    min-width: 112px;
    padding: 0 12px !important;
}

body.modern-home-page #home_div .modern-filter-submit:hover {
    background: var(--home-primary-strong) !important;
}

body.modern-home-page #home_div .modern-filter-separator {
    align-items: center;
    align-self: stretch;
    color: hsl(var(--home-muted-foreground));
    display: flex;
    font-size: 13px;
    font-weight: 850;
    justify-content: center;
    letter-spacing: 0;
    min-height: 42px;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-datatables-toolbar,
body.modern-home-page #home_div .modern-datatables-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: space-between;
    width: 100%;
}

body.modern-home-page #home_div .modern-datatables-toolbar {
    margin-bottom: 12px;
}

body.modern-home-page #home_div .modern-column-chooser {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 220px;
    position: relative;
    text-align: right;
}

body.modern-home-page #home_div .modern-column-chooser.modern-column-chooser-open {
    flex: 1 1 100%;
}

body.modern-home-page #home_div .modern-column-trigger {
    align-items: center;
    background: hsl(var(--home-primary));
    border: 1px solid hsl(var(--home-primary));
    border-radius: var(--home-radius);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--home-font);
    font-size: 14.5px;
    font-weight: 850;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
}

body.modern-home-page #home_div .modern-column-trigger:hover {
    background: var(--home-primary-strong);
}

body.modern-home-page #home_div .modern-column-menu {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 18px 44px rgba(12, 28, 20, 0.16);
    clear: both;
    margin-top: 8px;
    padding: 12px;
    text-align: left;
    width: 100%;
}

body.modern-home-page #home_div .modern-column-menu[hidden] {
    display: none !important;
}

body.modern-home-page #home_div .modern-column-menu-head,
body.modern-home-page #home_div .modern-column-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

body.modern-home-page #home_div .modern-column-menu-head strong {
    color: hsl(var(--home-foreground));
    font-size: 14.5px;
    font-weight: 850;
}

body.modern-home-page #home_div .modern-column-count,
body.modern-home-page #home_div .modern-column-help {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
    font-weight: 750;
}

body.modern-home-page #home_div .modern-column-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin: 12px 0;
    max-height: 260px;
    overflow: auto;
    padding-right: 2px;
}

body.modern-home-page #home_div .modern-column-option {
    align-items: center;
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-foreground));
    cursor: pointer;
    display: flex;
    font-size: 14px;
    font-weight: 750;
    gap: 8px;
    line-height: 1.25;
    min-height: 38px;
    padding: 8px 10px;
}

body.modern-home-page #home_div .modern-column-option:hover {
    background: var(--home-primary-soft);
    border-color: rgba(26, 92, 61, 0.35);
}

body.modern-home-page #home_div .modern-column-option input {
    accent-color: hsl(var(--home-primary));
    flex: 0 0 auto;
}

body.modern-home-page #home_div .modern-column-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.modern-home-page #home_div .modern-column-actions {
    justify-content: flex-end;
}

body.modern-home-page #home_div .modern-column-actions button {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-foreground));
    cursor: pointer;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 850;
    min-height: 36px;
    padding: 0 12px;
}

body.modern-home-page #home_div .modern-column-actions button:hover {
    border-color: hsl(var(--home-primary));
    color: hsl(var(--home-primary));
}

body.modern-home-page #home_div .modern-column-help {
    margin: 10px 0 0;
}

body.modern-home-page #home_div .modern-datatables-footer {
    margin-top: 12px;
}

body.modern-home-page #home_div .modern-visible-pagination {
    align-items: center;
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: space-between;
    margin-top: 14px;
    padding: 10px 12px;
    visibility: visible !important;
    width: 100%;
}

body.modern-home-page #home_div .modern-visible-info {
    color: hsl(var(--home-muted-foreground));
    font-size: 14.5px;
    font-weight: 750;
}

body.modern-home-page #home_div .modern-visible-pages {
    margin: 0 !important;
}

body.modern-home-page #home_div .modern-visible-pages .ellipsis {
    align-items: center;
    color: hsl(var(--home-muted-foreground));
    display: inline-flex;
    font-weight: 850;
    min-height: 36px;
    padding: 0 4px;
}

body.modern-home-page #home_div #data_table,
body.modern-home-page #home_div #data_table22,
body.modern-home-page #home_div #datatable1,
body.modern-home-page #home_div .dataTable,
body.modern-home-page #home_div .data_table_table {
    border-collapse: separate !important;
    border-spacing: 0;
    font-size: 14.5px !important;
    min-width: 100%;
    width: 100% !important;
}

body.modern-home-page #home_div #data_table th,
body.modern-home-page #home_div #data_table td,
body.modern-home-page #home_div #data_table22 th,
body.modern-home-page #home_div #data_table22 td,
body.modern-home-page #home_div #datatable1 th,
body.modern-home-page #home_div #datatable1 td,
body.modern-home-page #home_div .dataTable th,
body.modern-home-page #home_div .dataTable td,
body.modern-home-page #home_div .data_table_table th,
body.modern-home-page #home_div .data_table_table td {
    border-color: hsl(var(--home-border)) !important;
    font-size: 14.5px !important;
    line-height: 1.35;
    overflow-wrap: anywhere;
    padding: 10px 12px;
    white-space: normal !important;
}

body.modern-home-page #home_div table.dataTable thead th,
body.modern-home-page #home_div table.dataTable thead td {
    background: #f3f8f5;
    border-bottom: 1px solid hsl(var(--home-border)) !important;
    color: hsl(var(--home-primary));
    font-weight: 850;
}

body.modern-home-page #home_div table.dataTable tbody tr {
    background: #ffffff;
}

body.modern-home-page #home_div table.dataTable tbody tr:nth-child(even) {
    background: #f8fbf9;
}

body.modern-home-page #home_div table.dataTable tbody tr:hover {
    background: var(--home-primary-soft);
}

body.modern-home-page #home_div table.dataTable thead th.modern-col-highlight-montant,
body.modern-home-page #home_div table.dataTable thead th.modern-col-highlight-situation {
    border-bottom-color: rgba(26, 92, 61, 0.35) !important;
}

body.modern-home-page #home_div table.dataTable thead th.modern-col-highlight-montant {
    background: #fff7df !important;
    color: #7a4a00 !important;
}

/* Eye toggle global pour masquer/afficher les montants (comme un champ mot de passe).
   Vit dans la barre d'outils (pas le thead, masque en mode carte mobile). */
body.modern-home-page .modern-montant-toggle {
    align-items: center;
    background: #ffffff;
    border: 1px solid hsl(var(--home-primary));
    border-radius: var(--home-radius);
    color: hsl(var(--home-primary));
    cursor: pointer;
    display: inline-flex;
    font-family: var(--home-font);
    font-size: 13.5px;
    font-weight: 850;
    gap: 6px;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
}

body.modern-home-page .modern-montant-toggle span {
    font-size: 15px;
}

body.modern-home-page .modern-montant-toggle:hover,
body.modern-home-page .modern-montant-toggle:focus {
    background: var(--home-primary-soft);
    outline: none;
}

body.modern-home-page .modern-montant-cell-inner {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: flex-end;
    max-width: 100%;
}

body.modern-home-page .modern-montant-cell-toggle {
    background: transparent;
    border: 0;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
    opacity: 0.55;
    padding: 2px;
}

body.modern-home-page .modern-montant-cell-toggle:hover,
body.modern-home-page .modern-montant-cell-toggle:focus {
    opacity: 1;
    outline: none;
}

body.modern-home-page table.modern-montant-hidden tbody .modern-montant-value {
    display: none;
}

body.modern-home-page table.modern-montant-hidden tbody .modern-montant-mask {
    display: inline;
    letter-spacing: 1px;
    opacity: 0.6;
}

body.modern-home-page table:not(.modern-montant-hidden) tbody .modern-montant-mask {
    display: none;
}

body.modern-home-page #home_div table.dataTable thead th.modern-col-highlight-situation {
    background: #e6f2ed !important;
    color: hsl(var(--home-primary)) !important;
}

body.modern-home-page #home_div table.dataTable tbody td.modern-col-highlight-montant {
    background: #fffaf0 !important;
    color: #7a4a00 !important;
    font-weight: 850;
    text-align: right;
}

body.modern-home-page #home_div table.dataTable tbody td.modern-col-highlight-situation {
    background: #edf7f2 !important;
    color: hsl(var(--home-primary)) !important;
    font-weight: 850;
}

body.modern-home-page #home_div table.dataTable tbody tr:hover td.modern-col-highlight-montant {
    background: #fff2c7 !important;
}

body.modern-home-page #home_div table.dataTable tbody tr:hover td.modern-col-highlight-situation {
    background: #dcefe7 !important;
}

body.modern-home-page #home_div table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child::before,
body.modern-home-page #home_div table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child::before {
    background: hsl(var(--home-primary));
    border: 0;
    box-shadow: 0 6px 14px rgba(12, 28, 20, 0.18);
    color: #ffffff;
    height: 18px;
    left: 8px;
    line-height: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
}

body.modern-home-page #home_div table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child::before,
body.modern-home-page #home_div table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child::before {
    background: #b45309;
}

body.modern-home-page #home_div table.dataTable > tbody > tr.child ul.dtr-details {
    display: grid;
    gap: 8px;
    width: 100%;
}

body.modern-home-page #home_div table.dataTable > tbody > tr.child span.dtr-title {
    color: hsl(var(--home-muted-foreground));
    font-weight: 850;
    min-width: 140px;
}

body.modern-home-page #home_div table.dataTable > tbody > tr.child span.dtr-data {
    color: hsl(var(--home-foreground));
}

body.modern-home-page #home_div .dataTables_length,
body.modern-home-page #home_div .dataTables_filter,
body.modern-home-page #home_div .dataTables_info,
body.modern-home-page #home_div .dataTables_paginate {
    color: hsl(var(--home-foreground));
    font-size: 14.5px;
    margin: 8px 0;
}

body.modern-home-page #home_div .dataTables_filter input,
body.modern-home-page #home_div .dataTables_length select {
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    font-family: var(--home-font);
    font-size: 14.5px;
    min-height: 36px;
    padding: 6px 10px;
}

body.modern-home-page #home_div .dataTables_paginate {
    align-items: center;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    min-height: 36px;
    visibility: visible !important;
}

body.modern-home-page #home_div .dataTables_scrollBody {
    max-height: none !important;
}

body.modern-home-page #home_div .dataTables_scroll {
    margin-bottom: 10px;
}

body.modern-home-page #home_div .dataTables_paginate .paginate_button {
    align-items: center;
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    color: hsl(var(--home-foreground)) !important;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    margin: 0 !important;
    min-height: 36px;
    min-width: 36px;
    padding: 0 11px !important;
}

body.modern-home-page #home_div .dataTables_paginate .paginate_button.current,
body.modern-home-page #home_div .dataTables_paginate .paginate_button.current:hover {
    background: hsl(var(--home-primary)) !important;
    border-color: hsl(var(--home-primary)) !important;
    color: #ffffff !important;
}

body.modern-home-page #home_div .dataTables_paginate .paginate_button:hover {
    background: var(--home-primary-soft) !important;
    border-color: hsl(var(--home-primary)) !important;
    color: hsl(var(--home-primary)) !important;
}

body.modern-home-page #home_div .dataTables_paginate .paginate_button.disabled,
body.modern-home-page #home_div .dataTables_paginate .paginate_button.disabled:hover {
    background: #f4f6f5 !important;
    border-color: hsl(var(--home-border)) !important;
    color: hsl(var(--home-muted-foreground)) !important;
    cursor: not-allowed;
    opacity: 0.65;
}

body.modern-home-page #home_div .dataTables_info {
    color: hsl(var(--home-muted-foreground));
    font-weight: 650;
}

body.modern-home-page #home_div .input-control,
body.modern-home-page #home_div select,
body.modern-home-page #home_div input[type="text"],
body.modern-home-page #home_div input[type="password"],
body.modern-home-page #home_div input[type="number"],
body.modern-home-page #home_div input[type="search"],
body.modern-home-page #home_div input[type="date"],
body.modern-home-page #home_div textarea {
    max-width: 100% !important;
}

body.modern-home-page #home_div .modern-page-body form table td {
    border-bottom: 0;
    padding: 6px 8px;
}

body.modern-home-page #home_div .modern-page-body form table td:first-child {
    width: 190px;
}

body.modern-home-page #home_div .modern-page-body input[type="text"],
body.modern-home-page #home_div .modern-page-body input[type="password"],
body.modern-home-page #home_div .modern-page-body input[type="number"],
body.modern-home-page #home_div .modern-page-body input[type="search"],
body.modern-home-page #home_div .modern-page-body input[type="date"],
body.modern-home-page #home_div .modern-page-body select,
body.modern-home-page #home_div .modern-page-body textarea {
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font-family: var(--home-font);
    font-size: 14px;
    min-height: 36px;
    padding: 5px 9px;
}

body.modern-home-page #home_div .modern-page-body .input-control {
    min-height: 36px;
}

body.modern-home-page #home_div .modern-page-body .button,
body.modern-home-page #home_div .modern-page-body input[type="button"],
body.modern-home-page #home_div .modern-page-body input[type="submit"],
body.modern-home-page #home_div .modern-page-body input[type="reset"] {
    font-size: 13.5px;
    min-height: 34px;
    padding: 0 12px !important;
}

body.modern-home-page #home_div .input-control.full-size,
body.modern-home-page #home_div .input-control.full-size select {
    width: min(100%, 620px) !important;
}

.modern-home-footer {
    background: linear-gradient(135deg, rgba(12, 132, 217, 0.64), rgba(10, 114, 188, 0.52));
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    box-shadow: 0 20px 56px rgba(10, 41, 78, 0.2);
    box-sizing: border-box;
    color: #f4fffd;
    display: none;
    gap: 28px;
    margin: 16px auto 40px;
    padding: 28px 32px 22px;
    width: var(--home-page-width);
}

body.modern-home-page .modern-home-footer {
    display: block;
}

.modern-decision-workspace {
    display: grid;
    gap: 14px;
    width: 100%;
}

body.modern-home-page #home_div .modern-decision-home,
body.modern-home-page #home_div .modern-decision-editor {
    margin: 0;
}

body.modern-home-page #home_div .modern-decision-home .content,
body.modern-home-page #home_div .modern-decision-editor .content,
body.modern-home-page #home_div .modern-decision-home .modern-page-body,
body.modern-home-page #home_div .modern-decision-editor .modern-page-body {
    padding: 18px !important;
}

body.modern-home-page #home_div .modern-decision-actions,
body.modern-home-page #home_div .modern-decision-final-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
}

body.modern-home-page #home_div .modern-decision-actions label,
body.modern-home-page #home_div .modern-decision-final-actions label {
    display: inline-flex;
    margin: 0;
}

body.modern-home-page #home_div .modern-decision-actions .button,
body.modern-home-page #home_div .modern-decision-final-actions .button,
body.modern-home-page .modern-decision-picker .button {
    align-items: center;
    background: hsl(var(--home-primary)) !important;
    border-color: hsl(var(--home-primary)) !important;
    color: #ffffff !important;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 34px;
}

body.modern-home-page #home_div .modern-decision-list-placeholder {
    margin-top: 4px;
}

body.modern-home-page #home_div .modern-decision-intro {
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-foreground));
    display: grid;
    gap: 5px;
    line-height: 1.45;
    padding: 14px;
}

body.modern-home-page #home_div .modern-decision-intro p {
    margin: 0;
}

body.modern-home-page #home_div .modern-decision-intro-cleaned > p {
    display: none;
}

body.modern-home-page #home_div .modern-decision-intro-copy {
    display: grid;
    gap: 5px;
}

body.modern-home-page #home_div .modern-decision-list-head {
    align-items: center;
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin: 0 0 10px;
    padding: 12px 14px;
}

body.modern-home-page #home_div .modern-decision-list-head strong {
    color: hsl(var(--home-primary));
    font-size: 14px;
    font-weight: 850;
}

body.modern-home-page #home_div .modern-decision-list-head span {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
}

body.modern-home-page #home_div .modern-decision-list-wrap {
    overflow-x: auto;
}

body.modern-home-page .modern-decision-dialog {
    max-width: min(720px, calc(100vw - 24px)) !important;
    width: min(720px, calc(100vw - 24px)) !important;
}

body.modern-home-page .modern-decision-picker-grid {
    display: grid !important;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.modern-home-page .modern-decision-picker-grid .row {
    display: contents;
}

body.modern-home-page .modern-decision-picker-grid .input-control,
body.modern-home-page .modern-decision-picker-grid .select2-container,
body.modern-home-page .modern-decision-picker-grid input,
body.modern-home-page .modern-decision-picker-grid select {
    width: 100% !important;
}

body.modern-home-page .modern-decision-picker-grid #decision_action_label {
    grid-column: 1 / -1;
}

body.modern-home-page .modern-decision-picker-grid #decision_action_span {
    width: 100%;
}

body.modern-home-page #home_div .modern-decision-reload {
    align-items: end;
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 0.45fr) minmax(280px, 1fr);
    padding: 12px;
}

body.modern-home-page #home_div .modern-decision-reload strong {
    color: hsl(var(--home-primary));
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-decision-reload .row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0;
}

body.modern-home-page #home_div .modern-decision-reload .input-control,
body.modern-home-page #home_div .modern-decision-reload .select2-container,
body.modern-home-page #home_div .modern-decision-reload select {
    max-width: none !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-decision-editor fieldset {
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    margin: 0 0 12px;
    padding: 12px;
}

body.modern-home-page #home_div .modern-decision-editor legend {
    color: hsl(var(--home-primary));
    font-size: 12px;
    font-weight: 850;
    padding: 0 7px;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-decision-editor input[type="text"],
body.modern-home-page #home_div .modern-decision-editor textarea,
body.modern-home-page #home_div .modern-decision-editor select {
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: none !important;
    box-sizing: border-box;
    font-family: var(--home-font);
    font-size: 13.5px;
    min-height: 34px;
    max-width: 100% !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-decision-editor textarea {
    line-height: 1.45;
    min-height: 76px;
    padding: 8px 10px;
    resize: vertical;
}

body.modern-home-page #home_div .modern-decision-editor input[type="text"] {
    padding: 0 10px;
}

body.modern-home-page #home_div .modern-decision-editor .accordion {
    display: grid;
    gap: 12px;
}

body.modern-home-page #home_div .modern-decision-editor .frame,
body.modern-home-page #home_div .modern-decision-editor .modern-page-section {
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    margin: 0;
    overflow: hidden;
}

body.modern-home-page #home_div .modern-decision-editor .frame > .heading,
body.modern-home-page #home_div .modern-decision-editor .modern-page-heading {
    background: #fbfdfc !important;
    border-bottom: 1px solid hsl(var(--home-border)) !important;
    color: hsl(var(--home-foreground)) !important;
    font-size: 14px;
    font-weight: 850;
    min-height: 40px;
    padding: 10px 14px !important;
}

body.modern-home-page #home_div .modern-decision-editor .frame > .content,
body.modern-home-page #home_div .modern-decision-editor .modern-page-body {
    padding: 14px !important;
}

body.modern-home-page #home_div .modern-decision-editor ul {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

body.modern-home-page #home_div .modern-decision-editor li {
    color: hsl(var(--home-primary));
    font-size: 13px;
    font-weight: 850;
    text-decoration: none !important;
}

body.modern-home-page #home_div .modern-decision-editor .slippylist {
    display: grid;
    gap: 8px;
}

body.modern-home-page #home_div .modern-decision-editor .slippylist > div[id^="DIV_DECISION_"],
body.modern-home-page #home_div .modern-decision-editor [id^="acteur_"],
body.modern-home-page #home_div .modern-decision-editor [id^="pms_"],
body.modern-home-page #home_div .modern-decision-editor [id^="other_"] {
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    margin: 0 0 8px;
    padding: 10px;
}

body.modern-home-page #home_div .modern-decision-editor .slippylist > div[id^="DIV_DECISION_"] {
    align-items: start;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto auto;
}

body.modern-home-page #home_div .modern-decision-editor .slippylist > div[id^="DIV_DECISION_"] textarea {
    grid-column: 1;
}

body.modern-home-page #home_div .modern-decision-editor .instant {
    align-self: center;
    color: hsl(var(--home-muted-foreground));
}

body.modern-home-page #home_div .modern-decision-editor .cycle-button {
    align-items: center;
    border-radius: 999px !important;
    display: inline-flex;
    font-size: 16px;
    height: 30px !important;
    justify-content: center;
    min-height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    width: 30px !important;
}

body.modern-home-page #home_div .modern-decision-editor .button.bd-green,
body.modern-home-page #home_div .modern-decision-editor .button.bd-cobalt,
body.modern-home-page #home_div .modern-decision-editor .button.bd-blue,
body.modern-home-page #home_div .modern-decision-editor .button.bd-lightBlue {
    background: hsl(var(--home-primary)) !important;
    border-color: hsl(var(--home-primary)) !important;
    color: #ffffff !important;
}

body.modern-home-page #home_div .modern-decision-editor .button.bd-red,
body.modern-home-page #home_div .modern-decision-editor .button.bd-grayed {
    background: #fff1f1 !important;
    border-color: #ffc9c9 !important;
    color: #a10f0f !important;
}

body.modern-home-page #home_div .modern-decision-editor table {
    background: transparent !important;
    border-collapse: collapse;
    margin: 0;
    width: 100%;
}

body.modern-home-page #home_div .modern-decision-editor td {
    border-bottom: 1px solid hsl(var(--home-border));
    padding: 7px 8px !important;
    vertical-align: top;
}

body.modern-home-page #home_div .modern-decision-editor td:first-child {
    color: hsl(var(--home-muted-foreground));
    font-size: 12.5px;
    font-weight: 850;
    width: 160px;
}

body.modern-home-page #home_div .modern-decision-printed:empty {
    display: none;
}

body.modern-home-page #home_div .modern-decision-list-table a {
    align-items: center;
    background: #eef8f3;
    border: 1px solid rgba(26, 92, 61, 0.18);
    border-radius: 999px;
    color: hsl(var(--home-primary)) !important;
    display: inline-flex;
    font-size: 12px;
    font-weight: 850;
    min-height: 28px;
    padding: 0 10px;
    text-decoration: none;
}

body.modern-home-page .modern-decision-validation-dialog {
    max-width: min(560px, calc(100vw - 24px)) !important;
    padding: 0 !important;
    width: min(560px, calc(100vw - 24px)) !important;
}

body.modern-home-page .modern-decision-validation-dialog form {
    align-items: center;
    background: #fbfdfc;
    border-bottom: 1px solid hsl(var(--home-border));
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 16px;
}

body.modern-home-page .modern-decision-validation-dialog .input-control.radio {
    align-items: center;
    display: inline-flex;
    font-weight: 850;
    margin: 0;
}

body.modern-home-page .modern-decision-validation-dialog #DIV_VALID_COMMENT {
    padding: 16px 16px 10px;
}

body.modern-home-page .modern-decision-validation-dialog h3 {
    color: hsl(var(--home-primary));
    font-size: 13px;
    font-weight: 850;
    margin: 0 0 8px;
    text-transform: uppercase;
}

body.modern-home-page .modern-decision-validation-dialog textarea {
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-sizing: border-box;
    min-height: 92px;
    padding: 9px 10px;
    resize: vertical;
    width: 100% !important;
}

body.modern-home-page .modern-decision-validation-dialog input[type="button"] {
    background: hsl(var(--home-primary)) !important;
    border: 1px solid hsl(var(--home-primary)) !important;
    color: #ffffff !important;
    margin: 0 16px 16px;
    width: calc(100% - 32px);
}

.modern-home-footer-top,
.modern-home-footer-bottom {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.modern-home-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: 24px;
    padding-top: 18px;
}

.modern-home-footer-info {
    max-width: 680px;
}

.modern-home-footer-lead,
.modern-home-footer-bottom p {
    color: rgba(247, 255, 254, 0.82);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.modern-home-footer-contact-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.modern-home-footer-contact {
    align-items: center;
    background: transparent !important;
    color: #f8fffe !important;
    display: inline-flex;
    font-size: 15px;
    font-weight: 700;
    gap: 10px;
    min-height: 0;
    padding: 0 !important;
    text-decoration: none;
}

.modern-home-footer-contact [class*="mif-"] {
    color: var(--home-secondary-soft);
    font-size: 16px;
}

.modern-home-footer-links-block {
    align-items: flex-end;
    display: grid;
    gap: 22px;
    justify-items: end;
    min-width: 280px;
}

.modern-home-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-end;
}

.modern-home-footer-nav a,
.modern-home-footer-site {
    background: transparent !important;
    color: rgba(248, 255, 254, 0.94) !important;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    min-height: 0;
    padding: 0 !important;
    text-decoration: none;
    text-transform: uppercase;
}

.modern-home-footer-nav a:hover,
.modern-home-footer-site:hover,
.modern-home-footer-contact:hover {
    color: hsl(var(--home-primary)) !important;
}

.modern-home-footer-social {
    display: flex;
    gap: 18px;
}

.modern-home-footer-social a {
    align-items: center;
    background: transparent !important;
    color: rgba(248, 255, 254, 0.94) !important;
    display: inline-flex;
    font-size: 22px;
    justify-content: center;
    min-height: 0;
    padding: 0 !important;
    text-decoration: none;
}

.modern-home-footer-site {
    letter-spacing: 0;
    text-transform: none;
}

.modern-home-footer-site strong {
    color: #ffffff;
    font-weight: 900;
}

body.modern-home-page .presenter {
    display: none;
}

body.modern-home-page #dialog_role_add,
body.modern-home-page #dialog_activity_add,
body.modern-home-page #dialog_modif_prof,
body.modern-home-page #dialog_loading,
body.modern-home-page .modern-centered-dialog {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28) !important;
    box-sizing: border-box !important;
    color: hsl(var(--home-foreground));
    max-height: calc(100vh - 24px) !important;
    max-width: min(760px, calc(100vw - 24px)) !important;
    overflow: auto !important;
    width: min(760px, calc(100vw - 24px)) !important;
    perspective: 1000px;
}

body.modern-home-page #dialog_loading,
body.modern-home-page .modern-centered-dialog {
    bottom: auto !important;
    left: 50% !important;
    position: fixed !important;
    right: auto !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 90020 !important;
}

body.modern-home-page #dialog_loading {
    max-width: min(520px, calc(100vw - 24px)) !important;
    overflow: hidden !important;
    width: min(520px, calc(100vw - 24px)) !important;
}

body.modern-home-page #dialog_loading > div {
    height: auto !important;
    min-height: 0;
    padding: 0 !important;
}

body.modern-home-page #dialog_loading .modern-loading-title {
    color: hsl(var(--home-foreground));
    font-size: 33px;
    font-weight: 800;
    line-height: 1.08;
    margin: 2px 0 0;
}

body.modern-home-page #dialog_loading .modern-loading-text,
body.modern-home-page #dialog_loading .modern-loading-footnote {
    color: hsl(var(--home-muted-foreground));
}

body.modern-home-page #dialog_loading .modern-loading-action {
    color: hsl(var(--home-primary));
    font-weight: 800;
    text-decoration: none;
}

body.modern-home-page .dialog-overlay {
    background: rgba(5, 13, 10, 0.64) !important;
    backdrop-filter: blur(6px);
    z-index: 90000 !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

body.modern-home-page .modern-modal-form {
    border: 0 !important;
    border-radius: var(--home-radius) !important;
    box-shadow: none !important;
    margin: 0 !important;
    overflow: hidden;
    width: 100%;
}

body.modern-home-page .modern-modal-form .heading {
    align-items: center;
    background: hsl(var(--home-primary)) !important;
    display: flex;
    gap: 12px;
    min-height: 58px;
    padding: 0 20px !important;
}

body.modern-home-page .modern-modal-form .heading.has-close {
    gap: 10px;
}

body.modern-home-page .modern-modal-form .heading .icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.14) !important;
    border-radius: var(--home-radius);
    color: #ffffff !important;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

body.modern-home-page .modern-modal-form .heading .title {
    color: #ffffff !important;
    font-family: var(--home-font);
    font-size: 18px;
    font-weight: 850;
    letter-spacing: 0;
}

body.modern-home-page .modern-dialog-close {
    align-items: center;
    background: rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-radius: var(--home-radius) !important;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--home-font);
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    margin-left: auto;
    min-height: 34px;
    min-width: 96px;
    padding: 0 12px;
    text-decoration: none;
}

body.modern-home-page .modern-dialog-close:hover,
body.modern-home-page .modern-dialog-close:focus {
    background: rgba(255, 255, 255, 0.22) !important;
    outline: none;
}

body.modern-home-page .modern-dialog-close.modern-dialog-close-floating {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    color: hsl(var(--home-foreground)) !important;
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 2;
}

body.modern-home-page .modern-modal-form .content {
    background: #ffffff !important;
    max-height: calc(100vh - 126px);
    overflow: auto;
    padding: 20px !important;
}

body.modern-home-page .modern-modal-form form {
    margin: 0 0 14px;
}

body.modern-home-page .modern-modal-form table,
body.modern-home-page .modern-modal-form tbody,
body.modern-home-page .modern-modal-form tr,
body.modern-home-page .modern-modal-form td {
    border: 0 !important;
    display: block;
    width: 100% !important;
}

body.modern-home-page .modern-modal-form tr {
    margin: 0 0 14px;
}

body.modern-home-page .modern-modal-form td {
    color: hsl(var(--home-foreground));
    padding: 0 !important;
}

body.modern-home-page .modern-modal-form td:first-child,
body.modern-home-page .modern-modal-form .td1 {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
    font-weight: 850;
    margin: 0 0 7px;
}

body.modern-home-page .modern-modal-form input[type="text"],
body.modern-home-page .modern-modal-form input[type="password"],
body.modern-home-page .modern-modal-form input[type="file"],
body.modern-home-page .modern-modal-form textarea,
body.modern-home-page .modern-modal-form select {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: none !important;
    box-sizing: border-box;
    color: hsl(var(--home-foreground));
    font-family: var(--home-font);
    font-size: 14px;
    min-height: 38px;
    padding: 6px 10px;
    width: 100% !important;
}

body.modern-home-page .modern-modal-form textarea {
    min-height: 82px;
    resize: vertical;
}

body.modern-home-page .modern-modal-form input:focus,
body.modern-home-page .modern-modal-form textarea:focus,
body.modern-home-page .modern-modal-form select:focus {
    border-color: hsl(var(--home-primary)) !important;
    box-shadow: 0 0 0 3px rgba(26, 92, 61, 0.12) !important;
    outline: none;
}

body.modern-home-page .modern-modal-form .input-control,
body.modern-home-page .modern-modal-form .select2-container,
body.modern-home-page .modern-modal-form [id^="DIV_SELECT_"],
body.modern-home-page .modern-modal-form [id^="DIV_INFO_COMPL_"] {
    max-width: 100% !important;
    width: 100% !important;
    position: relative !important;
    z-index: auto !important;
    overflow: visible !important;
}

body.modern-home-page .modern-modal-form .select2-container .select2-choice,
body.modern-home-page .modern-modal-form .select2-container .select2-selection {
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    min-height: 38px;
}

body.modern-home-page .modern-modal-form select.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}

body.modern-home-page .select2-container--open,
body.modern-home-page .select2-dropdown,
body.modern-home-page .select2-drop {
    z-index: 99999 !important;
}

body.modern-home-page .modern-centered-dialog .select2-dropdown,
body.modern-home-page .modern-centered-dialog .select2-drop,
body.modern-home-page .modern-centered-dialog .select2-container--open {
    z-index: 99999 !important;
}

body.modern-home-page .select2-dropdown,
body.modern-home-page .select2-drop {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: 0 20px 48px rgba(12, 28, 20, 0.22) !important;
    color: hsl(var(--home-foreground)) !important;
    overflow: hidden;
}

body.modern-home-page .select2-results__option {
    color: hsl(var(--home-foreground));
    font-family: var(--home-font);
    font-size: 14.5px;
    line-height: 1.35;
    padding: 9px 11px;
}

body.modern-home-page .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: hsl(var(--home-primary)) !important;
    color: #ffffff !important;
}

body.modern-home-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: hsl(var(--home-foreground));
    line-height: 36px;
}

body.modern-home-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

body.modern-home-page .modern-modal-form progress {
    accent-color: hsl(var(--home-primary));
    height: 8px;
    width: 100%;
}

body.modern-home-page .modern-modal-form .button,
body.modern-home-page .modern-modal-form input[type="button"],
body.modern-home-page .modern-modal-form label .button {
    align-items: center;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    display: inline-flex;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 850;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px !important;
}

body.modern-home-page .modern-modal-form .button.primary,
body.modern-home-page .modern-modal-form input[type="button"].primary,
body.modern-home-page .modern-modal-form label .button {
    background: hsl(var(--home-primary)) !important;
    border-color: hsl(var(--home-primary)) !important;
    color: #ffffff !important;
}

body.modern-home-page .modern-modal-form a {
    color: #0a6ea8;
    font-weight: 800;
    text-decoration: none;
}

body.modern-home-page .modern-modal-form [style*="padding-left: 50px"] {
    background: #f8fbf9;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-muted-foreground));
    line-height: 1.45;
    margin-top: 4px;
    padding: 12px !important;
}

body.modern-home-page #dialog_modifp {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    max-width: min(560px, calc(100vw - 24px)) !important;
    overflow: visible !important;
    width: min(560px, calc(100vw - 24px)) !important;
}

body.modern-home-page .modern-password-dialog {
    overflow: hidden;
}

body.modern-home-page .modern-password-dialog .content {
    padding: 22px !important;
}

body.modern-home-page .modern-password-help {
    background: var(--home-secondary-soft);
    border: 1px solid rgba(198, 146, 36, 0.2);
    border-radius: var(--home-radius);
    color: hsl(var(--home-muted-foreground));
    font-size: 14px;
    font-weight: 650;
    line-height: 1.5;
    margin: 0 0 18px;
    padding: 12px 14px;
}

body.modern-home-page .modern-password-fields {
    display: grid;
    gap: 8px;
}

body.modern-home-page .modern-password-fields label {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
    font-weight: 850;
}

body.modern-home-page .modern-password-fields input {
    margin-bottom: 10px;
}

body.modern-home-page .modern-password-status {
    margin-bottom: 14px;
}

body.modern-home-page .modern-password-status:empty {
    display: none;
}

body.modern-home-page .modern-password-alert,
body.modern-home-page #status:not(:empty) {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--home-radius);
    color: #9a3412;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
    padding: 11px 12px;
}

body.modern-home-page .modern-password-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

body.modern-home-page .modern-password-actions .button,
body.modern-home-page .modern-password-actions button {
    cursor: pointer;
    min-width: 130px;
}

body.modern-home-page .modern-password-secondary {
    background: #ffffff !important;
    color: hsl(var(--home-foreground)) !important;
}

body.modern-home-page #dialog_logout_confirm {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    max-width: min(480px, calc(100vw - 24px)) !important;
    overflow: visible !important;
    width: min(480px, calc(100vw - 24px)) !important;
}

body.modern-home-page .modern-logout-dialog {
    overflow: hidden;
}

body.modern-home-page .modern-logout-dialog .content {
    padding: 24px !important;
}

body.modern-home-page .modern-logout-message {
    color: hsl(var(--home-foreground));
    font-size: 22px;
    font-weight: 850;
    line-height: 1.25;
    margin: 0 0 10px;
}

body.modern-home-page .modern-logout-subtitle {
    color: hsl(var(--home-muted-foreground));
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

body.modern-home-page .modern-logout-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

body.modern-home-page .modern-logout-actions .button {
    cursor: pointer;
    min-width: 138px;
}

body.modern-home-page .modern-logout-confirm {
    background: linear-gradient(135deg, #c92f45 0%, #e04757 100%) !important;
    border-color: #c92f45 !important;
    color: #ffffff !important;
}

body.modern-home-page .modern-logout-confirm:hover,
body.modern-home-page .modern-logout-confirm:focus {
    background: linear-gradient(135deg, #b4273d 0%, #d93f50 100%) !important;
    border-color: #b4273d !important;
}

@media (max-width: 560px) {
    body.modern-home-page .modern-password-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    body.modern-home-page .modern-password-actions .button,
    body.modern-home-page .modern-password-actions button {
        width: 100%;
    }

    body.modern-home-page .modern-logout-actions {
        flex-direction: column-reverse;
    }

    body.modern-home-page .modern-logout-actions .button {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    body.modern-home-page #content_div.modern-menu-workspace-active {
        display: flex;
        flex-direction: column;
        height: var(--modern-menu-available-height, 100dvh);
        overflow: hidden;
    }

    body.modern-home-page #content_div.modern-menu-workspace-active #menu_div {
        flex: 0 0 auto;
        position: relative;
        top: auto;
        z-index: 80;
    }

    body.modern-home-page #content_div.modern-menu-workspace-active #home_div {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: 24px;
        scrollbar-width: thin;
    }

    body.modern-home-page #header {
        height: 82px;
        width: calc(100% - 20px) !important;
    }

    body.modern-home-page #header table {
        height: 82px;
    }

    body.modern-home-page #header a {
        top: 14px !important;
    }

    body.modern-home-page #header img {
        height: 68px;
        max-height: 68px;
        max-width: 78px;
    }

    body.modern-home-page #header td:first-child > div {
        font-size: 16px !important;
        padding-left: 88px !important;
        padding-top: 24px !important;
    }

    body.modern-home-page #header td:first-child > div > div {
        display: none;
    }

    body.modern-home-page #content {
        width: calc(100% - 20px) !important;
    }

    body.modern-home-page #menu_div {
        min-height: 0;
        padding: 0 10px;
    }

    body.modern-home-page #menu_div .h-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        min-height: 0;
        padding: 0;
        overflow: visible;
        width: 100%;
    }

    body.modern-home-page #menu_div .h-menu > li {
        flex: 1 1 140px;
        width: auto;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        font-size: 10.5px;
        min-height: 76px;
        padding: 10px 12px 14px !important;
    }

    body.modern-home-page #menu_div .h-menu > li > a > .icon,
    body.modern-home-page #menu_div .h-menu > li > a > [class*="mif-"] {
        font-size: 28px;
    }

    body.modern-home-page #menu_div .h-menu > li + li::before {
        display: none;
    }

    body.modern-home-page #menu_div .h-menu .d-menu {
        max-width: calc(100vw - 24px);
        min-width: 260px;
    }

    body.modern-home-page #menu_div .h-menu > li:first-child {
        position: static;
    }

    body.modern-home-page #menu_div .h-menu > li:first-child > .d-menu {
        left: 0 !important;
        max-height: min(72vh, 620px);
        max-width: none;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px;
        right: 0 !important;
        top: calc(100% + 8px) !important;
        width: 100% !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-has-children > a.dropdown-toggle::after {
        transform: rotate(45deg);
    }

    body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-open > a.dropdown-toggle {
        background: var(--home-primary-soft);
        color: hsl(var(--home-primary)) !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-open > a.dropdown-toggle::after {
        transform: rotate(225deg);
    }

    body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-terminal > a.dropdown-toggle::after {
        border: 0;
        color: hsl(var(--home-primary));
        content: "Onglets";
        font-size: 12px;
        font-weight: 850;
        height: auto;
        transform: none;
        width: auto;
    }

    body.modern-home-page #menu_div .h-menu .d-menu li > .d-menu {
        background: #f8fbf9;
        border: 1px solid hsl(var(--home-border));
        border-radius: var(--home-radius);
        box-shadow: none;
        display: none !important;
        left: auto !important;
        margin: 4px 0 8px;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        padding: 8px;
        position: relative !important;
        top: auto !important;
        width: 100% !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-open > .d-menu {
        display: block !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu.modern-menu-tabs-ready > .menu-title,
    body.modern-home-page #menu_div .h-menu .d-menu.modern-menu-tabs-ready > .modern-menu-branch {
        display: none !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu.modern-menu-tabs-ready > .modern-menu-tabs-page {
        display: block;
        padding: 2px;
    }

    body.modern-home-page #menu_div .modern-menu-page-head {
        color: hsl(var(--home-primary));
        font-size: 13px;
        font-weight: 850;
        margin: 0 0 8px;
        padding: 0 4px;
        text-transform: uppercase;
    }

    body.modern-home-page #menu_div .modern-menu-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 10px;
        overflow-x: auto;
        padding: 2px 2px 8px;
        scrollbar-width: thin;
    }

    body.modern-home-page #menu_div .modern-menu-tab {
        background: #f8fbf9;
        border: 1px solid hsl(var(--home-border));
        border-radius: var(--home-radius);
        color: hsl(var(--home-foreground));
        cursor: pointer;
        flex: 0 0 auto;
        font-family: var(--home-font);
        font-size: 13.5px;
        font-weight: 850;
        min-height: 38px;
        padding: 0 12px;
        white-space: nowrap;
    }

    body.modern-home-page #menu_div .modern-menu-tab.is-active {
        background: hsl(var(--home-primary));
        border-color: hsl(var(--home-primary));
        color: #ffffff;
    }

    body.modern-home-page #menu_div .modern-menu-panel {
        display: none;
    }

    body.modern-home-page #menu_div .modern-menu-panel.is-active {
        display: block;
    }

    body.modern-home-page #menu_div .modern-menu-tab-links {
        display: grid;
        gap: 6px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    body.modern-home-page #menu_div .modern-menu-tab-links li {
        display: block;
    }

    body.modern-home-page #menu_div .modern-menu-tab-links a {
        background: #ffffff;
        border: 1px solid hsl(var(--home-border));
        border-radius: var(--home-radius);
        font-weight: 800;
        min-height: 42px;
        padding: 10px 12px !important;
    }

    body.modern-home-page #menu_div .modern-menu-tab-links a:hover {
        background: var(--home-primary-soft);
    }

    body.modern-home-page #menu_div .modern-menu-empty {
        color: hsl(var(--home-muted-foreground));
        font-size: 14px;
        font-weight: 750;
        padding: 10px 4px;
    }

    .modern-home-hero {
        grid-template-columns: 1fr;
        padding: 24px 24px;
    }

    .modern-home-page-card .modern-home-hero {
        grid-template-columns: 1fr;
        padding: 24px 24px;
    }

    .modern-home-page-card .modern-home-sections {
        padding: 0 18px 20px;
    }

    .modern-home-title {
        font-size: 32px;
    }

    .modern-home-visual {
        border-left: 0;
        border-top: 1px solid hsl(var(--home-border));
        justify-content: flex-start;
        padding-left: 0;
        padding-top: 20px;
    }

    .modern-home-visual img {
        height: 126px;
    }

    .modern-home-status {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .modern-home-footer {
        width: calc(100% - 20px);
    }

    body.modern-home-page #home_div .dataTables_length,
    body.modern-home-page #home_div .dataTables_filter,
    body.modern-home-page #home_div .dataTables_info,
    body.modern-home-page #home_div .dataTables_paginate {
        float: none !important;
        text-align: left;
        width: 100%;
    }

    body.modern-home-page #home_div .modern-datatables-toolbar,
    body.modern-home-page #home_div .modern-datatables-footer {
        align-items: stretch;
        flex-direction: column;
    }

    body.modern-home-page #home_div .modern-filter-panel {
        padding: 16px 14px;
    }

    body.modern-home-page #home_div .modern-filter-title,
    body.modern-home-page #home_div .modern-filter-grid {
        margin-left: 0;
    }

    body.modern-home-page #home_div .modern-filter-grid {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-filter-actions {
        justify-content: stretch;
    }

    body.modern-home-page #home_div .modern-filter-submit {
        width: 100%;
    }

    body.modern-home-page #home_div .modern-visible-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    body.modern-home-page #home_div .dataTables_filter label,
    body.modern-home-page #home_div .dataTables_filter input,
    body.modern-home-page #home_div .dataTables_length label,
    body.modern-home-page #home_div .dataTables_length select {
        width: 100%;
    }

    body.modern-home-page #home_div .dataTables_filter input,
    body.modern-home-page #home_div .dataTables_length select {
        margin: 6px 0 0;
    }

    body.modern-home-page #home_div .dataTables_paginate {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    body.modern-home-page #content {
        width: calc(100% - 10px) !important;
    }

    body.modern-home-page #menu_div .h-menu {
        gap: 0;
        padding: 0;
    }

    body.modern-home-page #menu_div .h-menu > li:first-child {
        flex: 1 1 130px;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        font-size: 10px;
        min-height: 72px;
        padding: 10px 10px 14px !important;
    }

    body.modern-home-page #menu_div .h-menu > li:first-child > .d-menu {
        left: 0 !important;
        max-width: none;
        right: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu .d-menu {
        left: 0 !important;
        margin-left: 0;
        max-width: 100%;
        position: relative !important;
        top: 0 !important;
        width: 100%;
    }

    body.modern-home-page #menu_div .h-menu .d-menu li a {
        font-size: 14.5px;
        min-height: 42px;
        padding: 9px 14px !important;
    }

    .modern-home-hero {
        padding: 22px 16px;
    }

    .modern-home-page-card {
        margin-bottom: 12px;
    }

    .modern-home-page-card .modern-home-hero {
        padding: 22px 16px;
    }

    .modern-home-page-card .modern-home-sections {
        padding: 0 12px 16px;
    }

    body.modern-home-page #home_div .modern-home-page-card .modern-page-heading,
    body.modern-home-page #home_div .modern-home-page-card .accordion .heading {
        padding: 14px 2px 8px !important;
    }

    body.modern-home-page #home_div .modern-home-page-card .modern-page-body,
    body.modern-home-page #home_div .modern-home-page-card .accordion .content {
        padding: 6px 2px 16px !important;
    }

    .modern-home-title {
        font-size: 27px;
    }

    .modern-home-subtitle {
        font-size: 15.5px;
    }

    .modern-home-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .modern-home-button {
        justify-content: center;
        width: 100%;
    }

    .modern-home-visual {
        align-items: stretch;
        flex-direction: column;
    }

    .modern-home-visual img {
        align-self: center;
    }

    .modern-home-status {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .accordion .content {
        padding: 16px !important;
    }

    body.modern-home-page #home_div .dataTables_length,
    body.modern-home-page #home_div .dataTables_filter,
    body.modern-home-page #home_div .dataTables_info,
    body.modern-home-page #home_div .dataTables_paginate {
        float: none !important;
        text-align: left;
        width: 100%;
    }

    body.modern-home-page #home_div .modern-datatables-toolbar,
    body.modern-home-page #home_div .modern-datatables-footer {
        align-items: stretch;
        flex-direction: column;
    }

    body.modern-home-page #home_div .modern-filter-panel {
        padding: 16px 14px;
    }

    body.modern-home-page #home_div .modern-filter-title,
    body.modern-home-page #home_div .modern-filter-grid {
        margin-left: 0;
    }

    body.modern-home-page #home_div .modern-filter-grid {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-filter-actions {
        justify-content: stretch;
    }

    body.modern-home-page #home_div .modern-filter-submit {
        width: 100%;
    }

    body.modern-home-page #home_div .modern-visible-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    body.modern-home-page #home_div .dataTables_filter label,
    body.modern-home-page #home_div .dataTables_filter input,
    body.modern-home-page #home_div .dataTables_length label,
    body.modern-home-page #home_div .dataTables_length select {
        width: 100%;
    }

    body.modern-home-page #home_div .dataTables_filter input,
    body.modern-home-page #home_div .dataTables_length select {
        margin: 6px 0 0;
    }

    body.modern-home-page #home_div .dataTables_paginate {
        justify-content: flex-start;
    }

    body.modern-home-page #home_div table,
    body.modern-home-page #home_div tbody,
    body.modern-home-page #home_div tr,
    body.modern-home-page #home_div td {
        display: block;
        width: 100% !important;
    }

    body.modern-home-page #home_div td {
        border-bottom: 0;
        padding: 6px 0;
    }

    body.modern-home-page #home_div td:first-child {
        padding-top: 12px;
    }

    body.modern-home-page #home_div .dataTables_wrapper table {
        display: table;
        min-width: 100%;
        width: 100% !important;
    }

    body.modern-home-page #home_div .dataTables_wrapper thead {
        display: table-header-group;
    }

    body.modern-home-page #home_div .dataTables_wrapper tbody {
        display: table-row-group;
    }

    body.modern-home-page #home_div .dataTables_wrapper tr {
        display: table-row;
    }

    body.modern-home-page #home_div .dataTables_wrapper th,
    body.modern-home-page #home_div .dataTables_wrapper td {
        border-bottom: 1px solid hsl(var(--home-border));
        display: table-cell;
        padding: 9px 10px;
        width: auto !important;
    }

    .modern-home-footer {
        margin-bottom: 32px;
        padding: 22px 18px;
        width: calc(100% - 10px);
    }

    .modern-home-footer-top,
    .modern-home-footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .modern-home-footer-links-block {
        justify-items: start;
        min-width: 0;
    }

    .modern-home-footer-nav,
    .modern-home-footer-social {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    body.modern-home-page #menu_div .h-menu {
        display: flex;
        flex-wrap: wrap;
        overflow-x: visible;
        overflow-y: visible;
    }

    body.modern-home-page #menu_div .h-menu > li,
    body.modern-home-page #menu_div .h-menu > li:first-child {
        min-width: 0;
        width: auto;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        min-width: 118px;
        padding: 10px 8px 14px !important;
        text-align: center;
        white-space: normal;
        width: auto;
    }

    .modern-menu-window-card {
        max-height: none;
    }
}

@media (max-width: 420px) {
    body.modern-home-page #menu_div .h-menu {
        display: flex;
        flex-wrap: wrap;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        min-width: 108px;
        min-height: 70px;
    }

    .modern-menu-window-card {
        padding: 12px;
        width: 100%;
    }

    .modern-menu-window-head {
        align-items: stretch;
        flex-direction: column;
    }

    .modern-menu-window-tabs {
        display: flex;
    }

    .modern-menu-window-tab {
        flex: 0 0 132px;
        width: auto;
    }

    .modern-menu-window-actions {
        display: flex;
    }

    .modern-menu-window-action {
        flex-basis: 150px;
    }
}

@media (max-width: 1024px) {
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper {
        overflow-x: visible;
        padding: 10px;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_scroll,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_scrollBody {
        overflow: visible !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_scrollHead,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_scrollFoot {
        display: none !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable {
        background: transparent !important;
        border: 0 !important;
        border-collapse: separate !important;
        display: block !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table thead,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable thead,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tfoot,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tfoot {
        display: none !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody {
        display: grid !important;
        gap: 10px;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody tr,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody tr {
        background: #ffffff !important;
        border: 1px solid hsl(var(--home-border));
        border-radius: var(--home-radius);
        box-shadow: 0 10px 24px rgba(12, 28, 20, 0.08);
        display: block !important;
        overflow: hidden;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td {
        align-items: start;
        background: #ffffff !important;
        border: 0 !important;
        border-bottom: 1px solid hsl(var(--home-border)) !important;
        display: grid !important;
        gap: 10px;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        min-height: 42px;
        padding: 10px 12px !important;
        text-align: right !important;
        white-space: normal !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td:last-child,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td:last-child {
        border-bottom: 0 !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td::before,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td::before {
        color: hsl(var(--home-primary));
        content: attr(data-label);
        font-size: 12px;
        font-weight: 850;
        letter-spacing: 0;
        line-height: 1.35;
        text-align: left;
        text-transform: uppercase;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td[style*="display: none"],
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td[style*="display: none"],
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table thead th[style*="display: none"],
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable thead th[style*="display: none"] {
        display: none !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody tr.modern-table-empty-row,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody tr.modern-table-empty-row {
        box-shadow: none;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody tr.modern-table-empty-row td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody tr.modern-table-empty-row td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td.dataTables_empty,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td.dataTables_empty {
        color: hsl(var(--home-muted-foreground));
        display: block !important;
        font-weight: 850;
        padding: 18px 14px !important;
        text-align: center !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody tr.modern-table-empty-row td::before,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody tr.modern-table-empty-row td::before,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td.dataTables_empty::before,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td.dataTables_empty::before {
        content: none;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td.modern-col-highlight-montant,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td.modern-col-highlight-situation {
        border-left: 3px solid rgba(26, 92, 61, 0.34) !important;
    }
}

@media (max-width: 700px) {
    body.modern-home-page #menu_div {
        margin-bottom: 10px;
        padding: 0 8px;
        z-index: 120;
    }

    body.modern-home-page #menu_div .h-menu {
        background: rgba(0, 118, 111, 0.96);
        border-color: rgba(255, 255, 255, 0.22);
        border-radius: 10px;
        box-shadow: 0 10px 26px rgba(7, 24, 20, 0.22), 0 3px 0 rgba(217, 169, 54, 0.52);
        display: grid;
        gap: 1px;
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        min-height: 0;
        overflow: visible;
        padding: 1px;
        width: 100%;
    }

    body.modern-home-page #menu_div .h-menu::before,
    body.modern-home-page #menu_div .h-menu::after {
        content: none;
        display: none;
    }

    body.modern-home-page #menu_div .h-menu > li,
    body.modern-home-page #menu_div .h-menu > li:first-child {
        flex: none;
        min-width: 0;
        position: static;
        width: auto;
    }

    body.modern-home-page #menu_div .h-menu > li + li::before {
        display: none;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        background: rgba(255, 255, 255, 0.04);
        border-radius: 8px;
        font-size: 9.5px;
        gap: 4px;
        min-height: 58px;
        min-width: 0;
        padding: 7px 4px 8px !important;
        white-space: normal;
        width: 100%;
    }

    body.modern-home-page #menu_div .h-menu > li > a > .icon,
    body.modern-home-page #menu_div .h-menu > li > a > [class*="mif-"] {
        font-size: 22px;
    }

    body.modern-home-page #menu_div .h-menu > li > a.dropdown-toggle::after {
        height: 5px;
        right: 8px;
        top: 8px;
        width: 5px;
    }

    body.modern-home-page #menu_div .h-menu > li > a:hover,
    body.modern-home-page #menu_div .h-menu > li > a.active-toggle {
        background: rgba(255, 255, 255, 0.16);
    }

    body.modern-home-page #menu_div .h-menu > li > .d-menu,
    body.modern-home-page #menu_div .h-menu > li:first-child > .d-menu {
        left: 8px !important;
        max-height: min(68vh, 520px);
        max-width: none;
        min-width: 0;
        overflow-x: hidden;
        overflow-y: auto;
        right: 8px !important;
        top: calc(100% + 8px) !important;
        width: auto !important;
    }

    body.modern-home-page #menu_div .h-menu .d-menu li a {
        font-size: 14px;
        min-height: 40px;
        padding: 9px 13px !important;
    }
}

@media (max-width: 360px) {
    body.modern-home-page #menu_div .h-menu {
        grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        font-size: 9px;
        min-height: 54px;
        padding-left: 3px !important;
        padding-right: 3px !important;
    }

    body.modern-home-page #menu_div .h-menu > li > a > .icon,
    body.modern-home-page #menu_div .h-menu > li > a > [class*="mif-"] {
        font-size: 20px;
    }
}

@media (max-width: 760px) {
    body.modern-home-page #home_div .modern-profile-table tbody,
    body.modern-home-page #home_div .modern-locality-form {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-profile-row {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-profile-row td:first-child {
        border-bottom: 1px solid hsl(var(--home-border));
        border-right: 0;
        padding-bottom: 6px !important;
    }

    body.modern-home-page #home_div .modern-profile-row td:last-child {
        padding-top: 8px !important;
    }

    body.modern-home-page #home_div .modern-profile-row td a {
        margin-left: 0;
        margin-top: 8px;
    }

    body.modern-home-page #home_div .modern-profile-row td:last-child {
        align-items: flex-start;
        flex-direction: column;
    }

    body.modern-home-page #home_div .modern-current-locality {
        align-items: flex-start;
        flex-direction: column;
    }

    body.modern-home-page .modern-decision-picker-grid,
    body.modern-home-page #home_div .modern-decision-reload,
    body.modern-home-page #home_div .modern-decision-reload .row,
    body.modern-home-page #home_div .modern-decision-editor .slippylist > div[id^="DIV_DECISION_"] {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-decision-actions,
    body.modern-home-page #home_div .modern-decision-final-actions {
        align-items: stretch;
        flex-direction: column;
    }

    body.modern-home-page #home_div .modern-decision-list-head {
        align-items: flex-start;
        flex-direction: column;
    }

    body.modern-home-page #home_div .modern-decision-actions label,
    body.modern-home-page #home_div .modern-decision-actions .button,
    body.modern-home-page #home_div .modern-decision-final-actions label,
    body.modern-home-page #home_div .modern-decision-final-actions .button,
    body.modern-home-page #home_div .modern-decision-reload label,
    body.modern-home-page #home_div .modern-decision-reload .button {
        width: 100%;
    }

    body.modern-home-page #home_div .modern-decision-editor td,
    body.modern-home-page #home_div .modern-decision-editor td:first-child {
        display: block;
        width: 100%;
    }

    body.modern-home-page #home_div .modern-locality-action,
    body.modern-home-page #home_div .modern-locality-action .button,
    body.modern-home-page #home_div .modern-profile-status-row label,
    body.modern-home-page #home_div .modern-profile-status-row .button {
        justify-self: stretch;
        width: 100%;
    }
}

html:has(#modern-home-root),
body:has(#modern-home-root) {
    background: var(--home-background) !important;
    min-height: 100vh;
    overflow-x: hidden;
}

body:has(#modern-home-root) #header {
    height: 92px;
    min-width: 0;
    width: var(--home-page-width) !important;
}

body:has(#modern-home-root) #header table {
    height: 92px;
}

body:has(#modern-home-root) #header img {
    height: 86px;
    max-height: 86px;
    max-width: 98px;
    object-fit: contain;
    width: auto;
}

body:has(#modern-home-root) #header a {
    left: 0 !important;
    top: 4px !important;
}

body:has(#modern-home-root) #header td:first-child > div {
    color: #ffffff !important;
    font-size: 20px !important;
    line-height: 1.15;
    padding-left: 110px !important;
    padding-top: 28px !important;
}

body:has(#modern-home-root) #content {
    background: transparent !important;
    background-image: none !important;
    box-sizing: border-box;
    margin-top: 6px;
    min-height: 0;
    min-width: 0;
    padding: 0 !important;
    width: var(--home-page-width) !important;
}

body:has(#modern-home-root) #content > div > table,
body:has(#modern-home-root) #content > div > table > tbody,
body:has(#modern-home-root) #content > div > table > tbody > tr,
body:has(#modern-home-root) #content > div > table > tbody > tr > td {
    display: block;
    width: 100%;
}

body:has(#modern-home-root) #content > div > table > tbody > tr > td {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    vertical-align: top !important;
}

body:has(#modern-home-root) #content_div,
body:has(#modern-home-root) #home_div {
    width: 100%;
}

@media (max-width: 1024px) {
    body:has(#modern-home-root) #header {
        height: 82px;
        width: calc(100% - 20px) !important;
    }

    body:has(#modern-home-root) #header table {
        height: 82px;
    }

    body:has(#modern-home-root) #header img {
        height: 68px;
        max-height: 68px;
        max-width: 78px;
    }

    body:has(#modern-home-root) #header a {
        top: 14px !important;
    }

    body:has(#modern-home-root) #header td:first-child > div {
        font-size: 16px !important;
        padding-left: 88px !important;
        padding-top: 24px !important;
    }

    body:has(#modern-home-root) #header td:first-child > div > div {
        display: none;
    }

    body:has(#modern-home-root) #content {
        width: calc(100% - 20px) !important;
    }
}

@media (max-width: 560px) {
    body:has(#modern-home-root) #content {
        width: calc(100% - 10px) !important;
    }
}

/* Stabilisation finale: menus, selects et pied de page dans l'ancien shell Metro. */
body.modern-home-page #menu_div {
    isolation: isolate;
    margin-bottom: 14px;
    padding-left: 12px;
    padding-right: 12px;
    z-index: 450;
}

body.modern-home-page #menu_div.modern-menu-page-active {
    z-index: 650;
}

body.modern-home-page #menu_div .h-menu {
    background: rgba(0, 117, 115, 0.97) !important;
    border-color: rgba(255, 255, 255, 0.26) !important;
    box-shadow: 0 18px 42px rgba(4, 24, 22, 0.26), inset 0 -3px 0 rgba(218, 170, 54, 0.72) !important;
    min-height: 78px;
}

body.modern-home-page #menu_div .h-menu > li > a {
    background: transparent !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 850;
    gap: 6px;
    min-height: 78px;
    padding: 12px 16px 14px !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

body.modern-home-page #menu_div .h-menu > li > a > .icon,
body.modern-home-page #menu_div .h-menu > li > a > [class*="mif-"] {
    font-size: 26px;
}

body.modern-home-page #menu_div .h-menu > li > a:hover,
body.modern-home-page #menu_div .h-menu > li > a.active-toggle,
body.modern-home-page #menu_div .h-menu > li.modern-menu-open > a,
body.modern-home-page #menu_div .h-menu > li.modern-menu-source-active > a {
    background: rgba(251, 244, 224, 0.14) !important;
    box-shadow: inset 0 -4px 0 rgba(218, 170, 54, 0.95);
    color: #ffffff !important;
}

body.modern-home-page #menu_div .h-menu > li > a.dropdown-toggle::after {
    opacity: 0.95;
}

body.modern-home-page #menu_div li.modern-menu-open > .d-menu,
body.modern-home-page #menu_div .h-menu > li:hover > .d-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.modern-home-page #menu_div.modern-menu-page-active .h-menu .d-menu,
body.modern-home-page #menu_div.modern-menu-page-active .h-menu > li:hover > .d-menu,
body.modern-home-page #menu_div.modern-menu-page-active li.modern-menu-open > .d-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

body.modern-home-page #menu_div.modern-menu-page-active .modern-menu-window.is-open {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.modern-home-page #menu_div .h-menu .d-menu {
    color: hsl(var(--home-foreground));
    z-index: 7200 !important;
}

body.modern-home-page #menu_div .h-menu .d-menu li a {
    font-size: 15px;
    font-weight: 750;
}

body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-open > a.dropdown-toggle {
    background: var(--home-primary-soft) !important;
    color: hsl(var(--home-primary)) !important;
}

body.modern-home-page #menu_div .h-menu .d-menu li.modern-menu-open > a.dropdown-toggle::after {
    transform: rotate(45deg);
}

body.modern-home-page #content,
body.modern-home-page #content_div,
body.modern-home-page #home_div {
    position: relative;
    z-index: 2;
}

body.modern-home-page .modern-footer-wrap {
    clear: both;
    display: block;
    margin: 18px auto 42px;
    position: relative;
    width: var(--home-page-width);
    z-index: 1;
}

body.modern-home-page .modern-footer-wrap .modern-home-footer {
    margin: 0;
    width: 100%;
}

body.modern-login-page .modern-footer-wrap,
body:not(.modern-home-page) .modern-footer-wrap {
    display: none;
}

body.modern-home-page .modern-home-footer {
    background: linear-gradient(135deg, rgba(12, 132, 217, 0.62), rgba(10, 114, 188, 0.5));
    backdrop-filter: blur(10px);
}

body.modern-home-page select {
    appearance: auto;
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    color: hsl(var(--home-foreground));
    font-family: var(--home-font);
    min-height: 38px;
    padding: 0 12px;
}

body.modern-home-page .input-control[data-role="select"] {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-sizing: border-box;
    height: auto !important;
    max-width: 100% !important;
    overflow: visible;
    padding: 0 !important;
}

body.modern-home-page .input-control[data-role="select"] select {
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
    height: 38px;
    max-width: 100% !important;
    min-height: 38px;
    width: 100% !important;
}

body.modern-home-page .select2-container {
    display: inline-block;
    max-width: 100%;
    position: relative;
    vertical-align: middle;
    width: 100% !important;
}

body.modern-home-page .select2-container,
body.modern-home-page .select2-container .select2-choice,
body.modern-home-page .select2-container .select2-choices {
    box-sizing: border-box;
}

body.modern-home-page .select2-container .select2-choice {
    align-items: center;
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    color: hsl(var(--home-foreground)) !important;
    display: flex;
    font-family: var(--home-font);
    font-size: 14px;
    height: 38px !important;
    line-height: 38px !important;
    overflow: hidden;
    padding: 0 34px 0 12px;
    position: relative;
    text-decoration: none !important;
    white-space: nowrap;
}

body.modern-home-page .select2-container .select2-choice > .select2-chosen {
    color: hsl(var(--home-foreground));
    line-height: 38px;
    margin-right: 0;
}

body.modern-home-page .select2-container .select2-choice .select2-arrow {
    background: transparent !important;
    border-left: 1px solid hsl(var(--home-border)) !important;
    height: 36px;
    position: absolute;
    right: 0;
    top: 0;
    width: 32px;
}

body.modern-home-page .select2-container .select2-choice .select2-arrow b {
    background: none !important;
    border-bottom: 2px solid hsl(var(--home-primary));
    border-right: 2px solid hsl(var(--home-primary));
    display: block;
    height: 8px;
    margin: 12px auto 0;
    transform: rotate(45deg);
    width: 8px;
}

body.modern-home-page .select2-container-active .select2-choice,
body.modern-home-page .select2-dropdown-open .select2-choice {
    border-color: hsl(var(--home-primary)) !important;
    box-shadow: 0 0 0 3px rgba(12, 132, 217, 0.16) !important;
}

body.modern-home-page .select2-offscreen,
body.modern-home-page .select2-offscreen:focus {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    left: 0 !important;
    margin: 0 !important;
    outline: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    width: 1px !important;
}

body.modern-home-page .select2-display-none {
    display: none !important;
}

body.modern-home-page .select2-drop-mask {
    background: transparent;
    border: 0;
    height: auto;
    inset: 0;
    margin: 0;
    min-height: 100%;
    min-width: 100%;
    padding: 0;
    position: fixed;
    width: auto;
    z-index: 7998;
}

body.modern-home-page .select2-drop,
body.modern-home-page .select2-drop-active,
body.modern-home-page .select2-drop.select2-drop-above {
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: 0 18px 46px rgba(4, 24, 22, 0.24) !important;
    color: hsl(var(--home-foreground)) !important;
    font-family: var(--home-font);
    overflow: hidden;
    position: absolute;
    z-index: 8000 !important;
}

body.modern-home-page .select2-search {
    padding: 8px;
}

body.modern-home-page .select2-search input {
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius);
    font-family: var(--home-font);
    min-height: 34px;
    padding: 6px 9px !important;
}

body.modern-home-page .select2-results {
    color: hsl(var(--home-foreground));
    font-family: var(--home-font);
    margin: 0;
    max-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px;
    position: relative;
}

body.modern-home-page .select2-results ul.select2-result-sub {
    margin: 0;
    padding-left: 0;
}

body.modern-home-page .select2-results .select2-result-label {
    font-size: 14px;
    line-height: 1.35;
    padding: 8px 10px;
}

body.modern-home-page .select2-results .select2-highlighted {
    background: hsl(var(--home-primary)) !important;
    border-radius: 6px;
    color: #ffffff !important;
}

body.modern-home-page .select2-container-multi .select2-choices {
    align-items: center;
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    cursor: text;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    min-height: 38px;
    padding: 4px 8px;
}

body.modern-home-page .select2-container-multi .select2-choices li {
    list-style: none;
}

body.modern-home-page .select2-container-multi .select2-search-field input {
    border: 0 !important;
    box-shadow: none !important;
    min-height: 28px;
    padding: 3px 0 !important;
}

body.modern-home-page .select2-container-multi .select2-search-choice {
    background: var(--home-primary-soft);
    border: 1px solid rgba(198, 146, 36, 0.24);
    border-radius: 6px;
    color: hsl(var(--home-primary));
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    margin: 0;
    padding: 5px 8px 5px 22px;
    position: relative;
}

body.modern-home-page .select2-search-choice-close,
body.modern-home-page .select2-container .select2-choice abbr {
    display: none !important;
}

@media (max-width: 900px) {
    body.modern-home-page #menu_div {
        margin-bottom: 10px;
        padding-left: 8px;
        padding-right: 8px;
    }

    body.modern-home-page #menu_div .h-menu {
        min-height: 0;
    }

    body.modern-home-page #menu_div .h-menu > li {
        flex: 1 1 48%;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        font-size: 13px;
        min-height: 58px;
        padding: 10px 12px !important;
    }

    body.modern-home-page #menu_div .h-menu > li > a > .icon,
    body.modern-home-page #menu_div .h-menu > li > a > [class*="mif-"] {
        font-size: 21px;
    }

    body.modern-home-page .modern-footer-wrap {
        margin-bottom: 28px;
        width: calc(100% - 20px);
    }
}

@media (max-width: 560px) {
    body.modern-home-page #menu_div .h-menu > li {
        flex-basis: 50%;
    }

    body.modern-home-page #menu_div .h-menu > li > a {
        font-size: 12px;
        min-width: 0;
    }

    body.modern-home-page .modern-footer-wrap {
        width: calc(100% - 10px);
    }

    body.modern-home-page .modern-home-footer {
        padding: 20px 16px;
    }

    .modern-home-footer-nav {
        gap: 12px;
    }

    .modern-home-footer-nav a,
    .modern-home-footer-site {
        font-size: 12px;
        letter-spacing: 0.08em;
    }
}

/* Couche finale pour que les modales et les listes de select restent au-dessus du menu. */
body.modern-home-page .dialog-overlay {
    background: rgba(4, 18, 16, 0.52) !important;
    inset: 0 !important;
    position: fixed !important;
    z-index: 90000 !important;
}

body.modern-home-page .modern-centered-dialog,
body.modern-home-page [data-role="dialog"].modern-dialog-visible {
    bottom: auto !important;
    left: 50% !important;
    max-height: calc(100vh - 32px) !important;
    max-width: min(880px, calc(100vw - 24px)) !important;
    overflow: auto !important;
    position: fixed !important;
    right: auto !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: min(880px, calc(100vw - 24px)) !important;
    z-index: 90020 !important;
}

body.modern-home-page #dialog_loading.modern-centered-dialog,
body.modern-home-page #dialog_loading.modern-dialog-visible {
    max-width: min(560px, calc(100vw - 24px)) !important;
    overflow: hidden !important;
    width: min(560px, calc(100vw - 24px)) !important;
}

body.modern-home-page .select2-drop-mask,
body.modern-home-page .select2-close-mask {
    z-index: 90025 !important;
}

body.modern-home-page .select2-drop,
body.modern-home-page .select2-drop-active,
body.modern-home-page .select2-drop.select2-drop-above,
body.modern-home-page .select2-dropdown,
body.modern-home-page .select2-container--open,
body.modern-home-page .modern-select2-dropdown {
    z-index: 90030 !important;
}

body.modern-home-page .modern-centered-dialog .select2-drop,
body.modern-home-page .modern-centered-dialog .select2-dropdown,
body.modern-home-page .modern-centered-dialog .modern-select2-dropdown {
    z-index: 90030 !important;
}

body.modern-home-page.dialog-open #menu_div .h-menu .d-menu,
body.modern-home-page.no-scroll #menu_div .h-menu .d-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

body.modern-home-page.dialog-open,
body.modern-home-page.no-scroll {
    overflow: hidden;
}

@media (max-width: 680px) {
    body.modern-home-page .modern-centered-dialog,
    body.modern-home-page [data-role="dialog"].modern-dialog-visible {
        max-height: calc(100vh - 18px) !important;
        max-width: calc(100vw - 12px) !important;
        width: calc(100vw - 12px) !important;
    }
}

/* Select2 global: les listes doivent pouvoir sortir des blocs de formulaire. */
body.modern-home-page .input-control[data-role="select"],
body.modern-home-page [data-role="select"],
body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"],
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"],
body.modern-home-page .modern-modal-form .input-control[data-role="select"] {
    overflow: visible !important;
}

body.modern-home-page .modern-select2-container,
body.modern-home-page .select2-container,
body.modern-home-page .select2-container .select2-choice,
body.modern-home-page .select2-container .select2-choices {
    pointer-events: auto !important;
}

body.modern-home-page .modern-centered-dialog.modern-dialog-visible,
body.modern-home-page [data-role="dialog"].modern-dialog-visible {
    animation: none !important;
    overflow: hidden !important;
    perspective: none !important;
    transition: none !important;
    will-change: auto !important;
}

body.modern-home-page .modern-centered-dialog.modern-dialog-visible .modern-modal-form,
body.modern-home-page [data-role="dialog"].modern-dialog-visible .modern-modal-form {
    max-height: calc(100vh - 32px) !important;
}

body.modern-home-page .modern-centered-dialog.modern-dialog-visible .modern-modal-form .content,
body.modern-home-page [data-role="dialog"].modern-dialog-visible .modern-modal-form .content {
    max-height: calc(100vh - 90px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.modern-home-page #home_div .input-control.file,
body.modern-home-page .modern-modal-form .input-control.file {
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    display: grid !important;
    gap: 8px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: 44px !important;
    overflow: visible !important;
    padding: 4px !important;
    width: 100% !important;
}

body.modern-home-page #home_div .input-control.file input[type="file"],
body.modern-home-page .modern-modal-form .input-control.file input[type="file"] {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: hsl(var(--home-foreground)) !important;
    cursor: pointer !important;
    display: block !important;
    font-size: 14px !important;
    height: auto !important;
    min-height: 34px !important;
    opacity: 1 !important;
    padding: 6px 8px !important;
    pointer-events: auto !important;
    position: static !important;
    visibility: visible !important;
    width: 100% !important;
}

body.modern-home-page #home_div .input-control.file input[type="file"]::file-selector-button,
body.modern-home-page .modern-modal-form .input-control.file input[type="file"]::file-selector-button {
    background: hsl(var(--home-primary)) !important;
    border: 1px solid hsl(var(--home-primary)) !important;
    border-radius: var(--home-radius) !important;
    color: #ffffff !important;
    cursor: pointer;
    font-family: var(--home-font);
    font-weight: 800;
    margin-right: 10px;
    min-height: 32px;
    padding: 0 12px;
}

/* === Switch utilisateur (ROLE_ADMIN_SWITCH) === */
body.modern-home-page .modern-header-switch {
    align-items: center;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(10, 41, 78, 0.18);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-family: var(--home-font);
    font-size: 14px;
    font-weight: 800;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    transition: background 0.18s ease, transform 0.18s ease;
}

body.modern-home-page .modern-header-switch:hover,
body.modern-home-page .modern-header-switch:focus {
    background: rgba(255, 255, 255, 0.24);
    outline: none;
    transform: translateY(-1px);
}

body.modern-home-page .modern-header-impersonate-chip {
    align-items: center;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(10, 41, 78, 0.18);
    color: #664d03;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    max-width: min(46vw, 420px);
    min-height: 42px;
    padding: 0 14px;
}

body.modern-home-page .modern-header-impersonate-chip .icon {
    color: #b45309;
    flex: none;
    font-size: 16px;
}

body.modern-home-page .modern-header-impersonate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.modern-home-page .modern-header-switch.modern-impersonate-back {
    background: #b45309;
    border-color: rgba(255, 255, 255, 0.3);
}

body.modern-home-page .modern-header-switch.modern-impersonate-back:hover,
body.modern-home-page .modern-header-switch.modern-impersonate-back:focus {
    background: #92400e;
}

@media (max-width: 900px) {
    body.modern-home-page .modern-header-impersonate-chip {
        max-width: 100%;
    }

    body.modern-home-page .modern-header-impersonate-text {
        white-space: normal;
    }
}

.modern-switch-search {
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-sizing: border-box;
    font-family: var(--home-font);
    font-size: 14px;
    min-height: 42px;
    padding: 0 12px;
    width: 100%;
}

.modern-switch-results {
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.modern-switch-item {
    cursor: pointer;
    font-size: 14px;
    padding: 10px 12px;
}

.modern-switch-item:hover {
    background: hsl(var(--home-muted));
}

.modern-switch-item.selected {
    background: hsl(var(--home-primary));
    color: #ffffff;
}

.modern-switch-empty {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
    padding: 10px 12px;
}

body.modern-home-page #home_div .input-control.file .button,
body.modern-home-page .modern-modal-form .input-control.file .button {
    background: #f8fbf9 !important;
    color: hsl(var(--home-primary)) !important;
    min-height: 34px !important;
    min-width: 40px !important;
    padding: 0 !important;
}

body.modern-home-page #home_div .modern-porteur-info {
    background: rgba(255, 255, 255, 0.97) !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: 0 16px 42px rgba(7, 24, 20, 0.14) !important;
    margin: 0 auto 18px !important;
    max-width: var(--home-page-width) !important;
    overflow: hidden !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-info .heading {
    background: linear-gradient(90deg, rgba(12, 132, 217, 0.1), #ffffff) !important;
    border-bottom: 1px solid hsl(var(--home-border)) !important;
    min-height: 52px;
}

body.modern-home-page #home_div .modern-porteur-info .modern-porteur-content {
    background: #f4f8ff !important;
    padding: 0 !important;
}

body.modern-home-page #home_div .modern-porteur-shell {
    padding: 18px;
}

body.modern-home-page #home_div .modern-porteur-layout,
body.modern-home-page #home_div .modern-porteur-layout > tbody,
body.modern-home-page #home_div .modern-porteur-layout > tbody > tr {
    display: block !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-layout > tbody > tr > td:first-child {
    display: none !important;
}

body.modern-home-page #home_div .modern-porteur-layout > tbody > tr > td.modern-porteur-main {
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 0 !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-filter {
    background: var(--home-filter-gradient);
    border: 1px solid var(--home-filter-border);
    border-radius: var(--home-radius);
    box-shadow: 0 10px 26px rgba(10, 41, 78, 0.06);
    box-sizing: border-box;
    margin: 0;
    order: 1;
    overflow: visible !important;
    padding: 14px;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-filter table,
body.modern-home-page #home_div .modern-porteur-filter tbody,
body.modern-home-page #home_div .modern-porteur-filter tr {
    display: block !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-filter tr {
    align-items: end;
    display: grid !important;
    gap: 12px;
    grid-template-columns: minmax(170px, 240px) minmax(0, 1fr) minmax(130px, 170px);
}

body.modern-home-page #home_div .modern-porteur-filter td {
    border: 0 !important;
    color: hsl(var(--home-foreground));
    display: block !important;
    font-weight: 700;
    min-width: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    width: auto !important;
}

body.modern-home-page #home_div .modern-porteur-filter .input-control,
body.modern-home-page #home_div .modern-porteur-filter .modern-native-select-wrap,
body.modern-home-page #home_div .modern-porteur-filter .modern-select-ui,
body.modern-home-page #home_div .modern-porteur-filter select {
    float: none !important;
    max-width: 100% !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-filter .modern-select-popover {
    left: 0 !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 100% !important;
    right: auto !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-filter .modern-select-trigger {
    min-width: 0 !important;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-filter .modern-select-value {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

body.modern-home-page #home_div .modern-porteur-filter input[type="button"] {
    min-height: 42px !important;
    width: 100%;
}

body.modern-home-page #home_div .modern-porteur-section {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    box-shadow: 0 10px 26px rgba(10, 41, 78, 0.06);
    box-sizing: border-box;
    margin-top: 0;
    order: 2;
    overflow: hidden;
    padding: 14px;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-section > br:first-child {
    display: none;
}

body.modern-home-page #home_div .modern-porteur-section h3,
body.modern-home-page #home_div .modern-porteur-main > h3 {
    color: hsl(var(--home-foreground));
    font-size: 22px;
    font-weight: 850;
    line-height: 1.2;
    margin: 0 0 12px;
}

body.modern-home-page #home_div .modern-porteur-main > h3 {
    background: #ffffff;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    padding: 14px;
}

body.modern-home-page #home_div .modern-porteur-balance {
    background: linear-gradient(135deg, rgba(12, 132, 217, 0.09), #ffffff 58%);
    border: 1px solid rgba(12, 132, 217, 0.2);
    border-radius: var(--home-radius);
    box-shadow: 0 12px 28px rgba(10, 41, 78, 0.08);
    box-sizing: border-box;
    margin: 0;
    order: 0;
    padding: 16px;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-balance h3 {
    color: hsl(var(--home-primary));
    font-size: 20px;
    font-weight: 850;
    margin: 0 0 12px;
}

body.modern-home-page #home_div .modern-porteur-balance h3 span {
    color: hsl(var(--home-muted-foreground));
    font-size: 13px;
    font-weight: 700;
}

body.modern-home-page #home_div .modern-porteur-balance-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

body.modern-home-page #home_div .modern-porteur-balance-grid > span {
    display: none;
}

body.modern-home-page #home_div .modern-porteur-balance-grid > div {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    padding: 12px;
}

body.modern-home-page #home_div .modern-porteur-balance-grid span {
    color: hsl(var(--home-muted-foreground));
    display: block;
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
}

body.modern-home-page #home_div .modern-porteur-balance-grid strong {
    color: hsl(var(--home-foreground));
    display: block;
    font-size: 18px;
    font-weight: 850;
    margin-top: 6px;
}

body.modern-home-page #home_div .modern-porteur-balance p {
    color: hsl(var(--home-muted-foreground));
    font-size: 13.5px;
    font-weight: 650;
    margin: 10px 0 0;
}

body.modern-home-page #home_div .modern-porteur-section table {
    background: #ffffff !important;
    font-size: 14px !important;
}

body.modern-home-page #home_div .modern-porteur-section th {
    background: #f3f8f7 !important;
    color: hsl(var(--home-primary)) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.25;
    padding: 10px 12px !important;
}

body.modern-home-page #home_div .modern-porteur-section td {
    background-image: none !important;
    color: hsl(var(--home-foreground));
    font-size: 14px !important;
    padding: 10px 12px !important;
}

body.modern-home-page #home_div .modern-porteur-total {
    background: #f8fbf9 !important;
    border: 1px solid hsl(var(--home-border));
    border-radius: var(--home-radius);
    margin: 12px 0 0 auto;
    max-width: 420px;
    overflow: hidden;
    width: 100% !important;
}

body.modern-home-page #home_div .modern-porteur-total td {
    border: 0 !important;
    font-weight: 850;
}

@media (max-width: 1024px) {
    body.modern-home-page #home_div .modern-porteur-shell {
        padding: 10px;
    }

    body.modern-home-page #home_div .modern-porteur-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-filter {
        margin: 0 0 4px !important;
        order: 1;
        padding: 12px !important;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-filter table,
    body.modern-home-page #home_div .modern-porteur-filter tbody,
    body.modern-home-page #home_div .modern-porteur-filter tr,
    body.modern-home-page #home_div .modern-porteur-filter td {
        display: block !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-filter tr {
        display: grid !important;
        gap: 10px;
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-porteur-filter td {
        color: hsl(var(--home-foreground));
        padding: 0 !important;
        text-align: left !important;
    }

    body.modern-home-page #home_div .modern-porteur-filter td::before {
        content: none !important;
    }

    body.modern-home-page #home_div .modern-porteur-filter td:first-child {
        color: hsl(var(--home-muted-foreground));
        font-size: 13px;
        font-weight: 850;
        line-height: 1.35;
    }

    body.modern-home-page #home_div .modern-porteur-filter .input-control,
    body.modern-home-page #home_div .modern-porteur-filter .modern-native-select-wrap,
    body.modern-home-page #home_div .modern-porteur-filter select {
        float: none !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-filter input[type="button"] {
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-balance {
        margin: 0 !important;
        order: 0;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-section {
        margin-top: 0 !important;
        order: 2;
        padding: 10px;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-balance-grid {
        grid-template-columns: 1fr;
    }

    body.modern-home-page #home_div .modern-porteur-section h3,
    body.modern-home-page #home_div .modern-porteur-main > h3 {
        font-size: 19px;
        text-align: left !important;
    }

    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper {
        margin-top: 8px !important;
        overflow: visible !important;
        padding: 8px !important;
    }

    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper table.dataTable tbody td,
    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper table.modern-data-table tbody td {
        gap: 8px !important;
        grid-template-columns: minmax(104px, 40%) minmax(0, 1fr) !important;
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
        text-align: right !important;
        width: 100% !important;
    }

    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper table.dataTable tbody td::before,
    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper table.modern-data-table tbody td::before {
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

    body.modern-home-page #home_div .modern-porteur-total {
        max-width: none;
    }
}

@media (max-width: 520px) {
    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper table.dataTable tbody td,
    body.modern-home-page #home_div .modern-porteur-section .dataTables_wrapper table.modern-data-table tbody td {
        grid-template-columns: 1fr !important;
        text-align: left !important;
    }
}

/* Mobile: laisser la page principale scroller naturellement.
   Le panneau d'onglets du menu ne doit pas enfermer le contenu dans une
   hauteur fixe, sinon le footer recouvre le tableau et le scroll s'arrete. */
@media (max-width: 1024px) {
    body.modern-home-page #content_div.modern-menu-workspace-active {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    body.modern-home-page #content_div.modern-menu-workspace-active #home_div {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding-bottom: 16px !important;
    }

    body.modern-home-page .modern-footer-wrap {
        margin-top: 18px !important;
        position: relative !important;
        z-index: 0 !important;
    }
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"] .select2-choice,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] .select2-choice {
    height: 48px !important;
    line-height: 1.2 !important;
    padding: 17px 44px 5px 14px !important;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"] .select2-choice > .select2-chosen,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] .select2-choice > .select2-chosen {
    line-height: 24px !important;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"] .select2-choice .select2-arrow,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] .select2-choice .select2-arrow {
    height: 46px !important;
}

body.modern-home-page #home_div .modern-locality-section .input-control[data-role="select"] .select2-choice .select2-arrow b,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .input-control[data-role="select"] .select2-choice .select2-arrow b {
    margin-top: 18px !important;
}

/* Referentiel select natif: simple, stable, compatible avec les onchange PHP existants. */
body.modern-home-page .modern-native-select-wrap,
body.modern-home-page .input-control[data-role="select"].modern-native-select-wrap,
body.modern-home-page [data-role="select"].modern-native-select-wrap {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: relative;
    width: 100% !important;
}

body.modern-home-page .modern-native-select-wrap::after,
body.modern-home-page .input-control[data-role="select"].modern-native-select-wrap::after,
body.modern-home-page [data-role="select"].modern-native-select-wrap::after {
    display: none !important;
}

body.modern-home-page select.modern-native-select,
body.modern-home-page .modern-native-select-wrap select,
body.modern-home-page .modern-modal-form select,
body.modern-home-page #home_div select.filter_additional {
    appearance: none !important;
    -moz-appearance: none !important;
    -webkit-appearance: none !important;
    background-color: rgba(255, 255, 255, 0.96) !important;
    background-image:
        linear-gradient(45deg, transparent 50%, hsl(var(--home-primary)) 50%),
        linear-gradient(135deg, hsl(var(--home-primary)) 50%, transparent 50%) !important;
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50% !important;
    background-repeat: no-repeat !important;
    background-size: 6px 6px, 6px 6px !important;
    border: 1px solid hsl(var(--home-border)) !important;
    border-radius: var(--home-radius) !important;
    box-shadow: 0 8px 18px rgba(4, 24, 22, 0.04) !important;
    color: hsl(var(--home-foreground)) !important;
    cursor: pointer;
    display: block !important;
    font-family: var(--home-font);
    font-size: 14.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    max-width: 100% !important;
    min-height: 42px !important;
    opacity: 1 !important;
    padding: 0 42px 0 13px !important;
    position: static !important;
    text-transform: none;
    visibility: visible !important;
    width: 100% !important;
}

body.modern-home-page .modern-native-select-wrap[data-placeholder] select.modern-native-select,
body.modern-home-page #home_div .modern-locality-section .modern-native-select-wrap[data-placeholder] select.modern-native-select,
body.modern-home-page #DIV_INFO_COMPL_ROLETYPENUMID .modern-native-select-wrap[data-placeholder] select.modern-native-select {
    min-height: 48px !important;
    padding-top: 16px !important;
}

body.modern-home-page select.modern-native-select:hover,
body.modern-home-page .modern-native-select-wrap select:hover {
    border-color: rgba(12, 132, 217, 0.42) !important;
}

body.modern-home-page select.modern-native-select:focus,
body.modern-home-page .modern-native-select-wrap select:focus {
    border-color: hsl(var(--home-primary)) !important;
    box-shadow: 0 0 0 3px rgba(12, 132, 217, 0.16), 0 10px 22px rgba(10, 41, 78, 0.08) !important;
    outline: none !important;
}

body.modern-home-page select.modern-native-select:disabled,
body.modern-home-page .modern-native-select-wrap select:disabled {
    background-color: rgba(245, 248, 247, 0.86) !important;
    color: hsl(var(--home-muted-foreground)) !important;
    cursor: not-allowed;
    opacity: 0.72 !important;
}

body.modern-home-page select.modern-native-select[multiple],
body.modern-home-page .modern-native-select-wrap select[multiple] {
    background-image: none !important;
    min-height: 110px !important;
    padding: 10px 12px !important;
}

body.modern-home-page .dataTables_length select {
    appearance: auto !important;
    background-image: none !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    width: auto !important;
}

body.modern-home-page select.modern-select-source,
body.modern-home-page .modern-modal-form select.modern-select-source,
body.modern-home-page #home_div select.modern-select-source,
body.modern-home-page .modern-native-select-wrap select.modern-select-source {
    display: none !important;
    height: 1px !important;
    min-height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    visibility: hidden !important;
    width: 1px !important;
}

/* DataTables: respecter toujours les colonnes masquees par le panneau "Colonnes". */
body.modern-home-page #home_div .dataTables_wrapper table.dataTable th.modern-column-hidden,
body.modern-home-page #home_div .dataTables_wrapper table.dataTable td.modern-column-hidden,
body.modern-home-page #home_div .dataTables_wrapper table.modern-data-table th.modern-column-hidden,
body.modern-home-page #home_div .dataTables_wrapper table.modern-data-table td.modern-column-hidden,
body.modern-home-page #home_div .dataTables_wrapper table.dataTable th[style*="display: none"],
body.modern-home-page #home_div .dataTables_wrapper table.dataTable td[style*="display: none"],
body.modern-home-page #home_div .dataTables_wrapper table.modern-data-table th[style*="display: none"],
body.modern-home-page #home_div .dataTables_wrapper table.modern-data-table td[style*="display: none"] {
    display: none !important;
}

/* Filigrane utilisateur sur les tableaux de donnees. */
body.modern-home-page #home_div .dataTables_wrapper table.dataTable tbody td,
body.modern-home-page #home_div .dataTables_wrapper table.modern-data-table tbody td,
body.modern-home-page #home_div table.modern-data-table tbody td,
body.modern-home-page #home_div table[data-role="datatable"]:not(.dataTable) tbody td,
body.modern-home-page #home_div .data_table_table tbody td,
body.modern-home-page #home_div #data_table tbody td,
body.modern-home-page #home_div #data_table22 tbody td,
body.modern-home-page #home_div #datatable1 tbody td {
    background-image: url("../../infob.php?v=20260423-2") !important;
    background-position: left center !important;
    background-repeat: repeat !important;
    background-size: 680px 58px !important;
}

body.modern-home-page #home_div table.modern-data-table tbody td.dataTables_empty,
body.modern-home-page #home_div .dataTables_wrapper table.dataTable tbody td.dataTables_empty {
    background-image: none !important;
}

/* Tableaux simples: version mobile en cartes, sans scroll horizontal. */
@media (max-width: 1024px) {
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable),
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) {
        background: transparent !important;
        border: 0 !important;
        border-collapse: separate !important;
        display: block !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) thead,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tfoot,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) thead,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tfoot {
        display: none !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody {
        display: grid !important;
        gap: 10px;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody tr,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody tr {
        background: #ffffff !important;
        border: 1px solid hsl(var(--home-border));
        border-radius: var(--home-radius);
        box-shadow: 0 10px 24px rgba(12, 28, 20, 0.08);
        display: block !important;
        overflow: hidden;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td {
        align-items: start;
        background-color: #ffffff !important;
        border: 0 !important;
        border-bottom: 1px solid hsl(var(--home-border)) !important;
        display: grid !important;
        gap: 10px;
        grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
        min-height: 42px;
        overflow-wrap: anywhere;
        padding: 10px 12px !important;
        text-align: right !important;
        white-space: normal !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td:last-child,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td:last-child {
        border-bottom: 0 !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td::before,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td::before {
        color: hsl(var(--home-primary));
        content: attr(data-label);
        font-size: 12px;
        font-weight: 850;
        line-height: 1.35;
        text-align: left;
        text-transform: uppercase;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody tr.modern-table-empty-row,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody tr.modern-table-empty-row {
        box-shadow: none;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td.dataTables_empty,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td.dataTables_empty {
        display: block !important;
        padding: 18px 14px !important;
        text-align: center !important;
    }

    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td.dataTables_empty::before,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td.dataTables_empty::before {
        content: none !important;
    }
}

/* Overrides finaux: le vieux menu "Menu" est masque, et les tableaux mobiles
   prennent toute la largeur disponible au lieu de se contracter sur leur texte. */
body.modern-home-page #menu_div .modern-legacy-menu-hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody {
        display: block !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody tr,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody tr,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody tr,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody tr {
        box-sizing: border-box !important;
        display: block !important;
        margin: 0 0 10px !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td {
        box-sizing: border-box !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 560px) {
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.dataTable tbody td,
    body.modern-home-page :is(#home_div, #content_div) .dataTables_wrapper table.modern-data-table tbody td,
    body.modern-home-page :is(#home_div, #content_div) table.modern-data-table:not(.dataTable) tbody td,
    body.modern-home-page :is(#home_div, #content_div) table[data-role="datatable"]:not(.dataTable) tbody td {
        grid-template-columns: 1fr !important;
        text-align: left !important;
    }
}

/* === Eye toggle password === */
.pwd-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.pwd-wrapper input[type=password],
.pwd-wrapper input[type=text] {
    width: 100%;
    padding-right: 40px;
}
.pwd-eye {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #888;
    display: flex;
    align-items: center;
    font-size: 18px;
    line-height: 1;
}
.pwd-eye:hover { color: #333; }
