/* Thème Connect moderne (ex-Identity) — hors LogyOffice via body.theme-modern */

body.theme-modern {
    --theme-accent: var(--tertiarylightbrush);
    --theme-accent-soft: color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent);
    --theme-surface: color-mix(in srgb, var(--primarybrush) 86%, #fff);
    --theme-surface-border: color-mix(in srgb, var(--secondarybrush) 55%, transparent);
    --theme-surface-inset: color-mix(in srgb, #fff 40%, transparent);
    --theme-elevation: rgba(15, 40, 45, 0.07);
    --theme-link: color-mix(in srgb, var(--tertiarylightbrush) 62%, #000);
    --theme-link-hover: color-mix(in srgb, var(--tertiarylightbrush) 45%, #000);
    --theme-mesh-opacity: 0.35;
    --theme-danger-soft: #c82333;
    --theme-danger-soft-hover: #a71d2a;
    --theme-nav-bg: linear-gradient(
        125deg,
        #7ec9c4 0%,
        color-mix(in srgb, var(--tertiarylightbrush) 70%, #e8f6f5) 35%,
        color-mix(in srgb, var(--tertiarybrush) 45%, var(--primarybrush)) 70%,
        color-mix(in srgb, var(--secondarybrush) 60%, #fff) 100%
    );
    --theme-nav-border: color-mix(in srgb, var(--tertiarylightbrush) 60%, var(--secondarybrush));
    --theme-nav-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 8px 24px color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent);
    --theme-page-glow:
        radial-gradient(ellipse 70% 50% at 12% -10%, color-mix(in srgb, var(--tertiarybrush) 38%, transparent), transparent 55%),
        radial-gradient(ellipse 55% 45% at 95% 8%, color-mix(in srgb, var(--tertiarylightbrush) 28%, transparent), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 105%, color-mix(in srgb, var(--tertiarylightbrush) 18%, transparent), transparent 55%),
        linear-gradient(165deg, var(--primarybrush) 0%, color-mix(in srgb, var(--primarybrush) 92%, var(--tertiarylightbrush)) 100%);
    background-image: none !important;
    background-color: var(--primarybrush);
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
}

body.theme-modern::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background: var(--theme-page-glow);
}

body.theme-modern::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: var(--theme-mesh-opacity);
    background-image:
        linear-gradient(color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

body.theme-modern .body-container,
.body-container.theme-modern {
    background-image: none;
    background-color: transparent;
    position: relative;
}

body.theme-modern .body-container.theme-auth,
body.theme-modern .body-container.counterBodyColor {
    min-height: 100vh;
}

/* Surfaces / cards */
body.theme-modern .card,
body.theme-modern .theme-surface,
body.theme-modern .shop-card,
body.theme-modern .subscription-card,
body.theme-modern .service-card,
body.theme-modern .absolute-card {
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 12px 32px var(--theme-elevation);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Boutons globaux (override NuGet, hors LO) */
body.theme-modern .ButtonPrimary,
body.theme-modern .ButtonSecondary,
body.theme-modern .ButtonDelete {
    border-radius: 999px !important;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

body.theme-modern .ButtonPrimary {
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    ) !important;
    border: none !important;
    box-shadow: var(--theme-btn-shadow, 0 8px 22px color-mix(in srgb, var(--tertiarylightbrush) 32%, transparent));
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Neutralise NuGet .dark .ButtonPrimary (min-width:300px) si .dark est présent ailleurs */
html.dark body.theme-modern .ButtonPrimary,
.dark body.theme-modern .ButtonPrimary,
html.dark body.theme-modern .ButtonPrimary:hover:not(:disabled),
.dark body.theme-modern .ButtonPrimary:hover:not(:disabled),
html.dark body.theme-modern .ButtonPrimary:disabled,
.dark body.theme-modern .ButtonPrimary:disabled {
    min-width: unset;
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    ) !important;
    margin: 5px;
    opacity: 1;
}

html.dark body.theme-modern .ButtonPrimary:disabled,
.dark body.theme-modern .ButtonPrimary:disabled {
    opacity: 0.25;
    pointer-events: none;
}

body.theme-modern .ButtonPrimary:hover:not(:disabled) {
    filter: brightness(1.04);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--tertiarylightbrush) 42%, transparent);
    transform: translateY(-1px);
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    ) !important;
    opacity: 1;
}

body.theme-modern .ButtonPrimary:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(0.98);
}

body.theme-modern .ButtonSecondary {
    background: color-mix(in srgb, var(--primarybrush) 70%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--secondarybrush) 75%, transparent) !important;
    backdrop-filter: blur(8px);
}

body.theme-modern .ButtonSecondary:hover:not(:disabled) {
    border-color: var(--tertiarylightbrush) !important;
    color: color-mix(in srgb, var(--tertiarylightbrush) 55%, var(--textbrush)) !important;
    transform: translateY(-1px);
}

body.theme-modern .ButtonDelete {
    background: color-mix(in srgb, #dc3545 88%, #fff) !important;
    border: 1px solid color-mix(in srgb, #c82333 80%, transparent) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.28);
    font-weight: 600;
}

body.theme-modern .ButtonDelete:hover:not(:disabled) {
    filter: brightness(1.05);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.36);
}

/* Variante soft : même poids que Secondary, teinte danger */
body.theme-modern .ButtonSecondary.ButtonDelete {
    background: color-mix(in srgb, var(--primarybrush) 70%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--theme-danger-soft) 55%, transparent) !important;
    color: var(--theme-danger-soft) !important;
    box-shadow: none;
    font-weight: 500;
}

body.theme-modern .ButtonSecondary.ButtonDelete:hover:not(:disabled) {
    background: color-mix(in srgb, var(--theme-danger-soft) 12%, var(--primarybrush)) !important;
    border-color: var(--theme-danger-soft) !important;
    color: var(--theme-danger-soft-hover) !important;
    filter: none;
    box-shadow: none;
}

/* Inputs globaux */
body.theme-modern input[type="email"],
body.theme-modern input[type="password"],
body.theme-modern input[type="text"],
body.theme-modern input[type="tel"],
body.theme-modern input[type="number"],
body.theme-modern input[type="search"],
body.theme-modern select,
body.theme-modern textarea,
body.theme-modern .form-control,
body.theme-modern .textBoxActive,
body.theme-modern .mobileInput,
body.theme-modern .inputTextBox,
body.theme-modern .fieldTextBoxPwd,
body.theme-modern .inputPassword {
    box-sizing: border-box;
    background: color-mix(in srgb, var(--primarybrush) 78%, transparent);
    border: 1px solid color-mix(in srgb, var(--secondarybrush) 42%, transparent);
    border-radius: 12px;
    color: var(--textbrush);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    box-shadow: none;
}

body.theme-modern input[type="email"]:hover,
body.theme-modern input[type="password"]:hover,
body.theme-modern input[type="text"]:hover,
body.theme-modern input[type="tel"]:hover,
body.theme-modern input[type="number"]:hover,
body.theme-modern input[type="search"]:hover,
body.theme-modern select:hover,
body.theme-modern textarea:hover,
body.theme-modern .form-control:hover,
body.theme-modern .textBoxActive:hover,
body.theme-modern .mobileInput:hover,
body.theme-modern .inputTextBox:hover,
body.theme-modern .fieldTextBoxPwd:hover {
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 45%, var(--secondarybrush));
}

body.theme-modern input[type="email"]:focus,
body.theme-modern input[type="password"]:focus,
body.theme-modern input[type="text"]:focus,
body.theme-modern input[type="tel"]:focus,
body.theme-modern input[type="number"]:focus,
body.theme-modern input[type="search"]:focus,
body.theme-modern select:focus,
body.theme-modern textarea:focus,
body.theme-modern .form-control:focus,
body.theme-modern .textBoxActive:focus,
body.theme-modern .mobileInput:focus,
body.theme-modern .inputTextBox:focus,
body.theme-modern .fieldTextBoxPwd:focus {
    outline: none;
    border-color: var(--tertiarylightbrush);
    background: var(--primarybrush);
    box-shadow:
        0 0 0 3px var(--theme-accent-soft),
        0 0 24px color-mix(in srgb, var(--tertiarybrush) 18%, transparent);
}

/* Liens secondaires — pas de faux bouton / cadre au hover */
body.theme-modern .theme-link,
body.theme-modern a.theme-link {
    color: var(--theme-link);
    font-weight: 500;
    text-decoration: none;
    border: none;
    background: none;
    transition: color 0.15s ease, background 0.15s ease;
}

body.theme-modern .theme-link:hover,
body.theme-modern a.theme-link:hover {
    text-decoration: underline;
    color: var(--theme-link-hover);
    background: color-mix(in srgb, var(--tertiarylightbrush) 8%, transparent);
    border: none;
}

body.theme-modern .theme-link--muted,
body.theme-modern a.theme-link--muted {
    color: var(--textbrush);
    opacity: 0.55;
    font-weight: 400;
}

body.theme-modern .theme-link--muted:hover,
body.theme-modern a.theme-link--muted:hover {
    color: var(--textbrush);
    opacity: 0.8;
    background: transparent;
}

/* Tables denses : surface un peu plus opaque */
body.theme-modern table.table,
body.theme-modern .table {
    background: color-mix(in srgb, var(--primarybrush) 92%, transparent);
    border-radius: 12px;
}

body.theme-modern .modal-content {
    background: color-mix(in srgb, var(--primarybrush) 88%, transparent);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 480px) {
    body.theme-modern::after {
        opacity: 0.22;
        background-size: 36px 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-modern .ButtonPrimary,
    body.theme-modern .ButtonSecondary,
    body.theme-modern input,
    body.theme-modern select,
    body.theme-modern textarea,
    body.theme-modern .form-control {
        transition: none;
    }

    body.theme-modern .ButtonPrimary:hover:not(:disabled),
    body.theme-modern .ButtonSecondary:hover:not(:disabled) {
        transform: none;
    }
}

/* ——— Shell nav ——— */
body.theme-modern .navBarHeader {
    background-image: none;
    /* Pas de backdrop-filter ici : ça piège #appListModal (position:fixed) dans le header */
    background: var(--theme-nav-bg);
    border-bottom: 1px solid var(--theme-nav-border);
    box-shadow: var(--theme-nav-shadow);
    z-index: 1100;
}

body.theme-modern .NinePointAppWrapper,
body.theme-modern .NinePointAppSVG,
body.theme-modern #ninePoint.NinePointAppSVG,
body.theme-modern .NinePointAppSVGHeader {
    color: var(--textbrush) !important;
}

body.theme-modern .NinePointMobile {
    border-color: var(--textbrush) !important;
}

body.theme-modern .buttonCircleInNinePoint {
    color: var(--textbrush);
}

/* Stacking : isolation body + overlays apps / dropdowns */
body.theme-modern .rightBar {
    background: color-mix(in srgb, var(--primarybrush) 78%, transparent);
    border-left: 1px solid var(--theme-surface-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1050;
}

body.theme-modern #NineMenu {
    z-index: 2100 !important;
}

body.theme-modern .opacity-background-9Points {
    z-index: 2090 !important;
}

/* Modal apps déplacée sur body (AppListModalViewport.js) → plein viewport */
body.theme-modern #appListModal {
    position: fixed;
    inset: 0;
    z-index: 2300;
}

body.theme-modern #appListModal .modal-dialog {
    max-width: min(1200px, 96vw);
    width: 96vw;
    margin: 1.5rem auto;
    min-height: calc(100vh - 3rem);
    display: flex;
    align-items: center;
}

body.theme-modern #appListModal .modal-content {
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow: auto;
}

body.theme-modern .modal-backdrop {
    z-index: 2250 !important;
}

body.theme-modern .dropDownContent,
body.theme-modern .navBarHeader .dropdown-menu {
    z-index: 1200;
}

body.theme-modern .buttonRightBar {
    background: color-mix(in srgb, var(--primarybrush) 65%, transparent);
    border-color: color-mix(in srgb, var(--secondarybrush) 70%, transparent);
}

body.theme-modern .buttonRightBar:hover {
    border-color: var(--tertiarylightbrush);
    color: var(--tertiarylightbrush);
    box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

/* ——— Modales ——— */
body.theme-modern .Modal-Box-content,
body.theme-modern .Modal-Window-Body {
    background: color-mix(in srgb, var(--primarybrush) 88%, transparent);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ——— Shop ——— */
body.theme-modern .shop-card,
body.theme-modern .cardSoftware {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.theme-modern .shop-row {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    box-shadow: none !important;
}

body.theme-modern .shop-section-title {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--theme-surface-border) !important;
    border-radius: 0 !important;
    backdrop-filter: none;
    box-shadow: none !important;
    padding: 0 0 8px !important;
}

body.theme-modern .shop-title {
    background: none !important;
    -webkit-text-fill-color: unset !important;
    color: var(--textbrush) !important;
}

body.theme-modern .shop-link {
    color: var(--tertiarylightbrush) !important;
    border-bottom: none !important;
}

body.theme-modern .shop-link:hover {
    text-decoration: underline;
    background: transparent;
    border-bottom: none !important;
}

body.theme-modern .shop-row .btn.ButtonSmall {
    padding: 6px 14px !important;
    min-height: 0 !important;
    font-size: 0.875rem !important;
}

/* ——— Subscriptions ——— */
body.theme-modern .subscription-card {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px 16px;
    margin: 6px 0;
    gap: 10px;
}

body.theme-modern .subscription-section-title {
    background: color-mix(in srgb, var(--primarybrush) 75%, transparent) !important;
    border: 1px solid var(--theme-surface-border) !important;
}

body.theme-modern .subscription-card-body {
    flex: 1;
    gap: 12px;
}

body.theme-modern .subscription-card-info {
    flex: 1;
    gap: 4px;
}

body.theme-modern .subscription-image-soft {
    min-height: 50px;
    min-width: 90px;
    max-height: 50px;
    max-width: 90px;
    object-fit: contain;
}

body.theme-modern .subscription-detail-logo {
    height: 90px;
    width: 90px;
    object-fit: contain;
}

body.theme-modern .subscription-card-main,
body.theme-modern .subscription-card-details {
    padding: 10px;
    flex: 1;
}

body.theme-modern .subscription-card-logo-wrap {
    padding: 10px;
}

body.theme-modern .subscription-card-meta {
    gap: 8px;
}

body.theme-modern .subscription-meta-label {
    font-size: 0.85em;
    margin: 2px 0;
}

body.theme-modern .subscription-status-muted {
    font-size: 0.9em;
    opacity: 0.85;
    margin-left: 6px;
}

body.theme-modern .subscription-ribbon-container {
    position: relative;
    overflow: hidden;
}

body.theme-modern .subscription-ribbon {
    position: absolute;
    background: linear-gradient(135deg, #ff4757, #ff6348);
    color: white;
    transform: rotate(45deg);
    box-sizing: border-box;
    width: 220px;
    text-align: center;
    top: 4px;
    right: -88px;
    padding: 8px 0;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
    z-index: 10;
    animation: subscription-ribbonPulse 2s ease-in-out infinite;
}

@keyframes subscription-ribbonPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6); }
}

body.theme-modern .subscription-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 600;
    color: #fff;
}

body.theme-modern .subscription-status-pill--success {
    background: color-mix(in srgb, #28a745 85%, transparent);
}

body.theme-modern .subscription-status-pill--warning {
    background: color-mix(in srgb, #e0a800 90%, transparent);
    color: #1a1a1a;
}

body.theme-modern .subscription-status-pill--muted {
    background: color-mix(in srgb, var(--primarybrush) 70%, #888);
}

body.theme-modern .subscription-invoice-status {
    gap: 10px;
    margin-top: 12px;
}

body.theme-modern .subscription-pdf-preview {
    position: relative;
    margin-top: 1rem;
}

body.theme-modern .subscription-pdf-embed {
    max-width: 700px;
    z-index: 1;
}

body.theme-modern .subscription-pdf-loader {
    height: 70px;
    position: absolute;
}

body.theme-modern .subscription-actions,
body.theme-modern .subscription-actions-group,
body.theme-modern .subscription-transition-cards,
body.theme-modern .subscription-invoice-actions {
    gap: 10px;
}

body.theme-modern .subscription-transition-card,
body.theme-modern .subscription-option-card {
    flex: 1 1 260px;
    min-width: 240px;
    max-width: 420px;
    padding: 18px;
}

body.theme-modern .subscription-option-card {
    flex: 1 1 300px;
    min-width: 300px;
    max-width: 500px;
}

body.theme-modern .subscription-transition-card-body {
    gap: 8px;
}

body.theme-modern .subscription-option-footer {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--theme-surface-border);
}

body.theme-modern .subscription-option-price {
    font-size: 1.2em;
}

body.theme-modern .subscription-payment-labels {
    margin-right: 10px;
}

body.theme-modern .subscription-scheduled-meta {
    margin-left: 1rem;
    gap: 12px;
}

body.theme-modern .subscription-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    text-align: center;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 8px 0;
    border-left: 4px solid;
}

body.theme-modern .subscription-alert label {
    margin: 0;
}

body.theme-modern .subscription-alert--success {
    background: color-mix(in srgb, #28a745 18%, transparent);
    border-left-color: #28a745;
    color: inherit;
}

body.theme-modern .subscription-alert--error {
    background: color-mix(in srgb, #dc3545 18%, transparent);
    border-left-color: #dc3545;
}

body.theme-modern .subscription-alert--warning {
    background: color-mix(in srgb, #ffc107 22%, transparent);
    border-left-color: #e0a800;
    color: #1a1a1a;
}

/* ——— Access admin ——— */
body.theme-modern .access-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0.75rem 1.5rem;
}

body.theme-modern .access-page-actions {
    display: flex;
    justify-content: center;
    margin: 0 0 1.25rem;
}

body.theme-modern .access-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 900px) {
    body.theme-modern .access-home-grid {
        grid-template-columns: 1fr;
    }
}

body.theme-modern .access-panel {
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    padding: 1.1rem 1.25rem;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 10px 28px var(--theme-elevation);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.theme-modern .access-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid color-mix(in srgb, var(--secondarybrush) 45%, transparent);
    font-weight: 650;
    color: color-mix(in srgb, var(--tertiarylightbrush) 35%, var(--textbrush));
}

body.theme-modern .access-panel-header--sub {
    margin-top: 1.1rem;
}

body.theme-modern .access-dl {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

body.theme-modern .access-dl-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: baseline;
}

body.theme-modern .access-dl-label {
    font-weight: 600;
    opacity: 0.75;
    font-size: 0.92rem;
}

body.theme-modern .access-dl-value {
    text-align: right;
    font-size: 0.95rem;
}

body.theme-modern .access-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

body.theme-modern .access-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tertiarylightbrush) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent);
}

body.theme-modern .access-stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--tertiarylightbrush);
}

body.theme-modern .access-stat-label {
    font-size: 0.8rem;
    opacity: 0.75;
}

body.theme-modern .access-panel-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

body.theme-modern .access-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.theme-modern .access-product-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body.theme-modern .access-product-item:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 8%, transparent);
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 25%, transparent);
}

body.theme-modern .access-product-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

body.theme-modern .access-product-name {
    font-weight: 600;
}

/* Service cards (AccessManagement) */
body.theme-modern .access-service-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

body.theme-modern .access-page > .access-service-card {
    margin-bottom: 0.55rem;
}

body.theme-modern .access-page > .apps-section-title {
    margin-top: 0.75rem;
}

body.theme-modern .access-service-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 14px;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 6px 18px var(--theme-elevation);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

body.theme-modern .access-service-card:hover {
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 40%, var(--secondarybrush));
    transform: translateX(2px);
}

body.theme-modern .access-service-card-logo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.theme-modern .access-service-card-logo img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

body.theme-modern .access-service-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

body.theme-modern .access-service-card-titles {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 180px;
    flex: 1 1 200px;
}

body.theme-modern .access-service-card-name {
    font-weight: 700;
    font-size: 1.02rem;
}

body.theme-modern .access-service-card-plan {
    font-size: 0.88rem;
    opacity: 0.75;
}

body.theme-modern .access-service-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

body.theme-modern .access-trial-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #ff4757, #ff6b4a);
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.35);
}

body.theme-modern .access-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

body.theme-modern .access-status-badge--ok {
    color: #1e7e34;
    background: color-mix(in srgb, #28a745 14%, transparent);
    border: 1px solid color-mix(in srgb, #28a745 35%, transparent);
}

body.theme-modern .access-status-badge--warn {
    color: #9a6b00;
    background: color-mix(in srgb, #ffc107 18%, transparent);
    border: 1px solid color-mix(in srgb, #e0a800 40%, transparent);
}

body.theme-modern .access-service-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex: 1 1 280px;
}

body.theme-modern .access-meta-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 7.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primarybrush) 55%, transparent);
    border: 1px solid var(--theme-surface-border);
}

body.theme-modern .access-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.theme-modern .access-meta-value {
    font-size: 0.88rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body.theme-modern .access-service-card-action {
    flex-shrink: 0;
    width: auto !important;
    min-width: 0 !important;
    padding: 0.45rem 1rem !important;
    white-space: nowrap;
}

@media (max-width: 720px) {
    body.theme-modern .access-service-card {
        flex-wrap: wrap;
    }

    body.theme-modern .access-service-card-action {
        width: 100% !important;
        justify-content: center;
    }
}

/* Users table */
body.theme-modern .access-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 0 1.5rem;
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 8px 24px var(--theme-elevation);
}

body.theme-modern .access-table-head,
body.theme-modern .access-table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr 44px 44px 44px 52px;
    align-items: center;
    gap: 0.35rem;
    padding: 0.7rem 1rem;
}

body.theme-modern .access-table-head {
    background: color-mix(in srgb, var(--primarybrush) 70%, transparent);
    border-bottom: 1px solid var(--theme-surface-border);
    font-weight: 650;
    font-size: 0.88rem;
    opacity: 0.9;
}

body.theme-modern .access-table-row {
    border-bottom: 1px solid color-mix(in srgb, var(--secondarybrush) 40%, transparent);
    background: transparent;
    box-shadow: none;
    min-height: 3.25rem;
    transition: background 0.12s ease;
}

body.theme-modern .access-table-row:last-child {
    border-bottom: none;
}

body.theme-modern .access-table-row:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 8%, transparent);
}

body.theme-modern .access-table-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

body.theme-modern .access-table-cell--email {
    font-weight: 600;
}

body.theme-modern .access-table-cell--icon,
body.theme-modern .access-table-cell--action {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
}

body.theme-modern .access-edit-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 800px) {
    body.theme-modern .access-table-head,
    body.theme-modern .access-table-row {
        grid-template-columns: 1fr 44px 44px 44px 52px;
    }
}

/* Applications requests */
body.theme-modern .access-request-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0 0 1.5rem;
}

body.theme-modern .access-request-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 14px;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 6px 18px var(--theme-elevation);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

body.theme-modern .access-request-item:hover {
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 40%, var(--secondarybrush));
    transform: translateX(2px);
}

body.theme-modern .access-request-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

body.theme-modern .access-request-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

body.theme-modern .access-request-name {
    font-weight: 650;
}

body.theme-modern .access-request-email {
    font-size: 0.9rem;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-modern .access-request-date {
    font-size: 0.8rem;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

body.theme-modern .access-request-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

body.theme-modern .access-software-image {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

body.theme-modern .access-col-edit {
    min-width: 42px;
}

body.theme-modern .access-profile-img {
    width: 96px;
    height: 96px;
    min-width: 96px;
    min-height: 96px;
    padding: 0 !important;
    margin: 0;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--theme-surface-border);
    box-shadow: 0 4px 14px var(--theme-elevation);
    background: color-mix(in srgb, var(--secondarybrush) 40%, transparent);
    flex-shrink: 0;
}

body.theme-modern .access-user-hero {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 1.25rem;
    align-items: center;
}

@media (max-width: 900px) {
    body.theme-modern .access-user-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    body.theme-modern .access-user-identity {
        max-width: 100%;
    }

    body.theme-modern .access-user-identity .access-dl-row {
        grid-template-columns: 7rem 1fr;
        justify-content: center;
    }
}

body.theme-modern .access-user-identity {
    gap: 0.55rem;
    width: 100%;
    max-width: 320px;
}

body.theme-modern .access-user-identity .access-dl-row {
    grid-template-columns: 7rem 1fr;
    gap: 0.5rem;
    align-items: baseline;
}

body.theme-modern .access-user-identity .access-dl-label {
    text-align: left;
}

body.theme-modern .access-user-identity .access-dl-value {
    text-align: left;
    font-weight: 600;
}

body.theme-modern .access-user-flags {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

body.theme-modern .access-flag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primarybrush) 45%, transparent);
    border: 1px solid var(--theme-surface-border);
}

body.theme-modern .access-flag-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
}

body.theme-modern .access-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    margin: 0.5rem 0 0.75rem;
}

body.theme-modern .access-section-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

body.theme-modern .access-table--invoices .access-table-head,
body.theme-modern .access-table--invoices .access-table-row {
    grid-template-columns: 1fr 1.2fr 0.8fr 52px 52px;
}

body.theme-modern .access-table--invoices-detail .access-table-head,
body.theme-modern .access-table--invoices-detail .access-table-row {
    grid-template-columns: 1.2fr 1fr 0.8fr 1.2fr 90px;
}

body.theme-modern .subscription-actions {
    justify-content: center;
    gap: 0.65rem;
}

body.theme-modern .subscription-actions-group {
    gap: 0.5rem;
    justify-content: center;
}

body.theme-modern .subscription-invoice-actions {
    display: inline-flex;
    gap: 0.35rem;
}

body.theme-modern .access-payment-dl {
    flex: 1;
    max-width: 360px;
}

body.theme-modern .access-table-cell--empty {
    grid-column: 1 / -1;
    text-align: center;
    opacity: 0.75;
}

body.theme-modern .access-table--user-sessions .access-table-row {
    grid-template-columns: 80px 1fr 64px;
}

body.theme-modern .access-service-access-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

body.theme-modern .access-service-access-group {
    display: flex;
    gap: 0.85rem;
    align-items: stretch;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--theme-surface-border);
    background: color-mix(in srgb, var(--primarybrush) 40%, transparent);
}

body.theme-modern .access-service-access-group-logo {
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.theme-modern .access-service-access-group-logo img {
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
}

body.theme-modern .access-service-access-group-rows {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

body.theme-modern .access-service-access-row {
    display: grid;
    grid-template-columns: 110px 1fr 56px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--secondarybrush) 35%, transparent);
}

body.theme-modern .access-service-access-row:last-child {
    border-bottom: none;
}

body.theme-modern .access-service-access-date {
    font-size: 0.85rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

body.theme-modern .access-service-access-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    body.theme-modern .access-service-access-row {
        grid-template-columns: 1fr 56px;
    }

    body.theme-modern .access-service-access-date {
        grid-column: 1 / -1;
    }

    body.theme-modern .access-table--users-toggle .access-table-head,
    body.theme-modern .access-table--users-toggle .access-table-row,
    body.theme-modern .access-table--sessions .access-table-row {
        grid-template-columns: 1fr 64px;
    }
}

body.theme-modern .access-disconnect-btn {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 9px;
}

body.theme-modern .access-session-soft-img {
    height: 48px;
    width: 48px;
    object-fit: contain;
}

body.theme-modern .access-request-service-img {
    max-height: 50px;
    max-width: 50px;
    object-fit: contain;
}

body.theme-modern .access-switch {
    min-width: 50px;
    max-width: 50px;
}

body.theme-modern .profile-section.width50-computer {
    width: auto;
    flex: 1 1 280px;
    margin: 5px;
    max-width: 100%;
}


/* ——— Learning ——— */
body.theme-modern .service-card,
body.theme-modern .cardFormaMain {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 12px 32px var(--theme-elevation);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ——— Access / Admin + CloudStorage (surfaces, mesh un peu plus discret) ——— */
body.theme-modern:has(.menu-btn)::after,
body.theme-modern:has(.Left-container)::after,
body.theme-modern:has(.side-menu)::after {
    opacity: 0.18;
}

body.theme-modern .Left-container,
body.theme-modern .menu-btn {
    background: color-mix(in srgb, var(--primarybrush) 88%, transparent);
    border-color: var(--theme-surface-border) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.theme-modern .side-btn {
    border-radius: 10px;
}

body.theme-modern .side-btn:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 14%, transparent);
}

/* ——— Cards Access / surfaces opaques (évite la grille mesh entre les rows) ——— */
body.theme-modern .bg-transparentDarkBrush {
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 8px 24px var(--theme-elevation);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.theme-modern .bg-transparentDarkBrush > .flex-row,
body.theme-modern .bg-transparentDarkBrush .flex-row {
    border: none;
    border-bottom: none;
    box-shadow: none;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

body.theme-modern .Settings-Table th,
body.theme-modern .Settings-Table td,
body.theme-modern table.table th,
body.theme-modern table.table td {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none;
}

body.theme-modern .trSpacer,
body.theme-modern .trSpacerBig {
    border: none !important;
    background: transparent;
}

body.theme-modern hr,
body.theme-modern .lineSeparator,
body.theme-modern .lineBottom,
body.theme-modern .lineBottomNew {
    border-color: color-mix(in srgb, var(--secondarybrush) 65%, transparent) !important;
    opacity: 0.9;
}

body.theme-modern .inputFormLine,
body.theme-modern .form-group,
body.theme-modern .Setting {
    border: none;
    border-bottom: none;
    box-shadow: none;
}

/* ——— Loading bouton (spinner, pas de GIF) ——— */
body.theme-modern .loadinggif.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
    color: transparent !important;
}

body.theme-modern .loadinggif.is-loading > * {
    visibility: hidden;
}

body.theme-modern .loadinggif.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid color-mix(in srgb, var(--tertiarylightbrush) 35%, transparent);
    border-top-color: var(--tertiarylightbrush);
    border-radius: 50%;
    animation: theme-modern-spin 0.7s linear infinite;
}

body.theme-modern .ButtonPrimary.loadinggif.is-loading::after {
    border-color: color-mix(in srgb, #fff 35%, transparent);
    border-top-color: #fff;
}

body.theme-modern.theme-auth #loading_gif,
body.theme-modern #btnConnection + #loading_gif,
body.theme-modern #loading_gif:has(> img[src*="loading_logyline"]) {
    display: none !important;
}

@keyframes theme-modern-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-modern .loadinggif.is-loading::after {
        animation: none;
        border-top-color: var(--tertiarylightbrush);
        opacity: 0.7;
    }
}

/* ——— Popup profil ——— */
/* Anneau uniquement sur l’img — pas sur le wrapper .headerPP (évite le double cadre) */
body.theme-modern .divContainerPP > .headerPP {
    border: none !important;
    box-shadow: none !important;
    background: transparent;
}

body.theme-modern .divContainerPP img.RoundedImage,
body.theme-modern .divContainerPP img.headerPP,
body.theme-modern .divContainerPP img.headerPP2 {
    box-shadow: none !important;
    background-color: transparent !important;
    border: 2px solid color-mix(in srgb, var(--tertiarylightbrush) 55%, transparent);
    border-radius: 50%;
}

body.theme-modern .divContainerPP > .headerPP > img.headerPP {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tertiarylightbrush) 14%, transparent) !important;
}

body.theme-modern .divContainerPP img.headerPP2 {
    height: 48px !important;
    width: 48px !important;
    margin: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent) !important;
}

body.theme-modern .dropDownContent {
    background: color-mix(in srgb, var(--primarybrush) 88%, transparent) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 16px !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 16px 40px var(--theme-elevation);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.85rem 0.55rem 0.55rem;
    min-width: 260px;
    left: auto !important;
    right: 0;
}

body.theme-modern .profil-menu-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.15rem 0.45rem 0.55rem;
}

body.theme-modern .profil-menu-header .PPName {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

body.theme-modern .profil-menu-name {
    margin: 0;
    font-size: var(--fontsizecontent);
    font-weight: 600;
    font-style: normal;
    line-height: 1.25;
    color: var(--textbrush);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-modern .profil-menu-email-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0.45rem 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--secondarybrush) 18%, transparent);
    color: color-mix(in srgb, var(--textbrush) 72%, transparent);
}

body.theme-modern .profil-menu-email-row i {
    font-size: 0.85rem;
    opacity: 0.85;
}

body.theme-modern .profil-menu-email {
    margin: 0;
    font-size: var(--fontsizesubcontent);
    font-weight: 500;
    font-style: normal;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-modern .profil-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0.35rem 0 0;
    padding: 0;
}

body.theme-modern .profil-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    margin: 0;
    padding: 0.6rem 0.75rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--textbrush);
    font: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

body.theme-modern .profil-menu-item i {
    width: 1.1rem;
    text-align: center;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

body.theme-modern .profil-menu-item:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent);
    color: color-mix(in srgb, var(--tertiarylightbrush) 45%, var(--textbrush));
}

body.theme-modern .profil-menu-item:hover i {
    opacity: 1;
}

body.theme-modern .profil-menu-sep {
    height: 1px;
    margin: 0.45rem 0.5rem;
    background: color-mix(in srgb, var(--secondarybrush) 35%, transparent);
    border: none;
    opacity: 0.7;
}

body.theme-modern .profil-menu-item--logout {
    margin-top: 0;
    color: color-mix(in srgb, var(--textbrush) 78%, transparent);
}

body.theme-modern .profil-menu-item--logout:hover {
    background: color-mix(in srgb, #c45c5c 10%, transparent);
    color: color-mix(in srgb, #a84848 55%, var(--textbrush));
}

/* ——— Sélecteur de langue (header) ——— */
body.theme-modern .languageSelection {
    width: auto;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
}

body.theme-modern #DropdownDisplayer {
    height: 42px;
    width: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--secondarybrush) 70%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--primarybrush) 65%, transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: none;
    -ms-transform: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.theme-modern #DropdownDisplayer:hover,
body.theme-modern #DropdownDisplayer:focus {
    background: color-mix(in srgb, var(--primarybrush) 88%, transparent);
    border-color: var(--tertiarylightbrush);
    box-shadow: 0 0 0 3px var(--theme-accent-soft);
    transform: none;
}

body.theme-modern #DropdownDisplayer .language-imgFront,
body.theme-modern #DropdownDisplayer svg,
body.theme-modern #DropdownDisplayer img {
    width: 22px !important;
    height: 16px !important;
    max-width: 22px;
    max-height: 16px;
    transform: none !important;
    display: block;
    border-radius: 3px;
    overflow: hidden;
    object-fit: cover;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--secondarybrush) 55%, transparent);
}

body.theme-modern .languageSelection .dropdown-menu {
    min-width: 12.5rem !important;
    margin-top: 0.55rem !important;
    padding: 0.4rem;
    left: auto !important;
    right: 0 !important;
    border-radius: 14px;
    border: 1px solid var(--theme-surface-border);
    background: color-mix(in srgb, var(--primarybrush) 88%, transparent);
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 16px 36px var(--theme-elevation);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.theme-modern .languageSelection .dropdown-link.flag-link,
body.theme-modern .languageSelection .flag-link {
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    color: var(--textbrush) !important;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

body.theme-modern .languageSelection .dropdown-link.flag-link:hover,
body.theme-modern .languageSelection .flag-link:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 16%, transparent);
    color: color-mix(in srgb, var(--tertiarylightbrush) 45%, var(--textbrush)) !important;
}

body.theme-modern .languageSelection .language-img {
    width: 24px;
    max-height: none;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

body.theme-modern .languageSelection .language-img svg,
body.theme-modern .languageSelection .language-img img {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    display: block;
    object-fit: cover;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--secondarybrush) 50%, transparent);
}

body.theme-modern .languageSelection droptxt {
    font-size: var(--fontsizesubcontent);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* ——— Applications (Accueil / Liste / Demande) ——— */
body.theme-modern .apps-page {
    padding: 0.5rem 0.75rem 1.5rem;
}

body.theme-modern .apps-page-title {
    margin: 0.75rem 0 1.25rem;
}

body.theme-modern .apps-home-header {
    justify-content: flex-start;
}

body.theme-modern .apps-home-header .apps-page-title {
    margin: 0.35rem 0 1.1rem;
}

body.theme-modern .apps-home-layout {
    align-items: flex-start;
    gap: 1.25rem;
}

body.theme-modern .apps-home-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
    padding: 0 2px 0.55rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--textbrush);
    border-bottom: 2px solid color-mix(in srgb, var(--tertiarylightbrush) 45%, transparent);
}

body.theme-modern .apps-home-section-title i {
    color: var(--tertiarylightbrush);
    opacity: 0.9;
}

body.theme-modern .apps-home-section-title--secondary {
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0.78;
    border-bottom-width: 1px;
    border-bottom-color: var(--theme-surface-border);
}

body.theme-modern .apps-home-section-title--secondary i {
    color: inherit;
    opacity: 0.65;
}

body.theme-modern .apps-home-primary {
    margin-bottom: 1.75rem;
}

body.theme-modern .apps-home-secondary {
    margin-bottom: 0.5rem;
}

/* Services / outils — polish thème (base dans NinePoints.css) */
body.theme-modern .apps-link-row-cta {
    color: var(--theme-link);
}

body.theme-modern .apps-link-row--locked .buttonAddAccess {
    margin: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

body.theme-modern .apps-home-hint {
    margin: 0.75rem 0 0;
    padding: 0 0.35rem;
    font-size: 0.78rem;
    font-style: italic;
    opacity: 0.55;
    text-align: center;
}

body.theme-modern .apps-section {
    margin-bottom: 1.25rem;
}

body.theme-modern .apps-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

/* Actions rapides = secondaires, compactes */
body.theme-modern .apps-quick-panel {
    padding: 0;
    margin-left: 0.75rem;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    height: fit-content;
}

@media (max-width: 1024px) {
    body.theme-modern .apps-quick-panel {
        margin-left: 0;
    }
}

body.theme-modern .apps-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

body.theme-modern .apps-home .apps-quick-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.55rem;
    text-align: left;
    text-decoration: none;
    color: var(--textbrush);
    font: inherit;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

body.theme-modern .apps-home .apps-quick-item:hover {
    text-decoration: none;
    color: var(--textbrush);
    background: color-mix(in srgb, var(--tertiarylightbrush) 8%, transparent);
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent);
    transform: none;
}

body.theme-modern .apps-home .apps-quick-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--tertiarylightbrush) 16%, transparent);
    color: var(--tertiarylightbrush);
    box-shadow: none;
    font-size: 0.75rem;
}

body.theme-modern .apps-home .apps-quick-item-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.88rem;
}

body.theme-modern .apps-home .apps-quick-item-arrow {
    opacity: 0.4;
    color: var(--tertiarylightbrush);
    font-size: 0.75rem;
}

body.theme-modern .imgService {
    width: 35px;
    max-height: 35px;
}

body.theme-modern .imageService {
    max-height: 40px;
    max-width: 80px;
    object-fit: contain;
}

body.theme-modern .apps-empty {
    padding: 1rem 1.25rem;
    justify-content: center;
    opacity: 0.85;
}

body.theme-modern .apps-request-section {
    max-width: none;
    width: 100%;
}

body.theme-modern .apps-request-row {
    justify-content: space-between;
    gap: 0.75rem;
}

body.theme-modern .apps-request-app {
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

body.theme-modern .apps-request-date {
    opacity: 0.7;
    white-space: nowrap;
}

body.theme-modern .apps-request-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

body.theme-modern .apps-request-status--pending {
    background: var(--theme-accent-soft);
    color: var(--tertiarylightbrush);
}

body.theme-modern .apps-request-status--accepted {
    background: color-mix(in srgb, #2ecc71 18%, transparent);
    color: #2ecc71;
}

body.theme-modern .apps-request-status--rejected {
    background: color-mix(in srgb, var(--deletebrush) 16%, transparent);
    color: var(--deletebrush);
}

/* Shop-row / 9 pts — polish thème (structure dans NinePoints.css) */
body.theme-modern .shop-group-title {
    border-bottom-color: var(--theme-surface-border);
}

body.theme-modern .shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    width: 100%;
}

body.theme-modern .shop-grid > .shop-row:last-child:nth-child(odd):not(:only-child) {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    body.theme-modern .shop-grid {
        grid-template-columns: 1fr;
    }

    body.theme-modern .shop-grid > .shop-row:last-child:nth-child(odd):not(:only-child) {
        grid-column: auto;
    }
}

body.theme-modern .softwareSubscriptionContainer {
    background: color-mix(in srgb, black 4%, var(--theme-surface)) !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

body.theme-modern .softwareSubscriptionContainer:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 8%, var(--theme-surface)) !important;
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 35%, transparent) !important;
    transform: none;
    box-shadow: none;
}

body.theme-modern .softwareSubscriptionContainer.shop-row--locked {
    background: color-mix(in srgb, black 2%, color-mix(in srgb, var(--theme-surface) 55%, transparent)) !important;
}

body.theme-modern .buttonAddAccess.ButtonPrimary,
body.theme-modern .buttonAddAccess.ButtonSecondary {
    color: var(--theme-link) !important;
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 55%, transparent) !important;
    background: transparent !important;
}

body.theme-modern .buttonAddAccess.ButtonPrimary:hover:not(:disabled),
body.theme-modern .buttonAddAccess.ButtonSecondary:hover:not(:disabled) {
    color: var(--theme-link-hover) !important;
    border-color: var(--tertiarylightbrush) !important;
    background: color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent) !important;
}

body.theme-modern .PPContainer3 {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 16px !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 12px 32px var(--theme-elevation);
}

body.theme-modern .PPContainer3:hover {
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 55%, var(--secondarybrush)) !important;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent);
}

body.theme-modern .applicationContainer {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 16px !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 10px 28px var(--theme-elevation);
}

body.theme-modern .applicationContainer:hover {
    border-color: var(--tertiarylightbrush) !important;
    box-shadow: 0 12px 30px color-mix(in srgb, var(--tertiarylightbrush) 28%, transparent);
}

body.theme-modern .appListContainer {
    gap: 0.65rem;
}

body.theme-modern .buttonCircleInNinePoint {
    border-radius: 999px !important;
}

body.theme-modern .buttonLargeInNinePoint,
body.theme-modern .buttonExtraLargeInNinePoint {
    min-width: 0 !important;
    height: 35px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.theme-modern .buttonLargeInNinePoint {
    width: 150px !important;
}

body.theme-modern .buttonExtraLargeInNinePoint {
    width: 200px !important;
}

/* CTA alignés sur Accueil / shop-list (écrase 150/200) */
body.theme-modern .shop-row-actions .buttonLargeInNinePoint,
body.theme-modern .shop-row-actions .buttonExtraLargeInNinePoint,
body.theme-modern .shop-row-actions .buttonAddAccess {
    width: 10.75rem !important;
    min-width: 10.75rem !important;
    max-width: 10.75rem !important;
}

/* ——— Left menu shell (opaque sombre, comme avant) ——— */
body.theme-modern .appContainer.bg-menuLeft,
body.theme-modern .bg-menuLeft.appContainer {
    background: var(--menuLeft) !important;
    border-right: 1px solid color-mix(in srgb, #000 35%, transparent);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.theme-modern .navigationContainer.bg-menuRight,
body.theme-modern .bg-menuRight.navigationContainer,
body.theme-modern .headerContainer.bg-menuRight {
    background: var(--menuRight) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: 1px solid color-mix(in srgb, #000 25%, transparent);
}

body.theme-modern .appContainerItem {
    border-radius: 12px;
}

body.theme-modern .appContainerItem:hover {
    background-color: color-mix(in srgb, var(--tertiarylightbrush) 14%, transparent) !important;
}

body.theme-modern .appContainerItemSelected {
    background-color: color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent) !important;
    box-shadow: none;
}

body.theme-modern .navigationItem {
    border-radius: 10px;
    margin: 2px 6px;
}

body.theme-modern .navigationItem:hover {
    background-color: color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent) !important;
}

body.theme-modern .navigationItem.bg-tertiaryLight {
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    ) !important;
    border-radius: 10px;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--tertiarylightbrush) 30%, transparent);
}

body.theme-modern .navigationItem.bg-tertiaryLight::after {
    display: none;
}

body.theme-modern .nav-section-header {
    border-bottom-color: color-mix(in srgb, #fff 18%, transparent);
    border-radius: 10px;
}

body.theme-modern .nav-menu-search-input {
    border-radius: 12px !important;
    border-color: color-mix(in srgb, #fff 20%, transparent) !important;
}

body.theme-modern .nav-menu-search-input:focus {
    border-color: var(--tertiarylightbrush) !important;
    box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

/* ——— Documentation ——— */
body.theme-modern .buttonToggleImage,
body.theme-modern .buttonToggle {
    color: var(--textbrush) !important;
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 14px !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 8px 20px var(--theme-elevation);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

body.theme-modern .buttonToggleImage:hover,
body.theme-modern .buttonToggle:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 16%, var(--primarybrush)) !important;
    color: var(--textbrush) !important;
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 50%, var(--secondarybrush)) !important;
    transform: translateY(-1px);
}

body.theme-modern .buttonToggleImage.active,
body.theme-modern .buttonToggle.active {
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    ) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--tertiarylightbrush) 32%, transparent);
}

body.theme-modern .cardFormaMain {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px !important;
}

/* ——— Logylab ——— */
body.theme-modern .divProject {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 12px 32px var(--theme-elevation);
}

body.theme-modern .noProjectText {
    color: color-mix(in srgb, var(--tertiarylightbrush) 35%, #b33) !important;
}

body.theme-modern .titleMain,
body.theme-modern .subTitleMain {
    color: var(--textbrush);
}

/* ——— CloudStorage ——— */
body.theme-modern .filters {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 14px !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 8px 20px var(--theme-elevation);
}

body.theme-modern .Filter-Title h2 {
    color: color-mix(in srgb, var(--tertiarylightbrush) 45%, var(--textbrush));
}

body.theme-modern .DatePicker {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    border-radius: 12px !important;
    color: var(--textbrush);
}

/* ——— Profile ——— */
body.theme-modern .info-title {
    color: color-mix(in srgb, var(--tertiarylightbrush) 55%, var(--textbrush));
}

body.theme-modern select {
    background: var(--theme-surface) !important;
    border: 1px solid color-mix(in srgb, var(--secondarybrush) 42%, transparent) !important;
    border-radius: 12px !important;
}

body.theme-modern .profile-page {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    gap: 0.35rem;
}

body.theme-modern .profile-form-wrap,
body.theme-modern .profile-form {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

body.theme-modern .profile-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
}

body.theme-modern .profile-page .set-size {
    height: auto;
    min-height: 0;
}

body.theme-modern .profile-page .set-size:has(.image-changebtn:not(.collapse)) {
    min-height: 42px;
}

body.theme-modern .profile-page .RoundedImage,
body.theme-modern .profile-page img.RoundedImage {
    height: 148px !important;
    width: 148px !important;
    border: 3px solid color-mix(in srgb, #fff 70%, var(--tertiarylightbrush));
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--tertiarylightbrush) 18%, transparent),
        0 12px 28px var(--theme-elevation);
}

body.theme-modern .profile-page .RectangularImage,
body.theme-modern .profile-page .logo-image {
    height: 140px !important;
    width: auto !important;
    max-width: 280px;
    padding-inline: 0 !important;
    object-fit: contain !important;
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    background: var(--theme-surface);
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 10px 28px var(--theme-elevation);
}

body.theme-modern .profile-page .logo-div {
    position: relative;
    display: inline-block;
    min-width: 0;
    line-height: 0;
}

body.theme-modern .profile-page .opacity-background {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border-radius: 16px;
}

body.theme-modern .profile-page .opacity-background-rounded {
    height: 148px;
    width: 148px;
}

body.theme-modern .profile-form-message {
    min-height: 0;
    margin-bottom: 0.75rem;
    text-align: center;
}

body.theme-modern .profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    margin-bottom: 0.9rem;
}

body.theme-modern .profile-field > label {
    margin: 0;
    font-weight: 600;
    font-size: 0.92rem;
    color: color-mix(in srgb, var(--tertiarylightbrush) 30%, var(--textbrush));
}

body.theme-modern .profile-field .textBoxActive,
body.theme-modern .profile-field select,
body.theme-modern .profile-field input:not([type="hidden"]):not(.collapse) {
    width: 100%;
    max-width: none;
    height: 42px;
    padding: 0 0.9rem;
}

body.theme-modern .profile-field-value {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 0.9rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--secondarybrush) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--secondarybrush) 28%, transparent);
    color: var(--textbrush);
}

body.theme-modern .profile-field-error {
    font-size: 0.85rem;
    min-height: 0;
}

body.theme-modern .profile-field-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 0.75rem;
}

body.theme-modern .profile-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

body.theme-modern .profile-form-actions.collapse {
    display: none !important;
}

@media (max-width: 560px) {
    body.theme-modern .profile-field-row {
        grid-template-columns: 1fr;
    }
}

/* Sécurité : blocs distincts */
body.theme-modern .profile-security {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    gap: 1rem;
}

body.theme-modern .profile-section {
    width: 100%;
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    padding: 1.15rem 1.35rem 1rem;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 12px 32px var(--theme-elevation);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.theme-modern .profile-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--secondarybrush) 50%, transparent);
    font-weight: 650;
    color: color-mix(in srgb, var(--tertiarylightbrush) 40%, var(--textbrush));
}

/* Sessions */
body.theme-modern .sessions-list {
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0.5rem auto 0;
    gap: 0.55rem;
}

body.theme-modern .sessions-header {
    padding: 0.55rem 0.85rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid color-mix(in srgb, var(--secondarybrush) 55%, transparent);
    background: transparent;
    color: color-mix(in srgb, var(--tertiarylightbrush) 35%, var(--textbrush));
}

body.theme-modern .sessions-header label {
    margin: 0;
    opacity: 0.85;
    letter-spacing: 0.01em;
}

body.theme-modern .sessions-row {
    padding: 0.65rem 0.85rem;
    margin: 0 !important;
    min-height: 4.25rem;
    align-items: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.theme-modern .sessions-row:hover {
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 40%, var(--secondarybrush));
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 10px 26px var(--theme-elevation);
}

body.theme-modern .sessions-row .headerLabel {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

/* ——— Learning / Access polish ——— */
body.theme-modern .bg-transparentdark {
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border);
    border-radius: 12px;
}

body.theme-modern .learning-list.bg-transparentDarkBrush {
    border-radius: 16px;
}

body.theme-modern .buttonInfo {
    border-color: var(--tertiarylightbrush);
    color: var(--tertiarylightbrush);
    background: color-mix(in srgb, var(--tertiarylightbrush) 10%, transparent);
}

body.theme-modern .buttonInfo:hover {
    background: color-mix(in srgb, var(--tertiarylightbrush) 22%, transparent);
    color: var(--tertiarybrush);
    border-color: var(--tertiarybrush);
}

body.theme-modern .learning-row + .learning-row {
    border-top-color: var(--theme-surface-border);
}

/* ——— Documentation ——— */
body.theme-modern .docs-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 0.25rem 0.5rem 2rem;
}

body.theme-modern .docs-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 0.5rem;
    z-index: 2;
}

body.theme-modern .docs-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

body.theme-modern .docs-search-icon {
    position: absolute;
    left: 1rem;
    opacity: 0.45;
    pointer-events: none;
    color: var(--textbrush);
}

body.theme-modern .docs-search {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.6rem !important;
    border-radius: 14px !important;
    font-size: 1rem;
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-surface-border) !important;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 8px 22px var(--theme-elevation);
}

body.theme-modern .docs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

body.theme-modern .docs-chip {
    appearance: none;
    border: 1px solid var(--theme-surface-border);
    background: var(--theme-surface);
    color: var(--textbrush);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body.theme-modern .docs-chip:hover {
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 45%, var(--secondarybrush));
    background: color-mix(in srgb, var(--tertiarylightbrush) 10%, var(--primarybrush));
}

body.theme-modern .docs-chip.is-active {
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    );
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--tertiarylightbrush) 28%, transparent);
}

body.theme-modern .docs-list {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

body.theme-modern .docs-section {
    background: var(--theme-surface);
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    padding: 0.85rem 0.85rem 0.65rem;
    box-shadow:
        0 1px 0 var(--theme-surface-inset) inset,
        0 12px 32px var(--theme-elevation);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.theme-modern .docs-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.45rem 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--secondarybrush) 35%, transparent);
    margin-bottom: 0.55rem;
}

body.theme-modern .docs-section-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

body.theme-modern .docs-section-title {
    margin: 0;
    flex: 1;
    font-size: 1.15rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--tertiarylightbrush) 40%, var(--textbrush));
}

body.theme-modern .docs-section-count {
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--theme-accent-soft);
    color: var(--tertiarylightbrush);
}

body.theme-modern .docs-items {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.theme-modern .docs-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--textbrush);
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

body.theme-modern .docs-item:hover {
    text-decoration: none;
    color: var(--textbrush);
    background: color-mix(in srgb, var(--tertiarylightbrush) 10%, var(--primarybrush));
    border-color: color-mix(in srgb, var(--tertiarylightbrush) 35%, transparent);
    transform: translateX(2px);
}

body.theme-modern .docs-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: linear-gradient(
        135deg,
        var(--tertiarylightbrush) 0%,
        color-mix(in srgb, var(--tertiarybrush) 70%, var(--tertiarylightbrush)) 100%
    );
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--tertiarylightbrush) 28%, transparent);
}

body.theme-modern .docs-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

body.theme-modern .docs-item-title {
    font-weight: 600;
    line-height: 1.3;
}

body.theme-modern .docs-item-desc {
    font-size: 0.9rem;
    line-height: 1.35;
    opacity: 0.72;
}

body.theme-modern .docs-item-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tertiarylightbrush);
    background: color-mix(in srgb, var(--tertiarylightbrush) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--tertiarylightbrush) 28%, transparent);
}

body.theme-modern .docs-item:hover .docs-item-action {
    background: color-mix(in srgb, var(--tertiarylightbrush) 18%, transparent);
}

body.theme-modern .docs-empty {
    margin: 2rem auto;
    text-align: center;
    opacity: 0.75;
    font-size: 1.05rem;
}

@media (max-width: 720px) {
    body.theme-modern .docs-item {
        flex-wrap: wrap;
    }

    body.theme-modern .docs-item-action {
        margin-left: calc(2.35rem + 0.85rem);
    }
}
